Block unsupported Airflow 3 commands#1822
Conversation
| } | ||
|
|
||
| // Check if the provided runtime version is for Airflow 3 | ||
| if err := airflowversions.ValidateNoAirflow3Support(runtimeVersion); err != nil { |
There was a problem hiding this comment.
nit: I haven't tried it, but what if no runtime version is specified in the command? will that cause the command to default to AF 3 version and then get blocked here on day 0?
There was a problem hiding this comment.
Yeah, but the runtime version flag is not a required flag, so if users won't pass it, then would our defaulting logic in cmd/cloud/deployment.go pick the AF 3 runtime version from post day 0: https://github.com/astronomer/astro-cli/blob/main/cmd/cloud/deployment.go#L701-L708?
There was a problem hiding this comment.
Yes, we are defaulting to Airflow 3 across the CLI when that is released. I only set the flag in the screenshot because it isn't released yet.
There was a problem hiding this comment.
in this case, if a user does not set the flag in their command, the defaulting logic would pick AF 3, and then this piece of code would error out, which isn't ideal since CLI is picking the default for the users. I think we might have to use AF 2 default for deployment create logic, wdyt?
There was a problem hiding this comment.
Discussed offline, agreed that this command should exclude Airflow 3 from the default runtime version, so I've pushed a commit for that.

Description
This change blocks
astro deploymentcommands that are not yet supported for Airflow 3 deployments.These are the commands that match:
astro deployment [create|update|logs]astro deployment [variable|airflow-variable|connection|pool|worker-queue] *🧪 Functional Testing
📸 Screenshots
📋 Checklist
make testbefore taking out of draftmake lintbefore taking out of draft