Skip to content

Conversation

@bschnurr
Copy link
Member

@bschnurr bschnurr commented Nov 11, 2020

Todo:

  • Copy previous tryPlance banner test cases

For #

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • The wiki is updated with any design decisions/details.

@codecov-io
Copy link

codecov-io commented Nov 11, 2020

Codecov Report

❗ No coverage uploaded for pull request head (jedi-tryplance@836ce7c). Click here to learn what that means.
The diff coverage is n/a.

ShowBanner = 'TryPylanceBannerJedi'
}

/*
Copy link
Member Author

Choose a reason for hiding this comment

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

This file is basically the same as the previous tryPylance banner ProposePylanceBanner.ts

just the data and some of the logic have changed

promptContent = await this.experiments.getExperimentValue<string>(TryPylance.jediPrompt1);
} else if (await this.experiments.inExperiment(TryPylance.jediPrompt2)) {
promptContent = await this.experiments.getExperimentValue<string>(TryPylance.jediPrompt2);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

new way to check if we're in an experiment and also get the banner string

if (lsType !== LanguageServerType.Jedi) {
return false;
}
return this.persistentState.createGlobalPersistentState<boolean>(ProposeLSStateKeys.ShowBanner, true).value;

Choose a reason for hiding this comment

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

okay to use same key?

Copy link
Member Author

Choose a reason for hiding this comment

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

I defined a new key but the string inside is different. I'll double check if i need to export it.
export enum ProposeLSStateKeys {
ShowBanner = 'TryPylanceBannerJedi'
}

@inject(IExperimentService) experimentService: IExperimentService
@inject(IExperimentService) experimentService: IExperimentService,
@inject(IPythonExtensionBanner)
@named(BANNER_NAME_PROPOSE_LS_FOR_JEDI_USERS)

Choose a reason for hiding this comment

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

what is named?

adding experimentName to old tryPlance test telemetry
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@jakebailey
Copy link
Member

Closing in favor of #14759.

@jakebailey jakebailey closed this Nov 18, 2020
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.

4 participants