-
Notifications
You must be signed in to change notification settings - Fork 429
Support additional codeql options #138
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
Conversation
This has lead to a lot of churn passing variables around. Since all that's saved is reading an environment variable and running
I'm not sure this would be a nicer experience unfortunately. The inputs to actions are only allowed to be stirng values, so you'd still have to have encoded json in a string, in yaml. If the feature is intended to be slightly under the radar then not putting it in the action inputs seems good to me, so keeping it as an environment variable is fine.
I think this is unfortunately likely to be wishful thinking and not possible to enforce in reality. For users who read the code and discover the feature I agree we can be slightly justified in saying we hold no responsibility for it's behaviour and compatibilty. I'm more worried about when setting this option inevitably solves a customer issue, and then we have to keep supporting it because it's used in a customer's production build. |
|
Thanks, but what does this feedback mean for this PR?
Replies
It certainly be a smaller change. But do we want to rely on the command line environment so far away from the command line entry point?
Ah. Good point.
Right. Don't we already have a record of semi-official |
I'm not entirely sure and I don't feel all that strongly either way. I have a slight preference for reading it where needed and avoiding the extra method parameters, but I'm happy to go with whatever you want. My feelings on this are mostly because it's an environment parameter. For this case in particular I don't think reading it deep in the code is a problem. However for things like the action inputs we will have to move those to all be read at the entrypoint. One of things we'll be working towards soon is making this run fully outside of actions and adding a CLI to it. So things that are actions-specific will need to be worked around. I don't think that affects this as it's an environment variable, but I can see we might want to take a similar approach and read it once and pass it around.
I don't think we have any semi-official |
|
Sorry I forgot to reply to this one
There isn't really any precedent for this. I think call it whatever you want. I suppose |
6b53d77 to
ef1c628
Compare
39cb7dd to
7d90770
Compare
|
All comments addressed. Rebased to resolve compile conflict in codeql.ts |
aeisenberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but someone on the codeql-actions team should approve.
robertbrignull
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7d90770 to
9597f2e
Compare
|
Rebased to resolve the compile conflict. Merging since green. |
This PR enables setting additional options for the codeql invocations. See main...esbena/additional-codeql-options#diff-fabdc04b7538bbb9cb582f726acf408cR428 as an example.
The end result is that runs like this are possible:
--logdiris set for allcodeqlcommands,--debug/--tuple-countingare set for somecodeql database analyzeinvocations.This is achieved by reading a JSON object from a special environment variable, and then propagating that object all the way to all
codeqlinvocations. There are two main alternatives to this design:inputsin each codeql-action action instead of a single shell variableQuestions:
Merge / deployment checklist