Repository navigation
Keep masked Variable values when saving an edited Variable - #76012
Merged
pierrejeambrun merged 2 commits intoNov 2, 2026
Merged
Conversation
hkc-8010
marked this pull request as ready for review
October 30, 2026 06:32
hkc-8010
requested review from
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
jason810496,
pierrejeambrun,
rawwar and
shubhamraj-git
as code owners
October 30, 2026 06:32
Member
|
@pierrejeambrun @bbovenzi I thought we fixed this a while back already? It def rings a bell. |
yuseok89
reviewed
Oct 30, 2026
yuseok89
left a comment
Contributor
There was a problem hiding this comment.
Left one small note inline.
Contributor
|
I think #53943 might be the similar fix, for Connections. |
Contributor
|
Yes, it looks like we fixed for connections but not variables. |
kaxil
approved these changes
Nov 1, 2026
closes: apache#76011 Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
hkc-8010
force-pushed
the
fix/variable-patch-masked-merge
branch
from
November 2, 2026 03:51
d18e4f1 to
da1cfd6
Compare
1 task done
Contributor
Backport successfully created: v3-4-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
pierrejeambrun
pushed a commit
that referenced
this pull request
Nov 3, 2026
#76012) (#76308) * Keep masked Variable values when saving an edited Variable closes: #76011 * Restore masked values at any depth and keep Variable JSON layout --------- (cherry picked from commit ffd9a2d) Co-authored-by: Hemkumar Chheda <95332229+hkc-8010@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
vatsrahul1001
pushed a commit
that referenced
this pull request
Nov 4, 2026
#76012) (#76308) * Keep masked Variable values when saving an edited Variable closes: #76011 * Restore masked values at any depth and keep Variable JSON layout --------- (cherry picked from commit ffd9a2d) Co-authored-by: Hemkumar Chheda <95332229+hkc-8010@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
1 of 2 tasks
1 task done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Saving a Variable from the UI edit form writes the literal
***over every sensitive field in it, because the form is filled from the redactedVariableResponseand the PATCH path stores the body as sent. Connections avoid this by runningsecrets_masker.merge()on update; this does the same for Variables.update_orm_from_pydanticinservices/public/variables.pyis shared byPATCH /variables/{key}and the bulkupdateaction, so the merge goes there and covers both. It runs only whenvalueis actually being updated (respectsupdate_mask).db_password) and sensitive fields at any depth are both restored, matching howredact_valmasks them. If nothing was restored the value is stored exactly as sent, formatting included.***on a sensitive key keeps the stored string.Same limits as the Connections path, unchanged here: a sensitive field cannot be set to the literal
***, and a value masked only because it matches a registered secret (not by key name) is not restored.Tests: four masked shapes round-tripped through GET then PATCH, a mixed edit (one secret changed, one field added, other secrets untouched), and the bulk update path. All six fail on main with the stored value replaced by
***. Fulltest_variables.pypasses on Python 3.11 and 3.14.closes: #76011
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code following the guidelines