Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Refactor to OCB based agent #1755

Merged
merged 21 commits into from
Aug 2, 2024
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
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
jsirianni marked this conversation as resolved.
Show resolved Hide resolved
- 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
Loading