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

DependabotSemver Service Test and Badge Failing #7267

Closed
calebcartwright opened this issue Nov 13, 2021 · 1 comment · Fixed by #7274
Closed

DependabotSemver Service Test and Badge Failing #7267

calebcartwright opened this issue Nov 13, 2021 · 1 comment · Fixed by #7274
Labels
keep-service-tests-green Related to fixing failing tests of the services needs-discussion A consensus is needed to move forward service-badge Accepted and actionable changes, features, and bugs

Comments

@calebcartwright
Copy link
Member

🕚 When did the problem start?
~5 days ago, November 8th

📷 Live badge

https://img.shields.io/dependabot/semver/bundler/puma

🔧 Is the live badge working?

🔗 CircleCI link
https://app.circleci.com/pipelines/github/badges/daily-tests/1321/workflows/0b53d87a-2480-4b3e-bb3a-22f88e3d9938/jobs/2223

🐞 Stack trace

ValidationError: message mismatch: "value" with value "inaccessible" fails to match the required pattern: /^[1-9][0-9]?%|^100%|^0%$/
    at Object.exports.process (node_modules/joi/lib/errors.js:184:16)
    at Object.internals.entry (node_modules/joi/lib/validator.js:150:26)
    at Object.exports.entry (node_modules/joi/lib/validator.js:27:30)
    at internals.Base.validate (node_modules/joi/lib/base.js:548:26)
    at Object.internals.assert (node_modules/joi/lib/index.js:225:27)
    at Object.attempt (node_modules/joi/lib/index.js:107:26)
    at Function._expectField (file:///home/circleci/project/shields/core/service-test-runner/icedfrisby-shields.js:74:13)
    at IcedFrisbyNock.<anonymous> (file:///home/circleci/project/shields/core/service-test-runner/icedfrisby-shields.js:55:26)
    at IcedFrisbyNock.<anonymous> (node_modules/icedfrisby/lib/icedfrisby.js:954:10)
    at invokeNextHook (node_modules/icedfrisby/lib/icedfrisby.js:1003:24)
    at /home/circleci/project/shields/node_modules/icedfrisby/lib/icedfrisby.js:1017:7
    at new Promise (<anonymous>)
    at IcedFrisbyNock._runHooks (node_modules/icedfrisby/lib/icedfrisby.js:976:12)
    at IcedFrisbyNock.run (node_modules/icedfrisby/lib/icedfrisby.js:1276:20)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Context.<anonymous> (node_modules/icedfrisby/lib/icedfrisby.js:1348:9)

💡 Possible solution

It seems that the API contract has changed on us and now requires two additional parameters. Obviously our existing requests don't send those new parameters so we're getting 400 responses with complaints about bad requests.

curl "https://dependabot-badges.githubapp.com/badges/compatibility_score?package-manager=bundler&dependency-name=puma&version-scheme=semver"
{"errors":[{"status":400,"title":"Bad Request","detail":"Missing required parameter: previous-version"}]}

The API now wants both a previous-version and new-version to be provided in the query params. Part of me wonders if this amounts to an incredibly similar, but technically new data point since it's now between explicit pairs (and I don't know if the prior/original percentage reflected an aggregate for the package, ranges, etc.)

https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-select&package-manager=npm_and_yarn&previous-version=4.3.1&new-version=5.0.0

I think we can try to follow up with GitHub to see if the old API exists in any shape or form, but if not, then I'd lean towards deprecating the current badge. We could create a "new" badge that has new required route parameters to account for the previous and new versions, though I'm not sure how much utility that will provide for our users given what seems to be an exact version pinning

@calebcartwright calebcartwright added service-badge Accepted and actionable changes, features, and bugs needs-discussion A consensus is needed to move forward keep-service-tests-green Related to fixing failing tests of the services labels Nov 13, 2021
@chris48s
Copy link
Member

I had a quick look at the stats for this on https://metrics.shields.io and we serve hardly any of these. In the last 24 hours we served 33 requests for the dependabot compatibility badge and I think moving to an explicit from/to version pair makes the already narrow use-case for this even narrower. If we do need to remove it I think it will be low impact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-service-tests-green Related to fixing failing tests of the services needs-discussion A consensus is needed to move forward service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants