Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
82c62bc
fix: Update golangci-lint version from v2.5.0 to v2.6.1
osterman Nov 26, 2025
6b7bb74
fix: Update to golangci-lint v2.6.2 and add GITHUB_TOKEN for rate limits
osterman Nov 26, 2025
b7e3300
fix: Add git config to use GITHUB_TOKEN for authenticated clones
osterman Nov 26, 2025
b09cd15
fix: Add git authentication test before custom build
osterman Nov 26, 2025
d1c18a6
fix: Add git safe.directory config and GOFLAGS=-buildvcs=false
osterman Nov 26, 2025
47f216b
Revert to golangci-lint v2.5.0 to match installed binary version
osterman Nov 26, 2025
aecf27a
fix: Fix HOME directory for git operations in GitHub Actions
osterman Nov 26, 2025
946f0c2
Revert to exact working configuration from Nov 25
osterman Nov 26, 2025
8e8129c
debug: Test if git clone works at all in CI environment
osterman Nov 26, 2025
38c8731
debug: Test exact git clone command used by golangci-lint custom
osterman Nov 26, 2025
4043c71
debug: Run golangci-lint custom with verbose output
osterman Nov 26, 2025
480a81b
fix: Pre-configure git advice.detachedHead to work around compatibili…
osterman Nov 26, 2025
2981009
fix: Correct comment - issue is leading space in -c flag
osterman Nov 26, 2025
651e7f8
debug: Test if git version supports advice.detachedHead config
osterman Nov 26, 2025
08d3ab8
fix: Use git wrapper to strip broken -c flag
osterman Nov 27, 2025
a774560
debug: Add logging to git wrapper to diagnose -c flag filtering
osterman Nov 27, 2025
1866a23
fix: Pin golangci-lint to commit with -c flag fix
osterman Nov 27, 2025
8321543
fix: Auto-install gh actions-cache extension in dev commands
osterman Nov 27, 2025
7369a5a
fix: Pin AWS provider to v5.x for LocalStack compatibility
osterman Nov 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .atmos.d/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ commands:
exit 1
fi

# Check if actions-cache extension is installed
if ! gh actions-cache --help &> /dev/null; then
echo "📦 Installing gh actions-cache extension..."
gh extension install actions/gh-actions-cache
fi

# Get cache entries over 1GB
CACHE_ENTRIES=$(gh actions-cache list -R cloudposse/atmos | grep GB)

Expand Down Expand Up @@ -290,6 +296,12 @@ commands:
exit 1
fi

# Check if actions-cache extension is installed
if ! gh actions-cache --help &> /dev/null; then
echo "📦 Installing gh actions-cache extension..."
gh extension install actions/gh-actions-cache
fi

# Get cache entries over 1GB
CACHE_ENTRIES=$(gh actions-cache list -R cloudposse/atmos | grep GB)

Expand Down
57 changes: 13 additions & 44 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,59 +107,28 @@ jobs:
# that includes both standard linters AND our custom module plugins.
- name: Install golangci-lint v2 for custom build
run: |
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.5.0
# Pin to commit that fixes "-c advice.detachedHead=false" bug (PR #6206)
# https://github.com/golangci/golangci-lint/pull/6206
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@101ccaca0df22b2e36dd917ed5d0be423baa6298

# Build a custom golangci-lint binary with our lintroller plugin compiled in.
#
# How this works:
# 1. `golangci-lint custom` reads .custom-gcl.yml
# 2. Clones golangci-lint repo and adds blank imports for each plugin
# 3. Builds a single binary (custom-gcl) containing:
# - All standard golangci-lint linters (bodyclose, cyclop, etc.)
# - All custom plugin linters (lintroller, etc.)
# 4. We copy it to /usr/local/bin/golangci-lint so the action uses it
#
# This approach allows multiple custom linters - just add them to .custom-gcl.yml
# and they'll all be compiled into the same custom-gcl binary.
- name: Build custom golangci-lint with lintroller plugin
run: |
set -e # Exit on any error
set -e

# Ensure lintroller module is ready
cd tools/lintroller && go mod tidy && cd ../..

# Build custom golangci-lint with plugins
if ! golangci-lint custom; then
echo "Error: golangci-lint custom build failed" >&2
exit 1
fi

# Verify the custom binary was created and is executable
if [[ ! -f ./custom-gcl ]]; then
echo "Error: custom-gcl binary not found" >&2
exit 1
fi

if [[ ! -x ./custom-gcl ]]; then
echo "Error: custom-gcl binary is not executable" >&2
exit 1
fi

# Move the system binary out of the way and replace it with our custom one
# This ensures the action uses our custom binary with lintroller
if ! mv ~/go/bin/golangci-lint ~/go/bin/golangci-lint.system; then
echo "Error: failed to move system golangci-lint binary" >&2
exit 1
fi
golangci-lint custom

if ! cp ./custom-gcl ~/go/bin/golangci-lint; then
echo "Error: failed to copy custom-gcl to ~/go/bin/golangci-lint" >&2
exit 1
fi
# Verify the custom binary was created
test -x ./custom-gcl || { echo "Error: custom-gcl not found or not executable"; exit 1; }

if ! chmod +x ~/go/bin/golangci-lint; then
echo "Error: failed to make ~/go/bin/golangci-lint executable" >&2
exit 1
fi
# Replace system binary with our custom one
mv ~/go/bin/golangci-lint ~/go/bin/golangci-lint.system
cp ./custom-gcl ~/go/bin/golangci-lint
chmod +x ~/go/bin/golangci-lint

golangci-lint --version

Expand All @@ -185,7 +154,7 @@ jobs:
- name: Run golangci-lint with lintroller plugin
uses: golangci/golangci-lint-action@v8.0.0
with:
version: v2.5.0
version: 101ccaca0df22b2e36dd917ed5d0be423baa6298
install-mode: none
only-new-issues: true
args: >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}

provider "aws" {
}
Loading