Multi-key PA E2E Tests on rc for build 3544 #1203
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PA One command runner test | |
run-name: ${{ inputs.test_name }} on ${{ inputs.tag }} for build ${{ inputs.build_id }} | |
on: | |
workflow_call: | |
inputs: | |
dataset_id: | |
description: Attribution Dataset id | |
required: true | |
type: string | |
input_path: | |
description: S3 path to synthetic attribution data | |
required: false | |
default: https://fbpcs-github-e2e.s3.us-west-2.amazonaws.com/attribution/inputs/partner_e2e_input.csv | |
type: string | |
expected_result_path: | |
description: S3 path to expected results from synthetic run | |
required: false | |
default: https://fbpcs-github-e2e.s3.us-west-2.amazonaws.com/attribution/results/partner_expected_result_last_click.json | |
type: string | |
build_id: | |
description: The build id | |
required: false | |
default: 'test build' | |
type: string | |
test_name: | |
description: The name of the type of tests that are being run | |
required: false | |
default: 'PA E2E Tests' | |
type: string | |
tag: | |
description: Version tag to use for the PL/PA Binaries | |
required: false | |
default: rc | |
type: string | |
coordinator_tag: | |
description: The image tag for the coordinator image that we should use. | |
required: false | |
default: rc | |
type: string | |
tracker_hash: | |
description: '[Internal usage] Used for tracking workflow job status within Meta infra' | |
required: false | |
type: string | |
workflow_dispatch: | |
inputs: | |
dataset_id: | |
description: Attribution Dataset id | |
required: true | |
default: '1127612294482487' | |
input_path: | |
description: S3 path to synthetic attribution data | |
required: true | |
default: https://fbpcs-github-e2e.s3.us-west-2.amazonaws.com/attribution/inputs/partner_e2e_input.csv | |
expected_result_path: | |
description: S3 path to expected results from synthetic run | |
required: true | |
default: https://fbpcs-github-e2e.s3.us-west-2.amazonaws.com/attribution/results/partner_expected_result_last_click.json | |
build_id: | |
description: The build id | |
required: false | |
default: 'test build' | |
test_name: | |
description: The name of the type of tests that are being run | |
default: 'PA E2E Tests' | |
type: 'choice' | |
options: | |
- PA E2E Tests | |
- Multi-key PA E2E Tests | |
tag: | |
description: Version tag to use | |
required: true | |
default: rc | |
coordinator_tag: | |
description: The image tag for the coordinator image that we should use. | |
required: false | |
default: rc | |
type: string | |
tracker_hash: | |
description: '[Internal usage] Used for tracking workflow job status within Meta infra' | |
required: false | |
type: string | |
env: | |
FBPCS_CONTAINER_REPO_URL: public.ecr.aws/t7b1w5a4 | |
FBPCS_IMAGE_NAME: pc-coordinator-prod | |
FBPCS_GRAPH_API_TOKEN: ${{ secrets.FBPCS_GRAPH_API_TOKEN }} | |
jobs: | |
### Private Attribution E2E tests | |
pa_test: | |
name: Private Attribution E2E Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 90 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Print Tracker Hash | |
run: echo ${{ inputs.tracker_hash}} | |
- name: Get AWS Session name | |
id: aws_session_name | |
run: | | |
echo session_name=$(echo ${{ inputs.test_name }}-${{ inputs.build_id }} | tr " " "-") >> $GITHUB_OUTPUT | |
- name: Set AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: ${{ secrets.AWS_E2E_TEST_ROLE_TO_ASSUME }} | |
aws-region: us-west-2 | |
role-duration-seconds: 5400 | |
role-session-name: ${{ steps.aws_session_name.outputs.session_name }} | |
- name: One Command runner | |
run: | | |
./fbpcs/scripts/run_fbpcs.sh run_attribution \ | |
--dataset_id=${{ inputs.dataset_id }} \ | |
--attribution_rule="last_click_1d" \ | |
--input_path=${{ inputs.input_path }} \ | |
--aggregation_type="measurement" \ | |
--concurrency=4 \ | |
--num_files_per_mpc_container=4 \ | |
--config=./fbpcs/tests/github/config_one_command_runner_test.yml \ | |
--timestamp="1646870400" \ | |
--k_anonymity_threshold=0 \ | |
-- \ | |
--version=${{ inputs.tag }} \ | |
--image_version=${{ inputs.coordinator_tag }} \ | |
--docker_env=AWS_ACCESS_KEY_ID \ | |
--docker_env=AWS_SECRET_ACCESS_KEY \ | |
--docker_env=AWS_SESSION_TOKEN \ | |
--docker_env=AWS_DEFAULT_REGION | |
- name: Validate Results | |
# instances are named after ent ids, so we are going to look for filenames that consist of only numbers and then run validation on them | |
# the fbpcs_instances directory is where instances are written to (feature of run_fbpcs.sh) | |
# the config.yml specifies that /fbpcs_instances is the instance repo, which is the source of the "/{}" | |
run: | | |
find fbpcs_instances -regex 'fbpcs_instances/[0-9]+' | xargs -I {} ./fbpcs/scripts/run_fbpcs.sh \ | |
validate \ | |
"/{}" \ | |
--config=./fbpcs/tests/github/config_one_command_runner_test.yml \ | |
--expected_result_path=${{ inputs.expected_result_path }} \ | |
-- \ | |
--version=${{ inputs.tag }} \ | |
--image_version=${{ inputs.coordinator_tag }} \ | |
--docker_env=AWS_ACCESS_KEY_ID \ | |
--docker_env=AWS_SECRET_ACCESS_KEY \ | |
--docker_env=AWS_SESSION_TOKEN \ | |
--docker_env=AWS_DEFAULT_REGION |