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

Target Orchard Core 1.8 in packages (OCC-252) #449

Closed
Piedone opened this issue May 17, 2024 · 9 comments · Fixed by #451
Closed

Target Orchard Core 1.8 in packages (OCC-252) #449

Piedone opened this issue May 17, 2024 · 9 comments · Fixed by #451
Assignees
Labels
enhancement New feature or request

Comments

@Piedone
Copy link
Member

Piedone commented May 17, 2024

Is your feature request related to a problem? Please describe

Consumer projects of OCC are currently forced to target OC 1.8.3 at least, since that's what the packages depend on. Better would be to target the .0 minor version of the latest version; i.e., 1.8.0 currently, so people can use them regardless of the consumer projects being on 1.8.0, 1.8.1, 1.8.2, or 1.8.3. We started this discussion here: #435 (comment).

This won't work though without us disabling or changing .NET consolidation verification in the build workflow.

Describe the solution you'd like

Describe alternatives you've considered

Disabling .NET consolidation verification, but that opens up another can of worms.

Jira issue

@Piedone Piedone added the enhancement New feature or request label May 17, 2024
@github-actions github-actions bot changed the title Target Orchard Core 1.8 in packages Target Orchard Core 1.8 in packages (OCC-252) May 17, 2024
@sarahelsaig
Copy link
Contributor

I've tried to push a prerelease package and the publish-nuget failed failed with "Forbidden" API response
@sebastienros could it be that the nuget key in the NUGET_API_KEY secret has expired?

@Piedone
Copy link
Member Author

Piedone commented May 23, 2024

Since it was updated a year ago, almost certainly that's the case. Since I (and Benedek too) am a co-admin of the Orchard org, I could add the LombiqBot user as a collaborator, and create an API key under it just for pushing OCC packages. Updated, now it should work. We'll also keep this up-to-date from now on.

BTW for prereleases we have Cloudsmith, no?

@sarahelsaig
Copy link
Contributor

Not a year ago, just two months. We had a NuGet release (2.0.0) in March. It worked fine then.

Cloudsmith is only configured for automatic releases, iirc I can't manually create one there. I need to verify that the dependencies are on the correct version in the NuGet publish before making the 2.1.0 release.

@Piedone
Copy link
Member Author

Piedone commented May 23, 2024

I mean, the NuGet key (its GitHub secret) was updated a year ago.

Cloudsmith publishes also run on preview tags: https://github.com/OrchardCMS/OrchardCore.Commerce/blob/main/.github/workflows/publish-cloudsmith.yml#L8

@sarahelsaig
Copy link
Contributor

Okay, I've checked the resulting nuspec file from the cloudsmith publish and they indeed use OC 1.8.0 so this is good.

@sarahelsaig
Copy link
Contributor

I still can't publish to NuGet, now trying to push tag v2.1.0 I get this:

Pushing OrchardCore.Commerce.2.1.0.nupkg to 'https://www.nuget.org/api/v2/package'...
  PUT https://www.nuget.org/api/v2/package/
  Forbidden https://www.nuget.org/api/v2/package/ 338ms
error: Response status code does not indicate success: 403 (The specified API key is invalid, has expired, or does not have permission to access the specified package.).


Usage: dotnet nuget push [arguments] [options]

Arguments:
  [root]  Specify the path to the package and your API key to push the package to the server.

Options:
  -h|--help                      Show help information
  --force-english-output         Forces the application to run using an invariant, English-based culture.
  -s|--source <source>           Package source (URL, UNC/folder path or package source name) to use. Defaults to DefaultPushSource if specified in NuGet.Config.
  -ss|--symbol-source <source>   Symbol server URL to use.
  -t|--timeout <timeout>         Timeout for pushing to a server in seconds. Defaults to 300 seconds (5 minutes).
  -k|--api-key <apiKey>          The API key for the server.
  -sk|--symbol-api-key <apiKey>  The API key for the symbol server.
  -d|--disable-buffering         Disable buffering when pushing to an HTTP(S) server to decrease memory usage.
  -n|--no-symbols                If a symbols package exists, it will not be pushed to a symbols server.
  --no-service-endpoint          Does not append "api/v2/package" to the source URL.
  --interactive                  Allow the command to block and require manual action for operations like authentication.
  --skip-duplicate               If a package and version already exists, skip it and continue with the next package in the push, if any.

Error: Process completed with exit code 1.

@Piedone
Copy link
Member Author

Piedone commented May 24, 2024

Hehh, I misconfigured the key so it matched all OCC packages except for OrchardCore.Commerce itself. Fixed that, and now it published correctly.

BTW there's also this error:

error: Package 'OrchardCore.Commerce.Payment.Exactly' is incompatible with 'all' frameworks in project 'TempProject.csproj'.
Warning:  Package version couldn't be added, thus package validation to baseline version won't be done.

@sarahelsaig
Copy link
Contributor

I think that's only because OrchardCore.Commerce.Payment.Exactly didn't exist in the previous (v2.0.0) NuGet release. Not sure what's that about all frameworks though.

@Piedone
Copy link
Member Author

Piedone commented May 24, 2024

Yeah, most possibly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants