Skip to content

Allow secrets references within config repos that dont share a material with any pipeline#13232

Merged
chadlwilson merged 2 commits intogocd:masterfrom
chadlwilson:fix-config-repo-secrets-lookup
Nov 3, 2024
Merged

Allow secrets references within config repos that dont share a material with any pipeline#13232
chadlwilson merged 2 commits intogocd:masterfrom
chadlwilson:fix-config-repo-secrets-lookup

Conversation

@chadlwilson
Copy link
Member

@chadlwilson chadlwilson commented Nov 2, 2024

Per the discussion at https://groups.google.com/g/go-cd/c/JlzHTa-Vy_0/m/EvpRpsofBwAJ secrets resolution fails within the password of a config repo material which it is not used by any pipelines.

If you add a single pipeline that uses the material it works, so this change makes things consistent, and improves the error messages somewhat.

There is a separate question about whether config repos should be able to refer to arbitrary secrets, however it is still an admin function to manage such repos so this should be relatively safe.

Separately, its noted that "test connection" for pipeline materials resolves secrets but does not attempt to validate whether a Pipeline should be allowed to use that secret, as should happen at runtime - however that is not addressed here.

This allows resolution to work for materials in config repos that aren't used elsewhere by pipelines.
@chadlwilson chadlwilson added this to the Release 24.4.0 milestone Nov 2, 2024
@chadlwilson chadlwilson changed the title Don't fail reference validation if a material is unused by any pipeline Allow secrets references within config repos that dont share a material with any pipeline Nov 2, 2024
Clarifies that some materials are used only by configuration repos, not pipelines. Also logs a single line at info level so anything
complete unexpected can be checked after the fact. Currently the root causes can be swallowed if the exception has no message.
@chadlwilson chadlwilson marked this pull request as ready for review November 3, 2024 06:37
@chadlwilson chadlwilson merged commit 652f3b4 into gocd:master Nov 3, 2024
@chadlwilson chadlwilson deleted the fix-config-repo-secrets-lookup branch November 3, 2024 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant