Skip to content

Commit

Permalink
Merge branch 'main' into inject-build-pgo-profile
Browse files Browse the repository at this point in the history
  • Loading branch information
1pkg committed Oct 1, 2024
2 parents a1ac417 + afe87f9 commit e60e927
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 26 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
permissions:
contents: write
id-token: write
pull-requests: write
env:
SSH_KEY: ./id_rsa_terraform
TF_VAR_private_key: ./id_rsa_terraform
Expand Down Expand Up @@ -112,21 +111,19 @@ jobs:

- name: Init terraform module
id: init
run: |
make init
echo "runStandalone=${{ env.AWS_REGION }}" >> $GITHUB_OUTPUT
run: make init

- name: Build apmbench
run: make apmbench $SSH_KEY terraform.tfvars

- name: Build APM Server and Moxy
if: ${{ steps.init.outputs.runStandalone }}
if: ${{ env.RUN_STANDALONE == 'true' }}
run: |
make apm-server
make moxy
- name: Override docker committed version
if: ${{ ! inputs.runOnStable && ! steps.init.outputs.runStandalone }}
if: ${{ ! inputs.runOnStable && env.RUN_STANDALONE == 'false' }}
run: make docker-override-committed-version

- name: Spin up benchmark environment
Expand All @@ -149,7 +146,7 @@ jobs:
run: make run-benchmark

- name: Cat standalone server logs
if: ${{ steps.init.outputs.runStandalone && failure() }}
if: ${{ env.RUN_STANDALONE == 'true' && failure() }}
run: make cat-apm-server-logs

- name: Index benchmarks result
Expand Down Expand Up @@ -229,7 +226,7 @@ jobs:
git_commit_gpgsign: true

- name: Open PGO PR
if: ${{ steps.init.outputs.runStandalone && github.ref == 'refs/heads/main' }}
if: ${{ env.RUN_STANDALONE == 'true' && github.ref == 'refs/heads/main' }}
run: make push-pgo-pr
env:
WORKSPACE_PATH: ${{ github.workspace }}
Expand All @@ -239,7 +236,7 @@ jobs:

- name: Tear down benchmark environment
if: always()
run: make destroy
run: make init destroy

# Notify failure to Slack only on schedule (nightly run)
- if: failure() && github.event_name == 'schedule'
Expand Down
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6397,11 +6397,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : google.golang.org/grpc
Version: v1.67.0
Version: v1.67.1
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/google.golang.org/[email protected].0/LICENSE:
Contents of probable licence file $GOMODCACHE/google.golang.org/[email protected].1/LICENSE:


Apache License
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require (
golang.org/x/sync v0.8.0
golang.org/x/term v0.24.0
golang.org/x/time v0.6.0
google.golang.org/grpc v1.67.0
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd h1:6TEm2ZxXoQmFWFlt1vNxvVOa1Q0dXFQD1m/rYjXmS0E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw=
google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/grpc/examples v0.0.0-20231016154744-cb430bed4d27 h1:EB/3dtnYKOItaNPpOI/HmOCGbVZUiXcstRfiuxN+cFg=
google.golang.org/grpc/examples v0.0.0-20231016154744-cb430bed4d27/go.mod h1:Crtq1t+mykyL5d6PR3z8zCxKx/Qjq/mlPWDPoWJANYA=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
Expand Down
24 changes: 12 additions & 12 deletions testing/benchmark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,20 +179,20 @@ cleanup-elasticsearch:
@ curl -u $(ELASTICSEARCH_USER):$(ELASTICSEARCH_PASS) -XDELETE $(ELASTICSEARCH_URL)/_data_stream/$(APM_DATA_STREAMS)

# This target is intended to be run from CI to create a PGO update PR.
PGO_BRANCH = update-pgo-$(shell date +%s)
.PHONY: push-pgo-pr
push-pgo-pr:
@cd $(WORKSPACE_PATH)
@git config user.email "[email protected]"
@git config user.name "APM Server"
@git fetch origin main
@git checkout main
@BRANCH="update-pgo-$(date +%s)"
@git checkout -b $(BRANCH)
@mv $(PROFILE_PATH) x-pack/apm-server/default.pgo
@git add x-pack/apm-server/default.pgo
@git commit -m "PGO: Update default.pgo from benchmarks $(WORKFLOW)."
@git push -u origin $(BRANCH)
@gh pr create -B main -H $(BRANCH) -t "PGO: Update default.pgo" -b "Update default.pgo CPU profile from the benchmarks [workflow]($(WORKFLOW))." -R elastic/apm-server
@cd $(WORKSPACE_PATH); \
git config user.email "[email protected]"; \
git config user.name "APM Server"; \
git fetch origin main; \
git checkout main; \
git checkout -b $(PGO_BRANCH); \
mv $(PROFILE_PATH) x-pack/apm-server/default.pgo; \
git add x-pack/apm-server/default.pgo; \
git commit -m "PGO: Update default.pgo from benchmarks $(WORKFLOW)."; \
git push -u origin $(PGO_BRANCH); \
gh pr create -B main -H $(PGO_BRANCH) -t "PGO: Update default.pgo" -b "Update default.pgo CPU profile from the benchmarks [workflow]($(WORKFLOW))." -R elastic/apm-server

##############################################################################
# Target for creating a .tfvars file, defining the custom Docker images to
Expand Down

0 comments on commit e60e927

Please sign in to comment.