-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
TXT registry: metadata format #4624
base: master
Are you sure you want to change the base?
TXT registry: metadata format #4624
Conversation
Hi @mcharriere. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Would be good to keep this going, having duplicated TXT records following both formats is creating a lot of visual pollution in the zone. |
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
350852a
to
151cfe7
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
Signed-off-by: Matias Charriere <[email protected]>
/lgtm |
The reference to slack does not work for me in the browser. Can you post a link to the discussion for weblicents? |
|
||
const ( | ||
TXTFormatTransition TXTFormat = "transition" | ||
TXTFormatOnlyMetadata TXTFormat = "only-metadata" |
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 looks like an enum and we should use this:
type TXTFormat int
const (
TXTFormatTransition TXTFormat = iota + 1
TXTFormatOnlyMetadata
)
func (t TXTFormat) String() string {
switch t {
case TXTFormatTransition:
return "transition"
case TXTFormatOnlyMetadata:
return "only-metadata"
}
return "unknown"
}
txtNew.ProviderSpecific = r.ProviderSpecific | ||
endpoints = append(endpoints, txtNew) | ||
|
||
// "new" (version 2) TXT record format (containing record type) |
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.
better to have a reference to a doc where "new" (version 2)
is defined
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.
AFAICT there are no docs referencing this format in the master
branch, but all I can find is this doc that was removed some time ago.
The new term was introduced during the proposal and it's probably not the best way to describe it, as this PR adds yet another new format.
I could link that file or we could name the format differently. wdyt?
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.
I would say write a section in a doc about it and reference that.
switch name { | ||
case TXTFormatTransition.String(): | ||
return TXTFormatTransition | ||
default: |
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.
so if we do things wrong we hide errors by choosing TXTFormatOnlyMetadata
, IMO wrong choice.
Be explicit and have an UknownFormat for example in the enum that is the 0-value.
} | ||
} | ||
|
||
// Metadata TXT record format |
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.
which version ? old/new?
The comment I can get from the variable name txtMetadata
.
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.
As old
and new
age badly, the name metadata
for this format was introduced (see the PR and issues referenced above). This is the format that is supposed to replace the other 2 at some point in time, meaning that the old
and new
should be removed.
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.
Then I would just drop the comment.
Description
This PR is the continuation of the work done in #3774
It includes a new option to select between 2 different modes:
I mostly resolved conflicts with
master
. Docs are still missing, but I think that all of the comments in the previous PR have been addressed. Including the integration with the AWS Alias behavior change.Ref https://app.slack.com/client/T09NY5SBT/C771MKDKQ
Fixes #3757
Checklist