Skip to content

Conversation

qmonnet
Copy link
Member

@qmonnet qmonnet commented Nov 6, 2023

Related to

Once this PR is merged, you can update the PR labels via:

for pr in 27977 28016 29072 28815; do contrib/backporting/set-labels.py $pr done 1.12; done

or with

make add-labels BRANCH=v1.12 ISSUES=27977,28016,29072,28815

@qmonnet qmonnet added kind/backports This PR provides functionality previously merged into master. area/CI-improvement Topic or proposal to improve the Continuous Integration workflow area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. release-note/ci This PR makes changes to the CI. backport/1.12 labels Nov 6, 2023
@qmonnet qmonnet force-pushed the pr/qmonnet/ipsec-patch-release-update_1.12 branch 3 times, most recently from a31bc32 to 05383c6 Compare November 9, 2023 13:05
@qmonnet qmonnet force-pushed the pr/qmonnet/ipsec-patch-release-update_1.12 branch from 05383c6 to a0d68a3 Compare November 16, 2023 17:18
@qmonnet
Copy link
Member Author

qmonnet commented Nov 16, 2023

/test-backport-1.12

Job 'Cilium-PR-K8s-1.19-kernel-4.9' has 1 failure but they might be new flake since it also hit 1 known flake: #27118 (97.07% similarity)

@qmonnet
Copy link
Member Author

qmonnet commented Nov 16, 2023

/ci-ipsec-upgrade

@qmonnet
Copy link
Member Author

qmonnet commented Nov 20, 2023

/test-1.16-4.9

@qmonnet qmonnet requested a review from brb November 20, 2023 13:29
@qmonnet qmonnet marked this pull request as ready for review November 20, 2023 13:29
@qmonnet qmonnet requested review from a team as code owners November 20, 2023 13:29
@qmonnet qmonnet requested a review from brlbil November 20, 2023 13:29
Copy link
Contributor

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

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

🥰

@pchaigno pchaigno self-requested a review November 20, 2023 22:28
@qmonnet qmonnet force-pushed the pr/qmonnet/ipsec-patch-release-update_1.12 branch from a0d68a3 to 0962721 Compare November 21, 2023 16:33
@qmonnet
Copy link
Member Author

qmonnet commented Nov 21, 2023

One more rebase required
/test-backport-1.12

@qmonnet
Copy link
Member Author

qmonnet commented Nov 21, 2023

/ci-ipsec-upgrade

@qmonnet
Copy link
Member Author

qmonnet commented Nov 22, 2023

/test-1.16-4.9

@qmonnet qmonnet force-pushed the pr/qmonnet/ipsec-patch-release-update_1.12 branch from 0962721 to 0da0cb2 Compare November 22, 2023 10:00
@qmonnet
Copy link
Member Author

qmonnet commented Nov 22, 2023

Incremental diff
diff --git a/.github/workflows/tests-ipsec-upgrade.yaml b/.github/workflows/tests-ipsec-upgrade.yaml
index 6b0d91470f08..510785ce1885 100644
--- a/.github/workflows/tests-ipsec-upgrade.yaml
+++ b/.github/workflows/tests-ipsec-upgrade.yaml
@@ -276,7 +276,6 @@ jobs:
             mkdir -p cilium-junits
 
       - name: Wait for images to be available
-        if: ${{ matrix.mode != 'patch' }}
         timeout-minutes: 30
         shell: bash
         run: |

Motivation

/test-backport-1.12

@qmonnet
Copy link
Member Author

qmonnet commented Nov 22, 2023

/ci-ipsec-upgrade

Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

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

My changes LGTM, thanks.

@qmonnet qmonnet force-pushed the pr/qmonnet/ipsec-patch-release-update_1.12 branch 2 times, most recently from 8239df3 to 5e9e1b7 Compare November 22, 2023 15:07
@qmonnet
Copy link
Member Author

qmonnet commented Nov 22, 2023

Fixed commit description
/test-backport-1.12

@qmonnet
Copy link
Member Author

qmonnet commented Nov 22, 2023

/ci-ipsec-upgrade

@qmonnet
Copy link
Member Author

qmonnet commented Nov 22, 2023

/test-1.19-4.9

Copy link
Contributor

@lmb lmb left a comment

Choose a reason for hiding this comment

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

🎩

Copy link
Member

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

Same as v1.14: it's conflicting so might be worth adding the references to upstream commits while rebasing.

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 24, 2023
@aanm
Copy link
Member

aanm commented Nov 27, 2023

@qmonnet needs rebase

@aanm aanm added the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Nov 27, 2023
michi-covalent and others added 7 commits November 27, 2023 13:42
[ upstream commit d51a932 ]

- Add a script to get the Cilium version to downgrade to instead of
  hardcoding it in the workflow file. The script uses the top-level
  VERSION file to infer the previous version.
- Check out the git branch to get the Helm chart instead of doing a wget
  to download the source archive.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
[ upstream commit 56dfec2 ]

Script contrib/scripts/print-downgrade-version.sh is used to derive the
name of the previous stable branch, based on the current version number
found in the repository. This is useful for testing upgrades and
dowgrades in CI, between the current branch and the previous stable
branch.

For some tests we need to perform similar checks between the current tip
of a branch and the latest patch release on the branch. For example,
when working on branch 1.14, we want to downgrade to the latest patch
release, 1.14.3 at this time, then upgrade back to the tip of 1.14. On
the main branch, this is not relevant, because we don't usually have
patch releases on that branch.

The current commit updates print-downgrade-version.sh to add support for
patch releases. When a user pass "patch" as first argument to the patch,
then instead of decrementing the minor version by one, the script
decrements the patch release number by one, and prints the results.

When the patch release number is 0 (new minor release) or 90 (release
preparation), the script returns an error, because it is non-trivial to
find the preceding patch release number in such cases (at least without
Git and the Git history). From the workflow's perspective (for
supporting upgrades from patch releases in a follow-up commit), for new
minor releases, update/downgrade is already covered in this case by
working with the previous stable branch; and for 90, we just don't have
an easy way to retrieve the previous number. We make the script print
errors on stderr, in order to make it easier to compare the string
returned on stdout (empty in case of error).

Some examples of numbers from VERSION and the corresponding values
returned:

    VERSION         Previous minor  Previous patch release

    1.14.3          v1.13           v1.14.2
    1.14.1          v1.13           v1.14.0
    1.14.0          v1.13           <error>
    1.14.1-dev      v1.13           v1.14.0
    1.15.0-dev      v1.14           <error>
    1.13.90         v1.12           <error>

In order to test the script easily, this commit also allows setting
$VERSION from the command line, defaulting to the content of file
VERSION if no value is provided.

Let's also add the errexit and nounset options to the script.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
[ upstream commit 31afd02 ]

Previously cilium-config action always generates helm-set flags for
image settings, but in some cases we can just rely on Chart.yaml since
we always set chart-dir. This helps when:

1. We want to install release version instead of ci version. Currently
   cilium-config action sets `cilium-ci` unconditionally.
2. We have complicated image tag requirements such as `v1.14.1-beta.1`.

Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
[ upstream commit 502bbc7 ]

[1] changed the upgrade path from "v1.14 (branch tip) -> main -> v1.14
(branch tip)" to "v1.14.x (last release) -> main -> v1.14.x (last
release)". The downside of the former path is that we catch any
upgrade/downgrade regressions only after a release.

This commit brings back the previous path.

[1]: 31afd02

Signed-off-by: Martynas Pumputis <m@lambda.lt>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
[ upstream commit ced884f ]

The downgrade is still affected [1].

[1]: #26739 (comment)

Signed-off-by: Martynas Pumputis <m@lambda.lt>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
[ upstream commit ed59edc ]

Currently, we test upgrades and downgrades for IPsec against the
previous stable branch, for example:

    - On main branch (v1.15-dev):
            v1.14 (branch tip) -> main (PR HEAD) -> v1.14 (branch tip)

    - On older stable branches:
            v1.13 (branch tip) -> v1.14 (PR HEAD) -> v1.13 (branch tip)

For stable branches, this commit adds support for testing upgrades and
downgrades against the latest patch release as well, for example:

    - On v1.14:
            v1.14.4 (tag) -> v1.14 (PR HEAD) -> v1.14.4 (tag)

The workflow currently fails on the main branch (this case is covered by
the upgrade/downgrade test to the previous stable branch already). This
is addressed by skipping most of the steps on main branch, in a
follow-up commit.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
[ upstream commit c9dedb4 ]

Skip upgrade/downgrade test to patch release when we fail to retrieve
the number for the previous patch release. This happens mostly for the
main branch (where testing upgrades/downgrades is covered by the tests
to the previous stable (minor) release already). This may also happen on
top of release preparation commits, where we set the patch number to 90,
and where it is non-trivial to retrieve the previous patch release
number. This case doesn't matter much, because commits for preparing
releases are Not Expected To Break IPsec (TM).

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
@qmonnet qmonnet force-pushed the pr/qmonnet/ipsec-patch-release-update_1.12 branch from 5e9e1b7 to 04d3b2f Compare November 27, 2023 13:45
@qmonnet qmonnet removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Nov 27, 2023
@qmonnet
Copy link
Member Author

qmonnet commented Nov 27, 2023

/test-backport-1.12

Job 'Cilium-PR-K8s-1.18-kernel-4.9' hit: #27118 (97.17% similarity)

Job 'Cilium-PR-K8s-1.22-kernel-4.9' failed:

Click to show.

Test Name

K8sServicesTest Checks E/W loadbalancing (ClusterIP, NodePort from inside cluster, etc) Checks service on same node

Failure Output

FAIL: Found 1 k8s-app=cilium logs matching list of errors that must be investigated:

Jenkins URL: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.22-kernel-4.9/216/

If it is a flake and a GitHub issue doesn't already exist to track it, comment /mlh new-flake Cilium-PR-K8s-1.22-kernel-4.9 so I can create one.

Then please upload the Jenkins artifacts to that issue.

@qmonnet
Copy link
Member Author

qmonnet commented Nov 27, 2023

/test-1.18-4.9

@qmonnet
Copy link
Member Author

qmonnet commented Nov 27, 2023

/test-1.19-4.9

@qmonnet
Copy link
Member Author

qmonnet commented Nov 27, 2023

/test-1.22-4.9

@youngnick youngnick merged commit 22c5718 into v1.12 Nov 28, 2023
@youngnick youngnick deleted the pr/qmonnet/ipsec-patch-release-update_1.12 branch November 28, 2023 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI-improvement Topic or proposal to improve the Continuous Integration workflow area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. 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. release-note/ci This PR makes changes to the CI.
Projects
No open projects
Status: Released
Development

Successfully merging this pull request may close these issues.

9 participants