Skip to content

Conversation

@vandonr-amz
Copy link
Contributor

@vandonr-amz vandonr-amz commented Jul 5, 2023

This is something that we are deprecating, and deferrable mode is a new feature, so by definition it cannot break any existing workflow. Thus, I don't think we need to support that obsolete feature in new code.

Also added a region_name param to the base rds operator.

This is something that we are deprecating, and deferrable mode is a new feature, so by definition it cannot break any existing workflow.
Thus, I don't think we need to support that obsolete feature in new code.
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Jul 5, 2023
@ferruzzi
Copy link
Contributor

ferruzzi commented Jul 5, 2023

@syedahsn you just added those lines last week, are you good with this?

Assuming he is cool with it, the code itself LGTM

AirflowProviderDeprecationWarning,
stacklevel=3, # 2 is in the operator's init, 3 is in the user code creating the operator
)
self.hook_params = hook_params or {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if someone wants to pass something like region_name to the hook? This is a fairly common use case, and there is no reason to exclude that from being used in deferrable operators.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bunch of operators that don't allow passing a region at all, like the sagemaker operators, DMS, etc.

If we want users to be able to pass a region, I think we should add that as an explicit parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed a change to that effect.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something we might want to think about actually. In which case a user might want to specify another region? Regions are set as part of connections. That means, a user set regionA in its connection, hence targeting this regions for all AWS calls but would want to target another region for a specific operator? I think that can be done by using another connection then (and then using the param aws_conn_id). WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't exactly know how that works in practice... I suppose you'd have a "main" region where you do the heavy lifting (sagemaker stuff for instance), but you'd have DBs in various regions, and you'd like to be able to hit those without having to change too much stuff ?
Are you saying that the region param should be obsoleted everywhere in the AWS provider in favor of several connection ids ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels duplicate to me ... But that's my developer opinion, I can understand, as a user, just passing a region as parameter is easier than creating a new connection. Maybe a question for @shubham22

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bunch of operators that don't allow passing a region at all, like the sagemaker operators, DMS, etc.

I agree with you here, but in the interest of keeping things backwards compatible, if a particular operator allows passing region config, then we should continue that or if we want to stop supporting that, then we would need to go through the whole deprecating process.
At this point, I don't know how you want to proceed though :p

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just passing a region as parameter is easier than creating a new connection

I agree with this. I haven't had direct conversation on this with customers, but I would assume this is commonly done. Yes, many operators do not support it today and may be some users might request for them in the future. In any case, we shouldn't take it away if it is supported until and unless we think it is causing some other problems.

@vandonr-amz
Copy link
Contributor Author

vandonr-amz commented Jul 6, 2023

Since RC2 has been bundled, this PR is now moot because it becomes a breaking change :/
I'll see what we can do given the new state of things.

@eladkal
Copy link
Contributor

eladkal commented Jul 6, 2023

Since RC2 has been bundled, this PR is now moot because it becomes a breaking change :/ I'll see what we can do given the new state of things.

For the moment I suggest to wait till vote is over.
In case we will have RC3

@vincbeck vincbeck merged commit 869f3a9 into apache:main Jul 7, 2023
@vincbeck
Copy link
Contributor

vincbeck commented Jul 7, 2023

Amazon provider package is excluded from RC2, therefore we can merge it. See #32389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants