Skip to content

Commit

Permalink
Update conftest version to 0.25.0.
Browse files Browse the repository at this point in the history
Version 0.25.0 solves OOM issue described in [556](open-policy-agent/conftest#556).
  • Loading branch information
msarvar committed May 13, 2021
1 parent cdb4ebd commit ec96d18
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN AVAILABLE_TERRAFORM_VERSIONS="0.8.8 0.9.11 0.10.8 0.11.15 0.12.31 0.13.7 0.1
done && \
ln -s /usr/local/bin/tf/versions/${DEFAULT_TERRAFORM_VERSION}/terraform /usr/local/bin/terraform

ENV DEFAULT_CONFTEST_VERSION=0.23.0
ENV DEFAULT_CONFTEST_VERSION=0.25.0

RUN AVAILABLE_CONFTEST_VERSIONS="${DEFAULT_CONFTEST_VERSION}" && \
for VERSION in ${AVAILABLE_CONFTEST_VERSIONS}; do \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM runatlantis/atlantis:latest
COPY atlantis /usr/local/bin/atlantis
# TODO: remove this once we get this in the base image
ENV DEFAULT_CONFTEST_VERSION=0.23.0
ENV DEFAULT_CONFTEST_VERSION=0.25.0

WORKDIR /atlantis/src
4 changes: 2 additions & 2 deletions server/events/runtime/policy/conftest_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (

func TestConfTestVersionDownloader(t *testing.T) {

version, _ := version.NewVersion("0.23.0")
version, _ := version.NewVersion("0.25.0")
destPath := "some/path"

fullURL := fmt.Sprintf("https://github.com/open-policy-agent/conftest/releases/download/v0.23.0/conftest_0.23.0_%s_x86_64.tar.gz?checksum=file:https://github.com/open-policy-agent/conftest/releases/download/v0.23.0/checksums.txt", strings.Title(runtime.GOOS))
fullURL := fmt.Sprintf("https://github.com/open-policy-agent/conftest/releases/download/v0.25.0/conftest_0.25.0_%s_x86_64.tar.gz?checksum=file:https://github.com/open-policy-agent/conftest/releases/download/v0.25.0/checksums.txt", strings.Title(runtime.GOOS))

RegisterMockTestingT(t)

Expand Down
6 changes: 3 additions & 3 deletions server/events_controller_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
. "github.com/runatlantis/atlantis/testing"
)

const ConftestVersion = "0.23.0"
const ConftestVersion = "0.25.0"

var applyLocker locking.ApplyLocker
var userConfig server.UserConfig
Expand Down Expand Up @@ -651,7 +651,7 @@ func setupE2E(t *testing.T, repoDir string) (server.EventsController, *vcsmocks.

if userConfig.EnablePolicyChecksFlag {
// need this to be set or we'll fail the policy check step
os.Setenv(policy.DefaultConftestVersionEnvKey, "0.23.0")
os.Setenv(policy.DefaultConftestVersionEnvKey, "0.25.0")
}

// Mocks.
Expand Down Expand Up @@ -1094,7 +1094,7 @@ func mkSubDirs(t *testing.T) (string, string, string, func()) {
return tmp, binDir, cachedir, cleanup
}

// Will fail test if conftest isn't in path and isn't version >= 0.23.0
// Will fail test if conftest isn't in path and isn't version >= 0.25.0
func ensureRunningConftest(t *testing.T) {
localPath, err := exec.LookPath(fmt.Sprintf("conftest%s", ConftestVersion))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion testing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN curl -LOks https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/ter
rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip

# Install conftest
ENV DEFAULT_CONFTEST_VERSION=0.23.0
ENV DEFAULT_CONFTEST_VERSION=0.25.0

RUN AVAILABLE_CONFTEST_VERSIONS="${DEFAULT_CONFTEST_VERSION}" && \
for VERSION in ${AVAILABLE_CONFTEST_VERSIONS}; do \
Expand Down

0 comments on commit ec96d18

Please sign in to comment.