Skip to content

feat: Ignore specific field types#163

Merged
kodiakhq[bot] merged 1 commit intocloudquery:mainfrom
erezrokah:fix/dont_fail_on_unsupported_types
Sep 21, 2022
Merged

feat: Ignore specific field types#163
kodiakhq[bot] merged 1 commit intocloudquery:mainfrom
erezrokah:fix/dont_fail_on_unsupported_types

Conversation

@erezrokah
Copy link
Copy Markdown
Member

@erezrokah erezrokah commented Sep 21, 2022

Summary

#157 changed the behavior of printing a log message on unsupported types (like interface) to failing.
I'm not sure that's what we want as now the consumer has to skip all the interface fields to make code gen work.
I kept the failure on custom type transformer as I believe that should be indeed a failure to generate.

Changed the code to explicitly specific types


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

  • Read the contribution guidelines 🧑‍🎓
  • 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 changed the title fix: Don't fail on interfaces fix(codegen): Don't fail on interfaces Sep 21, 2022
@github-actions github-actions bot added fix and removed fix labels Sep 21, 2022
@yevgenypats
Copy link
Copy Markdown
Contributor

why not fail here? seems like it the last fallback and it still generates an error. maybe you can skip this explicitly? otherwise if we skip errors it will become really hard to about any issues in codegen as it will turn into log parsing race

@erezrokah
Copy link
Copy Markdown
Member Author

why not fail here? seems like it the last fallback and it still generates an error. maybe you can skip this explicitly? otherwise if we skip errors it will become really hard to about any issues in codegen as it will turn into log parsing race

We're discussing this on Slack. It's hard to know in advance which fields to skip without implementing the reflection logic in consumers. Not sure we should be creating columns for fields that are interfaces.

@erezrokah erezrokah force-pushed the fix/dont_fail_on_unsupported_types branch from f453b8b to 2e11d2b Compare September 21, 2022 16:08
@erezrokah erezrokah changed the title fix(codegen): Don't fail on interfaces feat: Ignore specific field types Sep 21, 2022
@github-actions github-actions bot added feat and removed fix labels Sep 21, 2022
@github-actions github-actions bot added feat and removed feat labels Sep 21, 2022
@kodiakhq kodiakhq bot merged commit 792c88a into cloudquery:main Sep 21, 2022
kodiakhq bot pushed a commit that referenced this pull request Sep 21, 2022
🤖 I have created a release *beep* *boop*
---


## [0.7.13](v0.7.12...v0.7.13) (2022-09-21)


### Features

* Ignore specific field types ([#163](#163)) ([792c88a](792c88a))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants