Commit Graph

3 Commits

Author SHA1 Message Date
Mason Daugherty
9c64cb7136 ci: add --frozen to uv sync/run in refresh_model_profiles (#36087)
`--no-group test --no-group dev --no-group lint` only controls which
groups get *installed*; uv still resolves the full dependency graph (all
groups) and tries to generate metadata for editable sources like
`../langchain_v1`. In a sparse checkout these paths don't exist.

`--frozen` skips re-resolution entirely and uses the existing lock, so
the missing editable paths are never accessed.
2026-03-18 14:15:43 -04:00
Mason Daugherty
f33667fef3 ci: skip dev/test/lint groups when installing langchain-profiles CLI (#36086)
The reusable refresh_model_profiles workflow sparse-checks out only
libs/model-profiles from the langchain monorepo. `uv sync` fails because
the test/dev/lint dependency groups reference sibling editable packages
(../langchain_v1, ../core) that aren't present in the sparse checkout.

Restrict to the default dependency group so only the runtime deps
(httpx, tomli, typing-extensions) are installed — which is all the CLI
needs.
2026-03-18 14:07:15 -04:00
Mason Daugherty
6965c87a68 ci(model-profiles): extract reusable workflow for cross-repo profile refresh (#36038)
Extract the model profile refresh logic into a reusable `workflow_call`
workflow so external repos like `langchain-google` and `langchain-aws`
can run the same daily profile refresh and get auto-PRs without
duplicating the pipeline. The in-monorepo caller becomes a thin wrapper
passing provider JSON.

## Changes
- Add `_refresh_model_profiles.yml` as a reusable `workflow_call`
workflow — accepts a `providers` JSON array of `{provider, data_dir}`
pairs, optional `cli-path` (skips cloning the CLI repo when the caller
already has it), and configurable PR metadata inputs
- External callers get the `langchain-profiles` CLI via sparse checkout
of `langchain-ai/langchain` at a configurable `cli-ref`; the in-monorepo
caller short-circuits with `cli-path: libs/model-profiles`
- Add input validation step using `jq` — rejects non-array JSON and
entries missing `provider`/`data_dir` keys with `::error::` annotations
- Replace the piped `while read` loop with `mapfile`/`for` +
per-provider error handling: one provider failure no longer kills the
rest, and all failures are collected and reported at the end
- Route all `${{ inputs.* }}` expressions through `env:` bindings in
`run:` blocks to prevent script injection from caller-controlled values
- Validate `cli-path` existence before use, with a clear error if the
directory is missing
- Summary step now runs with `if: always()` and handles
failure/success/no-op states separately
- Refactor `refresh_model_profiles.yml` into a thin caller that passes
the 10 in-monorepo providers as JSON
2026-03-17 17:45:41 -04:00