-
Notifications
You must be signed in to change notification settings - Fork 105
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
rebase rule and e2e tests for pkgrs with identical pkgs #657
Conversation
58907fd
to
9876314
Compare
"%s%s%s", | ||
fmt.Sprintf(pkgrPreamble, 3), | ||
fmt.Sprintf(pkgTemplate, "shirt-mgr.co.uk", "5.5.5"), | ||
strings.Replace(fmt.Sprintf(pkgTemplate, "contooor.co.uk", "0.22.0"), "k8slt/kctrl-example-pkg:v1.0.0", "k8slt/some-other-image:latest", -1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string building throughout tests seem really brittle and quite hard to piece together. lets come up with a different way to adjust inputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to talk about it but I didn't immediately see other options I thought were better. it's all compromises, imo, between hardcoding each one fully redundantly on the one end and pumping test artifacts through ytt on the other end.
1adb883
to
3566712
Compare
c16663c
to
bffb61e
Compare
pkgr templating applies a rebase rule that inserts a noop annotation on a package coming from a PKGR in cases where a package with identical name and contents is already provided by a different repo. - revision annotation allows changes to the package yaml without changing the version - packages that are not identical will still fail to reconcile
helm test seems to be flaky
bffb61e
to
62502bb
Compare
fmt.Println(kubectl.Run([]string{"get", "pkg", "pkg.test.carvel.dev.3.0.0-rc.1", "-oyaml"})) | ||
|
||
for i := 1; i < 5; i++ { | ||
out = kubectl.Run([]string{"get", "packagerepository", pkgrName}) | ||
fmt.Println(out) | ||
if strings.Contains(out, "failed") { | ||
fmt.Println(kubectl.Run([]string{"get", "packagerepository", pkgrName, "-oyaml"})) | ||
} | ||
require.NotContains(t, out, "failed") | ||
time.Sleep(time.Duration(i) * time.Second) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: no need for this.
4d458b9
to
7ae2b5e
Compare
#428