Skip to content

Add repository location to NuGet package information #276

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

Closed
wants to merge 1 commit into from
Closed

Add repository location to NuGet package information #276

wants to merge 1 commit into from

Conversation

tomkerkhove
Copy link
Contributor

Nuget provides elements to specify where the source code repository is for a nuget package, by specifying repository information.

It would be great if we had this information straight into the .nuspec, which would allow tooling such as renovate to fetch detailed information about releases (what specifically has been fixed sample).

This adds the repository location to the nuspec.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tomkerkhove
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: brendandburns

If they are not already assigned, you can assign the PR to them by writing /assign @brendandburns in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 2, 2019
@tomkerkhove
Copy link
Contributor Author

/assign @brendandburns

@tomkerkhove
Copy link
Contributor Author

Test failed with:

System.AggregateException : One or more errors occurred. (The SSL connection could not be established, see inner exception.)
---- System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception.
-------- System.ComponentModel.Win32Exception : The credentials supplied to the package were not recognized
Stack Trace:
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at k8s.Tests.AuthTests.ExecuteListPods(IKubernetes client) in D:\a\1\s\tests\KubernetesClient.Tests\AuthTests.cs:line 36 at k8s.Tests.AuthTests.Cert() in D:\a\1\s\tests\KubernetesClient.Tests\AuthTests.cs:line 229 ----- Inner Stack Trace ----- at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken) at System.Threading.Tasks.ValueTask1.get_Result()
at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)

Don't think this is something I can fix given I didn't change anything?

@qmfrederik
Copy link
Contributor

@tomkerkhove The Repository Type and URL should already be populated through SourceLink. The advantage of doing it through it through SourceLink is that the URL will automatically be updated if you publish from a fork.

Now, that said, it looks like the repository type is being set by SourceLink but not the repository URL itself; that's probably something worth looking into.

@tomkerkhove
Copy link
Contributor Author

Hm that's a good point @qmfrederik, based on the docs the repo should be loaded.
Wasn't aware of this, to be honest.

If I have a look at the generated package it's not added by SourceLink:
image

While for others it's included:
image

So I'm not sure if it's actually working.

@qmfrederik
Copy link
Contributor

There's actually an error in the build log which explains why the info is not populated:

/Users/travis/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta2-18618-05/build/Microsoft.Build.Tasks.Git.targets(20,5): warning : StrictFilePathMarshaler must be used on a FilePath. [/Users/travis/build/kubernetes-client/csharp/src/KubernetesClient/KubernetesClient.csproj]
/Users/travis/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta2-18618-05/build/Microsoft.Build.Tasks.Git.targets(20,5): warning :    at LibGit2Sharp.Core.StrictFilePathMarshaler.MarshalManagedToNative(Object managedObj) [/Users/travis/build/kubernetes-client/csharp/src/KubernetesClient/KubernetesClient.csproj]
/Users/travis/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta2-18618-05/build/Microsoft.Build.Tasks.Git.targets(20,5): warning :    at System.StubHelpers.MngdRefCustomMarshaler.ConvertContentsToNative(IntPtr pMarshalState, Object& pManagedHome, IntPtr pNativeHome) [/Users/travis/build/kubernetes-client/csharp/src/KubernetesClient/KubernetesClient.csproj]
/Users/travis/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta2-18618-05/build/Microsoft.Build.Tasks.Git.targets(20,5): warning :    at LibGit2Sharp.Core.NativeMethods.git_repository_discover(GitBuf buf, FilePath start_path, Boolean across_fs, FilePath ceiling_dirs) [/Users/travis/build/kubernetes-client/csharp/src/KubernetesClient/KubernetesClient.csproj]
/Users/travis/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta2-18618-05/build/Microsoft.Build.Tasks.Git.targets(20,5): warning :    at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever) [/Users/travis/build/kubernetes-client/csharp/src/KubernetesClient/KubernetesClient.csproj]
/Users/travis/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta2-18618-05/build/Microsoft.Build.Tasks.Git.targets(20,5): warning :    at LibGit2Sharp.Repository.Discover(String startingPath) [/Users/travis/build/kubernetes-client/csharp/src/KubernetesClient/KubernetesClient.csproj]
/Users/travis/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta2-18618-05/build/Microsoft.Build.Tasks.Git.targets(20,5): warning :    at Microsoft.Build.Tasks.Git.GitOperations.LocateRepository(String directory) in /_/src/Microsoft.Build.Tasks.Git.Operations/GitOperations.cs:line 26 [/Users/travis/build/kubernetes-client/csharp/src/KubernetesClient/KubernetesClient.csproj]
/Users/travis/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta2-18618-05/build/Microsoft.Build.Tasks.Git.targets(20,5): warning :    at Microsoft.Build.Tasks.Git.RepositoryTasks.LocateRepository(LocateRepository task) in /_/src/Microsoft.Build.Tasks.Git.Operations/RepositoryTasks.cs:line 58 [/Users/travis/build/kubernetes-client/csharp/src/KubernetesClient/KubernetesClient.csproj]
/Users/travis/.nuget/packages/microsoft.sourcelink.common/1.0.0-beta2-18618-05/build/Microsoft.SourceLink.Common.targets(53,5): warning : Source control information is not available - the generated source link is empty. [/Users/travis/build/kubernetes-client/csharp/src/KubernetesClient/KubernetesClient.csproj]

@qmfrederik
Copy link
Contributor

Looks like that failure is caused by a .NET bug - see dotnet/coreclr#21606 and dotnet/sourcelink#236

@tomkerkhove
Copy link
Contributor Author

In that case I think I can close this PR and wait for the fix. What do you think?

@brendandburns
Copy link
Contributor

No harm in leaving it open imho...

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 17, 2019
@tomkerkhove
Copy link
Contributor Author

The issue above should be fixed, is there a way to release a preview package to see if it's resolved so we can abandon this PR?

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 17, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants