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 nightly tests #876

Merged
merged 7 commits into from
Dec 10, 2024
Merged

Fix nightly tests #876

merged 7 commits into from
Dec 10, 2024

Conversation

petrutlucian94
Copy link
Contributor

@petrutlucian94 petrutlucian94 commented Dec 6, 2024

Fix nightly job

  • fix yaml definition
  • ensure that the containerd base path setting is properly parsed when joining nodes
  • fix containerd test assertions
  • run all tests whenever there are changes under the tests dir and in case of backports

The runner labels used by the nightly job are not correctly
evaluated.

We'll fix this by switching to the newly added one-string node
labels.
@petrutlucian94 petrutlucian94 requested a review from a team as a code owner December 6, 2024 14:00
@petrutlucian94 petrutlucian94 marked this pull request as draft December 6, 2024 14:00
@petrutlucian94 petrutlucian94 marked this pull request as ready for review December 9, 2024 14:53
The containerd base dir setting is currently ignored when joining
nodes. The reason is that yaml parser ignores a struct field which
is marked as private. Making it public fixes the issue.

At the same time, the test expects the default containerd folders
to be missing when configured to use a different base dir.
However, the tests are currently placing the registry settings
in /etc/containerd. We also get an empty /run/containerd folder.
For now, we'll update the test to ignore these folders.

There's also an os.path.join call that doesn't produce the expected
result if the last element is an absolute path, we'll need to remove
a slash when constructing the paths.
@louiseschmidtgen louiseschmidtgen changed the title Fix nightly job Fix nightly job: containerd base path Dec 10, 2024
Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

Thanks for looking into the containerd issue @petrutlucian94!
Left some comments here:

@@ -17,7 +17,7 @@ jobs:
release: ["latest/edge"]
fail-fast: false # TODO: remove once arm64 works

runs-on: ${{ matrix.arch == 'arm64' && ["self-hosted", "Linux", "ARM64", "jammy", "large"] || ["self-hosted", "Linux", "AMD64", "jammy", "large"] }}
runs-on: ${{ matrix.arch == 'arm64' && 'self-hosted-linux-arm64-jammy-large' || 'self-hosted-linux-amd64-jammy-large' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make this adjustment in our daily test as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not necessarily, we need it here because of the matrix.arch == 'arm64' && check, which doesn't work when followed by a list.

tests/integration/tests/test_cleanup.py Outdated Show resolved Hide resolved
@petrutlucian94 petrutlucian94 changed the title Fix nightly job: containerd base path Fix nightly tests Dec 10, 2024
We're adding a few checks to the integration tests workflow. We'll
use the "weekly" tag in case of backports (targeting the release-*
branches) and whenever there are test changes.
One of the tests uses a custom containerd base dir. We'll add a
marker so that the registry mirror settings can be applied to that
containerd folder.
Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

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

LGTM

.github/workflows/nightly-test.yaml Outdated Show resolved Hide resolved
Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

LGTM, one small thing

src/k8s/pkg/k8sd/api/cluster_join.go Show resolved Hide resolved
@petrutlucian94 petrutlucian94 merged commit dd6b5e7 into main Dec 10, 2024
18 checks passed
@petrutlucian94 petrutlucian94 deleted the lpetrut/fix-nightly branch December 10, 2024 11:51
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