Skip to content

refactor(cfg): remove --precondition-errors flag#4587

Open
vipnydav wants to merge 1 commit intomasterfrom
remove-precondition-errors-flag
Open

refactor(cfg): remove --precondition-errors flag#4587
vipnydav wants to merge 1 commit intomasterfrom
remove-precondition-errors-flag

Conversation

@vipnydav
Copy link
Copy Markdown
Member

@vipnydav vipnydav commented Apr 6, 2026

Description

This PR removes the --precondition-errors flag and its corresponding configuration settings from GCSFuse. The behavior of returning an ESTALE error when an object is modified or deleted by a concurrent process is now the mandatory default.

Link to the issue

b/499886011

Testing details

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

Any backward incompatible change?

Yes. The --precondition-errors flag has been removed. Users who were explicitly setting this flag to false (disabling the stale file handle error) will get an error.

@vipnydav vipnydav requested review from a team, Tulsishah and meet2mky as code owners April 6, 2026 08:36
@vipnydav vipnydav requested a review from ashmeenkaur April 6, 2026 08:36
@github-actions github-actions bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Apr 6, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request standardizes the behavior of GCSFuse when encountering concurrent modifications to objects. By removing the optional --precondition-errors flag, the system now consistently returns an ESTALE error in these scenarios, ensuring safer data handling and preventing potential data corruption. This change simplifies the configuration surface and enforces a more robust default state for all users.

Highlights

  • Removal of --precondition-errors flag: The --precondition-errors flag and its associated configuration have been removed from GCSFuse.
  • Mandatory stale file handle error: Returning an ESTALE error when an object is modified or deleted by a concurrent process is now the mandatory default behavior.
  • Codebase cleanup: Removed the flag from configuration files, CLI argument parsing, and updated internal error mapping logic to reflect the new mandatory behavior.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@vipnydav vipnydav changed the title Remove --precondition-errors flag refactor(cfg): remove --precondition-errors flag Apr 6, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the precondition-errors configuration option and flag, making the return of ESTALE errors for concurrent object modifications the default behavior. The changes span configuration files, flag parsing, error mapping logic, and associated tests. Two issues were identified: an unreachable return statement in internal/cache/file/downloader/job_test.go and a remaining reference to the removed precondition_errors flag in the integration test script which would cause failures.

Comment thread tools/integration_tests/run_tests_mounted_directory.sh Outdated
Comment thread internal/cache/file/downloader/job_test.go Outdated
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Hi @meet2mky, @Tulsishah, @ashmeenkaur, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@ashmeenkaur ashmeenkaur removed their request for review April 7, 2026 08:50
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Hi @meet2mky, @Tulsishah, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@vipnydav vipnydav added execute-integration-tests Run only integration tests execute-integration-tests-on-zb To run E2E tests on zonal bucket. and removed remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. labels Apr 8, 2026
@vipnydav vipnydav force-pushed the remove-precondition-errors-flag branch from 4252aa8 to 7d9a513 Compare April 8, 2026 15:47
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.64%. Comparing base (8a9f498) to head (47c9fa1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4587   +/-   ##
=======================================
  Coverage   83.64%   83.64%           
=======================================
  Files         164      164           
  Lines       20272    20269    -3     
=======================================
- Hits        16956    16955    -1     
+ Misses       2676     2675    -1     
+ Partials      640      639    -1     
Flag Coverage Δ
unittests 83.64% <100.00%> (+<0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vipnydav vipnydav force-pushed the remove-precondition-errors-flag branch from 7d9a513 to 3191dad Compare April 8, 2026 16:17
@vipnydav vipnydav force-pushed the remove-precondition-errors-flag branch from 3191dad to 47c9fa1 Compare April 16, 2026 04:54
@vipnydav vipnydav requested a review from kislaykishore April 16, 2026 04:55
Copy link
Copy Markdown
Collaborator

@kislaykishore kislaykishore left a comment

Choose a reason for hiding this comment

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

Could you get a clean run of the linux-tests?

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 execute-integration-tests-on-zb To run E2E tests on zonal bucket.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants