Skip to content

Commit 4d98e62

Browse files
Merge pull request #313649 from jlian/fix/wasm-artifact-mediatype-callout
Add OCI artifact media type requirements for WASM deploy docs
2 parents 6c97549 + 3da5d60 commit 4d98e62

1 file changed

Lines changed: 72 additions & 2 deletions

File tree

articles/iot-operations/develop-edge-apps/howto-deploy-wasm-graph-definitions.md

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: dominicbetts
55
ms.author: dobett
66
ms.service: azure-iot-operations
77
ms.topic: how-to
8-
ms.date: 02/25/2026
8+
ms.date: 03/24/2026
99
ai-usage: ai-assisted
1010

1111
---
@@ -139,7 +139,19 @@ oras pull ghcr.io/azure-samples/explore-iot-operations/filter:1.0.0
139139

140140
## Push modules to your registry
141141

142-
Once you have the sample modules and graphs, push them to your container registry. Replace `<YOUR_ACR_NAME>` with the name of your Azure Container Registry. To ensure the graphs and modules are visible in the operations experience web UI, add the `--config` and `--artifact-type` flags as shown in the following example:
142+
Once you have the sample modules and graphs, push them to your container registry. Replace `<YOUR_ACR_NAME>` with the name of your Azure Container Registry.
143+
144+
> [!IMPORTANT]
145+
> The operations experience discovers artifacts by their OCI **config** media type, not the layer media type. When you push artifacts to a registry, you must set the correct media types or the artifacts won't appear in the operations experience UI:
146+
>
147+
> | Artifact type | Required OCI config media type | Required layer media type |
148+
> |---|---|---|
149+
> | Graph definition | `application/vnd.microsoft.aio.graph.v1+yaml` | `application/yaml` |
150+
> | WASM module | `application/vnd.module.wasm.content.layer.v1+wasm` | `application/wasm` |
151+
>
152+
> If you use a CI/CD pipeline or other tooling to copy artifacts between registries, verify that it preserves these media types. Some tools strip or replace artifact metadata during transfer, which causes the artifacts to silently disappear from the operations experience. For more information, see [Registry artifact requirements](#registry-artifact-requirements).
153+
154+
To ensure the graphs and modules are visible in the operations experience web UI, add the `--config` and `--artifact-type` flags as shown in the following example:
143155

144156
```bash
145157
# Log in to your ACR
@@ -187,6 +199,64 @@ See [Develop WebAssembly modules for data flow graphs](../develop-edge-apps/howt
187199
For detailed information about creating and configuring the YAML graph definitions that define your data processing workflows, see [Configure WebAssembly graph definitions](../develop-edge-apps/howto-configure-wasm-graph-definitions.md).
188200

189201

202+
## Registry artifact requirements
203+
204+
The operations experience uses OCI artifact metadata to discover and display graphs and modules. Understanding these requirements is important when you build custom CI/CD pipelines, copy artifacts between registries, or troubleshoot missing artifacts in the UI.
205+
206+
### How artifact discovery works
207+
208+
When you push an artifact to a registry with ORAS, the OCI manifest includes two relevant fields:
209+
210+
- **Config media type**: Identifies what kind of artifact this is. The operations experience filters on this field to find graphs and modules.
211+
- **Layer media type**: Describes the content format of the actual file (YAML or WASM).
212+
213+
The operations experience uses the config media type for discovery, not the layer media type. If the config media type is missing or incorrect, the artifact exists in the registry but doesn't appear in the UI.
214+
215+
### Required media types
216+
217+
| Artifact type | Config media type (`--config` or `--artifact-type`) | Layer media type |
218+
|---|---|---|
219+
| Graph definition | `application/vnd.microsoft.aio.graph.v1+yaml` | `application/yaml` |
220+
| WASM module | `application/vnd.module.wasm.content.layer.v1+wasm` | `application/wasm` |
221+
222+
For graph definitions, pass the config media type with the `--config` flag:
223+
224+
```bash
225+
oras push <REGISTRY>/my-graph:1.0.0 \
226+
--config /dev/null:application/vnd.microsoft.aio.graph.v1+yaml \
227+
graph.yaml:application/yaml \
228+
--disable-path-validation
229+
```
230+
231+
For WASM modules, pass it with the `--artifact-type` flag:
232+
233+
```bash
234+
oras push <REGISTRY>/my-module:1.0.0 \
235+
--artifact-type application/vnd.module.wasm.content.layer.v1+wasm \
236+
module.wasm:application/wasm
237+
```
238+
239+
### CI/CD pipeline considerations
240+
241+
If you use automated pipelines to copy or promote artifacts between registries (for example, from a staging registry to a production registry), verify that the pipeline preserves OCI artifact metadata. Some tools strip or replace the config media type during transfer, which causes artifacts to silently disappear from the operations experience.
242+
243+
To verify that an artifact has the correct metadata after transfer, inspect its manifest:
244+
245+
```bash
246+
oras manifest fetch <REGISTRY>/my-graph:1.0.0 | jq '{mediaType, configMediaType: .config.mediaType}'
247+
```
248+
249+
The output should show:
250+
251+
```json
252+
{
253+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
254+
"configMediaType": "application/vnd.microsoft.aio.graph.v1+yaml"
255+
}
256+
```
257+
258+
If `configMediaType` shows a generic value like `application/vnd.oci.empty.v1+json`, the metadata was stripped and the artifact needs to be re-pushed with the correct flags.
259+
190260
## Related content
191261

192262
- [Develop WebAssembly modules](howto-develop-wasm-modules.md) for writing operators in Rust and Python (includes end-to-end quickstart)

0 commit comments

Comments
 (0)