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

fix(Catalog Management): Re-gen SDK #205

Merged
merged 1 commit into from
Sep 21, 2022
Merged

fix(Catalog Management): Re-gen SDK #205

merged 1 commit into from
Sep 21, 2022

Conversation

dubee
Copy link
Member

@dubee dubee commented Sep 14, 2022

PR summary

Re-gen of the Catalog Management SDK to get the latest API updates.

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Current vs new behavior

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@dubee dubee requested a review from padamstx September 14, 2022 18:27
@CLAassistant
Copy link

CLAassistant commented Sep 14, 2022

CLA assistant check
All committers have signed the CLA.

@dubee
Copy link
Member Author

dubee commented Sep 14, 2022

Test results:
Screen Shot 2022-09-14 at 2 30 02 PM

@padamstx padamstx self-assigned this Sep 14, 2022
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

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

Did you really intend to delete the integration tests and examples?

@dubee
Copy link
Member Author

dubee commented Sep 15, 2022

Did you really intend to delete the integration tests and examples?

I didn't intend to delete the examples. The other integration tests files are old though, so I thought we could delete those.

@padamstx
Copy link
Member

padamstx commented Sep 15, 2022

I didn't intend to delete the examples. The other integration tests files are old though, so I thought we could delete those.

I'm ok with you deleting the old int test files as long as the new file contains a set of integration tests that exercise each operation of the service. Re: the working examples, those need to be put back in place as well.

I skimmed through the new integration test file and there are a LOT of test values being used for properties that are not "real", such as "testString", etc. These mock values are being used by the generator because the API definition lacks sufficient "example" values for request bodies, responses, schemas, and parameters.
It's a best practice to populate the API definition with realistic examples along with any links that are needed to define the inter-operation relationships (e.g. an "id" property from the "create catalog" response might be needed to invoke the "get catalog" operation).
With these additions to the API definition, the generated examples and int tests will be closer to "ideal", plus those same example values will be used across the different languages, which is example what we want when we use the working example code fragments in the online API Reference docs.

@dubee dubee force-pushed the main branch 5 times, most recently from 912408f to f66835a Compare September 15, 2022 18:33
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

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

Changes look good.

Please post a screenshot of a clean run of the int tests and examples.
i.e. cd catalogmanagementv1 then go test -tags=integration,examples.
Once we have that I can merge.

Edit: Also, the branch needs to be updated with the latest from "main" before it can be merged in.

@dubee dubee force-pushed the main branch 2 times, most recently from a461b3d to 6018093 Compare September 20, 2022 21:26
@dubee
Copy link
Member Author

dubee commented Sep 20, 2022

@padamstx, I forced pushed updates. Several links were added to the Swagger.

Screen Shot 2022-09-20 at 5 24 27 PM

@padamstx
Copy link
Member

@dubee FYI, the pull request build failed due to some compile errors in the examples code. Did you run those locally? (e.g. cd catalogmanagementv1, go test -tags=examples)
My guess is that the compile errors are due to changes in the generated service code that resulted from your re-gen.

@dubee dubee force-pushed the main branch 2 times, most recently from 54e08eb to 2bedcee Compare September 21, 2022 16:19
@dubee
Copy link
Member Author

dubee commented Sep 21, 2022

@padamstx, I've updated the examples to compile and run.

Here's the output from go test -tags=integration,examples:
Screen Shot 2022-09-21 at 12 43 39 PM

@padamstx padamstx merged commit b955e79 into IBM:main Sep 21, 2022
ibm-devx-sdk pushed a commit that referenced this pull request Sep 21, 2022
## [0.28.4](v0.28.3...v0.28.4) (2022-09-21)

### Bug Fixes

* **Catalog Management:** re-gen service and tests with latest API ([#205](#205)) ([b955e79](b955e79))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.28.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants