Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 2 additions & 26 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,15 @@
FROM debian:bookworm-slim AS builder

WORKDIR /opt

# The installer requires curl (and certificates) to download the release archive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl

SHELL [ "/bin/bash", "-o", "pipefail", "-c" ]

# Download the latest installer
ADD https://astral.sh/uv/install.sh uv-installer.sh

# Run the installer then remove it
RUN sh uv-installer.sh


FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm

ENV CARGO_HOME="/opt/.cargo/bin"
ENV PATH="$CARGO_HOME/:$PATH"

ENV PYTHONUNBUFFERED=True
ENV UV_LINK_MODE=copy

WORKDIR /opt

COPY --from=builder /root/.cargo/bin/uv $CARGO_HOME/uv
COPY --from=builder /root/.cargo/bin/uvx $CARGO_HOME/uvx
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
COPY --from=ghcr.io/astral-sh/uv:latest /uvx /bin/uvx
COPY ./.python-version ./

RUN uv python pin "$(cat .python-version)"

RUN chown -R vscode $CARGO_HOME

# Install required tools for development
RUN apt-get update && apt-get install -y iperf3 libusb-dev
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Run ruff
- name: Run Ruff
uses: astral-sh/ruff-action@v3
with:
version-file: "pyproject.toml"
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
default_stages: [pre-commit]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.9.2
hooks:
- id: ruff
name: Ruff check
description: "Run 'ruff check' for extremely fast Python linting"
args: [ --fix ]
- id: ruff
name: Ruff Check
description: "Run 'ruff check' for extremely fast Python linting"
args: [ --fix ]

- id: ruff-format
name: Ruff format
description: "Run 'ruff format' for extremely fast Python formatting"
- id: ruff-format
name: Ruff Format
description: "Run 'ruff format' for extremely fast Python formatting"
1 change: 0 additions & 1 deletion __templates__/driver/pyproject.toml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ build-backend = "hatchling.build"
dev = [
"pytest-cov>=6.0.0",
"pytest>=8.3.3",
"ruff>=0.7.1",
]
29 changes: 15 additions & 14 deletions packages/jumpstarter-cli-client/jumpstarter_cli_client/lease.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,32 @@ def lease_release(name, lease, all_leases):
raise ValueError("no lease specified")
config.release_lease(lease)


@lease.command("request")
@click.option("-l", "--label", "labels", type=(str, str), multiple=True)
@click.argument("name", type=str, default="")
def lease_request(name, labels):
"""Request an exporter lease from the jumpstarter controller.

The result of this command will be a lease ID that can be used to
connect to the remote exporter.
The result of this command will be a lease ID that can be used to
connect to the remote exporter.

This is useful for multi-step workflows where you want to hold a lease
for a specific exporter while performing multiple operations, or for
CI environments where one step will request the lease and other steps
will perform operations on the leased exporter.
This is useful for multi-step workflows where you want to hold a lease
for a specific exporter while performing multiple operations, or for
CI environments where one step will request the lease and other steps
will perform operations on the leased exporter.

Example:
Example:

.. code-block:: bash
.. code-block:: bash

$ JMP_LEASE=$(jmp lease request -l label match)
$ jmp shell
$$ j --help
$$ exit
$ jmp lease release -l "${JMP_LEASE}"
$ JMP_LEASE=$(jmp lease request -l label match)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to update to jmp client lease request

But the important thing is fixing ruff now... merging :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I am a bit worried about the non deterministic behavior of ruff. Maybe we need to make sure everyone upgrades their uv and fully syncs the workspace. 🤷‍♂️

$ jmp shell
$$ j --help
$$ exit
$ jmp lease release -l "${JMP_LEASE}"

"""
"""
try:
if name:
config = ClientConfigV1Alpha1.load(name)
Expand Down
1 change: 0 additions & 1 deletion packages/jumpstarter-driver-http/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ dev = [
"pytest-cov>=6.0.0",
"pytest>=8.3.3",
"pytest-asyncio>=0.0.0",
"ruff>=0.7.1",
"pytest-asyncio>=0.24.0",
]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ docs = [
"sphinx-click>=6.0.0",
"sphinx-substitution-extensions>=2024.10.17",
]
dev = ["ruff>=0.9.2", "typos>=1.23.6", "pre-commit>=3.8.0", "esbonio>=0.16.5"]
dev = ["ruff==0.9.2", "typos>=1.23.6", "pre-commit>=3.8.0", "esbonio>=0.16.5"]
Comment thread
kirkbrauer marked this conversation as resolved.

[tool.ruff]
exclude = ["packages/jumpstarter-protocol"]
Expand Down
4 changes: 1 addition & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.