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

Revert "Use old.stats.jenkins.io for JSON data)"; test [jenkins] #10537

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chris48s
Copy link
Member

Closes #10534

@chris48s chris48s added the service-badge Accepted and actionable changes, features, and bugs label Sep 14, 2024
Copy link
Contributor

Warnings
⚠️ This PR modified service code for jenkins but not its test code.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!

Generated by 🚫 dangerJS against 67c76e0

@chris48s
Copy link
Member Author

Hmm, so it seems the "404" response from stats.jenkins.io (e.g: https://stats.jenkins.io/plugin-installation-trend/not-a-plugin.stats.json ) is actually served with a 200 OK status code.

@chris48s
Copy link
Member Author

For the moment, I've raised an issue on
jenkins-infra/helpdesk#4291
If old.stats.jenkins.io goes away before that is resolved, there's a couple of possible options:

  1. Accept the "not found" message for this service is "unparseable json response" and update the tests.
  2. Switch this badge to make a raw call to _request() instead of _requestJson(). If we get back a 200 OK with a HTML body, assume that is a "not found" response. Otherwise, parse it as JSON.

@PyvesB
Copy link
Member

PyvesB commented Sep 15, 2024

Slight preference for option 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Jenkins Plugin Installs for new stats.jenkins.io
2 participants