Repository navigation
[backport-0.21] core: resolve GitRepository and GitRef user defaults - #15155
Merged
marcosnils merged 1 commit intoNov 11, 2026
Merged
Conversation
vito
approved these changes
Nov 11, 2026
An object user default resolves its address through the Address field named after the type. The field name was the type name in lower case, so GitRepository and GitRef defaults selected gitrepository and gitref, which do not exist, and failed with "Address has no such field". Use the camel-cased field name, as main does since 79cf408. Signed-off-by: Marcos Lilljedahl <[email protected]>
marcosnils
force-pushed
the
backport-0.21-git-user-defaults
branch
from
November 11, 2026 16:47
a21dcac to
4af96f2
Compare
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.
Reply by Claude, reviewed by Marcos
On 0.21, setting a
GitRepositoryorGitRefargument from.envfails, while passing the same value as a flag works:An object user default is resolved through the
Addressfield named after its type. The field name was built withstrings.ToLower(typename), which is only correct for one-word types such asSecret,FileandDirectory. ForGitRepositoryandGitRefit selectedgitrepositoryandgitrefinstead ofgitRepositoryandgitRef. The same resolution serves workspace config settings.This uses
gqlFieldName(typename), asmainhas done since 79cf408. That change was part of the workspace artifacts work and was never backported.Testing
TestUserDefaults/TestRemoteGitRepositoryandTestUserDefaults/TestRemoteGitRefset aGitRepositoryand aGitReffrom.env, pinned to a fixed commit ofdagger-test-modules.Address has no such field: "gitrepository"/"gitref".FileandDirectorytests: