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

Fix a circular dependency that led a minimum version to be `undefined` by henrymercer · Pull Request #1578 · github/codeql-action · GitHub

Fix a circular dependency that led a minimum version to be undefined - #1578

Merged
henrymercer merged 2 commits into
mainfrom
henrymercer/fix-circular-dependency
Mar 14, 2023
Merged

henrymercer merged 2 commits into
mainfrom
henrymercer/fix-circular-dependency

Conversation

Copy link
Copy Markdown
Contributor

A circular dependency between codeql.ts and feature-flags.ts meant that featureConfig[Feature.ExportCodeScanningConfigEnabled].minimumVersion was undefined. This in turn meant that we tried to pass some CLI options even if we were running with an early version of the CLI where these options didn't exist.

The fact that we didn't catch this in PR checks highlights the need for more comprehensive testing across the full range of minor versions we support.

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 requested a review from a team as a code owner March 14, 2023 21:09

angelapwen left a comment

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

Thanks for investigation & extra debug statements 🕵️

Comment thread src/feature-flags.ts
repositoryNwo: RepositoryNwo,
tempDir: string,
logger: Logger
private readonly logger: Logger

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

Why do we make this private readonly?

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

This makes it a field on the Features class so we can access it within getValue.

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

We could also add a logger argument to getValue, but that would cause a reasonable amount of churn, and sharing the logger makes sense.

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

Ah, got it, thank you

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.

3 participants


Back | FazBrowse Home | New Git URL