-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add pagination to appropriate listWorkflowRunArtifacts call - take 2 #225
Add pagination to appropriate listWorkflowRunArtifacts call - take 2 #225
Conversation
e580cfb
to
6476da6
Compare
6476da6
to
e393d88
Compare
10bcdac
to
e96f29b
Compare
@dawidd6 / @jamesmortensen - I think this is now good to go. I've added a couple of new test cases to test this properly (and ensure we don't have a repeat of last time!). These tests initially failed (example, showing they would have caught the previous bug) but now pass. |
.github/workflows/upload.yml
Outdated
strategy: | ||
matrix: | ||
# Use a matrix to run this job 40 times with 40 different artifacts. This catches any pagination issues (as GitHub's default page size is 30) | ||
run-number: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a lot of artifacts. I get this is done to test the pagination but it adds up quickly to 80 separate jobs when adding upload+download jobs together. Would like to avoid this tbh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's definitely a fair concern. I can think of a few options here:
- Just delete the test (i.e. decide the cost of testing this isn't worth the benefit we get from it)
- Leave it as-is (i.e. decide the cost of testing it is worth the benefit we get from it), potentially deleting the 40 download tests and just replacing it with one test to check that we can download one of the artifacts on the second page (leaving us with 41 jobs)
- Have a single job that just runs an upload 40 times - it'd look a bit horrible in the yaml, but would mean we only have 1 job.
Which of those do you think is best @dawidd6 (unless you can think of a better way!)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in a favor of the first option. Good you took the time and wrote those tests, we are now sure it works alright. Yet in the long run I don't think we need to run 80 jobs on each push/PR 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - hopefully this is now good to go 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment/concern about new workflow jobs. Otherwise LGTM, thanks.
Nice, thanks! Works on master too https://github.com/dawidd6/action-download-artifact/actions/runs/4165023555 |
A second attempt at #205 after the first attempt had to be reverted.
More detail in #204.