Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add tables to the SDK #2042

Merged
merged 52 commits into from
Dec 8, 2023
Merged

feat: Add tables to the SDK #2042

merged 52 commits into from
Dec 8, 2023

Conversation

sfc-gh-pbosak
Copy link
Contributor

@sfc-gh-pbosak sfc-gh-pbosak commented Sep 1, 2023

This change was waiting really long to be finally merged. There were plenty of changes in the repository during this time. There were also some changes in the documentation. This is the first PR that aims to merge this functionality and correct/update it later in the following PR(s).

Changes

  • Added the table to the SDK:
    • Merged main to this stale PR.
    • Added implementation based on references.
    • Both tables and external tables used the same objects (now extracted to common_table_types.go).
    • Implementation of the table from 2-3 months before could not use stages which we have now; now they can be used.

Follow-up plan

  • add missing describe operations
  • use predefined errors instead of defining a bunch of the new ones
  • use assertion helpers in unit tests
  • use a common database and schema in integration tests
  • validate if all needed integration tests are present
  • fix cleanup methods in integration tests
  • add better assertions in integration tests (assert the whole objects/columns)
  • replace the createTable function in helper with implementation using the newly created table client
  • validate if ShowByID can be rewritten to use in database/in schema syntax
  • validations: check if all added ones have unit tests
  • validations: check if all validations are present
  • add missing documentation links to common types
  • move implementation between files to conform with our current conventions
  • validate if all methods were implemented and whether they were implemented correctly

Operations NOT supported in this PR

Test Plan

  • unit tests (SQL generation and validations)
  • integration tests (SQL invocation)
  • acceptance tests (nothing should break yet)

References

@sfc-gh-pbosak sfc-gh-pbosak changed the title Tables sdk v2 feat: Tables sdk v2 Sep 1, 2023
pkg/sdk/tables_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/table_impl.go Outdated Show resolved Hide resolved
pkg/sdk/table_impl.go Outdated Show resolved Hide resolved
pkg/sdk/table_impl.go Outdated Show resolved Hide resolved
pkg/sdk/table_impl.go Outdated Show resolved Hide resolved
pkg/sdk/table_impl.go Outdated Show resolved Hide resolved
pkg/sdk/tables_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/tables_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/tables_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/helper_test.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

Integration tests failure for e2523df6aeeb930c3e013a14253196ab80018501

pkg/sdk/tables_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/tables_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/tables_test.go Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

Integration tests failure for bba3a83985f35e3556a4d4deb10a00f2ace4285a

@github-actions
Copy link

github-actions bot commented Sep 1, 2023

Integration tests failure for e4642af69f35964593715d1235c5d14cc06b3ca2

@sfc-gh-pbosak sfc-gh-pbosak marked this pull request as ready for review September 1, 2023 06:33
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

Integration tests failure for 0a659ffa278af752b6c176f5791f8942e8911a0d

Copy link

Integration tests failure for 06ae64cae35bbe07de16d1748d6a030071accd58

@sfc-gh-asawicki sfc-gh-asawicki changed the title feat: Tables sdk v2 feat: Add tables to the SDK Nov 20, 2023
Copy link

Integration tests failure for cb1ea66f4694b11d2abb1ae83c2d2c8eaec3cd66

Copy link

github-actions bot commented Dec 1, 2023

Integration tests failure for 56ed0c8ad06dc546b7542b3f400b73267b2dca02

pkg/sdk/tables.go Show resolved Hide resolved
pkg/sdk/common_table_types.go Outdated Show resolved Hide resolved
pkg/sdk/common_table_types.go Show resolved Hide resolved
pkg/sdk/common_table_types.go Show resolved Hide resolved
pkg/sdk/tables.go Outdated Show resolved Hide resolved
pkg/sdk/tables_validations.go Outdated Show resolved Hide resolved
pkg/sdk/testint/tables_integration_test.go Show resolved Hide resolved
pkg/sdk/testint/tables_integration_test.go Show resolved Hide resolved
pkg/sdk/testint/tables_integration_test.go Show resolved Hide resolved
pkg/sdk/testint/tables_integration_test.go Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Dec 6, 2023

Integration tests failure for d0aed52e03168bffcf2b8b5f87ed46b55ce7ec9b

pkg/sdk/common_table_types.go Outdated Show resolved Hide resolved
pkg/sdk/common_table_types.go Outdated Show resolved Hide resolved
pkg/sdk/common_table_types.go Outdated Show resolved Hide resolved
pkg/sdk/tables.go Show resolved Hide resolved
pkg/sdk/tables.go Outdated Show resolved Hide resolved
pkg/sdk/tables.go Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Dec 7, 2023

Integration tests failure for ea2e35ac72fcbeebb7f378a2bdfd8b97e093b4a8

pkg/sdk/tables.go Outdated Show resolved Hide resolved
pkg/sdk/tables.go Show resolved Hide resolved
pkg/sdk/tables_dto.go Show resolved Hide resolved
pkg/sdk/tables_dto.go Outdated Show resolved Hide resolved
pkg/sdk/tables_dto.go Outdated Show resolved Hide resolved
pkg/sdk/tables_validations.go Show resolved Hide resolved
pkg/sdk/testint/helpers_test.go Show resolved Hide resolved
Copy link

github-actions bot commented Dec 7, 2023

Integration tests failure for 6f924bdc0f015d96cc5abf33886b27f01b1769c9

@sfc-gh-asawicki sfc-gh-asawicki merged commit c1700de into main Dec 8, 2023
7 of 9 checks passed
@sfc-gh-asawicki sfc-gh-asawicki deleted the tables-sdk-v2 branch December 8, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants