Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
1pkg committed Oct 2, 2024
1 parent 13fddd9 commit 77af1fa
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 20 deletions.
15 changes: 15 additions & 0 deletions .ci/scripts/push-pgo-pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -eo pipefail

PGO_BRANCH="update-pgo-$(date +%s)"
cd $WORKSPACE_PATH
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
gh pr merge --auto --delete-branch --squash $PGO_BRANCH
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ jobs:

- name: Open PGO PR
if: ${{ env.RUN_STANDALONE == 'true' && github.ref == 'refs/heads/main' }}
run: make push-pgo-pr
run: ${{ github.workspace }}/.ci/scripts/push_pgo_pr.sh
env:
WORKSPACE_PATH: ${{ github.workspace }}
PROFILE_PATH: ${{ env.WORKING_DIRECTORY }}/${{ env.BENCHMARK_CPU_OUT }}
Expand Down
14 changes: 0 additions & 14 deletions testing/benchmark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,6 @@ cleanup-elasticsearch:
@ echo "-> Deleting APM Server data streams..."
@ 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 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
# use in the deployment.
Expand Down
1 change: 0 additions & 1 deletion testing/benchmark/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ module "tags" {
# use the convention for team/shared owned resources if we are running in CI.
# assume this is an individually owned resource otherwise.
project = startswith(var.user_name, "benchci") ? "benchmarks" : var.user_name
build = var.BUILD_ID
}

provider "ec" {}
Expand Down
1 change: 0 additions & 1 deletion testing/benchmark/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ output "apm_server_url" {
output "apm_server_ip" {
value = var.run_standalone ? module.standalone_apm_server[0].apm_server_ip : ""
description = "The APM Server EC2 IP address"
sensitive = true
}

output "admin_console_url" {
Expand Down
2 changes: 1 addition & 1 deletion testing/benchmark/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variable "user_name" {

variable "run_standalone" {
default = false
description = "If set run benchmarks against standalone APM Server conneted to moxy"
description = "If set run benchmarks against standalone APM Server connected to moxy"
type = bool
}

Expand Down
1 change: 0 additions & 1 deletion testing/smoke/managed/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ provider "ec" {}
module "tags" {
source = "../../infra/terraform/modules/tags"
project = "smoke-test-ea-managed"
build = var.BUILD_ID
}

locals {
Expand Down
1 change: 0 additions & 1 deletion testing/smoke/supported-os/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ provider "ec" {}
module "tags" {
source = "../../infra/terraform/modules/tags"
project = "smoke-test-supported-os"
build = var.BUILD_ID
}

locals {
Expand Down

0 comments on commit 77af1fa

Please sign in to comment.