Skip to content

Fix skip update mechanism - #180

Merged
sergenyalcin merged 1 commit into
upbound:mainfrom
sergenyalcin:fix-skip-update
Feb 26, 2024
Merged

Fix skip update mechanism#180
sergenyalcin merged 1 commit into
upbound:mainfrom
sergenyalcin:fix-skip-update

Conversation

@sergenyalcin

Copy link
Copy Markdown
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>

@ulucinar ulucinar left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread internal/tester.go
if disableImport == "true" {
tc.SkipImport = true
}
if updateParameter == "" {

@ulucinar ulucinar Feb 21, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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