Open akomakom opened 2 years ago
Thanks for the report, we will investigate. If you think the patch you applied fixes the issue, maybe you want to send a PR with it?
hi again @akomakom , i have been trying to reproduce the error but to no avail: with a hiera config like:
github_actions_runner::ensure: present
github_actions_runner::instances:
mistica-android:
repo_name: 'mistica-android'
labels:
- self-hosted-novum
- linux
- exclusive-runner
- more-labels
and module version 0.10.0:
mod 'github_actions_runner',
:git => 'https://github.com/Telefonica/puppet-github-actions-runner',
:ref => '0.10.0'
I get no errors, and I see that labels are correctly created:
Info: Applying configuration version '1665129316'
Notice: /Stage[main]/Github_actions_runner/Github_actions_runner::Instance[mistica-android]/File[/srv/actions-runner-2.292.0/mistica-android/configure_install_runner.sh]/content:
--- /srv/actions-runner-2.292.0/mistica-android/configure_install_runner.sh 2022-10-07 07:48:47.632754123 +0000
+++ /tmp/puppet-file20221007-824-159v7w1 2022-10-07 07:55:40.118202424 +0000
@@ -24,7 +24,7 @@
--name jenkinsslave-prod-10-mistica-android \
--url https://github.com/Telefonica/mistica-android \
--token ${TOKEN} \
- --labels self-hosted-novum,linux &>/dev/null
+ --labels self-hosted-novum,linux,exclusive-runner,more-labels &>/dev/null
Can I have some more instructions to reproduce the error?
I am not using hiera, and I'm on github enterprise (unlikely to matter).
Simple example:
$labels = split("one two three", ' ')
notify{"Using labels value ${labels}":}
class { 'github_actions_runner':
..... ,
instances => {
'main' => {
org_name => 'MyOrg',
labels => $labels,
}
}
}
This seems invalid - current code looks fine to me.
After upgrading from 0.4.0 to 0.10.0 I had to (locally) change this line: https://github.com/Telefonica/puppet-github-actions-runner/blob/5efef4c6146f484cd6d1fd097bdb44e656c62e16/manifests/instance.pp#L69
There seemed to be no way to specify labels. I'm guessing that a valid parameter would be:
but what it would actually do with it I did not check. After correcting the code, I was able to use a flat array as a parameter: