Skip to content
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

OSD-27228: Ensure containers are cleaned up when SIGINT is called #586

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joshbranham
Copy link
Contributor

@joshbranham joshbranham commented Jan 9, 2025

What type of PR is this?

bug

What this PR does / Why we need it?

When running ocm-backplane console $ID on macOS using Docker (in my case colima with the docker CLI binary), issuing a ctrl+c, aka SIGINT, the container(s) created would get left behind. Then a subsequent ocm-backplane console $ID for the same cluster would fail.

The primary change here is to use exec.CommandContext and the cancel() channel for the dockerRunConsoleContainer() function. This allows the context to cancel command execution, and then normal container cleanup runs.

Additionally, made some other changes to cleanup the code. The biggest takeaway here is not using a global variable for the context and cancel func.

Which Jira/Github issue(s) does this PR fix?

Resolves https://issues.redhat.com/browse/OSD-27228

Special notes for your reviewer

Please run through a test of this locally on your machine. I have tested this on macOS with Docker, but ideally we want to have the following tested:

  • macOS with Podman
  • linux with Podman
  • linux with Docker (least important I think)

My test result:

 ./ocm-backplane console osde2e-naej4 --verbosity=debug
DEBU[0000] auto open browser: false
DEBU[0000] container engine found in path: docker
INFO[0000] Using container engine docker
WARN[0000] Docker on macOS is not tested
DEBU[0000] using listen port: 64570
DEBU[0000] Querying the cluster for console image
INFO[0000] Using image quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157
INFO[0000] Pulling image                                 Command="`docker --config /Users/jbranham/.kube/ocm-pull-secret pull --quiet --platform=linux/amd64 quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157`"
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] monitoring plugin is not needed
DEBU[0001] monitoring plugin is not needed, not to assign monitoring plugin port
DEBU[0001] monitoring plugin is not needed, not to get monitoring plugin image
DEBU[0001] monitoring plugin is not needed, not to pull monitoring plugin image
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
INFO[0001] Starting initial cleanup of containers
INFO[0001] Container monitoring-plugin-2g6r59jsdo0h91gu4vk862snevptue75 does not exist, no need to clean up
INFO[0001] Container console-2g6r59jsdo0h91gu4vk862snevptue75 does not exist, no need to clean up
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] API endpoint: https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/
DEBU[0001] Finding ocm token
DEBU[0001] Finding ocm token
DEBU[0001] Found OCM access token
INFO[0002] Backplane URL retrieved via OCM environment: https://api.stage.backplane.openshift.com
INFO[0002] No PagerDuty API Key configuration available. This will result in failure of `ocm-backplane login --pd <incident-id>` command.
INFO[0002] Running container                             Command="`docker --config /Users/jbranham/.kube/ocm-pull-secret run --platform=linux/amd64 --rm --detach --name console-2g6r59jsdo0h91gu4vk862snevptue75 --publish 127.0.0.1:64570:64570 --network host --env HTTPS_PROXY=http://squid.corp.redhat.com:3128 quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157 /opt/bridge/bin/bridge --public-dir=/opt/bridge/static -base-address http://127.0.0.1:64570 -branding ocp -documentation-base-url https://docs.openshift.com/rosa/ -user-settings-location localstorage -user-auth disabled -k8s-mode off-cluster -k8s-auth bearer-token -k8s-mode-off-cluster-endpoint https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/ -k8s-mode-off-cluster-alertmanager https://api.stage.backplane.openshift.com/backplane/alertmanager/2g6r59jsdo0h91gu4vk862snevptue75 -k8s-mode-off-cluster-thanos https://api.stage.backplane.openshift.com/backplane/thanos/2g6r59jsdo0h91gu4vk862snevptue75 -k8s-auth-bearer-token <OMIT> -listen http://0.0.0.0:64570`"
WARNING: Published ports are discarded when using host network mode
DEBU[0002] monitoring plugin is not needed, not to run monitoring plugin
== Console is available at http://127.0.0.1:64570 ==

^Cinterrupt
INFO[0015] Container removed: console-2g6r59jsdo0h91gu4vk862snevptue75

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 9, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 9, 2025

@joshbranham: This pull request references OSD-27228 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set.

In response to this:

What type of PR is this?

bug

What this PR does / Why we need it?

When running ocm-backplane console $ID on macOS using Docker (in my case colima with the docker CLI binary), issuing a ctrl+c, aka SIGINT, the container(s) created would get left behind. Then a subsequent ocm-backplane console $ID for the same cluster would fail.

The primary change here is to use exec.CommandContext and the cancel() channel for the dockerRunConsoleContainer() function. This allows the context to cancel command execution, and then normal container cleanup runs.

Additionally, made some other changes to cleanup the code. The biggest takeaway here is not using a global variable for the context and cancel func.

Which Jira/Github issue(s) does this PR fix?

Resolves https://issues.redhat.com/browse/OSD-27228

Special notes for your reviewer

Please run through a test of this locally on your machine. I have tested this on macOS with Docker, but ideally we want to have the following tested:

  • macOS with Podman
  • linux with Podman
  • linux with Docker (least important I think)

My test result:

 ./ocm-backplane console osde2e-naej4 --verbosity=debug
DEBU[0000] auto open browser: false
DEBU[0000] container engine found in path: docker
INFO[0000] Using container engine docker
WARN[0000] Docker on macOS is not tested
DEBU[0000] using listen port: 64570
DEBU[0000] Querying the cluster for console image
INFO[0000] Using image quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157
INFO[0000] Pulling image                                 Command="`docker --config /Users/jbranham/.kube/ocm-pull-secret pull --quiet --platform=linux/amd64 quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157`"
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] monitoring plugin is not needed
DEBU[0001] monitoring plugin is not needed, not to assign monitoring plugin port
DEBU[0001] monitoring plugin is not needed, not to get monitoring plugin image
DEBU[0001] monitoring plugin is not needed, not to pull monitoring plugin image
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
INFO[0001] Starting initial cleanup of containers
INFO[0001] Container monitoring-plugin-2g6r59jsdo0h91gu4vk862snevptue75 does not exist, no need to clean up
INFO[0001] Container console-2g6r59jsdo0h91gu4vk862snevptue75 does not exist, no need to clean up
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] API endpoint: https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/
DEBU[0001] Finding ocm token
DEBU[0001] Finding ocm token
DEBU[0001] Found OCM access token
INFO[0002] Backplane URL retrieved via OCM environment: https://api.stage.backplane.openshift.com
INFO[0002] No PagerDuty API Key configuration available. This will result in failure of `ocm-backplane login --pd <incident-id>` command.
INFO[0002] Running container                             Command="`docker --config /Users/jbranham/.kube/ocm-pull-secret run --platform=linux/amd64 --rm --detach --name console-2g6r59jsdo0h91gu4vk862snevptue75 --publish 127.0.0.1:64570:64570 --network host --env HTTPS_PROXY=http://squid.corp.redhat.com:3128 quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157 /opt/bridge/bin/bridge --public-dir=/opt/bridge/static -base-address http://127.0.0.1:64570 -branding ocp -documentation-base-url https://docs.openshift.com/rosa/ -user-settings-location localstorage -user-auth disabled -k8s-mode off-cluster -k8s-auth bearer-token -k8s-mode-off-cluster-endpoint https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/ -k8s-mode-off-cluster-alertmanager https://api.stage.backplane.openshift.com/backplane/alertmanager/2g6r59jsdo0h91gu4vk862snevptue75 -k8s-mode-off-cluster-thanos https://api.stage.backplane.openshift.com/backplane/thanos/2g6r59jsdo0h91gu4vk862snevptue75 -k8s-auth-bearer-token <OMIT> -listen http://0.0.0.0:64570`"
WARNING: Published ports are discarded when using host network mode
DEBU[0002] monitoring plugin is not needed, not to run monitoring plugin
== Console is available at http://127.0.0.1:64570 ==

^Cinterrupt
INFO[0015] Container removed: console-2g6r59jsdo0h91gu4vk862snevptue75

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 9, 2025

@joshbranham: This pull request references OSD-27228 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set.

In response to this:

What type of PR is this?

bug

What this PR does / Why we need it?

When running ocm-backplane console $ID on macOS using Docker (in my case colima with the docker CLI binary), issuing a ctrl+c, aka SIGINT, the container(s) created would get left behind. Then a subsequent ocm-backplane console $ID for the same cluster would fail.

The primary change here is to use exec.CommandContext and the cancel() channel for the dockerRunConsoleContainer() function. This allows the context to cancel command execution, and then normal container cleanup runs.

Additionally, made some other changes to cleanup the code. The biggest takeaway here is not using a global variable for the context and cancel func.

Which Jira/Github issue(s) does this PR fix?

Resolves https://issues.redhat.com/browse/OSD-27228

Special notes for your reviewer

Please run through a test of this locally on your machine. I have tested this on macOS with Docker, but ideally we want to have the following tested:

  • macOS with Podman
  • linux with Podman
  • linux with Docker (least important I think)

My test result:

 ./ocm-backplane console osde2e-naej4 --verbosity=debug
DEBU[0000] auto open browser: false
DEBU[0000] container engine found in path: docker
INFO[0000] Using container engine docker
WARN[0000] Docker on macOS is not tested
DEBU[0000] using listen port: 64570
DEBU[0000] Querying the cluster for console image
INFO[0000] Using image quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157
INFO[0000] Pulling image                                 Command="`docker --config /Users/jbranham/.kube/ocm-pull-secret pull --quiet --platform=linux/amd64 quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157`"
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] monitoring plugin is not needed
DEBU[0001] monitoring plugin is not needed, not to assign monitoring plugin port
DEBU[0001] monitoring plugin is not needed, not to get monitoring plugin image
DEBU[0001] monitoring plugin is not needed, not to pull monitoring plugin image
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
INFO[0001] Starting initial cleanup of containers
INFO[0001] Container monitoring-plugin-2g6r59jsdo0h91gu4vk862snevptue75 does not exist, no need to clean up
INFO[0001] Container console-2g6r59jsdo0h91gu4vk862snevptue75 does not exist, no need to clean up
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] API endpoint: https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/
DEBU[0001] Finding ocm token
DEBU[0001] Finding ocm token
DEBU[0001] Found OCM access token
INFO[0002] Backplane URL retrieved via OCM environment: https://api.stage.backplane.openshift.com
INFO[0002] No PagerDuty API Key configuration available. This will result in failure of `ocm-backplane login --pd <incident-id>` command.
INFO[0002] Running container                             Command="`docker --config /Users/jbranham/.kube/ocm-pull-secret run --platform=linux/amd64 --rm --detach --name console-2g6r59jsdo0h91gu4vk862snevptue75 --publish 127.0.0.1:64570:64570 --network host --env HTTPS_PROXY=http://squid.corp.redhat.com:3128 quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157 /opt/bridge/bin/bridge --public-dir=/opt/bridge/static -base-address http://127.0.0.1:64570 -branding ocp -documentation-base-url https://docs.openshift.com/rosa/ -user-settings-location localstorage -user-auth disabled -k8s-mode off-cluster -k8s-auth bearer-token -k8s-mode-off-cluster-endpoint https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/ -k8s-mode-off-cluster-alertmanager https://api.stage.backplane.openshift.com/backplane/alertmanager/2g6r59jsdo0h91gu4vk862snevptue75 -k8s-mode-off-cluster-thanos https://api.stage.backplane.openshift.com/backplane/thanos/2g6r59jsdo0h91gu4vk862snevptue75 -k8s-auth-bearer-token <OMIT> -listen http://0.0.0.0:64570`"
WARNING: Published ports are discarded when using host network mode
DEBU[0002] monitoring plugin is not needed, not to run monitoring plugin
== Console is available at http://127.0.0.1:64570 ==

^Cinterrupt
INFO[0015] Container removed: console-2g6r59jsdo0h91gu4vk862snevptue75

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 9, 2025

@joshbranham: This pull request references OSD-27228 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set.

In response to this:

What type of PR is this?

bug

What this PR does / Why we need it?

When running ocm-backplane console $ID on macOS using Docker (in my case colima with the docker CLI binary), issuing a ctrl+c, aka SIGINT, the container(s) created would get left behind. Then a subsequent ocm-backplane console $ID for the same cluster would fail.

The primary change here is to use exec.CommandContext and the cancel() channel for the dockerRunConsoleContainer() function. This allows the context to cancel command execution, and then normal container cleanup runs.

Additionally, made some other changes to cleanup the code. The biggest takeaway here is not using a global variable for the context and cancel func.

Which Jira/Github issue(s) does this PR fix?

Resolves https://issues.redhat.com/browse/OSD-27228

Special notes for your reviewer

Please run through a test of this locally on your machine. I have tested this on macOS with Docker, but ideally we want to have the following tested:

  • macOS with Podman
  • linux with Podman
  • linux with Docker (least important I think)

My test result:

 ./ocm-backplane console osde2e-naej4 --verbosity=debug
DEBU[0000] auto open browser: false
DEBU[0000] container engine found in path: docker
INFO[0000] Using container engine docker
WARN[0000] Docker on macOS is not tested
DEBU[0000] using listen port: 64570
DEBU[0000] Querying the cluster for console image
INFO[0000] Using image quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157
INFO[0000] Pulling image                                 Command="`docker --config /Users/jbranham/.kube/ocm-pull-secret pull --quiet --platform=linux/amd64 quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157`"
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] monitoring plugin is not needed
DEBU[0001] monitoring plugin is not needed, not to assign monitoring plugin port
DEBU[0001] monitoring plugin is not needed, not to get monitoring plugin image
DEBU[0001] monitoring plugin is not needed, not to pull monitoring plugin image
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
INFO[0001] Starting initial cleanup of containers
INFO[0001] Container monitoring-plugin-2g6r59jsdo0h91gu4vk862snevptue75 does not exist, no need to clean up
INFO[0001] Container console-2g6r59jsdo0h91gu4vk862snevptue75 does not exist, no need to clean up
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Finding target cluster from kube config
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] Found target cluster                          BackplaneHost="https://api.stage.backplane.openshift.com" ClusterID=2g6r59jsdo0h91gu4vk862snevptue75 ClusterURL="https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/"
DEBU[0001] API endpoint: https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/
DEBU[0001] Finding ocm token
DEBU[0001] Finding ocm token
DEBU[0001] Found OCM access token
INFO[0002] Backplane URL retrieved via OCM environment: https://api.stage.backplane.openshift.com
INFO[0002] No PagerDuty API Key configuration available. This will result in failure of `ocm-backplane login --pd <incident-id>` command.
INFO[0002] Running container                             Command="`docker --config /Users/jbranham/.kube/ocm-pull-secret run --platform=linux/amd64 --rm --detach --name console-2g6r59jsdo0h91gu4vk862snevptue75 --publish 127.0.0.1:64570:64570 --network host --env HTTPS_PROXY=http://squid.corp.redhat.com:3128 quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:888a01717d4e3af0c98091a82c6a0bf52ef1da7ecbf7695d407b8d1f0b5b3157 /opt/bridge/bin/bridge --public-dir=/opt/bridge/static -base-address http://127.0.0.1:64570 -branding ocp -documentation-base-url https://docs.openshift.com/rosa/ -user-settings-location localstorage -user-auth disabled -k8s-mode off-cluster -k8s-auth bearer-token -k8s-mode-off-cluster-endpoint https://api.stage.backplane.openshift.com/backplane/cluster/2g6r59jsdo0h91gu4vk862snevptue75/ -k8s-mode-off-cluster-alertmanager https://api.stage.backplane.openshift.com/backplane/alertmanager/2g6r59jsdo0h91gu4vk862snevptue75 -k8s-mode-off-cluster-thanos https://api.stage.backplane.openshift.com/backplane/thanos/2g6r59jsdo0h91gu4vk862snevptue75 -k8s-auth-bearer-token <OMIT> -listen http://0.0.0.0:64570`"
WARNING: Published ports are discarded when using host network mode
DEBU[0002] monitoring plugin is not needed, not to run monitoring plugin
== Console is available at http://127.0.0.1:64570 ==

^Cinterrupt
INFO[0015] Container removed: console-2g6r59jsdo0h91gu4vk862snevptue75

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from bmeng and Tafhim January 9, 2025 18:16
Copy link
Contributor

openshift-ci bot commented Jan 9, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: joshbranham
Once this PR has been reviewed and has the lgtm label, please assign wanghaoran1988 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@joshbranham joshbranham force-pushed the console-container-cleanup branch from 6731810 to 1ddf826 Compare January 9, 2025 18:33
Copy link
Contributor

openshift-ci bot commented Jan 9, 2025

@joshbranham: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@joshbranham joshbranham marked this pull request as draft January 9, 2025 19:41
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 9, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 45.16129% with 17 lines in your changes missing coverage. Please review.

Project coverage is 45.72%. Comparing base (52301c1) to head (1ddf826).

Files with missing lines Patch % Lines
cmd/ocm-backplane/console/console.go 45.16% 16 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #586      +/-   ##
==========================================
+ Coverage   45.67%   45.72%   +0.04%     
==========================================
  Files          87       87              
  Lines        6782     6779       -3     
==========================================
+ Hits         3098     3100       +2     
+ Misses       3299     3294       -5     
  Partials      385      385              
Files with missing lines Coverage Δ
cmd/ocm-backplane/console/console.go 40.25% <45.16%> (+0.40%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants