Repository navigation
Conversation
SameerMesiah97
left a comment
There was a problem hiding this comment.
I think there are a few thing wrong with this PR (even though it looks a simple fix):
-
Is this actually a bug? From the traceback it looks like
airflowctl connections createis being invoked without the required connection information. The poor UX is theValidationError, but I'm not convinced changing the API is the right fix for invalid input -
The traceback suggest execption is raised while constructing the
ConnectionBodyincli_config.py, beforeclient.connections.create()is ever called. Shouldn't the fix (if needed) live there instead? -
Doesn't this introduce a breaking change? Existing callers of
client.connections.create()will now need to provideconnection_idandconn_typeexplicitly. -
Why do
connection_idandconn_typeneed to be separate parameters at all? They're already required fields onConnectionBody, so this duplicates the source of truth and allows the values to diverge.
I think 1 should be addressed first. Could you provide a resproduction that illustrates that this is a genuine bug rather than due to invalid user input? I believe what might be needed here is clearer error logging that surfaces the root cause i.e. missing arguments rather a type validation error.
| def create( | ||
| self, | ||
| connection: ConnectionBody, | ||
| self, connection: ConnectionBody, connection_id: str, conn_type: str |
There was a problem hiding this comment.
I'm not sure I understand why connection_id and conn_type need to be separate required parameters here. They're already required fields on ConnectionBody, so this duplicates the source of truth and allows them to diverge. Is there a reason we can't continue deriving these values from the ConnectionBody instead?
There was a problem hiding this comment.
Got it ! Working on it
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
88e6d95 to
c6e11eb
Compare
c6e11eb to
ddeadcf
Compare
airflowctl connections createshows Traceback (most recent call last):Make
connection_idandconn_typeas required parameter in connections operations and update tests… tests
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.Important
🛠️ Maintainer triage note for @Prab-27 · by
@potiuk· 2026-07-08 15:38 UTCHelpful heads-up from the maintainers — please address before this PR can be reviewed:
Additional PROD image tests / Airflow CTL integration tests with PROD image). See the contributor guide.Full criteria: Pull Request quality criteria.
The ball is in your court — you've been assigned to this PR. Fix the above, then mark it Ready for review.
Automated triage — may be imperfect; a maintainer takes the next look.