devcontainers / devcontainers/action

Error using dependsOn in a feature

Open
#205 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
88
Forks
32
PR merge metrics
No merged PRs in 30d

Description

## Summary

We're building a devcontainer feature that includes a `dependsOn` another feature. This is causing failures using `@devcontainers/action` but seems to work with the devcontainers CLI.

The documentation says that `dependsOn` is a preview feature. Is there something I need to do to opt-in to preview features?

Our feature definition is here: https://github.com/radius-project/radius/blob/ae9d95267ce52193ef3cab6ae121faf43dea5a8f/deploy/devcontainer-feature/src/radcli/devcontainer-feature.json

## Successful output with CLI

I'm able to successfully package the feature with the CLI.

```txt
❯ devcontainer features package deploy/devcontainer-feature/src --output-folder ../../../testing -f
[550 ms] @devcontainers/cli 0.54.2. Node.js v21.3.0. darwin 23.1.0 arm64.
[550 ms] Packaging feature collection...
[551 ms] Processing feature: radcli...
[562 ms] Packaged 1 features!
```

## Failing with actions

The failing workflow is here: https://github.com/radius-project/radius/actions/runs/7183715348/workflow

Here's an example run: https://github.com/radius-project/radius/actions/runs/7183715348/job/19563129086

**Output:**

```txt
Run devcontainers/action@v1
with:
publish-features: true
base-path-to-features: ./deploy/devcontainer-feature/src
generate-docs: false
disable-schema-validation: false
validate-only: false
disable-repo-tagging: false
publish-templates: false
env:
GITHUB_TOKEN: ***
Validating Feature metadata...
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/onCreateCommand" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/onCreateCommand/additionalProperties" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/updateContentCommand" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/updateContentCommand/additionalProperties" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/postCreateCommand" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/postCreateCommand/additionalProperties" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/postStartCommand" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/postStartCommand/additionalProperties" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/postAttachCommand" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/postAttachCommand/additionalProperties" (strictTypes)
Error: (!) ERR: 'deploy/devcontainer-feature/src/radcli/devcontainer-feature.json' is not valid:
[
{
"instancePath": "",
"schemaPath": "#/additionalProperties",
"keyword": "additionalProperties",
"params": {
"additionalProperty": "dependsOn"
},
"message": "must NOT have additional properties"
},
{
"instancePath": "",
"schemaPath": "#/oneOf",
"keyword": "oneOf",
"params": {
"passingSchemas": null
},
"message": "must match exactly one schema in oneOf"
}
]
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.