Skip to content

Conversation

@jkoronaAtCisco
Copy link
Contributor

Description

Added checkschema script that allows verifying whether all component config schemas are up-to-date with corresponding Go structs.

Script generates schemas for all components and uses git diff to find if there are any changes.

Testing

Manual testing:

  1. Run make checkschema -> should finish successfully
  2. Change content of receiver/icmpcheckreceiver Go config struct
  3. Run make checkschema -> should finish with error
    (For faster execution you can limit schema generation only to receivers by commenting out other directories in generate-schema task)

…ent config schemas are up-to-date with corresponding Go structs
./cmd/schemagen/run_schemagen_dir.sh ./connector

.PHONY: checkschema
checkschema:
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need a separate target for this. Let's stick to the existing pattern https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/.github/workflows/build-and-test.yml#L139-L172

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