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

Fix missing outputs for jobs with matrix #32823

Merged
merged 6 commits into from
Dec 14, 2024

Conversation

Zettat123
Copy link
Contributor

@Zettat123 Zettat123 commented Dec 13, 2024

Fix #32795

If a job uses a matrix, multiple ActionRunJobs may have the same JobID. We need to merge the outputs of these jobs to make them available to the jobs that need them.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 13, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 13, 2024
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Dec 13, 2024
@lunny
Copy link
Member

lunny commented Dec 13, 2024

Can you add some tests?

@Zettat123
Copy link
Contributor Author

Zettat123 commented Dec 13, 2024

Can you add some tests?

I'll try to add some tests

@wxiaoguang wxiaoguang added this to the 1.23.0 milestone Dec 13, 2024
@Zettat123
Copy link
Contributor Author

Can you add some tests?

It is not easy to test because the function is part of the process of fetching tasks by act_runner. Right now we don't have a mechanism to test this. I would like to add a mechanism to test such functions after finishing the PRs I'm working on.

@wxiaoguang
Copy link
Contributor

I think findTaskNeeds could be tested by some mock data? It only does some database operations?

@Zettat123
Copy link
Contributor Author

I think findTaskNeeds could be tested by some mock data? It only does some database operations?

Ah, yes, Only testing findTaskNeeds is possible. I think I can add a test for findTaskNeeds for now and add integration tests for fetching tasks later.

Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

Vote my LGTM ahead

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 13, 2024
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 13, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 13, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 14, 2024
@lunny lunny merged commit 7269130 into go-gitea:main Dec 14, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug with job outputs when using matrix jobs
4 participants