Skip to content

Start moving airgap e2e tests to CMX #2117

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

Merged
merged 11 commits into from
May 5, 2025

Conversation

sgalsaleh
Copy link
Member

@sgalsaleh sgalsaleh commented Apr 16, 2025

What this PR does / why we need it:

Moves these airgap tests to CMX:

  • TestMultiNodeAirgapUpgrade
  • TestSingleNodeAirgapUpgrade
  • TestSingleNodeAirgapUpgradeCustomCIDR
  • TestSingleNodeAirgapUpgradeConfigValues
  • TestMultiNodeAirgapUpgradeSameK0s
  • TestMultiNodeAirgapUpgradePreviousStable
  • TestMultiNodeAirgapHAInstallation
  • TestFiveNodesAirgapUpgrade

Which issue(s) this PR fixes:

sc-122461

Does this PR require a test?

Yes

Does this PR require a release note?

NONE

Does this PR require documentation?

NONE

@sgalsaleh sgalsaleh changed the title Run reset and reinstall airgap test on cmx Start moving airgap e2e tests to CMX Apr 16, 2025
Copy link

github-actions bot commented Apr 16, 2025

This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID.

Online Installer:

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/appver-dev-52b80cd" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Airgap Installer (may take a few minutes before the airgap bundle is built):

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci-airgap/appver-dev-52b80cd?airgap=true" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Happy debugging!

@sgalsaleh sgalsaleh requested a review from laverya April 18, 2025 18:16
@sgalsaleh sgalsaleh marked this pull request as ready for review April 18, 2025 18:16
@sgalsaleh sgalsaleh enabled auto-merge (squash) April 18, 2025 19:17
@@ -73,11 +82,28 @@ runs:
with:
go-version-file: go.mod
cache-dependency-path: "**/*.sum"
- name: Install replicated CLI for CMX
Copy link
Member

Choose a reason for hiding this comment

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

we should make a github action for this!

Copy link
Member

Choose a reason for hiding this comment

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

why not use the replicated / vendor-cli docker image that's published to do these?

Copy link
Member Author

Choose a reason for hiding this comment

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

so using the docker image is recommended over the binary published to github?

t.Logf("%s: downloading airgap files", time.Now().Format(time.RFC3339))
airgapInstallBundlePath := "/tmp/airgap-install-bundle.tar.gz"
airgapUpgradeBundlePath := "/tmp/airgap-upgrade-bundle.tar.gz"
tc := cmx.NewCluster(&cmx.ClusterInput{
Copy link
Member

Choose a reason for hiding this comment

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

can we add comments to the TestSingleNodeAirgapUpgradeCustomCIDR and TestSingleNodeAirgapUpgrade entries in the test array within ci.yaml to say that they now use CMX?

@sgalsaleh sgalsaleh force-pushed the run-reset-and-reinstall-airgap-test-on-cmx branch 4 times, most recently from 8c3e78d to ae404cc Compare May 2, 2025 14:14
@sgalsaleh sgalsaleh force-pushed the run-reset-and-reinstall-airgap-test-on-cmx branch from ae404cc to 21d130a Compare May 2, 2025 14:40
return nil
}

func (c *Cluster) RefreshSSHEndpoints() error {
Copy link
Member

Choose a reason for hiding this comment

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

this is unused

Copy link
Member Author

Choose a reason for hiding this comment

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

it was used in one of the tests that i decided to retract to merge this pr. will definitely be needed for tests that include a reset and then re-install. i agree it's unused in this pr though yeah.

cmd := exec.Command("replicated", "vm", "ssh-endpoint", nodeID)
output, err := cmd.CombinedOutput()
if err != nil {
return "", fmt.Errorf("failed to get SSH endpoint for node %s: %v: %s", nodeID, err, string(output))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return "", fmt.Errorf("failed to get SSH endpoint for node %s: %v: %s", nodeID, err, string(output))
return "", err

return fmt.Errorf("fail to bypass kurl-proxy: %v: %s", err, string(stderr))
}
c.t.Logf("%s: installing playwright", time.Now().Format(time.RFC3339))
cmd := exec.Command("sh", "-c", "cd playwright && npm ci && npx playwright install --with-deps")
Copy link
Member

Choose a reason for hiding this comment

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

is this quick each subsequent time it is run? i assume it is run on the runner once for each test. should we just make this a required dependency like the replicated cli?

Copy link
Member Author

Choose a reason for hiding this comment

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

we only run this setup step once per test.

@sgalsaleh
Copy link
Member Author

Merging as the TestMultiNodeAirgapHADisasterRecovery flakiness is being addressed by #2140 and is currently affecting the main branch as well

@sgalsaleh sgalsaleh disabled auto-merge May 5, 2025 17:56
@sgalsaleh sgalsaleh merged commit 57e5dc8 into main May 5, 2025
64 of 66 checks passed
@sgalsaleh sgalsaleh deleted the run-reset-and-reinstall-airgap-test-on-cmx branch May 5, 2025 17:56
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.

4 participants