Skip to content

Prefix library paths with the target directory to construct absolute paths#656

Merged
mgyucht merged 1 commit intomainfrom
support-java-sdk-generation-from-any-directory
Oct 16, 2023
Merged

Prefix library paths with the target directory to construct absolute paths#656
mgyucht merged 1 commit intomainfrom
support-java-sdk-generation-from-any-directory

Conversation

@mgyucht
Copy link
Copy Markdown
Contributor

@mgyucht mgyucht commented Oct 16, 2023

Changes

The OpenAPI generator tool for Databricks recently added support for template libraries to have reusability across go templates in each SDK repo across different generation scopes (e.g. Batch/Service/Type/etc.). There is a bug that as a result causes generation to fail if CWD is not the root of the repo being generated. This PR fixes this.

Tests

Successfully regenerated the Java SDK with CWD in a different directory.

  • make test passing
  • make fmt applied
  • relevant integration tests applied

@mgyucht mgyucht requested a review from pietern October 16, 2023 15:27
@mgyucht mgyucht enabled auto-merge October 16, 2023 15:28
@mgyucht mgyucht added this pull request to the merge queue Oct 16, 2023
Merged via the queue into main with commit 4314da6 Oct 16, 2023
@mgyucht mgyucht deleted the support-java-sdk-generation-from-any-directory branch October 16, 2023 15:31
mgyucht added a commit that referenced this pull request Oct 23, 2023
* Implemented Iterator support for paginated endpoints or endpoints returning a list ([#543](#543)). The Iterator interface allows users to get the next resource in the iterator and to check whether another resource is available in the iterator. Iterators for paginated endpoints fetch pages lazily, allowing users to only fetch the pages needed for their use case.
* Removed `photon` and `graviton` selectors in `compute.SparkVersionRequ…` ([#622](#622)). Going forward, photon is determined by the `RuntimeEngine` field in `compute.CreateCluster`, and graviton is chosen depending on the `aws_instance_type` field in `compute.CreateCluster`.

API Changes:

 * Added `Attributes`, `Count`, `ExcludedAttributes`, `Filter`, `SortBy`, `SortOrder`, and `StartIndex` fields to [iam.GetAccountUserRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#GetAccountUserRequest) and [iam.GetUserRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#GetUserRequest).
 * Added `Schemas` field to [iam.Group](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#Group), [iam.ListGroupsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ListGroupsResponse), [iam.ListServicePrincipalResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ListServicePrincipalResponse), [iam.ListUsersResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ListUsersResponse), [iam.ServicePrincipal](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ServicePrincipal), and [iam.User](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#User).
 * Added [iam.GetSortOrder](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#GetSortOrder).
 * Added [iam.GroupSchema](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#GroupSchema).
 * Added [iam.ListResponseSchema](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ListResponseSchema).
 * Added [iam.ServicePrincipalSchema](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ServicePrincipalSchema).
 * Added [iam.UserSchema](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#UserSchema).
 * Added `WebhookNotifications` field for [jobs.SubmitTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#SubmitTask).
 * Added [w.Apps](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppsAPI) workspace-level service and related methods.
 * Added [a.AccountNetworkPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#AccountNetworkPolicyAPI) account-level service and related methods.

Internal SDK Changes:
* Update to actions/checkout@v4 ([#650](#650)).
* Skip unshallow step in test workflow ([#649](#649)).
* Add integration tests for `Jobs`: `ListRuns` ([#645](#645)).
* Only log pkg.Load after checking whether the operation is tagged ([#655](#655)).
* Prefix library paths with the target directory to construct absolute paths ([#656](#656)).
* Fixed HasRequiredNonBodyField method ([#660](#660)).
* Added CanSetRequiredFieldsFromJson method for OpenAPI generator ([#661](#661)).
* Add integration tests for `ServicePrincipals`: `Patch` ([#662](#662)).
* Add integration tests for `Users`: `Patch`, `Update` ([#663](#663)).
* Enforce running `az login --service-principal` on nightly runs ([#659](#659)).
* Add integration tests for `Connections`: `Create`, `Delete`, `Get`, `List`, `Update` ([#653](#653)).

OpenAPI SHA: 5903bb39137fd76ac384b2044e425f9c56840e00, Date: 2023-10-23
@mgyucht mgyucht mentioned this pull request Oct 23, 2023
github-merge-queue bot pushed a commit that referenced this pull request Oct 24, 2023
* Implemented Iterator support for paginated endpoints or endpoints
returning a list
([#543](#543)). The
Iterator interface allows users to get the next resource in the iterator
and to check whether another resource is available in the iterator.
Iterators for paginated endpoints fetch pages lazily, allowing users to
only fetch the pages needed for their use case.
* Removed `photon` and `graviton` selectors in
`compute.SparkVersionRequ…`
([#622](#622)).
Going forward, photon is determined by the `RuntimeEngine` field in
`compute.CreateCluster`, and graviton is chosen depending on the
`aws_instance_type` field in `compute.CreateCluster`.

API Changes:

* Added `Attributes`, `Count`, `ExcludedAttributes`, `Filter`, `SortBy`,
`SortOrder`, and `StartIndex` fields to
[iam.GetAccountUserRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#GetAccountUserRequest)
and
[iam.GetUserRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#GetUserRequest).
* Added `Schemas` field to
[iam.Group](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#Group),
[iam.ListGroupsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ListGroupsResponse),
[iam.ListServicePrincipalResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ListServicePrincipalResponse),
[iam.ListUsersResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ListUsersResponse),
[iam.ServicePrincipal](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ServicePrincipal),
and
[iam.User](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#User).
* Added
[iam.GetSortOrder](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#GetSortOrder).
* Added
[iam.GroupSchema](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#GroupSchema).
* Added
[iam.ListResponseSchema](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ListResponseSchema).
* Added
[iam.ServicePrincipalSchema](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#ServicePrincipalSchema).
* Added
[iam.UserSchema](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#UserSchema).
* Added `WebhookNotifications` field for
[jobs.SubmitTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#SubmitTask).
* Added
[w.Apps](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppsAPI)
workspace-level service and related methods.
* Added
[a.AccountNetworkPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#AccountNetworkPolicyAPI)
account-level service and related methods.

Internal SDK Changes:
* Update to actions/checkout@v4
([#650](#650)).
* Skip unshallow step in test workflow
([#649](#649)).
* Add integration tests for `Jobs`: `ListRuns`
([#645](#645)).
* Only log pkg.Load after checking whether the operation is tagged
([#655](#655)).
* Prefix library paths with the target directory to construct absolute
paths
([#656](#656)).
* Fixed HasRequiredNonBodyField method
([#660](#660)).
* Added CanSetRequiredFieldsFromJson method for OpenAPI generator
([#661](#661)).
* Add integration tests for `ServicePrincipals`: `Patch`
([#662](#662)).
* Add integration tests for `Users`: `Patch`, `Update`
([#663](#663)).
* Enforce running `az login --service-principal` on nightly runs
([#659](#659)).
* Add integration tests for `Connections`: `Create`, `Delete`, `Get`,
`List`, `Update`
([#653](#653)).

OpenAPI SHA: 5903bb39137fd76ac384b2044e425f9c56840e00, Date: 2023-10-23
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