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

v1.14 Backports 2024-03-06 #31192

Merged
merged 5 commits into from
Mar 16, 2024
Merged

Conversation

giorio94
Copy link
Member

@giorio94 giorio94 commented Mar 6, 2024

Once this PR is merged, a GitHub action will update the labels of these PRs:

 30928 30916 31198

@giorio94 giorio94 added kind/backports This PR provides functionality previously merged into master. backport/1.14 This PR represents a backport for Cilium 1.14.x of a PR that was merged to main. labels Mar 6, 2024
@giorio94
Copy link
Member Author

giorio94 commented Mar 6, 2024

/test-backport-1.14

@giorio94
Copy link
Member Author

giorio94 commented Mar 6, 2024

Need to backport #31198 as well to make sure that we use the variables from the target branch also in pull_request/push workflows.

[ upstream commit e17cf21 ]

This variable used to be used in combination with the Sibz/github-status-action
action, which we replaced with myrotvorets/set-commit-status-action when
reworking the workflows to be triggered by Ariane [1]. Given it is now
unused, let's get rid of the leftover environment variable, so that we
also stop copying it to new workflows.

[1]: 9949c5a ("ci: rework workflows to be triggered by Ariane")

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
[ upstream commit 394b3de ]

[ backporter's notes: edited the KIND_K8S_IMAGE value to match the one
  currently used in the v1.14 branch ]

Let's define kind-related variables (i.e., version, k8s image and k8s
version) inside the set-env-variables action. One all consumers will
have been migrated through the subsequent commit, this will ensure
consistency across workflows, simplify version bumps as well as the
introduction of new workflows depending on them. One extra byproduct
is that renovate updates will also stop requesting reviews from all
the different teams owning each specific workflow.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
[ upstream commit aabdfa7 ]

Let's switch all the workflows over to using the globally defined
kind-related variables, and remove the workflow specific definitions.
This also addresses a few cases which didn't specify any version.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
[ upstream commit 39637d6 ]

They will never, because no CNI is present at that point. Hence, let's
just avoid wasting one minute waiting for the timeout to expire.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
[ upstream commit 6716a9c ]

Currently, the GHA workflows running tests triggered on pull_request
and/or push events initially checkout the default branch to configure
the environment variables, before retrieving the PR head. However,
this is problematic on stable branches, as we then end up using the
variables from the default (i.e., main) branch (e.g., Kubernetes
version, Cilium CLI version), which may not be appropriate here.

Hence, let's change the initial checkout to retrieve the target (i.e.,
base) branch, falling back to the commit in case of push events.
This ensure that we retrieve the variables from the correct branch,
and matches the behavior of Ariane triggered workflows.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@giorio94 giorio94 force-pushed the pr/v1.14-backport-2024-03-06 branch from fead35b to d9d80ec Compare March 11, 2024 17:38
@giorio94
Copy link
Member Author

/test-backport-1.14

@giorio94
Copy link
Member Author

Conformance K8s Kind and Conformance K8s Upstream Network failures are expected, because they use the set-env-variables checked out from the target branch, which doesn't contain the additional variables. This will be fixed after merging this PR.

@giorio94 giorio94 marked this pull request as ready for review March 11, 2024 17:54
@giorio94 giorio94 requested review from a team as code owners March 11, 2024 17:54
@jrajahalme
Copy link
Member

@giorio94 Looks like the version number is missing from this (executed) line in conformance k8s kind:

  curl -L https://dl.k8s.io//kubernetes-test-linux-amd64.tar.gz -o ${TMP_DIR}/kubernetes-test-linux-amd64.tar.gz

Hence tar is complaining that its stdin is not gzip.

@giorio94
Copy link
Member Author

@giorio94 Looks like the version number is missing from this (executed) line in conformance k8s kind:

  curl -L https://dl.k8s.io//kubernetes-test-linux-amd64.tar.gz -o ${TMP_DIR}/kubernetes-test-linux-amd64.tar.gz

Hence tar is complaining that its stdin is not gzip.

Yes, this is expected because the workflow checks out the action (set-env-variables in this case) from the target branch, which doesn't yet include the appropriate changes. It will be fixed after merging this PR. This applies to all workflows run on pull_request target, while the ones triggered by Ariane work correctly because it retrieves the actions from the current branch (being this branch from cilium/cilium, and not a fork).

@giorio94
Copy link
Member Author

Marking as blocked to avoid merging while releases are in progress.

@giorio94 giorio94 added the dont-merge/blocked Another PR must be merged before this one. label Mar 12, 2024
@giorio94
Copy link
Member Author

Releases are out, unblocking.

@giorio94 giorio94 added ready-to-merge This PR has passed all tests and received consensus from code owners to merge. and removed dont-merge/blocked Another PR must be merged before this one. labels Mar 15, 2024
@dylandreimerink dylandreimerink merged commit 1abe528 into v1.14 Mar 16, 2024
228 of 230 checks passed
@dylandreimerink dylandreimerink deleted the pr/v1.14-backport-2024-03-06 branch March 16, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.14 This PR represents a backport for Cilium 1.14.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
No open projects
Status: Released
Development

Successfully merging this pull request may close these issues.

None yet

7 participants