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

Indexing race condition #1032

Open
abstractionfactory opened this issue Sep 26, 2024 · 4 comments
Open

Indexing race condition #1032

abstractionfactory opened this issue Sep 26, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@abstractionfactory
Copy link
Contributor

Thank you for reporting an issue.

The registry currently has a race condition when not all artifacts are available for a provider release yet (see #1030). The indexing should inspect the SHASUMS file and make sure that all files are present.

OpenTofu Version

N/A

OpenTofu Configuration Files

N/A

@abstractionfactory
Copy link
Contributor Author

Question: this is a rare case. Do we solve it here or in libregistry pending a switchover?

@cam72cam
Copy link
Member

It's a few lines of code here, whereas the libregistry switchover is a much larger change.

@cam72cam cam72cam self-assigned this Sep 26, 2024
@cam72cam
Copy link
Member

This is a bit of a tricky situation. Not all projects are setup to correctly produce the checksums file, which we saw in the hydration process. The logic we have currently is to only fail if there are zero targets provided.

I think I've got an idea for a workaround, but I don't love it.

@cam72cam
Copy link
Member

The more I look at this, the more it looks like a checksum was uploaded early. We generate all possible files from the checksum data and don't actually inspect the release beyond there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants