Jorricks commented on code in PR #26457:
URL: https://github.com/apache/airflow/pull/26457#discussion_r1016441179


##########
airflow/www/static/js/api/useDatasetEvents.ts:
##########
@@ -30,7 +30,7 @@ export default function useDatasetEvents({
   const query = useQuery(
     ['datasets-events', datasetId, sourceDagId, sourceRunId, sourceTaskId, 
sourceMapIndex, limit, offset, orderBy],
     () => {
-      const datasetsUrl = getMetaValue('dataset_events_api') || 
'/api/v1/datasets/events';
+      const datasetsUrl = getMetaValue('dataset_events_api');

Review Comment:
   Because we get the urls from the `html` file. If these are not working, 
there is no reason for this single endpoint to keep working while all others 
(that don't have this 'else' in there) fail. Also, now we need to maintain the 
API route twice instead of once, so it's neater to remove it IMO.



##########
airflow/www/static/js/api/useDatasetEvents.ts:
##########
@@ -30,7 +30,7 @@ export default function useDatasetEvents({
   const query = useQuery(
     ['datasets-events', datasetId, sourceDagId, sourceRunId, sourceTaskId, 
sourceMapIndex, limit, offset, orderBy],
     () => {
-      const datasetsUrl = getMetaValue('dataset_events_api') || 
'/api/v1/datasets/events';
+      const datasetsUrl = getMetaValue('dataset_events_api');

Review Comment:
   Because we get the urls from the `html` file using the getMetaValue. 
   
   If these are not working, there is no reason for this single endpoint to 
keep working while all others (that don't have this 'else' in there) fail. 
Also, now we need to maintain the API route twice instead of once, so it's 
neater to remove it IMO.



-- 
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