Skip to content

fix: Checksum validation#1637

Merged
kodiakhq[bot] merged 2 commits intocloudquery:mainfrom
erezrokah:fix/checksum_validation
Aug 31, 2022
Merged

fix: Checksum validation#1637
kodiakhq[bot] merged 2 commits intocloudquery:mainfrom
erezrokah:fix/checksum_validation

Conversation

@erezrokah
Copy link
Copy Markdown
Member

@erezrokah erezrokah commented Aug 31, 2022

Summary

With the release of the test plugin our tests have started failing on main. The reason is that we use strings.Contains to match the binary to the checksum in the checksums file, and the zipped entries also match by OS and Arch:

44d95de58751bb726f17a79c42e33faed7dad2210b9faf5ebbcf08a5079e41eb  test_linux_amd64.zip
46f587c64821a807ea12d43d08a20e7258452acc3b7e12887b176a14a12d0dc4  test_linux_amd64 
556cc5ae71b261a86c6951ee6bfb9ba5d01492babc31fb8d5b0e58abd23142c5  test_darwin_arm64
9b0796dac187339ae74c765cbdc81924149df3c7aab695e4b010011494cf079f  test_linux_arm64.zip
a2ac8ddeed89ca68a11f7f68e564244d1fcc04d05300cb7c62f8277de9e7ce18  test_darwin_amd64.zip
c2c8f2d10319100f465b7c1c354eb300611e81929c1315c624d30bddc15991ab  test_darwin_arm64.zip
c8f58f99a6c70ab29c0d367b1161686593ee02d762adde9576508cf9980dd936  test_windows_amd64.zip
dde97808619eb4d4198408e0f381dbdb1302d85c65707e4614e509d5da2b43b8  test_linux_arm64
e18f71bb8eb13ee811ec244a395ab1672367a6b308556bd06cbd8d2726e4b128  test_windows_amd64.exe
e6fb9607094d1677796e7ed0cb7276c1d00333828a37997757329ad503a342c2  test_darwin_amd64

For example both test_linux_amd64 and test_linux_amd64.zip match the condition strings.Contains(split[1], runtime.GOOS) && strings.Contains(split[1], runtime.GOARCH)

Latest version of AWS also have this issue

09548817ae25e62fa856abd321e3c32eedbb5336328fba0324bd9b4fc2ab7b61  aws_darwin_amd64.zip
2cad5badb22851483f2936ef114d3cc67767abd28b33ffabf76345f61570495e  aws_windows_amd64.zip
2e35d3918fee1b7d2f2e3ef4b7ac521ddcf7a593a5446d9dc37910c681cc8d9f  aws_darwin_arm64.zip
2feeffbef67ff748f0b686ce60b6ef00d367203015248dd3164fa3e13d435676  aws_windows_amd64.exe
31344a9a7f3af69773984265ae56e368286c643a5ba0ac192d4fcc9c3c2baa36  aws_darwin_arm64
3b540f15803944356037f273d6622140eae32fc1b2f1e904141f5568626a271c  aws_linux_amd64
3f1b9a637813afee083a1ea1db86b6792376dc0ec41a745588d56f72a39cda21  aws_linux_arm64
8975f8c884cfa631c6024ba83ff8b7dc1b3941708ce25d97505987051df8919d  aws_darwin_amd64
8d2b729dc8003e1f88c22370d52532ac981ead7473916b6096bb2ca97f05d90c  aws_linux_arm64.zip
9b012319c6a1a6277fbc2febf79a6791f1c851e8a5b57a5486c52881609e32ca  aws_linux_amd64.zip

Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Test locally on your own infrastructure
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@erezrokah erezrokah requested a review from yevgenypats as a code owner August 31, 2022 09:07
@erezrokah erezrokah force-pushed the fix/checksum_validation branch from 97f744b to 1c99790 Compare August 31, 2022 09:13
@erezrokah erezrokah added the automerge Automatically merge once required checks pass label Aug 31, 2022
Copy link
Copy Markdown
Contributor

@yevgenypats yevgenypats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, maybe we can skip this completely until v2 is out.

@kodiakhq kodiakhq bot merged commit a899cce into cloudquery:main Aug 31, 2022
kodiakhq bot pushed a commit that referenced this pull request Aug 31, 2022
🤖 I have created a release *beep* *boop*
---


## [0.32.10](cli/v0.32.9...cli/v0.32.10) (2022-08-31)


### Bug Fixes

* Checksum validation ([#1637](#1637)) ([a899cce](a899cce))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@erezrokah erezrokah deleted the fix/checksum_validation branch August 31, 2022 09:54
kodiakhq bot pushed a commit that referenced this pull request Sep 21, 2022
🤖 I have created a release *beep* *boop*
---


## [0.33.0-pre.0](cli-v0.32.12-pre.0...cli/v0.33.0-pre.0) (2022-09-21)


### ⚠ BREAKING CHANGES

* CloudQuery V2. (#1463)

### Features

* CloudQuery V2. ([#1463](#1463)) ([d1799f3](d1799f3))
* Create directory structure when generating configuration ([#1845](#1845)) ([4f9c8de](4f9c8de))
* **gcp:** Remove Classify and IgnoreError ([#1757](#1757)) ([3d34ca5](3d34ca5))
* Generate `postgresql` as default destination in `gen` command ([#1863](#1863)) ([aad6218](aad6218))
* Generate auto-filled config ([#1764](#1764)) ([2255404](2255404))
* **sync:** Default input directory to '.' ([#1869](#1869)) ([005c915](005c915))
* Use jsonb for json columns ([#1870](#1870)) ([78e37fc](78e37fc))
* Use spinner instead of progress bar ([#1829](#1829)) ([af9129e](af9129e))


### Bug Fixes

* Checksum validation ([#1637](#1637)) ([a899cce](a899cce))
* CLI dev version ([#1864](#1864)) ([9c18606](9c18606))
* **cli-docs:** Fix typos in docs/index ([#1256](#1256)) ([424da6d](424da6d))
* **cli:** Don't pre-pend cq-provider to monorepo binary name ([#1264](#1264)) ([2b1e082](2b1e082))
* **cli:** Fix cli version checking to work with monorepo ([#1510](#1510)) ([e0ddfcf](e0ddfcf))
* **cli:** Keep old entrypoint name ([#1297](#1297)) ([bab4f39](bab4f39))
* **cli:** Update binary name ([#1304](#1304)) ([432c404](432c404))
* **deps:** Update github.com/hairyhenderson/go-fsimpl digest to dc4ac0a ([#1650](#1650)) ([9222b5a](9222b5a))
* **deps:** Update github.com/ProtonMail/go-crypto digest to 4b6e5c5 ([#1649](#1649)) ([c71d859](c71d859))
* **deps:** Update module github.com/cloudquery/cq-provider-sdk to v0.14.7 ([#1272](#1272)) ([8546173](8546173))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.1.2 ([#1750](#1750)) ([fbe1b78](fbe1b78))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.4 ([#1761](#1761)) ([7a83a65](7a83a65))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.5 ([#1769](#1769)) ([c9c8c05](c9c8c05))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.6 ([#1770](#1770)) ([5bc205e](5bc205e))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.7 ([#1783](#1783)) ([c291499](c291499))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.8 ([#1784](#1784)) ([b64e2d1](b64e2d1))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.9 ([#1785](#1785)) ([c6e8cb0](c6e8cb0))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.4.0 ([#1786](#1786)) ([cba274b](cba274b))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.4.1 ([#1787](#1787)) ([bad385c](bad385c))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.4.2 ([#1789](#1789)) ([79a46a2](79a46a2))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.5.0 ([#1792](#1792)) ([0b4834e](0b4834e))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.5.2 ([#1793](#1793)) ([36fd6a1](36fd6a1))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.0 ([#1817](#1817)) ([bd68a9c](bd68a9c))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.1 ([#1820](#1820)) ([2613e23](2613e23))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.2 ([#1838](#1838)) ([5b16c59](5b16c59))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.3 ([#1858](#1858)) ([9e3ace7](9e3ace7))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.4 ([#1862](#1862)) ([5d141cf](5d141cf))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.1 ([#1865](#1865)) ([474bb70](474bb70))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.2 ([#1872](#1872)) ([49ed26d](49ed26d))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.3 ([#1886](#1886)) ([7435d59](7435d59))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.4 ([#1889](#1889)) ([63a5362](63a5362))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.9 ([#1891](#1891)) ([3469f20](3469f20))
* **deps:** Update module github.com/hashicorp/go-plugin to v1.4.5 ([#1665](#1665)) ([6107aef](6107aef))
* **deps:** Update module github.com/mattn/go-isatty to v0.0.16 ([#1666](#1666)) ([44f0998](44f0998))
* Quote kind string in generated yml files ([#1824](#1824)) ([6c184ce](6c184ce))
* **release:** Embed correct modules version ([#1849](#1849)) ([2095a3b](2095a3b))
* Remove deprecated firebase ([#1568](#1568)) ([a879709](a879709))
* Resolve plugin version from GitHub registry instead of gRPC call ([#1856](#1856)) ([14d2ca6](14d2ca6))
* Use correct binary path on Windows ([#1894](#1894)) ([1ee41e7](1ee41e7))
* Use postgres defaults in destination config ([#1846](#1846)) ([24bbbc1](24bbbc1))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
yevgenypats added a commit that referenced this pull request Sep 26, 2022
🤖 I have created a release *beep* *boop*
---


##
[1.1.0-pre.1](cli-v1.1.0-pre.0...cli-v1.1.0-pre.1)
(2022-09-26)


### ⚠ BREAKING CHANGES

* **cli:** Remove gen command (#2022)
* CloudQuery V1. (#1463)

### Features

* **cli:** Disable sentry in development
([#1939](#1939))
([e2c417e](e2c417e))
* **cli:** Remove gen command
([#2022](#2022))
([83a32dd](83a32dd))
* CloudQuery V2.
([#1463](#1463))
([d1799f3](d1799f3))
* Create directory structure when generating configuration
([#1845](#1845))
([4f9c8de](4f9c8de))
* **gcp:** Remove Classify and IgnoreError
([#1757](#1757))
([3d34ca5](3d34ca5))
* Generate `postgresql` as default destination in `gen` command
([#1863](#1863))
([aad6218](aad6218))
* Generate auto-filled config
([#1764](#1764))
([2255404](2255404))
* Move to standalone postgresql plugin
([#2074](#2074))
([a0de6d3](a0de6d3))
* **sync:** Default input directory to '.'
([#1869](#1869))
([005c915](005c915))
* Use jsonb for json columns
([#1870](#1870))
([78e37fc](78e37fc))
* Use new tag format to download plugins
([#1985](#1985))
([583f54e](583f54e))
* Use spinner instead of progress bar
([#1829](#1829))
([af9129e](af9129e))


### Bug Fixes

* Can't gen with specific version
([#1915](#1915))
([b7ae169](b7ae169))
* Checksum validation
([#1637](#1637))
([a899cce](a899cce))
* CLI dev version
([#1864](#1864))
([9c18606](9c18606))
* **cli:** Fix cli version checking to work with monorepo
([#1510](#1510))
([e0ddfcf](e0ddfcf))
* **cli:** Remove debug output printed to stdout
([#1929](#1929))
([eec9627](eec9627))
* **deps:** Update github.com/hairyhenderson/go-fsimpl digest to dc4ac0a
([#1650](#1650))
([9222b5a](9222b5a))
* **deps:** Update github.com/ProtonMail/go-crypto digest to 4b6e5c5
([#1649](#1649))
([c71d859](c71d859))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.1.2
([#1750](#1750))
([fbe1b78](fbe1b78))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.4
([#1761](#1761))
([7a83a65](7a83a65))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.5
([#1769](#1769))
([c9c8c05](c9c8c05))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.6
([#1770](#1770))
([5bc205e](5bc205e))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.7
([#1783](#1783))
([c291499](c291499))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.8
([#1784](#1784))
([b64e2d1](b64e2d1))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.2.9
([#1785](#1785))
([c6e8cb0](c6e8cb0))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.4.0
([#1786](#1786))
([cba274b](cba274b))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.4.1
([#1787](#1787))
([bad385c](bad385c))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.4.2
([#1789](#1789))
([79a46a2](79a46a2))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.5.0
([#1792](#1792))
([0b4834e](0b4834e))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.5.2
([#1793](#1793))
([36fd6a1](36fd6a1))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.0
([#1817](#1817))
([bd68a9c](bd68a9c))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.1
([#1820](#1820))
([2613e23](2613e23))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.2
([#1838](#1838))
([5b16c59](5b16c59))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.3
([#1858](#1858))
([9e3ace7](9e3ace7))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.6.4
([#1862](#1862))
([5d141cf](5d141cf))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.1
([#1865](#1865))
([474bb70](474bb70))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.12
([#1916](#1916))
([27d8153](27d8153))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.2
([#1872](#1872))
([49ed26d](49ed26d))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.3
([#1886](#1886))
([7435d59](7435d59))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.4
([#1889](#1889))
([63a5362](63a5362))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.9
([#1891](#1891))
([3469f20](3469f20))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.8.0
([#1997](#1997))
([4fa40da](4fa40da))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.8.1
([#2024](#2024))
([8f88de4](8f88de4))
* **deps:** Update module github.com/cloudquery/plugin-sdk to v0.8.2
([#2044](#2044))
([9b69b46](9b69b46))
* **deps:** Update module github.com/hashicorp/go-plugin to v1.4.5
([#1665](#1665))
([6107aef](6107aef))
* **deps:** Update module github.com/mattn/go-isatty to v0.0.16
([#1666](#1666))
([44f0998](44f0998))
* Don't print skip download message to console
([#2008](#2008))
([a947d44](a947d44))
* **pg:** Fix PKs recreation when nothing changed
([#1938](#1938))
([5db7baa](5db7baa))
* Quote kind string in generated yml files
([#1824](#1824))
([6c184ce](6c184ce))
* **release:** Embed correct modules version
([#1849](#1849))
([2095a3b](2095a3b))
* Remove deprecated firebase
([#1568](#1568))
([a879709](a879709))
* Resolve plugin version from GitHub registry instead of gRPC call
([#1856](#1856))
([14d2ca6](14d2ca6))
* Use correct binary path on Windows
([#1894](#1894))
([1ee41e7](1ee41e7))
* Use postgres defaults in destination config
([#1846](#1846))
([24bbbc1](24bbbc1))
* Use uppercase downloading during progress
([#2006](#2006))
([e6a7a44](e6a7a44))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Yevgeny Pats <16490766+yevgenypats@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants