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 session policy to SDK #2088

Merged
merged 23 commits into from
Oct 3, 2023
Merged

Conversation

sfc-gh-asawicki
Copy link
Collaborator

@sfc-gh-asawicki sfc-gh-asawicki commented Oct 2, 2023

Changes

  • Add session policy to SDK:
    • Add implementation based on references
    • Remove existing partial implementation
  • Misc:
    • Add missing issue number to TODO comments.
    • Fix network policy validation (at least one of -> exactly one of).
    • Comment out printing generations to stdout (because sometimes there are problems with it - and we don't really need it, maybe we can remove it).

As a part of this implementation, the generator was used (check the session_policies_def.go file first). After generation, the following changes were applied:

  • Filled out unit tests.
  • Added unit tests missing from the generated code (validations for precisely one, cases for alter statement).
  • Removed generated unnecessary unit tests (usually full and basic were the same in this simple resource).
  • Filled out acceptance tests.
  • Added mappings (convert functions).
  • Added ID() method to session policy.
  • Added ShowID() interface method and implementation (not yet generated).

Test Plan

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

References

pkg/sdk/session_policies_def.go Outdated Show resolved Hide resolved
pkg/sdk/session_policies_def.go Outdated Show resolved Hide resolved
pkg/sdk/session_policies_dto_gen.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Integration tests success for bc1526a8a4cfbbd8c78e5299c53fb938be47bc17

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Integration tests failure for 0f7ea0ba04c064f4b403f403dc45c7d9a58894bf

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Integration tests success for 0f7ea0ba04c064f4b403f403dc45c7d9a58894bf

@sfc-gh-asawicki sfc-gh-asawicki marked this pull request as ready for review October 2, 2023 13:35
sfc-gh-jcieslak
sfc-gh-jcieslak previously approved these changes Oct 2, 2023
pkg/sdk/session_policies_def.go Outdated Show resolved Hide resolved
pkg/sdk/session_policies_def.go Outdated Show resolved Hide resolved
pkg/sdk/session_policies_def.go Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Integration tests failure for 954e9386b019c837086c2dd271f130083dd4d40a

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Integration tests success for 954e9386b019c837086c2dd271f130083dd4d40a

@sfc-gh-asawicki sfc-gh-asawicki merged commit 038241c into main Oct 3, 2023
8 checks passed
@sfc-gh-asawicki sfc-gh-asawicki deleted the add-session-policy-to-sdk branch October 3, 2023 06:19
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.

None yet

2 participants