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

ci: split and use matrix to test containerd backed image store #46572

Merged
merged 3 commits into from
Oct 16, 2023

Conversation

crazy-max
Copy link
Member

follow-up #46402 (review)

- What I did

Alternative to #46402 using a matrix and set required env vars to test containerd backed image store.

- How I did it

Sets a storage matrix conditionally based on containerd-integration GitHub label being set.

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@crazy-max crazy-max added area/testing containerd-integration Issues and PRs related to containerd integration labels Sep 30, 2023
@crazy-max crazy-max force-pushed the ci-snapshotter branch 2 times, most recently from 3efd07c to 889384c Compare September 30, 2023 01:33
@crazy-max crazy-max force-pushed the ci-snapshotter branch 3 times, most recently from 83a7d30 to 2f4a634 Compare September 30, 2023 02:44
@thaJeztah
Copy link
Member

just asking; does this approach allow for a separated status badge to be created for snapshotter?

basically if we want to enable this on master it'd be good if we could see that "regular" master is green (but it's fine to have the snapshotter variant fail for now)

@crazy-max
Copy link
Member Author

just asking; does this approach allow for a separated status badge to be created for snapshotter?

basically if we want to enable this on master it'd be good if we could see that "regular" master is green (but it's fine to have the snapshotter variant fail for now)

No it's grouped under the same test workflow compared to original PR. Didn't catch we wanted also a split within the UI.

@thaJeztah
Copy link
Member

Yeah, the idea was that if we run it on master (so that we can always track the state of the containerd integration, and not just on PR's in that area), we don't want master to be "failing" app the time, so .. looking for a way to show master as "green" (but containerd integration still needing work)

@crazy-max
Copy link
Member Author

Yeah, the idea was that if we run it on master (so that we can always track the state of the containerd integration, and not just on PR's in that area), we don't want master to be "failing" app the time, so .. looking for a way to show master as "green" (but containerd integration still needing work)

In this case we can use continue-on-error when built on a branch and not on PR so the run is green.

@crazy-max
Copy link
Member Author

Updated so now it splits based on storage input:

image

And added continue-on-error so it would not fail the workflow on non-PR if snapshotter is used.

@crazy-max crazy-max force-pushed the ci-snapshotter branch 5 times, most recently from ecf9c13 to cbd6b54 Compare September 30, 2023 11:03
@TBBle
Copy link
Contributor

TBBle commented Sep 30, 2023

I think the Windows artifacts all need to have their matrix tags added, as it looks like in the last run, the two build jobs might have stomped on each other's artifacts, leading to both the snapshotter and graphdriver integration test runs not finding any build artifacts.

Alternatively, perhaps the failure cause is that the build job has been split across the image-store test split, but really should only happen once, and be consumed by both test streams. (Probably true for integration-test-prepare too, but I'm not sure it, or even the build job, can be unsplit like that, I didn't look that closely, just noticed the Windows graphdriver failures and assumed from there.,)

I did notice that the artefact windows-2022-unit-reports was generated twice, so I suspect both things are true.

@crazy-max
Copy link
Member Author

crazy-max commented Sep 30, 2023

I think the Windows artifacts all need to have their matrix tags added, as it looks like in the last run, the two build jobs might have stomped on each other's artifacts, leading to both the snapshotter and graphdriver integration test runs not finding any build artifacts.

Alternatively, perhaps the failure cause is that the build job has been split across the image-store test split, but really should only happen once, and be consumed by both test streams. (Probably true for integration-test-prepare too, but I'm not sure it, or even the build job, can be unsplit like that, I didn't look that closely, just noticed the Windows graphdriver failures and assumed from there.,)

I did notice that the artefact windows-2022-unit-reports was generated twice, so I suspect both things are true.

Thanks! I was not near my computer and just let the workflow run tbh 😅
I'm taking a look 👀

Edit: I missed a needs in integration-cli that's why this job could not download the built binaries 🙈

@crazy-max crazy-max changed the title ci: matrix to test containerd backed image store ci: split and use matrix to test containerd backed image store Sep 30, 2023
Comment on lines 29 to 37
script: |
let matrix = ['graphdriver'];
if ("${{ contains(github.event.pull_request.labels.*.name, 'containerd-integration') || github.event_name != 'pull_request' }}" == "true") {
matrix.push('snapshotter');
}
await core.group(`Set matrix`, async () => {
core.info(`matrix: ${JSON.stringify(matrix)}`);
core.setOutput('matrix', JSON.stringify(matrix));
});
Copy link
Member

Choose a reason for hiding this comment

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

Oh man

@crazy-max crazy-max marked this pull request as ready for review October 3, 2023 17:37
@crazy-max crazy-max removed the containerd-integration Issues and PRs related to containerd integration label Oct 13, 2023
@crazy-max
Copy link
Member Author

Rebased in case you still want this.

@rumpl
Copy link
Member

rumpl commented Oct 13, 2023

Rebased in case you still want this.

Oh we do want this

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Copy link
Member

@rumpl rumpl left a comment

Choose a reason for hiding this comment

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

LGTM, my eyes are bleeding from so many yaml :D

Copy link
Member

@laurazard laurazard left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

"reviewed" this PR after others already did

✅ it has spaces and indentation
✅ it's yaml
✅ CI runs

I'd say: LGTM let's get this in and we'll see if the world burns

@thaJeztah thaJeztah merged commit 5c3d0fb into moby:master Oct 16, 2023
104 checks passed
@thaJeztah
Copy link
Member

^^ we should look at overlap in unit tests etc in a follow-up though; could someone create a ticket for that? (perhaps summarising parts to look into?)

@crazy-max crazy-max deleted the ci-snapshotter branch October 16, 2023 12:28
@thaJeztah thaJeztah added this to the 25.0.0 milestone Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants