atc: Check pinned resources whose pinned version doesn't exist in the version history#9652
Open
taylorsilva wants to merge 3 commits into
Open
atc: Check pinned resources whose pinned version doesn't exist in the version history#9652taylorsilva wants to merge 3 commits into
taylorsilva wants to merge 3 commits into
Conversation
Signed-off-by: Taylor Silva <dev@taydev.net>
noticed some weird cases where a check container had multiple instances of the `check` script running. Had a feeling it might be from this. Decided to go with the more robust `toDb` which will de-dup across multiple web nodes. Signed-off-by: Taylor Silva <dev@taydev.net>
…sn't exist in the version history of the resource I verified that the additional filter does not impact performance of the query. A before/after on the query using `EXPLAIN ANALYZE` showed no impact on the query's runtime. Signed-off-by: Taylor Silva <dev@taydev.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed by this PR
closes #9646
Resources()func in the check factory. The check factory will now return resources that are pinned, but their pinned version does not exist in the version history of the resource. Once the pinned version is found the resource will no longer be checkedBuildStarterwould create in-memory checks. I switched it to creating checks in the database. This ensures multiple checks aren't run across web nodes. Issue I ran into here is what prompted this change: check exits early if another check is running git-resource#479atc/db/build_test.gowouldn't fail in an expected manner due to the way the test was setup. That's now also resolved in this PR.Suggested changes were initially made by Claude and the issue reporter here: https://github.com/fbehrens51/concourse/tree/fix/pinned-resource-lidar-check
Code is mostly unchanged besides a few nit changes I made to comments and naming. I did test the new query against the db backing https://ci.concourse-ci.org/ to ensure query performance did not degrade. Before/after
EXPLAIN ANALYZEtimes are:I ran both versions of the query multiple times and the above times represent the average results I saw.