Skip to content
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

SUP-1761 Implement local config pipeline resolver func #234

Merged
merged 17 commits into from
Apr 30, 2024

Conversation

lizrabuya
Copy link
Contributor

@lizrabuya lizrabuya commented Apr 30, 2024

This PR implements a pipeline resolver function that searchers for a local config file .bk.yaml. When more than one pipelines are found in the local config, a selection list of pipelines will be prompted to the user

Not implemented in the PR:

  • Updating default pipeline selection

Tests

  • Local config <-- currently only includes reading config
  • Config pipeline resolver <-- currently skipped as tests get blocked with the pipeline selection prompt

@lizrabuya lizrabuya marked this pull request as ready for review April 30, 2024 05:10
Copy link
Contributor

@jradtilbrook jradtilbrook left a comment

Choose a reason for hiding this comment

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

I think looks good, but the order of the resolvers seems wrong. I think we want to use the config file before we try use the API

@@ -41,6 +41,7 @@ func NewCmdBuildView(f *factory.Factory) *cobra.Command {
resolvers := resolver.NewAggregateResolver(
resolver.ResolveFromPositionalArgument(args, 1, f.Config),
resolver.ResolveFromPath("", f.Config.Organization, f.RestAPIClient),
resolver.ResolveFromConfig(f.LocalConfig),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want these above the ResolveFromPath

Copy link
Contributor

Choose a reason for hiding this comment

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

Need to apply this to all the commands

Copy link
Contributor Author

Choose a reason for hiding this comment

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

missed to save the other commands and didn't double check the commit 😓

@lizrabuya lizrabuya merged commit 00d6725 into 3.x Apr 30, 2024
1 check passed
@lizrabuya lizrabuya deleted the local-config-resolver-fn branch April 30, 2024 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants