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

Update to latest serviceresolver code #335

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Sep 24, 2020

Changes proposed in this PR:

  • updates to latest master api version which contains new serviceresolver code
  • changes matchesConsul implementation to use reflect.DeepEqual and removes tests to match how we're testing the other methods

Companion to hashicorp/consul-helm#619

Copy link
Contributor

@thisisnotashwin thisisnotashwin left a comment

Choose a reason for hiding this comment

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

Just that small change with the test that checks both ToConsul and MatchesConsul but looks great!!!

@@ -7,7 +7,7 @@ require (
github.com/digitalocean/godo v1.10.0 // indirect
github.com/go-logr/logr v0.1.0
github.com/google/go-querystring v1.0.0 // indirect
github.com/hashicorp/consul/api v1.6.0
github.com/hashicorp/consul/api v1.4.1-0.20200924193849-85d223b73c1d
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh go-lang versioning. A reasonable person would expect this to be v1.6.1-foobar, but not golang

api/v1alpha1/serviceresolver_types_test.go Show resolved Hide resolved
@lkysow lkysow force-pushed the crd-serviceresolver-latest branch from 8da3144 to 77a8f38 Compare September 25, 2020 18:10
@lkysow lkysow force-pushed the crd-serviceresolver-latest branch from 77a8f38 to 95306dc Compare September 25, 2020 18:12
@lkysow lkysow requested review from a team and ishustava and removed request for a team September 25, 2020 18:14
Copy link
Contributor

@ishustava ishustava left a comment

Choose a reason for hiding this comment

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

Looks good!

}

type CookieConfig struct {
// Session generates a session cookie with no expiration.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be something like this since it's a bool

Suggested change
// Session generates a session cookie with no expiration.
// Session determines whether to generate a session cookie with no expiration.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes that's better, will update. I copied these directly from Consul.

}

// Test MatchesConsul for cases that should return false.
func TestServiceResolver_MatchesConsulFalse(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious, why are you removing this test?

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed it because it was testing reflect.DeepEqual. Although the "different type" case is still valid to test I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ashwin-venkatesh should we add these back in #340?

Copy link
Contributor

Choose a reason for hiding this comment

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

can do

@lkysow lkysow merged commit 9f994ed into crd-controller-base Sep 29, 2020
@lkysow lkysow deleted the crd-serviceresolver-latest branch September 29, 2020 16:48
ndhanushkodi pushed a commit to ndhanushkodi/consul-k8s that referenced this pull request Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants