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

Automate cluster-aws test pull requests #264

Merged
merged 27 commits into from
Jul 12, 2024

Conversation

nprokopic
Copy link
Contributor

@nprokopic nprokopic commented Jul 11, 2024

What does this PR do?

This PR adds a GitHub workflow that automates creation of test PRs in cluster-aws in order to test cluster chart changes.

The workflow gets triggered for every cluster chart pull request. It has 2 jobs:

  1. one to create/update test PRs in cluster-aws
  2. one to close cluster-aws PRs when cluster chart PRs are closed/merged.

The job that creates/updates cluster-aws PRs will do the following (simplified steps):

  • Clone cluster-aws repo.
  • Create a new cluster-aws branch called test-cluster-chart-pr-{{ cluster chart PR number }}. If the branch already existed it just checks out that branch.
  • Update cluster chart version in test-cluster-chart-pr-{{ cluster chart PR number }} branch by setting it to a cluster chart version from the tested cluster chart PR.
  • Open/update cluster-aws draft PR. See example PR here Test cluster chart PR #264 cluster-aws#689.

When cluster chart PR is closed, cluster-aws PR is closed as well.

What is the effect of this change to users?

Giant Swarm engineers can easily test provider-independent changes for CAPA.

Any background context you can provide?

CAPA is already GA, CAPZ will be GA soon, and all other providers will also soon start to use cluster chart, so without automated cross-provider testing the risk of issues slipping through cracks due to changes not being tested is very high.

Should this change be mentioned in the release notes?

No. This is CI change, no need to be included in the release notes.

@nprokopic
Copy link
Contributor Author

/run cluster-test-suites

Let's try this 🙈

@nprokopic
Copy link
Contributor Author

/run cluster-test-suites

@nprokopic nprokopic marked this pull request as ready for review July 11, 2024 14:41
@nprokopic nprokopic requested a review from a team as a code owner July 11, 2024 14:41
@nprokopic
Copy link
Contributor Author

/run cluster-test-suites

@nprokopic nprokopic marked this pull request as draft July 11, 2024 14:44
@nprokopic
Copy link
Contributor Author

/run cluster-test-suites

1 similar comment
@nprokopic
Copy link
Contributor Author

/run cluster-test-suites

@nprokopic
Copy link
Contributor Author

Closing to test of cluster-aws PR gets closed.

@nprokopic nprokopic closed this Jul 12, 2024
@nprokopic nprokopic reopened this Jul 12, 2024
@nprokopic nprokopic changed the title Automate cluster chart testing in cluster-$provider apps Automate cluster-aws test pull requests Jul 12, 2024
@nprokopic nprokopic marked this pull request as ready for review July 12, 2024 15:43
Copy link

There were no differences in the rendered Helm template.

Output
=== Differences when rendered with values file helm/cluster/ci/test-required-values.yaml ===

No difference


=== No differences at all ===

@taylorbot
Copy link
Contributor

Test pull request has been created in cluster-aws repo. Go to pull request giantswarm/cluster-aws#690 to test you cluster chart changes on AWS.

Copy link

There were no differences in the rendered Helm template.

Output
=== Differences when rendered with values file helm/cluster/ci/test-required-values.yaml ===

No difference


=== No differences at all ===

@taylorbot
Copy link
Contributor

Hey @nprokopic, a test pull request has been created for you in cluster-aws repo! Go to pull request giantswarm/cluster-aws#691 in order to test you cluster chart changes on AWS.

@nprokopic
Copy link
Contributor Author

Works nicely! 🎉 Will merge this to try it out for cluster chart PRs with actual cluster chart changes. We can then improve this and do the same for other providers (like CAPZ).

@nprokopic nprokopic merged commit 936f8ea into main Jul 12, 2024
10 checks passed
@nprokopic nprokopic deleted the automate-tests-in-cluster-provider branch July 12, 2024 16:02
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.

2 participants