-
Notifications
You must be signed in to change notification settings - Fork 324
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 ConfigEntries to be Partition aware #724
Conversation
5b43e76
to
9d51a52
Compare
96f3ba2
to
5d76877
Compare
5ac36a8
to
30126ae
Compare
61fd143
to
410c7ba
Compare
I think this could be fine to keep around until alpha as you mentioned but I just wanted to clarify the following in case I'm misunderstanding: Is this the failing ent unit test in CI? Would we keep the failing test until post-alpha? Would you be able to run acceptance tests on this PR by skipping the ent unit tests if those will be failing for alpha? Do we need to modify CI to skip the that unit test until post alpha and make a reminder to re-enable it? |
410c7ba
to
a1c0bc4
Compare
The failing enterprise test should stop failing with the latest Consul enterprise alpha image. The test that is failing is the partition-init job that currently depends on the existence of Admin Partitions. I could create a PR that skips enterprise unit tests and runs the acceptance tests to ensure that the acceptance tests are 🟢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great Ashwin!!
The failing enterprise test should stop failing with the latest Consul enterprise alpha image.
ahh got it
I could create a PR that skips enterprise unit tests and runs the acceptance tests to ensure that the acceptance tests are green
might be a good idea, at least so we see controller acc tests go green? Maybe it doesn't have to be a blocker though
9c7d273
to
cae6589
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I left a couple of non-blocking, but otherwise looks good. I haven't tested it though. Should we add an acceptance test to test out partitions similar to how we test namespaces for config entries?
description: Partition is only accepted within a service-defaults | ||
config entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is a bit confusing. It seems like we only say which config entries allow it. Maybe this could be a second sentence after saying what the partition
property is? This is non-blocking.
consulClient, err := c.httpFlags.APIClient() | ||
cfg := api.DefaultConfig() | ||
c.httpFlags.MergeOntoConfig(cfg) | ||
cfg.Partition = c.flagPartition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non blocking: Could we make it so that partition is auto-parsed from flags when we call MergeOntoConfig
?
We definitely should update our acceptance tests. I was contemplating doing that as a part of the larger story of creating acceptance tests for Admin Partitions. |
cae6589
to
e71dbdf
Compare
e71dbdf
to
61e4cd9
Compare
* Add partition support to config entries * Fail if namespaces are not enabled and admin partitions are enabled
* Add partition support to config entries * Fail if namespaces are not enabled and admin partitions are enabled
Changes proposed in this PR:
How I've tested this PR:
How I expect reviewers to test this PR:
Notes: There is a validation on Service Intentions that fails if namespaces are not enabled but the namespace field has been populated. A similar check has not been made currently as this would require changing the method signature of the ConfigEntry interface which would leads to almost every file in the
/api/v1alpha1
directory getting impacted. Post the alpha release, I will do a refactor which is extract a bunch of fields required for validation and put them in a struct. This should ensure we don't have to change method signatures every time a new concept is introduced. We can update the struct and the config-entries that are impacted.Checklist: