-
Notifications
You must be signed in to change notification settings - Fork 73
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
Added the support for --image-name flag in the astro deploy command #1751
base: main
Are you sure you want to change the base?
Conversation
1c17719
to
6b6f564
Compare
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.
Left some minor comments, but looks fine otherwise
if runtimeVersion == "" { | ||
return ErrNoRuntimeVersionPassed | ||
} |
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.
nit: do we need to validate that runtimeVersion
is a valid semver and present in updates.astronomer.io
? Or does the Houston API do that for us?
if runtimeVersion == "" { | ||
return ErrNoRuntimeVersionPassed | ||
} | ||
if imageName == "" { |
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.
nit: Should we validate that the image being passed is built using the same runtime version as the one being passed on as user input? Or does the Houston API do that for us?
deploymentIDForCurrentCmd, _, err := getDeploymentIDForCurrentCommandVar(houstonClient, wsID, deploymentID, deploymentID == "") | ||
if err != nil { | ||
return err | ||
} | ||
deploymentID = deploymentIDForCurrentCmd | ||
if deploymentID == "" { | ||
return errInvalidDeploymentID | ||
} |
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.
deploymentIDForCurrentCmd, _, err := getDeploymentIDForCurrentCommandVar(houstonClient, wsID, deploymentID, deploymentID == "") | |
if err != nil { | |
return err | |
} | |
deploymentID = deploymentIDForCurrentCmd | |
if deploymentID == "" { | |
return errInvalidDeploymentID | |
} | |
deploymentID, _, err := getDeploymentIDForCurrentCommandVar(houstonClient, wsID, deploymentID, deploymentID == "") | |
if err != nil { | |
return err | |
} | |
if deploymentID == "" { | |
return errInvalidDeploymentID | |
} |
nit: simplifying the logic
Description
Added the support for --image-name flag in the astro deploy command. Internally, it will call the updateDeploymentImage API. No image will be pushed to the registry. The command will be like this -
astro deploy --image-name IMAGE_URL --runtime-version IMAGE_RUNTIME_VERSION
🎟 Issue(s)
Related https://github.com/astronomer/issues/issues/6828
🧪 Functional Testing
Tested locally
📸 Screenshots
📋 Checklist
make test
before taking out of draftmake lint
before taking out of draft