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

Fixes wrong max slices in GHA #1716

Merged
merged 1 commit into from
Nov 29, 2021
Merged

Conversation

pSchlarb
Copy link
Contributor

Signed-off-by: pSchlarb p.schlarb@esatus.com

@pSchlarb pSchlarb requested a review from a team as a code owner November 26, 2021 10:33
@sovbot
Copy link

sovbot commented Nov 26, 2021

Can one of the admins verify this patch?

@udosson
Copy link
Contributor

udosson commented Nov 26, 2021

@pSchlarb thanks for the PR. Could you please provide some context and justify the proposed changes?

@pSchlarb
Copy link
Contributor Author

Yes, shimizut in the Rocketchat mentioned that the tests run by the GHA are only executing 11 of 22 slices per module.
It seems that the variable used strategy.job-total is the sum of all slices across all modules.
So to correctly test all slices with the runner these changes are neccessary.

@WadeBarnes
Copy link
Member

WadeBarnes commented Nov 26, 2021

I don't really like the idea of hard coding the number of slices. The original intent was to be able to update this section and have the test runs automatically adjust accordingly. Obviously strategy.job-total is the number of modules * the number of slices. We want it to just be the number of slices. The question is how do we get that value without hard coding it.

      matrix:
        module: [indy_node, indy_common]
        slice: [1, 2, 3, 4 ,5, 6, 7, 8, 9, 10, 11]

@WadeBarnes
Copy link
Member

WadeBarnes commented Nov 26, 2021

There does not seem to be a way to get the count of items included in the elements of a matrix.

What if we added a slice_count environment variable and had it set to the total number of slices, and documented it has to match the number of items contained in strategy.matrix.slice. It's still a bit of a hack, but better then having to change the value in multiple places is/when the number of items contained in strategy.matrix.slice is changed.

@pSchlarb
Copy link
Contributor Author

I am fine with that but i would call it SLICE_TOTAL_SLICES.

@pSchlarb pSchlarb force-pushed the gha_slice_fix branch 2 times, most recently from f9de6bb to 4c1d3d0 Compare November 29, 2021 15:07
Signed-off-by: Philipp Schlarb <p.schlarb@esatus.com>
@WadeBarnes
Copy link
Member

(ci) test this please

@WadeBarnes WadeBarnes merged commit d38f463 into hyperledger:master Nov 29, 2021
@pSchlarb pSchlarb deleted the gha_slice_fix branch November 29, 2021 17:13
@pSchlarb pSchlarb mentioned this pull request Dec 9, 2021
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.

4 participants