-
Notifications
You must be signed in to change notification settings - Fork 1
Align release files with our current approach #1326
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
base: main
Are you sure you want to change the base?
Conversation
|
||
// marshalReleaseYAML creates a custom YAML representation of the release | ||
// with proper field ordering and without unwanted fields like status and creationTimestamp | ||
func marshalReleaseYAML(release v1alpha1.Release) ([]byte, 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.
That is the simplest way of creating a release yaml without any extra fields like status
fields or creationTimestamp
.
Also it is super hard to change the order for yaml
when using any libraries because the ordering would look like:
- dependsOn:
- cloud-provider-aws
name: aws-ebs-csi-driver
version: 3.0.5
instead of what we have:
- name: aws-ebs-csi-driver
version: 3.0.5
dependsOn:
- cloud-provider-aws
I know looks hacky but it is the simplest way of not getting any headaches.
Using the default YAML marshaler with custom struct tags wouldn't give us the precise field ordering control needed.
} | ||
|
||
// cleanReleaseNotes removes excess blank lines from the generated release notes | ||
func cleanReleaseNotes(notes string) string { |
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 need that for making nice formatting. I highlighted an example in the PR body
@@ -51,6 +51,12 @@ var knownComponentParseParams = map[string]parseParams{ | |||
start: commonStartPattern, | |||
end: commonEndPattern, | |||
}, | |||
"aws-pod-identity-webhook": { |
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.
Added new components, those were missing
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.
LGTM!
Can we maybe have some kind of golden file? Like, a Release CR how it should look like if you put in some specific values, so we can code towards that?
Added a golden file for release CR 👍🏻 |
…detecting diffs, allowing to add new apps when using --bumpall, highlighting new apps when included
…ng os-tooling component, ...
if componentName == "os-tooling" { | ||
// Skip parsing os-tooling | ||
// protected repo | ||
return &Version{ | ||
Name: currentVersion, | ||
Link: changelogURLBuilder.String(), | ||
Content: "", | ||
}, nil | ||
} |
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.
Good to know, I was already wondering why there is no changelog for capi-image-builder
.
Example how the format looks like:
Checklist