fat-catTW commented on PR #72715:
URL: https://github.com/apache/airflow/pull/72715#issuecomment-5932440540
I have updated the implementation to reuse `DagPriorityParsingRequest`
instead of adding refresh-generation state to `DagBundleModel`.
The updated flow is:
- `POST /api/v2/dagBundles/{bundle_name}/refresh` persists a
`DagPriorityParsingRequest` with `relative_fileloc=None`.
- `relative_fileloc=None` represents a bundle-wide refresh, while a non-null
value retains the existing file-level priority parsing behavior.
- When a Dag processor claims the request, it marks the bundle for a forced
refresh, bypasses the normal refresh interval, and consumes the request.
- The endpoint returns `202 Accepted` once the request is persisted. It does
not indicate that the refresh or Dag parsing has completed.
With multiple Dag processors, only one processor claims the request. For
versioned bundles, other processors detect the updated database version and
refresh through the existing mechanism. For non-versioned bundles, they cannot
detect the update through a version change and will refresh at their normal
interval.
This PR preserves the existing non-versioned behavior. Please let me know if
this API should instead trigger an immediate refresh on every Dag processor.
--
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]