From be0f47ed6cff2010e533d2d7bd203fa1b0f92570 Mon Sep 17 00:00:00 2001 From: Benjamin Forehand Jr Date: Tue, 7 Jan 2025 10:24:12 -0600 Subject: [PATCH 1/5] fix SYNC-4566: Change the path for end to end testci builds. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 908349ba..ddef5f03 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -482,7 +482,7 @@ workflows: - build-test-container: name: Build End-To-End Test Image image: autopush-end-to-end-tests - path: end-to-end + path: notification filters: tags: only: /.*/ From ed29fb54d0ada0bf45d2e16aa5454e1c31eeb1ab Mon Sep 17 00:00:00 2001 From: JR Conlin Date: Wed, 8 Jan 2025 15:28:43 -0500 Subject: [PATCH 2/5] doc: Update CONTRIBUTING to emphasize commit signing (#818) While previously mentioned in the CONTRIBUTING.md document, we should emphasize and assist folk in understanding the importance of signing commits for PRs. We cannot accept unsigned code, which can lead to frustration with folk very kindly providing support for us. --- CONTRIBUTING.md | 6 ++++-- Makefile | 5 ++++- PR_TEMPLATE.md | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9f36eade..08927c03 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,11 +24,13 @@ Before submitting a PR: your reviewer's responsibility to ensure your patch includes adequate tests. When submitting a PR: +- **[Sign all your git commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-verification)**. + We cannot accept any PR that does not have all commits signed. This is a policy + put in place by our Security Operations team and is enforced by our CI processes. - You agree to license your code under the project's open source license ([MPL 2.0](/LICENSE)). - Base your branch off the current `master`. - Add both your code and new tests if relevant. -- Sign your git commit. - Run the test suite to make sure your code passes linting and tests. - Ensure your changes do not reduce code coverage of the test suite. - Please do not include merge commits in pull requests; include only commits @@ -93,5 +95,5 @@ passed and the commit message is properly formatted. BREAKING CHANGE: This patch requires developer to lower expectations about what "delicious" and "cookie" may mean. Some sadness may result. -Closes #3.14, #9.75 +Closes #314, #975 ``` diff --git a/Makefile b/Makefile index d93c336d..e337b879 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ SHELL := /bin/sh CARGO = cargo -TESTS_DIR := tests +# For unknown reasons, poetry on CI will sometimes "forget" what it's current path is, which +# can confuse relative path lookups. +# Let's be very explicit about it for now. +TESTS_DIR := `pwd`/tests TEST_RESULTS_DIR ?= workspace/test-results PYTEST_ARGS ?= $(if $(SKIP_SENTRY),-m "not sentry") $(if $(TEST_STUB),,-m "not stub") # Stub tests do not work in CI INTEGRATION_TEST_DIR := $(TESTS_DIR)/integration diff --git a/PR_TEMPLATE.md b/PR_TEMPLATE.md index 1413835a..d5fb4717 100644 --- a/PR_TEMPLATE.md +++ b/PR_TEMPLATE.md @@ -2,6 +2,8 @@ Describe these changes. +> **NOTE:** We can only accept PRS with all commits [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-verification). PRs that contain _any_ unsigned commits will not be accepted and the PR _must_ be resubmitted. If this is something you cannot provide, please disclose and a team member _may_ duplicate the PR as signed for you (depending on availablity and priority. Thank you for your understanding and cooperation.) + ## Testing How should reviewers test? From be7b2136e22f24892eba41fe566bb400aae62bc4 Mon Sep 17 00:00:00 2001 From: Benjamin Forehand Jr Date: Thu, 9 Jan 2025 09:21:03 -0600 Subject: [PATCH 3/5] fix(ci): Fix auto connect/endpoint deployments from circleci. --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ddef5f03..b2c68a35 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -415,8 +415,8 @@ jobs: fi echo "export GAR_IMAGE=\"<>/${GCP_GAR_PROJECT_ID}/${GCP_GAR_REPO}/<>\"" >> $BASH_ENV source $BASH_ENV - docker tag <>:<> $GAR_IMAGE:$GAR_TAG - docker tag <>:<> $GAR_IMAGE:latest + docker tag <> $GAR_IMAGE:$GAR_TAG + docker tag <> $GAR_IMAGE:latest # push-image parameters: # https://circleci.com/developer/orbs/orb/circleci/gcp-gcr#commands-push-image - gcp-gcr/push-image: @@ -457,7 +457,7 @@ workflows: - build: name: build-autoconnect - image: autoconnect:build + image: autoconnect crate: autoconnect binary: autoconnect filters: @@ -466,7 +466,7 @@ workflows: - build: name: build-autoendpoint - image: autoendpoint:build + image: autoendpoint crate: autoendpoint binary: autoendpoint filters: From 92af405d8ef48c3ce4b1657c6e81f48335427591 Mon Sep 17 00:00:00 2001 From: Benjamin Forehand Jr Date: Thu, 9 Jan 2025 13:02:30 -0600 Subject: [PATCH 4/5] fix(ci): Fix test containers not depolying. --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b2c68a35..bd4355ee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -330,12 +330,12 @@ jobs: docker_layer_caching: true - run: name: Build Image - command: docker build -t << parameters.image >>:build -f ./tests/<< parameters.path >>/Dockerfile . + command: docker build -t << parameters.image >> -f ./tests/<< parameters.path >>/Dockerfile . - run: name: Save Docker Image to Workspace command: | mkdir -p /tmp/cache - docker save -o /tmp/cache/<< parameters.image >>.tar << parameters.image >>:build + docker save -o /tmp/cache/<< parameters.image >>.tar << parameters.image >> - persist_to_workspace: root: /tmp/cache paths: @@ -360,12 +360,12 @@ jobs: docker buildx build --target planner -f ./tests/<< parameters.path >>/Dockerfile . docker buildx build --target cacher -f ./tests/<< parameters.path >>/Dockerfile . docker buildx build --target builder -f ./tests/<< parameters.path >>/Dockerfile . - docker buildx build --target integration-tests -t << parameters.image >>:build -f ./tests/<< parameters.path >>/Dockerfile . + docker buildx build --target integration-tests -t << parameters.image >> -f ./tests/<< parameters.path >>/Dockerfile . - run: name: Save Docker Image to Workspace command: | mkdir -p /tmp/cache - docker save -o /tmp/cache/<< parameters.image >>.tar << parameters.image >>:build + docker save -o /tmp/cache/<< parameters.image >>.tar << parameters.image >> - persist_to_workspace: root: /tmp/cache paths: From 544205593aa0511dd4cb29cf2138f863628bc399 Mon Sep 17 00:00:00 2001 From: Benjamin Forehand Jr Date: Thu, 9 Jan 2025 15:51:09 -0600 Subject: [PATCH 5/5] fix(ci): remove all tagging of images on CI before deploy stages. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bd4355ee..b184d9b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -169,7 +169,7 @@ jobs: name: Restore Docker image cache command: | docker load -i /tmp/cache/autopush-integration-tests.tar - docker tag autopush-integration-tests:build integration-tests + docker tag autopush-integration-tests integration-tests - run: name: Integration tests (Bigtable) command: |