Skip to content

chore: update go to v1.25#48

Merged
fabiomatavelli-f3 merged 7 commits into
masterfrom
fmatavelli-update-go
Feb 10, 2026
Merged

chore: update go to v1.25#48
fabiomatavelli-f3 merged 7 commits into
masterfrom
fmatavelli-update-go

Conversation

@fabiomatavelli-f3

@fabiomatavelli-f3 fabiomatavelli-f3 commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Update Go to v1.25, modernise CI workflows, and improve the provider reliability.

Ref.: form3tech/project-ctp#9

Changes

Go & Dependencies

  • Upgrade Go from 1.18 to 1.25 in go.mod
  • Promote golang.org/x/oauth2 to a direct dependency
  • Vendor dependencies committed to the repository (removed vendor/ from .gitignore)

CI/CD Workflows

  • ci.yaml: Simplified and modernised the CI pipeline
    • Replaced pinned-but-outdated GitHub Actions with newer versions (actions/checkout@v4, actions/setup-go@v5)
    • Added proper permissions (id-token, contents, pull-requests)
    • Added concurrency control to cancel in-progress runs for the same branch
    • Removed the publish job (moved to a dedicated release workflow)
    • Environment variables (TF_ACC, COMMIT_MESSAGE_PREFIX, GITHUB_TOKEN, etc.) are now set at the workflow level
  • release.yaml (new): Added a dedicated release workflow that triggers on pushes to master, using the shared form3tech/tfe-providers-gh-workflows reusable workflow

Bug Fixes

  • Branch support in commits: Pass the Branch field to commit.CreateCommit in both create/update and delete operations, ensuring commits target the correct branch instead of defaulting
  • Archived repository handling: When deleting a file resource, check if the target repository is archived first. If it is, gracefully skip the delete and remove the resource from state instead of failing

Tests

  • Self-contained tests: Tests now run against the same repository (form3tech-oss/terraform-provider-githubfile) on a dynamically created branch (acc-test-<random>), eliminating the dependency on the external terraform-provider-githubfile-test repository
  • Automatic cleanup: A TestMain function ensures the test branch is deleted after all tests complete
  • Unit tests for delete behaviour: Added TestResourceFileDelete_ArchivedRepo and TestResourceFileDelete_NonArchivedRepo_FileNotFound using a mock HTTP server to validate the archived-repo and file-not-found edge cases

Misc

  • Quoted variable references in Makefile test target for robustness
  • Removed GO111MODULE=on env from goreleaser.yaml (unnecessary with Go 1.25)

@fabiomatavelli-f3 fabiomatavelli-f3 requested a review from a team as a code owner February 9, 2026 19:23
@fabiomatavelli-f3 fabiomatavelli-f3 force-pushed the fmatavelli-update-go branch 5 times, most recently from eeddbcf to 6718531 Compare February 10, 2026 16:13
@fabiomatavelli-f3 fabiomatavelli-f3 merged commit 2342bc7 into master Feb 10, 2026
1 check passed
@fabiomatavelli-f3 fabiomatavelli-f3 deleted the fmatavelli-update-go branch February 10, 2026 17:34
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.

2 participants