Skip to content

Conversation

@jureid
Copy link
Contributor

@jureid jureid commented Oct 8, 2021

it looks like in package.json line 5, we add a suffix, "main", to the version. When we assign customers to target populations for experiments, we were trying to assign customers without any suffix to Public, which resulted in no one being included. Instead, I think we should be checking if the suffix is "main" and assign those customers to Public.

it looks like in [package.json line 5](https://github.com/microsoft/vscode-cpptools/blob/a62acdb5a52438540c266b409a0ee7f8e64f7a9b/Extension/package.json#L5), we add a suffix, "main", to the version. When we assign customers to target populations for experiments, we were trying to assign customers without any suffix to Public, which resulted in no one being included. Instead, I think we should be checking if the suffix is "main" and assign those customers to Public.
@jureid
Copy link
Contributor Author

jureid commented Oct 8, 2021

Adding @luabud who debugged this issue!

Copy link
Contributor

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

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

What? In general, the only users who should have the main suffix are internal developers. When we build the public vsix, the main is removed.

@jureid
Copy link
Contributor Author

jureid commented Oct 8, 2021

We're seeing a lot of machines in the Internal population in our experiment, but none in Public. The targetPopulation is assigned here:

            if (packageInfo) {
                let targetPopulation: TargetPopulation;
                const userVersion: PackageVersion = new PackageVersion(packageInfo.version);
                if (userVersion.suffix === "") {
                    targetPopulation = TargetPopulation.Public;
                } else if (userVersion.suffix === "insiders") {
                    targetPopulation = TargetPopulation.Insiders;
                } else {
                    targetPopulation = TargetPopulation.Internal;
                }

What I don’t understand is why (userVersion.suffix === "") wouldn’t evaluate to true for Public users. I noticed that we have "version": "1.6.0-main" in package.json... is there a chance the suffix didn't get removed?

@bobbrow
Copy link
Member

bobbrow commented Oct 8, 2021

I think the problem is that suffix is undefined, not "". Looking at the constructor for PackageVersion, I think that's what's causing problems for you. Try manually removing the "-main" from package.json for your local testing and you should be able to confirm if that's the case.

checking for undefined suffix, not just empty string
@jureid
Copy link
Contributor Author

jureid commented Oct 12, 2021

Verified that this change works in local testing

@Colengms Colengms merged commit 9b398b1 into main Oct 12, 2021
@Colengms Colengms deleted the jureid-patch-2 branch October 12, 2021 23:57
@github-actions github-actions bot locked and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants