Skip to content

Minor fixes to SEA handlers - #428

Closed
alexguo-db wants to merge 1 commit into
mainfrom
alexguo-db/alexguo-sea
Closed

alexguo-db wants to merge 1 commit into
mainfrom
alexguo-db/alexguo-sea

Conversation

@alexguo-db

Copy link
Copy Markdown
Contributor

Description

  • Add consistent logging to DatabricksNewMetadataSdkClient
  • Refactor how StatementType is sent for DatabricksNewMetadataSdkClient
  • Update session path
  • Lint

Testing

Additional Notes to the Reviewer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What's the timeline for replacing this metadata client? Wondering if it's worth reviewing the original client if this will be replaced soon

@alexguo-db alexguo-db Aug 30, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why don't we need the headers for this DELETE request? Every other request seems to call this

private static Map<String, String> getHeaders() {
    return Map.of(
        "Accept", "application/json",
        "Content-Type", "application/json");
  }

@alexguo-db alexguo-db Aug 30, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

0 is typically returned for success so it doesn't seem like a good default value here
I set to 1 but open to a better default value

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why can't this be a boolean?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This method is only called for exceptions, it should return different failure codes based on the type of exception (e.g. 429, 503) so it can't be a boolean. I changed the default because 0 is not typically used as a failure code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This file and DatabricksHttpClient have a lot of duplicate checking for error codes, maybe see if there's a way to share that logic

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is there a reason this was originally StatementType.Query, or is it just a typo?

@alexguo-db

Copy link
Copy Markdown
Contributor Author

Remade here #501 (review)

@samikshya-db
samikshya-db deleted the alexguo-db/alexguo-sea branch February 19, 2025 11:30

This branch was previously deployed

1 inactive deployment
azure-prod — e4617dbd Deployed Aug 30, 2024 by alexguo-db
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.

3 participants