Skip to content

chore: autogen otel using skill#4533

Draft
maastha wants to merge 10 commits into
masterfrom
cursor-skill-autogen-otel
Draft

chore: autogen otel using skill#4533
maastha wants to merge 10 commits into
masterfrom
cursor-skill-autogen-otel

Conversation

@maastha

@maastha maastha commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Please include a summary of the fix/feature/change, including any relevant motivation and context.

Link to any related issue(s):

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fix and verified my code
  • If changes include deprecations or removals I have added appropriate changelog entries.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

Copilot AI review requested due to automatic review settings June 24, 2026 16:34
@github-actions

Copy link
Copy Markdown
Contributor

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Additionally, the subject of the title must start with an uppercase character (e.g. feat: New search component).

Details: contributing development guide

The subject "autogen otel using skill" found in the pull request title "chore: autogen otel using skill"
didn't match the configured pattern. Please ensure that the subject
starts with an uppercase character.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new autogenerated Terraform resource/data sources for Atlas Metric Integrations (OTEL metrics export), wires them into the provider, and adds supporting codegen configuration + helper “skill” scripts for regenerating resources from different OpenAPI spec sources.

Changes:

  • Add autogenerated mongodbatlas_metric_integration resource plus singular/plural data sources under internal/serviceapi/metricintegration.
  • Register the new resource/data sources in the framework provider and add an acceptance test.
  • Update codegen inputs (tools/codegen/config.yml, model YAML, and flattened OpenAPI spec) and add .cursor/skills/autogen-resource-from-mms scripts/docs.

Reviewed changes

Copilot reviewed 10 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tools/codegen/models/metric_integration.yaml New codegen model describing metric integration schema/operations.
tools/codegen/config.yml Adds codegen configuration for the new metric_integration resource + data sources.
tools/codegen/atlasapispec/multi-version-api-spec.flattened.yml Updates flattened OpenAPI spec snapshot used for generation.
internal/serviceapi/metricintegration/resource.go Autogenerated CRUD implementation for the new resource.
internal/serviceapi/metricintegration/resource_schema.go Autogenerated Terraform schema + TF models for the resource.
internal/serviceapi/metricintegration/data_source.go Autogenerated singular data source implementation.
internal/serviceapi/metricintegration/data_source_schema.go Autogenerated singular data source schema + TF models.
internal/serviceapi/metricintegration/plural_data_source.go Autogenerated plural data source implementation (list).
internal/serviceapi/metricintegration/plural_data_source_schema.go Autogenerated plural data source schema + TF models.
internal/serviceapi/metricintegration/resource_test.go New acceptance test covering basic create/update/import/destroy.
internal/serviceapi/metricintegration/main_test.go TestMain wiring for acceptance tests in this package.
internal/provider/provider.go Registers the new resource and data sources in the provider.
.cursor/skills/autogen-resource-from-mms/SKILL.md Adds internal “skill” documentation for end-to-end autogen workflow.
.cursor/skills/autogen-resource-from-mms/scripts/autogen-resource.sh Wrapper script to fetch+flatten+generate.
.cursor/skills/autogen-resource-from-mms/scripts/fetch-spec.sh Fetches OpenAPI spec from prod/dev or MMS branch/PR.
.cursor/skills/autogen-resource-from-mms/scripts/flatten-spec.sh Flattens fetched spec for codegen.
.cursor/skills/autogen-resource-from-mms/scripts/generate-resource.sh Runs the generator and prints generated file paths.
Files not reviewed (6)
  • internal/serviceapi/metricintegration/data_source.go: Generated file
  • internal/serviceapi/metricintegration/data_source_schema.go: Generated file
  • internal/serviceapi/metricintegration/plural_data_source.go: Generated file
  • internal/serviceapi/metricintegration/plural_data_source_schema.go: Generated file
  • internal/serviceapi/metricintegration/resource.go: Generated file
  • internal/serviceapi/metricintegration/resource_schema.go: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +80 to +90
- string: {}
description: Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
computed_optional_required: required
tf_schema_name: integration_type
tf_model_name: IntegrationType
api_name: integrationType
req_body_usage: all_request_bodies
sensitive: false
create_only: false
present_in_any_response: true
request_only_required_on_create: false
Comment on lines +49 to +52
"integration_type": schema.StringAttribute{
Required: true,
MarkdownDescription: "Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.",
},
Comment on lines +11 to +12
INPUT_SPEC="${1:-tools/codegen/atlasapispec/raw-multi-version-api-spec.json}"
OUTPUT_SPEC="${2:-tools/codegen/atlasapispec/multi-version-api-spec.flattened.yml}"
Comment on lines +20 to +24
if [[ ! -f "$INPUT_SPEC" ]]; then
echo "Error: Input spec not found at ${INPUT_SPEC}"
echo "Run fetch-mms-spec.sh first to download the spec"
exit 1
fi
Comment on lines 341 to +344
logintegration.DataSource,
logintegration.PluralDataSource,
metricintegration.DataSource,
metricintegration.PluralDataSource,
@svc-apix-Bot

Copy link
Copy Markdown
Collaborator

This PR has gone 7 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 7 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@marcabreracast marcabreracast added the not_stale Not stale issue or PR label Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not_stale Not stale issue or PR stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants