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

Combine 2 fixes so that enough checks pass to be able to merge #15771

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

AlanCoding
Copy link
Member

SUMMARY

This is #15768 and #15767 because neither one fixes enough to be able to merge anything.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API

thedoubl3j and others added 2 commits January 23, 2025 10:19
unique-ify name

psh, who needs loops

Folder management

Extracts into current path
@AlanCoding AlanCoding marked this pull request as ready for review January 23, 2025 21:26
for i in coverage-*; do
cp -rv $i/* ~/.ansible/collections/ansible_collections/awx/awx/tests/output/coverage/
done
cp -rv coverage/* ~/.ansible/collections/ansible_collections/awx/awx/tests/output/coverage/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels equivalent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have better documentation. But this is tied into the change in .github/actions/upload_awx_devel_logs/action.yml in a non-obvious way. Because we previously used the same name for upload of each artifact. It would then put each item into a different folder based on the path. Using the same name is exactly what the v3-v4 change prohibited. So now we upload based on different names, but the actions/download-artifact changes here put them into the same local folder. So the loop is removed. Each item has kind of like coverage "fragments". Were were combining the fragments into the same folder eventually anyway, so yeah the ultimate behavior should be the same.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels equivalent

It's not quite. The previous one iterates all directories starting with coverage- and copies all their files into the target. The new one just copies all the coverage-* directories into the target. i.e. the first copies all the inner files of the directories, the second copies the directories themselves.

Something like this might be equivalent if you really want to lose the loop:

cp -rv coverage/coverage-*/* ~/.ansible/collections/ansible_collections/awx/awx/tests/output/coverage/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it sounds like this recursion is unnecessary now based on what @AlanCoding is saying. It sounds like there's no inner directory anymore?

@AlanCoding AlanCoding merged commit 534c312 into ansible:devel Jan 23, 2025
27 checks passed
Comment on lines +362 to +365
- name: Download coverage artifacts A to H
uses: actions/download-artifact@v4
with:
name: coverage-a-h
Copy link
Member

@relrod relrod Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dislike the "groups" being hardcoded here 😕 - when I wrote this I tried really hard to make sure there was only one place the groups had to be defined (and that was in the CI matrix that actually splits up the groups.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In prior state, to accomplish that, the coverage files were uploaded with the same name. Apparently, uploading with the same name resulted in merging them into the same folder, or using subfolders specified by path. This specific behavior was yanked from the Github action, so that name must always be unique. The need to download each became a problem with this change from the upload-artifact action. If this is not satisfied, it outright fails the check whenever you get to the step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants