Skip to content

[SA-0] Admin API is not needed in 'sdpctl appliance function download'#662

Merged
mandopaloooza merged 1 commit intomainfrom
fix-download-function
May 6, 2025
Merged

[SA-0] Admin API is not needed in 'sdpctl appliance function download'#662
mandopaloooza merged 1 commit intomainfrom
fix-download-function

Conversation

@mandopaloooza
Copy link
Collaborator

sdpctl appliance function download is an utility command to download a Function (e.g. LogServer) as a downloadable artifact. These artifacts are used for offline upgrades for some customers that have dark sites (i.e. no internet connection) to download the logserver container image.

This endpoint only requires a network connection to the registry to pull the logserver container image as a tarball - it doesn't need authentication to the Admin API. I removed the logic to figure out the image tag from the appliance connection and made version a required flag. I also removed the context.BaseAuthContext as it does not require a connection to an appliance to use this command.

@github-actions github-actions bot added the bug Something isn't working label May 6, 2025
@mandopaloooza
Copy link
Collaborator Author

❯ go run main.go appliance functions download LogServer --ci-mode --docker-registry="foo.com:5001" --save-path="build-artifacts/" --version=6.5

WARNING: the 'save-path' flag is deprecated. Please use the 'destination' flag instead.
INFO   [2025-05-06T13:25:35-04:00]                                               ARGS=LogServer COMMAND="sdpctl appliance functions download" SDPCTL_VERSION=0.0.0-dev
INFO   [2025-05-06T13:25:35-04:00] version check already done today
INFO   [2025-05-06T13:25:35-04:00] downloading image layers for logserver-6.5.zip
INFO   [2025-05-06T13:25:35-04:00] downloading image layer                       layer=4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
INFO   [2025-05-06T13:25:35-04:00] downloading image layer                       layer=5e650da5a65f51e08cc3c05e3e142272b7b2dc9cc09d76426bb8d1e852c5b9a5
INFO   [2025-05-06T13:25:35-04:00] downloading image layer                       layer=8bbd1bbd2fe7b8671dca0475224368af70b24ebc6c70a54296bafe782b730cd0
INFO   [2025-05-06T13:25:35-04:00] downloading image layer                       layer=4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
INFO   [2025-05-06T13:25:35-04:00] downloading image layer                       layer=8bbd1bbd2fe7b8671dca0475224368af70b24ebc6c70a54296bafe782b730cd0
INFO   [2025-05-06T13:25:35-04:00] downloading image layer                       layer=16a40cdabfb30568661dc87210702cf53a2031c590916eb63da38aaf0b7209e9
INFO   [2025-05-06T13:25:35-04:00] download finished                             layer=4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
INFO   [2025-05-06T13:25:36-04:00] download finished                             layer=4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
INFO   [2025-05-06T13:25:43-04:00] download finished                             layer=8bbd1bbd2fe7b8671dca0475224368af70b24ebc6c70a54296bafe782b730cd0
INFO   [2025-05-06T13:25:49-04:00] download finished                             layer=8bbd1bbd2fe7b8671dca0475224368af70b24ebc6c70a54296bafe782b730cd0
INFO   [2025-05-06T13:25:50-04:00] download finished                             layer=5e650da5a65f51e08cc3c05e3e142272b7b2dc9cc09d76426bb8d1e852c5b9a5
INFO   [2025-05-06T13:26:27-04:00] download finished                             layer=16a40cdabfb30568661dc87210702cf53a2031c590916eb63da38aaf0b7209e9
INFO   [2025-05-06T13:26:29-04:00] bundle ready                                  file=/Users/foo/git/sdpctl/build-artifacts/logserver-6.5.zip

@mandopaloooza mandopaloooza merged commit c5f798b into main May 6, 2025
4 checks passed
@mandopaloooza mandopaloooza deleted the fix-download-function branch May 6, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

2 participants