299 Commits

Author SHA1 Message Date
Martin Atkins
816e889b63 .github: Include initwd and registry packages in e2etest job
This is admittedly "scope creep" for a job that was originally intended
only to run the end-to-end tests, but we have a separate e2etest job
specifically because some of these tests interact with the live OpenTofu
Registry and certain GitHub repositories and so it's nice to have these
external dependencies isolated into their own job so that outages of any
of these external services should only affect this one test job.

The TF_ACC=1-constrained tests in packages initwd and registry are set up
that way because they too interact with OpenTofu Registry and GitHub
repositories, so grouping these together retains the idea of limited
these external dependencies to only one job while giving us a little more
test coverage for our PR checks.

The motivation for doing this now is that both of these packages had
acceptance tests that had been broken by changes in the past and we didn't
notice because nothing was routinely running these tests:
- package registry had been failing ever since OpenTofu existed because
  one of its tests seems to have been depending on an undocumented registry
  protocol feature that OpenTofu Registry has never implemented
- package initwd got broken more recently by a change to use a dependency
  inversion style for the module installer's use of module registry client
  and package fetcher, but these particular tests were not passing in
  working clients for the module installer to use.

Both of those problems were already fixed in earlier commits, and so this
is just an attempt to avoid similar problems happening again in future.

(This doesn't address the more common case of acceptance tests that require
live credentials to access a service that doesn't support anonymous access.
Those will still need to run manually in development environments because
we cannot pass live credentials to a job that runs in response to
third-party pull requests.)

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-12-05 07:24:38 -08:00
Diógenes Fernandes
530e5c4538 Fix linting on Windows (#3457)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
Signed-off-by: Diógenes Fernandes <diofeher@gmail.com>
Co-authored-by: Martin Atkins <mart@degeneration.co.uk>
2025-12-02 07:11:14 -03:00
Andrei Ciobanu
c29cd93f21 [main] Fixes for GH workflows for older OpenTofu versions (#3485)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-11-11 11:12:20 +02:00
Martin Atkins
7ebb93a163 .github: Checks uses Makefile to run golangci-lint
For anything we run as PR checks it should always be straightforward to
recreate any failure locally in a development environment, so instead of
using the golangci/golangci-lint-action GitHub action (whose behavior
is nontrivial and annoying to reproduce outside of GitHub Actions) we'll
just use our existing Makefile target as part of the check run, matching
how we deal with most other similar concerns in this GitHub Actions
workflow.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-11-01 08:00:01 -03:00
Martin Atkins
cdb2c1a213 .github: Use golangci-lint v2.6.0 in our PR checks
This is just a routine upgrade, keeping us up-to-date with the latest
linter changes. This already passes when run on Linux.

We know that currently the lint checks aren't passing on Windows even with
v2.4.0, and this doesn't do anything about that but it does mean that once
we make the linters pass on Windows we'll be dealing with the full set
supported in v2.6.0, rather than potentially having to do this across
two commits.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-11-01 08:00:01 -03:00
Christian Mesh
dd642bd53f Begin the v1.12.x development period
The v1.11 series will now continue maintenence in the v1.11 branch, and
so this branch is now tracking the work for the forthcoming v1.12 series.

Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-10-23 11:00:02 -07:00
James Humphries
eff8f3faba Add goreleaser key to main release process (#3423)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-10-23 15:38:12 +01:00
James Humphries
67ea4faab6 Ensure we use goreleaser-pro for release build workflow (#3421)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-10-23 15:14:23 +01:00
Andrei Ciobanu
195a131042 Add steps to alter version/VERSION for the nightly builds (#3399)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-21 13:28:39 +03:00
Martin Atkins
e74bf2d0a1 go.mod: Use the new "tool" directive
Previously the Go toolchain had no explicit support for "tools" and so we
used the typical Go community workaround of adding "tools.go" files (two,
for some reason) that existed only to trick the Go toolchain into
considering the tools as dependencies we could track in go.mod.

Go 1.24 introduced explicit support for tracking tools as part of go.mod,
and the ability to run those using "go tool" instead of "go run", and so
this commit switches us over to using that strategy for everything we were
previously managing in tools.go.

There are some intentional exceptions here:

- The protobuf-compile script can't use "go tool" or "go run" because the
  tools in question are run only indirectly through protoc. However, we
  do still use the "tool" directive in go.mod to tell the Go toolchain that
  we depend on those tools, so that it'll track which versions we are
  currently using as part of go.mod.
- Our golangci-lint Makefile target uses "go run" to run a specific
  version of golangci-lint. We _intentionally_ don't consider that tool
  to be a direct dependency of OpenTofu because it has a lot of indirect
  dependencies that would pollute our go.mod file. Therefore that continues
  to use "go run" after this commit.
- Both of our tools.go files previously referred to
  github.com/nishanths/exhaustive , but nothing actually appears to be
  using that tool in the current OpenTofu tree, so it's no longer a
  dependency after this commit.

All of the dependencies we have _only_ for tools are now classified as
"indirect" in the go.mod file. This is the default behavior of the Go
toolchain and appears to be motivated by making it clearer that these
modules do not contribute anything to the runtime behavior of OpenTofu.
This also corrected a historical oddity in our go.mod where for some reason
the "indirect" dependencies had been split across two different "require"
directives; they are now all grouped together in a single directive.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-10 07:06:56 -03:00
Martin Atkins
b8e67c0362 .github/workflows: Add windows_amd64 to unit test matrix (#3055)
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-09-30 16:00:40 -03:00
Diógenes Fernandes
720961605d Replace AWS with local provider to fix end-to-end test on darwin_amd64 (#3224)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-09-03 09:04:12 -03:00
Diógenes Fernandes
a1c8b3163a improve go.mod and go.sum consistency checks (#3210)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-08-29 13:58:05 -03:00
Diógenes Fernandes
c29311ee82 Ensure internal/*.tf files have the same line endings in all platforms (#3189)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-08-27 07:04:42 -03:00
Martin Atkins
234a8b8deb .github/workflows: Run unit tests when go.mod/go.sum files change
In our checks workflow we try to skip running unit tests unless Go files
have changed, but we didn't previously consider "go.mod" and "go.sum" as
"Go files".

Changes to our dependencies can change the results of our tests, so we
should run tests even if only the dependencies have changed.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-08-26 06:28:27 -07:00
Martin Atkins
83b9f9245e .github/workflows: Treat workflow changes as Go changes (#3164)
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-08-22 07:12:24 -04:00
Martin Atkins
9a161adbe3 go.mod: Upgrade to Go 1.25 (#3166)
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-08-22 07:10:11 -04:00
James Humphries
dcc0a49bcc Remove bucket check from nightly build (#3152)
Signed-off-by: James Humphries <James@james-humphries.co.uk>
2025-08-18 13:27:23 +01:00
James Humphries
f44a46adbd Move nightly builds out of gpg environment as its no longer needed (#3147)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-08-15 11:26:14 +01:00
James Humphries
14125e466c Added debug logging to rclone setup, removed R2_ACL (#3141)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-08-15 10:12:44 +01:00
James Humphries
37810dd840 Simplify the nightly build process (#3140)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-08-14 10:52:25 +01:00
James Humphries
ee0029965f More nightly build work, hardcode env vars and remove version (#3138)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-08-13 14:33:52 +01:00
James Humphries
117e0d46f0 Use correct goreleaser version (#3130)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-08-12 16:04:19 +01:00
James Humphries
b204fbfcc5 Use goreleaser pro for nightly builds (#3129)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-08-12 15:57:37 +01:00
James Humphries
88ac34a5b7 Added nightly build process - Experimental (#3111)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-08-12 14:25:34 +01:00
Martin Atkins
7fbfabc8ae Make the "Top-Ranking Issues" issue a little more concise
The main motivation here is that we now use PRs rather than issues to
represent RFCs that have not yet been approved, and so the ranking of
issues labeled "rfc" was misleading to include. All of the issues that
were labeled "rfc" that were not "RFC Tracker" issues under our newer
process are also labeled as "enhancement" so they will be included under
the "Top Enhancements" ranking.

While I was tweaking this anyway I also added a short note to the top
explaining how these rankings are generated and removed some of the
visual clutter from the suffixes of the individual list items, which
tended to get wrapped oddly for issues with longer titles.

Finally, the "script" is tweaked a little to do its API requests
anonymously when GITHUB_TOKEN isn't set, which makes it easier to test
locally without accidentally clobbering any real issues (since anonymous
requests cannot modify anything). To _actually_ test this locally I
temporarily made it print its output to stdout, but that particular part
is removed for the final submission.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-07-30 07:57:03 -07:00
Christian Mesh
3c17015702 Include v1.10.0 in govulncheck (#2951)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-06-24 09:10:40 -04:00
Larry Bordowitz
782b817ff9 refactor: lint without revision flag (#2931)
Signed-off-by: Larry Bordowitz <laurence.bordowitz@gmail.com>
2025-06-17 22:07:14 +04:00
Christian Mesh
52700e677e Cleanup github workflows (#2903)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-06-11 07:15:07 -04:00
Christian Mesh
531ade9d35 Skip unnessary workflow checks (#2872)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-05-28 11:30:06 -04:00
Andrei Ciobanu
21a9523ecf [Govulncheck] Fix the command that checks for duplicated reports (#2861)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-05-27 10:59:26 +03:00
Christian Mesh
566ab35b93 Remove Target Release PR template field (#2821)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-05-19 10:26:47 -04:00
Andrei Ciobanu
8396d0459c Add github workflow to run govoulncheck on all branches with supported OpenTofu versions (#2636)
Signed-off-by: yottta <andrei.ciobanu@opentofu.org>
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-05-14 18:26:22 +03:00
Tyler Auerbeck
c84716d37b Bump version of golangci-lint action as it appears older version may not work with v2
Signed-off-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
2025-05-09 14:14:53 -04:00
Tyler Auerbeck
59fcdcd2b8 Update makefile, github workflow to use golangci-lint v2
Signed-off-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
2025-05-09 14:14:53 -04:00
Diógenes Fernandes
56ac5b2fa5 Change Go arch from amd64 to arm64 on macos-latest (#2683)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-04-18 09:20:17 -03:00
Martin Atkins
2b4e7b7def GitHub Actions: Use latest golangci-lint and its GitHub Action
The version we were previously using does not support Go v1.24.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-02-26 11:33:43 -08:00
AbstractionFactory
ecac914580 Issue template overhaul (#2506)
Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
2025-02-13 08:27:12 +01:00
Oleksandr Levchenkov
b8c24e935d update all github actions with no breaking changes (#2478)
Signed-off-by: ollevche <ollevche@gmail.com>
2025-02-05 15:01:58 +02:00
Oleksandr Levchenkov
ad68328582 update all build-opentofu-oss gha (#2474)
Signed-off-by: ollevche <ollevche@gmail.com>
2025-02-05 13:23:18 +02:00
Oleksandr Levchenkov
9b9ae4a25e update actions-packaging-linux gha (#2472)
Signed-off-by: ollevche <ollevche@gmail.com>
2025-02-04 17:54:48 +02:00
Oleksandr Levchenkov
210c0f68b0 update upload and download artifacts gha (#2471)
Signed-off-by: ollevche <ollevche@gmail.com>
2025-02-04 17:14:59 +02:00
AbstractionFactory
1b00b465da Switch to native Linux/ARM64 runners (#2387)
Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
2025-01-24 10:43:47 -05:00
Christian Mesh
73e4a657ae Bump main to 1.10.0-alpha1 now that 1.9 has been branched (#2291)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-12-12 12:13:54 -05:00
Christian Mesh
85dc2615ad Fix packagecloud push skip for alpha/beta/rc (#2256)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-12-05 10:39:55 -05:00
AbstractionFactory
1cdfd7e867 Adding missing changelog entry and go.mod change for #2050 (#2205)
Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
2024-11-22 11:32:10 +01:00
Oleksandr Levchenkov
52cc91c87a upgrade golangci-lint to v1.62 (#2174)
Signed-off-by: ollevche <ollevche@gmail.com>
2024-11-18 19:56:29 +02:00
AbstractionFactory
6ffc1cc0c0 Rewording the feature form (#1992)
Signed-off-by: abstractionfactory <179820029+abstractionfactory@users.noreply.github.com>
Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
2024-09-27 10:22:24 +02:00
Viktor Szépe
bb63574f09 Fix typos (#1954)
Signed-off-by: Viktor Szépe <viktor@szepe.net>
2024-09-17 12:04:30 +02:00
Nathan Baulch
9b7bec31b4 Another batch of minor typos (#1953)
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-09 07:51:39 -04:00