vmware / build-tools-for-vmware-aria

Build Tools for VMware Aria provides development and release management tools for implementing automation solutions based on the VMware Aria Suite and VMware Cloud Director. The solution enables Virtual Infrastructure Administrators and Automation Developers to use standard DevOps practices for managing and deploying content.
Other
48 stars 24 forks source link

vrealize:push fails to populate configuration element of type array #460

Open tanguyr opened 1 month ago

tanguyr commented 1 month ago

Description

We have a config element that holds an array of strings. When we execute a vrealize:push with the flag -Dvro.packageImportConfigurationAttributeValues=true, the config element is created, but the attribute values are not populated. Other config elements in the same project have their values correctly populated

Steps to Reproduce

  1. This is my config element:
import { Configuration } from "vrotsc-annotations";

@Configuration({
    name: "HostnameValidation",
    path: "COMPANYNAME",
    attributes: {
        domainsList: {
            type: "Array/string",
            value: ["example.corp", "example.com"]
        }
    }
})
export class HostnameValidation { }
  1. I execute the command mvn clean package vrealize:push -P<profile> -Dlicense.skip -Dlicense.skipAddThirdParty=true -DskipInstallNodeDeps=true -Dvro.packageImportConfigurationAttributeValues=true -Dvro.packageImportConfigSecureStringAttributeValues=true

  2. In Orchestrator/Configurations:

    • I do see a configration "HostnameValidation"
    • It does contain a variable "domainsList"
    • That variable is empty

Expected behavior: I expect the domainsList variable to hold my two domains

Actual behavior:\ domainsList variable is empty

Reproduces how often: 100%

Component/s:

Affects Build/s: 2.43.0

Environment

Client

Server

akantchev commented 1 month ago

I was able to reproduce it as well with pushing within a windows environment.

Issue_460_Push_Result

unbreakabl3 commented 1 month ago

Working for me.

image

import { Configuration } from "vrotsc-annotations";

@Configuration({
  name: "power_settings",
  path: "my_path",
  attributes: {
    powerMin: {
      type: "number",
      value: "1",
      description: "Minimum power"
    },
    powerMax: {
      type: "number",
      value: "2",
      description: "Maximum power"
    },
    domainName: {
      type: "Array/string",
      value: ["domain.local", "test.test"],
      description: "Domain name"
    }
  }
})
export class MyClass {}