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

Plugin site improperly displays GH releases with empty title #4331

Closed
daniel-beck opened this issue Oct 7, 2024 · 10 comments
Closed

Plugin site improperly displays GH releases with empty title #4331

daniel-beck opened this issue Oct 7, 2024 · 10 comments
Assignees
Labels
bug Something isn't working plugins.jenkins.io

Comments

@daniel-beck
Copy link

daniel-beck commented Oct 7, 2024

Service(s)

plugins.jenkins.io

Summary

For example, https://github.com/jenkinsci/credentials-plugin/releases/tag/1381.v2c3a_12074da_b_

GH shows:

Screenshot 2024-10-07 at 10 12 08

Plugins site shows:

Screenshot 2024-10-07 at 10 12 19

Given title is optional and defaults to the tag name if unspecified, this seems like a bug on the plugins site.

Reproduction steps

No response

@daniel-beck daniel-beck added the triage Incoming issues that need review label Oct 7, 2024
@smerle33 smerle33 added bug Something isn't working and removed triage Incoming issues that need review labels Oct 8, 2024
@alecharp
Copy link

alecharp commented Oct 8, 2024

Hi @daniel-beck. I noticed that it happens also on https://plugins.jenkins.io/credentials/releases/#version_1371.1373.v4eb_fa_b_7161e9 which seems to be both related to security releases. Has something been done differently on those releases?

I'll check the plugin-site code to see where the release title is gathered from.

@alecharp
Copy link

alecharp commented Oct 8, 2024

from https://github.com/jenkins-infra/plugin-site/blob/18a6674e117a109630ba6b2d1357bec7c64f0439/plugins/plugin-site/src/components/PluginReleases.jsx#L24, the data seems to be coming from https://plugin-site-issues.jenkins.io/api/plugin/credentials/releases where the "name" of the release 1381.v2c3a_12074da_b_ is not the version but credentials-plugin.

This error seems to be coming from https://github.com/jenkins-infra/docker-plugin-site-issues/blob/5d0cca43fec1cb36fa4549c2b39e49da943d2a62/src/db.ts#L241

@timja
Copy link
Member

timja commented Oct 8, 2024

I expect should be release.name || release.tag_name

@daniel-beck
Copy link
Author

daniel-beck commented Oct 8, 2024

Has something been done differently on those releases?

I created them manually (sort of*), not specifying an explicit release name (as it's not needed by GH when it would be the same as the tag), perhaps unlike what usual JEP-229 scripts do.

I expect that @timja's correct about what the solution should be to be consistent with GH.

* I create corresponding releases in private repos in `jenkinsci-cert` beforehand, then copy them over on release day using a script. GH API payload:
{
  "tag_name": "1381.v2c3a_12074da_b_",
  "name": "",
  "body": "<!-- Optional: add a release summary here -->\r\n## 🔒  Security fixes\r\n\r\n* Fix [SECURITY-3373](https://www.jenkins.io/security/advisory/2024-10-02/#SECURITY-3373). This fix requires Jenkins 2.479 or newer, LTS 2.462.3 or newer, to be effective.\r\n"
}

@alecharp
Copy link

Yes so the problem is that the name was empty when created. And the value was "stored".
I wonderer is we can discard the "stored" value by restarting the docker-plugin-site-issues or something like that. I don't know how that works.

@timja
Copy link
Member

timja commented Oct 10, 2024

Isn't it still empty though?

@alecharp
Copy link

correct. I could run gh release --repo jenkinsci/credentials-plugin view 1381.v2c3a_12074da_b_ --json name is still empty. This is odd but your fix seems the most promising one @timja.

@alecharp
Copy link

You can assign this to me, I'm trying to solve it and add tests for it.

@dduportal
Copy link
Contributor

@dduportal
Copy link
Contributor

Looks good, thanks folks!

Capture d’écran 2024-10-15 à 11 03 57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugins.jenkins.io
Projects
None yet
Development

No branches or pull requests

5 participants