Skip to content

Fix required-validations Spectral crash in release workflow#1368

Draft
yelizhenden-mdb with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-release-openapi-spec-validation
Draft

Fix required-validations Spectral crash in release workflow#1368
yelizhenden-mdb with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-release-openapi-spec-validation

Conversation

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

Required validations in the DEV release flow were failing in required-validations with Cannot read properties of null (reading 'enum') from Spectral.
This change removes version drift in that job by using the repo-installed Spectral CLI instead of the workflow input version.

Jira ticket: CLOUDP-#

  • Root cause
    • required-spec-validations.yml invoked @stoplight/spectral-cli@"${SPECTRAL_VERSION}" (workflow input), which resolved to a crashing version in this run.
  • Change
    • Switched the required-validations lint command to use the repository dependency (npx spectral lint ...) so it stays aligned with package.json/lockfile.
  • Scope
    • Single-file workflow update; no rule or OpenAPI content changes.
# .github/workflows/required-spec-validations.yml
- name: Run
  id: spectral-validation
  run: npx spectral lint openapi-foas.yaml --ruleset=tools/spectral/.spectral.yaml

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works

Changes to Spectral

  • I have read the README file for Spectral Updates

Further comments

This intentionally keeps behavior unchanged except CLI version resolution in required validations, to eliminate the runtime crash path without expanding the blast radius.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job for Release OpenAPI Spec Fix required-validations Spectral crash in release workflow Jul 8, 2026
Copilot AI requested a review from yelizhenden-mdb July 8, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants