Skip to content

Render links on activity describe - #1131

Merged
Quinn-With-Two-Ns merged 4 commits into
mainfrom
NEXUS-531
Aug 7, 2026
Merged

Render links on activity describe#1131
Quinn-With-Two-Ns merged 4 commits into
mainfrom
NEXUS-531

Conversation

@Quinn-With-Two-Ns

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Related issues

What changed?

Render links on activity describe- #1131

Checklist

Stability

  • Breaking changes are marked with 💥 in the PR title and release notes
  • Changes to JSON output (-o json / -o jsonl) are treated as breaking changes

Design

  • This feature does not depend on Cloud-only APIs or behavior (it works against an OSS server)
  • New commands follow temporal <noun> <verb> structure (e.g. temporal workflow start)
  • New flags are named after the API concept, not the implementation mechanism (good: --search-attribute, bad: --index-field)
  • New flags don't duplicate an existing flag that serves the same purpose
  • New flags do not have short aliases without strong justification
  • Experimental features are marked with (Experimental) in commands.yaml

Help text (see style guide at the top of commands.yaml)

  • All flags shown in help text and examples are implemented and functional
  • Summaries use sentence case and have no trailing period
  • Long descriptions end with a period and include at least one example invocation
  • Examples use long flags (--namespace, not -n), one flag per line
  • Placeholder values use YourXxx form (YourWorkflowId, YourNamespace)

Behavior

  • Results go to stdout; errors and warnings go to stderr
  • Error messages are lowercase with no trailing punctuation

Tests

  • Added functional test(s) (SharedServerSuite)
  • Added unit test(s) (func TestXxx) where applicable

Before:

 $ temporal nexus operation describe --operation-id op-1

    OperationId  op-1
    RunId        run-1
    Endpoint     payments
    Service      PaymentService
    Operation    charge
    Status       Running
    State        Started
    Attempt      1

After:

  $ temporal nexus operation describe --operation-id op-1

    OperationId  op-1
    RunId        run-1
    Endpoint     payments
    Service      PaymentService
    Operation    charge
    Status       Running
    State        Started
    Attempt      1

  Links: 1
    temporal:///namespaces/default/workflows/payment-workflow/run-1/history?eventID=12&eventType=NexusOperationScheduled&referenceType=EventReference

Before:

  $ temporal activity describe --activity-id act-1

  Activity Execution Info:
    ActivityId            act-1
    RunId                 run-1
    Type                  MyActivity
    Status                Running
    TaskQueue             tq
    Attempt               1
    StateTransitionCount  0

  Callbacks:
    STATE      ATTEMPT
    Succeeded  2

After:

  $ temporal activity describe --activity-id act-1

  Activity Execution Info:
    ActivityId            act-1
    RunId                 run-1
    Type                  MyActivity
    Status                Running
    TaskQueue             tq
    Attempt               1
    StateTransitionCount  0

  Callbacks: 1

    URL      http://callback.example/cb
    Links
    [temporal:///namespaces/default/workflows/wf-id/run-id/history?eventID=1&eventType=WorkflowExecutionStarted&referenceType=EventReference]
    Trigger  ActivityClosed
    State    Succeeded
    Attempt  2

@Quinn-With-Two-Ns
Quinn-With-Two-Ns marked this pull request as ready for review July 28, 2026 15:16
@Quinn-With-Two-Ns
Quinn-With-Two-Ns requested a review from a team as a code owner July 28, 2026 15:16
@chaptersix

Copy link
Copy Markdown
Contributor

Please add the examples to the PR description. helps with the review.

@Quinn-With-Two-Ns

Copy link
Copy Markdown
Contributor Author

@chaptersix This PR doesn't add any new commands so I am not sure what example would be helpful

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds consistent rendering of Nexus-style link URLs in CLI “describe” outputs, extending link rendering to activity describe and nexus operation describe, and refactoring callback rendering into shared helpers.

Changes:

  • Add shared helpers to convert/print Temporal common links as Nexus URL strings and reuse them across commands.
  • Refactor workflow/activity callback rendering into a single shared printCallbacks implementation (including callback URL, trigger, links, state, etc.).
  • Add unit tests covering link conversion and link/callback rendering; update a batch JSON expectation for the operation type string.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/temporalcli/commands.workflow_view.go Switch workflow describe callback rendering to shared printCallbacks.
internal/temporalcli/commands.nexus_operation.go Print a Links section for Nexus operation descriptions.
internal/temporalcli/commands.link_test.go Add unit tests for link conversion and for activity/nexus operation link rendering.
internal/temporalcli/commands.go Add nexusLinkStrings, printLinks, and generic callback normalization/printing helpers.
internal/temporalcli/commands.batch_test.go Update expected JSON operation type string.
internal/temporalcli/commands.activity.go Render activity Links section and reuse shared callback printing.
go.mod Bump go.temporal.io/api and several other dependencies (direct/indirect).
go.sum Update module checksums corresponding to dependency bumps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +25 to +28
activitypb "go.temporal.io/api/activity/v1"
"go.temporal.io/api/common/v1"
commonpb "go.temporal.io/api/common/v1"
"go.temporal.io/api/enums/v1"

@Quinn-With-Two-Ns Quinn-With-Two-Ns Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This isn't my change, it should be fixed but I think it should be in a separate PR since this will touch a lot of files

@chaptersix

Copy link
Copy Markdown
Contributor

@chaptersix This PR doesn't add any new commands so I am not sure what example would be helpful

mostly looking for a before and after. keep in mind I'm not up to speed on everything nexus or activities.

s.NoError(json.Unmarshal(res.Stdout.Bytes(), &jsonOut))
s.Equal(jobId, jsonOut["jobId"])
s.Equal("BATCH_OPERATION_TYPE_TERMINATE", jsonOut["operationType"])
s.Equal("BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW", jsonOut["operationType"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

change form server?

@chaptersix chaptersix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approving assuming the breaking change from the server is resolved.

@Quinn-With-Two-Ns
Quinn-With-Two-Ns added this pull request to the merge queue Aug 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 7, 2026
@Quinn-With-Two-Ns
Quinn-With-Two-Ns added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit 65412b0 Aug 7, 2026
11 checks passed
@Quinn-With-Two-Ns
Quinn-With-Two-Ns deleted the NEXUS-531 branch August 7, 2026 23:04
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.

3 participants