FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fail `analyze` step in PR check by passing an invalid option to `database finalize` by angelapwen · Pull Request #2189 · github/codeql-action · GitHub

Fail analyze step in PR check by passing an invalid option to database finalize - #2189

Merged
angelapwen merged 1 commit into
mainfrom
angelapwen/fix-debug-artifacts-failure
Mar 11, 2024
Merged

angelapwen merged 1 commit into
mainfrom
angelapwen/fix-debug-artifacts-failure

Conversation

angelapwen commented Mar 8, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

The ram: 1 trick won't work anymore with recent updates to the CLI, so we need to find an alternate way to fail the analyze step here.

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.

angelapwen changed the title Fail analyze step by deleting .rel files Fail analyze step in PR check by deleting .rel files Mar 8, 2024
angelapwen force-pushed the angelapwen/fix-debug-artifacts-failure branch 28 times, most recently from 93f5cce to 7fc2d51 Compare March 8, 2024 23:45
angelapwen changed the title Fail analyze step in PR check by deleting .rel files Fail analyze step in PR check by passing an invalid option to database finalize Mar 8, 2024
angelapwen force-pushed the angelapwen/fix-debug-artifacts-failure branch from 7fc2d51 to 8b44fe3 Compare March 8, 2024 23:50
angelapwen marked this pull request as ready for review March 8, 2024 23:56
angelapwen requested a review from a team as a code owner March 8, 2024 23:56

Copy link
Copy Markdown
Contributor Author

setup-swift failures are upstream failures (swift-actions/setup-swift#666). Hopefully, these are resolved soon — otherwise maybe I'll have to make those checks non-required so I can get this in to unblock #2185.

adityasharad previously approved these changes Mar 9, 2024
id: analysis
env:
# Forces a failure in this step.
CODEQL_ACTION_EXTRA_OPTIONS: "{ \"database\": { \"finalize\": [\"--invalid-option\"] } }"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Observation: This tests the case where database finalize fails and we want to check we have debug artifacts. It doesn't test the case where database run-queries or database interpret-results fails and similarly we want to check debug artifacts. That is okay for now, but we may want to expand the test in future to tamper with each of these commands separately.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Also I think you could have gotten away without the \" escaping by using single quotes to enclose the entire string. See https://github.com/search?type=code&q=CODEQL_ACTION_EXTRA_OPTIONS for some examples.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Makes sense. Ah! I didn't think to search in the entire org (only searched in this repo). I'll update to single quotes to make it more readable.

As the `ram: 1` trick won't work anymore with updates to the CLI.
angelapwen force-pushed the angelapwen/fix-debug-artifacts-failure branch from 8b44fe3 to d7fca36 Compare March 9, 2024 01:37
angelapwen merged commit 532ca54 into main Mar 11, 2024
angelapwen deleted the angelapwen/fix-debug-artifacts-failure branch March 11, 2024 13:57
github-actions Bot mentioned this pull request Mar 12, 2024
8 tasks
angelapwen added a commit that referenced this pull request Mar 12, 2024
* Update changelog and version after v3.24.6

* Update checked-in dependencies

* Bump the npm group with 3 updates (#2183)

* Bump the npm group with 3 updates

Bumps the npm group with 3 updates: [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [eslint-plugin-github](https://github.com/github/eslint-plugin-github) and [nock](https://github.com/nock/nock).


Updates `@typescript-eslint/parser` from 7.1.0 to 7.1.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.1.1/packages/parser)

Updates `eslint-plugin-github` from 4.10.1 to 4.10.2
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](github/eslint-plugin-github@v4.10.1...v4.10.2)

Updates `nock` from 13.5.3 to 13.5.4
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](nock/nock@v13.5.3...v13.5.4)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update supported GitHub Enterprise Server versions

* Update `languages` help

Recommend using a matrix build

* Remove experimental qualifiers from build mode input

* Escape named value in input description

* Fail `analyze` step by passing an invalid option to `database finalize` (#2189)

As the `ram: 1` trick won't work anymore with updates to the CLI.

* Update default bundle to 2.16.4 (#2185)

* Update default bundle to codeql-bundle-v2.16.4

* Add changelog note

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>

* Use the `--sarif-include-query-help` option when supported

* Bump the npm group with 2 updates (#2190)

* Bump the npm group with 2 updates

Bumps the npm group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [typescript](https://github.com/Microsoft/TypeScript).


Updates `@typescript-eslint/eslint-plugin` from 7.1.0 to 7.1.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.1.1/packages/eslint-plugin)

Updates `typescript` from 5.3.3 to 5.4.2
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.3.3...v5.4.2)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Rebuild sources

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>

* Update changelog for v3.24.7

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Mercer <henrymercer@github.com>
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
github-actions Bot mentioned this pull request Mar 12, 2024
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL