scripts: fix follow-up issues from #3371#3375
Conversation
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
|
Welcome to the Kubeflow Manifests Repository Thanks for opening your first PR. Your contribution means a lot to the Kubeflow community. Before making more PRs: Community Resources:
Thanks again for helping to improve Kubeflow. |
There was a problem hiding this comment.
Pull request overview
This PR is a follow-up to #3371 and fixes several correctness and portability issues in the Kubeflow manifest synchronization scripts. It corrects incorrect CRUD web app source paths, aligns the sed -i usage in the Knative script to be Darwin-safe, removes a fragile/redundant branch existence check, and narrows the git add scope in commit_changes calls so only the intended files are staged rather than the entire repository.
Changes:
- Remove fragile empty-test branch check in
create_branch(scripts/library.sh) - Fix CRUD web app source/destination paths (
crud-web-applications→crud-web-apps) and narrowcommit_changesstaging toapplications/andREADME.mdinscripts/synchronize-kubeflow-manifests.sh - Add Darwin-safe
sed -i ''handling and narrowcommit_changesstaging inscripts/synchronize-knative-manifests.sh
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
scripts/library.sh |
Removes the git branch --list empty-test check that was shadowed by the more reliable git show-ref check immediately after it |
scripts/synchronize-kubeflow-manifests.sh |
Corrects upstream CRUD web app source and README replacement paths from crud-web-applications to crud-web-apps; narrows commit_changes to stage only applications/ and the top-level README.md |
scripts/synchronize-knative-manifests.sh |
Adds macOS-compatible sed -i '' branch in replace_in_file; narrows commit_changes to stage only $DESTINATION_DIRECTORY and the top-level README.md |
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
|
Thank you. |
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
@juliusvonkohout done ! |
|
Please check whether all the yq eval -i 'explode(.)' for knative is still needed with kustomize 5.8.1 or whether we can drop it. |
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
@juliusvonkohout I checked this locally against
Then I compared the generated Knative YAML and ran
The generated files were identical, and all four builds passed without |
I still see a lot of yq eval in the script. Please check what you can remove. |
|
Or let us tackle #3375 (comment) in a follow up PR. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: juliusvonkohout The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* scripts: fix kubeflow sync paths Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * knative: make sync script portable Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * knative: match darwin check style Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * knative: drop darwin branch Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * knative: drop explode cleanup Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> --------- Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
✏️ Summary of Changes
This PR follows up on review feedback from
#3371and fixes the remaining correctness and portability issues in the sync scripts.Original PR:
Changes included:
create_branchinscripts/library.shby removing the fragile empty-test branch checkscripts/synchronize-kubeflow-manifests.shso the CRUD web app source paths match the current upstream Kubeflow layout:components/crud-web-apps/jupyter/manifestscomponents/crud-web-apps/volumes/manifestscomponents/crud-web-apps/tensorboards/manifestsscripts/synchronize-kubeflow-manifests.shcommit_changesusage so the Kubeflow and Knative sync scripts stage only their intended outputs instead of the whole reporeplace_in_file()inscripts/synchronize-knative-manifests.shDarwin-safeReview comments addressed:
scripts/library.sh: fragile branch existence checkscripts/synchronize-kubeflow-manifests.sh: CRUD web app README replacement mismatchscripts/library.sh: overly broad staging throughcommit_changesscripts/synchronize-knative-manifests.sh: non-portablesed -i📦 Dependencies
#3371🐛 Related Issues
#3371✅ Contributor Checklist
Local Validation
Validated in a clean worktree and disposable repos:
bash -non all modified scriptsscripts/synchronize-kubeflow-manifests.shafter fixing CRUD source pathsscripts/synchronize-knative-manifests.shwith localyqavailablereplace_in_file()usingsed -i ''