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

Support Version Marker Publishing #102

Closed
rifelpet opened this issue Mar 5, 2021 · 1 comment · Fixed by #104
Closed

Support Version Marker Publishing #102

rifelpet opened this issue Mar 5, 2021 · 1 comment · Fixed by #104
Labels
sig/testing Categorizes an issue or PR as relevant to SIG Testing.

Comments

@rifelpet
Copy link
Contributor

rifelpet commented Mar 5, 2021

I'm migrating a few remaining kOps e2e jobs to kubetest2 and I'm facing a kubetest2 limitation that I'd like to address upstream. We have a pipeline of jobs using kubetest 1 that publishes version markers upon tests passing. These markers indicate a version of kOps to use in other kubetest2 jobs.

I'm hoping to have kubetest2-kops publish version markers but I'm facing the following challenges:

  • The Deployer interface doesn't know whether the tests passed or failed. The deployer knows the exact version to publish in a version marker, but it can't determine whether or not to publish the marker.
  • The Tester interface doesn't know the version to publish as a marker.

This likely relates to my #87 but I'm wondering if it would simpler for the Deployer to know whether the tester succeeded or failed. We could add an extension like the other DeployerWith interfaces, perhaps something like:

type DeployerWithTesterResults interface {
	OnSuccess() error
	OnFailure() error
}

I'm happy to open a PR if an implementation is agreed upon.

For reference, here is one of the remaining kOps jobs that uses this kubetest 1 functionality.

/cc @justinsb

@amwat
Copy link
Contributor

amwat commented Mar 5, 2021

I think this proposal sounds very reasonable :) since this is very much in line with the whole lifecycle.
#87 was a bit awkward since we ideally want to plug and play deployers and testers, so deployer knowing TestArgs is an anti-pattern we'd like to avoid.

but PostTest() actions sounds like a good addition.
maybe instead of OnSuccess() and OnFailure()
just a

type DeployerWithPostTester interface {
           PostTest(testError error) error
}

FYI something like this is also good for say DumpingClusterLogs after tests.

which can be invoked after test() if it exists.

Also, a big thanks for all the migration efforts for kops kubetest2 :)

xref: kubernetes/enhancements#2464

@spiffxp spiffxp added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/testing Categorizes an issue or PR as relevant to SIG Testing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants