Skip to content

Fix agent public inference API key in CI - #1413

Merged
qianl-nv merged 1 commit into
mainfrom
xyao/fix/ci-public-nvidia-api-key
Oct 9, 2026
Merged

qianl-nv merged 1 commit into
mainfrom
xyao/fix/ci-public-nvidia-api-key

Conversation

@xyao-nv

@xyao-nv xyao-nv commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Update Docker and native uv CI to use the correct public inference API key secret.

Why this change?

Both CI test jobs select the public inference endpoint, but reference ARENA_NVIDIA_API_KEY. The public key is stored in ARENA_PUBLIC_NVIDIA_API_KEY. It caused CI tests using public API to skip.

What changes?

Set NVIDIA_API_KEY to ${{secrets.ARENA_PUBLIC_NVIDIA_API_KEY}} in CI workflows.

Validation

CI Tests

@xyao-nv
xyao-nv marked this pull request as ready for review October 8, 2026 21:05
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

Both test jobs set ARENA_INFERENCE_ENDPOINT: public, and this PR makes their NVIDIA_API_KEY come from secrets.ARENA_PUBLIC_NVIDIA_API_KEY instead. That matches PUBLIC_ENDPOINT in inference_backend.py, which reads NVIDIA_API_KEY. These were the only two places in .github/workflows/ that used the old secret, so nothing was missed.

Findings

🔵 Infra change: please confirm the secret exists. This changes .github/workflows/, so it affects everyone's CI. The bot can't see repo secrets, so a maintainer should check that ARENA_PUBLIC_NVIDIA_API_KEY is set at the repo or org level and is available to these jobs. If the name is wrong, GitHub passes an empty string without any error, and the agentic tests would fail later with an auth error. The PR's Validation section is empty. A link to a passing "Run tests" / "Run tests (native uv, source)" run would settle this.

Verdict

Ship it (once the secret is confirmed)

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High impact] This PR appears safe to merge; no actionable defects were found.

Summary

Both CI workflows now use ARENA_PUBLIC_NVIDIA_API_KEY for public inference.

  • The endpoint selection and the environment variable read by the application stay unchanged.
  • No actionable issues were found. The stored secret's availability and value were not verified.

Reviews (1) · Last reviewed commit: "Fix public inference API key in CI" · Reviewed by Greptile

@qianl-nv qianl-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the fix!

@qianl-nv
qianl-nv merged commit 250f1ad into main Oct 9, 2026
35 of 37 checks passed
cvolkcvolk added a commit that referenced this pull request Oct 12, 2026
Skip the 6 tests that call the real inference endpoint unless
`ISAACLAB_ARENA_RUN_LIVE_ENDPOINT_TESTS=1` is set. This stops them from
making the CI test jobs run out of time.

## Why this change?

Since Oct 9, the "Run tests" job and the native uv job on main run out
of time and get cancelled. No code is broken. All other tests pass.

The cause is 6 tests that call the real public inference endpoint
(build.nvidia.com):

- `test_environment_generation_agent.py`:
`test_generate_spec_atomic_pick_and_place_against_live_endpoint`,
`test_generate_spec_five_bananas_parallel_pick_and_place_against_live_endpoint`,
`test_resolve_usd_prim_robocasa_kitchen_counter_and_fridge`
- `test_missing_object_inference.py`:
`test_infer_names_the_uncatalogued_object_against_live_endpoint`,
`test_infer_names_nothing_when_the_catalog_covers_the_prompt_against_live_endpoint`
- `test_shared_inference_backend.py`:
`test_multimodal_image_against_live_endpoint`

These tests used to be skipped because CI had the wrong API key. #1413
fixed the key, so they started running.

How long they take depends on how busy the free public endpoint is,
which we don't control:

- On Oct 8, in #1413's CI rerun, the 5 tests that existed then took
about 6 minutes together.
- From Oct 9 to Oct 12 they took 28 to 48 minutes, or hung for over an
hour when the endpoint returned errors. A failed request waits about 5
minutes for a 504 error, and hidden retries in `InferenceBackend` repeat
that several times.

"Run tests" takes about 58 minutes without these tests and has an 80
minute limit, so the slow days push it over. The native uv job (120
minute limit) has the same problem. PR runs are affected too.

## What changes?

The 6 tests now run only when both of these are set:

- `ISAACLAB_ARENA_RUN_LIVE_ENDPOINT_TESTS=1` (new)
- the API key for the selected endpoint, which is `NVIDIA_API_KEY` for
the default public endpoint

Before, the API key alone was enough. The skip helper is renamed from
`skip_without_live_endpoint_key()` to
`skip_unless_live_endpoint_tests_enabled()` to match what it checks.

What this means:

- CI no longer runs the 6 live tests, so the test jobs finish in time
again.
- Locally, having `NVIDIA_API_KEY` set no longer runs them.
`run_docker.sh` passes that key into the container, so this changes
local test runs too.
- The tests that use a fake endpoint for the same code still run.
- For now, nothing in CI checks that environment generation still works
with the real public model. This was also the case from August until Oct
9, while the tests were skipped because of the wrong key.

This is a stopgap. Possible follow-ups, to discuss with the code owners:

- Fix the hidden, stacked retries in `InferenceBackend`. The OpenAI
client retries on its own, and the backend retries on top of that, so
one call can hang for about an hour. This also affects people running
environment generation from the command line or the GUI. A small first
step: create the client with its own retries turned off and an explicit
timeout, and remove the `@pytest.mark.flaky` markers, which do nothing
because the plugin is not installed.
- Decide whether the check request that `InferenceBackend` sends when it
is created (`_ping`) is needed. It adds a full request to every test and
is never retried. At least 5 of the 8 live tests that failed on Oct
11-12 failed in this request.
- Ask authors to run the live tests (see below) when they change
prompts, schemas, catalogues, or the model, and to paste the result
under Validation. #1368 already did this.
- If the code owners want automated coverage, add a separate scheduled
workflow for the live tests, with its own time limit, stopping at the
first failure, and failing if the key is missing.

## Usage example

Running the live tests inside the Arena container.

Before:

```bash
export NVIDIA_API_KEY=<your NGC API key>
python -m pytest -sv \
    isaaclab_arena/tests/test_environment_generation_agent.py \
    isaaclab_arena/tests/test_missing_object_inference.py \
    isaaclab_arena/tests/test_shared_inference_backend.py
```

After:

```bash
export NVIDIA_API_KEY=<your NGC API key>
export ISAACLAB_ARENA_RUN_LIVE_ENDPOINT_TESTS=1
python -m pytest -sv \
    isaaclab_arena/tests/test_environment_generation_agent.py \
    isaaclab_arena/tests/test_missing_object_inference.py \
    isaaclab_arena/tests/test_shared_inference_backend.py
```

Each live test can take from under a minute to several minutes,
depending on the endpoint.

## Validation

Ran the 3 affected test files in the Arena container:

- Key set, no opt-in (the CI setup before this PR): 25 passed, 6 live
tests skipped.
- Opt-in set, no key: 6 live tests skipped.
- Opt-in and key set: the live test runs. It fails with a 401 because a
placeholder key was used, as expected.
- pre-commit passes.

CI on this PR:

- "Run tests" passed in 58 minutes. The no-camera step took 40 minutes
with exactly the 6 live tests skipped. The camera and GR00T policy
steps, which have not run on main since Oct 8 because of the timeouts,
also passed.

Not yet confirmed:

- The native uv job does not run on this PR because of its path filter,
so it will only be confirmed on main after merge.

Signed-off-by: Clemens Volk <[email protected]>
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.

2 participants