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

Closed
calebcartwright opened this issue Aug 1, 2020 · 2 comments
Closed

GitHub Deployments Service Test schema missing variant #5389

calebcartwright opened this issue Aug 1, 2020 · 2 comments
Labels
good first issue New contributors, join in! hacktoberfest Same as "good first issue"

Comments

@calebcartwright
Copy link
Member

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

@dominikbrandon
Copy link
Contributor

Hello there, I've just opened the PR addressing this issue - #5704. Please let me know if any further work will be necessary.

@homersimpsons
Copy link
Contributor

Shouldn't this one be close as #5704 is merged?

@chris48s chris48s closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue New contributors, join in! hacktoberfest Same as "good first issue"
Projects
None yet
Development

No branches or pull requests

4 participants