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

Ensure --overwrite flag is only passed once #2245

Merged
merged 4 commits into from Apr 16, 2024

Conversation

henrymercer
Copy link
Contributor

This fixes a bug where if CODEQL_ACTION_EXTRA_OPTIONS specified that --overwrite should be passed to database init, the --overwrite argument would be passed twice, leading to an error.

To accomplish this, I introduce an ignoringOptions argument to specify options in CODEQL_ACTION_EXTRA_OPTIONS that should be ignored. It would be nice to have a general solution that didn't require specifying which options should be ignored, but the problem with that is that it does make sense to pass some flags more than once.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@henrymercer henrymercer requested a review from a team as a code owner April 16, 2024 17:58
Copy link
Contributor

@angelapwen angelapwen left a comment

Choose a reason for hiding this comment

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

Makes sense — did you include --expect-discarded-cache because that's another obvious one that should only be passed once? I wonder if that one should also be part of the changenote (though I guess then the note would need to be more generalized so we don't have to write a note each time we pass ignoringOptions).

@henrymercer
Copy link
Contributor Author

Makes sense — did you include --expect-discarded-cache because that's another obvious one that should only be passed once? I wonder if that one should also be part of the changenote (though I guess then the note would need to be more generalized so we don't have to write a note each time we pass ignoringOptions).

I had a quick scan through and that was the most obvious other one to add. I'll just include --overwrite in the changelog note though as I don't think we've advised customers to specify --expect-discarded-cache manually.

@henrymercer henrymercer merged commit c4fb451 into main Apr 16, 2024
320 checks passed
@henrymercer henrymercer deleted the henrymercer/ignore-already-specified-flags branch April 16, 2024 19:07
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.

None yet

3 participants