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

generic-worker: Indexed Artifacts shouldn't be cached #6276

Closed
petemoore opened this issue May 31, 2023 · 1 comment
Closed

generic-worker: Indexed Artifacts shouldn't be cached #6276

petemoore opened this issue May 31, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@petemoore
Copy link
Member

petemoore commented May 31, 2023

Describe the bug
Indexed Artifacts were added in release v51.0.0, initially broken, and then fixed in v51.1.0. You can mount an artifact in a generic worker payload by specifying an index namespace and artifact name, together with a filename or directory name to mount the artifact at. Unlike other content that can be mounted (artifact content, url content, raw content, base64 content) the content should not be assumed to be up-to-date if already cached on disk. Since the index can be updated over time, we should keep a reference to the taskID in the cache, and if the taskID has changed, the content should be re-downloaded. Note, technically the content could change if a task was resolved successfully, and then was rerun and for some reason also was successful but produced a different artifact, but that is a very unusual edge case that we probably don't want to support.

To Reproduce

Steps to reproduce the behavior:

  1. Start generic-worker
  2. Mount an artifact from the index
  3. Update the index entry to point to a different taskID with the same artifact name, but with different contents
  4. Mount the same artifact from the index
  5. See that the mount in step 4 is from the content from the original index entry, not the updated one

Expected behavior
The artifact mounted should be from the task that was in the index under the given namespace at the time the task ran

Taskcluster version
51.1.0

Additional context
But discovered while working on #6271. Will also be fixed in this PR. Test TestIndexedArtifact tests for this issue.

@petemoore petemoore added the bug Something isn't working label May 31, 2023
@petemoore petemoore self-assigned this May 31, 2023
@petemoore
Copy link
Member Author

Duplicate of #6476 (whoops)

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

1 participant