Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
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
86 changes: 24 additions & 62 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ jobs:
should-run:
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event_name != 'pull_request'
#if: github.event_name != 'pull_request'
outputs:
source_changed: ${{ steps.filter.outputs.SOURCE_CHANGED }}
comment_valid: ${{ steps.comment.outputs.isTeamMember }}
is_pr: ${{ steps.is_pr.outputs.IS_PR }}
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -83,6 +84,13 @@ jobs:
- "LICENSE-3rdparty.csv"
- "LICENSE"

- name: Handle PR
id: is_pr
if: github.event_name == 'pull_request'
run: |
export IS_PR="true"
echo "IS_PR=${IS_PR}" >> $GITHUB_OUTPUT

# This step allows us to conservatively run the tests if we added a new
# file or directory for source code, but forgot to add it to this workflow.
# Instead, we may unnecessarily run the test on new file or dir additions that
Expand Down Expand Up @@ -113,25 +121,15 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 5
needs: should-run
if: github.event_name != 'merge_group' || needs.should-run.outputs.source_changed == 'true'
if: github.event_name != 'merge_group' || needs.should-run.outputs.source_changed == 'true' || needs.should-run.outputs.is_pr == 'true'
outputs:
pr-number: ${{ steps.pr-metadata-merge-queue.outputs.PR_NUMBER || steps.pr-metadata-comment.outputs.PR_NUMBER }}
baseline-sha: ${{ steps.pr-metadata-merge-queue.outputs.BASELINE_SHA || steps.pr-metadata-comment.outputs.BASELINE_SHA }}
baseline-tag: ${{ steps.pr-metadata-merge-queue.outputs.BASELINE_TAG || steps.pr-metadata-comment.outputs.BASELINE_TAG }}
comparison-sha: ${{ steps.pr-metadata-merge-queue.outputs.COMPARISON_SHA || steps.pr-metadata-comment.outputs.COMPARISON_SHA }}
comparison-tag: ${{ steps.pr-metadata-merge-queue.outputs.COMPARISON_TAG || steps.pr-metadata-comment.outputs.COMPARISON_TAG }}

# below are used in the experiment/analyze jobs
cpus: ${{ steps.system.outputs.CPUS }}
memory: ${{ steps.system.outputs.MEMORY }}
vector-cpus: ${{ steps.system.outputs.VECTOR_CPUS }}

replicas: ${{ steps.experimental-meta.outputs.REPLICAS }}
warmup-seconds: ${{ steps.experimental-meta.outputs.WARMUP_SECONDS }}
total-samples: ${{ steps.experimental-meta.outputs.TOTAL_SAMPLES }}
p-value: ${{ steps.experimental-meta.outputs.P_VALUE }}
smp-version: ${{ steps.experimental-meta.outputs.SMP_CRATE_VERSION }}
lading-version: ${{ steps.experimental-meta.outputs.LADING_VERSION }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -141,16 +139,22 @@ jobs:
# But, we can retrieve this info from some commands.
- name: Get PR metadata (issue_comment)
id: pr-metadata-comment
if: github.event_name == 'issue_comment'
if: github.event_name == 'issue_comment' || github.event_name == 'pull_request'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export PR_NUMBER=${{ github.event.issue.number }}
export PR_NUMBER=$(if [ "${{ github.event_name }}" = "pull_request" ]; then echo "${{ github.event.number }}"; else echo "${{ github.event.issue.number }}"; fi)

echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_OUTPUT

gh pr checkout ${{ github.event.issue.number }}

export BASELINE_SHA=$(git merge-base master HEAD)
# Maybe this style of checkout is giving issues for `origin/master` / `master` refnames
Comment thread Fixed
# If its triggered by a PR, we're already on the branch
if [ "${{ github.event_name }}" != "pull_request" ]; then
gh pr checkout ${{ github.event.issue.number }}
fi

export BASELINE_SHA=$(git merge-base --fork-point master)
echo "BASELINE_SHA=${BASELINE_SHA}" >> $GITHUB_OUTPUT

export COMPARISON_SHA=$(git rev-parse HEAD)
Expand Down Expand Up @@ -229,44 +233,12 @@ jobs:
exit 1
fi

- name: Setup experimental metadata
- name: Set SMP version
id: experimental-meta
run: |
export WARMUP_SECONDS="45"
export REPLICAS="10"
export TOTAL_SAMPLES="600"
export P_VALUE="0.1"
export SMP_CRATE_VERSION="0.11.0"
export LADING_VERSION="0.19.1"

echo "warmup seconds: ${WARMUP_SECONDS}"
echo "replicas: ${REPLICAS}"
echo "total samples: ${TOTAL_SAMPLES}"
echo "regression p-value: ${P_VALUE}"
export SMP_CRATE_VERSION="0.15.1"
echo "smp crate version: ${SMP_CRATE_VERSION}"
echo "lading version: ${LADING_VERSION}"

echo "WARMUP_SECONDS=${WARMUP_SECONDS}" >> $GITHUB_OUTPUT
echo "REPLICAS=${REPLICAS}" >> $GITHUB_OUTPUT
echo "TOTAL_SAMPLES=${TOTAL_SAMPLES}" >> $GITHUB_OUTPUT
echo "P_VALUE=${P_VALUE}" >> $GITHUB_OUTPUT
echo "SMP_CRATE_VERSION=${SMP_CRATE_VERSION}" >> $GITHUB_OUTPUT
echo "LADING_VERSION=${LADING_VERSION}" >> $GITHUB_OUTPUT

- name: Setup system details
id: system
run: |
export CPUS="7"
export MEMORY="30g"
export VECTOR_CPUS="4"

echo "cpus total: ${CPUS}"
echo "memory total: ${MEMORY}"
echo "vector cpus: ${VECTOR_CPUS}"

echo "CPUS=${CPUS}" >> $GITHUB_OUTPUT
echo "MEMORY=${MEMORY}" >> $GITHUB_OUTPUT
echo "VECTOR_CPUS=${VECTOR_CPUS}" >> $GITHUB_OUTPUT

- name: (PR comment) Get PR branch
if: ${{ github.event_name == 'issue_comment' }}
Expand Down Expand Up @@ -509,20 +481,11 @@ jobs:
chmod +x ${{ runner.temp }}/bin/smp

${{ runner.temp }}/bin/smp --team-id ${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }} job submit \
--lading-version ${{ needs.compute-metadata.outputs.lading-version }} \
--total-samples ${{ needs.compute-metadata.outputs.total-samples }} \
--warmup-seconds ${{ needs.compute-metadata.outputs.warmup-seconds }} \
--replicas ${{ needs.compute-metadata.outputs.replicas }} \
--baseline-image ${{ steps.login-ecr.outputs.registry }}/${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }}-vector:${{ needs.compute-metadata.outputs.baseline-tag }} \
--comparison-image ${{ steps.login-ecr.outputs.registry }}/${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }}-vector:${{ needs.compute-metadata.outputs.comparison-tag }} \
--baseline-sha ${{ needs.compute-metadata.outputs.baseline-sha }} \
--comparison-sha ${{ needs.compute-metadata.outputs.comparison-sha }} \
--target-command "/usr/local/bin/vector" \
--target-config-dir ${{ github.workspace }}/regression/ \
--target-cpu-allotment "${{ needs.compute-metadata.outputs.cpus }}" \
--target-memory-allotment "${{ needs.compute-metadata.outputs.memory }}" \
--target-environment-variables "VECTOR_THREADS=${{ needs.compute-metadata.outputs.vector-cpus }},VECTOR_REQUIRE_HEALTHY=true" \
--target-name vector \
--submission-metadata ${{ runner.temp }}/submission-metadata

- uses: actions/upload-artifact@v3
Expand All @@ -541,7 +504,6 @@ jobs:
--wait \
--wait-delay-seconds 60 \
--wait-timeout-minutes 90 \
--use-consignor welch \
--submission-metadata ${{ runner.temp }}/submission-metadata

- name: Handle cancellation if necessary
Expand Down Expand Up @@ -632,7 +594,7 @@ jobs:
chmod +x ${{ runner.temp }}/bin/smp

${{ runner.temp }}/bin/smp --team-id ${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }} job result \
--submission-metadata ${{ runner.temp }}/submission-metadata --use-consignor welch
--submission-metadata ${{ runner.temp }}/submission-metadata

- name: Check status, cancelled
if: ${{ cancelled() }}
Expand Down Expand Up @@ -725,7 +687,7 @@ jobs:

${{ runner.temp }}/bin/smp --team-id ${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }} job sync \
--submission-metadata ${{ runner.temp }}/submission-metadata \
--output-path "${{ runner.temp }}/outputs" --use-consignor welch
--output-path "${{ runner.temp }}/outputs"

- name: Read regression report
id: read-analysis
Expand Down
210 changes: 0 additions & 210 deletions .github/workflows/workload_checks.yml
Comment thread
scottopell marked this conversation as resolved.

This file was deleted.

Loading