Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

internal/config: Fix panic if no scoped use stanza found #4112

Merged
merged 3 commits into from
Oct 26, 2022

Conversation

briancain
Copy link
Member

@briancain briancain commented Oct 26, 2022

Prior to this commit, if you attempted to use a build, deploy, or release stanza that had a workspace scoped 'use' stanza but you were not using that workspace, Waypoint would panic attempting to evaluate the Use plugin type. This commit fixes that by first looking to see if a Use stanza is defined at all prior to obtaining the Use type.

Fixes #3759

Prior to this commit, if you attempted to use a build, deploy, or
release stanza that had a workspace scoped 'use' stanza but you were not
using that workspace, Waypoint would panic attempting to evaluate the
Use plugin type. This commit fixes that by first looking to see if a Use
stanza is defined at all prior to obtaining the Use type.

Fixes #3759
@briancain briancain added bug Something isn't working pr/no-changelog No automatic changelog entry required for this pull request labels Oct 26, 2022
@briancain briancain requested review from a team, catsby and paladin-devops October 26, 2022 15:26
@github-actions github-actions bot added the core label Oct 26, 2022
@briancain briancain removed the pr/no-changelog No automatic changelog entry required for this pull request label Oct 26, 2022
@briancain
Copy link
Member Author

briancain commented Oct 26, 2022

Actually - I think it makes sense to simply return nothing in the same way we do for no release stanza to support plugins with no releaser. The plugin system ends up handling this for us. Will push that fix instead.

This is to continue to support plugins with no Releaser defined.
@briancain briancain changed the title internal/config: Return err if no scoped use stanza found internal/config: Fix panic if no scoped use stanza found Oct 26, 2022
Copy link
Contributor

@paladin-devops paladin-devops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/0.10.x bug Something isn't working core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Waypoint panic when release stanza scoped or empty
3 participants