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

Go SDK #4134

Merged
merged 13 commits into from
Jan 2, 2024
Merged

Go SDK #4134

merged 13 commits into from
Jan 2, 2024

Conversation

andreaTP
Copy link
Member

@andreaTP andreaTP commented Dec 15, 2023

There is still a gritty detail about disabling a compression middleware when performing POST operations ( ref ).

But we can iterate on it when we solve the issue upstream.

For the reviewers, skip the generated code and look at those:

  • go-sdk/pkg/tests/client_test.go as it shows the usage from a user perspective
  • the project setup (Makefile, scripts, docs etc.)
  • the CI pipelines changes

@andreaTP andreaTP marked this pull request as draft December 15, 2023 16:58
assert.Nil(t, err)
client := registryclientv2.NewApiClient(adapter)

info, err := client.System().Info().Get(context.Background(), nil)
Copy link
Member Author

Choose a reason for hiding this comment

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

this is the actual usage of the generated SDK by the user (and for a GET is pretty nice!)

assert.Equal(t, "apicurio-registry", *info.GetName())
}

func TestCreateAnArtifact(t *testing.T) {
Copy link
Member Author

Choose a reason for hiding this comment

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

and this is a POST to create an artifact etc. It looks like way too much work than necessary ...

@andreaTP andreaTP marked this pull request as ready for review December 15, 2023 18:51
@andreaTP andreaTP changed the title [WIP] Go sdk Go SDK Dec 15, 2023
with:
go-version: '1.20'

- name: Build Registry
Copy link
Member

Choose a reason for hiding this comment

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

We must start considering having a previous step in building the project instead of building it in every single job (not saying it must be done in this PR, just making it clear).

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

agree, that will be a nice optimization.

carlesarnal
carlesarnal previously approved these changes Dec 18, 2023
Copy link
Member

@carlesarnal carlesarnal left a comment

Choose a reason for hiding this comment

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

LGTM

@carlesarnal
Copy link
Member

This makes me wonder, if we're generating now the Python SDK on this repo and also the Go SDK, shall we remove the notify-sdk-x jobs from the CI jobs?

@andreaTP
Copy link
Member Author

if we're generating now the Python SDK on this repo and also the Go SDK, shall we remove the notify-sdk-x jobs from the CI jobs?

Yes, let me do it.

@andreaTP
Copy link
Member Author

ready to merge?

@andreaTP andreaTP merged commit ca24837 into Apicurio:main Jan 2, 2024
18 checks passed
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