Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: hash on untracked folders #4263

Merged
merged 4 commits into from
Apr 26, 2024
Merged

Conversation

jLopezbarb
Copy link
Contributor

Proposed changes

Fixes DEV-231

  • Use git ls-files--others --exclude-standard in order to get the files that are untracked.
  • Previous method was getting the folders and we were not iterating through them making it impossible to track if there was a file in a untracked folder

How to validate

  1. create a new dir mkdir new-dir && cd new-dir
  2. Create the following okteto.yml:
build:
  test-service:
    context: test
  1. commit the file: git init && git add . && git commit -m "initial commit"
  2. create the context folder mkdir test
  3. Create the following Dockerfile inside:
FROM alpine
  1. Create other files on the root of the project and check that it's not building
  2. Create other files on the test folder and check that we are always returning the same order (I tested with 20 files and check that is only building the first time)

CLI Quality Reminders 馃敡

For both authors and reviewers:

  • Scrutinize for potential regressions
  • Ensure key automated tests are in place
  • Build the CLI and test using the validation steps
  • Assess Developer Experience impact (log messages, performances, etc)
  • If too broad, consider breaking into smaller PRs
  • Adhere to our code style and code review guidelines

Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez <javier@okteto.com>
@jLopezbarb jLopezbarb marked this pull request as ready for review April 24, 2024 15:12
@jLopezbarb jLopezbarb requested a review from a team as a code owner April 24, 2024 15:13
Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez <javier@okteto.com>
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 48.83721% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 45.65%. Comparing base (cce75fc) to head (28f2f9f).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4263      +/-   ##
==========================================
- Coverage   45.65%   45.65%   -0.01%     
==========================================
  Files         306      306              
  Lines       27676    27710      +34     
==========================================
+ Hits        12635    12650      +15     
- Misses      13963    13979      +16     
- Partials     1078     1081       +3     

@jLopezbarb jLopezbarb merged commit 4f457ca into master Apr 26, 2024
11 of 12 checks passed
@jLopezbarb jLopezbarb deleted the jlo/fix-hash-on-untracked-folders branch April 26, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants