Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Update Tinkerbell and linter, add linter and codespell to CI #20

Merged
merged 6 commits into from
Dec 18, 2020
Merged

Update Tinkerbell and linter, add linter and codespell to CI #20

merged 6 commits into from
Dec 18, 2020

Conversation

invidian
Copy link
Contributor

No description provided.

@invidian
Copy link
Contributor Author

invidian commented Dec 10, 2020

After talking to @gianarb, it seems reasonable to use Tinkerbell version which sandbox repo is using, so we keep it compatible at this level, so I need to rollback some changes here. Once sandbox repo is updated, we will update as well.

go.mod Outdated
@@ -3,33 +3,68 @@ module github.com/kinvolk/terraform-provider-tinkerbell
go 1.14

require (
cloud.google.com/go v0.73.0 // indirect
code.gitea.io/sdk/gitea v0.13.2 // indirect
github.com/Azure/azure-storage-blob-go v0.12.0 // indirect
Copy link
Member

Choose a reason for hiding this comment

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

Any idea where these indirects came from? Is it goreleaser?
If so, we should be able to avoid installing goreleaser in a way that affects this go.mod, even without a separate GH action - although, that may be an option too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this is because of goreleaser mostly. I don't really like the approach with tools.go either. Let me create an issue for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created #21. I could replace tools.go with go run -mod=mod, but then we use tools version of whatever someone has installed in their GOPATH.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed 1d2377d which seems to work fine.

Copy link
Member

@displague displague left a comment

Choose a reason for hiding this comment

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

This looks good to me overall. Some context in the PR description would have really helped.

I have one open question about the .sql file removal. I assume this was well-intentioned.

So tooling dependencies are managed separately from main module
dependencies.

Closes #21

Signed-off-by: Mateusz Gozdek <[email protected]>
This commit updates compatible Tinkerbell version to latest version used
in sandbox repository at the time of writing.

Latest version of sandbox repository no longer use SQL file to seed the
database. Instead, Tink server runs the database migration if special
environment variable is set. To do that on the test docker-compose.yml
file, new container called 'tink-server-migration' is added, which runs
the migration before Tink server starts. This setup follows what is used
in the sandbox repository.

Signed-off-by: Mateusz Gozdek <[email protected]>
With new Tinkerbell version, there are event objects created when
creating Hardware, Workflows etc and they also cannot really cope with
parallel requests, so we need to retry if one of them occurs.

Reported upstream issue:
tinkerbell/tink#379

Signed-off-by: Mateusz Gozdek <[email protected]>
And fix new warnings.

Signed-off-by: Mateusz Gozdek <[email protected]>
To make running linter easier together with editors integration and CI
systems.

Signed-off-by: Mateusz Gozdek <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants