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

Report evictions in buildkite #233

Merged
merged 32 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6ed06c7
put the steps in groups
paul-butcher Oct 3, 2023
13e79aa
run evicted in buildkite
paul-butcher Oct 3, 2023
113b886
annotate with any found warnings
paul-butcher Oct 3, 2023
185bf20
annotate with any found warnings
paul-butcher Oct 3, 2023
87ee71a
do not annotate
paul-butcher Oct 3, 2023
a380883
quieten composeNoBuild warning
paul-butcher Oct 3, 2023
df48a5d
try soft failing on warnings
paul-butcher Oct 3, 2023
00502c6
try soft failing on warnings
paul-butcher Oct 3, 2023
9aeddbe
shift eviction reporter to sh file
paul-butcher Oct 3, 2023
a371444
quieten release warning
paul-butcher Oct 3, 2023
200e2a4
rename new step
paul-butcher Oct 3, 2023
95bc72e
allow script to actually run
paul-butcher Oct 3, 2023
7197fed
allow script to actually run
paul-butcher Oct 3, 2023
99d49fc
quieten release warning
paul-butcher Oct 3, 2023
b7543d7
quieten release warning
paul-butcher Oct 3, 2023
c5f022a
quieten release warning
paul-butcher Oct 3, 2023
4c83c22
let it finish
paul-butcher Oct 3, 2023
69f7cde
improve warning detection
paul-butcher Oct 3, 2023
5c22f2f
improve warning detection
paul-butcher Oct 3, 2023
8db059b
check that soft fail is set correctly
paul-butcher Oct 4, 2023
15c1660
check that soft fail is set correctly
paul-butcher Oct 4, 2023
ca9916f
report holistic evictions
paul-butcher Oct 4, 2023
000d6de
fix typo
paul-butcher Oct 4, 2023
16291b6
report holistic evictions
paul-butcher Oct 4, 2023
025d0ba
report holistic evictions
paul-butcher Oct 4, 2023
6fdf552
can't use matrix in artifact paths
paul-butcher Oct 4, 2023
a186bf2
wrong path
paul-butcher Oct 4, 2023
38cc68a
fix typo
paul-butcher Oct 4, 2023
cb26304
improve output
paul-butcher Oct 4, 2023
93fc929
try bullets
paul-butcher Oct 5, 2023
5c4135e
add summary note
paul-butcher Oct 5, 2023
136ed43
improve spacing
paul-butcher Oct 5, 2023
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
117 changes: 78 additions & 39 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,65 @@ steps:
agents:
queue: "scala"

- label: "test {{ matrix }}"
command: "./builds/run_sbt_tests.sh {{ matrix }}"
matrix:
- "fixtures"
- "http"
- "json"
- "typesafe_app"
- "monitoring"
- "monitoring_typesafe"
- "messaging"
- "messaging_typesafe"
- "storage"
- "storage_typesafe"
- "elasticsearch"
- "elasticsearch_typesafe"
- "sierra"
- group: "Test"
steps:
- label: "test {{ matrix }}"
command: "./builds/run_sbt_tests.sh {{ matrix }}"
matrix:
- "fixtures"
- "http"
- "json"
- "typesafe_app"
- "monitoring"
- "monitoring_typesafe"
- "messaging"
- "messaging_typesafe"
- "storage"
- "storage_typesafe"
- "elasticsearch"
- "elasticsearch_typesafe"
- "sierra"

agents:
queue: "scala"
agents:
queue: "scala"

- group: "Report evictions"
steps:
- label: "evictions {{ matrix }}"
command: "./builds/report_sbt_evictions.sh {{ matrix }}"
soft_fail:
- exit_status: 2
matrix:
- "fixtures"
- "http"
- "json"
- "typesafe_app"
- "monitoring"
- "monitoring_typesafe"
- "messaging"
- "messaging_typesafe"
- "storage"
- "storage_typesafe"
- "elasticsearch"
- "elasticsearch_typesafe"
- "sierra"
agents:
queue: "scala"
artifact_paths:
".reports/evicted*"

- wait

- label: "Collate evictions"
commands:
- "mkdir -p .reports"
- "buildkite-agent artifact download '.reports/evicted_*' .reports/"
- "builds/report_unique_evictions.sh | buildkite-agent annotate --context=evictions"
agents:
queue: nano
- wait


- label: "cut release"
if: build.branch == "main"
commands:
Expand All @@ -35,28 +72,30 @@ steps:

- wait

- label: "publish {{ matrix }}"
if: build.branch == "main"
command: ".buildkite/scripts/publish.py {{ matrix }}"
matrix:
- "fixtures"
- "http"
- "http_typesafe"
- "json"
- "typesafe_app"
- "monitoring"
- "monitoring_typesafe"
- "messaging"
- "messaging_typesafe"
- "storage"
- "storage_typesafe"
- "elasticsearch"
- "elasticsearch_typesafe"
- "sierra"
- "sierra_typesafe"
- group: "Publish"
steps:
- label: "publish {{ matrix }}"
if: build.branch == "main"
command: ".buildkite/scripts/publish.py {{ matrix }}"
matrix:
- "fixtures"
- "http"
- "http_typesafe"
- "json"
- "typesafe_app"
- "monitoring"
- "monitoring_typesafe"
- "messaging"
- "messaging_typesafe"
- "storage"
- "storage_typesafe"
- "elasticsearch"
- "elasticsearch_typesafe"
- "sierra"
- "sierra_typesafe"

agents:
queue: "scala"
agents:
queue: "scala"

- wait

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ metals.sbt

.terraform
terraform.plan

# output from code checkers, tests etc.
.reports
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RELEASE_TYPE: patch
internal-only build improvements
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
val projectVersion = "32.40.0"

Global / excludeLintKeys += composeNoBuild

lazy val fixtures = Common.setupProject(
project,
"fixtures",
Expand Down
9 changes: 9 additions & 0 deletions builds/report_sbt_evictions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mkdir -p .reports
REPORT_FILE=".reports/evicted_${1}"
./builds/run_sbt_task_in_docker.sh "project $1" "evicted" | grep '^\[warn\]' | tee $REPORT_FILE
WARNING_COUNT=$(cat $REPORT_FILE | grep -E '^\[warn\]\s+\*' | wc -l )
if [ "$WARNING_COUNT" != "0" ]
then
echo "found $WARNING_COUNT suspected binary incompatible eviction(s)"
exit 2
fi
5 changes: 5 additions & 0 deletions builds/report_unique_evictions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Intended to be run after producing eviction reports with report_sbt_evictions.sh
echo "# Suspected binary incompatible evictions across all projects (summary)"
cat .reports/evicted_* | grep -E '^\[warn\]\s+\*' | sed 's/.*\*/*/' | sort | uniq
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 pipes? that's insane!

echo ""
echo "See individual _evictions_ stages for more detail"