Skip to content

feat: POST endpoint for versions#15

Merged
mtruj013 merged 3 commits into
mainfrom
post-version-endpoint
Apr 20, 2026
Merged

feat: POST endpoint for versions#15
mtruj013 merged 3 commits into
mainfrom
post-version-endpoint

Conversation

@mtruj013
Copy link
Copy Markdown
Collaborator

@mtruj013 mtruj013 commented Apr 13, 2026

Done

  • Added POST endpoint for versions and related tests
  • Drive by's:
    • Updated ARTIFACT_TYPES to remove other as an option
    • Updated version schema to replace pro_supported with 2 new fields, esm_pro_supported and break_bug_pro_supported
    • Updated existing tests and helpers to make use of is_hidden version field

QA

  • See that tests pass
  • For a more thorough QA:
    • Run the site using the command dotrun
    • Add a couple versions and see that everything passes as intended, sample curls here

Issue / Card

https://warthogs.atlassian.net/browse/WD-33168

@mtruj013 mtruj013 changed the title Update pro support fields, add POST endpoint for versions and related… feat: POST endpoint for versions Apr 13, 2026
Copy link
Copy Markdown

@britneywwc britneywwc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a check to ensure that release_date will be before the other supported dates? This could be helpful to prevent user errors

i.e this payload goes through

'{
    "release": "2.1.0",
    "architecture": ["amd64"],
    "release_date": {"date": "2028-06-01"},
    "supported": {"date": "2027-06-01"},
    "esm_pro_supported": {"date": "2028-06-01"},
    "break_bug_pro_supported": {"date": "2029-06-01"},
    "legacy_supported": {"notes": "Supported until further notice"}
  }'

@mtruj013
Copy link
Copy Markdown
Collaborator Author

Thanks @britneywwc, great catch/suggestion. I've added the check and related tests, could you check again?

Comment thread webapp/schemas.py
validate=Length(min=1),
)
release_date = fields.Nested(DateOrNoteSchema, required=True)
supported = fields.Nested(DateOrNoteSchema, required=True)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
    "release": "7.0.0",
    "architecture": ["amd64"],
    "release_date": {"date": "2026-06-01"},
    "supported": {"date": "not-a-real-date"},
    "esm_pro_supported": {"date": "2028-06-01"},
    "break_bug_pro_supported": {"date": "2029-06-01"},
    "legacy_supported": {"notes": "Supported until further notice"}
}

This payload goes through where the date is not a real date. Is this expected behavior?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, that's a bug. Thanks for catching!

@mtruj013 mtruj013 requested a review from Skazitron April 20, 2026 14:07
Copy link
Copy Markdown

@Skazitron Skazitron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtruj013 LGTM!

@mtruj013 mtruj013 merged commit 9dad42a into main Apr 20, 2026
4 checks passed
@mtruj013 mtruj013 deleted the post-version-endpoint branch April 20, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants