-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Don't check in blazor.*.js files #45883
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
Conversation
Weird, this works for me locally - @javiercn any idea why it might not in CI? |
Oh, I see, it's failing on all legs where we don't build NodeJS. So we'd have to turn the Node build on everywhere if we want to not check these files in. @dougbu @javiercn thoughts? aspnetcore/.azure/pipelines/ci.yml Line 366 in 005f935
|
Did the source build issues get resolved? I don't see any discussion on it in the linked issues. |
@BrennanConroy we discussed offline on an email thread with the source build folks |
@javiercn I forgot the email thread about this mentioned needing to check in a lockfile with the closure of dependencies all linux distros might need - can you help with that? |
@wtgodbe we already check-in the lock files. That's what ensures repeatable builds. |
I'm going to try building this in the source-build full-product context to make sure it doesn't break anything - thanks for pinging me on this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also lots of failures related to embedded resources
src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj
Outdated
Show resolved
Hide resolved
src/Components/WebView/WebView/src/Microsoft.AspNetCore.Components.WebView.csproj
Outdated
Show resolved
Hide resolved
</Target> | ||
|
||
<Target Name="_AddEmbeddedBlazor" AfterTargets="_CheckBlazorServerJSPath"> | ||
<ItemGroup> | ||
<EmbeddedResource Include="$(BlazorServerJSFile)" LogicalName="_framework/$(BlazorServerJSFilename)" /> | ||
<EmbeddedResource Include="$(BlazorServerJSFile)" LogicalName="_framework/$(BlazorServerJSFilename)" Condition="'$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this line and https://github.com/dotnet/aspnetcore/pull/45883/files#diff-6dab0588e76e66a0557fb78a2795bf8fe178f13f93ec7818d378f0ee7987ac34R77 need to be conditional❔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this is the file we're deleting, it won't exist unless you build nodeJs. Maybe it'd be better to condition on the file existing, in case a dev follows a NodeJs build with a NoBuildNodeJs build.
…ents.WebView.csproj Co-authored-by: Doug Bunting <[email protected]>
…er.csproj Co-authored-by: Doug Bunting <[email protected]>
This is only happening on Arm - we installed Node 16.x before this. @javiercn any idea what might be happening? |
@wtgodbe no idea, can we run |
cc @dotnet/distro-maintainers @omajid or @mirespace, Would you be able to help out with verifying this change in a source-build context? It'd be nice to get confirmation that the approach works for you and we'd appreciate the help with how tight on resources we are right now. |
@javiercn
Even though the preceding installation step claims to have installed to that dir. Something weird going on on the agent? @MattGal any idea what might be happening? |
I do not. I do note that random PRs-to-main do and don't use the install node JS task, but since you're using hosted build agents and the install node task, either could have changed out from under us and caused a problem. I'll spend a few minutes investigating and let you know if I find anything interesting. |
@wtgodbe some notes:
Given this, I think there may just be a problem with your build pipelines when Good luck! |
Hi @crummel ! Happy to help. Do you need a complete build, or can the change be tested with a building subset? If the latest, could you provide the args for MSBuild/build.sh or point me to where I can find it? |
I tried testing the VMR with this PR manually applied and was running into issues. Then I realized that one of the transitive dependency packages in
|
@mirespace, it would probably be better to make sure the VMR with the addition of the changes proposed by this PR works end to end. |
So, I commented out the registry and was able to pull all the nodejs deps needed. I will continue trying to test this end-to-end. But that has made me think: are there any npm dependencies that are only available via the Microsoft feed? In a future CVE release (Patch Tuesday) is it possible that there are fixes to npm modules that are not part of the aspnetcore repo and only available via |
All @omajid authentication requirements when updating lock files is only part of what's going wrong for you. In addition, dependencies in the src/Components/Web.JS/ directory are downloaded using I suggest patching the yarn.lock file instead. Then run Side note: @dotnet/aspnet-blazor-eng and @dotnet/aspnet-build please do not merge changes that add other feeds in our lock files. We're hoping to enforce this in the CI's Code Check job soon. |
I just realized that |
Not available at all or not available w/o a manual installation step in advance?
Not exactly. Both start w/ the same package.json files but lock files don't share names or formats. I don't think either can read lock files created by the other. (@javiercn or @BrennanConroy is that right❔) We have thought about switching back to |
Not available in the distro repositories. Which basically means not available at all. Manual installation is not an option when building in a distro-context for distros that care about building everything from source - like Debian, Fedora and RHEL and Ubuntu. Though RHEL may be the only distro in that list that doesn't include
The
|
Might be worth a try in your environment then. That is, see if editing the yarn.lock file and |
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
So I did. It looks like I can download the dependencies? The I am now running into a strange error that I am trying to figure out:
|
Closing as this is blocked on moving to NPM |
Should resolve #11592
CC @mkArtakMSFT @crummel