You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ephraimbuddy (via GitHub)" <gi...@apache.org> on 2025/06/23 12:10:09 UTC
[PR] Fix Error when viewing Dag details of a no longer configured bundle [airflow]
ephraimbuddy opened a new pull request, #52086:
URL: https://github.com/apache/airflow/pull/52086
When a dag bundle is no longer configured, we raise error when accessing the dagbundle view url. This affects the UI and the fix I propose is to catch this error and return a message instead indicating that the bundle is no longer configured
Maybe we should be saving the view_url in the database?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Error when viewing Dag details of a no longer configured bundle [airflow]
Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham commented on code in PR #52086:
URL: https://github.com/apache/airflow/pull/52086#discussion_r2162260371
##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_versions.py:
##########
@@ -41,7 +41,10 @@ class DagVersionResponse(BaseModel):
@property
def bundle_url(self) -> str | None:
if self.bundle_name:
- return DagBundlesManager().view_url(self.bundle_name, self.bundle_version)
+ try:
+ return DagBundlesManager().view_url(self.bundle_name, self.bundle_version)
+ except ValueError:
+ return "No link since this bundle is no longer configured"
Review Comment:
That's not a very good url :) We should just return None.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Error when viewing Dag details of a no longer configured bundle [airflow]
Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham commented on code in PR #52086:
URL: https://github.com/apache/airflow/pull/52086#discussion_r2162400010
##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_versions.py:
##########
@@ -41,7 +41,10 @@ class DagVersionResponse(BaseModel):
@property
def bundle_url(self) -> str | None:
if self.bundle_name:
- return DagBundlesManager().view_url(self.bundle_name, self.bundle_version)
+ try:
+ return DagBundlesManager().view_url(self.bundle_name, self.bundle_version)
+ except ValueError:
+ return "No link since this bundle is no longer configured"
Review Comment:
I think that solves one problem and causes another - what if I need to move my git repo, for example?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Error when viewing Dag details of a no longer configured bundle [airflow]
Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy merged PR #52086:
URL: https://github.com/apache/airflow/pull/52086
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Error when viewing Dag details of a no longer configured bundle [airflow]
Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on code in PR #52086:
URL: https://github.com/apache/airflow/pull/52086#discussion_r2162367792
##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_versions.py:
##########
@@ -41,7 +41,10 @@ class DagVersionResponse(BaseModel):
@property
def bundle_url(self) -> str | None:
if self.bundle_name:
- return DagBundlesManager().view_url(self.bundle_name, self.bundle_version)
+ try:
+ return DagBundlesManager().view_url(self.bundle_name, self.bundle_version)
+ except ValueError:
+ return "No link since this bundle is no longer configured"
Review Comment:
Do you think we should save urls in the db so we can easily pull it out in situation like this?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org