Skip to content

refactor HTTP API server command handler#1236

Merged
lvca merged 1 commit intoArcadeData:mainfrom
gramian:main
Sep 10, 2023
Merged

refactor HTTP API server command handler#1236
lvca merged 1 commit intoArcadeData:mainfrom
gramian:main

Conversation

@gramian
Copy link
Collaborator

@gramian gramian commented Sep 10, 2023

What does this PR do?

These changes improve the way server commands are handled in particular:

  • server commands are now case insensitive
  • Not the commands but their payload is passed to the private function executing the server command
  • Server commands are defined as strings to be DRY
  • Order of commands and their execution methods is consistent now
  • Special case of "list databases" is handled first, slightly reducing complexity

Motivation

What inspired you to submit this pull request?

Related issues

#1235

Checklist

  • I have run the build using mvn clean package command
  • My unit tests cover both failure and success scenarios (remains to be done)

@lvca
Copy link
Contributor

lvca commented Sep 10, 2023

Big cleanup, thanks!!!

@lvca lvca merged commit 753d799 into ArcadeData:main Sep 10, 2023
@lvca lvca added the enhancement New feature or request label Sep 10, 2023
@lvca lvca added this to the 23.9.1 milestone Sep 10, 2023
mergify bot added a commit that referenced this pull request Feb 22, 2026
…js [skip ci]

Bumps [testcontainers](https://github.com/testcontainers/testcontainers-node) from 11.11.0 to 11.12.0.
Release notes

*Sourced from [testcontainers's releases](https://github.com/testcontainers/testcontainers-node/releases).*

> v11.12.0
> --------
>
> Changes
> -------
>
> 🚀 Features
> ----------
>
> * Add SSL support for postgres containers [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1224](https://redirect.github.com/testcontainers/testcontainers-node/issues/1224))
> * Add Azurite support for HTTPS/OAuth configuration [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1228](https://redirect.github.com/testcontainers/testcontainers-node/issues/1228))
> * Support preserving UID/GID when copying archives to containers [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1234](https://redirect.github.com/testcontainers/testcontainers-node/issues/1234))
> * Follow symlinks when copying files into containers [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1235](https://redirect.github.com/testcontainers/testcontainers-node/issues/1235))
> * Warn when compose wait strategy names don't match containers [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1232](https://redirect.github.com/testcontainers/testcontainers-node/issues/1232))
> * Add support for GenericContainer security options [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1226](https://redirect.github.com/testcontainers/testcontainers-node/issues/1226))
>
> 🐛 Bug Fixes
> -----------
>
> * Honor nested .dockerignore exclusions in Docker build context [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1229](https://redirect.github.com/testcontainers/testcontainers-node/issues/1229))
> * Fallback to new Reaper when reused Reaper is unreachable [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1233](https://redirect.github.com/testcontainers/testcontainers-node/issues/1233))
>
> 📖 Documentation
> ---------------
>
> * Add AGENTS.md: [#1225](https://redirect.github.com/testcontainers/testcontainers-node/issues/1225)
> * Update AGENTS.md: [#1236](https://redirect.github.com/testcontainers/testcontainers-node/issues/1236), [#1231](https://redirect.github.com/testcontainers/testcontainers-node/issues/1231), [#1227](https://redirect.github.com/testcontainers/testcontainers-node/issues/1227)
>
> 🧹 Maintenance
> -------------
>
> * Restore compose warning test compile after naming simplification [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1239](https://redirect.github.com/testcontainers/testcontainers-node/issues/1239))
> * Simplify Docker Compose naming to v2-only format [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1238](https://redirect.github.com/testcontainers/testcontainers-node/issues/1238))
> * Docker event stream test helper matches both `status` and `Action` fields [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1230](https://redirect.github.com/testcontainers/testcontainers-node/issues/1230))
>
> 📦 Dependency Updates
> --------------------
>
> * Bump dependencies: [#1222](https://redirect.github.com/testcontainers/testcontainers-node/issues/1222), [#1223](https://redirect.github.com/testcontainers/testcontainers-node/issues/1223), [#1220](https://redirect.github.com/testcontainers/testcontainers-node/issues/1220), [#1221](https://redirect.github.com/testcontainers/testcontainers-node/issues/1221), [#1212](https://redirect.github.com/testcontainers/testcontainers-node/issues/1212), [#1211](https://redirect.github.com/testcontainers/testcontainers-node/issues/1211), [#1208](https://redirect.github.com/testcontainers/testcontainers-node/issues/1208), [#1209](https://redirect.github.com/testcontainers/testcontainers-node/issues/1209)
> * Bump mkdocs-material: [#1205](https://redirect.github.com/testcontainers/testcontainers-node/issues/1205)


Commits

* [`0481c58`](testcontainers/testcontainers-node@0481c58) Add SSL support for postgres containers ([#1224](https://redirect.github.com/testcontainers/testcontainers-node/issues/1224))
* [`746f96e`](testcontainers/testcontainers-node@746f96e) Add Azurite support for HTTPS/OAuth configuration ([#1228](https://redirect.github.com/testcontainers/testcontainers-node/issues/1228))
* [`ecd83c8`](testcontainers/testcontainers-node@ecd83c8) Fix stale composeContainerName reference in compose warning test ([#1239](https://redirect.github.com/testcontainers/testcontainers-node/issues/1239))
* [`f1a9a0b`](testcontainers/testcontainers-node@f1a9a0b) Support preserving UID/GID when copying archives to containers ([#1234](https://redirect.github.com/testcontainers/testcontainers-node/issues/1234))
* [`6274827`](testcontainers/testcontainers-node@6274827) Follow symlinks when copying files into containers ([#1235](https://redirect.github.com/testcontainers/testcontainers-node/issues/1235))
* [`5dc5293`](testcontainers/testcontainers-node@5dc5293) Simplify Compose naming to v2-only conventions ([#1238](https://redirect.github.com/testcontainers/testcontainers-node/issues/1238))
* [`975665b`](testcontainers/testcontainers-node@975665b) Honor nested .dockerignore exclusions in Docker build context ([#1229](https://redirect.github.com/testcontainers/testcontainers-node/issues/1229))
* [`d75a4ac`](testcontainers/testcontainers-node@d75a4ac) Fallback to new Reaper when reused one is unreachable ([#1233](https://redirect.github.com/testcontainers/testcontainers-node/issues/1233))
* [`84d0908`](testcontainers/testcontainers-node@84d0908) Warn when compose wait strategy names don't match containers ([#1232](https://redirect.github.com/testcontainers/testcontainers-node/issues/1232))
* [`c608c47`](testcontainers/testcontainers-node@c608c47) Update AGENTS.md ([#1236](https://redirect.github.com/testcontainers/testcontainers-node/issues/1236))
* Additional commits viewable in [compare view](testcontainers/testcontainers-node@v11.11.0...v11.12.0)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=testcontainers&package-manager=npm\_and\_yarn&previous-version=11.11.0&new-version=11.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
mergify bot added a commit that referenced this pull request Feb 22, 2026
…studio [skip ci]

[//]: # (dependabot-start)
⚠️ \*\*Dependabot is rebasing this PR\*\* ⚠️
Rebasing might not happen immediately, so don't worry if this takes some time.
Note: if you make any changes to this PR yourself, they will take precedence over the rebase.
---
[//]: # (dependabot-end)
Bumps [testcontainers](https://github.com/testcontainers/testcontainers-node) from 11.11.0 to 11.12.0.
Release notes

*Sourced from [testcontainers's releases](https://github.com/testcontainers/testcontainers-node/releases).*

> v11.12.0
> --------
>
> Changes
> -------
>
> 🚀 Features
> ----------
>
> * Add SSL support for postgres containers [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1224](https://redirect.github.com/testcontainers/testcontainers-node/issues/1224))
> * Add Azurite support for HTTPS/OAuth configuration [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1228](https://redirect.github.com/testcontainers/testcontainers-node/issues/1228))
> * Support preserving UID/GID when copying archives to containers [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1234](https://redirect.github.com/testcontainers/testcontainers-node/issues/1234))
> * Follow symlinks when copying files into containers [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1235](https://redirect.github.com/testcontainers/testcontainers-node/issues/1235))
> * Warn when compose wait strategy names don't match containers [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1232](https://redirect.github.com/testcontainers/testcontainers-node/issues/1232))
> * Add support for GenericContainer security options [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1226](https://redirect.github.com/testcontainers/testcontainers-node/issues/1226))
>
> 🐛 Bug Fixes
> -----------
>
> * Honor nested .dockerignore exclusions in Docker build context [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1229](https://redirect.github.com/testcontainers/testcontainers-node/issues/1229))
> * Fallback to new Reaper when reused Reaper is unreachable [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1233](https://redirect.github.com/testcontainers/testcontainers-node/issues/1233))
>
> 📖 Documentation
> ---------------
>
> * Add AGENTS.md: [#1225](https://redirect.github.com/testcontainers/testcontainers-node/issues/1225)
> * Update AGENTS.md: [#1236](https://redirect.github.com/testcontainers/testcontainers-node/issues/1236), [#1231](https://redirect.github.com/testcontainers/testcontainers-node/issues/1231), [#1227](https://redirect.github.com/testcontainers/testcontainers-node/issues/1227)
>
> 🧹 Maintenance
> -------------
>
> * Restore compose warning test compile after naming simplification [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1239](https://redirect.github.com/testcontainers/testcontainers-node/issues/1239))
> * Simplify Docker Compose naming to v2-only format [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1238](https://redirect.github.com/testcontainers/testcontainers-node/issues/1238))
> * Docker event stream test helper matches both `status` and `Action` fields [`@​cristianrgreco`](https://github.com/cristianrgreco) ([#1230](https://redirect.github.com/testcontainers/testcontainers-node/issues/1230))
>
> 📦 Dependency Updates
> --------------------
>
> * Bump dependencies: [#1222](https://redirect.github.com/testcontainers/testcontainers-node/issues/1222), [#1223](https://redirect.github.com/testcontainers/testcontainers-node/issues/1223), [#1220](https://redirect.github.com/testcontainers/testcontainers-node/issues/1220), [#1221](https://redirect.github.com/testcontainers/testcontainers-node/issues/1221), [#1212](https://redirect.github.com/testcontainers/testcontainers-node/issues/1212), [#1211](https://redirect.github.com/testcontainers/testcontainers-node/issues/1211), [#1208](https://redirect.github.com/testcontainers/testcontainers-node/issues/1208), [#1209](https://redirect.github.com/testcontainers/testcontainers-node/issues/1209)
> * Bump mkdocs-material: [#1205](https://redirect.github.com/testcontainers/testcontainers-node/issues/1205)


Commits

* [`0481c58`](testcontainers/testcontainers-node@0481c58) Add SSL support for postgres containers ([#1224](https://redirect.github.com/testcontainers/testcontainers-node/issues/1224))
* [`746f96e`](testcontainers/testcontainers-node@746f96e) Add Azurite support for HTTPS/OAuth configuration ([#1228](https://redirect.github.com/testcontainers/testcontainers-node/issues/1228))
* [`ecd83c8`](testcontainers/testcontainers-node@ecd83c8) Fix stale composeContainerName reference in compose warning test ([#1239](https://redirect.github.com/testcontainers/testcontainers-node/issues/1239))
* [`f1a9a0b`](testcontainers/testcontainers-node@f1a9a0b) Support preserving UID/GID when copying archives to containers ([#1234](https://redirect.github.com/testcontainers/testcontainers-node/issues/1234))
* [`6274827`](testcontainers/testcontainers-node@6274827) Follow symlinks when copying files into containers ([#1235](https://redirect.github.com/testcontainers/testcontainers-node/issues/1235))
* [`5dc5293`](testcontainers/testcontainers-node@5dc5293) Simplify Compose naming to v2-only conventions ([#1238](https://redirect.github.com/testcontainers/testcontainers-node/issues/1238))
* [`975665b`](testcontainers/testcontainers-node@975665b) Honor nested .dockerignore exclusions in Docker build context ([#1229](https://redirect.github.com/testcontainers/testcontainers-node/issues/1229))
* [`d75a4ac`](testcontainers/testcontainers-node@d75a4ac) Fallback to new Reaper when reused one is unreachable ([#1233](https://redirect.github.com/testcontainers/testcontainers-node/issues/1233))
* [`84d0908`](testcontainers/testcontainers-node@84d0908) Warn when compose wait strategy names don't match containers ([#1232](https://redirect.github.com/testcontainers/testcontainers-node/issues/1232))
* [`c608c47`](testcontainers/testcontainers-node@c608c47) Update AGENTS.md ([#1236](https://redirect.github.com/testcontainers/testcontainers-node/issues/1236))
* Additional commits viewable in [compare view](testcontainers/testcontainers-node@v11.11.0...v11.12.0)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=testcontainers&package-manager=npm\_and\_yarn&previous-version=11.11.0&new-version=11.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants