Skip to content

Commit

Permalink
backport of commit 7d73065
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross authored Jun 11, 2024
1 parent 288a048 commit ac9e364
Show file tree
Hide file tree
Showing 52 changed files with 332 additions and 1,160 deletions.
2 changes: 1 addition & 1 deletion .github/actions/vault-secrets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
- name: Retrieve Vault-hosted Secrets
if: endsWith(github.repository, '-enterprise')
id: vault
uses: hashicorp/vault-action@d1720f055e0635fd932a1d2a48f87a666a57906c # v3.0.0
uses: hashicorp/vault-action@v2.4.3
with:
url: ${{ steps.vault-auth.outputs.addr }}
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
strategy:
matrix:
goos: [linux]
goarch: ["arm64", "amd64"]
goarch: ["arm", "arm64", "amd64"]
fail-fast: true

name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build
Expand Down Expand Up @@ -170,11 +170,16 @@ jobs:
sudo apt-get update
sudo apt-get install -y \
binutils-aarch64-linux-gnu \
gcc-aarch64-linux-gnu
binutils-arm-linux-gnueabihf \
gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabihf \
gcc-multilib-arm-linux-gnueabihf
- name: Set gcc
run: |
if [ "${{ matrix.goarch }}" == "arm64" ]; then
if [ "${{ matrix.goarch }}" == "arm" ]; then
echo "CC=arm-linux-gnueabihf-gcc" >> "$GITHUB_ENV"
elif [ "${{ matrix.goarch }}" == "arm64" ]; then
echo "CC=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
fi
Expand Down
9 changes: 8 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ LAST_RELEASE ?= v1.8.0
default: help

ifeq (Linux,$(THIS_OS))
ALL_TARGETS = linux_amd64 \
ALL_TARGETS = linux_386 \
linux_amd64 \
linux_arm \
linux_arm64 \
linux_s390x \
windows_386 \
windows_amd64
endif

Expand Down Expand Up @@ -93,6 +96,10 @@ endif
CC=$(CC) \
go build -trimpath -ldflags "$(GO_LDFLAGS)" -tags "$(GO_TAGS)" -o $(GO_OUT)

ifneq (armv7l,$(THIS_ARCH))
pkg/linux_arm/nomad: CC = arm-linux-gnueabihf-gcc
endif

ifneq (aarch64,$(THIS_ARCH))
pkg/linux_arm64/nomad: CC = aarch64-linux-gnu-gcc
endif
Expand Down
9 changes: 9 additions & 0 deletions build_linux_arm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

//go:build linux && cgo
// +build linux,cgo

// #cgo LDFLAGS: -mfloat-abi=hard

package main
17 changes: 9 additions & 8 deletions client/pluginmanager/drivermanager/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@ import (
)

type testManager struct {
logger log.Logger
loader loader.PluginCatalog
topology *numalib.Topology
logger log.Logger
loader loader.PluginCatalog
}

var (
topology = numalib.Scan(numalib.PlatformScanners())
)

func TestDriverManager(t *testing.T) Manager {
topology := numalib.Scan(numalib.PlatformScanners())
logger := testlog.HCLogger(t).Named("driver_mgr")
pluginLoader := catalog.TestPluginLoader(t)
return &testManager{
logger: logger,
loader: singleton.NewSingletonLoader(logger, pluginLoader),
topology: topology,
logger: logger,
loader: singleton.NewSingletonLoader(logger, pluginLoader),
}
}

Expand All @@ -44,7 +45,7 @@ func (m *testManager) PluginType() string { return base.PluginTypeDriver }
func (m *testManager) Dispense(driver string) (drivers.DriverPlugin, error) {
baseConfig := &base.AgentConfig{
Driver: &base.ClientDriverConfig{
Topology: m.topology,
Topology: topology,
},
}
instance, err := m.loader.Dispense(driver, base.PluginTypeDriver, baseConfig, m.logger)
Expand Down
351 changes: 210 additions & 141 deletions command/agent/bindata_assetfs.go

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion e2e/consulcompat/run_ce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import (
// versions of Consul CE
func usable(v, minimum *version.Version) bool {
switch {
case v.LessThan(minimum):
case v.Prerelease() != "":
return false
case v.Metadata() != "":
return false
case v.LessThan(minimum):
return false
default:
return true
}
Expand Down
3 changes: 3 additions & 0 deletions e2e/consulcompat/shared_download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import (
"github.com/shoenig/test/must"
)

// TODO: it would be good if we can add the latest non-GA'd beta/release
// candidate version as well; that'll give us some lead time on any breaking
// changes
const (
binDir = "consul-bins"
minConsulVersion = "1.16.0"
Expand Down
5 changes: 0 additions & 5 deletions e2e/exec2/doc.go

This file was deleted.

100 changes: 0 additions & 100 deletions e2e/exec2/exec2_test.go

This file was deleted.

119 changes: 0 additions & 119 deletions e2e/exec2/input/countdash.hcl

This file was deleted.

38 changes: 0 additions & 38 deletions e2e/exec2/input/env.hcl

This file was deleted.

Loading

0 comments on commit ac9e364

Please sign in to comment.