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

feat(APIv2): RHINENG-2149 implement reports endpoint #2046

Merged

Conversation

romanblanco
Copy link
Member

Secure Coding Practices Checklist GitHub Link

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

@romanblanco romanblanco added the APIv2 REST API v2 label Apr 18, 2024
Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

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

You can get inspired by a lot of things from how policies controller + tests are implemented as the DB model is a clone.

app/models/v2/policy.rb Outdated Show resolved Hide resolved
app/models/v2/report.rb Outdated Show resolved Hide resolved
app/models/v2/report.rb Outdated Show resolved Hide resolved
app/models/v2/report.rb Show resolved Hide resolved
app/models/v2/system.rb Outdated Show resolved Hide resolved
app/models/v2/tailoring.rb Outdated Show resolved Hide resolved
app/models/v2/test_result.rb Outdated Show resolved Hide resolved
spec/factories/test_result.rb Outdated Show resolved Hide resolved
spec/factories/test_result.rb Outdated Show resolved Hide resolved
app/policies/v2/report_policy.rb Outdated Show resolved Hide resolved
@romanblanco romanblanco force-pushed the RHINENG-2149-apiv2-reports branch 6 times, most recently from 2392371 to 5b1f309 Compare April 19, 2024 09:41
app/models/v2/report.rb Show resolved Hide resolved
app/models/v2/report.rb Outdated Show resolved Hide resolved
app/models/v2/report.rb Outdated Show resolved Hide resolved
app/models/v2/report.rb Outdated Show resolved Hide resolved
app/models/v2/system.rb Outdated Show resolved Hide resolved
app/models/v2/tailoring.rb Show resolved Hide resolved
app/models/v2/test_result.rb Show resolved Hide resolved
spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/factories/test_result.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
@romanblanco romanblanco force-pushed the RHINENG-2149-apiv2-reports branch 4 times, most recently from 51ccf2d to 36633a1 Compare April 23, 2024 11:41
Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

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

Don't forget about the OpenAPI specs at the end please 🙏

spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
@romanblanco romanblanco force-pushed the RHINENG-2149-apiv2-reports branch 2 times, most recently from 3ee1db8 to 571503e Compare April 25, 2024 08:11
@romanblanco romanblanco force-pushed the RHINENG-2149-apiv2-reports branch 4 times, most recently from a75f7ae to 39f1b7b Compare April 29, 2024 10:45
Copy link

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.79%. Comparing base (18e2ffa) to head (301a340).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2046      +/-   ##
==========================================
+ Coverage   98.77%   98.79%   +0.01%     
==========================================
  Files         224      227       +3     
  Lines        4753     4825      +72     
==========================================
+ Hits         4695     4767      +72     
  Misses         58       58              

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

spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Show resolved Hide resolved
@romanblanco romanblanco force-pushed the RHINENG-2149-apiv2-reports branch 4 times, most recently from 99a73e6 to ca1e448 Compare April 30, 2024 13:36
app/models/v2/report.rb Outdated Show resolved Hide resolved
@romanblanco romanblanco marked this pull request as ready for review May 13, 2024 12:36
@romanblanco romanblanco requested a review from a team as a code owner May 13, 2024 12:36
spec/api/v2/schemas/report.rb Outdated Show resolved Hide resolved
spec/api/v2/schemas/report.rb Outdated Show resolved Hide resolved
spec/api/v2/schemas/report.rb Show resolved Hide resolved
spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
@romanblanco romanblanco force-pushed the RHINENG-2149-apiv2-reports branch 7 times, most recently from 073b053 to 0f10fe7 Compare May 14, 2024 11:51
Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

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

We need tests for some systems in inaccessible inventory groups, that's the main selling point of this endpoint.

spec/factories/report.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
@romanblanco romanblanco force-pushed the RHINENG-2149-apiv2-reports branch 5 times, most recently from e6e7316 to de880f0 Compare May 15, 2024 10:36
app/models/v2/report.rb Outdated Show resolved Hide resolved
spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/controllers/v2/reports_controller_spec.rb Outdated Show resolved Hide resolved
spec/factories/test_result.rb Outdated Show resolved Hide resolved
spec/factories/report.rb Outdated Show resolved Hide resolved
@romanblanco romanblanco force-pushed the RHINENG-2149-apiv2-reports branch 7 times, most recently from 4a055e4 to c61b791 Compare May 17, 2024 10:01
@romanblanco romanblanco enabled auto-merge (rebase) May 17, 2024 10:27
Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

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

The Seal of Approval

@romanblanco romanblanco merged commit 664773c into RedHatInsights:master May 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIv2 REST API v2
Projects
None yet
2 participants