-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Refactor bundle view_url to not instaniate bundle on server components #52876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ephraimbuddy
merged 33 commits into
apache:main
from
astronomer:template-bundle-view-url
Jul 31, 2025
Merged
Refactor bundle view_url to not instaniate bundle on server components #52876
ephraimbuddy
merged 33 commits into
apache:main
from
astronomer:template-bundle-view-url
Jul 31, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d37dbf1 to
a901004
Compare
ashb
reviewed
Jul 4, 2025
ashb
reviewed
Jul 4, 2025
airflow-core/src/airflow/migrations/versions/0075_3_1_0_add_url_and_template_params_to_.py
Outdated
Show resolved
Hide resolved
ashb
reviewed
Jul 4, 2025
8da6ab7 to
f7c87a8
Compare
1 task
1bd04af to
c6561d1
Compare
Contributor
Author
|
One thing to note while reviewing is that only 'http' and 'https' protocol are accepted for view_url_template. Let me know if this should be expanded |
5a5e7b5 to
157ada0
Compare
Member
pierrejeambrun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we probably want another pair of eyes as this PR is quite big. (easy to miss something)
…can't unsign a url
a1e103d to
5bf2505
Compare
RoyLee1224
pushed a commit
to RoyLee1224/airflow
that referenced
this pull request
Jul 31, 2025
apache#52876) * Refactor bundle view_url to not instaniate bundle on server components This refactor introduces a view_url_template in bundle configuration which is saved in the db and rendered when needed. The url is signed with [api]secret_key for security. Also the view_url_template is also checked for safety before saving to the DB * fixup! Refactor bundle view_url to not instaniate bundle on server components * Rename bundle url to url_template and fix backcompat * Refactor render_url to not depend on dagbundlemodel version * Render view_url_template in view_url * fixup! Render view_url_template in view_url * Add deprecation warning and update s3 bundle with view_url_template * fixup! Add deprecation warning and update s3 bundle with view_url_template * Remove deprecation warning in provider's view_url * fixup! Remove deprecation warning in provider's view_url * fixup! fixup! Remove deprecation warning in provider's view_url * Add backcompat for bundles vs airflow releases * fixup! Add backcompat for bundles vs airflow releases * rename url_template to signed_url_template. Also return None when we can't unsign a url * refactor template signing * fixup! refactor template signing * Fix templating and conflict * Fix backcompat & refactor template signing * fixup! Fix backcompat & refactor template signing * fixup! fixup! Fix backcompat & refactor template signing * skip some test if not airflow 3.1+ * fixup! skip some test if not airflow 3.1+ * fixup! fixup! skip some test if not airflow 3.1+ * Resolve conflict * Add version to be removed for deprecated view_url * Remove template_fields and use regex to extract placeholders * Fix conflict * fixup! Remove template_fields and use regex to extract placeholders * Remove added deadline in dag details * Update docs * Remove ; from url safety check * Log url sanity check errors * compile re
ferruzzi
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Aug 7, 2025
apache#52876) * Refactor bundle view_url to not instaniate bundle on server components This refactor introduces a view_url_template in bundle configuration which is saved in the db and rendered when needed. The url is signed with [api]secret_key for security. Also the view_url_template is also checked for safety before saving to the DB * fixup! Refactor bundle view_url to not instaniate bundle on server components * Rename bundle url to url_template and fix backcompat * Refactor render_url to not depend on dagbundlemodel version * Render view_url_template in view_url * fixup! Render view_url_template in view_url * Add deprecation warning and update s3 bundle with view_url_template * fixup! Add deprecation warning and update s3 bundle with view_url_template * Remove deprecation warning in provider's view_url * fixup! Remove deprecation warning in provider's view_url * fixup! fixup! Remove deprecation warning in provider's view_url * Add backcompat for bundles vs airflow releases * fixup! Add backcompat for bundles vs airflow releases * rename url_template to signed_url_template. Also return None when we can't unsign a url * refactor template signing * fixup! refactor template signing * Fix templating and conflict * Fix backcompat & refactor template signing * fixup! Fix backcompat & refactor template signing * fixup! fixup! Fix backcompat & refactor template signing * skip some test if not airflow 3.1+ * fixup! skip some test if not airflow 3.1+ * fixup! fixup! skip some test if not airflow 3.1+ * Resolve conflict * Add version to be removed for deprecated view_url * Remove template_fields and use regex to extract placeholders * Fix conflict * fixup! Remove template_fields and use regex to extract placeholders * Remove added deadline in dag details * Update docs * Remove ; from url safety check * Log url sanity check errors * compile re
fweilun
pushed a commit
to fweilun/airflow
that referenced
this pull request
Aug 11, 2025
apache#52876) * Refactor bundle view_url to not instaniate bundle on server components This refactor introduces a view_url_template in bundle configuration which is saved in the db and rendered when needed. The url is signed with [api]secret_key for security. Also the view_url_template is also checked for safety before saving to the DB * fixup! Refactor bundle view_url to not instaniate bundle on server components * Rename bundle url to url_template and fix backcompat * Refactor render_url to not depend on dagbundlemodel version * Render view_url_template in view_url * fixup! Render view_url_template in view_url * Add deprecation warning and update s3 bundle with view_url_template * fixup! Add deprecation warning and update s3 bundle with view_url_template * Remove deprecation warning in provider's view_url * fixup! Remove deprecation warning in provider's view_url * fixup! fixup! Remove deprecation warning in provider's view_url * Add backcompat for bundles vs airflow releases * fixup! Add backcompat for bundles vs airflow releases * rename url_template to signed_url_template. Also return None when we can't unsign a url * refactor template signing * fixup! refactor template signing * Fix templating and conflict * Fix backcompat & refactor template signing * fixup! Fix backcompat & refactor template signing * fixup! fixup! Fix backcompat & refactor template signing * skip some test if not airflow 3.1+ * fixup! skip some test if not airflow 3.1+ * fixup! fixup! skip some test if not airflow 3.1+ * Resolve conflict * Add version to be removed for deprecated view_url * Remove template_fields and use regex to extract placeholders * Fix conflict * fixup! Remove template_fields and use regex to extract placeholders * Remove added deadline in dag details * Update docs * Remove ; from url safety check * Log url sanity check errors * compile re
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:API
Airflow's REST/HTTP API
area:DAG-processing
area:db-migrations
PRs with DB migration
area:providers
kind:documentation
provider:git
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This refactor introduces a view_url_template in bundle configuration which is saved in the db and rendered when needed. The url is signed with [api]secret_key for security. Also the view_url_template is also checked for safety before saving to the DB