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

Release v2.0.3-test.2 #296

Closed
wants to merge 63 commits into from
Closed
Changes from 35 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
454fcfd
ci: restructure e2e tests
necipallef Sep 16, 2024
797dedd
Merge pull request #281 from fingerprintjs/new_rc
necipallef Sep 17, 2024
edf9576
ci: change trigger condition and rename e2e test for releases pipeline
necipallef Sep 17, 2024
e43cf1d
ci: use commit id instead of version
necipallef Sep 17, 2024
445d63f
Merge pull request #282 from fingerprintjs/ci/e2e_workflows_2
necipallef Sep 17, 2024
0325bb2
ci: rename e2e test job names
necipallef Sep 17, 2024
a4dc5d7
Merge pull request #283 from fingerprintjs/ci/rename_workflows
necipallef Sep 17, 2024
e719ef2
ci: fix comments
necipallef Sep 17, 2024
18e9e07
Merge pull request #284 from fingerprintjs/ci/fix_workflows
necipallef Sep 17, 2024
35837fd
ci: combine deploy test branch workflow with e2e test branch workflow
necipallef Sep 18, 2024
df5af77
ci: scope e2e test permissions to job rather than whole workflow
necipallef Sep 18, 2024
b86d35b
Merge pull request #286 from fingerprintjs/ci/combine_deploy_test_bra…
necipallef Sep 19, 2024
2e8c7ca
chore: trigger aws lambdas cleanup from github
ilfa Sep 18, 2024
ce3840d
Merge pull request #287 from fingerprintjs/fix-cleanup-pipeline
ilfa Sep 19, 2024
74fa989
chore: use node20 for aws lambdas cleanup pipeline
ilfa Sep 19, 2024
4c1bafd
Merge pull request #288 from fingerprintjs/fix-cleanup-pipeline
ilfa Sep 19, 2024
6f6a54a
chore: use aws-sdk v3 for cleanup script
ilfa Sep 19, 2024
76bfe6c
Merge pull request #289 from fingerprintjs/fix-cleanup-pipeline
ilfa Sep 19, 2024
1848c89
chore: migrate cleanup script to aws-sdk v3, but mute delete calls to…
ilfa Sep 20, 2024
101c073
chore: fix ListObjectsV2Command
ilfa Sep 20, 2024
9926db6
chore: use paginator to list s3 bucket objects
ilfa Sep 20, 2024
9f0c08c
chore: unmute delete commands
ilfa Sep 20, 2024
0482b26
chore: add link to the aws pipeline for cleanup workflow
ilfa Sep 20, 2024
8a01eff
Merge pull request #290 from fingerprintjs/fix-cleanup-pipeline
ilfa Sep 20, 2024
0636fb3
chore: move region from secrets to vars
ilfa Sep 20, 2024
5330a64
Merge pull request #292 from fingerprintjs/fix-cleanup-pipeline
ilfa Sep 20, 2024
27ac657
ci: replace test branch flow with new flow
necipallef Sep 20, 2024
1af4a24
ci: refactor e2e buildspec
necipallef Sep 20, 2024
90f4aca
ci: refactor e2e buildspec
necipallef Sep 20, 2024
706198b
ci: attempt to pass branch name as var to codepipeline
necipallef Sep 20, 2024
11991fb
ci: attempt to pass branch name as var to codepipeline & remove deplo…
necipallef Sep 20, 2024
4a664c1
ci: rename parameter name
necipallef Sep 20, 2024
a7e42fa
ci: fix buildspec dir
necipallef Sep 20, 2024
f430867
ci: fix mocked e2e tests
necipallef Sep 21, 2024
9a53576
ci: add todo
necipallef Sep 21, 2024
38bd422
ci: fix mock e2e
necipallef Sep 21, 2024
4afb5fa
ci: fix mock e2e
necipallef Sep 21, 2024
6f5b3dd
chore: remove outdated comments
necipallef Sep 23, 2024
083a731
ci: try --source-revisions
necipallef Sep 23, 2024
e7e010e
ci: fix --source-revisions
necipallef Sep 23, 2024
8cef93e
ci: fix --source-revisions
necipallef Sep 23, 2024
7f4d37c
ci: add debug log
necipallef Sep 23, 2024
c32bc20
ci: fix commit id
necipallef Sep 23, 2024
36165ef
ci: fix commit id
necipallef Sep 23, 2024
3d845a6
ci: fix commit id
necipallef Sep 23, 2024
0260a3d
ci: remove branch name related logic from e2e tests
necipallef Sep 23, 2024
ab6ed16
ci: fix file paths
necipallef Sep 23, 2024
49be83d
ci: e2e tests clean up and put aws execution link to the action summary
necipallef Sep 24, 2024
0e1f9cb
ci: fix workflow trigger conditions
necipallef Sep 25, 2024
4f1ed3e
ci: replace github output with github env var
necipallef Sep 25, 2024
8a10f10
ci: replace github output with github env var
necipallef Sep 25, 2024
31c5c14
ci: revert back to using github outputs
necipallef Sep 25, 2024
3663e4f
ci: manual implementation of the diff action
necipallef Sep 25, 2024
b1fcf2c
ci: manual implementation of the diff action
necipallef Sep 25, 2024
b137b12
ci: manual implementation of the diff action
necipallef Sep 25, 2024
df761b6
ci: manual implementation of the diff action
necipallef Sep 25, 2024
c31ccb5
ci: manual implementation of the diff action
necipallef Sep 25, 2024
c4d0b0e
ci: debug job output
necipallef Sep 25, 2024
36d6e79
ci: debug job output
necipallef Sep 25, 2024
6841fc5
ci: fix diff filter and remove unused steps
necipallef Sep 25, 2024
f29afc7
Merge pull request #291 from fingerprintjs/ci/e2e_test_improvements
necipallef Sep 25, 2024
39e8484
ci: fix mock e2e tests
necipallef Sep 26, 2024
750ca3b
Merge pull request #294 from fingerprintjs/ci/fix-mock-e2e
necipallef Sep 27, 2024
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
46 changes: 0 additions & 46 deletions .github/workflows/cleanup_old_e2e_tasks.yml

This file was deleted.

107 changes: 0 additions & 107 deletions .github/workflows/deploy_test_branch.yml

This file was deleted.

84 changes: 84 additions & 0 deletions .github/workflows/e2e_test_for_prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Run e2e for topic branch
on:
pull_request:

jobs:
check-changed-files:
runs-on: ubuntu-20.04
name: Check changed files
outputs:
NEED_TO_RUN_TESTS: ${{ steps.decision.outputs.NEED_TO_RUN_TESTS }}
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Get changed files
id: decision
run: |
git fetch origin $GITHUB_BASE_REF
diff=$(git diff --name-only origin/$GITHUB_BASE_REF..HEAD)
echo $diff
needToRunTests=false
for changed_file in $diff; do
if [[ ${changed_file} =~ ^(proxy|scripts|mgmt-lambda)\/.+$ ]]; then
needToRunTests=true
fi
if [[ ${changed_file} =~ ^\.github\/workflows\/.+$ ]]; then
needToRunTests=true
fi
done
echo $needToRunTests
echo NEED_TO_RUN_TESTS=${needToRunTests} >> $GITHUB_OUTPUT
run-e2e-for-topic-branch:
needs: check-changed-files
if: needs['check-changed-files'].outputs.NEED_TO_RUN_TESTS == 'true'
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
name: Run e2e for topic branch
runs-on: ubuntu-latest
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 #v4.0.2
with:
role-to-assume: ${{secrets.AWS_E2E_ROLE_ARN}}
aws-region: ${{vars.AWS_E2E_REGION}}
- name: Trigger AWS CodePipeline
run: |
git_hash=${{ github.event.pull_request.head.sha }}
echo $git_hash
codepipeline_execution_id=$(aws codepipeline start-pipeline-execution --name ${{vars.AWS_E2E_TOPIC_BRANCH_CODEPIPELINE_NAME}} --source-revisions actionName=Source,revisionType=COMMIT_ID,revisionValue=$git_hash --query 'pipelineExecutionId' --output text)
echo "Pipeline execution ID: $codepipeline_execution_id"
echo "codepipeline_execution_id=$codepipeline_execution_id" >> $GITHUB_ENV
- name: Poll Pipeline Status
id: poll-status
run: |
while true; do
sleep 30
status=$(aws codepipeline get-pipeline-execution \
--pipeline-name ${{vars.AWS_E2E_TOPIC_BRANCH_CODEPIPELINE_NAME}} \
--pipeline-execution-id ${{ env.codepipeline_execution_id }} \
--query 'pipelineExecution.status' --output text)
echo "Current pipeline status: $status"
if [[ "$status" == "Succeeded" ]]; then
echo "Pipeline execution succeeded!"
exit 0
elif [[ "$status" == "Failed" ]]; then
echo "Pipeline execution failed!"
exit 1
fi
done
- name: Output Pipeline Link
if: always()
run: |
region=${{ vars.AWS_E2E_REGION }}
pipeline_name=${{ vars.AWS_E2E_TOPIC_BRANCH_CODEPIPELINE_NAME }}
execution_id=${{ env.codepipeline_execution_id }}
pipeline_url="https://${region}.console.aws.amazon.com/codesuite/codepipeline/pipelines/${pipeline_name}/executions/${execution_id}?region=${region}"
echo "AWS CodePipeline Execution URL: $pipeline_url"
echo "## AWS CodePipeline Execution Link" >> $GITHUB_STEP_SUMMARY
echo "[$pipeline_url]($pipeline_url)" >> $GITHUB_STEP_SUMMARY
18 changes: 0 additions & 18 deletions .github/workflows/serialize_job_info.js

This file was deleted.

15 changes: 15 additions & 0 deletions buildspec-e2e-pr-join-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 0.2

phases:
build:
commands:
# $CODEBUILD_SRC_DIR => rc branch
# $CODEBUILD_SRC_DIR_SourceArtifact => topic branch
- cd $CODEBUILD_SRC_DIR_SourceArtifact
- git status
- cp $CODEBUILD_SRC_DIR/buildspec-e2e.yml buildspec-e2e.yml
- cp $CODEBUILD_SRC_DIR/buildspec-mock-e2e.yml buildspec-mock-e2e.yml
artifacts:
files:
- '**/*'
base-directory: $CODEBUILD_SRC_DIR_SourceArtifact
19 changes: 9 additions & 10 deletions buildspec-e2e.yml
Original file line number Diff line number Diff line change
@@ -6,8 +6,6 @@ phases:
nodejs: 20
commands:
- npm i -g pnpm
- export COMMIT_SHA=$(cat meta.json | jq -r '.sha')
- echo $COMMIT_SHA
- echo $CODEBUILD_BUILD_ID
- echo $CODEBUILD_PUBLIC_BUILD_URL
- ls -a
@@ -20,16 +18,17 @@ phases:
- ls -lah
- pulumi version
- pnpm install
- pnpm -C website install && pnpm -C website build
- cd tests && pnpm install && npx playwright install --with-deps && cd ..
- cd infra/lambda && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd ../../
- cd infra/cloudfront && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd ../../
- cd infra && pnpm install && pnpm run lambda:up && pnpm run lambda:export && pnpm run cloudfront:up && pnpm run cloudfront:export && cd ../
- pnpm build
- cp -r dist e2e
- pnpm -C e2e/website install && pnpm -C e2e/website build
- cd e2e/tests && pnpm install && npx playwright install --with-deps && cd -
- cd e2e/infra/lambda && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd -
- cd e2e/infra/cloudfront && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd -
- cd e2e/infra && pnpm install && pnpm run lambda:up && pnpm run lambda:export && pnpm run cloudfront:up && pnpm run cloudfront:export && cd -
build:
commands:
- ls -a
- cd tests && pnpm test
- cd e2e/tests && pnpm test && cd -
finally:
- cd ../
- echo $COMMIT_SHA
- cd infra && pnpm cloudfront:destroy && pnpm lambda:destroy && cd ../
- cd e2e/infra && pnpm cloudfront:destroy && pnpm lambda:destroy && cd -
19 changes: 8 additions & 11 deletions buildspec-mock-e2e.yml
Original file line number Diff line number Diff line change
@@ -6,10 +6,6 @@ phases:
nodejs: 20
commands:
- npm i -g pnpm
- export COMMIT_SHA=$(cat meta.json | jq -r '.sha')
- export VERSION=$(cat meta.json | jq -r '.version')
- echo $COMMIT_SHA
- echo $VERSION
- echo $CODEBUILD_BUILD_ID
- echo $CODEBUILD_PUBLIC_BUILD_URL
- ls -a
@@ -22,16 +18,17 @@ phases:
- ls -lah
- pulumi version
- pnpm install
- pnpm build
- npm i -g ts-node
- pnpm -C website install && pnpm -C website build
- cd tests && pnpm install && cd ..
- cd infra/lambda && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd ../../
- cd infra/cloudfront && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd ../../
- cd infra && pnpm install && pnpm run lambda:up && pnpm run lambda:export && pnpm run cloudfront:up && pnpm run cloudfront:export && cd ../
- pnpm -C e2e/website install && pnpm -C e2e/website build
- cd e2e/tests && pnpm install && cd -
- cd e2e/infra/lambda && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd -
- cd e2e/infra/cloudfront && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd -
- cd e2e/infra && pnpm install && pnpm run lambda:up && pnpm run lambda:export && pnpm run cloudfront:up && pnpm run cloudfront:export && cd -
build:
commands:
- ts-node ./scripts/mockTests.ts --project=tsconfig.json
- ts-node e2e/scripts/mockTests.ts --project=tsconfig.json
finally:
- echo $COMMIT_SHA
- cd infra && pnpm cloudfront:destroy && pnpm lambda:destroy && cd ../
- cd e2e/infra && pnpm cloudfront:destroy && pnpm lambda:destroy && cd -

Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ function assertIsCustomerVariableValue(value: unknown, key: string): asserts val
}
}

// TODO Update notion documentation to contain correct keys
export function validateSecret(obj: unknown): asserts obj is CustomerVariablesRecord {
if (!obj || typeof obj !== 'object') {
throw new TypeError('Secrets Manager secret is not an object')