Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/aws-bedrock' into featur…
Browse files Browse the repository at this point in the history
…e-work/bedrock-unit-tests
  • Loading branch information
tippmar-nr committed Mar 8, 2024
2 parents 8f62f10 + 5c78cbe commit 0718d25
Show file tree
Hide file tree
Showing 19 changed files with 172 additions and 173 deletions.
22 changes: 21 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,43 @@ updates:
directory: /
schedule:
interval: weekly

groups:
github-actions:
patterns:
- "*"

# multiple entries are required in order to apply nuget scanning to only a subset of projects.
# We do not scan anything in the /src/Agent/NewRelic/Agent/Extensions folder, as those projects
# intentionally reference old versions of the Nuget packages they instrument.
- package-ecosystem: nuget
directory: /src/Agent/NewRelic/Agent/Core
schedule:
interval: weekly
groups: # groups currently doesn't work across multiple entries for the same package-ecosystem, but someday it will. See https://github.com/dependabot/dependabot-core/issues/7547
nuget:
patterns:
- "*"
- package-ecosystem: nuget
directory: /src/Agent/NewRelic.Api.Agent
schedule:
interval: weekly
groups:
nuget:
patterns:
- "*"
- package-ecosystem: nuget
directory: /src/NewRelic.Core
schedule:
interval: weekly
groups:
nuget:
patterns:
- "*"
- package-ecosystem: nuget
directory: /build
schedule:
interval: weekly
groups:
nuget:
patterns:
- "*"
38 changes: 22 additions & 16 deletions .github/workflows/all_solutions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ jobs:
if-no-files-found: error

run-linux-container-tests:
needs: build-fullagent-msi
name: Run Linux Container Tests
needs:
- build-fullagent-msi
uses: ./.github/workflows/run_linux_container_tests.yml
secrets: inherit

Expand Down Expand Up @@ -313,13 +314,13 @@ jobs:
shell: pwsh #this doesn't work with normal powershell due to UTF-8 BOM handling

- name: Download Agent Home Folders
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: homefolders
path: src/Agent

- name: Download Integration Test Artifacts
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: integrationtests
# Should not need a path because the integration test artifacts are archived with the full directory structure
Expand Down Expand Up @@ -414,13 +415,13 @@ jobs:
fetch-depth: 0

- name: Download Agent Home Folders
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: homefolders
path: src/Agent

- name: Download Unbounded Integration Test Artifacts
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: unboundedintegrationtests
# Should not need a path because the integration test artifacts are archived with the full directory structure
Expand Down Expand Up @@ -519,13 +520,13 @@ jobs:
fetch-depth: 0

- name: Download msi _build Artifacts
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: msi-build-folder-artifacts
path: src/_build

- name: Download Agent Home Folders
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: homefolders
path: src/Agent
Expand Down Expand Up @@ -586,13 +587,13 @@ jobs:
fetch-depth: 0

- name: Download Agent Home Folders
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: homefolders
path: src/Agent

- name: Download msi _build Artifacts
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: msi-build-folder-artifacts
path: src/_build
Expand Down Expand Up @@ -633,37 +634,37 @@ jobs:
fetch-depth: 0

- name: Download Agent Home Folders
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: homefolders
path: src/Agent

- name: Download msi _build Artifacts
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: msi-build-folder-artifacts
path: src/_build

- name: Download Debian _build Artifacts
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: debian-build-artifacts
path: src/_build/CoreArtifacts

- name: Download RPM _build Artifacts
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: rpm-build-artifacts
path: src/_build/CoreArtifacts

- name: Download NewRelic.Agent.Extensions
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: NewRelic.Agent.Extensions
path: src/Agent/NewRelic/Agent/Extensions/NewRelic.Agent.Extensions/bin/Release

- name: Download NewRelic.OpenTracing.AmazonLambda.Tracer
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: NewRelic.OpenTracing.AmazonLambda.Tracer
path: src/AwsLambda/AwsLambdaOpenTracer/bin/Release/netstandard2.0-ILRepacked
Expand Down Expand Up @@ -694,9 +695,14 @@ jobs:
integration-test-status:
name: Check Test Matrix Status
runs-on: ubuntu-latest
needs: [run-integration-tests, run-unbounded-tests]
needs: [run-linux-container-tests, run-integration-tests, run-unbounded-tests]
if: always()
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: audit
- name: Successful test run
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/awslambda_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
fetch-depth: 0

- name: Download NewRelic.OpenTracing.AmazonLambda.Tracer
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: NewRelic.OpenTracing.AmazonLambda.Tracer
path: src/AwsLambda/AwsLambdaOpenTracer/bin/Release/netstandard2.0-ILRepacked
Expand Down
81 changes: 18 additions & 63 deletions .github/workflows/build_profiler.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,39 @@
name: Build and Package Profiler

on:
# run this workflow on a push to any branch other than main or a feature branch
# run this workflow on a push to any branch so we can get code coverage reports
#
# NOTE: On a push, only the build jobs will execute; the NuGet jobs will not run.
# Manually run this workflow on your branch when you want it to update the
# NuGet package and create a PR to update the package version reference in
# Home.csproj.
push:
branches-ignore:
- main
- "feature/**"
branches:
- main
- "feature/**"
paths-ignore:
- ".github/**" # skip changes to the .github branch (workflows, etc.)


pull_request:
paths-ignore:
- ".github/**" # skip changes to the .github branch (workflows, etc.)

# this workflow can be called from another workflow
workflow_call:
inputs:
force-build:
description: 'Force a build, even if no files are changed'
required: true
type: boolean
deploy:
description: 'Deploy'
description: 'Deploy NuGet Package'
required: true
default: true
default: false
type: boolean

# this workflow can be invoked manually
workflow_dispatch:
inputs:
force-build:
description: 'Force a build, even if no files are changed'
required: true
default: true
type: boolean
deploy:
description: 'Deploy'
description: 'Deploy NuGet Package'
required: true
default: true
default: false
type: boolean

permissions:
Expand All @@ -55,43 +50,8 @@ env:
DOTNET_NOLOGO: true

jobs:
check-for-changes:
name: Check for Updated Profiler Files
runs-on: ubuntu-22.04

# don't run this job if triggered by Dependabot, will cause all other jobs to be skipped as well
if: ${{ github.actor != 'dependabot[bot]' }}

permissions:
pull-requests: read
outputs:
profiler_src: ${{ steps.filter.outputs.profiler_src }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: audit

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Look for modified files
uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1
id: filter
with:
base: ${{ github.ref }}
filters: |
profiler_src:
- 'src/Agent/NewRelic/Profiler/**'
list-files: 'csv'

build-windows-profiler:
needs: check-for-changes
if: ${{ inputs.force-build || needs.check-for-changes.outputs.profiler_src == 'true' }}
name: Build Windows Profiler
name: Build Windows Profiler & Run Unit Tests / Code Coverage
runs-on: windows-latest

env:
Expand Down Expand Up @@ -164,8 +124,6 @@ jobs:
if-no-files-found: error

build-linux-x64-profiler:
needs: check-for-changes
if: ${{ inputs.force-build || needs.check-for-changes.outputs.profiler_src == 'true' }}
name: Build Linux x64 Profiler
runs-on: ubuntu-22.04
permissions:
Expand Down Expand Up @@ -216,8 +174,6 @@ jobs:
if-no-files-found: error

build-linux-arm64-profiler:
needs: check-for-changes
if: ${{ inputs.force-build || needs.check-for-changes.outputs.profiler_src == 'true' }}
name: Build Linux ARM64 Profiler
runs-on: ubuntu-22.04
permissions:
Expand Down Expand Up @@ -292,12 +248,11 @@ jobs:
package-and-deploy:
needs:
[
check-for-changes,
build-windows-profiler,
build-linux-x64-profiler,
build-linux-arm64-profiler,
]
if: ${{ (inputs.force-build || needs.check-for-changes.outputs.profiler_src == 'true') && inputs.deploy }}
if: ${{ inputs.deploy }}
name: Package and Deploy Profiler NuGet
runs-on: windows-2022

Expand All @@ -314,19 +269,19 @@ jobs:
fetch-depth: 0

- name: Download Windows Profiler Artifacts to working Directory
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: profiler-windows
path: ${{ github.workspace }}/_workingDir

- name: Download Linux amd64 Profiler Artifacts to working Directory
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: profiler-amd64
path: ${{ github.workspace }}/_workingDir

- name: Download Linux arm64 Profiler Artifacts to working Directory
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: profiler-arm64
path: ${{ github.workspace }}/_workingDir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_modified_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
fetch-depth: 0
- name: Verify which files were modified
uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
base: ${{ github.ref }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fetch-depth: 0

- name: Initialize CodeQL
uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
languages: csharp

Expand All @@ -49,7 +49,7 @@ jobs:
shell: powershell

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
category: "/language:csharp"

Expand All @@ -72,7 +72,7 @@ jobs:
fetch-depth: 0

- name: Initialize CodeQL
uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
languages: c-cpp

Expand All @@ -88,6 +88,6 @@ jobs:
shell: powershell

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
category: "/language:c-cpp"
Loading

0 comments on commit 0718d25

Please sign in to comment.