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

Cannot build this project as some of the resources are private 401 (Unauthorized) #1343

Closed
ader1990 opened this issue Oct 22, 2024 · 6 comments

Comments

@ader1990
Copy link

Hello,

I am getting errors 401 (Unauthorized) for the following links that are used in the building process from source of BuildXL:

Thank you.

@smera
Copy link
Member

smera commented Oct 22, 2024

Hello @ader1990,
You are likely trying to build sources that are behind the main branch. We recently moved the public feed to a new location, and the old feed was retired. Please check this configuration:

"buildxl-selfhost" : "https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/BuildXL.External.Dependencies/nuget/v3/index.json",

The new feed should be this one .

@ader1990
Copy link
Author

Hello @ader1990, You are likely trying to build sources that are behind the main branch. We recently moved the public feed to a new location, and the old feed was retired. Please check this configuration:

BuildXL/config.dsc

Line 58 in e74ec9e

"buildxl-selfhost" : "https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/BuildXL.External.Dependencies/nuget/v3/index.json",
The new feed should be this one .

The thing is that the error I got was while trying to build dotnet stable branch 8.0.xx from source, so by retiring those sources, this means that the current or older stable branches for dotnet 8 will not be buildable anymore? Maybe you can ask the actual owner of those older links to redirect those links so that the builds from source work again?

@smera
Copy link
Member

smera commented Oct 22, 2024

Sorry, maybe I'm not getting the scenario. dotnet 8 and BuildXL sources shouldn't be connected in any way. Are you trying to build BuildXL from sources so then you can build dotnet 8 from sources with BuildXL? I think your problem should go away if you sync your BuildXL sources against main.

@ader1990
Copy link
Author

Hello, @smera.

The problem is that one cannot fix a tagged release of dotnet, as it is frozen.

How to reproduce the error:

docker run --rm -it -v vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
# inside the docker container

git clone https://github.com/dotnet/dotnet
cd dotnet/
git checkout tags/v8.0.10
./prep.sh
./build.sh --online --clean-while-building             --             /v:n             /p:ContinueOnPrebuiltBaselineError=true /p:MinimalConsoleLogOutput=false             /p:SkipPortableRuntimeBuild=true

If I do a git checkout release/8.0.1xx, the error goes away, as the branch was fixed.

The problem is that the dotnet tag tags/v8.0.10, which was released a month ago cannot be built anymore, as it fails with the error shown above: 401 (Unauthorized).

Full error:


           /vmr2/dotnet/.dotnet/sdk/8.0.108/NuGet.targets(156,5): error : Unable to load the service index for source https://pkgs.dev.azure.com/ms/BuildXL/_packaging/BuildXL/nuget/v3/index.json. [/vmr2/dotnet/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj]
           /vmr2/dotnet/.dotnet/sdk/8.0.108/NuGet.targets(156,5): error :   Response status code does not indicate success: 401 (Unauthorized). [/vmr2/dotnet/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj]

@rainersigwald
Copy link
Member

The just-merged dotnet/msbuild#10838 will fix this forward but I don't think there's a way we can repair old tags.

ader1990 added a commit to ader1990/os that referenced this issue Nov 4, 2024
Dotnet-8 tag 8.0.10 or older cannot be built anymore,
as Microsoft decided to retire the following repositories:

  * https://pkgs.dev.azure.com/ms/BuildXL/_packaging/BuildXL.Selfhost/nuget/v3/index.json
  * https://pkgs.dev.azure.com/ms/BuildXL/_packaging/BuildXL/nuget/v3/index.json

The repositories were replaced with:

  * https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/BuildXL.External.Dependencies/nuget/v3/index.json

The problem is that the tagged releases of dotnet <= 8.0.10 will never be able
to build anymore, as tags cannot be replaced.

The fix has landed to dotnet/msbuild#10838, and the
following tagged releases should be buildable again.

See: microsoft/BuildXL#1343

But, if we leverage the offline build, after the prep.sh has been run,
there is no required connection to the inexistent repositories, thus the build will
work for the old tags too.
xnox added a commit to wolfi-dev/os that referenced this issue Nov 4, 2024
Dotnet-8 tag 8.0.10 or older cannot be built anymore, as Microsoft
decided to retire the following repositories:

*
https://pkgs.dev.azure.com/ms/BuildXL/_packaging/BuildXL.Selfhost/nuget/v3/index.json
*
https://pkgs.dev.azure.com/ms/BuildXL/_packaging/BuildXL/nuget/v3/index.json

The repositories were replaced with:

*
https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/BuildXL.External.Dependencies/nuget/v3/index.json

The problem is that the tagged releases of dotnet <= 8.0.10 will never
be able to build anymore, as tags cannot be replaced.

The fix has landed to dotnet/msbuild#10838, and
the following tagged releases should be buildable again.

See: microsoft/BuildXL#1343

But, if we leverage the offline build, after the prep.sh has been run,
there is no required connection to the inexistent repositories, thus the
build will work for the old tags too.

<!---
Provide a short summary in the Title above. Examples of good PR titles:
* "ruby-3.1: new package"
* "haproxy: fix CVE-2014-123456"
-->

<!--
Please include references to any related issues or delete this section
otherwise.
 -->

Fixes:

Related:

### Pre-review Checklist

<!--
This checklist is mostly useful as a reminder of small things that can
easily be
forgotten – it is meant as a helpful tool rather than hoops to jump
through.

At the moment of this PR you have the most information on what all the
change
will affect, so please take the time to jot it down.

Put an `x` in all the items that apply, make notes next to any that
haven't been
addressed, and remove any items that are not relevant to this PR.

-->

#### For new package PRs only
<!-- remove if unrelated -->
- [ ] This PR is marked as fixing a pre-existing package request bug
- [ ] Alternatively, the PR is marked as related to a pre-existing
package request bug, such as a dependency
- [ ] REQUIRED - The package is available under an OSI-approved or
FSF-approved license
- [ ] REQUIRED - The version of the package is still receiving security
updates
- [ ] This PR links to the upstream project's support policy (e.g.
`endoflife.date`)

#### For new version streams
<!-- remove if unrelated -->
- [ ] The upstream project actually supports multiple concurrent
versions.
- [ ] Any subpackages include the version string in their package name
(e.g. `name: ${{package.name}}-compat`)
- [ ] The package (and subpackages) `provides:` logical unversioned
forms of the package (e.g. `nodejs`, `nodejs-lts`)
- [ ] If non-streamed package names no longer built, open PR to withdraw
them (see [WITHDRAWING
PACKAGES](https://github.com/wolfi-dev/os/blob/main/WITHDRAWING_PACKAGES.md))

#### For package updates (renames) in the base images
<!-- remove if unrelated -->
When updating packages part of base images (i.e.
cgr.dev/chainguard/wolfi-base or ghcr.io/wolfi-dev/sdk)
- [ ] REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk
images successfully build
- [ ] REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk
contain no obsolete (no longer built) packages
- [ ] Upon launch, does `apk upgrade --latest` successfully upgrades
packages or performs no actions

#### For security-related PRs
<!-- remove if unrelated -->
- [ ] The security fix is recorded in the
[advisories](https://github.com/wolfi-dev/advisories) repo

#### For version bump PRs
<!-- remove if unrelated -->
- [ ] The `epoch` field is reset to 0

#### For PRs that add patches
<!-- remove if unrelated -->
- [ ] Patch source is documented

---------

Co-authored-by: Dimitri John Ledkov <dimitri.ledkov@chainguard.dev>
@mpysson
Copy link
Member

mpysson commented Nov 8, 2024

Closing this issue as per rainersigwald's response

@mpysson mpysson closed this as completed Nov 8, 2024
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

No branches or pull requests

4 participants