Skip to content

Add active terraform dependency collection for automerge classification#1049

Open
Copilot wants to merge 2 commits into
mainfrom
copilot/add-terraform-dependency-collection
Open

Add active terraform dependency collection for automerge classification#1049
Copilot wants to merge 2 commits into
mainfrom
copilot/add-terraform-dependency-collection

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 25, 2026

This change adds a dedicated terraform dependency collection to automerge routing, including Terraform, OpenTofu, and Terragrunt-related files. The new collection is configured as active so terraform-only dependency update PRs can be classified and proceed through automerge gates.

  • Collection config update

    • Added a new terraform entry to config/obs/automerge-dependency-collections.json.
    • Marked the collection as active: true.
    • Included Terraform and related file patterns:
      • **/*.tf
      • **/*.tfvars
      • **/*.tfvars.json
      • **/.terraform.lock.hcl
      • **/terragrunt.hcl
      • **/.opentofu-version
      • **/.terraform-version
      • **/.terragrunt-version
  • Classifier coverage

    • Extended tests/unit/classifyAutomergeDependencyCollection.test.ts with a focused unit test that verifies terraform-only changes classify as:
      • status: 'allowed'
      • collectionId: 'terraform'

Example config fragment:

{
  "id": "terraform",
  "description": "Terraform/OpenTofu/Terragrunt dependency and lockfile updates",
  "active": true,
  "file-glob": [
    "**/*.tf",
    "**/*.tfvars",
    "**/*.tfvars.json",
    "**/.terraform.lock.hcl",
    "**/terragrunt.hcl",
    "**/.opentofu-version",
    "**/.terraform-version",
    "**/.terragrunt-version"
  ]
}

Agent-Logs-Url: https://github.com/elastic/oblt-aw/sessions/b9621ec9-29e4-4f35-a57a-484be55ea4ef

Co-authored-by: fr4nc1sc0-r4m0n <215478872+fr4nc1sc0-r4m0n@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new dependency collection for terraform Add active terraform dependency collection for automerge classification May 25, 2026
Copilot AI requested a review from fr4nc1sc0-r4m0n May 25, 2026 09:26
Copy link
Copy Markdown
Contributor

@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n left a comment

Choose a reason for hiding this comment

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

LGTM

@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n marked this pull request as ready for review May 25, 2026 09:31
Copilot AI review requested due to automatic review settings May 25, 2026 09:31
@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n requested a review from a team May 25, 2026 09:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an active terraform dependency collection to the Observability automerge dependency-collection classifier so Terraform/OpenTofu/Terragrunt-only dependency update PRs can be routed through the “allowed” automerge path.

Changes:

  • Added a new active terraform collection with Terraform/OpenTofu/Terragrunt file globs to config/obs/automerge-dependency-collections.json.
  • Added a unit test ensuring terraform-only changed files classify as { status: 'allowed', collectionId: 'terraform' }.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
config/obs/automerge-dependency-collections.json Adds an active terraform collection with Terraform/OpenTofu/Terragrunt-related file patterns for classification.
tests/unit/classifyAutomergeDependencyCollection.test.ts Adds coverage to verify terraform-only changes are classified as allowed under the new collection.

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

Copy link
Copy Markdown
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

Can you confirm with @elastic/observablt-dx if they have any concerns? I don't recall they actually use terraform in any oblt-* repositories but just wanna play safe here

@fr4nc1sc0-r4m0n
Copy link
Copy Markdown
Contributor

Can you confirm with @elastic/observablt-dx if they have any concerns? I don't recall they actually use terraform in any oblt-* repositories but just wanna play safe here

@elastic/observablt-dx do you have any concern about activating this dependency collection to allow the automerge on these related version bumps?

@Coolomina
Copy link
Copy Markdown

Can you confirm with @elastic/observablt-dx if they have any concerns? I don't recall they actually use terraform in any oblt-* repositories but just wanna play safe here

@elastic/observablt-dx do you have any concern about activating this dependency collection to allow the automerge on these related version bumps?

What effort is this PR part of?. We heavily rely on Terraform on oblt-framework.

What version will this config bump exactly?

@fr4nc1sc0-r4m0n
Copy link
Copy Markdown
Contributor

fr4nc1sc0-r4m0n commented May 27, 2026

Can you confirm with @elastic/observablt-dx if they have any concerns? I don't recall they actually use terraform in any oblt-* repositories but just wanna play safe here

@elastic/observablt-dx do you have any concern about activating this dependency collection to allow the automerge on these related version bumps?

What effort is this PR part of?. We heavily rely on Terraform on oblt-framework.

What version will this config bump exactly?

This is related with this issue https://github.com/elastic/observability-robots/issues/4425.
But @Coolomina let me clarify this because this is not going to bump any version.
What we are doing here is to enable the [automerge agentic workflow](https://github.com/elastic/oblt-aw/blob/main/docs/workflows/oblt-aw-automerge.md) (which already contains a multiple internal pre evaluations before: dependency-review, required checks, etc.) when the bump is being categorized as one of the active categories (see https://github.com/elastic/oblt-aw/blob/main/config/obs/automerge-dependency-collections.json).
When a version bump will be categorized as an active category? Basically both things:

So basically what we are pretending to do here in natural language is: should we merge automatically the PRs that contains bump versions related with terraform files that are categorized as moderate to low-risk by the dependency review agentic workflow and passes all the additional validations?

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.

Add new dependency collection: terraform

5 participants