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

Introduce Glue protocol module #169

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Introduce Glue protocol module #169

merged 1 commit into from
Jan 30, 2025

Conversation

Randgalt
Copy link
Member

@Randgalt Randgalt commented Jan 26, 2025

New module that implements a Glue REST API endpoint allowing Glue proxying/emulation.

  • Adds serializers/deserializers for all Glue models
  • Glue REST endpoint that marshals request payloads
  • Injectable request handler
  • Could be the basis of a Glue proxy, though this isn't implemented currently
  • Can be run as a standalone Glue endpoint handler
  • Can be add Glue endpoint to AWS S3 proxy as standard plugin

ReadMe: https://github.com/trinodb/aws-proxy/blob/jordanz/glue/trino-aws-proxy-glue/README.md

@cla-bot cla-bot bot added the cla-signed label Jan 26, 2025
@Randgalt Randgalt requested review from mosiac1 and vagaerg January 26, 2025 12:48
@Randgalt Randgalt mentioned this pull request Jan 26, 2025
2 tasks
@Randgalt Randgalt force-pushed the jordanz/glue branch 6 times, most recently from 28f0b05 to e0bc180 Compare January 26, 2025 13:21
@Randgalt Randgalt force-pushed the jordanz/refactor branch 3 times, most recently from 4cb1617 to 21ef861 Compare January 27, 2025 18:04
Base automatically changed from jordanz/refactor to main January 27, 2025 18:20
New module that implements a Glue REST API endpoint allowing
Glue proxying/emulation.

- Adds serializers/deserializers for all Glue models
- Glue REST endpoint that marshals request payloads
- Injectable request handler
- Could be the basis of a Glue proxy, though this isn't implemented currently
- Can be run as a standalone Glue endpoint handler
- Can be add Glue endpoint to AWS S3 proxy as standard plugin
{
requestLoggingSession.logProperty("request.glue.emulated.key", signingMetadata.credentials().emulated().secretKey());

String target = request.requestHeaders().unmodifiedHeaders().getFirst("x-amz-target")
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not familiar with Glue, but it seems x-amz-target is not documented.
Does Glue do something like graphql, using only 1 path and setting the action/request with this header?

Copy link
Member Author

Choose a reason for hiding this comment

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

I determined this ad-hoc by running tests with the AWS CLI and the Glue Java client. I'll try to find some doc for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

@Randgalt Randgalt Jan 30, 2025

Choose a reason for hiding this comment

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

Then, here is the "api" for Glue. Notice is all POST: https://github.com/aws/aws-sdk-js/blob/master/apis/glue-2017-03-31.normal.json. And the protocol:

"protocols": [
      "json"
    ],

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting. I guess if it works it works

Copy link
Member Author

Choose a reason for hiding this comment

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

¯\(ツ)

@Randgalt Randgalt merged commit 3814f31 into main Jan 30, 2025
2 checks passed
@Randgalt Randgalt deleted the jordanz/glue branch January 30, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants