feat(workflows): Refactor wait-for-required-workflows#9813
feat(workflows): Refactor wait-for-required-workflows#9813candiduslynx wants to merge 7 commits into
wait-for-required-workflows#9813Conversation
erezrokah
left a comment
There was a problem hiding this comment.
See my comment here #9797 (comment)
I don't understand how we can submit a fix for this issue until we confirm we can de-duplicate using IDs
As we saw (without IDs logged, but fairly obvious due to the name uniqueness) the duplicated check run from paged API, the only suitable conclusion is the following:
See API doc for getting check run (ID is sufficient key). |
We did not see any duplicate IDs, only names. I suggest we at least wait until we see duplicate IDs. You can even log any detected duplicates before doing the filter here to confirm https://github.com/cloudquery/cloudquery/pull/9813/files#diff-9878c300a2552b0ecce61f2e611d6b959132e0ccd85ce4619c765cd1b35d0757R93 I'd rather wait to get additional information based on the debug logs we added rather than doing a refactor to an important part of our code base, especially since we've haven't seen this issue very often (or at least to justify the refactor). TLDR: Let's try and reproduce the issue first, then fix it. If we can't reproduce it (or rarely reproduce it), I don't see a reason to do such a significant change |
Well, this approach allows us to see only the new check runs we saw instead of the already precessed ones, making debugging much easier.
|
I think we can agree this code is already complex and error prone (as seen in the time spent on recent PRs) so I think it's better to identify the issue first, than do any code changes later. Is there any information missing from the current logs that allows us to verify our assumption? Also you tested only on a single plugin, so I don't think that will reproduce the edge cases we have been seeing |
b090b6c to
70bd1d7
Compare
|
@erezrokah See #9797 (comment) for the repro |
|
Replaced by #9822 |
|
We discussed this in a Zoom call, and figured that once we add re-usable workflows we should be able to give each plugin validate release and test policies job a distinct name such as That should make the wait for all workflow more robust and also allow us to log and know which plugins are waiting for workflows with the same name |
#### Summary Fixes #9797. Follow up to #9793 and replaces #9813. #9797 (comment) Confirms the ID is duplicated and we can filter using it <!--
Closes #9797
Tested via #9814