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

Upgrade Go, use modules and enable CI on GitHub Actions #220

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

errordeveloper
Copy link
Contributor

No description provided.

- run: cd tools && go install github.com/GeertJohan/fgt github.com/mattn/goveralls golang.org/x/lint golang.org/x/tools/cmd/cover
- run: script/validate-gofmt
- run: go vet ./...
# - run: fgt /home/runner/go/bin/lint ./...
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should probably make this work before merging...

@errordeveloper
Copy link
Contributor Author

@thaJeztah do you need to approve the new workflow for it to run on this PR or does need to land in master actually? (I've never contributed GitHub Actions setup to repos I don't have admin access to, so I don't know how is that supposed to work!)

@errordeveloper
Copy link
Contributor Author

See tests results on my fork: https://github.com/errordeveloper/libkv/actions?query=branch%3Aci

@thaJeztah
Copy link
Member

They don't run until initially merged, but you can create a PR on your own fork to run it (perhaps there's other tricks that @crazy-max knows to do the same though)

@crazy-max
Copy link
Member

crazy-max commented Dec 17, 2021

They don't run until initially merged, but you can create a PR on your own fork to run it (perhaps there's other tricks that @crazy-max knows to do the same though)

We must have a dummy workflow on the default branch otherwise it will not triggered. See distribution/distribution#3314

@@ -0,0 +1,44 @@
name: CI
Copy link
Member

@crazy-max crazy-max Dec 17, 2021

Choose a reason for hiding this comment

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

nit: lowercase/same as workflow filename is preferable (ptsd on my side ahah)

.travis.yml Outdated
@@ -1,7 +1,7 @@
language: go

go:
- 1.8.7
- 1.17.5
Copy link
Member

Choose a reason for hiding this comment

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

I guess your can simply remove the travis file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll just leave it unchanged ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On a second thought, yes, probably should just remove it and avoid confusion!


require (
github.com/coreos/etcd v3.3.25+incompatible
github.com/go-zookeeper/zk v1.0.2
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should decide not (yet) to use a go.mod here, as that would also mean that these dependencies will always be required (without a module, only dependencies for the packages that are actually used will be added in moby (I think?)

Copy link

@zhsj zhsj Apr 4, 2022

Choose a reason for hiding this comment

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

Can we move on this PR?

With go1.17 and pruned module graphs, I think this is no longer a issue.

@crazy-max
Copy link
Member

@errordeveloper #221 is merged. Just rebase and it should work.

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
@errordeveloper
Copy link
Contributor Author

@crazy-max looks like it still refused to run new workflow... let me try to rename it ;)

@crazy-max
Copy link
Member

@crazy-max looks like it still refused to run new workflow... let me try to rename it ;)

ci.yaml is a new workflow I think that's why it's not triggered. So rename dummy.yml > ci.yml and move the content from your ci.yaml. I think it would work as GitHub will detect changes in that workflow (hopefully).

There had been 4s & 5s timeouts that can lead to test failure, this
rounds up both of these to 5s and provide LIBKV_TEST_SHORT_TIMEOUT
for CI to override if needed.

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
@errordeveloper
Copy link
Contributor Author

@crazy-max somehow that still doesn't work... I think someone just need to approve the run, but maybe we could merge new workflow instead to make it simpler?

@crazy-max
Copy link
Member

You have created a new dummy.yaml and removed the dummy.yml that's why I think. You have to rename dummy.yml to ci.yml. See #220 (comment).

@crazy-max
Copy link
Member

Damn no dice :'(

@crazy-max
Copy link
Member

@errordeveloper Anyway you can check on your fork it seems to fail: https://github.com/errordeveloper/libkv/runs/4562356731?check_suite_focus=true

@errordeveloper
Copy link
Contributor Author

errordeveloper commented Dec 17, 2021

@crazy-max I'll just remove dummy.yml here; I know that it is still failing, seems like a flaky test and I my simple fix didn't work...

@@ -136,11 +147,8 @@ func testPutGetDeleteExists(t *testing.T, kv store.Store) {

func testWatch(t *testing.T, kv store.Store) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am really not sure what to do here... sending a sequence of value fixes the test on Consul and Zookeeper, but on etcd updates seem to come out of order :(

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- make the test more explicit about how watch method currently
  works on supported stores

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
@errordeveloper
Copy link
Contributor Author

The test are passing now!

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

LGTM

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

4 participants