Skip to content

Commit 9eda961

Browse files
committed
Add Registry artifact requirements section
Dedicated section explaining how DOE discovers artifacts via OCI config media type, required media types table, CI/CD pipeline considerations, and how to verify artifact metadata with oras manifest fetch.
1 parent 9b5a66a commit 9eda961

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

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

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,64 @@ See [Develop WebAssembly modules for data flow graphs](../develop-edge-apps/howt
199199
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).
200200

201201

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+
202260
## Related content
203261

204262
- [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)