Skip to content

Check Close() errors to detect precondition failures during index.yaml upload #8773

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

Merged
merged 1 commit into from
Jul 30, 2025

Conversation

thbkrkr
Copy link
Contributor

@thbkrkr thbkrkr commented Jul 29, 2025

This replaces the deferred Close() with an explicit one so we can detect cases where the upload fails due to the GenerationMatch precondition (e.g., another release updated the file). This helps avoid silent race-condition issues.

See this googleapis/google-cloud-go code example.

@prodsecmachine
Copy link
Collaborator

prodsecmachine commented Jul 29, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@botelastic botelastic bot added the triage label Jul 29, 2025
@botelastic botelastic bot removed the triage label Jul 29, 2025
@thbkrkr thbkrkr added >bug Something isn't working :ci Things related to Continuous Integration, automation and releases triage labels Jul 29, 2025
@botelastic botelastic bot removed the triage label Jul 29, 2025
Copy link
Contributor

@barkbay barkbay left a comment

Choose a reason for hiding this comment

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

LGTM

@thbkrkr thbkrkr merged commit 8136605 into main Jul 30, 2025
9 checks passed
@thbkrkr thbkrkr deleted the handle-error-when-closing-index-writer branch July 30, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working :ci Things related to Continuous Integration, automation and releases :helm-charts >refactoring v3.2.0 (next next)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants