The Wayback Machine - http://web.archive.org/web/20201006032230/https://github.com/badges/shields/issues/5389
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

GitHub Deployments Service Test schema missing variant #5389

Open
calebcartwright opened this issue Aug 1, 2020 · 0 comments
Open

GitHub Deployments Service Test schema missing variant #5389

calebcartwright opened this issue Aug 1, 2020 · 0 comments

Comments

@calebcartwright
Copy link
Member

@calebcartwright calebcartwright commented Aug 1, 2020

Apparently the latest deployment status can be null while there is a deployment in progress,

image

which we account for within the service class schema accordingly:

latestStatus: Joi.alternatives([
Joi.object({
state: isDeploymentState,
}),
null,

However, our service tests do not:

const validMessages = [
'success',
'error',
'failure',
'inactive',
'in progress',
'queued',
'pending',
]
const isValidMessages = Joi.equal(...validMessages).required()

Ran into this earlier while trying to test a Dependabot PR while Dependabot/Repo Ranger were merging other PRs leading to shields-staging being deployed to during. I know this hasn't exactly been a frequent issue, but probably wouldn't hurt to make some tweaks, either by handling the null case more deliberately in the service class (for example, in what circumstance(s) does this occur and could we map the raw null to a more user-friendly badge message) or updating the service test validation schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.