Skip to content

Conversation

@uranusjr
Copy link
Member

Real-world tests needed.

@uranusjr

This comment has been minimized.

@potiuk

This comment has been minimized.

@uranusjr

This comment has been minimized.

@uranusjr uranusjr force-pushed the xcom-run-id branch 4 times, most recently from 3d93fe2 to dbc24bb Compare January 24, 2022 13:50
@uranusjr

This comment has been minimized.

@uranusjr
Copy link
Member Author

Nice, MySQL is now failing on the same places as Postgres. SQLite fails just a few more (it’s complaining about unique constraint violation not happening on other backends, not sure why). MSSQL is complaining about the key in x.key being a reserved word; I guess I need to find a good way to quote it.

@ashb

This comment has been minimized.

@uranusjr

This comment has been minimized.

@ashb

This comment has been minimized.

@uranusjr uranusjr force-pushed the xcom-run-id branch 2 times, most recently from df2133a to 3e28291 Compare February 1, 2022 11:36
@uranusjr

This comment has been minimized.

@uranusjr uranusjr force-pushed the xcom-run-id branch 3 times, most recently from 60e419d to 54e6cb7 Compare February 3, 2022 13:46
@uranusjr
Copy link
Member Author

uranusjr commented Feb 3, 2022

Marking this as ready since all failing tests are from main. This does not break anything.

@uranusjr uranusjr marked this pull request as ready for review February 3, 2022 14:26
@ashb
Copy link
Member

ashb commented Feb 15, 2022

Static checks are fixed in main.

This works around MySQL's index size limit.
The pk that makes the most sense, (key, dag_id, task_id, run_id), goes
over MySQL's index length limit, so we need so find an alternative way
to enforce uniqueness. DagRun.id replaces (dag_id, run_id) and allows us
to stay under the limit.
I don't know why it worked previously, but I know it works now.
This allows the query to make use of SQLAlchemy's keyword quoting logic
so we can correctly handle quote differences between different database
implementations (I'm looking at you, MySQL and Microsoft SQL Server).
This seems to be needed now.
@uranusjr uranusjr merged commit 0ebd642 into apache:main Feb 16, 2022
@uranusjr uranusjr deleted the xcom-run-id branch February 16, 2022 02:47
@alexott
Copy link
Contributor

alexott commented Feb 20, 2022

This change lead to failing migrations because I had several DAGs with the same task name, but different DAG names. Should be xcom results be identified by DAG name as well?

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

Labels

AIP-39 Timetables area:dynamic-task-mapping AIP-42 full tests needed We need to run full set of tests for this PR to merge type:improvement Changelog: Improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants