Skip to content

Commit

Permalink
feat: Refactor to OCB based agent (#1755)
Browse files Browse the repository at this point in the history
* wip

* refactor repo

* update workflow go versions

* update build flow to install-tools

* update build license check

* new make target

* rename to manifests

* update release workflow

* package supervisor with agent

* resolve errs with gcp exporters

* update version to have go.mod

* get google exporters correctly importing version

* manifest documentation

* use updated version commit in google exporters

* include supervisor as prebuilt binary

* remove config.yaml from release pkg since its not used by supervisor/agent now

* feedback 1/n

* rebase cleanup

* update go version in a few actions, use https git clone for contrib

* change tool cache and fix release-test

* replace rest of tool caches
  • Loading branch information
dpaasman00 committed Aug 16, 2024
1 parent b167938 commit 5f46c61
Show file tree
Hide file tree
Showing 178 changed files with 784 additions and 19,029 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.21"
check-latest: true
- name: Cache Tools
id: tool-cache
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./Makefile') }}
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools
Expand All @@ -39,7 +40,7 @@ jobs:
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./Makefile') }}
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools
Expand All @@ -63,7 +64,7 @@ jobs:
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./Makefile') }}
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools
Expand All @@ -87,7 +88,7 @@ jobs:
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./Makefile') }}
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools
Expand All @@ -111,7 +112,7 @@ jobs:
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./Makefile') }}
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools
Expand All @@ -135,7 +136,7 @@ jobs:
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./Makefile') }}
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.21"
check-latest: true

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/manual_msi_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.21"
check-latest: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
58 changes: 57 additions & 1 deletion .github/workflows/multi_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,58 @@ on:
pull_request:

jobs:
setup-tools:
runs-on: "ubuntu-20.04"
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
check-latest: true
- name: Cache Tools
id: tool-cache
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools

build_linux:
runs-on: ubuntu-latest-4-cores
needs:
- setup-tools
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.21"
check-latest: true
- name: Cache Tools
id: tool-cache
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Build
run: make build-linux
- name: Scan Third Party Dependency Licenses
run: |
go install github.com/uw-labs/[email protected]
lichen --config=./license.yaml $(find dist/collector_* dist/updater_*)
build_darwin:
runs-on: macos-14
needs:
- setup-tools
steps:
- name: Checkout Sources
uses: actions/checkout@v4
Expand All @@ -31,14 +66,26 @@ jobs:
with:
go-version: "1.21"
check-latest: true
- name: Cache Tools
id: tool-cache
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Build
run: make build-darwin
- name: Scan Third Party Dependency Licenses
run: |
go install github.com/uw-labs/[email protected]
lichen --config=./license.yaml $(find dist/collector_* dist/updater_*)
build_windows:
runs-on: ubuntu-20.04
needs:
- setup-tools
steps:
- name: Checkout Sources
uses: actions/checkout@v4
Expand All @@ -47,6 +94,15 @@ jobs:
with:
go-version: "1.21"
check-latest: true
- name: Cache Tools
id: tool-cache
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tooling-${{ runner.os }}-${{ hashFiles('./internal/tools/go.sum') }}
- name: Install Tools
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Build
run: make build-windows
- name: Scan Third Party Dependency Licenses
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,14 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: "**/go.sum"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser-pro
version: "v1.22.1"
args: build --single-target --skip=validate --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
go-version: "1.21"
check-latest: true
- name: Build Windows Binaries
run: make build-binaries
- name: Copy Windows Collector Binary
run: cp dist/windows_amd64/collector_windows_amd64_v1/observiq-otel-collector.exe windows/observiq-otel-collector.exe
run: cp dist/collector_windows_amd64.exe windows/observiq-otel-collector.exe
- name: Copy Windows Updater Binary
run: cp dist/windows_amd64/updater_windows_amd64_v1/updater.exe windows/updater.exe
run: cp dist/updater_windows_amd64.exe windows/updater.exe
- name: Copy Plugins to MSI Build Directory
run: cp -r release_deps/plugins windows/
- name: Copy Example Config
Expand Down Expand Up @@ -79,7 +71,6 @@ jobs:
with:
go-version: "1.21"
check-latest: true
cache-dependency-path: "**/go.sum"
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.21"
check-latest: true
- name: Run Tests
run: make test
- name: Run Updater Integration Tests (non-linux)
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ release_deps
# OpAmp Files
collector*.yaml
manager*.yaml
logging*.yaml
logging*.yaml

#Supervisor & Builder Files
builder
agent*.log
effective*.yaml
Loading

0 comments on commit 5f46c61

Please sign in to comment.