Skip to content

[ISSUE] Account Groups Delete Fails with "IO error: No content to map due to end-of-input" #413

@Gnakhle

Description

@Gnakhle

Description
Group deletes done via the Accounts Api fail with com.databricks.sdk.core.DatabricksException: IO error: No content to map due to end-of-input

Reproduction

Make a Account Group delete call.
accountClient.groups().delete("id")

Expected behavior
The group delete call goes through with no exceptions thrown

Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?
Worked in v0.18.0 and we noticed this stopped working v0.28.0

Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to TRACE (e.g. add log4j.logger.com.databricks=TRACE to the log4j.properties in your project), and include the logs here.

Other Information

  • OS: [e.g. macOS]
  • Version: [e.g. 0.1.0]

Additional context
The delete call calls this in this file.

public void delete(DeleteAccountGroupRequest request) {
    String path =
        String.format(
            "/api/2.0/accounts/%s/scim/v2/Groups/%s",
            apiClient.configuredAccountID(), request.getId());
    try {
      Request req = new Request("DELETE", path);
      ApiClient.setQuery(req, request);
      apiClient.execute(req, DeleteResponse.class);
    } catch (IOException e) {
      throw new DatabricksException("IO error: " + e.getMessage(), e);
    }
  }`

I believe this issue is when it tries to deserialize the response to DeleteResponse.class but the group delete api response does not return a body (not even {}). In a previous version, it use to be Void.class when it worked correctly. The REST API docs claim that this endpoint returns a {} but i've called the endpoint locally and it returns nothing.

Fuller stack trace

    Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]
                at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
                at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1767)
                at com.fasterxml.jackson.databind.ObjectReader._initForReading(ObjectReader.java:360)
                at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:2115)
                at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1501)
                at com.databricks.sdk.core.ApiClient.deserialize(ApiClient.java:457)
                at com.databricks.sdk.core.ApiClient.deserialize(ApiClient.java:386)
                at com.databricks.sdk.core.ApiClient.execute(ApiClient.java:231)
                at com.databricks.sdk.core.ApiClient.DELETE(ApiClient.java:188)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThe issue is a bug.RegressionUsed with the “Bug” label to indicate that the bug did not exist in previous versions.TriagedThe issue has been reviewed. Issues without a “Triaged” label require triage/review.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions