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

Update make generate-openapi to error when API violations occur #1627

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swang392
Copy link
Contributor

@swang392 swang392 commented Jan 15, 2025

What does this PR do?

Updated the make generate-openapi command in Makefile to result in an error when API rule violations are detected.

Motivation

Previously if we make a change to the CRDs that didn't follow the correct formatting to be populated correctly, no error would result when running commands locally (ex: make generate) and warnings wouldn't show up in CI.

Additional Notes

Anything else we should know when reviewing?

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

tested here: #1626

  • remove a field from datadogagent_types.go. Ex: remove a listType, change something from camel case to snake case, remove a description or +optional line.
  • run make generate
  • Verify that the output contains Error: Warnings detected and the command errored

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

@swang392 swang392 added this to the v1.13.0 milestone Jan 15, 2025
@swang392 swang392 added the enhancement New feature or request label Jan 15, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.82%. Comparing base (bc3a576) to head (9df6408).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1627   +/-   ##
=======================================
  Coverage   48.82%   48.82%           
=======================================
  Files         217      217           
  Lines       20874    20874           
=======================================
  Hits        10191    10191           
  Misses      10147    10147           
  Partials      536      536           
Flag Coverage Δ
unittests 48.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc3a576...9df6408. Read the comment docs.

@swang392 swang392 marked this pull request as ready for review January 15, 2025 22:14
@swang392 swang392 requested a review from a team as a code owner January 15, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants