Skip to content

Commit

Permalink
Merge pull request #435 from vmware/bugfix/427-missing-exec-package
Browse files Browse the repository at this point in the history
[vrdt,packages] (#427) Restore missing `exec` package required for `Run vRO Action` VScode command
  • Loading branch information
VenelinBakalov authored Oct 1, 2024
2 parents b7abed3 + 0efa811 commit 5eff382
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 33 deletions.
19 changes: 19 additions & 0 deletions docs/versions/latest/Release.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@
[//]: # (Optional But highly recommended Specify *NONE* if missing)
[//]: # (#### Relevant Documentation:)

### Restored missing 'exec' module

The error when running an Action in VRDT UI was resolved by restoring the 'exec' module in 'packages'.

#### Previous Behavior

In VS Code with the vRealize Developer Tools plugin installed, when the 'Run vRO Action' command was issued via the UI kebab menu of a JS/TS Action, an error appeared in the OUTPUT of the type:

```log
# Running getVmWithTag.js
# An error occurred: Could not import exec package into vRO: Command 'mvn dependency:copy -Dartifact=com.vmware.pscoe.o11n:exec::package -DoutputDirectory="/Users/user/Library/Application Support/Code/User/globalStorage/vmware-pscoe.vrealize-developer-tools" -Dmdep.stripVersion=true ' exited with code 1
```

The 'com.vmware.pscoe.o11n:exec' package was missing when building the build tools.

#### New Behavior

The 'com.vmware.pscoe.o11n:exec' package is no longer missing when built. The error above no longer appears when running an Action via VRDT UI.

## Upgrade procedure

[//]: # (Explain in details if something needs to be done)
7 changes: 6 additions & 1 deletion maven/repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,12 @@
<artifactId>maven-plugin-api</artifactId>
<version>3.9.2</version>
</dependency>

<dependency>
<groupId>com.vmware.pscoe.o11n</groupId>
<artifactId>exec</artifactId>
<type>package</type>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
38 changes: 38 additions & 0 deletions packages/exec/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# macOS
.DS_Store

# Logs
logs
*.log

# Maven
target/

# VSCode
.vscode/

# IntelliJ IDEA
out/
dist/
.idea/
*.iml

# Eclipse
.settings/
.project
.classpath

# Sonar
.sonarlint/

# vRO local hint info and logs
.o11n/

# vRO Package Meta Inf - Autogenerated
**/META-INF/dunes-meta-inf.xml

# Ignore release script output files
release.properties
*xml.releaseBackup
package.json
package-lock.json
35 changes: 35 additions & 0 deletions packages/exec/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.vmware.pscoe.o11n</groupId>
<artifactId>xml-package</artifactId>
<version>${revision}</version>
<relativePath>../../maven/base-package/xml-package/pom.xml</relativePath>
</parent>

<groupId>com.vmware.pscoe.o11n</groupId>
<artifactId>exec</artifactId>
<packaging>package</packaging>

<licenses>
<license>
<name>BSD-2 License</name>
<url>https://github.com/vmware/build-tools-for-vmware-aria/tree/main/licenses/bsd2_license</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<developerConnection>${scmDeveloperConnection}</developerConnection>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<inherited>false</inherited>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Exported from PSCoE o11n-convert</comment>
<entry key="categoryPath">PSCoE.Library.vRO.Exec</entry>
<entry key="name">Run Script</entry>
<entry key="type">Workflow</entry>
<entry key="id">98568979-76ed-4a4a-854b-1e730e2ef4f1</entry>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version='1.0' encoding='UTF-8'?>
<workflow xmlns="http://vmware.com/vco/workflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://vmware.com/vco/workflow http://vmware.com/vco/workflow/Workflow-v4.xsd" root-name="item1" object-name="workflow:name=generic" id="98568979-76ed-4a4a-854b-1e730e2ef4f1" version="1.1.0" api-version="6.0.0" allowed-operations="evf" restartMode="1" resumeFromFailedMode="0">
<display-name><![CDATA[Run Script]]></display-name>
<position y="50.0" x="100.0"/>
<input>
<param name="script" type="string"/>
<param name="printInOutput" type="boolean"/>
</input>
<output>
<param name="output" type="string"/>
</output>
<workflow-item name="item0" type="end" end-mode="0">
<position y="45.40909090909091" x="384.5"/>
</workflow-item>
<workflow-item name="item1" out-name="item0" type="task">
<display-name><![CDATA[Scriptable task]]></display-name>
<script encoded="false"><![CDATA[if (printInOutput) {
output = "";
function wrap(original, severity) {
return function(message) {
var timestamp = new Date().toISOString();
output += "[" + timestamp + "] [" + severity + "] " + message + "\n";
original(message);
}
}
System.debug = wrap(System.debug, "debug");
System.log = wrap(System.log, "info");
System.warn = wrap(System.warn, "warning");
System.error = wrap(System.error, "error");
try {
eval(script);
} catch (e) {
System.error(e.message);
}
} else {
eval(script);
}]]></script>
<in-binding>
<bind name="script" type="string" export-name="script"/>
<bind name="printInOutput" type="boolean" export-name="printInOutput"/>
</in-binding>
<out-binding>
<bind name="output" type="string" export-name="output"/>
</out-binding>
<position y="55.40909090909091" x="204.5"/>
</workflow-item>
<presentation>
<p-param name="script">
<desc><![CDATA[script]]></desc>
<p-qual kind="static" name="mandatory" type="boolean"><![CDATA[true]]></p-qual>
<p-qual name="textInput" type="void"><![CDATA[__NULL__]]></p-qual>
</p-param>
<p-param name="printInOutput">
<desc><![CDATA[printInOutput]]></desc>
</p-param>
</presentation>
</workflow>
10 changes: 10 additions & 0 deletions packages/exec/src/main/resources/dunes-meta-inf.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment></comment>
<entry key="pkg-description"></entry>
<entry key="pkg-name">${groupId}.${artifactId}-${project.version}</entry>
<entry key="used-plugins"></entry>
<entry key="pkg-owner"></entry>
<entry key="pkg-id">1923972837134578978903412456577823587</entry>
</properties>
65 changes: 33 additions & 32 deletions packages/pom.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>iac</artifactId>
<groupId>com.vmware.pscoe</groupId>
<version>${revision}</version>
</parent>

<groupId>com.vmware.pscoe.iac</groupId>
<artifactId>packages</artifactId>
<packaging>pom</packaging>
<groupId>com.vmware.pscoe.iac</groupId>
<artifactId>packages</artifactId>
<packaging>pom</packaging>

<modules>
<module>ecmascript</module>
<module>polyglot-wrapper</module>
</modules>
<modules>
<module>ecmascript</module>
<module>exec</module>
<module>polyglot-wrapper</module>
</modules>

<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</build>
<scm>
<developerConnection>scm:git:ssh://[email protected]:vmware/build-tools-for-vmware-aria.git</developerConnection>
<tag>HEAD</tag>
</scm>
<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</build>
<scm>
<developerConnection>scm:git:ssh://[email protected]:vmware/build-tools-for-vmware-aria.git</developerConnection>
<tag>HEAD</tag>
</scm>
</project>

0 comments on commit 5eff382

Please sign in to comment.