Skip to content

Differentiate between cmd input and model input exclusivity#507

Closed
ahokinson wants to merge 1 commit intodependabot:mainfrom
ahokinson:fix/input-types
Closed

Differentiate between cmd input and model input exclusivity#507
ahokinson wants to merge 1 commit intodependabot:mainfrom
ahokinson:fix/input-types

Conversation

@ahokinson
Copy link

In #506, I noticed that parsing flags and model input to the Dependabot job had some scenarios that collide.

This fix ignores the -f or --file flags when deciding if the command hasArguments because this would mean hasFile was specified by these arguments, and therefore should only check for additional arguments. There might be some more idiomatic way to do this...

I also excluded hasServer from the args checker because it also collides with hasArguments.

Still need to address how Model Input is created from these new possible scenarios.

Would love feedback, @jakecoffman.

@ahokinson ahokinson requested review from a team as code owners September 4, 2025 14:14
Copy link
Member

@jakecoffman jakecoffman left a comment

Choose a reason for hiding this comment

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

The CLI arguments, e.g. dependabot update go_modules dependabot/cli, are meant as a shortcut to providing an input file. It makes it easier to share an issue reproduction, or someone new to Dependabot can get started right away.

The rest of the input methods are all ways to pass a single input job file and should be mutually exclusive. If not, we'd have to merge them all together and arbitrarily decide order of importance.

Can you tell me a bit more about what problem you're trying to solve?

@ahokinson
Copy link
Author

So I can clarify two things, what I am trying to fix here and what I am experiencing in my own use of the CLI.

What I am trying to fix with this PR:
Using the --input-port flag doesn't work. By specifying it via the cmd flag, you trigger hasArguments and hasServer. And then it errors out.

What I experiencing trying to use the CLI:
I have been trying to run the CLI in a secure environment. It typically bails out in the way mentioned in the README, but I am not on WSL. I am using Mac.
#377 (comment)

In order to debug my own problems, I have been trying to play with flags to add control to how the containers communicate with each other. The --api-url flag seemed like the right thing to play with, and I attempted to use --input-port to further control this, which is where I discovered the problem with the flag.

@jakecoffman
Copy link
Member

Ah ok, the different flag names are a bit confusing here. --input-port is unrelated to the API server the CLI starts up to intercept the calls from the Updater. It only triggers this listener, which expects an input file.

The API server you are having trouble with in #377 gets its settings from environment variables.

I will close this and respond in #377 with some things you can try in a bit.

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