feat(sdk+cli): Go SDK, Unix socket IPC, scheduler support, client fixes#193
Merged
feat(sdk+cli): Go SDK, Unix socket IPC, scheduler support, client fixes#193
Conversation
Contributor
…n non-TTY contexts - serve: add --socket-path argument to 'orb system serve' enabling programmatic callers to communicate via Unix domain socket - serve: wire --scheduler global flag through to REST server DI container - serve: log startup message before blocking, return 'Server stopped' after - cli: fix ANSI escape codes leaking into non-TTY output — rich_argparse now uses Console(color_system=None) when stderr is not a TTY - cli: remove StringIO stderr-capture hack that was re-emitting ANSI strings - cli: wire --no-color flag via sys.argv check at import time
…er tests - test_client_template_format.py: 12 onmoto tests verifying the client template format works correctly — launchTemplateId without imageId, no providerApi defaulting to EC2Fleet, field mapping, EC2Fleet spot provisioning with external launch template - test_scheduler_header.py: 10 integration tests documenting the per-request X-ORB-Scheduler header feature — dependency-level tests verifying get_request_formatter and get_request_scheduler behaviour, plus a static analysis test that will fail when routes are wired
- Add rich to pyright ignorePackages (fixes reportMissingImports in CI) - Extract sdk-go-export-spec make target (workflow calls make, not inline bash) - Fix mixed import style in test_scheduler_header.py (GH code quality bot) - Replace sleep 5 race condition with health polling loop in semantic-release.yml
- Add error handling to sdk/go tag push step with recovery instructions - Add gomod dependabot entry for sdk/go to track Go dependency updates
- Move go.mod from sdk/go/ to project root
- Set module name to github.com/awslabs/open-resource-broker
- Update all internal Go imports across sdk/go/
- Remove sdk/go tag step — v{VERSION} tag from python-semantic-release serves both
- Move sdk-go-update-version logic to make target
- Update dependabot gomod directory to /
- Update make targets to run from root (go test/build/generate ./sdk/go/...)
Customers can now use:
go get github.com/awslabs/open-resource-broker@v1.6.0
import "github.com/awslabs/open-resource-broker/sdk/go/orb"
After module rename, cross-package imports need sdk/go/ prefix since source still lives under sdk/go/ in the repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR delivers the Go SDK integration into the monorepo alongside a set of client compatibility fixes, installation improvements, and REST API enhancements.
Go SDK (
sdk/go/)The Go SDK is now part of the monorepo for atomic versioning and automatic sync with the Python API.
go.modat project root with modulegithub.com/awslabs/open-resource-broker; customers use the samev1.x.ytag for both Python and Go:WithScheduler()— configures the scheduler type; appends--schedulerto the managed subprocess args so the ORB server formats responses accordinglyWithManagedProcess()via Unix socket — start ORB with--socket-pathfor clean IPC without port conflictsexamples/basic,examples/managed_process,examples/scheduler//go:generatedirective for auto-generating the client fromopenapi.jsonopenapi.json, updatesversion.go, tagsvX.Y.Zon each release (shared with Python)CLI fixes
--socket-path—orb system serve --socket-path /tmp/orb.sockenables Unix domain socket IPC--schedulerwired to REST server — global flag now applied to the server's DI containerrich_argparsenow usesConsole(color_system=None)when stderr is not a TTY; removes ANSI gibberish when ORB is run as a subprocessClient compatibility fixes
providerApidefault — templates without explicitproviderApinow default to EC2Fleet via provider handler defaults (restores old symphony format support)imageIdnot required withlaunchTemplateId— validation fixed in bothbase_handler.pyandconfiguration_manager.pyInstallation improvements
invoke_provider.sh— removed hardcodedUSE_LOCAL_DEV=trueandLOG_SCRIPTS=true; addedORB_VENV_PATHsupport~/.orbwith clear error when/usr/orbis not writable--scripts-dirfororb init— controls where scripts are placeddev-tools/install/install.sh— automated install script with all flags and env var equivalentsdocs/installation.md— complete env var reference, install scenarios, HF integration guideREST API
response_model=parameters, fixing empty schemas inopenapi.jsonX-ORB-Schedulerheader — clients can specify scheduler format per-requestCI/CD
make sdk-go-export-specandmake sdk-go-update-versiongomodentry forsdk/go/dependency trackingsleep 5with health polling loop in semantic-releaseType of Change
How Has This Been Tested?
6500+ Python tests passing. Go SDK 24 tests passing (9 packages). Pyright 0 errors. Ruff clean.
Checklist
Reviewers
@awslabs/orb-maintainers