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 flaky list large dir test #2855

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

Tulsishah
Copy link
Collaborator

@Tulsishah Tulsishah commented Jan 3, 2025

Description

Implementing measures to avoid 404 errors when removing data after testing. Even if a file or folder cannot be deleted, it won't cause issues because:

  1. Clean Environment: Our CI tests use a fresh bucket for each run, so even if objects are not deleted, it will not cause any issues.
  2. Error Handling: We're ignoring errors if a file or directory already exists, while doing testing so uncleared file should not cause any issue for next run.

This is a temporary workaround, a quick fix, until we implement a more permanent solution. Using a static bucket would require significant changes, potentially impacting our CD pipeline. So, for now, I've implemented this quick fix to prevent further issues while we work on a more comprehensive solution.

Link to the issue in case of a bug fix.

b/380007938

Testing details

  1. Manual - NA
  2. Unit tests - NA
  3. Integration tests - Automated

@Tulsishah Tulsishah added the execute-integration-tests Run only integration tests label Jan 3, 2025
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.17%. Comparing base (19f1a0f) to head (19f5b3a).
Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2855      +/-   ##
==========================================
+ Coverage   76.11%   76.17%   +0.06%     
==========================================
  Files         118      118              
  Lines       16557    16637      +80     
==========================================
+ Hits        12603    12674      +71     
- Misses       3423     3430       +7     
- Partials      531      533       +2     
Flag Coverage Δ
unittests 76.17% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

fi

PATH=$1
# Run the gcloud command and suppress known errors
Copy link
Collaborator

@raj-prince raj-prince Jan 3, 2025

Choose a reason for hiding this comment

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

Why aren't we use static bucket? That will remove the problem due to creation and deletion.

Copy link
Collaborator Author

@Tulsishah Tulsishah Jan 5, 2025

Choose a reason for hiding this comment

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

This is a temporary workaround, a quick fix, until we implement a more permanent solution. Using a static bucket would require significant changes, potentially impacting our CD pipeline. So, for now, I've implemented this quick fix to prevent further issues while we work on a more comprehensive solution.

@Tulsishah Tulsishah marked this pull request as ready for review January 6, 2025 04:20
@Tulsishah Tulsishah requested a review from a team as a code owner January 6, 2025 04:20
@kislaykishore kislaykishore requested review from a team, BrennaEpp, gargnitingoogle and tritone and removed request for a team, BrennaEpp and gargnitingoogle January 6, 2025 04:21
@Tulsishah Tulsishah requested a review from ashmeenkaur January 6, 2025 05:05

DIR_PATH=$1
# Run the gcloud command and suppress known errors
gcloud storage rm -r gs://${DIR_PATH}/** 2>&1 | grep -v -E "The following URLs matched no objects|404"
Copy link
Collaborator

Choose a reason for hiding this comment

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

won't gcloud command still fail in this case? we just won't see 404 errors in the output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execute-integration-tests Run only integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants