Skip to content

Conversation

@dipankardas011
Copy link
Contributor

What type of PR is this?

kind/feature

What this PR does / why we need it:

This pull request introduces significant updates to the benchmarking pipeline, including dependency upgrades, Prometheus integration for metrics collection, and configuration changes. The most important changes are grouped below by theme.

Dependency and version upgrades:

  • Upgraded Dagger engine versions in .github/workflows/benchmark-pipeline-test.yml and .github/workflows/benchmark-pipeline.yaml from 0.15.4 to 0.16.1. ([[1]](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-d9c934bf74594c45f654a9bcdab4f25a8d9dbbb3367de4472cc7c6784aa748e7L14-R14), [[2]](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-7f28765429fc267e45f03a1a5fd941e11c69d6ec082e7239a26d49c57a7454bfL56-R56))
  • Updated dagger.json to use engine version v0.18.9. ([dagger.jsonL3-R3](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-e964604c425d3c5c8d0ae8c344aab349365451280b00c3d3e0840e50aec859c9L3-R3))
  • Upgraded dependencies in go.mod, including gqlgen, genqlient, otel, and Prometheus libraries. Added new indirect dependencies like json-iterator/go and modern-go/concurrent. ([[1]](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6L6-R25), [[2]](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6R34-R47))

Metrics collection integration:

  • Added Prometheus client integration in pkg/pipeline/prom_query.go to enable querying metrics with time ranges. ([pkg/pipeline/prom_query.goR1-R56](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-abd34464b28f4eccce349ee4295767327b4756eb365755f6e5cd7decb058cfd0R1-R56))
  • Implemented computeBenchmarkingResults in pkg/pipeline/metrics.go to collect and process benchmarking metrics such as CPU usage and memory consumption using Prometheus queries. ([pkg/pipeline/metrics.goR1-R70](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-bcd4d47a171e6ad6247e36ee29e906142413a93b35ca0486815f992688dc9935R1-R70))
  • Integrated Prometheus metrics collection into the benchmarking pipeline in pkg/pipeline/benchmark.go. ([pkg/pipeline/benchmark.goR57-R67](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-e7e55efd9a4a470f3778ca87e80157deca63a9b2c00ce2214747da037d75daeeR57-R67))

Configuration improvements:

  • Increased timeout for pod readiness in the Makefile from 60s to 120s and added a success message after installation. ([MakefileL26-R34](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L26-R34))
  • Removed unused source field from dagger.json. ([dagger.jsonL13-R13](https://github.com/cncf-tags/green-reviews-tooling/pull/186/files#diff-e964604c425d3c5c8d0ae8c344aab349365451280b00c3d3e0840e50aec859c9L13-R13))

Which issue(s) this PR fixes:

Fixes #159

data looked something like this

2025-05-29_23-00

Special notes for your reviewer (optional):

Co-authored-by: AntonioDiTuri <[email protected]>
Signed-off-by: Dipankar Das <[email protected]>
@dipankardas011 dipankardas011 requested a review from a team as a code owner August 6, 2025 14:58
Copy link
Contributor

@rossf7 rossf7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dipankardas011 This is looking good 🙌

Thank you for opening the new PR and sorry my feedback is late here

@rossf7
Copy link
Contributor

rossf7 commented Aug 13, 2025

One thing to mention the prometheusURL also needs to be set in the benchmark workflow but I don't think we can use the service URL because the pipeline is running outside the bare metal cluster.

https://github.com/cncf-tags/green-reviews-tooling/blob/main/.github/workflows/benchmark-pipeline.yaml#L111-L118

I think we should be able to use port forwarding for this. I can do some investigation on that.

Refer: cncf-tags#186 (comment)

Signed-off-by: Dipankar Das <[email protected]>
- Updated Prometheus queries in benchmarking to include the
  `green-software.foundation/project` label for more granular metrics
  collection.
- Passed `cncfProject` parameter through benchmarking pipeline.
- Added the project label to Falco deployment YAMLs for correct metrics
  attribution.
- Bumped Dagger version to 0.18.17 in workflows and config.

Signed-off-by: Dipankar Das <[email protected]>
@dipankardas011
Copy link
Contributor Author

dipankardas011 commented Sep 7, 2025

Updates
added the filtering in the promql. Unfortunately unable to test it on local due to weird dagger unable to find kubeconfig error

If you guys can check and let me know
cc @rossf7 , @AntonioDiTuri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collect project metrics through Prometheus client

2 participants