Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • lava lava
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 90
    • Issues 90
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 48
    • Merge requests 48
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lava
  • lavalava
  • Merge requests
  • !1942

Open
Created Jan 17, 2023 by Igor Ponomarev@igo95862Contributor
  • Report abuse
Report abuse

Add option to disable viewing groups filter

  • Overview 1
  • Commits 1
  • Changes 6

Disabling viewing groups will increase the query performance between 30 to 50 times.

Benchmarks of /scheduler/alljobs path:

Anon-user viewing groups enabled (102.588 ms): https://explain.depesz.com/s/B9oj

Anon-user viewing groups disabled (1.441 ms): https://explain.depesz.com/s/OEDi

User viewing groups enabled (140.476 ms): https://explain.depesz.com/s/81wD

User viewing groups disabled (2.444 ms): https://explain.depesz.com/s/Myxj

Viewing groups can have around 20-50 times performance penalty on job filters.

Add new option PERMISSION_VIEWING_GROUPS_ENABLED which when set to False will disable viewing groups filtering.

This might make certain jobs be visible to public. To check that a new management command has been added. check-permissions With an argument viewing_groups it will show amount of affected jobs and how many of them are finished.

When viewing groups are disabled submitting a new job with viewing groups will raise a SubmissionException to prevent accidentaly adding a public job. There is a unit test to verify that behavior.

Edited Jan 19, 2023 by Igor Ponomarev
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: disable-viewing-groups-option