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

[release/2.1] Fixup NPM package versioning #30164

Merged
merged 2 commits into from
Mar 10, 2021

Conversation

dougbu
Copy link
Member

@dougbu dougbu commented Feb 13, 2021

@dougbu dougbu added area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework tell-mode Indicates a PR which is being merged during tell-mode labels Feb 13, 2021
@dougbu dougbu added this to the 2.1.x milestone Feb 13, 2021
@dougbu dougbu requested a review from a team February 13, 2021 01:23
@dougbu dougbu changed the base branch from main to release/2.1 February 13, 2021 01:23
@dougbu
Copy link
Member Author

dougbu commented Feb 13, 2021

Note

This is not for 2.1.26 because it will just slow progress down there. Not particularly relevant anyhow since ProdCon builds should have IsFinalBuild set to true.

@dougbu
Copy link
Member Author

dougbu commented Feb 13, 2021

/fyi @vseanreesermsft

@dougbu
Copy link
Member Author

dougbu commented Feb 18, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dougbu
Copy link
Member Author

dougbu commented Feb 22, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dougbu dougbu force-pushed the dougbu/npm.version.suffix branch from 5a0a4c7 to 6a207e2 Compare February 24, 2021 04:59
@dougbu dougbu modified the milestones: 2.1.x, 2.1.27 Feb 24, 2021
@dougbu
Copy link
Member Author

dougbu commented Feb 26, 2021

@JunTaoLuo any ideas about our 2.1 test hangs❔ I've lost track of how many times I've retried builds in this PR…

@dougbu
Copy link
Member Author

dougbu commented Feb 26, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

- `_Pack` target failing in ProdCon builds
  - fortunately problem is specific to non-`IsFinalBuild` builds
- don't add the version metadata because that's not written into package.lock
- e.g. looking for aspnet-signalr-protocol-msgpack-1.0.26-servicing-20210212.12+pb-20210212-02.tgz
  - but `npm pack` actually wrote aspnet-signalr-protocol-msgpack-1.0.26-servicing-20210212.12.tgz
- see https://dnceng.visualstudio.com/internal/_build/results?buildId=992921&view=logs&j=f31c9f97-4411-58e7-49ac-fc73f645e6b6&t=2bcaa12b-2f4b-5b1f-c519-10308f653190&l=3190
@dougbu dougbu force-pushed the dougbu/npm.version.suffix branch from 6a207e2 to cc40c05 Compare February 28, 2021 04:42
- need more assemblies in `--TestAdapterPath` command-line argument
@dougbu
Copy link
Member Author

dougbu commented Mar 4, 2021

@dotnet/aspnet-build, my second commit in this PR resolves the 2.1 test hangs. I'm not sure of the root cause but guess either

  1. The --TestAdapterPath argument value (see
    https://github.com/aspnet/BuildTools/blob/e2b019a5c8d338b060644e2ea5437beea1f5a888/files/KoreBuild/modules/vstest/module.targets#L110-L112
    ) is always from the last project in a test group because that's how property group batching works. In the few cases I changed, that project (Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj -- chosen consistently) does not provide all assemblies needed for everything else in the UnitTests (default) test group. The problems with this cause are none of the four projects has changed in ages and --TestAdapterPath isn't documented to affect dependencies. But, maybe some change somewhere changed the --TestAdapterPath value i.e. the order of the @(TestAssemblies) item group.
  2. Some change somewhere caused timing changes within the UnitTests/net461 test group, leading to conflicts between the large number of test assemblies in that group. The problem with this cause is consistent MissingMethodExceptions seems like a strange symptom of "conflicts".

Given the fact

dotnet vstest --Parallel --Framework:.NETFramework,Version=v4.6.1 --TestAdapterPath:src\Azure\AzureAppServicesIntegration\test\bin\Release\net461\ `
src\Servers\bin\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests\Release\net461\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.dll

fails (miserably) and

dotnet vstest --Parallel --Framework:.NETFramework,Version=v4.6.1 --TestAdapterPath:src\Servers\bin\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests\Release\net461\ `
src\Servers\bin\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests\Release\net461\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.dll

succeeds, I lean toward (1) but I am still building an old 2.1 commit to see the previous behaviour.

@wtgodbe
Copy link
Member

wtgodbe commented Mar 4, 2021

Nice!! I'm not familiar with what TestGroupName does - based on your comment, is it splitting those tests into groups that are more guaranteed to resolve a sufficient TestAdapterPath?

@dougbu
Copy link
Member Author

dougbu commented Mar 5, 2021

is it splitting those tests into groups that are more guaranteed to resolve a sufficient TestAdapterPath?

Yes, that's what it does but I'm still not positive why changing the TestAdapaterPath works as it does. Could add a wait-for-debugger loop in one of the problematic test class constructors and debug the short dotnet vstest command that fails but I'm not sure the extra effort is worthwhile. Thoughts❔

@wtgodbe
Copy link
Member

wtgodbe commented Mar 5, 2021

Could add a wait-for-debugger loop in one of the problematic test class constructors and debug the short dotnet vstest command that fails but I'm not sure the extra effort is worthwhile. Thoughts❔

If this works, I don't think you need to make that a priority given that this is 2.1. If the hang resurfaces then maybe we can do the deeper dive.

@dougbu
Copy link
Member Author

dougbu commented Mar 5, 2021

/fyi the old command also looked like

dotnet vstest --Parallel --Framework:.NETFramework,Version=v4.6.1 --TestAdapterPath:...\src\Azure\AzureAppServicesIntegration\test\bin\Debug\net461\ {test assemblies}...

on my system. New guess is a project that depends on reduced what is copy-localed into that path i.e. it's not a change to the @(TestAssemblies) item group. Either way, this works and I've got other stuff to do😺

@dougbu
Copy link
Member Author

dougbu commented Mar 8, 2021

@dotnet/aspnet-build this should probably go in first after we complete the branding updates because it isn't combined with as many other fixes (all three of my 2.1 changes include the test fix)

@dougbu dougbu changed the title Fixup NPM package versioning [release/2.1] Fixup NPM package versioning Mar 8, 2021
@dougbu dougbu merged commit 17ba50c into release/2.1 Mar 10, 2021
@dougbu dougbu deleted the dougbu/npm.version.suffix branch March 10, 2021 03:38
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework tell-mode Indicates a PR which is being merged during tell-mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants