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

feature(gatsby): Enable partial releases of flags to a % of users #28387

Merged
merged 14 commits into from
Dec 10, 2020

Conversation

KyleAMathews
Copy link
Contributor

@KyleAMathews KyleAMathews commented Nov 30, 2020

We'll start with rolling out QUERY_ON_DEMAND & LAZY_IMAGES to 10% of users.

A user can opt out of the roll-out by setting the flag to false in their gatsby-config.js.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 30, 2020
@KyleAMathews KyleAMathews added type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement. and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Nov 30, 2020
@@ -17,8 +42,17 @@ export interface IFlag {
// resolved and ~50+ people have tested it, experimental should be set to
// false.
experimental: boolean
// Generally just return true.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

how the testFitness function works

packages/gatsby/src/utils/flags.ts Outdated Show resolved Hide resolved

if (optedInFlags.size > 0) {
message += `\n`
message += `We're shipping new features! For final testing, we're rolling them out first to a small % of Gatsby users
Copy link
Contributor Author

Choose a reason for hiding this comment

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

message when we opt a site in

lodash: `>=4.9`,
}
if (
satisfiesSemvers(semver) &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

how semver filtering would work — in a real flag, we'd generally also return true if it passes semver but doesn't pass the opt-in

@wardpeet
Copy link
Contributor

wardpeet commented Dec 1, 2020

Is it possible to let ssr use the same hot-module-overlay and fast-refresh overlay when an error occurs instead of doing our own?

@vladar
Copy link
Contributor

vladar commented Dec 1, 2020

Is it possible to output enabled flags in gatsby info? I think bug reports can be confusing without this information. We'll need an additional hop to ask the author what flags they have enabled.

@vladar vladar self-assigned this Dec 9, 2020
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

Let's merge it!

pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
…tsbyjs#28387)

* feature(gatsby): Enable partial releases of flags to a % of users

* switch to a general 'testFitness' function for one-off checks on flags

* typescripting

* cleanup comment

* Add FAST_REFRESH

* Opt-in QoD & LazyImages for ~10% of users

* update snapshot for newline

* includePrelease for semver checks

* no double isCI in IFlag interface

* type unknownConfigFlags array

* don't treat unfit flags are unknown

* Update packages/gatsby/src/utils/flags.ts

* fix lint

Co-authored-by: Michal Piechowiak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants