-
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
Run ./hack/update-deps.sh --patch #15087
Conversation
44d847c
to
fce1234
Compare
github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89 | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/bwmarrin/snowflake v0.0.0 | ||
github.com/clarketm/json v1.13.0 | ||
github.com/clarketm/json v1.13.1 |
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.
Can we get rid of this dep @clarketm ?
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.
No, it is required by genyaml
(we need it at least until I can create a custom encoder that can handle all this fancy logic 💃).
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.
test-infra/prow/config/config.go
Line 470 in 7b736ad
ResyncPeriod *metav1.Duration `json:"resync_period,omitempty"` |
https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/v1/duration.go
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.
My take is that since GenYaml(...)
takes an interface
, it can handle any arbitrary type. IMO, it would be impractical to use genyaml
if a user had to create a custom marshaller for every struct
in the source file(s). It would complicate it and reduce its utility. I am not saying that this/my approach is the best, but it does make the tool much easier to use out-of-the-box.
test-infra/pkg/genyaml/genyaml.go
Line 411 in a3fd5b7
func (cm *CommentMap) GenYaml(config interface{}) (string, error) { |
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 basically you're just reinventing http://sigs.k8s.io/yaml? Please get rid of this.
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 would not work using http://sigs.k8s.io/yaml
because it it outdated and does not support the Node
type which it critical to the comment-injection logic of genyaml
.
xref: kubernetes-sigs/yaml#18
xref: kubernetes-sigs/yaml#26
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 am not opposed to switching to http://sigs.k8s.io/yaml
in the future once these features are supported (assuming it exposes these built-in go-yaml
/v3
types and continues to filter zero-values structs).
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fejta, k8s-ci-robot The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Automatic go module update. Please review