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

[bug] Maven / Gradle builders fail to run concurrently #2662

Closed
laurentsimon opened this issue Aug 20, 2023 · 3 comments
Closed

[bug] Maven / Gradle builders fail to run concurrently #2662

laurentsimon opened this issue Aug 20, 2023 · 3 comments
Assignees
Labels
area:gradle Issue related to the gradle builder area:maven Issue related to maven type:bug Something isn't working

Comments

@laurentsimon
Copy link
Collaborator

laurentsimon commented Aug 20, 2023

If two jobs within the same workflow run the Maven builder, e.g. on two projects hosted on the same repo, the target folders will have a name collision, due to lack of randomization in https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/gradle/action.yml#L120-L123 and similarly in https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/maven/action.yml#L108-L111

The artifact name (not the name on disk) needs to be randomized, as in
https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/nodejs/action.yml#L84-L94

This requires an update to:

  1. The internal Action. It must add randomization and return a new output
  2. The publish / download Actions. They need an additional input for the randomized name.
  3. e2e tests

NOTE: The nodejs builder has the relevant code as example.

@laurentsimon laurentsimon added type:bug Something isn't working area:gradle Issue related to the gradle builder area:maven Issue related to maven labels Aug 20, 2023
@laurentsimon laurentsimon added this to the BYOB framework GA milestone Aug 20, 2023
@laurentsimon
Copy link
Collaborator Author

@AdamKorcz
Copy link
Collaborator

1 and 2 are fixed here: #2665

@AdamKorcz
Copy link
Collaborator

#3 is fixed here: slsa-framework/example-package#281

laurentsimon pushed a commit that referenced this issue Aug 21, 2023
Fixes the following from
#2662:

- The internal Action. It must add randomization and return a new output
- The publish / download Actions. They need an additional input for the
randomized name.

---------

Signed-off-by: AdamKorcz <adam@adalogics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:gradle Issue related to the gradle builder area:maven Issue related to maven type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants