Skip to content

fix: Call types.RegisterAllExtensions only once in tables command#13411

Merged
kodiakhq[bot] merged 4 commits intocloudquery:mainfrom
erezrokah:fix/support_tables_v3_multiple_sources
Aug 30, 2023
Merged

fix: Call types.RegisterAllExtensions only once in tables command#13411
kodiakhq[bot] merged 4 commits intocloudquery:mainfrom
erezrokah:fix/support_tables_v3_multiple_sources

Conversation

@erezrokah
Copy link
Copy Markdown
Member

Summary

Noticed while working on #13410. RegisterAllExtensions fails if you call it multiple times. To reproduce run on a spec with multiple sources

@erezrokah erezrokah requested a review from yevgenypats as a code owner August 29, 2023 15:22
@erezrokah erezrokah changed the title fix(cmd-tables): Call types.RegisterAllExtensions only once fix: Call types.RegisterAllExtensions only once Aug 29, 2023
@cq-bot cq-bot added the cli label Aug 29, 2023
@erezrokah erezrokah changed the title fix: Call types.RegisterAllExtensions only once fix: Call types.RegisterAllExtensions only once in tables command Aug 29, 2023
@erezrokah erezrokah requested review from hermanschaaf and removed request for yevgenypats August 29, 2023 15:23
@erezrokah erezrokah added the automerge Automatically merge once required checks pass label Aug 29, 2023
@erezrokah
Copy link
Copy Markdown
Member Author

Looking at the build failures

@erezrokah
Copy link
Copy Markdown
Member Author

Ah, need to use a newer Go version

@erezrokah erezrokah force-pushed the fix/support_tables_v3_multiple_sources branch from 4ee47c5 to c8302fe Compare August 29, 2023 15:29
cmd, cqDir := getTablesCommand(t, tc.config, tc.format)
commandError := cmd.Execute()
require.Error(t, commandError, tc.err)
require.NoError(t, commandError)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These tests were passing since we were still throwing an error. When I wrote these I should have validated the error message too

module github.com/cloudquery/cloudquery/cli

go 1.20
go 1.21.0
Copy link
Copy Markdown
Member Author

@erezrokah erezrokah Aug 29, 2023

Choose a reason for hiding this comment

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

Needed for OnceValue

@erezrokah erezrokah requested a review from candiduslynx August 30, 2023 06:44
@kodiakhq kodiakhq bot merged commit 041cb8d into cloudquery:main Aug 30, 2023
kodiakhq bot pushed a commit that referenced this pull request Aug 30, 2023
🤖 I have created a release *beep* *boop*
---


## [3.15.1](cli-v3.15.0...cli-v3.15.1) (2023-08-30)


### Bug Fixes

* Call `types.RegisterAllExtensions` only once in `tables` command ([#13411](#13411)) ([041cb8d](041cb8d))

---
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/support_tables_v3_multiple_sources branch August 31, 2023 07:58
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.

3 participants