-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add benchmark workflow and set benchmark_path
for Falco
#124
Conversation
7f7edab
to
5e55ccc
Compare
benchmark_path
for Falco
3475dbb
to
25723b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks good, only added a suggestion
Issue from running the pipeline manually: https://github.com/cncf-tags/green-reviews-tooling/actions/runs/11462226390/job/31893194549#step:2:26 |
Yes we might need to remove the version thing from here or specify the full path as specified in the option 1 for example also another question are we expecting that all the workflows we are going to specify under |
Actually don't have perms so adding the patch file here 😄 commit e29fb40a080acb1a8c511c8cbe419669c6d5ea79
Author: Dipankar Das <[email protected]>
Date: Wed Oct 23 22:04:06 2024 +0530
added extra input field for the benchmark pipeline
Signed-off-by: Dipankar Das <[email protected]>
diff --git a/.github/workflows/benchmark-pipeline.yaml b/.github/workflows/benchmark-pipeline.yaml
index dab9a63..567ab66 100644
--- a/.github/workflows/benchmark-pipeline.yaml
+++ b/.github/workflows/benchmark-pipeline.yaml
@@ -6,6 +6,9 @@ on:
cncf_project:
description: Project to be deployed e.g. falco
required: true
+ full_repo_name:
+ description: Full name of the repository e.g. falcosecurity/falco
+ required: true
config:
description: Configuration if project has multiple variants they wish to test e.g. ebpf
required: false
@@ -69,7 +72,7 @@ jobs:
steps:
- uses: jenseng/dynamic-uses@v1
with:
- uses: ${{ inputs.benchmark_path }}@${{ github.ref_name }}
+ uses: ${{ inputs.full_repo_name }}/${{ inputs.benchmark_path }}@${{ github.ref_name }}
delete:
runs-on: ubuntu-22.04
diff --git a/scripts/project-trigger.sh b/scripts/project-trigger.sh
index 7f74a86..ef3b5a2 100755
--- a/scripts/project-trigger.sh
+++ b/scripts/project-trigger.sh
@@ -50,7 +50,7 @@ jq -c '.projects[]' "$json_file" | while read -r project; do
-H "Authorization: Bearer $gh_token" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$workflow_organization_name/$workflow_project_name/actions/workflows/$workflow_dispatcher_file_name/dispatches" \
- -d "{\"ref\":\"${git_ref}\",\"inputs\":{\"cncf_project\":\"${proj_name}\",\"config\":\"\",\"version\":\"${latest_proj_version}\"}}")
+ -d "{\"ref\":\"${git_ref}\",\"inputs\":{\"full_repo_name\":\"${proj_organization}/${proj_name}\",\"cncf_project\":\"${proj_name}\",\"config\":\"\",\"version\":\"${latest_proj_version}\"}}")
status_code=$?
if [ $status_code -ne 0 ]; then
@@ -68,7 +68,7 @@ jq -c '.projects[]' "$json_file" | while read -r project; do
-H "Authorization: Bearer $gh_token" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$workflow_organization_name/$workflow_project_name/actions/workflows/$workflow_dispatcher_file_name/dispatches" \
- -d "{\"ref\":\"${git_ref}\",\"inputs\":{\"cncf_project\":\"${proj_name}\",\"config\":\"${config}\",\"version\":\"${latest_proj_version}\"}}")
+ -d "{\"ref\":\"${git_ref}\",\"inputs\":{\"full_repo_name\":\"${proj_organization}/${proj_name}\",\"cncf_project\":\"${proj_name}\",\"config\":\"${config}\",\"version\":\"${latest_proj_version}\"}}")
status_code=$?
if [ $status_code -ne 0 ]; then Try this out |
4229a0d
to
7a8b172
Compare
Signed-off-by: nikimanoledaki <[email protected]>
Signed-off-by: nikimanoledaki <[email protected]>
7a8b172
to
14c47f5
Compare
Signed-off-by: nikimanoledaki <[email protected]>
14c47f5
to
b8709dd
Compare
@@ -3,7 +3,7 @@ | |||
{ | |||
"name": "falco", | |||
"organization": "falcosecurity", | |||
"benchmark_path": "", | |||
"benchmark_path": "./.github/workflows/benchmark-workflows/falco.yml", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"benchmark_path": "./.github/workflows/benchmark-workflows/falco.yml", | |
"benchmark_path": "cncf-tags/green-reviews-tooling/.github/workflows/benchmark-workflows/falco.yml", |
dynamic-uses
wants the workflow name to be fully qualified.
Hey @nikimanoledaki @locomundo @dipankardas011 @vallss I'm late to the party but I found some time to look at this. I couldn't get it working but I'm a bit clearer on the problems. For the workflow reference usually So the pipeline input should be The problem is the run still fails :( and seems we are hitting this jenseng/dynamic-uses#9
If we can fix the problem with |
Yes the problem is this dynamic one works like what we expect the action/checkout where it is a repo and in that repo it has action.yml and it tries to use it so if we see more closely the source of this I might be wrong will check again ;) |
Yes, then only we can make it fully resolvable as our design was to make outside repo workflows as well If the dynamic job dispatch doesn't work we can easily switch basck to Or Programmatically, can use program of our choice to dispatch the workflows, seems like dagger might be interesting thought as well 😄 @rossf7 WDYT? |
@dipankardas011 Good catch that dynamic-uses expects there to be an action.yml in the root. It does look like it has a slightly different use case and I'm not sure trying to adapt it to our use case makes sense. I think restructuring the workflows so we can use Not the most elegant solution but I'd prefer we solve this with GH actions without higher level tooling like Dagger. At least until we've run out of options with actions :) |
Unable to understand this workaround, sorry for that 😄 |
@dipankardas011 Sorry it wasn't clear. It was just an idea to use conditionals instead of dynamic uses but not sure it makes sense! I think it will be easier to discuss in a call and we have the mob pairing session on Wednesday. |
Closing in favour of #127 🚀 |
What type of PR is this?
kind/feature
What this PR does / why we need it:
benchmark_path
pointing at the benchmark workflow that will run the benchmark job and test stepsWhich issue(s) this PR fixes:
Addresses part of #121