From d363195a522ecfe46afc7c6d15ce78ba57cd4d18 Mon Sep 17 00:00:00 2001 From: Matt Fellows Date: Fri, 4 Aug 2023 16:38:37 +1000 Subject: [PATCH 01/19] chore: add pact-foundation triage automation --- .github/workflows/triage.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/triage.yml diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml new file mode 100644 index 0000000..eb5ec30 --- /dev/null +++ b/.github/workflows/triage.yml @@ -0,0 +1,15 @@ +name: Triage Issue + +on: + issues: + types: + - opened + - labeled + pull_request: + types: + - labeled + +jobs: + call-workflow: + uses: pact-foundation/.github/.github/workflows/triage.yml@master + secrets: inherit From c3035e0e4fce9c295ebc38ec56836157c1662bae Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Wed, 9 Aug 2023 09:34:54 +1000 Subject: [PATCH 02/19] chore: allow tests to be triggered via UI --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d4764b0..9c351cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,9 @@ name: Test -on: [push, pull_request] +on: + push: + pull_request: + workflow_dispatch: jobs: test: From cbf788b469ad0fd556f03f76c1012522790d1fe0 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Wed, 9 Aug 2023 09:43:03 +1000 Subject: [PATCH 03/19] chore: try fix yaml error --- docker-compose-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-tests.yml b/docker-compose-tests.yml index 9f916f4..d644fd6 100644 --- a/docker-compose-tests.yml +++ b/docker-compose-tests.yml @@ -11,7 +11,7 @@ services: POSTGRES_DB: postgres pact-broker: - image: pactfoundation/pact-broker:latest + image: "pactfoundation/pact-broker:latest" depends_on: - postgres environment: From 534325d30c23dfc6361dcce2ce26424d5f3603c2 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Wed, 9 Aug 2023 09:49:16 +1000 Subject: [PATCH 04/19] chore: put quotes around image names because we're now getting 'yaml.scanner.ScannerError: mapping values are not allowed here' without that --- docker-compose-clean-cron.yml | 2 +- docker-compose-clean.yml | 2 +- docker-compose-heroku.yml | 2 +- docker-compose-test-different-env-var-names.yml | 2 +- docker-compose.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose-clean-cron.yml b/docker-compose-clean-cron.yml index c4fd90c..f092a7a 100644 --- a/docker-compose-clean-cron.yml +++ b/docker-compose-clean-cron.yml @@ -14,7 +14,7 @@ services: - ${PWD}/docker/pg-dump.sql:/tmp/pg-dump.sql pact-broker: - image: pactfoundation/pact-broker:2.110.0-pactbroker2.107.1 + image: "pactfoundation/pact-broker:2.110.0-pactbroker2.107.1" ports: - "9393:9393" depends_on: diff --git a/docker-compose-clean.yml b/docker-compose-clean.yml index 4632796..b587b37 100644 --- a/docker-compose-clean.yml +++ b/docker-compose-clean.yml @@ -14,7 +14,7 @@ services: - ${PWD}/docker/pg-dump.sql:/tmp/pg-dump.sql pact-broker: - image: pactfoundation/pact-broker:2.110.0-pactbroker2.107.1 + image: "pactfoundation/pact-broker:2.110.0-pactbroker2.107.1" ports: - "9393:9393" depends_on: diff --git a/docker-compose-heroku.yml b/docker-compose-heroku.yml index b58a558..d7b5eb8 100644 --- a/docker-compose-heroku.yml +++ b/docker-compose-heroku.yml @@ -17,7 +17,7 @@ services: POSTGRES_DB: postgres pact-broker: - image: pactfoundation/pact-broker:2.110.0-pactbroker2.107.1 + image: "pactfoundation/pact-broker:2.110.0-pactbroker2.107.1" ports: - "9393:9393" depends_on: diff --git a/docker-compose-test-different-env-var-names.yml b/docker-compose-test-different-env-var-names.yml index c9588dd..8346791 100644 --- a/docker-compose-test-different-env-var-names.yml +++ b/docker-compose-test-different-env-var-names.yml @@ -11,7 +11,7 @@ services: POSTGRES_DB: postgres pact-broker: - image: pactfoundation/pact-broker:latest + image: "pactfoundation/pact-broker:latest" depends_on: - postgres environment: diff --git a/docker-compose.yml b/docker-compose.yml index e497d3f..e06f2ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: POSTGRES_DB: postgres pact-broker: - image: pactfoundation/pact-broker:2.110.0-pactbroker2.107.1 + image: "pactfoundation/pact-broker:2.110.0-pactbroker2.107.1" ports: - "9292:9292" depends_on: From f8db2a2851adc2289f2b0a145ab59ef25e017ca8 Mon Sep 17 00:00:00 2001 From: bethesque Date: Tue, 8 Aug 2023 23:52:49 +0000 Subject: [PATCH 05/19] feat(deps): update to anyway_config (2.5.1), dry-configurable (1.1.0), dry-core (1.0.1), dry-schema (1.13.2), i18n (1.14.1), mini_portile2 (2.8.4), nokogiri (1.15.3), mini_portile2 (~> 2.8.2), racc (1.7.1), rack (2.2.8), sanitize (6.0.2), semantic_logger (4.14.0), sequel (5.71.0), sqlite3 (1.6.3), stringio (3.0.7), temple (0.10.2), thor (1.2.2), tilt (2.2.0), zeitwerk (2.6.11) [ci-skip] --- pact_broker/Gemfile.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pact_broker/Gemfile.lock b/pact_broker/Gemfile.lock index 822a9aa..605c362 100644 --- a/pact_broker/Gemfile.lock +++ b/pact_broker/Gemfile.lock @@ -9,7 +9,7 @@ GIT GEM remote: https://rubygems.org/ specs: - anyway_config (2.4.0) + anyway_config (2.5.1) ruby-next-core (>= 0.14.0) as-notifications (1.0.2) awesome_print (1.9.2) @@ -20,10 +20,10 @@ GEM disposable (0.6.3) declarative (>= 0.0.9, < 1.0.0) representable (>= 3.1.1, < 4) - dry-configurable (1.0.1) + dry-configurable (1.1.0) dry-core (~> 1.0, < 2) zeitwerk (~> 2.6) - dry-core (1.0.0) + dry-core (1.0.1) concurrent-ruby (~> 1.0) zeitwerk (~> 2.6) dry-inflector (1.0.0) @@ -32,7 +32,7 @@ GEM concurrent-ruby (~> 1.0) dry-core (~> 1.0, < 2) zeitwerk (~> 2.6) - dry-schema (1.13.1) + dry-schema (1.13.2) concurrent-ruby (~> 1.0) dry-configurable (~> 1.0, >= 1.0.1) dry-core (~> 1.0, < 2) @@ -57,18 +57,18 @@ GEM haml (5.2.2) temple (>= 0.8.0) tilt - i18n (1.13.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) json (2.6.3) - mini_portile2 (2.8.2) + mini_portile2 (2.8.4) moments (0.2.0) multi_json (1.15.0) mustermann (2.0.2) ruby2_keywords (~> 0.0.1) mysql2 (0.5.5) nio4r (2.5.9) - nokogiri (1.14.3) - mini_portile2 (~> 2.8.0) + nokogiri (1.15.3) + mini_portile2 (~> 2.8.2) racc (~> 1.4) pact-support (1.19.0) awesome_print (~> 1.9) @@ -111,8 +111,8 @@ GEM stringio puma (5.6.6) nio4r (~> 2.0) - racc (1.6.2) - rack (2.2.7) + racc (1.7.1) + rack (2.2.8) rack-protection (2.2.4) rack rainbow (3.1.1) @@ -132,25 +132,25 @@ GEM representable (~> 3.1) ruby-next-core (0.15.3) ruby2_keywords (0.0.5) - sanitize (6.0.1) + sanitize (6.0.2) crass (~> 1.0.2) nokogiri (>= 1.12.0) - semantic_logger (4.13.0) + semantic_logger (4.14.0) concurrent-ruby (~> 1.0) semver2 (3.4.2) - sequel (5.68.0) + sequel (5.71.0) sinatra (2.2.4) mustermann (~> 2.0) rack (~> 2.2) rack-protection (= 2.2.4) tilt (~> 2.0) - sqlite3 (1.6.2) + sqlite3 (1.6.3) mini_portile2 (~> 2.8.0) - stringio (3.0.6) + stringio (3.0.7) table_print (1.5.7) - temple (0.10.0) - thor (1.2.1) - tilt (2.1.0) + temple (0.10.2) + thor (1.2.2) + tilt (2.2.0) trailblazer-option (0.1.2) uber (0.1.0) webmachine (2.0.0) @@ -159,7 +159,7 @@ GEM multi_json webrick (1.8.1) wisper (2.0.1) - zeitwerk (2.6.8) + zeitwerk (2.6.11) PLATFORMS ruby From 0c1d5615e14348f243a07e4e18e991f971562606 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Wed, 9 Aug 2023 11:12:13 +1000 Subject: [PATCH 06/19] chore: default to amd64 for scans --- script/scan.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script/scan.sh b/script/scan.sh index c685029..eff90ed 100755 --- a/script/scan.sh +++ b/script/scan.sh @@ -3,6 +3,7 @@ set -eu : "${1?Please provide the image to scan}" +ARCH=${ARCH:-'amd64'} SCRIPT_DIR=$(cd "$(dirname $0)" && pwd) From da1a0a3dfd99b717a966faf99a2db3ccd5fe15ad Mon Sep 17 00:00:00 2001 From: bethesque Date: Wed, 9 Aug 2023 03:11:28 +0000 Subject: [PATCH 07/19] v2.111.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 87a4a04..23a7ef5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.110.0 \ No newline at end of file +2.111.0 \ No newline at end of file From 28e4f170fe5ed5f78d82fcd37e9a8a3f43413057 Mon Sep 17 00:00:00 2001 From: bethesque Date: Wed, 9 Aug 2023 03:11:28 +0000 Subject: [PATCH 08/19] chore(release): version 2.111.0-pactbroker2.107.1 --- CHANGELOG.md | 13 +++++++++++++ docker-compose-with-conf-file.yml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 849065f..b688697 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ + +### 2.111.0-pactbroker2.107.1 (2023-08-08) + +#### Features + +* **deps** + * update to anyway_config (2.5.1), dry-configurable (1.1.0), dry-core (1.0.1), dry-schema (1.13.2), i18n (1.14.1), mini_portile2 (2.8.4), nokogiri (1.15.3), mini_portile2 (~> 2.8.2), racc (1.7.1), rack (2.2.8), sanitize (6.0.2), semantic_logger (4.14.0), sequel (5.71.0), sqlite3 (1.6.3), stringio (3.0.7), temple (0.10.2), thor (1.2.2), tilt (2.2.0), zeitwerk (2.6.11) ([f8db2a2](/../../commit/f8db2a2)) + +#### Bug Fixes + +* **deps** + * bump puma from 5.6.5 to 5.6.6 ([de0b934](/../../commit/de0b934)) + ### 2.110.0-pactbroker2.107.1 (2023-05-24) diff --git a/docker-compose-with-conf-file.yml b/docker-compose-with-conf-file.yml index d789e07..1c3a772 100644 --- a/docker-compose-with-conf-file.yml +++ b/docker-compose-with-conf-file.yml @@ -2,7 +2,7 @@ version: "3" services: pact-broker: - # image: pactfoundation/pact-broker:2.110.0-pactbroker2.107.1 + # image: pactfoundation/pact-broker:2.111.0-pactbroker2.107.1 build: . ports: - "9292:9292" From 25807a3aa3d9432ff7285c5da676ba1b15fcde76 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Wed, 9 Aug 2023 15:43:07 +0100 Subject: [PATCH 09/19] ci(audit): remove audit step for armv7 due to missing binaries https://github.com/aquasecurity/trivy/discussions/4972 --- .github/workflows/audit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 66daa8f..08f8d2e 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - DOCKER_TARGET_PLATFORM: [linux/arm, linux/arm64, linux/amd64] + DOCKER_TARGET_PLATFORM: [linux/arm64, linux/amd64] runs-on: ubuntu-latest env: DOCKER_TARGET_PLATFORM: ${{ matrix.DOCKER_TARGET_PLATFORM }} @@ -23,4 +23,4 @@ jobs: if: ${{ matrix.DOCKER_TARGET_PLATFORM }} == 'linux/arm' || 'linux/arm64' run: ./script/release-workflow/docker-prepare.sh - name: Audit Docker image for ${{ matrix.DOCKER_TARGET_PLATFORM }} - run: ./script/release-workflow/audit.sh \ No newline at end of file + run: ./script/release-workflow/audit.sh From 1513343526d2844b8c982176a5e9419a0be3d80a Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Thu, 10 Aug 2023 13:05:20 +0100 Subject: [PATCH 10/19] chore(docs): remove readme badges that dont exist --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index cb486a0..ed9b0ce 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,6 @@ This repository contains a Dockerized version of the [Pact Broker][pact-broker]. [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/pact-foundation/pact-msw-adapter/graphs/commit-activity) -[![Linux](https://svgshare.com/i/Zhy.svg)](https://svgshare.com/i/Zhy.svg) -[![macOS](https://svgshare.com/i/ZjP.svg)](https://svgshare.com/i/ZjP.svg) -[![Windows](https://svgshare.com/i/ZhY.svg)](https://svgshare.com/i/ZhY.svg) - [![Build and test](https://github.com/pact-foundation/pact-broker-docker/actions/workflows/test.yml/badge.svg)](https://github.com/pact-foundation/pact-broker-docker/actions/workflows/test.yml) [![Audit](https://github.com/pact-foundation/pact-broker-docker/actions/workflows/audit.yml/badge.svg)](https://github.com/pact-foundation/pact-broker-docker/actions/workflows/audit.yml) [![Release](https://github.com/pact-foundation/pact-broker-docker/actions/workflows/release_image.yml/badge.svg)](https://github.com/pact-foundation/pact-broker-docker/actions/workflows/release_image.yml) From 76db13978a4f40aec48af7827a2e5a5d9ff77cec Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Mon, 21 Aug 2023 05:24:31 +0000 Subject: [PATCH 11/19] fix: pact_broker/Gemfile & pact_broker/Gemfile.lock to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-RUBY-PUMA-5846204 --- pact_broker/Gemfile | 2 +- pact_broker/Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pact_broker/Gemfile b/pact_broker/Gemfile index b886006..f15fd00 100644 --- a/pact_broker/Gemfile +++ b/pact_broker/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' gem "pact_broker" gem "pg", "~>1.4" -gem "puma", "~> 5.6" +gem "puma", "~> 5.6", ">= 5.6.7" gem "mysql2", "~>0.3" gem "sqlite3", "~>1.6" gem "rake", "~> 13.0" diff --git a/pact_broker/Gemfile.lock b/pact_broker/Gemfile.lock index 605c362..a4afb52 100644 --- a/pact_broker/Gemfile.lock +++ b/pact_broker/Gemfile.lock @@ -109,7 +109,7 @@ GEM pg (1.5.3) psych (4.0.6) stringio - puma (5.6.6) + puma (5.6.7) nio4r (~> 2.0) racc (1.7.1) rack (2.2.8) @@ -168,7 +168,7 @@ DEPENDENCIES mysql2 (~> 0.3) pact_broker pg (~> 1.4) - puma (~> 5.6) + puma (~> 5.6, >= 5.6.7) rake (~> 13.0) sqlite3 (~> 1.6) sucker_punch! From 18223780425d9e39a1e3edb2d596a392049134a9 Mon Sep 17 00:00:00 2001 From: YOU54F Date: Fri, 8 Sep 2023 16:40:10 +0000 Subject: [PATCH 12/19] v2.112.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 23a7ef5..2c44f50 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.111.0 \ No newline at end of file +2.112.0 \ No newline at end of file From cdb600368254333b1c1e829bcec9d7c45d5978ef Mon Sep 17 00:00:00 2001 From: YOU54F Date: Fri, 8 Sep 2023 16:40:10 +0000 Subject: [PATCH 13/19] chore(release): version 2.112.0-pactbroker2.107.1 --- CHANGELOG.md | 7 +++++++ docker-compose-with-conf-file.yml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b688697..68a80f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ + +### 2.112.0-pactbroker2.107.1 (2023-08-21) + +#### Bug Fixes + +* pact_broker/Gemfile & pact_broker/Gemfile.lock to reduce vulnerabilities ([76db139](/../../commit/76db139)) + ### 2.111.0-pactbroker2.107.1 (2023-08-08) diff --git a/docker-compose-with-conf-file.yml b/docker-compose-with-conf-file.yml index 1c3a772..0df9c1b 100644 --- a/docker-compose-with-conf-file.yml +++ b/docker-compose-with-conf-file.yml @@ -2,7 +2,7 @@ version: "3" services: pact-broker: - # image: pactfoundation/pact-broker:2.111.0-pactbroker2.107.1 + # image: pactfoundation/pact-broker:2.112.0-pactbroker2.107.1 build: . ports: - "9292:9292" From adbf9af5282311453fc499334a7fd6b35ebe13fb Mon Sep 17 00:00:00 2001 From: Ilya Denisov Date: Tue, 12 Sep 2023 02:50:06 +0300 Subject: [PATCH 14/19] feat: update clean shell script to fail if any of the commands fail https://github.com/pact-foundation/pact-broker-docker/pull/139 --- pact_broker/clean.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pact_broker/clean.sh b/pact_broker/clean.sh index 310d4d0..6379492 100755 --- a/pact_broker/clean.sh +++ b/pact_broker/clean.sh @@ -1,4 +1,6 @@ #!/bin/sh +set -e + bundle exec rake pact_broker:db:clean bundle exec rake pact_broker:db:delete_overwritten_data From 2bdd8125911956cb209d0803cfb800657dba929d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:50:49 +1000 Subject: [PATCH 15/19] chore(deps): bump sqlite3 from 1.6.3 to 1.6.5 in /pact_broker (#147) Bumps [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) from 1.6.3 to 1.6.5. - [Release notes](https://github.com/sparklemotion/sqlite3-ruby/releases) - [Changelog](https://github.com/sparklemotion/sqlite3-ruby/blob/master/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/sqlite3-ruby/compare/v1.6.3...v1.6.5) --- updated-dependencies: - dependency-name: sqlite3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pact_broker/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pact_broker/Gemfile.lock b/pact_broker/Gemfile.lock index a4afb52..7aedce9 100644 --- a/pact_broker/Gemfile.lock +++ b/pact_broker/Gemfile.lock @@ -144,7 +144,7 @@ GEM rack (~> 2.2) rack-protection (= 2.2.4) tilt (~> 2.0) - sqlite3 (1.6.3) + sqlite3 (1.6.5) mini_portile2 (~> 2.8.0) stringio (3.0.7) table_print (1.5.7) From 15502886c03750a7e3bbdc3033e20461df94877e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:51:01 +1000 Subject: [PATCH 16/19] chore(deps): bump pg from 1.5.3 to 1.5.4 in /pact_broker (#146) Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.3 to 1.5.4. - [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md) - [Commits](https://github.com/ged/ruby-pg/compare/v1.5.3...v1.5.4) --- updated-dependencies: - dependency-name: pg dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pact_broker/Gemfile | 2 +- pact_broker/Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pact_broker/Gemfile b/pact_broker/Gemfile index f15fd00..b45d2f2 100644 --- a/pact_broker/Gemfile +++ b/pact_broker/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' gem "pact_broker" -gem "pg", "~>1.4" +gem "pg", "~>1.5" gem "puma", "~> 5.6", ">= 5.6.7" gem "mysql2", "~>0.3" gem "sqlite3", "~>1.6" diff --git a/pact_broker/Gemfile.lock b/pact_broker/Gemfile.lock index 7aedce9..3d65a65 100644 --- a/pact_broker/Gemfile.lock +++ b/pact_broker/Gemfile.lock @@ -106,7 +106,7 @@ GEM thor (~> 1.0) padrino-support (0.15.3) parslet (2.0.0) - pg (1.5.3) + pg (1.5.4) psych (4.0.6) stringio puma (5.6.7) @@ -167,7 +167,7 @@ PLATFORMS DEPENDENCIES mysql2 (~> 0.3) pact_broker - pg (~> 1.4) + pg (~> 1.5) puma (~> 5.6, >= 5.6.7) rake (~> 13.0) sqlite3 (~> 1.6) From b9334b5ec739c22b0f599782f857981c982709d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:51:50 +1000 Subject: [PATCH 17/19] chore(deps): bump sanitize from 6.0.1 to 6.0.2 in /pact_broker (#138) Bumps [sanitize](https://github.com/rgrove/sanitize) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/rgrove/sanitize/releases) - [Changelog](https://github.com/rgrove/sanitize/blob/main/HISTORY.md) - [Commits](https://github.com/rgrove/sanitize/compare/v6.0.1...v6.0.2) --- updated-dependencies: - dependency-name: sanitize dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Beth Skurrie From 01a4326b1b52204782a9ff59cd880490dd6311a8 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 15 Sep 2023 22:37:37 +0100 Subject: [PATCH 18/19] chore: test out with debian for arm64 with sqlite3 --- .ruby-version | 2 +- Dockerfile | 51 +++--------- Gemfile.lock | 163 +++++++++++++++++++------------------- pact_broker/.ruby-version | 2 +- pact_broker/Gemfile.lock | 24 +++--- 5 files changed, 108 insertions(+), 134 deletions(-) diff --git a/.ruby-version b/.ruby-version index 4fe5631..be94e6f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2 \ No newline at end of file +3.2.2 diff --git a/Dockerfile b/Dockerfile index cdd3dab..ae9d669 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,71 +1,38 @@ -FROM ruby:3.2.1-alpine3.17 as base - -# 1. Install target specfic dependencies -# - gcompat required for arm/arm64 (otherwise nokogiri breaks when viewing network graph) -# - https://github.com/sparklemotion/nokogiri/issues/2414 -# 2. Supercronic - setup sha1sum for each supported architecture +FROM ruby:3.2.2-slim as base FROM base AS base-amd64 -ENV SUPERCRONIC_SHA1SUM=6817299e04457e5d6ec4809c72ee13a43e95ba41 +ENV SUPERCRONIC_SHA1SUM=7a79496cf8ad899b99a719355d4db27422396735 FROM base AS base-arm64 -ENV SUPERCRONIC_SHA1SUM=fce407a3d7d144120e97cfc0420f16a18f4637d9 -RUN apk add --update --no-cache gcompat +ENV SUPERCRONIC_SHA1SUM=e4801adb518ffedfd930ab3a82db042cb78a0a41 FROM base AS base-arm -ENV SUPERCRONIC_SHA1SUM=fad9380ed30b9eae61a5b1089f93bd7ee8eb1a9c -RUN apk add --update --no-cache gcompat - -# Supercronic - use base-$TARGETARCH to select correct base image SUPERCRONIC_SHA1SUM +ENV SUPERCRONIC_SHA1SUM=d8124540ebd8f19cc0d8a286ed47ac132e8d151d ARG TARGETARCH FROM base-$TARGETARCH AS pb-dev - -# Install Supercronic ARG TARGETARCH -ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.24/supercronic-linux-${TARGETARCH} \ +ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.26/supercronic-linux-${TARGETARCH} \ SUPERCRONIC=supercronic-linux-${TARGETARCH} +RUN apt-get update -y && apt-get -y install wget RUN wget "$SUPERCRONIC_URL" \ && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - -# Installation path ENV HOME=/pact_broker - -# Setup ruby user & install application dependencies -RUN set -ex && \ - adduser -h $HOME -s /bin/false -D -S -G root ruby && \ - chmod g+w $HOME - -# Install Gems WORKDIR $HOME +RUN adduser --system --group --no-create-home --home $HOME --shell /bin/false --disabled-login ruby && chmod g+w $HOME COPY pact_broker/Gemfile pact_broker/Gemfile.lock $HOME/ RUN cat Gemfile.lock | grep -A1 "BUNDLED WITH" | tail -n1 | awk '{print $1}' > BUNDLER_VERSION RUN set -ex && \ - apk add --update --no-cache make gcc libc-dev mariadb-dev postgresql14-dev sqlite-dev git && \ - apk upgrade && \ + apt-get -y install make gcc libc-dev libmariadb-dev libpq-dev libsqlite3-dev git && \ gem install bundler -v $(cat BUNDLER_VERSION) && \ bundle config set deployment 'true' && \ bundle config set no-cache 'true' && \ bundle config set without 'development test' && \ - bundle install && \ - rm -rf vendor/bundle/ruby/*/cache .bundle/cache && \ - find $HOME/vendor/bundle /usr/local/lib/ruby/gems \ - \( -name Gemfile.lock -o -name package-lock.json \) -exec rm -rf {} + && \ - find $HOME/vendor/bundle /usr/local/lib/ruby/gems \ - \( -name *.pem -o -name *.key -o -name *.java -o -name *.jar \) | \ - grep -e sample -e test -e spec | xargs rm -rf {} + && \ - apk del make gcc libc-dev git - -# Install source + bundle install COPY pact_broker $HOME/ RUN mv $HOME/clean.sh /usr/local/bin/clean - RUN ln -s /pact_broker/script/db-migrate.sh /usr/local/bin/db-migrate RUN ln -s /pact_broker/script/db-version.sh /usr/local/bin/db-version - -# Hide pattern matching warnings ENV RUBYOPT="-W:no-experimental" - -# Start Puma ENV RACK_ENV=production ENV PACT_BROKER_DATABASE_CLEAN_ENABLED=false ENV PACT_BROKER_DATABASE_CLEAN_CRON_SCHEDULE="15 2 * * *" diff --git a/Gemfile.lock b/Gemfile.lock index 062c663..1a4fa7b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,174 +23,177 @@ GIT GEM remote: https://rubygems.org/ specs: - anyway_config (2.3.1) + anyway_config (2.5.3) ruby-next-core (>= 0.14.0) as-notifications (1.0.2) awesome_print (1.9.2) - concurrent-ruby (1.2.0) + bigdecimal (3.1.4) + concurrent-ruby (1.2.2) crass (1.0.6) declarative (0.0.20) - declarative-builder (0.1.0) - declarative-option (< 0.2.0) - declarative-option (0.1.0) diff-lcs (1.5.0) - disposable (0.4.7) + disposable (0.6.3) declarative (>= 0.0.9, < 1.0.0) - declarative-builder (< 0.2.0) - declarative-option (< 0.2.0) - representable (>= 2.4.0, <= 3.1.0) - uber (< 0.2.0) - dry-configurable (0.12.1) + representable (>= 3.1.1, < 4) + dry-configurable (1.1.0) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-core (1.0.1) concurrent-ruby (~> 1.0) - dry-core (~> 0.5, >= 0.5.0) - dry-container (0.8.0) + zeitwerk (~> 2.6) + dry-inflector (1.0.0) + dry-initializer (3.1.1) + dry-logic (1.5.0) concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (0.9.1) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-schema (1.13.3) concurrent-ruby (~> 1.0) + dry-configurable (~> 1.0, >= 1.0.1) + dry-core (~> 1.0, < 2) + dry-initializer (~> 3.0) + dry-logic (>= 1.4, < 2) + dry-types (>= 1.7, < 2) zeitwerk (~> 2.6) - dry-equalizer (0.3.0) - dry-logic (0.4.2) - dry-container (~> 0.2, >= 0.2.6) - dry-core (~> 0.2) - dry-equalizer (~> 0.2) - dry-types (0.10.3) + dry-types (1.7.1) concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1) - dry-container (~> 0.3) - dry-core (~> 0.2, >= 0.2.1) - dry-equalizer (~> 0.2) - dry-logic (~> 0.4, >= 0.4.0) - inflecto (~> 0.0.0, >= 0.0.2) - dry-validation (0.10.7) + dry-core (~> 1.0) + dry-inflector (~> 1.0) + dry-logic (~> 1.4) + zeitwerk (~> 2.6) + dry-validation (1.10.0) concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (~> 0.2, >= 0.2.1) - dry-equalizer (~> 0.2) - dry-logic (~> 0.4, >= 0.4.0) - dry-types (~> 0.9, >= 0.9.0) + dry-core (~> 1.0, < 2) + dry-initializer (~> 3.0) + dry-schema (>= 1.12, < 2) + zeitwerk (~> 2.6) expgen (0.1.1) parslet haml (5.2.2) temple (>= 0.8.0) tilt - i18n (1.12.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) - inflecto (0.0.2) json (2.6.3) - mini_portile2 (2.8.1) + mini_portile2 (2.8.4) + moments (0.2.0) multi_json (1.15.0) mustermann (2.0.2) ruby2_keywords (~> 0.0.1) mysql2 (0.5.5) - nio4r (2.5.8) - nokogiri (1.14.1) - mini_portile2 (~> 2.8.0) + nio4r (2.5.9) + nokogiri (1.15.4) + mini_portile2 (~> 2.8.2) racc (~> 1.4) pact-support (1.19.0) awesome_print (~> 1.9) diff-lcs (~> 1.4) expgen (~> 0.1) rainbow (~> 3.1.1) - pact_broker (2.105.0) + pact_broker (2.107.1) anyway_config (~> 2.1) - dry-configurable (= 0.12.1) - dry-container (= 0.8.0) - dry-logic (= 0.4.2) - dry-types (~> 0.10.3) - dry-validation (~> 0.10.5) + dry-validation (~> 1.8) haml (~> 5.0) json (~> 2.3) + moments (~> 0.2) pact-support (~> 1.16, >= 1.16.4) padrino-core (~> 0.14, >= 0.14.3) + psych (~> 4.0) rack (~> 2.2, >= 2.2.3) rack-protection (>= 2.0.8.1, < 3.0) redcarpet (~> 3.5, >= 3.5.1) - reform (~> 2.3.3) + reform (~> 2.6) request_store (~> 1.5) roar (~> 1.1) - sanitize (= 6.0) + sanitize (~> 6.0) semantic_logger (~> 4.11) semver2 (~> 3.4.2) sequel (~> 5.28) sinatra (>= 2.0.8.1, < 3.0) sucker_punch (~> 2.0) table_print (~> 1.5) - webmachine (= 1.6.0) + webmachine (>= 2.0.0.beta, < 3.0) + webrick (~> 1.8) wisper (~> 2.0) - padrino-core (0.15.2) - padrino-support (= 0.15.2) + padrino-core (0.15.3) + padrino-support (= 0.15.3) sinatra (>= 2.2.4) thor (~> 1.0) - padrino-support (0.15.2) + padrino-support (0.15.3) parslet (2.0.0) - pg (1.4.5) - puma (5.6.5) + pg (1.5.4) + psych (4.0.6) + stringio + puma (5.6.7) nio4r (~> 2.0) - racc (1.6.2) - rack (2.2.6.2) + racc (1.7.1) + rack (2.2.8) rack-protection (2.2.4) rack - rack-test (2.0.2) + rack-test (2.1.0) rack (>= 1.3) rainbow (3.1.1) rake (13.0.6) redcarpet (3.6.0) - reform (2.3.3) - disposable (>= 0.4.2, < 0.5.0) - representable (>= 2.4.0, < 3.1.0) + reform (2.6.2) + disposable (>= 0.5.0, < 1.0.0) + representable (>= 3.1.1, < 4) uber (< 0.2.0) - representable (3.0.4) + representable (3.2.0) declarative (< 0.1.0) - declarative-option (< 0.2.0) + trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) request_store (1.5.1) rack (>= 1.4) - roar (1.1.1) - representable (~> 3.0) + roar (1.2.0) + representable (~> 3.1) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) rspec-mocks (~> 3.12.0) - rspec-core (3.12.0) + rspec-core (3.12.2) rspec-support (~> 3.12.0) - rspec-expectations (3.12.2) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.12.3) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-support (3.12.0) + rspec-support (3.12.1) ruby-next-core (0.15.3) ruby2_keywords (0.0.5) - sanitize (6.0.0) + sanitize (6.1.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - semantic_logger (4.12.0) + semantic_logger (4.14.0) concurrent-ruby (~> 1.0) semver2 (3.4.2) - sequel (5.65.0) + sequel (5.72.0) + bigdecimal sinatra (2.2.4) mustermann (~> 2.0) rack (~> 2.2) rack-protection (= 2.2.4) tilt (~> 2.0) - sqlite3 (1.6.0) + sqlite3 (1.6.6) mini_portile2 (~> 2.8.0) + stringio (3.0.8) table_print (1.5.7) - temple (0.10.0) - thor (1.2.1) - tilt (2.0.11) + temple (0.10.2) + thor (1.2.2) + tilt (2.3.0) + trailblazer-option (0.1.2) uber (0.1.0) - webmachine (1.6.0) - as-notifications (~> 1.0) + webmachine (2.0.0) + as-notifications (>= 1.0.2, < 2.0) i18n (>= 0.4.0) multi_json + webrick (1.8.1) wisper (2.0.1) - zeitwerk (2.6.6) + zeitwerk (2.6.11) PLATFORMS ruby @@ -201,8 +204,8 @@ DEPENDENCIES conventional-changelog! mysql2 (~> 0.3) pact_broker - pg (~> 1.4) - puma (~> 5.6) + pg (~> 1.5) + puma (~> 5.6, >= 5.6.7) rack-test (~> 2.0, >= 2.0.2) rake (~> 13.0) rspec (~> 3.7) @@ -211,4 +214,4 @@ DEPENDENCIES sucker_punch! BUNDLED WITH - 2.4.12 + 2.4.19 diff --git a/pact_broker/.ruby-version b/pact_broker/.ruby-version index 0444f32..be94e6f 100644 --- a/pact_broker/.ruby-version +++ b/pact_broker/.ruby-version @@ -1 +1 @@ -3.2.1 \ No newline at end of file +3.2.2 diff --git a/pact_broker/Gemfile.lock b/pact_broker/Gemfile.lock index 3d65a65..32cfc25 100644 --- a/pact_broker/Gemfile.lock +++ b/pact_broker/Gemfile.lock @@ -9,10 +9,11 @@ GIT GEM remote: https://rubygems.org/ specs: - anyway_config (2.5.1) + anyway_config (2.5.3) ruby-next-core (>= 0.14.0) as-notifications (1.0.2) awesome_print (1.9.2) + bigdecimal (3.1.4) concurrent-ruby (1.2.2) crass (1.0.6) declarative (0.0.20) @@ -32,7 +33,7 @@ GEM concurrent-ruby (~> 1.0) dry-core (~> 1.0, < 2) zeitwerk (~> 2.6) - dry-schema (1.13.2) + dry-schema (1.13.3) concurrent-ruby (~> 1.0) dry-configurable (~> 1.0, >= 1.0.1) dry-core (~> 1.0, < 2) @@ -67,9 +68,11 @@ GEM ruby2_keywords (~> 0.0.1) mysql2 (0.5.5) nio4r (2.5.9) - nokogiri (1.15.3) + nokogiri (1.15.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) + nokogiri (1.15.4-aarch64-linux) + racc (~> 1.4) pact-support (1.19.0) awesome_print (~> 1.9) diff-lcs (~> 1.4) @@ -132,25 +135,25 @@ GEM representable (~> 3.1) ruby-next-core (0.15.3) ruby2_keywords (0.0.5) - sanitize (6.0.2) + sanitize (6.1.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) semantic_logger (4.14.0) concurrent-ruby (~> 1.0) semver2 (3.4.2) - sequel (5.71.0) + sequel (5.72.0) + bigdecimal sinatra (2.2.4) mustermann (~> 2.0) rack (~> 2.2) rack-protection (= 2.2.4) tilt (~> 2.0) - sqlite3 (1.6.5) - mini_portile2 (~> 2.8.0) - stringio (3.0.7) + sqlite3 (1.6.6-aarch64-linux) + stringio (3.0.8) table_print (1.5.7) temple (0.10.2) thor (1.2.2) - tilt (2.2.0) + tilt (2.3.0) trailblazer-option (0.1.2) uber (0.1.0) webmachine (2.0.0) @@ -162,6 +165,7 @@ GEM zeitwerk (2.6.11) PLATFORMS + aarch64-linux ruby DEPENDENCIES @@ -174,4 +178,4 @@ DEPENDENCIES sucker_punch! BUNDLED WITH - 2.4.12 + 2.4.19 From 93663e925d2976cd8dcff93606e5020e7a27e6c3 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 15 Sep 2023 22:49:07 +0100 Subject: [PATCH 19/19] chore: add x86_64-linux platform ensure we get native gems --- pact_broker/Gemfile.lock | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pact_broker/Gemfile.lock b/pact_broker/Gemfile.lock index 32cfc25..f15d9ec 100644 --- a/pact_broker/Gemfile.lock +++ b/pact_broker/Gemfile.lock @@ -61,18 +61,18 @@ GEM i18n (1.14.1) concurrent-ruby (~> 1.0) json (2.6.3) - mini_portile2 (2.8.4) moments (0.2.0) multi_json (1.15.0) mustermann (2.0.2) ruby2_keywords (~> 0.0.1) mysql2 (0.5.5) nio4r (2.5.9) - nokogiri (1.15.4) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) nokogiri (1.15.4-aarch64-linux) racc (~> 1.4) + nokogiri (1.15.4-arm64-darwin) + racc (~> 1.4) + nokogiri (1.15.4-x86_64-linux) + racc (~> 1.4) pact-support (1.19.0) awesome_print (~> 1.9) diff-lcs (~> 1.4) @@ -149,6 +149,8 @@ GEM rack-protection (= 2.2.4) tilt (~> 2.0) sqlite3 (1.6.6-aarch64-linux) + sqlite3 (1.6.6-arm64-darwin) + sqlite3 (1.6.6-x86_64-linux) stringio (3.0.8) table_print (1.5.7) temple (0.10.2) @@ -166,7 +168,8 @@ GEM PLATFORMS aarch64-linux - ruby + arm64-darwin-23 + x86_64-linux DEPENDENCIES mysql2 (~> 0.3)