Skip to content

jig formatted status#241

Closed
dulaj-me wants to merge 15 commits intonextfrom
dulaj/formatted_status
Closed

jig formatted status#241
dulaj-me wants to merge 15 commits intonextfrom
dulaj/formatted_status

Conversation

@dulaj-me
Copy link
Contributor

@dulaj-me dulaj-me commented Feb 4, 2026

E.g:

sprocket-test-dulaj, id: f1ae8348-7379-4c34-9004-6cd273d6d644
status: Ready
min/max replicas: 1/10
desired/ready replicas: 1/1
autoscaling: QueueBacklogPerWorker, target=1.05
created/updated: 2026-02-03 18:51:11 / 2026-02-04 16:25:42

= settings =
registry.together.xyz/proj_csvnq3lka36nwbncbkkva/sprocket-test-dulaj@sha256:d7dae5410dcd838e52625d5417d57b96e5d96bb6061190150d008b81f2aaaaa0
volumes: my-test-volume-2:/app/my-volume
secrets: sprocket-test-dulaj-TOGETHER_API_KEY
gpu: 0x none, cpu: 4, memory: 32GB, storage: 100MB
port: 8000, command: -, args: -, health_check_path: /health
environment: FOO=bar, TOGETHER_API_BASE_URL=https://api.together.xyz, TOGETHER_API_KEY=, TOGETHER_DEPLOYMENT_REVISION_ID=3f3bd767-6629-4cce-a68f-8352b6391c93

= detailed status =
image: bd21ffd14834a1c774593ba8a9475bdb45e1f77072fc48d9b5fd7986b7945d13:
    75dcc8747d-8jq6f: Running, Age 23h, Rev 3f3bd767-6629-4cce-a68f-8352b6391c93 (latest)

@dulaj-me dulaj-me force-pushed the dulaj/formatted_status branch from 7ceb8db to 3815764 Compare February 4, 2026 16:32
by_image[img].append((replica_name, replica_info))

for img, replicas in sorted(by_image.items()):
lines.append(f"{img}:")
Copy link
Contributor

Choose a reason for hiding this comment

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

from the example in the description it is not immediately obvious that this is image tag:
Maybe preprent with something like Image -

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Check description

status_str = replica_info.get("replica_status", "Unknown")
reason = replica_info.get("replica_status_reason")
if reason and reason != status_str:
status_str = f"{status_str}:{reason}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be great if we show volume preload status as well. One way to do that is, if there is 'volume_preload_status' and 'volume_preload_completed_at' is empty, show something like Loading volume contents

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Check description


age = _format_age(replica_info.get("replica_ready_since"))

lines.append(f" {replica_name}: {status_str}, Age {age}")
Copy link
Contributor

Choose a reason for hiding this comment

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

we can show revision_id as well. each replica event will have it(if replica is started). The latest revision id for the whole deployment you can take from environment variables. It is called TOGETHER_DEPLOYMENT_REVISION_ID

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Check description

@narasul
Copy link
Contributor

narasul commented Feb 4, 2026

secrets: sprocket-test-dulaj-TOGETHER_API_KEY

one minor thing, the deployment name can be removed from the secret name, because you do jig secrets set TOGETHER_API_KEY abc not jig secrets set sprocket-test-dulaj-TOGETHER_API_KEY abc

Also if it is a secret it shoudn't be included in the env part like this: TOGETHER_API_KEY=, maybe TOGETHER_API_KEY=[secret] like we do in the UI

Copy link
Contributor

@technillogue technillogue left a comment

Choose a reason for hiding this comment

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

this should also probably be appropriately capitalized and styled to match, I wrote it out on slack intending it to be the rough content. for comparison:

App
  Name     = pybatch-api
  Owner    = personal
  Hostname = pybatch-api.fly.dev
  Image    = pybatch-api:deployment-01KGJ96CPWZP54PPVH9R6SZD7W

Machines
PROCESS ID              VERSION REGION  STATE   ROLE    CHECKS  LAST UPDATED
app     1850e41f309d38  21      sjc     started                 2026-02-03T17:36:31Z

during deploy:

Machines
PROCESS ID              VERSION REGION  STATE           ROLE    CHECKS  LAST UPDATED
app     1850e41f309d38  22      sjc     replacing                       2026-02-05T04:10:36Z

or `wrangler deployments status`

@@ -0,0 +1,171 @@
"""Utility functions for jig CLI commands."""
Copy link
Contributor

Choose a reason for hiding this comment

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

I want to go back to having a single file anyway, this can go in jig.py, but it should be about half the line count

# Extract just the tag from image if it's a full path
if ":" in img:
img = img.split(":")[-1]
# Handle digest format (image@sha256:...)
Copy link
Contributor

Choose a reason for hiding this comment

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

don't think this is correct when someone pushes an image without a tag

lines: list[str] = []

# Header section
name = data.get("name", "-")
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we could just use the pydantic response object for this

@dulaj-me dulaj-me force-pushed the dulaj/formatted_status branch from eafcf8e to 9c76da0 Compare February 5, 2026 15:11
@dulaj-me
Copy link
Contributor Author

dulaj-me commented Feb 5, 2026

Closing this PR and continuing on #249
Stainless messed up this branch history. I cherry picked the commits to the new one

@dulaj-me dulaj-me closed this Feb 5, 2026
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.

5 participants