Closed duniul closed 2 years ago
bors try
@duniul - I'll work on a test, but will have bors publish a dev version you can try out as well.
BotComment: Development version of orb available for manual validation - eddiewebb/queue@dev:74
@eddiewebb Testing the orb I noticed a related issue: if the current build doesn't match the provided tag pattern (either because it's incorrect or because its own tag doesn't match the pattern) it gets filtered out of the list of active builds. This means augmented_jobstatus.json
ends up empty and oldest_commit_time
is null
, getting the queue infinitely stuck.
I've fixed this in 9b965e7 by excluding the current build from the tag filtering step 👍 would you mind creating another dev version build and I'll try it out?
bors try
BotComment: Development version of orb available for manual validation - eddiewebb/queue@dev:74
@eddiewebb Thanks! We've been using this in several workflow runs today and it seems to work correctly now 🎉
bors merge
BotComment: Development version of orb available for manual validation - eddiewebb/queue@dev:74
Build failed:
bors merge
BotComment: Development version of orb available for manual validation - eddiewebb/queue@dev:74
BotComment: Production version of orb available for use - eddiewebb/queue@1.6.4
Build succeeded:
just caught up on this. nice contribution @duniul :D
wanted to note that this broke our usage of tag-pattern we had ours set to the following:
# jq regex uses `\\` for escape characters
tag-pattern: 'v0\\.\\d+\\.\\d+$'
which produced the following error when running after updating to use the orb with this PR's changes:
jq: error: Invalid escape at line 1, column 6 (while parsing '"\.\d"') at <top-level>, line 1:
[ .[] | select((.build_num | . == "85161") or (.vcs_tag | (. != null and ****("v0\.\d+\.\d+$"))) ) ]
jq: error: Invalid escape at line 1, column 6 (while parsing '"\.\d"') at <top-level>, line 1:
[ .[] | select((.build_num | . == "85161") or (.vcs_tag | (. != null and ****("v0\.\d+\.\d+$"))) ) ]
jq: 2 compile errors
Exited with code exit status 3
@calvin-summer shoot sorry. Not clear though, Do we need to tweak this further, or is it easy fix in config once known?
@calvin-summer shoot sorry. Not clear though, Do we need to tweak this further, or is it easy fix in config once known?
going to work on it after the weekend. I'll update in this thread when I've figured it out.
Checklist
Motivation, issues
Issue Patterns passed to CircleCI's own tag/branch filters (e.g.
filters.tags.only
) are required to be wrapped with/
to indicate that they are patterns, like/^release-.*/
. However, if you pass the same pattern astag-pattern
tountil_front_of_line
it gets stuck in an infinite queue because it passes the slashes as part of the pattern.Motivation
jobs: queue_job: steps:
workflows: version: 2
example_workflow: jobs:
Description
Remove wrapping slashes from the
tag-pattern
parameterI'm not sure how to write a test for this as I'm not really familiar with BATS or orb testing. 🙏