p4a scan chocolatey packages fails

This forum is for the discussions and support for the Chocolatey For Automate plugin. Inside you will find the Documentation Project forum that describes the operation of the plugin.
Post Reply
frankbe
Posts: 54
Joined: Thu Jun 13, 2019 2:48 pm
6

p4a scan chocolatey packages fails

Post by frankbe »

Hi,
just notices that the script fails in line 47 with a sql error

CREATE TEMPORARY TABLE temp_versions (repoName VARCHAR(255), Version VARCHAR(255));
INSERT INTO temp_versions (repoName, Version) VALUES @VERSIONS@;
UPDATE plugin_p4a_chocolatey_applications AS main JOIN temp_versions AS temp ON main.repoName = temp.repoName SET main.Version = temp.Version;
DROP TEMPORARY TABLE temp_versions;

script version ist 3.7.0.21

User avatar
Cubert
Posts: 2704
Joined: Tue Dec 29, 2015 7:57 pm
9
Contact:

Re: p4a scan chocolatey packages fails

Post by Cubert »

Then something above the SQL call has failed.

The SQL Code uses a LTScript Variable called "@VERSIONS@" to complete the SQL query.

Code: Select all

CREATE TEMPORARY TABLE temp_versions (repoName VARCHAR(255), Version VARCHAR(255));
INSERT INTO temp_versions (repoName, Version) VALUES @VERSIONS@;
UPDATE plugin_p4a_chocolatey_applications AS main JOIN temp_versions AS temp ON main.repoName = temp.repoName SET main.Version = temp.Version;
DROP TEMPORARY TABLE temp_versions;

@VERSIONS@ should equal something like the following -> ('packageName1','1.2.3'),('packageName2','2.3.4')



There is a test at line 46 that should cause script to exit without executing SQL if the ending " ')" is missing from @VERSIONS@ so if @VERSIONS@ does not exist this will catch that.

Screenshot 2025-06-26 102520.png
Screenshot 2025-06-26 102520.png (53.02 KiB) Viewed 2647 times


If it continues, add a scriptlog line under line 46 but before SQL line 47 to print out @VERSIONS@ to script log. Lets see what that data looks like.

frankbe
Posts: 54
Joined: Thu Jun 13, 2019 2:48 pm
6

Re: p4a scan chocolatey packages fails

Post by frankbe »

strange, the errors are gone.
On 24th of june i had errors on almost every agent.
since yesterday all scripts work without errors.
I'll watch this.

User avatar
Cubert
Posts: 2704
Joined: Tue Dec 29, 2015 7:57 pm
9
Contact:

Re: p4a scan chocolatey packages fails

Post by Cubert »

Well that could be expected..

The plugin when first installed has to go through a few days to get all the computers up and installed with the latest Chocolatey and get scans completed. If there are going to be issues, it will be during this time. (agents failing to install choco for one reason or another).

Post Reply

Return to “Chocolatey For Automate”