-
Notifications
You must be signed in to change notification settings - Fork 68
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
[PH] Create workflow for manually dispatching performance harness runs #1378
Conversation
uses: AntelopeIO/upload-artifact-large-chunks-action@v1 | ||
with: | ||
name: ${{github.event.inputs.platform-choice}}-build | ||
path: build.tar.zst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comments as #1356 (comment): we shouldn't be copy pasting all of this, we need to come up with a better approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spoonincode - I have refactored the build to be a reusable workflow in PR#1356. Hoping to have that PR go into main
first, then I will pull those changes into this branch and refactor the workflow to use build-base
as well.
- name: Run Performance Test | ||
run: | | ||
# https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs | ||
chown -R $(id -u):$(id -g) $PWD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the 2033 workaround really needed in this case? Unless there is a git
command being run as part of the test, probably not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: 6b4f745
run: | | ||
echo "Workflow Stub" | ||
# https://github.com/actions/runner/issues/2033 | ||
chown -R $(id -u):$(id -g) $PWD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to above -- is 2033 workaround needed here? Seems unlikely since there is just a tar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: 6b4f745
runs-on: ubuntu-latest | ||
container: | ||
image: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} | ||
options: --security-opt seccomp=unconfined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does performance harness make use of unshare
? (does it come along indirectly via TestHarness or something?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: 6b4f745
needs: [v, d, Build] | ||
if: always() && needs.Build.result == 'success' | ||
strategy: | ||
fail-fast: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without being a matrix, this is a noop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: 6b4f745
needs: [v, d, Build] | ||
if: always() && needs.Build.result == 'success' | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means it runs on a github owned runner, is that what you wanted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spoonincode - Correct. I was using the github owned runner for initial testing and verification of the workflow. Now that this is closer to complete, do you have a suggestion for a runner to use (enf-x86-beefy-long
)? I know that most of the enf runners have time limits on them which could be problematic for performance runs depending on how a user configures the run.
.github/workflows/build_base.yaml
Outdated
runs-on: ["self-hosted", "enf-x86-beefy"] | ||
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: '${{inputs.leap-ref}}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems very problematic since on first look I don't believe the workflow+platform used to build leap will match up with the version of leap checked out. You will need to do more effort in at least 2 places to get this to work correctly, I would recommend against the added complexity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I really had this working correctly, as you observed. I have removed this feature.
This reverts commit 47ddeb6.
This reverts commit 6c2758f.
Use platforms in conjunction with build-base such that platforms can be run separately from build-base. Together they accomplish the same as build-base used to, but now can separate concerns between discovering and building platform knowledge from doing the actual software build. Update previous usages of build-base to now use platforms and build-base together.
These reusable workflows are intended to be called from other workflows, not necessarily dispatched individually in their own capacity.
.github/workflows/build.yaml
Outdated
name: Run Platforms Workflow | ||
uses: ./.github/workflows/platforms.yaml | ||
with: | ||
override-build-matrix: ${{github.event.inputs.platform-choice}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There doesn't look to be a platform-choice
input as part of this workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I had removed that. Somehow lost in transition. It is unnecessary in the build.yaml
workflow as that workflow should always be expecting to use the full input from platforms.json
to determine the build platforms to support. Removed here: bf95111
@@ -2,6 +2,16 @@ name: "Performance Harness Run" | |||
|
|||
on: | |||
workflow_dispatch: | |||
inputs: | |||
platform-choice: | |||
description: 'Override build platform' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this isn't really overriding the platform but rather picking which platform
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. Here it is a platform selection, however down in platforms.yaml
it serves to override the auto-generated platform matrix (from platforms.json
). I'll update the verbiage here. Addressed: 8c47cce
- name: Setup Input Params | ||
id: overrides | ||
env: | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this used any where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: 8c47cce
.github/workflows/platforms.yaml
Outdated
id: check-matrix | ||
run: | | ||
echo '${{ steps.pm-results.outputs.platform-matrix }}' | ||
echo '${{ steps.parse-pm.outputs.result }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quite a few echo
s in this workflow that look kind of like debugging, did you mean to leave them in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Thought I had caught all of these and removed them. Thanks.
Addressed: cd872b3
target: ${{github.sha}} | ||
artifact-name: ${{github.event.inputs.platform-choice}}-build | ||
fail-on-missing-target: false | ||
token: ${{github.token}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with v3
you don't need this line, if you want to save a line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: d50381b
tests: | ||
name: Tests | ||
needs: [v, platforms, reuse-build, build-base] | ||
if: always() && needs.platforms.result == 'success' && (needs.build-base.result == 'success' || needs.reuse-build.result == 'success') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we really need to find a way to get #283 in good shape to avoid these tricky always()
chains
Initial attempt of configurable ph run in cicd.
platforms.yaml
Split out
Discover Platforms
,Build Platforms
, andPlatform Matrix
out into one reusable workflow.Platform Matrix
is a new job that dynamically creates thematrix: platform:
array from the discovered platforms or can be overridden by the inputoverride-build-matrix
. This reduces the maintenance overhead of having to update thematrix: platform
arrays in the workflows anytime a platform is added or dropped.build_base.yaml
Removes steps now contained in
platforms.yaml
workflow but takes as inputp
, the discovered platforms, andplatform-matrix
. Typically will be the output of theplatforms.yaml
workflow.build.yaml
Updated to make use of
platforms.yaml
andbuild_base.yaml
workflows.ph_backward_compatibility.yaml
Updated to make use of
platforms.yaml
andbuild_base.yaml
workflows.performance_harness_run.yaml
A manual workflow to configure and run the Performance Harness in CICD. This workflow will attempt to reuse a build for the current head commit of the branch selected to run on, if it exists, otherwise it will build it from scratch. It has the following inputs:
ubuntu20
orubuntu22
as the build platformperformance_test.py
testBpOpMode
testBpOpMode --max-tps-to-test 50 --test-iteration-min-step 10 --test-iteration-duration-sec 10 --final-iterations-duration-sec 10 overrideBasicTestConfig -v --tps-limit-per-generator 25 --chain-state-db-size-mb 200
testBpOpMode --test-iteration-duration-sec 600 --final-iterations-duration-sec 600