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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): fix flaky e2e tests - ignore temporary files when checking for out of bound symlinks #20527

Merged

Conversation

CefBoud
Copy link
Contributor

@CefBoud CefBoud commented Oct 24, 2024

Addresses part of #11667

Description

This PR fixes errors that happen frequently in the CI 1, 2.

These issues arise when walking through a directory, where temporary files—like Git lock files—are scanned but may be deleted by the time their handlers execute.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Copy link

bunnyshell bot commented Oct 24, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Signed-off-by: cef <moncef.abboud95@gmail.com>
@CefBoud CefBoud force-pushed the fix/ignore-temp-files-in-symlink-check branch from 12004bc to fc12992 Compare October 24, 2024 19:36
@CefBoud CefBoud marked this pull request as ready for review October 24, 2024 19:36
@CefBoud CefBoud requested a review from a team as a code owner October 24, 2024 19:36
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 55.05%. Comparing base (ec499bb) to head (fc12992).
Report is 34 commits behind head on master.

Files with missing lines Patch % Lines
util/app/path/path.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #20527      +/-   ##
==========================================
- Coverage   55.07%   55.05%   -0.03%     
==========================================
  Files         322      322              
  Lines       54927    55026      +99     
==========================================
+ Hits        30253    30295      +42     
- Misses      22068    22131      +63     
+ Partials     2606     2600       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CefBoud CefBoud changed the title fix(ci): ignore temporary files when checking for out of bound symlinks fix(ci) - Flaky e2e tests: ignore temporary files when checking for out of bound symlinks Oct 24, 2024
@CefBoud CefBoud changed the title fix(ci) - Flaky e2e tests: ignore temporary files when checking for out of bound symlinks fix(ci): Flaky e2e tests - ignore temporary files when checking for out of bound symlinks Oct 24, 2024
@CefBoud CefBoud changed the title fix(ci): Flaky e2e tests - ignore temporary files when checking for out of bound symlinks fix(ci): fix flaky e2e tests - ignore temporary files when checking for out of bound symlinks Oct 24, 2024
@pasha-codefresh
Copy link
Member

pasha-codefresh commented Oct 27, 2024

Thank you @CefBoud . This flakiness appeared recently. Had you chance to check what change may introduced this issue? Just wonder why it started to happens

@CefBoud
Copy link
Contributor Author

CefBoud commented Oct 27, 2024

@pasha-codefresh
I did not observe any significant changes in this failing code path. However, I did notice that the version of Git being used by the job has been updated recently to 2.47.0, which was released in early October. This is simply an observation and does not necessarily imply that the issue originates from Git.
The error failed to walk for symlinks in the path.Walk function is not new; it has been encountered before, as noted in #11667.

Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems safe and reasonable. If a file doesn't exist, it can't provide a path for traversal.

@crenshaw-dev crenshaw-dev merged commit 76fbc1f into argoproj:master Oct 29, 2024
30 of 31 checks passed
@pasha-codefresh
Copy link
Member

/cherry-pick release-2.13

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Nov 8, 2024
…ks (#20527)

Signed-off-by: cef <moncef.abboud95@gmail.com>
pasha-codefresh pushed a commit to pasha-codefresh/argo-cd that referenced this pull request Nov 8, 2024
pasha-codefresh added a commit that referenced this pull request Nov 8, 2024
* fix: disable automaxprocs logging (#20069)

* disable automaxprocs logging

Signed-off-by: nitishfy <justnitish06@gmail.com>

fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

move maxprocs to main.go

Signed-off-by: nitishfy <justnitish06@gmail.com>

move set auto max procs to a function

Signed-off-by: nitishfy <justnitish06@gmail.com>

add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add unit test

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint issues

Signed-off-by: nitishfy <justnitish06@gmail.com>

---------

Signed-off-by: nitishfy <justnitish06@gmail.com>
(cherry picked from commit cfa1c89)

* fix(ci): ignore temporary files when checking for out of bound symlinks (#20527)

Signed-off-by: cef <moncef.abboud95@gmail.com>

---------

Signed-off-by: cef <moncef.abboud95@gmail.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
Co-authored-by: ABBOUD Moncef <moncef.abboud95@gmail.com>
adriananeci pushed a commit to adriananeci/argo-cd that referenced this pull request Dec 4, 2024
…ks (argoproj#20527)

Signed-off-by: cef <moncef.abboud95@gmail.com>
Signed-off-by: Adrian Aneci <aneci@adobe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants