jedcunningham commented on code in PR #48477:
URL: https://github.com/apache/airflow/pull/48477#discussion_r2019706648


##########
airflow-core/tests/unit/models/test_taskinstance.py:
##########
@@ -4122,7 +4122,7 @@ def first_asset_task(*, outlet_events):
 
             first_asset_task()
 
-        with dag_maker(schedule=None, serialized=True, session=session):
+        with dag_maker(schedule=None, serialized=False, session=session):

Review Comment:
   As part of this PR, I fixed dag_maker to create more than 1 serdag record. 
So these 2 tests will now try to create 2 serdag records, but during the second 
one, I get this:
   
   ```
   E   sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) 
duplicate key value violates unique constraint "idx_asset_active_name_unique"
   E   DETAIL:  Key (name)=(asset_first) already exists.
   E
   E   [SQL: INSERT INTO asset_active (name, uri) VALUES (%(name)s, %(uri)s)]
   E   [parameters: {'name': 'asset_first', 'uri': 'test://asset/'}]
   ```
   
   And, if I turn off serialization for the second one (restore the old 
behavior), it passes.
   
   I don't really understand these tests either - how can these 2 assets be 
inactive if they are in the latest parse of the DAG?
   
   I'm temped to put a skip on them, thoughts?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to