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

Y24-475 [PR] [BUG] Improve integration suite UAT actions error message #4596

Merged

Conversation

yoldas
Copy link
Member

@yoldas yoldas commented Jan 14, 2025

Closes #

Changes proposed in this pull request

  • Add validations to the UAT actions that are most likely to raise exceptions at the beginning of WIP pipelines, in order to prevent misleading responses
    • 500 Internal Server Error, because of null access
    • 404 Not Found Error, because of ActiveRecord::RecordNotFound exception
  • Add error messages for the non-existent records, so they are properly serialised into JSON by the UAT action controller and added to the response
    • 422 Unprocessable Content

See also command line examples in the story comment sanger/General-Backlog-Items#477 (comment)

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.41%. Comparing base (644d4c1) to head (e324a76).
Report is 19 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4596      +/-   ##
===========================================
+ Coverage    89.28%   89.41%   +0.12%     
===========================================
  Files         1407     1407              
  Lines        30244    30332      +88     
===========================================
+ Hits         27003    27121     +118     
+ Misses        3241     3211      -30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yoldas yoldas marked this pull request as ready for review January 14, 2025 22:42
Copy link
Contributor

@BenTopping BenTopping left a comment

Choose a reason for hiding this comment

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

Good comprehensive error messaging and test coverage, nice work.

Just wondering about combining presence validation and existing record validation into one in some places so we don't perform multiple checks.

app/uat_actions/uat_actions/generate_sample_manifest.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@BenTopping BenTopping left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@yoldas yoldas merged commit 49baaf3 into develop Jan 16, 2025
25 checks passed
@yoldas yoldas deleted the y24-475-bug-improve-integration-suite-uat-actions-error-message branch January 16, 2025 12:46
@yoldas yoldas removed the request for review from andrewsparkes January 16, 2025 12:47
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.

Y24-475 - [BUG] Improve integration suite UAT actions error message.
2 participants