Rename Neptune operator db_cluster_id argument to cluster_id - #70491
Rename Neptune operator db_cluster_id argument to cluster_id#70491mitre88 wants to merge 1 commit into
Conversation
|
Since this is breaking either way, maybe it’s easier to rename the argument instead? |
16f3351 to
3325b40
Compare
|
Good point — reworked the PR to rename the argument instead: the constructor now takes Drafted-by: Claude Code (Fable 5) (no human review before posting) |
vincbeck
left a comment
There was a problem hiding this comment.
This can be treated as a bug fix, I dont think we need a major version bump for this one
o-nikolas
left a comment
There was a problem hiding this comment.
To me it feels more correct to change the template field names, not the argument itself in the constructor. But it I wont die on that hill if everyone else things otherwise
3325b40 to
8d66934
Compare
0b8d7b2 to
3f4f1e8
Compare
I believe this is more AWS decision how you want to play this. Probably the merge click is waiting for the team to decide if you are happy with it as is or would you like to ask author to change approach. |
Rebased onto current main after apache#70485 removed the SageMaker exemptions. Constructor args now match the templated cluster_id attribute; Neptune provision-check exemptions are dropped accordingly.
3f4f1e8 to
bc34de5
Compare
I agree with Niko, can we change the template field instead? |
Part of the template-field validation burn-down tracked in #70296.
NeptuneStartDbClusterOperatorandNeptuneStopDbClusterOperatordeclarecluster_idintemplate_fieldsbut expose the value as thedb_cluster_idconstructor argument, assigningself.cluster_id = db_cluster_idin__init__— which thevalidate-operators-initcheck flags. Per review feedback, this renames the argument tocluster_id(rather than renaming the attribute as in the first iteration of this PR), so the templated attribute andtemplate_fieldsentry stay exactly as they are on main and existing Dags templating the attribute are unaffected.Breaking change: Dags passing
db_cluster_id=to these two operators must switch tocluster_id=, and now fail loudly with aTypeErrorat construction time. A note was added to the provider changelog. Thedb_cluster_idkeys in the operators' XCom return values and in the Neptune trigger/hook APIs are unchanged.Both classes are removed from the exemption list and the
validate-operators-initcheck passes locally, as do the unit tests.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5) following the guidelines