Skip to content

Commit 36f59a9

Browse files
stuggiclaude
andcommitted
Fix pin-bundle-images.sh to filter openstack-operator before replace
Move filtering from grep to jq to catch openstack-operator paths before the replace directive substitutes them with local paths. Issue: The replace directive transforms the path before grep filtering: github.com/.../openstack-operator/api => ./api grep -v openstack-operator doesn't match './api' Fix: Filter in jq on .Path before applying .Replace: select(.Path | contains("openstack-operator") | not) This properly excludes openstack-operator and openstack-operator/api(s) while keeping other operators' /api modules (nova-operator/api, etc). Prevents CI error: Invalid source name docker://EMPTY_SHA:null:https://quay.io/api/v1/repository/./api Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 15fdbf6 commit 36f59a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hack/pin-bundle-images.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if [ -n "$DOCKERFILE" ]; then
1717
fi
1818

1919
#loop over each openstack-k8s-operators go.mod entry
20-
MOD_PATHS=$(go list -mod=readonly -m -json all | jq -r '. | select(.Path | contains("openstack")) | .Replace // . |.Path' | grep -v openstack-operator | grep -v lib-common)
20+
MOD_PATHS=$(go list -mod=readonly -m -json all | jq -r '. | select(.Path | contains("openstack")) | select(.Path | contains("openstack-operator") | not) | select(.Path | contains("lib-common") | not) | .Replace // . |.Path')
2121
for MOD_PATH in ${MOD_PATHS}; do
2222
if [[ "$MOD_PATH" == "./apis" ]]; then
2323
continue

0 commit comments

Comments
 (0)