Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
615afb9
feat(recipe): add L40S OKE support with Oracle Linux OS enum
atif1996 Jun 28, 2026
1957be6
fix(fingerprint): detect OKE service from raw OCID providerID
atif1996 Jun 28, 2026
a4c1c2b
fix(uat): address CodeRabbit review findings on OKE L40S UAT
atif1996 Jun 29, 2026
ae28344
fix(review): address mchmarny review findings
atif1996 Jun 29, 2026
21f03cd
fix(review): address yuanchen8911 review findings
atif1996 Jun 29, 2026
97f3b3a
fix(skill): correct l40s/l40 SMI match order and add l40s/ol enum values
atif1996 Jun 29, 2026
3c7a16b
fix(uat): pin helm-diff plugin to v3.15.10 in all UAT runners
atif1996 Jun 29, 2026
8adfb19
chore(uat): remove OCI UAT scaffolding
atif1996 Jun 29, 2026
827a0d9
revert(uat): restore H100 EKS/GKE UAT files to main state
atif1996 Jun 29, 2026
db0fd67
fix(review): address yuanchen8911 round-2 review findings
atif1996 Jun 29, 2026
04e9425
fix(fingerprint): handle legacy 'oci' providerID in normalizeProviderID
atif1996 Jun 29, 2026
35787d7
fix(fingerprint): handle oci:// scheme URL in normalizeProviderID
atif1996 Jun 29, 2026
e25c084
fix(review): address yuanchen8911 round-3 review findings
atif1996 Jun 29, 2026
a8c2342
fix(recipe): fail closed when --os is required but omitted (fixes #1534)
atif1996 Jun 29, 2026
da76049
Merge branch 'main' into feat/oke-l40s-support
mchmarny Jun 29, 2026
9724109
fix(recipe): fail-closed guard when service+accel requires explicit --os
atif1996 Jun 29, 2026
362a447
test(recipe): add l40s-oke coverage to NFDTopologyUpdater overlay table
atif1996 Jun 29, 2026
6ff405e
fix(review): address yuanchen8911 round-4 review findings
atif1996 Jun 29, 2026
a3060f5
Merge branch 'main' into feat/oke-l40s-support
mchmarny Jun 29, 2026
f035c62
Merge branch 'main' into feat/oke-l40s-support
mchmarny Jun 29, 2026
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
5 changes: 3 additions & 2 deletions .claude/skills/aicr-analyzing-snapshots/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Key fields from `GPU.smi`:
| `gh200` | unresolved — Grace Hopper Superchip, not the discrete H200 GPU (check before h200) |
| `h200` | h200 (discrete H200 GPU) |
| `a100` | a100 |
| `l40s` | l40s |
Comment thread
yuanchen8911 marked this conversation as resolved.
| `l40` | l40 |
| `rtx pro 6000` | rtx-pro-6000 |

Expand Down Expand Up @@ -274,7 +275,7 @@ aicr recipe \
| Criteria | Extracted From | Valid Values |
|----------|---------------|--------------|
| service | K8s.node.provider / K8s.server.version | eks, gke, aks, oke, kind, lke |
| accelerator | GPU.smi.gpu.model | h100, h200, gb200, b200, a100, l40, rtx-pro-6000 |
| os | OS.release.ID | ubuntu, rhel, cos, amazonlinux |
| accelerator | GPU.smi.gpu.model | h100, h200, gb200, b200, a100, l40s, l40, rtx-pro-6000 |
| os | OS.release.ID | ubuntu, rhel, cos, amazonlinux, talos, ol |
| intent | User-specified | training, inference |
| platform | User-specified | dynamo, kubeflow, nim, runai, slurm |
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ body:
- Kubernetes version:
- OS (ubuntu/cos/other) + version:
- Kernel version:
- GPU type (h100/h200/gb200/b200/a100/l40/rtx-pro-6000/other):
- GPU type (h100/h200/gb200/b200/a100/l40/l40s/rtx-pro-6000/other):
- Workload intent (training/inference):
value: |
- AICR version (CLI `aicr version`, API image tag, or commit SHA):
Expand All @@ -126,7 +126,7 @@ body:
- Kubernetes version:
- OS (ubuntu/cos/other) + version:
- Kernel version:
- GPU type (h100/h200/gb200/b200/a100/l40/rtx-pro-6000/other):
- GPU type (h100/h200/gb200/b200/a100/l40/l40s/rtx-pro-6000/other):
- Workload intent (training/inference):
validations:
required: true
Expand Down
2 changes: 2 additions & 0 deletions .settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ testing_tools:
tilt: '0.37.4'
# renovate: datasource=github-releases depName=helm/helm depType=testing_tools
helm: 'v4.2.2'
# renovate: datasource=github-releases depName=databus23/helm-diff depType=testing_tools
helm_diff: 'v3.15.10'
# renovate: datasource=github-releases depName=helmfile/helmfile depType=testing_tools
helmfile: 'v1.6.0'
# helmfile_checksums are refreshed automatically by tools/update-helmfile-checksums
Expand Down
16 changes: 8 additions & 8 deletions api/aicr/v1/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ paths:
description: GPU/accelerator type. If omitted, treated as "any" (wildcard).
schema:
type: string
enum: [h100, h200, gb200, b200, a100, l40, rtx-pro-6000, any]
enum: [h100, h200, gb200, b200, a100, l40, l40s, rtx-pro-6000, any]
default: any
- name: gpu
in: query
required: false
description: Alias for accelerator parameter (backwards compatibility).
schema:
type: string
enum: [h100, h200, gb200, b200, a100, l40, rtx-pro-6000, any]
enum: [h100, h200, gb200, b200, a100, l40, l40s, rtx-pro-6000, any]
default: any
- name: intent
in: query
Expand All @@ -144,7 +144,7 @@ paths:
description: GPU node operating system. If omitted, treated as "any" (wildcard).
schema:
type: string
enum: [ubuntu, rhel, cos, amazonlinux, talos, any]
enum: [ubuntu, rhel, cos, amazonlinux, ol, talos, any]
default: any
- name: platform
in: query
Expand Down Expand Up @@ -487,15 +487,15 @@ paths:
description: GPU/accelerator type. If omitted, treated as "any" (wildcard).
schema:
type: string
enum: [h100, h200, gb200, b200, a100, l40, rtx-pro-6000, any]
enum: [h100, h200, gb200, b200, a100, l40, l40s, rtx-pro-6000, any]
default: any
- name: gpu
in: query
required: false
description: Alias for accelerator parameter (backwards compatibility).
schema:
type: string
enum: [h100, h200, gb200, b200, a100, l40, rtx-pro-6000, any]
enum: [h100, h200, gb200, b200, a100, l40, l40s, rtx-pro-6000, any]
default: any
- name: intent
in: query
Expand All @@ -511,7 +511,7 @@ paths:
description: GPU node operating system. If omitted, treated as "any" (wildcard).
schema:
type: string
enum: [ubuntu, rhel, cos, amazonlinux, talos, any]
enum: [ubuntu, rhel, cos, amazonlinux, ol, talos, any]
default: any
- name: platform
in: query
Expand Down Expand Up @@ -1262,7 +1262,7 @@ components:
accelerator:
type: string
description: GPU/accelerator type
enum: [h100, h200, gb200, b200, a100, l40, rtx-pro-6000, any]
enum: [h100, h200, gb200, b200, a100, l40, l40s, rtx-pro-6000, any]
example: h100
intent:
type: string
Expand All @@ -1272,7 +1272,7 @@ components:
os:
type: string
description: Operating system family
enum: [ubuntu, rhel, cos, amazonlinux, talos, any]
enum: [ubuntu, rhel, cos, amazonlinux, ol, talos, any]
example: ubuntu
platform:
type: string
Expand Down
2 changes: 1 addition & 1 deletion docs/contributor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ both entry points share it. Adding business logic to `pkg/cli` or
| `pkg/client/v1` | `aicr.Client` facade — shared SDK used by CLI, server, and external Go callers |
| **Recipe and data** | |
| `pkg/recipe` | Recipe resolution, overlay/mixin composition, registry. [recipe.md](recipe.md) |
| `pkg/recipe/oskind` | Single source of truth for OS criterion string values (`ubuntu`, `rhel`, `cos`, `amazonlinux`, `talos`). Imported by `pkg/recipe`, `pkg/collector`, `pkg/snapshotter`, and the CLI. |
| `pkg/recipe/oskind` | Single source of truth for OS criterion string values (`ubuntu`, `rhel`, `cos`, `amazonlinux`, `ol`, `talos`). Imported by `pkg/recipe`, `pkg/collector`, `pkg/snapshotter`, and the CLI. |
| `pkg/constraints` | Declarative constraint operators (`>=`, `<=`, tolerance) and evaluation |
| `pkg/measurement` | Schema for collector output and validator input |
| `pkg/serializer` | Deterministic YAML/JSON for evidence and bundles |
Expand Down
4 changes: 2 additions & 2 deletions docs/contributor/recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ Criteria fields (see `pkg/recipe/criteria.go` `type Criteria`):
| Field | Type | Wildcard | Static OSS values |
|---|---|---|---|
| `service` | `CriteriaServiceType` | `any` or empty | `eks`, `gke`, `aks`, `oke`, `ocp`, `kind`, `lke`, `bcm` |
| `accelerator` | `CriteriaAcceleratorType` | `any` or empty | `h100`, `h200`, `gb200`, `b200`, `a100`, `l40`, `rtx-pro-6000` |
| `accelerator` | `CriteriaAcceleratorType` | `any` or empty | `h100`, `h200`, `gb200`, `b200`, `a100`, `l40`, `l40s`, `rtx-pro-6000` |
| `intent` | `CriteriaIntentType` | `any` or empty | `training`, `inference` |
| `os` | `CriteriaOSType` | `any` or empty | `ubuntu`, `rhel`, `cos`, `amazonlinux`, `talos` |
| `os` | `CriteriaOSType` | `any` or empty | `ubuntu`, `rhel`, `cos`, `amazonlinux`, `ol`, `talos` |
| `platform` | `CriteriaPlatformType` | `any` or empty | `dynamo`, `kubeflow`, `nim`, `runai`, `slurm` |
| `nodes` | int | `0` | any positive int |

Expand Down
6 changes: 3 additions & 3 deletions docs/user/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ Generate an optimized configuration recipe based on environment parameters.
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `service` | string | any | K8s service: `eks`, `gke`, `aks`, `oke`, `ocp`, `kind`, `lke`, `bcm`, `any` |
| `accelerator` | string | any | GPU type: `h100`, `h200`, `gb200`, `b200`, `a100`, `l40`, `rtx-pro-6000`, `any` |
| `accelerator` | string | any | GPU type: `h100`, `h200`, `gb200`, `b200`, `a100`, `l40`, `l40s`, `rtx-pro-6000`, `any` |
| `gpu` | string | any | Alias for `accelerator` |
| `intent` | string | any | Workload: `training`, `inference`, `any` |
| `os` | string | any | Node OS: `ubuntu`, `rhel`, `cos`, `amazonlinux`, `talos`, `any` |
| `os` | string | any | Node OS: `ubuntu`, `rhel`, `cos`, `amazonlinux`, `ol`, `talos`, `any` |
| `platform` | string | any | Platform/framework: `dynamo`, `kubeflow`, `nim`, `runai`, `slurm`, `any` |
| `nodes` | integer | 0 | GPU node count (0 = any) |

Expand Down Expand Up @@ -823,7 +823,7 @@ openapi-generator-cli generate -i openapi.yaml -g typescript-fetch -o ./ts-clien

**"Invalid accelerator type" error:**
```shell
# Use valid values: h100, h200, gb200, b200, a100, l40, rtx-pro-6000, any
# Use valid values: h100, h200, gb200, b200, a100, l40, l40s, rtx-pro-6000, any
curl "http://localhost:8080/v1/recipe?accelerator=h100"
```

Expand Down
8 changes: 4 additions & 4 deletions docs/user/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ aicr snapshot [flags]
| `--runtime-class` | | string | | Runtime class for GPU access without consuming a GPU allocation (e.g., `nvidia`). Mutually exclusive with `--require-gpu`. |
| `--template` | | string | | Path to Go template file for custom output formatting (requires YAML format) |
| `--max-nodes-per-entry` | | int | 0 | Maximum node names per taint/label entry in topology collection (0 = unlimited) |
| `--os` | | string | | Node OS family (`ubuntu`, `rhel`, `cos`, `amazonlinux`, `talos`). Selects the per-OS pod configuration and in-pod service collector backend. `talos` skips the `/run/systemd` and `/etc/os-release` hostPath mounts and uses the Kubernetes-API service backend. Reads `AICR_OS` env when unset. |
| `--os` | | string | | Node OS family (`ubuntu`, `rhel`, `cos`, `amazonlinux`, `ol`, `talos`). Selects the per-OS pod configuration and in-pod service collector backend. `talos` skips the `/run/systemd` and `/etc/os-release` hostPath mounts and uses the Kubernetes-API service backend. Reads `AICR_OS` env when unset. |
| `--requests` | | string | | Override agent container resource requests as a comma-separated list of `name=quantity` pairs (e.g. `cpu=500m,memory=1Gi,ephemeral-storage=1Gi`). Unspecified resources keep the built-in privileged or restricted defaults. Reads `AICR_REQUESTS` env when unset. |
| `--limits` | | string | | Override agent container resource limits as a comma-separated list of `name=quantity` pairs (e.g. `cpu=1,memory=2Gi,ephemeral-storage=2Gi`). Unspecified resources keep the built-in defaults. With `--require-gpu`, the default `nvidia.com/gpu=1` is applied only when `--limits` does not already contain that key — an explicit `--limits nvidia.com/gpu=N` wins. Reads `AICR_LIMITS` env when unset. |
| `--cluster-config` | | string | | Path to a pre-existing k8s-launch-kit (l8k) `cluster-config.yaml`. Ingests the file's per-hardware-group network topology (PFs, capabilities, kernel modules, machine/GPU type, fabric type) into the snapshot as a `NetworkTopology` Measurement. **Local agent mode only for now** (`AICR_AGENT_MODE=true`) — Job-mode rejects this flag with an `INVALID_REQUEST` error until ConfigMap mounting is implemented. Mutually exclusive with `--discover-network` at the collector level — file path wins when both are set, so callers can default discovery from a flag without inadvertent cluster contact. Reads `AICR_CLUSTER_CONFIG_PATH` env when unset. |
Expand Down Expand Up @@ -205,7 +205,7 @@ spec:
- nvidia.com/gpu=present:NoSchedule
requireGpu: false
runtimeClassName: "" # mutually exclusive with requireGpu
os: "" # ubuntu | rhel | cos | amazonlinux | talos
os: "" # ubuntu | rhel | cos | amazonlinux | ol | talos
requests: "" # "cpu=500m,memory=1Gi"
limits: "" # "cpu=1,memory=2Gi"
execution:
Expand Down Expand Up @@ -387,9 +387,9 @@ Generate recipes using direct system parameters:
| Flag | Short | Type | Description |
|------|-------|------|-------------|
| `--service` | | string | K8s service: eks, gke, aks, oke, ocp, kind, lke, bcm, any |
| `--accelerator` | `--gpu` | string | Accelerator/GPU type: h100, h200, gb200, b200, a100, l40, rtx-pro-6000 |
| `--accelerator` | `--gpu` | string | Accelerator/GPU type: h100, h200, gb200, b200, a100, l40, l40s, rtx-pro-6000 |
| `--intent` | | string | Workload intent: training, inference |
| `--os` | | string | OS family: ubuntu, rhel, cos, amazonlinux, talos |
| `--os` | | string | OS family: ubuntu, rhel, cos, amazonlinux, ol, talos |
| `--platform` | | string | Platform/framework type: dynamo, kubeflow, nim, runai, slurm |
| `--nodes` | | int | Number of GPU nodes in the cluster |
| `--output` | `-o` | string | Output file (default: stdout) |
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ func recipeCmd() *cli.Command {
Usage: "Create optimized recipe for given intent and environment parameters.",
Description: `Generate configuration recipe based on specified environment parameters including:
- Kubernetes service type (e.g. eks, gke, aks, oke, kind, lke, bcm)
- Accelerator type (e.g. h100, h200, gb200, b200, a100, l40, rtx-pro-6000)
- Accelerator type (e.g. h100, h200, gb200, b200, a100, l40, l40s, rtx-pro-6000)
- Workload intent (e.g. training, inference)
- GPU node operating system (e.g. ubuntu, rhel, cos, amazonlinux, talos)
- GPU node operating system (e.g. ubuntu, rhel, cos, amazonlinux, ol, talos)
- Number of GPU nodes in the cluster

The recipe returns a list of components with deployment order based on dependencies.
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func snapshotCmdFlags() []cli.Flag {
},
&cli.StringFlag{
Name: "os",
Usage: "Node OS family (ubuntu, rhel, cos, amazonlinux, talos). Selects the per-OS pod configuration and service collector backend. Talos skips systemd hostPath mounts and uses the Kubernetes-API service backend.",
Usage: "Node OS family (ubuntu, rhel, cos, amazonlinux, ol, talos). Selects the per-OS pod configuration and service collector backend. Talos skips systemd hostPath mounts and uses the Kubernetes-API service backend.",
Sources: cli.EnvVars("AICR_OS"),
Category: catAgentDeployment,
},
Expand Down
6 changes: 3 additions & 3 deletions pkg/client/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ type AgentConfig struct {
//
// Field meanings match the pkg/recipe.Criteria documentation:
// - Service: Kubernetes service flavor (eks/gke/aks/oke/kind/lke/bcm).
// - Accelerator: GPU model identifier (h100/h200/b200/gb200/a100/l40/rtx-pro-6000).
// - Accelerator: GPU model identifier (h100/h200/b200/gb200/a100/l40/l40s/rtx-pro-6000).
Comment thread
yuanchen8911 marked this conversation as resolved.
// - Intent: workload intent (training/inference).
// - OS: worker-node OS (ubuntu/rhel/cos/amazonlinux/talos).
// - OS: worker-node OS (ubuntu/rhel/cos/amazonlinux/talos/ol).
// - Platform: framework overlay (dynamo/kubeflow/nim/runai/slurm).
// - Nodes: worker-node count hint (0 = unspecified).
//
Expand Down Expand Up @@ -221,7 +221,7 @@ type RecipeRequest struct {
Intent string

// OS is the worker-node operating system. Mapped to CriteriaOS.
// Supported values: "ubuntu", "rhel", "cos", "amazonlinux".
// Supported values: "ubuntu", "rhel", "cos", "amazonlinux", "talos", "ol".
// Empty means "unspecified" — recipe resolution will not select
// OS-pinned leaf overlays (e.g., h100-eks-ubuntu-training,
// h100-gke-cos-training) and will fall back to the OS-agnostic
Expand Down
7 changes: 6 additions & 1 deletion pkg/collector/k8s/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (k *Collector) collectNode(ctx context.Context) (map[string]measurement.Rea
// - aws:///us-west-2a/i-0123456789abcdef0 → "eks"
// - gce://my-project/us-central1-a/gke-cluster-node → "gke"
// - azure:///subscriptions/.../virtualMachines/... → "aks"
// - oci://... → "oke"
// - ocid1.instance.oc1... → "oke" (OKE emits a raw OCID, no scheme prefix)
//
// If the format is unrecognized, it returns the raw provider prefix.
func parseProvider(providerID string) string {
Expand All @@ -101,6 +101,11 @@ func parseProvider(providerID string) string {
return ""
}

// OKE nodes set providerID to a raw Oracle OCID (no "://" scheme).
if strings.HasPrefix(providerID, "ocid1.") {
Comment thread
yuanchen8911 marked this conversation as resolved.
return "oke"
}

// Split by "://" to get the provider prefix
parts := strings.SplitN(providerID, "://", 2)

Expand Down
14 changes: 12 additions & 2 deletions pkg/collector/k8s/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,25 @@ func TestParseProvider(t *testing.T) {
want: "aks",
},
{
name: "OCI OKE",
providerID: "oci://ocid1.instance.oc1.phx.abcdef123456",
name: "OKE raw OCID (actual format)",
providerID: "ocid1.instance.oc1.us-chicago-1.anxxeljsaqwjupqcb4pa5kzxy4hef5dtclbkqsnmu6kedbkrne3s2bz5nwzq",
want: "oke",
},
{
name: "OKE raw OCID short",
providerID: "ocid1.instance.oc1.phx.abcdef123456",
want: "oke",
},
{
name: "empty provider",
providerID: "",
want: "",
},
{
name: "OKE oci:// scheme (legacy format)",
providerID: "oci://ocid1.instance.oc1.us-chicago-1.example",
want: "oke",
},
{
name: "unknown format",
providerID: "custom-provider://some-id",
Expand Down
4 changes: 2 additions & 2 deletions pkg/fingerprint/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
//
// A Fingerprint records the cluster-identity dimensions used to bind
// a snapshot to a recipe — service (eks/gke/aks/oke/kind/lke/bcm),
// accelerator (h100/h200/gb200/b200/a100/l40/rtx-pro-6000), OS
// (ubuntu/rhel/cos/amazonlinux/talos plus raw VERSION_ID), Kubernetes
// accelerator (h100/h200/gb200/b200/a100/l40/l40s/rtx-pro-6000), OS
Comment thread
yuanchen8911 marked this conversation as resolved.
// (ubuntu/rhel/cos/amazonlinux/talos/ol plus raw VERSION_ID), Kubernetes
// server version, region, total node count, and GPU node count. Each
// dimension records the resolved value plus an optional source string
// identifying which collector signal produced it (e.g.,
Expand Down
27 changes: 26 additions & 1 deletion pkg/fingerprint/from_measurements.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
// constants because the collector packages keep them unexported and we
// don't want to import them just for the names.
const (
serviceOKE = "oke"
subtypeK8sServer = "server"
subtypeK8sNode = "node"
subtypeGPUHardware = "hardware"
Expand Down Expand Up @@ -223,7 +224,7 @@ func populateFromK8s(fp *Fingerprint, m *measurement.Measurement) {
}
if st := m.GetSubtype(subtypeK8sNode); st != nil {
if v, err := st.GetString(keyK8sNodeProvider); err == nil && v != "" {
fp.Service = Dimension{Value: v, Source: sourceServiceProvider}
fp.Service = Dimension{Value: normalizeProviderID(v), Source: sourceServiceProvider}
}
}
}
Expand Down Expand Up @@ -320,6 +321,28 @@ func extractRegion(m *measurement.Measurement) (region string, multi bool) {
return value, false
}

// normalizeProviderID maps a raw Kubernetes spec.providerID (or an already-
// normalized name stored by the collector) to the service type string used in
// recipe criteria. OKE nodes can appear in four forms:
// - "ocid1.instance.oc1..." — bare OCID (no scheme); what K8s stores natively
// - "oci://ocid1.instance.oc1..." — full scheme URL; the collector normalizes
// this to "oke" via parseProvider, but hand-crafted snapshots may carry it
// - "oci" — bare string stored by the collector before the "oci://" → "oke"
// mapping existed
// - "oke" — already normalized; pass through
func normalizeProviderID(v string) string {
if strings.HasPrefix(v, "ocid1.") {
return serviceOKE
}
if strings.HasPrefix(v, "oci://") {
return serviceOKE
}
if v == "oci" {
return serviceOKE
}
return v
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

// normalizeOSID maps an /etc/os-release ID value to the
// recipe.CriteriaOSType enum. Returns "" for IDs that do not match a
// supported OS kind so callers treat them as "fingerprint did not
Expand All @@ -335,6 +358,8 @@ func normalizeOSID(id string) string {
return oskind.COS
case oskind.AmazonLinux, "amzn", "amazon", "al2", "al2023":
return oskind.AmazonLinux
case oskind.OracleLinux:
return oskind.OracleLinux
case oskind.Talos:
return oskind.Talos
default:
Expand Down
Loading
Loading