You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
About 3 months ago we implemented your solution (v0.18.1) and we're really happy with it, because it provides us with a way to have dynamic EC2 instances as self-hosted runners and free up resources for other things from our own on-prem machines.
@npalm thanks for your response. Yes, that workflow is using another workflow from the same repo, so that is definitely not the issue here.
I think I found out the reason behind this, after I re-checked the webhook lambda's logs:
So what I fail to understand is why doesn't the lambda recognize the 3 default labels for any linux OS runner: self-hosted, linux, and x86 ? (it seems it only recognizes self-hosted by default)
In our Terraform config we have defined 3 custom labels: aws-runner, ubuntu-18.04, and test.
But the lambda rejects a request that has labels self-hosted + linux because the label linux doesn't seem to be taken into consideration.
Am I missing something or is this the expected behavior?
Of course, at this time it is an easy thing to fix, we just always have to target the exact set of labels defined or a specific part of them, without introducing a label "unknown" to the lambda.
Or we can just add linux and x86 to our Terraform config. ¯\_(ツ)_/¯
The webhook is checking if the labels in the event are matching the configured labels. So in your case the labels aws-runner, ubuntu-18.04, and test should be used in the workflow triggering the build. The predefined github labels are ignored in the check. You can also set disable_check_wokflow_job_labels which should disable the label check and accept any workflow job event to the webhook.
The labels check is relative new, and was introduced together with the workflow job even.
Activity
npalm commentedon Dec 21, 2021
Yes, we have the reusable workflows / templates working. Did you grant org level access to the repo containing the shared workflow?
teodor-daskalov commentedon Dec 21, 2021
@npalm thanks for your response. Yes, that workflow is using another workflow from the same repo, so that is definitely not the issue here.
I think I found out the reason behind this, after I re-checked the webhook lambda's logs:
So what I fail to understand is why doesn't the lambda recognize the 3 default labels for any linux OS runner:
self-hosted,linux, andx86? (it seems it only recognizesself-hostedby default)In our Terraform config we have defined 3 custom labels:
aws-runner,ubuntu-18.04, andtest.But the lambda rejects a request that has labels
self-hosted+linuxbecause the labellinuxdoesn't seem to be taken into consideration.Am I missing something or is this the expected behavior?
Of course, at this time it is an easy thing to fix, we just always have to target the exact set of labels defined or a specific part of them, without introducing a label "unknown" to the lambda.
Or we can just add
linuxandx86to our Terraform config.¯\_(ツ)_/¯npalm commentedon Dec 21, 2021
The webhook is checking if the labels in the event are matching the configured labels. So in your case the labels aws-runner, ubuntu-18.04, and test should be used in the workflow triggering the build. The predefined github labels are ignored in the check. You can also set
disable_check_wokflow_job_labelswhich should disable the label check and accept any workflow job event to the webhook.The labels check is relative new, and was introduced together with the workflow job even.
teodor-daskalov commentedon Dec 22, 2021
Thanks a lot for the info! Btw, do you think all the configured labels have to be used in the workflow or one or two is enough?
npalm commentedon Dec 22, 2021
Actually, I doubt a bit about what to do with the labels. I even think to disable the check by default. So would suggest to siable them for now.
teodor-daskalov commentedon Dec 22, 2021
Alright, thanks very much for your help. I'll close this one.