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 a bunch of tests, fixing a bunch of issues #5

Merged
merged 12 commits into from
Nov 16, 2021
Merged

Conversation

LukeShu
Copy link
Contributor

@LukeShu LukeShu commented Nov 10, 2021

I was having some trouble with go-mkopensource when upgrading Emissary to Go 1.17, and I know Thomas had been having some trouble with it when upgrading Kubernetes. So I just started hammering on it, not just fixing issues, but writing testcases. And I ended up looking at Telepresence, because Telepresence has a lot simpler of a go.mod, so it was easier to isolate issues to write testcases.

As usual, I suggest a commit-by-commit review. This PR looks huge, but that's because it's adding gobs of tests; the diffstat of the code-under-test is more like a much more reasonable +300/-150.

Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
This reverts commit 8f44d44.

Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Copy link
Contributor

@thallgren thallgren left a comment

Choose a reason for hiding this comment

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

This all looks good to me, but I wonder if we also need an escape hatch to keep our CI-builds from being blocked between the time a problem is discovered and this component is updated to handle it.

What about this:

  • A yaml-file where the info that go-mkopensource emits for a component can be added manually.
  • go-mkopensource reads that file, and if an entry is found for a component which is problematic, it uses that entry instead of erroring.
  • If an entry is found for a component that is resolved successfully, then it errors out with a message indicating that the manual entry is obsolete and must be removed.

This solution would give us full control while at the same time force us to keep the manual list to an absolute minimum.

@LukeShu LukeShu merged commit 28b9541 into master Nov 16, 2021
@LukeShu LukeShu deleted the lukeshu/tests branch November 16, 2021 23:36
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.

None yet

2 participants