pipe-cd / pipecd

The One CD for All {applications, platforms, operations}
https://pipecd.dev
Apache License 2.0
1.09k stars 153 forks source link

Enable more options to control piped planpreview render behavior #5275

Open khanhtc1202 opened 1 month ago

khanhtc1202 commented 1 month ago

What would you like to be added:

We have a bunch of options to control the piped plan preview handler, but not all of them are in use now

        h := planpreview.NewHandler(
            gc,
            apiClient,
            commandLister,
            applicationLister,
            lastTriggeredCommitGetter,
            decrypter,
            appManifestsCache,
            cfg,
            planpreview.WithLogger(input.Logger),
        )

across piped.go (ref: https://github.com/pipe-cd/pipecd/blob/master/pkg/app/piped/cmd/piped/piped.go#L522-L532)

Here is where we define the options ref: https://github.com/pipe-cd/pipecd/blob/master/pkg/app/piped/planpreview/handler.go#L35-L40 ref: https://github.com/pipe-cd/pipecd/blob/master/pkg/app/piped/planpreview/handler.go#L35-L40

Why is this needed:

It is better to make the users tunning the piped plan preview behavior with their parameter than just using the default settings, and we defined it already as well, so better to make it in use.