Skip to content
Snippets Groups Projects

Add clusterAgents field to Project/Group/Security Dashboard GraphQL API

What does this MR do and why?

We're adding ability to filter vulnerabilities based on Kubernetes Agent, so you will be able to see vulnerabilities created for selected cluster (using cluster-image-scanning capabilities).

Queries

Group query

explain SELECT "cluster_agents".* FROM "cluster_agents" WHERE "cluster_agents"."project_id" IN (SELECT "projects"."id" FROM "projects" WHERE "projects"."namespace_id" IN (WITH RECURSIVE "base_and_descendants" AS ((SELECT "namespaces"."id" FROM "namespaces" WHERE "namespaces"."type" = 'Group' AND "namespaces"."id" = 9970)
UNION
(SELECT "namespaces"."id" FROM "namespaces", "base_and_descendants" WHERE "namespaces"."type" = 'Group' AND "namespaces"."parent_id" = "base_and_descendants"."id")) SELECT "namespaces"."id" FROM "base_and_descendants" AS "namespaces"))
Summary:
Time: 531.206 ms
  - planning: 9.113 ms
  - execution: 522.093 ms
    - I/O read: 491.574 ms
    - I/O write: 0.000 ms

Shared buffers:
  - hits: 10216 (~79.80 MiB) from the buffer pool
  - reads: 1356 (~10.60 MiB) from the OS file cache, including disk I/O
  - dirtied: 186 (~1.50 MiB)
  - writes: 0

Details and visualization: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/10542/commands/37862.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to GraphQL filter for vulnerabilities by container... (#358763 - closed)

Edited by Alan (Maciej) Paruszewski

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added databaseapproved label and removed databasereviewed label

  • Steve Abrams approved this merge request

    approved this merge request

  • Steve Abrams removed review request for @sabrams

    removed review request for @sabrams

  • Sashi Kumar Kumaresan requested review from @terrichu and removed review request for @sashi_kumar

    requested review from @terrichu and removed review request for @sashi_kumar

  • added 1 commit

    Compare with previous version

  • mentioned in merge request !90187 (merged)

  • added 1 commit

    • f4d4c9ea - Delete not-needed spec as it was duplicate

    Compare with previous version

  • Terri Chu requested review from @axil

    requested review from @axil

  • Sashi Kumar Kumaresan approved this merge request

    approved this merge request

  • Terri Chu
  • Terri Chu
  • Terri Chu removed review request for @terrichu

    removed review request for @terrichu

  • added 1 commit

    Compare with previous version

  • requested review from @dblessing

  • removed review request for @dblessing

  • requested review from @dblessing and @terrichu

  • added 1261 commits

    Compare with previous version

  • Achilleas Pipinellis approved this merge request

    approved this merge request

  • Achilleas Pipinellis removed review request for @axil

    removed review request for @axil

  • 🤖 GitLab Bot 🤖 changed milestone to %15.2

    changed milestone to %15.2

  • added 1 commit

    • 540e8e98 - Remove read_cluster permission from instance dashboard

    Compare with previous version

  • Terri Chu removed review request for @dblessing

    removed review request for @dblessing

  • Terri Chu approved this merge request

    approved this merge request

  • @mparuszewski thanks for applying the feedback, I'm going to approve and set mwps

  • Terri Chu added workflowin review label and removed workflowin dev label

    added workflowin review label and removed workflowin dev label

  • Terri Chu resolved all threads

    resolved all threads

  • Terri Chu enabled an automatic merge when the pipeline for daca503d succeeds

    enabled an automatic merge when the pipeline for daca503d succeeds

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading