Skip to content

Merge system tests for CloudSQLExportInstanceOperator into one test#33315

Merged
potiuk merged 1 commit intoapache:mainfrom
lwyszomi:cloudsql-sys-fix
Aug 13, 2023
Merged

Merge system tests for CloudSQLExportInstanceOperator into one test#33315
potiuk merged 1 commit intoapache:mainfrom
lwyszomi:cloudsql-sys-fix

Conversation

@VladaZakharova
Copy link
Copy Markdown
Contributor

This pr merges 2 system tests for CloudSQL into one.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.


INSTANCE_NAME = f"{DAG_ID}-{ENV_ID}-instance"
DB_NAME = f"{DAG_ID}-{ENV_ID}-db"
INSTANCE_NAME = f"{DAG_ID}-{ENV_ID}-instance".replace("_", "-")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

May I know why do we need these replace("_", "-"). It seems to be {DAG_ID}-{ENV_ID}-instance on the deferrable side as well

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thre cannot be _ in the instance name I believe (and I think the change to deferrable is coming as well :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you for taking a look on this PR!
You are right, the name of the instance is valid only if consists of dashes and letters only, in this case.
As this PR combines 2 system tests into one, the deferrable and sync mode are combined in one file, so created instance will be used in both cases (def and sync)

@potiuk potiuk merged commit de780e0 into apache:main Aug 13, 2023
ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants