Skip to content

Conversation

simaarfania
Copy link
Contributor

@simaarfania simaarfania commented Jul 9, 2025

This PR fixes the update schema Github workflow (introduced in #2231) to use a comment-based approach when the schema needs to be updated. Previously the workflow attempted to update the schema and commit it, but due to permission issues, this was failing.

See an example of the comment by the github-actions bot below.

Copy link
Contributor

github-actions bot commented Jul 9, 2025

In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically.
To do so, a Grafana Labs employee must trigger the cloud acceptance tests workflow manually.

Copy link
Contributor

github-actions bot commented Jul 9, 2025

⚠️ Schema Update Required

Your changes require a provider schema update. Please run the following commands and push the changes:

# Update the schema
go run scripts/generate_issue_template.go --update-schema

# Commit the changes
git add provider_schema.json .github/ISSUE_TEMPLATE/3-bug-report-enhanced.yml
git commit -m "chore: update provider schema and issue template"
git push

This will update:

  • provider_schema.json - The provider schema
  • .github/ISSUE_TEMPLATE/3-bug-report-enhanced.yml - The issue template

This comment was automatically generated by the update-schema workflow.

Copy link
Contributor

github-actions bot commented Jul 9, 2025

⚠️ Schema Update Required

Your changes require a provider schema update. Please run the following commands and push the changes:

# Update the schema
go run scripts/generate_issue_template.go --update-schema

# Commit the changes
git add provider_schema.json .github/ISSUE_TEMPLATE/3-bug-report-enhanced.yml
git commit -m "chore: update provider schema and issue template"
git push

This will update:

  • provider_schema.json - The provider schema
  • .github/ISSUE_TEMPLATE/3-bug-report-enhanced.yml - The issue template

This comment was automatically generated by the update-schema workflow.

Copy link
Contributor

🔧 Schema Update Required

This PR introduces changes that affect the Terraform provider schema. The issue templates need to be updated.

📋 Required Action

Please run the generator to update templates:

make generate-templates

Then commit the updated files:

  • provider_schema.json
  • .github/ISSUE_TEMPLATE/3-bug-report-enhanced.yml

This comment was generated automatically because schema changes were detected.

This comment has been minimized.

@simaarfania simaarfania marked this pull request as ready for review July 11, 2025 14:12
@simaarfania simaarfania requested a review from a team as a code owner July 11, 2025 14:12
@Duologic
Copy link
Contributor

Can the CI job also fail if running the command is required, effectively blocking the merge?

Copy link
Contributor

🔧 Schema Update Required

This PR introduces changes that affect the Terraform provider schema. The issue templates need to be updated.

📋 Required Action

Please run the generator to update templates:

make generate-templates

Then commit the updated files:

  • provider_schema.json
  • .github/ISSUE_TEMPLATE/3-bug-report-enhanced.yml

This comment was generated automatically because schema changes were detected.

@simaarfania
Copy link
Contributor Author

Can the CI job also fail if running the command is required, effectively blocking the merge?

Successfully does this now. See here

Copy link

@jjo jjo left a comment

Choose a reason for hiding this comment

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

LGTM w/nit

@simaarfania simaarfania merged commit ef550ce into main Jul 14, 2025
84 of 91 checks passed
@simaarfania simaarfania deleted the simaarfania/fix-gha branch July 14, 2025 13:09
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.

4 participants