Skip to content
This repository has been archived by the owner on May 14, 2019. It is now read-only.

*: make discovery testable #53

Merged
merged 16 commits into from
Sep 8, 2018
Merged

*: make discovery testable #53

merged 16 commits into from
Sep 8, 2018

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Jun 28, 2017

Preliminary work towards #52.

Goal is having good test coverage on current code base, so that we can safely migrate to etcd v3. This does not change any client-facing interface (etcd v2). Highlighted changes are:

  • Update vendors with latest etcd release, sync other upstream dependencies
  • Remove test files in vendor
  • Use Go 1.8.3 (required for integration tests with latest etcd)
    • Go 1.6<= won't build, Go 1.7<= will build but fail in CI
  • Change Go version to 1.8.3 in Dockerfile
  • Share states between handlers with context, for integration testing (avoids global vars)
  • Remove pkg/lockstring, instead have mutex inside shared states between handlers
  • Add handler integration tests with embedded etcd (available since v3.1)
  • Add e2e tests with actual etcd cluster and discovery.etcd.io builds
  • Set up CIs

In next PR, I will add v3 API option, with migration e2e tests.

@gyuho gyuho closed this Jun 28, 2017
@gyuho gyuho reopened this Jun 28, 2017
@gyuho gyuho changed the title *: make discovery testable [WIP] *: make discovery testable Jun 28, 2017
@gyuho gyuho requested review from tschuy and removed request for tschuy June 29, 2017 07:46
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
@gyuho gyuho changed the title [WIP] *: make discovery testable *: make discovery testable Jun 29, 2017
@gyuho
Copy link
Contributor Author

gyuho commented Jun 30, 2017

@bison @xiang90 Please review. This doesn't change any client-facing API.
I disabled quay build trigger, to be safe.

@gyuho gyuho requested a review from bison June 30, 2017 15:39
@gyuho
Copy link
Contributor Author

gyuho commented Jul 5, 2017

@bison

I just discussed with @xiang90, and figured out v3 implementation of discovery service cannot happen anytime soon. Problem is that current etcd code base heavily relies on v2 API https://github.com/coreos/etcd/blob/master/discovery/discovery.go#L143.

Minimum requirements to deprecate v2 API in public discovery service are:

  1. Support v3 storage backend in https://github.com/coreos/discovery.etcd.io (this is fairly easy to do, without any breaking change)
  2. Support v3 API in https://github.com/coreos/etcd/blob/master/discovery (this is much more complicated, and need wait until next release cycle)

Even if we implement them all, etcd old versions (v3.x<=) will still write v2 data to discovery service servers. So the true deprecation of v2 storage backend in discovery service can only happen after v2 deprecation in etcd side (planned for v4).

I still want to merge this PR, for v3 API reference implementation and for v2 data purge scripts.

After this PR, I will add some docs on purge operations.

gyuho added 9 commits July 6, 2017 14:20
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
@hexfusion hexfusion merged commit c5233dd into coreos:master Sep 8, 2018
@gyuho gyuho deleted the make-discovery-testable branch September 8, 2018 15:39
hexfusion added a commit that referenced this pull request Sep 9, 2018
This PR is an update to #53 bumping etcd to v3.3.9 and go 1.10.3. Although dep will be replaced with vgo in the future keeping the tooling in sync with etcd with make management easier.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants