Repository navigation
Put a newline before each separator in the release manifest - #9
Open
bhouse-nexthop wants to merge 1 commit into
Open
bhouse-nexthop wants to merge 1 commit into
bhouse-nexthop wants to merge 1 commit into
Conversation
deploy/k8s/rbac.yaml has no newline at its end, so the separator
appended after it lands on its last line ("apiGroup:
rbac.authorization.k8s.io---") and merges the snapshotter
ClusterRoleBinding into the CSIDriver: the v3.0.0 manifest.yaml
applies neither. printf "---\n" does not fix that, and fails because
printf reads a format starting with "-" as an option.
Signed-off-by: Brad House <bhouse@nexthop.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: none (issues are disabled on this repository)
Description of changes:
The
manifest.yamlasset of release v3.0.0 has a document separator glued to the end of line 121:The
cloudstack-csi-snapshotter-bindingClusterRoleBinding and thecsi.cloudstack.apache.orgCSIDriver become onedocument.
kubectl apply -f manifest.yamlrefuses it, so a cluster installed from the manifest has neither theCSIDriver nor the snapshotter's ClusterRoleBinding, and
kubectl applyexits non-zero. Apache CloudStack's Kubernetes serviceinstalls the driver from this asset.
The cause is that
deploy/k8s/rbac.yamlhas no newline at its end, and the release workflow appends---right after it.#4 changed
echo "---"toprintf "---\n", but that doesn't fix it:printfstill writes no newline before the---.printfreads a format that starts with-as an option. It writes nothing and fails:The run step uses
bash -e, so the next tag's release job stops at its firstprintf. Without-e, the manifestwould have no separators at all. No app release has run since Fix of some minor bugs when using the driver manifest and update helm chart versions #4. 3.0.1 and 3.0.2 are chart releases.
This PR writes
printf '\n---\n'. It puts a newline before every separator, so a source file without a finalnewline can't glue the next document onto it. An extra blank line is harmless where the file already ends with one.
Could the v3.0.0
manifest.yamlasset also be replaced with a fixed one, or a v3.0.1 app release be cut? Consumersthat pin the v3.0.0 URL keep getting the broken file. Until then they can split it with:
sed -i '/^[[:space:]]*#/!s/^\(.*[^-[:space:]]\)---$/\1\n---/' manifest.yamlTesting performed:
deploy/k8s/ofmain: 12 documents, among themClusterRoleBinding/cloudstack-csi-snapshotter-bindingandCSIDriver/csi.cloudstack.apache.orgas separatedocuments. The v3.0.0 asset parses as 11 documents: the binding is lost.
printf "---\n"(as onmain) in bash and sh: exit status 2 and nothing written.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.