Skip to content

Issue 6748: Rest API shell#6788

Open
rtjd6554 wants to merge 87 commits intodevelopfrom
6749-rest-api-shell
Open

Issue 6748: Rest API shell#6788
rtjd6554 wants to merge 87 commits intodevelopfrom
6749-rest-api-shell

Conversation

@rtjd6554
Copy link
Copy Markdown
Collaborator

@rtjd6554 rtjd6554 commented Mar 10, 2026

Make sure you have checked all steps below.

Issue

  • My PR fully resolves the following issues. I've referenced an issue in the PR title, for example "Issue 1234 - My
    Feature". Note that before an issue is finished, you can still make a pull request by raising a separate issue
    for your progress.

Tests

  • My PR adds the following tests based on our test strategy OR does not need testing for this extremely good reason:
    • Existing build process

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it, or I have linked to a
    separate issue for that below.
  • If I have added new Java code, I have added Javadoc that explains it following our conventions and style.
  • If I have added or removed any dependencies from the project, I have updated the NOTICES file.

Copy link
Copy Markdown
Collaborator

@patchwork01 patchwork01 left a comment

Choose a reason for hiding this comment

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

I think the idea of a basic endpoint to get the version number makes sense, but you need to decide what you want to implement to start with. You could start with the CDK code or the lambda code.

If you start with the CDK you'll need to focus on the CDK code to deploy API Gateway and hook it up to a lambda, and look up how to do that. You could add it to the cdk module as a new optional stack. The most similar existing code would be WebSocketQueryStack, which does use API Gateway but for a web socket.

If you start with the lambda you'll need to work out how to use the AWS libraries to write a handler that consumes the invocations from API Gateway. You'll need to work out whether it should be a single lambda per endpoint or a lambda that can serve multiple endpoints. The closest code that we've got already would be WebSocketQueryProcessorLambda, but that uses the events for web socket invocations, which is not what you want.

The configuration for how the lambda is invoked by API Gateway will be done in the CDK. I'd consider starting with that.

@rtjd6554 rtjd6554 added the needs-reviewer Pull requests that need a reviewer to be assigned label Mar 30, 2026
@rtjd6554
Copy link
Copy Markdown
Collaborator Author

Stack deployed and queried via curl

curl -X POST https://{unique_id}.execute-api.eu-west-2.amazonaws.com/sleeper

Copy link
Copy Markdown
Collaborator

@ca61688 ca61688 left a comment

Choose a reason for hiding this comment

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

1 small comment otherwise looks good to me. It would be great to get a knowledge share on this showing it off

new IngestBatcherStack(scope, "IngestBatcher", props, coreStacks, ingestStacks);
}

// Stack to allow provide a Rest API
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.

I'm not sure what this comment means

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Adjust comment for better context

Copy link
Copy Markdown
Collaborator

@patchwork01 patchwork01 left a comment

Choose a reason for hiding this comment

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

This is looking good now, thanks. The following old comments are unresolved:

#6788 (comment)
#6788 (comment)
#6788 (comment)

@patchwork01 patchwork01 removed the needs-reviewer Pull requests that need a reviewer to be assigned label Mar 31, 2026
@rtjd6554 rtjd6554 added the needs-reviewer Pull requests that need a reviewer to be assigned label Mar 31, 2026
@patchwork01 patchwork01 assigned patchwork01 and unassigned rtjd6554 Mar 31, 2026
Copy link
Copy Markdown
Collaborator

@patchwork01 patchwork01 left a comment

Choose a reason for hiding this comment

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

The following old comments are unresolved:

#6788 (comment)
#6788 (comment)

@patchwork01 patchwork01 assigned rtjd6554 and unassigned patchwork01 Mar 31, 2026
@patchwork01 patchwork01 removed the needs-reviewer Pull requests that need a reviewer to be assigned label Mar 31, 2026
@rtjd6554 rtjd6554 removed their assignment Mar 31, 2026
Comment on lines +91 to +93
public static final PropertyGroup REST_API = instanceGroup("REST API")
.description("The following instance properties relate to the REST API.")
.build();
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.

Apologies for not catching this earlier, but I'm not sure there's a reason to make a separate property group just for this? I don't think we anticipate adding a lot of properties for this. We could put it in the common group, at least for now?

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
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.

It doesn't look like this new fat jar is included in the distribution module. Doesn't that mean the jar won't be copied out to the scripts/jars directory, so it won't be available to be deployed? What did you do when you tested it?

It looks like this needs updating in java/distribution/src/main/assembly/zip.xml?

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.

REST API lambda shell

3 participants