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: Tasks v1 readiness - SDK part #3086

Merged
merged 13 commits into from
Sep 23, 2024
Merged

Conversation

sfc-gh-jcieslak
Copy link
Collaborator

@sfc-gh-jcieslak sfc-gh-jcieslak commented Sep 18, 2024

Changes

  • Generated assertions for task
  • Added a few missing fields in Create, Alter, and outputs
  • Added CreateOrAlter support
  • Adjusted unit and integration tests
  • Adjusted validation generator a bit (It was panic-ing before for that case; it was never used before)
  • Adjusted resource and datasource to use new SDK

References

Copy link

Integration tests failure for 1224a7d7c203327688f6cc07481276983f8b9945

@sfc-gh-jcieslak sfc-gh-jcieslak marked this pull request as ready for review September 18, 2024 09:50
Copy link

Integration tests failure for 56b338b6a902ea1743349a13e1bda715031fa9ef

Copy link

Integration tests failure for e076055b3e1213e5518abbf3e6a4f14d22f2d153

Copy link

Integration tests failure for 5e808d1a232ee1c2cae7acf735092af6a20f01e1

func (t *TaskAssert) HasTaskRelations(expected sdk.TaskRelations) *TaskAssert {
t.AddAssertion(func(t *testing.T, o *sdk.Task) error {
t.Helper()
if slices.EqualFunc(o.TaskRelations.Predecessors, expected.Predecessors, func(id sdk.SchemaObjectIdentifier, id2 sdk.SchemaObjectIdentifier) bool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about a different order?

Copy link
Collaborator Author

@sfc-gh-jcieslak sfc-gh-jcieslak Sep 20, 2024

Choose a reason for hiding this comment

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

Doesn't really matter, we only care are about expected ids being there.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, but they can be returned in a different order. Please use ElementsMatch.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure how testify package works with our package, so I rewrote checks to be similar to the assert above (it asserts predecessors, but in the Predecessors field).

pkg/sdk/tasks_validations_gen.go Outdated Show resolved Hide resolved
pkg/sdk/tasks_gen_test.go Outdated Show resolved Hide resolved
pkg/sdk/tasks_def.go Show resolved Hide resolved
pkg/sdk/testint/tasks_gen_integration_test.go Show resolved Hide resolved
pkg/sdk/testint/tasks_gen_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/testint/tasks_gen_integration_test.go Show resolved Hide resolved
pkg/sdk/testint/tasks_gen_integration_test.go Show resolved Hide resolved
pkg/sdk/testint/tasks_gen_integration_test.go Show resolved Hide resolved
pkg/sdk/testint/tasks_gen_integration_test.go Show resolved Hide resolved
Copy link

Integration tests failure for 554fc90c3931e8ac77d5121095616a83633d339e

Copy link

Integration tests failure for 87638ea7c7be33c93a211ea5a26e43d5b752bbc9

Copy link

Integration tests failure for fc5586ec5c63d5bae081066e85bf8161387b169b

Copy link

Integration tests failure for a783bec3eea98546233ae6dee44e012cc08b9020

@sfc-gh-jcieslak sfc-gh-jcieslak merged commit 0a77383 into main Sep 23, 2024
8 of 9 checks passed
@sfc-gh-jcieslak sfc-gh-jcieslak deleted the tasks-v1-readiness-sdk-part branch September 23, 2024 14:03
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.

2 participants