Add Temporal-backed release automation - #2995
Conversation
fa2ee95 to
551ff6c
Compare
83b51f2 to
23eb331
Compare
Orchestrate immutable sdk-java release candidates with transient GitHub Actions Workers, a no-input approval Update, privileged publication queues, and exact-state external reconciliation.
Make release progress explicitly staged and controllable, bind approval to a locked release-specific GitHub issue, and make Maven and GitHub publication reconciliation safe across ambiguous retries. Add a durable emergency handoff path, frozen Worker routing, prompt Activity cancellation, idempotent native builds, and focused local tests.
Harden the Temporal state machine, publication reconciliation, approval recovery, and transient Worker behavior. Add protected Maven generation authorization, draft-first exact asset handling, maintenance-branch recovery, and both automated and independent emergency paths.
Bind release workflows to the exact receipted Candidate run, separate candidate compilation from credentialed artifact storage, adopt fallback artifacts across reruns, and classify S3 absence without masking service failures.
6bc0da5 to
6a5fc24
Compare
cconstable
left a comment
There was a problem hiding this comment.
Initial review. Didn't get through everything, will take another pass.
| _, portal = self.repository_state(profiles, manual) | ||
| portal_id = prior.portal or portal | ||
| state = await self.portal_state(portal_id) if portal_id else "" | ||
| if profiles or manual and (manual[0].get("state") != "released" or state != "FAILED"): |
There was a problem hiding this comment.
and has a higher precedence than or so this is evaluated as profiles or (manual and ...) which I don't think was the intention
| session = Session(value, self.source, self.environment) | ||
| try: | ||
| artifacts = [ | ||
| await session.artifact( |
There was a problem hiding this comment.
this can throw a ReleaseError (L458) but no except to capture it. looks like that would cause retries until the start_to_close_timeout hits.
| session.temp.cleanup() | ||
|
|
||
| @activity.defn(name="inspectMaven") | ||
| async def inspect_maven(self, value: ReleaseInput) -> Inspection: |
There was a problem hiding this comment.
I haven't seen any heartbeats in the activities so far. Might be good to add so we can distinguish between a worker dying vs the activity just taking a long time. We would need to add a heartbeat_timeout to the execute_activity options.
| root, records = await session.materialize() | ||
| await session.maven(root, records) | ||
| return await session.github_release() |
There was a problem hiding this comment.
is it possible to make these separate activities? in the event that gh is having issues publish would fail we would have to re-materialize. probably fine but something to think about.
| @@ -1,38 +0,0 @@ | |||
| # sdk-java Github Workflows | |||
There was a problem hiding this comment.
A new README would be helpful as I'm still not quite sure I've got the whole flow mapped out.
What changed?
Why?
The current manu-matic Java release process contains footguns which have led to incidents. There is also enough fragility in the GitHub and Maven release process that dogfooding Temporal here seems reasonable. The Python implementation keeps the necessary orchestration and reconciliation in one readable operational path.
Breaking changes?
No SDK API changes.
The former manual prepare-release path is intentionally removed. Merging a valid release-note file is the release authorization and execution trigger.
Verification
No release, test release, Maven publication, tag, GitHub release, or external Temporal operation was run while developing or testing this change.
Server PR
None.
Supersedes #2986.