Repository navigation
Interactive fleet Sample - #502
Open
Luke-Roy-IBM wants to merge 1 commit into
Open
Luke-Roy-IBM wants to merge 1 commit into
Luke-Roy-IBM wants to merge 1 commit into
Conversation
Luke-Roy-IBM
force-pushed
the
interactive-fleet
branch
2 times, most recently
from
October 9, 2026 07:04
b8f70bd to
b26d79e
Compare
Signed-off-by: Luke Roy <luke.roy@ibm.com>
Luke-Roy-IBM
force-pushed
the
interactive-fleet
branch
from
October 9, 2026 12:44
b26d79e to
3f6f1f7
Compare
This branch has not been deployed
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.
interactive-fleets — new sample
Adds
serverless-fleets/interactive-fleets, a general-purpose submit-and-poll patternthat turns any Code Engine Fleet workload into a synchronous HTTP API.
What it does
A Code Engine Function acts as an HTTP gateway to a fleet:
POST /orGET /— accepts arbitrary JSON input (or query parameters), generates a task ID,submits the input as a fleet task, and polls COS for the result for up to
POLL_TIMEOUTseconds.Returns HTTP 200 with the result if it arrives in time, or HTTP 202 with a
retrieve_urlif the poll window expires.
GET /result/{task_id}— retrieves a previously submitted result from COS at any time.The fleet task receives the full input payload as a single JSON string in
$1, processes it,and writes the result to a COS-mounted path. No message queue, no polling infrastructure —
just a function, a fleet, and a COS bucket.
What's included
deployfunction/__main__.pytask-container/entrypoint.sh$1, adds metadata, writes result to COS mounttask-container/DockerfileREADME.mdAuthentication
A single IBM Cloud API key (
CE_API_KEY) is used for both the CE Fleet API and COS accessvia IAM Bearer tokens.
Use cases
This pattern can be adapted for any fleet workload that needs an HTTP interface:
ML inference, document processing, data transformation, external API orchestration, or any
batch job that produces a result file.