-
Notifications
You must be signed in to change notification settings - Fork 78
SANDBOX-1561 | feature: Make targets for debugging services and operators #1242
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: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,7 +96,7 @@ if [[ -n "${CI}${REG_REPO_PATH}${HOST_REPO_PATH}" ]] && [[ $(echo ${REPO_NAME} | | |
| set_tags | ||
|
|
||
| if [[ ${PUBLISH_OPERATOR} == "true" ]]; then | ||
| push_image | ||
| push_image "${DEBUG_MODE}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wonder whether this should be added as an option for consistency with other options or it's fine to treat it as a special environment variable. @MatousJobanek and @rsoaresd may have thoughts on this |
||
| REG_SERV_IMAGE_LOC=${IMAGE_LOC} | ||
| REG_REPO_PATH=${REPOSITORY_PATH} | ||
| fi | ||
|
|
@@ -108,7 +108,7 @@ if [[ -n "${CI}${REG_REPO_PATH}${HOST_REPO_PATH}" ]] && [[ $(echo ${REPO_NAME} | | |
| set_tags | ||
|
|
||
| if [[ ${PUBLISH_OPERATOR} == "true" ]]; then | ||
| push_image | ||
| push_image "${DEBUG_MODE}" | ||
| OPERATOR_IMAGE_LOC=${IMAGE_LOC} | ||
| make -C ${REPOSITORY_PATH} publish-current-bundle INDEX_IMAGE_TAG=${BUNDLE_AND_INDEX_TAG} BUNDLE_TAG=${BUNDLE_AND_INDEX_TAG} QUAY_NAMESPACE=${QUAY_NAMESPACE} OTHER_REPO_PATH=${REG_REPO_PATH} OTHER_REPO_IMAGE_LOC=${REG_SERV_IMAGE_LOC} IMAGE=${OPERATOR_IMAGE_LOC} | ||
| fi | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,11 +45,18 @@ set_tags() { | |
| } | ||
|
|
||
| push_image() { | ||
| # When the "${DEBUG_MODE}" argument is passed, we instruct Make to push | ||
| # the "debug" images with Delve on them. | ||
| if [[ $1 == "true" ]]; then | ||
| DEBUG_MODE_SUFFIX="-debug" | ||
| else | ||
| DEBUG_MODE_SUFFIX="" | ||
| fi | ||
|
|
||
| GIT_COMMIT_ID=$(git --git-dir=${REPOSITORY_PATH}/.git --work-tree=${REPOSITORY_PATH} rev-parse --short HEAD) | ||
| IMAGE_LOC=quay.io/codeready-toolchain/${REPOSITORY_NAME}:${GIT_COMMIT_ID} | ||
| if is_provided_or_paired; then | ||
| IMAGE_BUILDER=${IMAGE_BUILDER:-"podman"} | ||
| make -C ${REPOSITORY_PATH} ${IMAGE_BUILDER}-push QUAY_NAMESPACE=${QUAY_NAMESPACE} IMAGE_TAG=${TAGS} | ||
| make -C ${REPOSITORY_PATH} ${IMAGE_BUILDER}-push${DEBUG_MODE_SUFFIX} QUAY_NAMESPACE=${QUAY_NAMESPACE} IMAGE_TAG=${TAGS} | ||
| IMAGE_LOC=quay.io/${QUAY_NAMESPACE}/${REPOSITORY_NAME}:${TAGS} | ||
| fi | ||
| } | ||
|
Comment on lines
47
to
62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, understand the repo structure and the manage-operator.sh script
git ls-files | head -20Repository: codeready-toolchain/toolchain-e2e Length of output: 591 🏁 Script executed: # Look at the manage-operator.sh script to understand what repos it references
cat -n scripts/ci/manage-operator.sh | head -100Repository: codeready-toolchain/toolchain-e2e Length of output: 4890 🏁 Script executed: # Search for any Makefile targets related to "push-debug"
rg 'push-debug|push.*debug' --type=make -nRepository: codeready-toolchain/toolchain-e2e Length of output: 59 🏁 Script executed: # Also check for any docker or podman push targets
rg 'docker-push|podman-push' --type=make -nRepository: codeready-toolchain/toolchain-e2e Length of output: 59 🏁 Script executed: # Check if there are external repo references or documentation
rg 'host-operator|member-operator' -n | head -20Repository: codeready-toolchain/toolchain-e2e Length of output: 4535 🌐 Web query:
💡 Result: Do you mean the host-operator in the codeready-toolchain GitHub repo (github.com/codeready-toolchain/host-operator)? If so, do you want me to (a) show the Makefile section for the docker-push-debug target, (b) explain what that target does, or (c) locate a different host-operator repo? 🌐 Web query:
💡 Result: Which repository do you mean (link or org/name)? I can then fetch its Makefile and explain the podman-push-debug target or how to run it. 🌐 Web query:
💡 Result: Do you want me to find the exact Makefile "push-debug" target inside the codeready-toolchain/host-operator GitHub repo (and show its contents)? If so I’ll search GitHub and return the file location and snippet. 🌐 Web query:
💡 Result: I found the repository and its Makefile in the codeready-toolchain/host-operator repo on GitHub: https://github.com/codeready-toolchain/host-operator (Makefile listed in the repo root). [1] Would you like me to fetch and show the Makefile contents? 🌐 Web query:
💡 Result: The repo’s Makefile provides image-push targets — notably podman-push and push-to-quay-staging. The README instructs running:
Sources: 🌐 Web query:
💡 Result: I searched the codeready-toolchain/host-operator repository for "push-debug", "docker-push-debug", and "podman-push-debug" and found no matches. Would you like me to (a) search all of GitHub for those terms, or (b) search the repository for similar/related build or push targets (e.g., Makefile, scripts, GitHub Actions)? 🌐 Web query:
💡 Result: I searched the codeready-toolchain/member-operator repository and found no matches for "push-debug", "docker-push-debug", or "podman-push-debug". (github.com) Citations: The debug push targets do not exist in the operator repositories. This implementation will fail at runtime. The Either:
🧰 Tools🪛 Shellcheck (0.11.0)[warning] 60-60: IMAGE_LOC appears unused. Verify use (or export if used externally). (SC2034) 🤖 Prompt for AI Agents |
||
|
|
||
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.
The
|| truesuppresses all errors, including legitimate failures.While this may be intentional to handle cases where the env var already exists, it also hides real problems like malformed JSON patches or connectivity issues. Consider checking for the specific error condition or removing the fallback if this patch is required for debugging to work.