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

Expose secure boot testing features via matrix input #412

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

klutchell
Copy link
Contributor

@klutchell klutchell commented Sep 18, 2024

Some device types (generic-armd64) need to run the test
suites twice for the same base image, once with secure boot
vars enabled in Leviathan, and once without.

Rather than run the suites in series, or require building the
image twice, we can allow the test matrix to define separate runs
for the two modes.

@klutchell klutchell temporarily deployed to balena-staging.com September 18, 2024 17:28 — with GitHub Actions Inactive
@klutchell klutchell temporarily deployed to balena-staging.com September 18, 2024 23:18 — with GitHub Actions Inactive
@klutchell klutchell marked this pull request as ready for review September 18, 2024 23:18
@flowzone-app flowzone-app bot enabled auto-merge September 18, 2024 23:22
@klutchell klutchell temporarily deployed to balena-staging.com September 30, 2024 17:17 — with GitHub Actions Inactive
@klutchell klutchell temporarily deployed to balena-staging.com October 1, 2024 14:48 — with GitHub Actions Inactive
@klutchell klutchell temporarily deployed to balena-cloud.com October 1, 2024 15:17 — with GitHub Actions Inactive
@klutchell klutchell temporarily deployed to balena-cloud.com October 1, 2024 15:17 — with GitHub Actions Inactive
@klutchell klutchell temporarily deployed to balena-cloud.com October 1, 2024 15:17 — with GitHub Actions Inactive
@klutchell klutchell temporarily deployed to balena-staging.com October 1, 2024 17:06 — with GitHub Actions Inactive
@rcooke-warwick
Copy link
Contributor

https://github.com/balena-os/leviathan/blob/master/action.yml#L46

There is a conflict here - with the SB matrix it tries to make artifacts with the same name amd fails

@vipulgupta2048
Copy link
Member

@rcooke-warwick Do you have a run where the conflict appears. With Kyle's change, it seems we won't be doing a normal run when secureboot will be enabled. Hence, yes the artifacts could be better named to exactly show the secureboot run but there won't be other artifacts present?

@rcooke-warwick
Copy link
Contributor

rcooke-warwick commented Oct 8, 2024

There are other artifacts present because there is a SB and non SB version of the tests run, and both produce artifacts with the same name

E.g https://github.com/balena-os/balena-generic/actions/runs/11216427427/job/31184440638?pr=530

>Run actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
With the provided path, there will be 4 files uploaded
Artifact name is valid!
Root directory input is valid!
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

We need another variable in the artifact name to differentiate it

@rcooke-warwick
Copy link
Contributor

We also still need to figure out why the SB enables DUT never comes online , even after the 4G memory being enabled

@klutchell
Copy link
Contributor Author

There are other artifacts present because there is a SB and non SB version of the tests run, and both produce artifacts with the same name

E.g https://github.com/balena-os/balena-generic/actions/runs/11216427427/job/31184440638?pr=530

>Run actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
With the provided path, there will be 4 files uploaded
Artifact name is valid!
Root directory input is valid!
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

We need another variable in the artifact name to differentiate it

This fix will have to be in the Leviathan workflow to generate unique artifact names -- ideally unique with a bunch of properties, like machine, signed/unsigned, worker type, etc. @vipulgupta2048

@rcooke-warwick
Copy link
Contributor

There are other artifacts present because there is a SB and non SB version of the tests run, and both produce artifacts with the same name
E.g https://github.com/balena-os/balena-generic/actions/runs/11216427427/job/31184440638?pr=530

>Run actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
With the provided path, there will be 4 files uploaded
Artifact name is valid!
Root directory input is valid!
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

We need another variable in the artifact name to differentiate it

This fix will have to be in the Leviathan workflow to generate unique artifact names -- ideally unique with a bunch of properties, like machine, signed/unsigned, worker type, etc. @vipulgupta2048

balena-os/leviathan#1243 here is a shot at that

Some device types (generic-armd64) need to run the test
suites twice for the same base image, once with secure boot
vars enabled in Leviathan, and once without.

Rather than run the suites in series, or require building the
image twice, we can allow the test matrix to define separate runs
for the two modes.

Change-type: minor
Signed-off-by: Kyle Harding <[email protected]>
@flowzone-app flowzone-app bot merged commit 3b65445 into master Oct 15, 2024
58 checks passed
@flowzone-app flowzone-app bot deleted the kyle/sb-tests branch October 15, 2024 14:37
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.

3 participants