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

Add new cli options: disable-import and disable-update #23

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

sergenyalcin
Copy link
Member

@sergenyalcin sergenyalcin commented Aug 29, 2024

Description of your changes

This PR adds two new CLI options for disabling import and update steps: disable-import and disable-update. This PR also filters the crossplane trace logs during the setup script is running. Because during the setup script is running, the crossplane command is failing because of the resource not found error. We do not want to show this error to the user because it s a noise and temporary one.

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Tested locally on the configuration packages. And a successful uptest-run.

Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

Tested the following scenarios

  • Setup.sh stdout/err: eventually outputs the script output, crossplane trace stdout/stderr is properly filtered out
2024/08/29 22:57:03         === COMMAND
2024/08/29 22:57:03         /Users/xnull/upboundcare/test/github/ymir/test/setup.sh
2024/08/29 23:01:16     | 23:01:16 | apply | Run Setup Script         | CMD       | LOG   |
2024/08/29 23:01:16         === STDOUT
2024/08/29 23:01:16         Running setup.sh
...
  • New flags: update and import steps are properly skipped
2024/08/29 23:11:42     | 23:11:42 | apply | Assert Status Conditions | ASSERT    | DONE  | azure.platform.test.com/v1alpha1/XBastion @ aks-bastion
2024/08/29 23:11:42     | 23:11:42 | apply | Assert Status Conditions | TRY       | DONE  |
2024/08/29 23:11:42 --- PASS: chainsaw (0.00s)
2024/08/29 23:11:42     --- PASS: chainsaw/apply (879.02s)
2024/08/29 23:11:42 PASS
2024/08/29 23:11:42 Tests Summary...
2024/08/29 23:11:42 - Passed  tests 1
2024/08/29 23:11:42 - Failed  tests 0
2024/08/29 23:11:42 - Skipped tests 0
2024/08/29 23:11:42 Done.
2024/08/29 23:11:42 Skipping test 01-update.yaml
2024/08/29 23:11:42 Skipping test 02-import.yaml
2024/08/29 23:11:42 Skipping test 03-delete.yaml
23:11:42 [ OK ] running automated tests
  • Clean deletion: all MRs are getting cleaned up at the end of the test run
2024/08/29 22:47:23         /bin/sh -c ${KUBECTL} wait managed --all --for=delete --timeout -1s
2024/08/29 22:54:47     | 22:54:47 | delete | Assert Deletion  | SCRIPT    | LOG   |
2024/08/29 22:54:47         === STDOUT
2024/08/29 22:54:47         resourcegroup.azure.upbound.io/aks-private-network condition met
2024/08/29 22:54:47     | 22:54:47 | delete | Assert Deletion  | SCRIPT    | DONE  |
2024/08/29 22:54:47     | 22:54:47 | delete | Assert Deletion  | TRY       | DONE  |
2024/08/29 22:54:47 --- PASS: chainsaw (0.00s)
2024/08/29 22:54:47     --- PASS: chainsaw/delete (437.50s)
2024/08/29 22:54:47 PASS
2024/08/29 22:54:47 Tests Summary...
2024/08/29 22:54:47 - Passed  tests 1
2024/08/29 22:54:47 - Failed  tests 0
2024/08/29 22:54:47 - Skipped tests 0
2024/08/29 22:54:47 Done.
22:54:47 [ OK ] running automated tests
 k get managed
No resources found

All green 👍 thank you so much for these enhancements! 🚀

@jeanduplessis jeanduplessis merged commit 8512885 into crossplane:main Aug 30, 2024
6 checks passed
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.

3 participants