Open skolima opened 3 weeks ago
Thank you for the logs. I'll have to experiment a bit, but it looks like you're correct; the package mapping caused some issues that it couldn't recover from (like blanking out the lock file).
Regarding the packageSourceMapping
, I managed to find a workaround, but it'd be nice to have this somehow mentioned in the documentation.
I've explicitly added the original nuget feed to dependabot.yml
as the second nuget feed:
public-nuget:
type: nuget-feed
url: https://api.nuget.org/v3/index.json
It then gets passed on by Dependabot to NuGet build as nuget_source_2
so I configured my source mappings to use that:
<configuration>
<packageSources>
<add key="github" value="https://nuget.pkg.github.com/ORGANIZATION/index.json" />
<add key="nuget_source_2" value=https://api.nuget.org/v3/index.json />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget_source_2">
<package pattern="*" />
</packageSource>
<packageSource key="github">
<package pattern="ORGANIZATION.*" />
</packageSource>
</packageSourceMapping>
</configuration>
This works, though it feels rather clunky. The empty package.lock.json files when there are transient dependencies issue - still remains. There's also another report for it: https://github.com/dependabot/dependabot-core/issues/10863
Thanks for the information, it should give me a place to start investigating.
Is there an existing issue for this?
Package ecosystem
NuGet
Package manager version
No response
Language version
No response
Manifest location and content before the Dependabot update
Directory.Build.targets
:Directory.Packages.props
:TestProject.csproj
:packages.lock.json
is required, can be auto-generated - I'm omitting it here for brevity.Nuget.Config
:dependabot.yml content
Updated dependency
JetBrains.Annotations
andORGANIZATION.PrivatePackage
What you expected to see, versus what you actually saw
Note: there's 2 issues here.
secrets.PACKAGE_TOKEN
, Dependabot generates no change to the.csproj
file but instead wipes the contents ofpackages.lock.json
packageSourceMapping
defined, and while I can configure authentication for the first one (the custom one), I can not work out how to get Dependabot to not ignore the defaultnuget.org
source which other dotnet tools use normally for this project.Native package manager behavior
Packages update correctly, with
ORGANIZATION.PrivatePackage
being taken from the authenticated (either - on developer machine - with user credentials; or - in GitHub actions builds - using nativeGITHUB_TOKEN
) and with public package being taken from nuget.orgImages of the diff or a link to the PR, issue, or logs
logs:
``` Logs: 2024-10-28T15:57:58.3334382Z ##[group]Run github/dependabot-action@main 2024-10-28T15:57:58.3335234Z env: 2024-10-28T15:57:58.3335634Z DEPENDABOT_DISABLE_CLEANUP: 1 2024-10-28T15:57:58.3336180Z DEPENDABOT_ENABLE_CONNECTIVITY_CHECK: 0 2024-10-28T15:57:58.3337061Z GITHUB_TOKEN: *** 2024-10-28T15:57:58.3337944Z GITHUB_DEPENDABOT_JOB_TOKEN: *** 2024-10-28T15:57:58.3338909Z GITHUB_DEPENDABOT_CRED_TOKEN: *** 2024-10-28T15:57:58.3339514Z ##[endgroup] 2024-10-28T15:57:58.6349667Z 🤖 ~ starting update ~ 2024-10-28T15:57:58.6393395Z Fetching job details 2024-10-28T15:57:59.2787416Z ##[group]Pulling updater images 2024-10-28T15:57:59.2789846Z Pulling image ghcr.io/dependabot/dependabot-updater-nuget:78d42a4932e7c11d239271db7b2d345aec5253f8... 2024-10-28T15:58:44.9477073Z Pulled image ghcr.io/dependabot/dependabot-updater-nuget:78d42a4932e7c11d239271db7b2d345aec5253f8 2024-10-28T15:58:44.9491722Z Pulling image ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy:v2.0.20241004183849@sha256:5e895b5edfaba72e99d0a19b43f386b18b65fc08a2d43af5aedd6360cda56842... 2024-10-28T15:58:45.5965992Z Pulled image ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy:v2.0.20241004183849@sha256:5e895b5edfaba72e99d0a19b43f386b18b65fc08a2d43af5aedd6360cda56842 2024-10-28T15:58:45.5970237Z ##[endgroup] 2024-10-28T15:58:45.5971334Z Starting update process 2024-10-28T15:58:45.9405605Z Created proxy container: 19f72d83dc1a6d2b9d11292a9aa121a98814fbc220027a0fb0c0f1375c36fde0 2024-10-28T15:58:46.3078529Z Created container: 07a59edb31e1c547d850142ce0b3c2511906b88ae318750470a477fc0af26b6d 2024-10-28T15:58:46.3185042Z proxy | 2024/10/28 15:58:46 proxy starting, commit: 4ff727a3a0f3cf493d1700d4ceec3c6f880b430e 2024-10-28T15:58:46.3206966Z proxy | 2024/10/28 15:58:46 fetching service index for nuget feed https://nuget.pkg.github.com/ORGANIZATION/index.json 2024-10-28T15:58:46.3293033Z proxy | 2024/10/28 15:58:46 * authenticating nuget feed request (host: nuget.pkg.github.com, basic auth) 2024-10-28T15:58:46.4473204Z proxy | 2024/10/28 15:58:46 added url to authentication list: https://nuget.pkg.github.com/ORGANIZATION/download 2024-10-28T15:58:46.4475818Z 2024/10/28 15:58:46 added url to authentication list: https://nuget.pkg.github.com/ORGANIZATION/query 2024-10-28T15:58:46.4478199Z 2024/10/28 15:58:46 added url to authentication list: https://nuget.pkg.github.com/ORGANIZATION/query 2024-10-28T15:58:46.4480827Z 2024/10/28 15:58:46 added url to authentication list: https://nuget.pkg.github.com/ORGANIZATION/query 2024-10-28T15:58:46.4482878Z 2024/10/28 15:58:46 added url to authentication list: https://nuget.pkg.github.com/ORGANIZATION 2024-10-28T15:58:46.4484873Z 2024/10/28 15:58:46 added url to authentication list: https://nuget.pkg.github.com/ORGANIZATION 2024-10-28T15:58:46.4509228Z 2024/10/28 15:58:46 added url to authentication list: https://nuget.pkg.github.com/ORGANIZATION 2024-10-28T15:58:46.4511578Z 2024/10/28 15:58:46 added url to authentication list: https://nuget.pkg.github.com/ORGANIZATION 2024-10-28T15:58:46.4512997Z 2024/10/28 15:58:46 Listening (:1080) 2024-10-28T15:58:46.5488090Z updater | Updating certificates in /etc/ssl/certs... 2024-10-28T15:58:47.5215503Z updater | rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL 2024-10-28T15:58:47.5290990Z updater | 1 added, 0 removed; done. 2024-10-28T15:58:47.5302674Z updater | Running hooks in /etc/ca-certificates/update.d... 2024-10-28T15:58:47.5367345Z updater | done. 2024-10-28T15:58:47.5770775Z updater | NuGet native updater experiment value: null 2024-10-28T15:58:50.2294073Z updater | 2024/10/28 15:58:50 INFOSmallest manifest that reproduces the issue
No response