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

Refactor handling of feature flags #1284

Merged
merged 11 commits into from
Oct 12, 2022
Merged

Refactor handling of feature flags #1284

merged 11 commits into from
Oct 12, 2022

Commits on Oct 5, 2022

  1. Refactor handling of feature flags

    This commit centralizes how feature flags are handled. All feature flags
    must now add an entry in the `featureFlagConfig` dictionary. This
    dictionary associates the flag with an environment variable name and
    optionally a minimum version for CodeQL.
    
    The new logic is:
    
    - if the environment variable is set to false: disabled
    - if the minimum version requirement specified and met: disabled
    - if the environment variable is set to true: enable
    - Otherwise check feature flag enablement from the server
    aeisenberg committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    e5c3375 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Address comments from review

    - Change env var name for `MlPoweredQueriesEnabled`
    - Throw error if minimumVersion is specified, but CodeQL argument is not
      supplied.
    - Fix failing tests. Note that I removed a config-utils test because it
      is no longer relevant since we handle codeql minimum versions in the
      `getValue` function.
    aeisenberg committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    b16314e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6de05e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5915e70 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2022

  1. Extract GitHubFeatureFlags to a separate class

    Internal refactoring so that `GitHubFeatureFlags` is
    private only. The public facing class is `Features`.
    aeisenberg committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    b27aed7 View commit details
    Browse the repository at this point in the history
  2. More renaming

    Avoid usage of "Feature Flag" unless we are talking specifically about
    the response from github features api. Otherwise, use terms like
    "Toggleable features".
    
    Note both "toggleable" and "togglable" appear to be valid spellings of
    the word. I chose the first for no good reason.
    aeisenberg committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    1a17c59 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    919e4ca View commit details
    Browse the repository at this point in the history
  4. Fix typos

    aeisenberg committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    6c869f8 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. More renaming

    aeisenberg committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    701cea3 View commit details
    Browse the repository at this point in the history
  2. More feature flag renaming

    henrymercer authored and aeisenberg committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    43c3ed9 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2022

  1. Configuration menu
    Copy the full SHA
    34d48f8 View commit details
    Browse the repository at this point in the history