Re: [PR] feat(asset): change asset inactive warning to log Asset instead of AssetModel [airflow]
Lee-W merged PR #44836: URL: https://github.com/apache/airflow/pull/44836 -- 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]
Re: [PR] feat(asset): change asset inactive warning to log Asset instead of AssetModel [airflow]
Lee-W commented on code in PR #44836:
URL: https://github.com/apache/airflow/pull/44836#discussion_r1881401242
##
tests/jobs/test_scheduler_job.py:
##
@@ -6319,10 +6319,10 @@ def
test_activate_referenced_assets_with_no_existing_warning(self, session):
)
)
assert dag_warning.message == (
-'Cannot activate asset AssetModel(name="it\'s also a duplicate",'
-" uri='s3://bucket/key/1', extra={'foo': 'bar'}); uri is already
associated to 'asset1'\n"
-"Cannot activate asset AssetModel(name='asset1', uri"
-"=\"it's duplicate\", extra={'foo': 'bar'}); name is already
associated to 's3://bucket/key/1'"
+'Cannot activate asset Asset(name="it\'s also a duplicate",'
+" uri='s3://bucket/key/1', group='asset', extra={'foo': 'bar'},
watchers=[]); uri is already associated to 'asset1'\n"
Review Comment:
Yep, I'm thinking of the same. Let me rewrite the message
--
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]
Re: [PR] feat(asset): change asset inactive warning to log Asset instead of AssetModel [airflow]
uranusjr commented on code in PR #44836:
URL: https://github.com/apache/airflow/pull/44836#discussion_r1881384167
##
tests/jobs/test_scheduler_job.py:
##
@@ -6319,10 +6319,10 @@ def
test_activate_referenced_assets_with_no_existing_warning(self, session):
)
)
assert dag_warning.message == (
-'Cannot activate asset AssetModel(name="it\'s also a duplicate",'
-" uri='s3://bucket/key/1', extra={'foo': 'bar'}); uri is already
associated to 'asset1'\n"
-"Cannot activate asset AssetModel(name='asset1', uri"
-"=\"it's duplicate\", extra={'foo': 'bar'}); name is already
associated to 's3://bucket/key/1'"
+'Cannot activate asset Asset(name="it\'s also a duplicate",'
+" uri='s3://bucket/key/1', group='asset', extra={'foo': 'bar'},
watchers=[]); uri is already associated to 'asset1'\n"
Review Comment:
I think this is too much. `name` and `uri` are obviously required; group is
_probably_ useful, but the rest are likely not useful.
--
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]
Re: [PR] feat(asset): change asset inactive warning to log Asset instead of AssetModel [airflow]
Lee-W commented on code in PR #44836:
URL: https://github.com/apache/airflow/pull/44836#discussion_r1880247948
##
tests/jobs/test_scheduler_job.py:
##
@@ -6319,10 +6319,10 @@ def
test_activate_referenced_assets_with_no_existing_warning(self, session):
)
)
assert dag_warning.message == (
-'Cannot activate asset AssetModel(name="it\'s also a duplicate",'
-" uri='s3://bucket/key/1', extra={'foo': 'bar'}); uri is already
associated to 'asset1'\n"
-"Cannot activate asset AssetModel(name='asset1', uri"
-"=\"it's duplicate\", extra={'foo': 'bar'}); name is already
associated to 's3://bucket/key/1'"
+'Cannot activate asset Asset(name="it\'s also a duplicate",'
+" uri='s3://bucket/key/1', group='asset', extra={'foo': 'bar'},
watchers=[]); uri is already associated to 'asset1'\n"
Review Comment:
This is the warning the user will see. I'm actually ok; just not sure
whether it provider too much information 🤔
--
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]
Re: [PR] feat(asset): change asset inactive warning to log Asset instead of AssetModel [airflow]
ephraimbuddy commented on code in PR #44836:
URL: https://github.com/apache/airflow/pull/44836#discussion_r188024
##
tests/jobs/test_scheduler_job.py:
##
@@ -6319,10 +6319,10 @@ def
test_activate_referenced_assets_with_no_existing_warning(self, session):
)
)
assert dag_warning.message == (
-'Cannot activate asset AssetModel(name="it\'s also a duplicate",'
-" uri='s3://bucket/key/1', extra={'foo': 'bar'}); uri is already
associated to 'asset1'\n"
-"Cannot activate asset AssetModel(name='asset1', uri"
-"=\"it's duplicate\", extra={'foo': 'bar'}); name is already
associated to 's3://bucket/key/1'"
+'Cannot activate asset Asset(name="it\'s also a duplicate",'
+" uri='s3://bucket/key/1', group='asset', extra={'foo': 'bar'},
watchers=[]); uri is already associated to 'asset1'\n"
Review Comment:
Looks ok to keep them if the group could be something else. Since this is a
test, you can keep them
--
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]
Re: [PR] feat(asset): change asset inactive warning to log Asset instead of AssetModel [airflow]
Lee-W commented on code in PR #44836:
URL: https://github.com/apache/airflow/pull/44836#discussion_r1879597725
##
tests/jobs/test_scheduler_job.py:
##
@@ -6319,10 +6319,10 @@ def
test_activate_referenced_assets_with_no_existing_warning(self, session):
)
)
assert dag_warning.message == (
-'Cannot activate asset AssetModel(name="it\'s also a duplicate",'
-" uri='s3://bucket/key/1', extra={'foo': 'bar'}); uri is already
associated to 'asset1'\n"
-"Cannot activate asset AssetModel(name='asset1', uri"
-"=\"it's duplicate\", extra={'foo': 'bar'}); name is already
associated to 's3://bucket/key/1'"
+'Cannot activate asset Asset(name="it\'s also a duplicate",'
+" uri='s3://bucket/key/1', group='asset', extra={'foo': 'bar'},
watchers=[]); uri is already associated to 'asset1'\n"
Review Comment:
not sure whether we should drop group, and watcher in the message 🤔
--
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]
