dappnode / DAppNodeSDK

dappnodesdk is a tool to mantain dappnode packages. It helps to initialize and publish an Aragon Package Manager Repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup wizard: Service schema for environment variables is wrong

dszlachta opened this issue · comments

Both the documentation and src/files/setupWizard/types.ts state that service field for an environment variable can be either a string or array of strings:

target:
  type: environment
  name: PAYOUT_ADDRESS
  service: [service1, service2, service2]

But, the schema defined in src/schemaValidation/schemas/setup-wizard.schema.json defines service only as string. So, it is impossible to build a package that has multiple services defined for a single environment variable.

To Reproduce

Steps to reproduce the behavior:

  1. Install version 0.2.61 or master
  2. Set this setup wizard option:
target:
  type: environment
  name: PAYOUT_ADDRESS
  service: [service1, service2, service2]
  1. Do this action: dappnodesdk build
  2. See error
 ✖ Invalid setupWizard: 
  - setupWizard#.properties.fields.items.properties.target.oneOf.0.properties.service.type must be string

Expected behavior

The build passes.

Screenshots

DAppNode version:

Core DAppNode Packages versions

bind.dnp.dappnode.eth: 0.2.6
core.dnp.dappnode.eth: 0.2.49
dappmanager.dnp.dappnode.eth: 0.2.44, commit: 7c9a6772
https.dnp.dappnode.eth: 0.1.1
ipfs.dnp.dappnode.eth: 0.2.15
vpn.dnp.dappnode.eth: 0.2.8, commit: f9a8743e
wifi.dnp.dappnode.eth: 0.2.8
wireguard.dnp.dappnode.eth: 0.1.0

System info

dockerComposeVersion: 1.25.5
dockerServerVersion: 20.10.6
dockerCliVersion: 20.10.6
os: debian
versionCodename: bullseye
architecture: amd64
kernel: 5.10.0-8-amd64
Disk usage: 43%
  • Package version: N/A
  • OS: DAppNode
  • Browser: N/A

Additional context

I will post a PR with a fix

Duplicate of #238