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 skip update mechanism #180

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Conversation

sergenyalcin
Copy link
Member

Description of your changes

This PR fixes the skipping update mechanism. In the current behavior, the uptest skips the update test if at least one resource does not have an update-parameter annotation in the test manifest.

With this fix, we will skip if the Root does not have the update-parameter annotation. Just to remind you, we are only doing update tests for Root resources. Please see: https://github.com/upbound/uptest/blob/ac36a0c985cc93e8e5dc445257e3f2122086bb9b/internal/templates/01-update.yaml.tmpl#L10

I have:

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

How has this code been tested

Tested locally

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
Copy link
Contributor

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

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

Thanks @sergenyalcin, lgtm. Let's release this fix in a patch and re-validate it in upbound/provider-aws. Please also see: crossplane-contrib/provider-upjet-aws#1167

@@ -152,8 +150,10 @@ func (t *tester) prepareConfig() (*config.TestCase, []config.Resource, error) {
if disableImport == "true" {
tc.SkipImport = true
}
if updateParameter == "" {
Copy link
Contributor

@ulucinar ulucinar Feb 21, 2024

Choose a reason for hiding this comment

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

Does an uptest.upbound.io/disable-import annotation on a dependency resource of an example manifest has any effect?

Copy link
Member Author

Choose a reason for hiding this comment

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

The update is for only root resources now. But import for every resource in the manifest. So, the disable-import has an effect on the dependency resources.

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.

2 participants