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 flags setup, and implementation of SKIP_IDENTTITY_CREATION and SKIP_ENTROPY_COLLECTION #1410

Closed
wants to merge 7 commits into from

Conversation

mnzaki
Copy link
Contributor

@mnzaki mnzaki commented Aug 14, 2019

Closes #1407

  • Keeping flags as exported constants from src/env.ts so they (and the code they guard in if statements) can be easily eliminated by the minifier when false
  • using babel-plugin-transform-inline-environment-variables to load the NODE_ENV var and make env values based on it

@mnzaki
Copy link
Contributor Author

mnzaki commented Aug 14, 2019

I'm not sure what would fail with a 'dummy identity' in this way. I tried adding a claim and it seemed to work, but haven't tested further yet.
Also some tests need updates.

add babel-plugin-transform-inline-environment-variables
use process.env['NODE_ENV'] in src/config.ts
- run unit tests under proper NODE_ENV
- fix fuelKeyWithEther call/test
- minor typescript issues
It needs to be transpiled, but also the global window variable was
breaking this code:
https://github.com/typeorm/typeorm/blob/e4de0403e1f666639c0198e216409f997121c1e8/src/platform/BrowserPlatformTools.template#L20

Also add ConnectionOptions type back to the config object
@@ -58,7 +60,9 @@ export class EntropyContainer extends React.Component<Props, State> {
}

private updateEntropyProgress = async (): Promise<void> => {
const { entropyProgress } = this.state
const entropyProgress = SKIP_ENTROPY_COLLECTION

Choose a reason for hiding this comment

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

I think its more efficient to move this to state init (line 39), if it has no other implications

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted it to start out as 0 so that you have to at least touch the screen once to get to "100%" 😄

src/backendMiddleware.ts Show resolved Hide resolved
@mnzaki mnzaki changed the title Feature flags setup, and implementation of skipIdentityCreation and skipEntropyCollection Feature flags setup, and implementation of SKIP_IDENTTITY_CREATION and SKIP_ENTROPY_COLLECTION Aug 21, 2019
@mnzaki
Copy link
Contributor Author

mnzaki commented Aug 21, 2019

NOTE: this will conflict with #1414 because of changes to backendMiddleware.setIdentityWallet

@saifahn
Copy link

saifahn commented Sep 5, 2019

I've been trying to look through and sort the conflicts, but I don't know if I have the right background knowledge - coming across duplicate fuelKeyWithEther in the BackendMiddleware class and I'm not sure what to do there.

@mnzaki
Copy link
Contributor Author

mnzaki commented Sep 12, 2019

This was harvested for some useful commits in the e2e tests branch, and the rest will come along in a later PR.

@mnzaki mnzaki closed this Sep 12, 2019
@clauxx clauxx deleted the 1407/feature_flags branch September 23, 2021 10:45
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.

Feature Flags
3 participants