Quick fix for provider flag ordering (#7412)
* specify plugin arguments before other flags * Ignore these pesky flags in python provider.main Co-authored-by: evanboyle <evan@pulumi.com>
This commit is contained in:
parent
18401c88b9
commit
36d11261c6
|
@ -280,6 +280,7 @@ func newPlugin(ctx *Context, pwd, bin, prefix string, args, env []string, option
|
|||
// execPlugin starts the plugin executable.
|
||||
func execPlugin(bin string, pluginArgs []string, pwd string, env []string) (*plugin, error) {
|
||||
var args []string
|
||||
args = append(args, pluginArgs...)
|
||||
// Flow the logging information if set.
|
||||
if logging.LogFlow {
|
||||
if logging.LogToStderr {
|
||||
|
@ -293,7 +294,6 @@ func execPlugin(bin string, pluginArgs []string, pwd string, env []string) (*plu
|
|||
if cmdutil.TracingEndpoint != "" && !cmdutil.TracingToFile {
|
||||
args = append(args, "--tracing", cmdutil.TracingEndpoint)
|
||||
}
|
||||
args = append(args, pluginArgs...)
|
||||
|
||||
cmd := exec.Command(bin, args...)
|
||||
cmdutil.RegisterProcessGroup(cmd)
|
||||
|
|
|
@ -189,6 +189,9 @@ def main(provider: Provider, args: List[str]) -> None: # args not in use?
|
|||
|
||||
argp = argparse.ArgumentParser(description='Pulumi provider plugin (gRPC server)')
|
||||
argp.add_argument('engine', help='Pulumi engine address')
|
||||
argp.add_argument('--logflow', action='store_true', help='Currently ignored')
|
||||
argp.add_argument('--logtostderr', action='store_true', help='Currently ignored')
|
||||
|
||||
engine_address: str = argp.parse_args().engine
|
||||
|
||||
async def serve() -> None:
|
||||
|
|
|
@ -892,6 +892,8 @@ func optsForConstructNode(t *testing.T, expectedResourceCount int, env ...string
|
|||
},
|
||||
Quick: true,
|
||||
NoParallel: true,
|
||||
// verify that additional flags don't cause the component provider hang
|
||||
UpdateCommandlineFlags: []string{"--logflow", "--logtostderr"},
|
||||
ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) {
|
||||
assert.NotNil(t, stackInfo.Deployment)
|
||||
if assert.Equal(t, expectedResourceCount, len(stackInfo.Deployment.Resources)) {
|
||||
|
|
Loading…
Reference in a new issue