Skip to content

Error using dependsOn in a feature #205

@rynowak

Description

@rynowak

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.

❯ 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:

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"
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions