Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .github/workflows/scripts/cost-accuracy-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"

# Setup Go workspace for CI (go.work is gitignored, must be regenerated) so the
# build below resolves local core/framework/plugins instead of the published
# versions pinned in transports/go.mod. Run with repo root as CWD because
# setup-go-workspace.sh's `go work use ./core` paths are repo-root-relative; the
# go.work file it writes at ${ROOT_DIR} is then auto-discovered by `go build`.
( cd "${ROOT_DIR}" && source "${ROOT_DIR}/.github/workflows/scripts/setup-go-workspace.sh" )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 GOTOOLCHAIN=auto is exported inside the subshell but does not propagate to the parent shell where the go build calls in build_binaries run. If the installed Go version in CI differs from the go directive in the generated go.work file, the builds can fail with a toolchain-version mismatch. Exporting GOTOOLCHAIN=auto in the parent shell before the subshell is the minimal fix.

Suggested change
( cd "${ROOT_DIR}" && source "${ROOT_DIR}/.github/workflows/scripts/setup-go-workspace.sh" )
export GOTOOLCHAIN=auto
( cd "${ROOT_DIR}" && source "${ROOT_DIR}/.github/workflows/scripts/setup-go-workspace.sh" )


COMPOSE_FILE="${ROOT_DIR}/.github/workflows/configs/docker-compose.yml"
COMPOSE_PROJECT="${COMPOSE_PROJECT:-bifrost-cost-accuracy}"
BENCHMARK_DIR="${BENCHMARK_DIR:-${ROOT_DIR}/../bifrost-benchmarking}"
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/scripts/load-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ set -Ee
# Configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"

# Setup Go workspace for CI (go.work is gitignored, must be regenerated) so the
# build below resolves local core/framework/plugins instead of the published
# versions pinned in transports/go.mod. Run with repo root as CWD because
# setup-go-workspace.sh's `go work use ./core` paths are repo-root-relative; the
# go.work file it writes at ${REPO_ROOT} is then auto-discovered by `go build`.
( cd "${REPO_ROOT}" && source "${SCRIPT_DIR}/setup-go-workspace.sh" )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Same GOTOOLCHAIN=auto scoping issue as in cost-accuracy-test.sh — the export is confined to the subshell and is not visible to the go build call in build_bifrost_http. Exporting it in the parent shell guards against toolchain-version errors.

Suggested change
( cd "${REPO_ROOT}" && source "${SCRIPT_DIR}/setup-go-workspace.sh" )
export GOTOOLCHAIN=auto
( cd "${REPO_ROOT}" && source "${SCRIPT_DIR}/setup-go-workspace.sh" )


BIFROST_HTTP_DIR="${REPO_ROOT}/transports/bifrost-http"
TRANSPORTS_DIR="${REPO_ROOT}/transports"
WORK_DIR="${SCRIPT_DIR}"
Expand Down
Loading