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 e2e tests failures due to missing license token #9297

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

sp1999
Copy link
Member

@sp1999 sp1999 commented Feb 23, 2025

Issue #, if available:
#2855

Description of changes:
This PR fixes the inplace upgrade tests and upgrade tests without cluster config generation failing with the following error:

2025-02-22T05:23:13.299Z	V0	❌ Validation failed	{"validation": "validate extended kubernetes version support is supported", "error": "getting licenseToken: licenseToken is required for extended kubernetes support", "remediation": "ensure you have a valid license for extended Kubernetes version support"}

It also fixes the workload cluster tests failing with the following error:

Error: validations failed: validating licenseToken is unique for cluster main-i-00821-76f2f36-w-0: license token <license-token-string> is already in use by cluster main-i-00821-76f2f36

This is because #9264 moved the logic for setting the license token in the cluster config from NewClusterE2ETest() function to GenerateClusterConfig() function. The problem with this is that all tests call the NewClusterE2ETest() function but not every test calls the GenerateClusterConfig() function. Some tests have upgrade flows which do not generate cluster config which led to those tests not having the license token set in the cluster spec. This PR fixes the issue by updating those tests to set the license token in the main test function.

Additionally, this PR also updates the Flux flow tests to generate support bundle if the test fails. This is necessary because currently the GitFlux and GitHubFlux tests are failing but there is no way to root cause the issue since the support bundle is not getting generated.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 23, 2025
@sp1999
Copy link
Member Author

sp1999 commented Feb 23, 2025

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sp1999

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

codecov bot commented Feb 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.40%. Comparing base (ec4dc14) to head (722b558).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9297   +/-   ##
=======================================
  Coverage   72.40%   72.40%           
=======================================
  Files         589      589           
  Lines       46361    46361           
=======================================
  Hits        33569    33569           
  Misses      11032    11032           
  Partials     1760     1760           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@2ez4szliu
Copy link
Member

/lgtm

@eks-distro-bot eks-distro-bot merged commit c0a45fb into aws:main Feb 24, 2025
9 checks passed
@sp1999 sp1999 deleted the fix-e2e-tests branch February 24, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants