Skip to content

Commit

Permalink
re-use the build cache
Browse files Browse the repository at this point in the history
  • Loading branch information
blampe committed Dec 13, 2024
1 parent c6a8e56 commit 36606aa
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bryce Lampe <[email protected]>
Date: Fri, 13 Dec 2024 13:44:02 -0800
Subject: [PATCH] Speed up providerlint by re-using build cache and ignoring
tests


diff --git a/GNUmakefile b/GNUmakefile
index 9b4adecff8..32137c8919 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -326,9 +326,10 @@ prereq-go: ## If $(GO_VER) is not installed, install it

provider-lint: ## [CI] ProviderLint Checks / providerlint
@echo "make: ProviderLint Checks / providerlint..."
- @cd .ci/providerlint && go install -buildvcs=false .
- @providerlint \
+ @cd .ci/providerlint && go build -buildvcs=false .
+ @.ci/providerlint/providerlint \
-c 1 \
+ -test=false \
-AT001.ignored-filename-suffixes=_data_source_test.go \
-AWSAT006=false \
-AWSR002=false \
2 changes: 0 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ require (
github.com/aws/aws-sdk-go-v2/config v1.28.6
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.43.1
github.com/bflad/tfproviderlint v0.30.0
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.59
github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0
github.com/hashicorp/terraform-provider-aws v1.60.1-0.20220923175450-ca71523cdc36
Expand Down Expand Up @@ -320,7 +319,6 @@ require (
github.com/aws/smithy-go v1.22.1 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/beevik/etree v1.4.1 // indirect
github.com/bflad/gopaniccheck v0.1.0 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.2.0 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
Expand Down
5 changes: 0 additions & 5 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1764,10 +1764,6 @@ github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiE
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
github.com/beevik/etree v1.4.1 h1:PmQJDDYahBGNKDcpdX8uPy1xRCwoCGVUiW669MEirVI=
github.com/beevik/etree v1.4.1/go.mod h1:gPNJNaBGVZ9AwsidazFZyygnd+0pAU38N4D+WemwKNs=
github.com/bflad/gopaniccheck v0.1.0 h1:tJftp+bv42ouERmUMWLoUn/5bi/iQZjHPznM00cP/bU=
github.com/bflad/gopaniccheck v0.1.0/go.mod h1:ZCj2vSr7EqVeDaqVsWN4n2MwdROx1YL+LFo47TSWtsA=
github.com/bflad/tfproviderlint v0.30.0 h1:XBbTGPS4ZagSt4Qtnus3Vgh5yOeHNLZhnjcTcsSJ7ZM=
github.com/bflad/tfproviderlint v0.30.0/go.mod h1:eBZHT0r7HKPGw1uZEyGMzcR1/d+GAXq9KzQfw0I7wtY=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
Expand Down Expand Up @@ -3059,7 +3055,6 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200214201135-548b770e2dfa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
Expand Down
10 changes: 0 additions & 10 deletions provider/upstream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ import (
"os/exec"
"testing"

// Compile these into our test binary directly. Normally these are already
// compiled and cached, but cold boots take a while and we don't want to
// time out during the test if it needs to build providerlint from scratch.
// NB: This is fragile because upstream (and upstream/.ci/providerlint)
// exist in different modules. If our versioning differs we will end up
// re-compiling. It would be beneficial to keep everything in one module.
_ "github.com/bflad/tfproviderlint/passes"
_ "github.com/bflad/tfproviderlint/xpasses"
_ "github.com/hashicorp/aws-sdk-go-base/v2"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down

0 comments on commit 36606aa

Please sign in to comment.