• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SwissDataScienceCenter / renku-data-services
87%
main: 87%

Build:
Build:
LAST BUILD BRANCH: build/private-images
DEFAULT BRANCH: main
Repo Added 03 May 2023 08:52PM UTC
Files 331
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH v0.52.0
branch: v0.52.0
CHANGE BRANCH
x
Reset
  • v0.52.0
  • 000-add-copied-and-migrated-project-metrics
  • 649-fix-copy-project
  • add-pycharm-pytest-config
  • andrea/add-projects-migrated
  • andrea/add-user-preferences-for-dismiss-project-migration
  • andrea/fix-patch-image-secret
  • andrea/fix-total-groups-in-all-group
  • andrea/get-all-migrations
  • andrea/support-private-images
  • archive-envs
  • build-project-authz-disentangle
  • build/decouple-gitlab
  • build/external-resources-2
  • build/external-resources-cleanups
  • build/external-resources-cluster-entities
  • build/external-resources-demo
  • build/group-page-search-features
  • build/handle-private-images-from-gitlab
  • build/private-images
  • build/redirects
  • build/session-secrets
  • build/support-remote-sessions-hpc
  • bump-dependencies
  • bump-sanic-ext
  • bump-schemathesis
  • chore-add-coding-guidelines
  • chore-add-linting-rules-20250528
  • chore-add-pr-template
  • chore-fix-devcontainer-k9s-cli-feature
  • chore-improve-makefile
  • chore-improve-makefile-2
  • chore-narrower-security-context-for-sessions
  • chore-reduce-db-conn-pool-size
  • chore-remove-unused-code-to-20241210
  • chore-run-data-services-with-single-process
  • chore-run-server-in-single-process
  • chore-switch-to-azure-dev
  • chore-update-actions-to-1.18.1
  • chore-update-amalthea-schemas
  • chore-update-renku-action-c1.14.0
  • chore-update-renku-action-v1.14.0
  • chore-update-renku-action-v1.14.2
  • chore-update-renku-action-v1.15.0
  • chore-update-renku-action-v1.16.0
  • ciyer/autostart-banner
  • ciyer/redirects
  • ciyer/session-env-vars
  • ciyer/session-env-vars-fixes
  • ciyer/session-start-env-vars
  • cloudstorage-in-workdir
  • copy-project-documentation
  • copying-project-with-built-environments
  • data-svc-k8s-watcher
  • dependabot/github_actions/SwissDataScienceCenter/renku-actions-1.14.0
  • dependabot/github_actions/SwissDataScienceCenter/renku-actions-1.15.1
  • dependabot/github_actions/SwissDataScienceCenter/renku-actions-1.16.0
  • dependabot/github_actions/SwissDataScienceCenter/renku-actions-1.17.0
  • dependabot/github_actions/SwissDataScienceCenter/renku-actions-1.18.0
  • dependabot/github_actions/SwissDataScienceCenter/renku-actions-1.18.2
  • dependabot/github_actions/actions/checkout-5
  • dependabot/pip/poetry-04d8eb7f7e
  • dependabot/pip/poetry-834aac31ad
  • dependabot/pip/poetry-882466b6bd
  • dependencies-background-jobs-k8s-watcher
  • dependencies-remove-lazy-init
  • document-add-env-vars-528
  • eikek/background-process-deployment
  • eikek/ensure-solr-cores
  • eikek/fix-admin-usage
  • eikek/fix-project-search-update
  • eikek/fix-query-parser
  • eikek/fix-solr-devcontainer
  • eikek/improve-logging-setup
  • eikek/parallel-publish
  • eikek/project-copies-index
  • eikek/remove-dc-project-ref
  • eikek/reprovision-on-start
  • eikek/request-id-logging
  • eikek/search-data-connector
  • eikek/search-dc-project-namespace
  • eikek/search-global-dcs
  • eikek/search-query
  • eikek/search-query-manual
  • eikek/search-scenarios
  • eikek/search-sync
  • eikek/solr-models
  • eikek/solr-startup
  • eikek/testing
  • emtpy-head
  • feat-add-endpoint-to-get-v1-project-properties
  • feat-add-jupyter-buildpack
  • feat-add-missing-dc-namespace-endpoint
  • feat-add-project-as-dc-owner-pt2
  • feat-add-project-as-dc-owner-pt3
  • feat-add-project-as-dc-owner-pt4
  • feat-add-project-as-dc-owner-pt5
  • feat-add-project-as-dc-owner-pt6
  • feat-add-project-as-dc-owner-pt7
  • feat-add-project-as-dc-owner-pt8
  • feat-add-service-account-name-to-pools
  • feat-extend-image-check-endpoint
  • feat-run-notebooks-service
  • feat/custom-rclone-doi
  • feat/k8s-client-merge
  • feature/search-migration
  • fix-add-hibernation-thresholds-from-resource-pool
  • fix-add-memory-limits-to-all-sessions
  • fix-add-missing-slug-constraints
  • fix-add-server-default-to-migration-banner-field
  • fix-add-vendor-field-for-polybox-webdav-provider
  • fix-add-vendor-for-polybox-and-switchdrive
  • fix-apispec-merge
  • fix-as-casing-on-dockerfiles
  • fix-cache-watching-buildruns
  • fix-copy-data-connector-links-when-copying-projects
  • fix-creating-image-pull-secret
  • fix-creation-timestamp
  • fix-delete-anon-sessions-quickly-after-hibernating
  • fix-do-not-delete-project-when-dc-is-deleted
  • fix-do-not-skip-k8s-cache
  • fix-environment-args-setup
  • fix-expired-kc-tokens-in-tasks
  • fix-failing-manifest-resources-parsing
  • fix-flickering-sessions-on-deletion
  • fix-git-clone-mount-path-v1-sessions
  • fix-handle-missing-solr-core
  • fix-idle-times
  • fix-imports-in-test-suites
  • fix-improve-k8s-cache-efficiency
  • fix-k8s-watcher-bandit
  • fix-k8s-watcher-push
  • fix-keycloak-algorithms
  • fix-loading-kube-configs
  • fix-metrics-anonymous-indication
  • fix-migrate-copied-projects-environments
  • fix-patch-session-resources
  • fix-properly-handle-unknown-buildrun-status
  • fix-s3-customization
  • fix-send-authenticated-flag-to-posthog
  • fix-session-patching
  • fix-session-sync
  • fix-set-memory-limits-when-patching
  • fix-swagger-page-search-reprovisioning
  • fix-sync-k8s-caches
  • fix-update-poetry-devcontainer
  • fix-upgrade-buildpacks-0.0.6
  • fix-upgrade-kr8s
  • fix-uppercase-characters-validation-in-namespaces
  • fix-uppsercase-characters-in-slug-responses
  • fix-use-correct-gid-uid
  • flaky-schemathesis
  • get-clusters-changes
  • initial-envs
  • k8s-watcher-in-notebooks
  • kpack-resources
  • leaft/fix-renku-1-secret-filenames
  • leafty-build-push-action
  • leafty/852-tests
  • leafty/854-fix-bad-project-namespace
  • leafty/859-fix-dc-no-slug
  • leafty/974-gh-enterprise-server
  • leafty/975-add-sentry-release
  • leafty/982-no-v1-sessions
  • leafty/add-disk-size-session-envs
  • leafty/add-generic-oidc-integration
  • leafty/add-session-env-vars
  • leafty/add-shipwright-source-options
  • leafty/add-ttyd-option
  • leafty/allow-project-slug-update
  • leafty/buildrun-logs
  • leafty/buildruns-cache
  • leafty/clean-add-remote-resource-pool
  • leafty/cscs-firecrest-poc
  • leafty/define-buildrun-retention
  • leafty/doi-fix-keywords
  • leafty/exp-dev-naming
  • leafty/feat-add-support-rclone-doi
  • leafty/feat-tune-doi-mounts
  • leafty/fix-576
  • leafty/fix-580
  • leafty/fix-613
  • leafty/fix-712-git-repositories
  • leafty/fix-917
  • leafty/fix-921
  • leafty/fix-936
  • leafty/fix-941
  • leafty/fix-951
  • leafty/fix-963-remove-sftp-options
  • leafty/fix-bash-run
  • leafty/fix-build-from-code
  • leafty/fix-clashing-mount-points
  • leafty/fix-cloudstorage-in-workdir
  • leafty/fix-cpu-req-issue
  • leafty/fix-doi-tests
  • leafty/fix-doi-tests-2
  • leafty/fix-gh-action
  • leafty/fix-k8s-watcher
  • leafty/fix-pre-commit-hook
  • leafty/fix-print
  • leafty/fix-project-etag
  • leafty/fix-quiet-404
  • leafty/fix-session-order
  • leafty/fix-sftp-test-connection
  • leafty/session-api-proxy
  • leafty/session-builds-api
  • leafty/session-secrets-7
  • leafty/update-rclone-1-69
  • leafty/update-rclone-1.69.2
  • leafty/update-rclone-1.69.3
  • leafty/update-rclone-1.70.0
  • leafty/update-rclone-schema-doc
  • lorenzo/fix-acceptance-job
  • lorenzo/ingore-vscode-folder
  • lorenzo/relax-permissions-getbuild
  • lorenzo/single_table_global_connectors
  • lorenzo/update-ci
  • main
  • metrics-build
  • nix-setup-update
  • non-empty-list-changes
  • notebooks-catchup-1
  • notebooks-catchup-2
  • notebooks-catchup-3-cloud-storage
  • notebooks-catchup-4-pr-1984
  • notebooks-catchup-7-1923
  • olevski/feat-add-option-to-strip-prefix
  • olevski/fix-delete-if-secret-already-exists
  • olevski/fix-pinned-project-validation
  • olevski/fix-set-image-pull-policy
  • olevski/fix-will-delete-at-timestamp
  • olevski/handle-bad-refresh-token-in-connectors
  • olevski/handle-missing-pod-when-getting-logs
  • pinned-slug-regex
  • pitch/connect-renkulab-and-openbis-datasets
  • pitch/copy-projects-message
  • pitch/custom-environment-build
  • pitch/staging-table
  • posthog-metrics
  • private-resource-permission
  • product-metrics-k8s-cache
  • python-3.13
  • refactor-bg-jobs-to-data-tasks
  • refactor-configs
  • refactor-rclone-patches
  • remove-ide-file
  • remove-notebooks-datasvc-calls
  • remove-user-folder
  • revert-kr8s-20.7-update
  • sambuc-test-azure
  • sambuc/test-azure
  • search-feature-flag
  • search-metrics
  • sgaist/935-forbbid-cluster-change
  • sgaist/kpack-resources
  • shipwright-new-cache
  • snapshot-tests
  • snyk-scanning
  • stop-sending-redis-queue-messages
  • test-deploy-branch-wes-2025-06-18
  • undo-order-changes-in-apispec
  • update-email
  • update-kr8s-0-20-7
  • v0.0.1
  • v0.0.2
  • v0.0.3
  • v0.1.0
  • v0.1.1
  • v0.10.0
  • v0.11.0
  • v0.13.0
  • v0.14.0
  • v0.14.1
  • v0.15.0
  • v0.15.1
  • v0.16.0
  • v0.16.1
  • v0.17.0
  • v0.18.0
  • v0.19.1
  • v0.2.0
  • v0.2.1
  • v0.2.2
  • v0.2.3
  • v0.20.0
  • v0.21.0
  • v0.22.0
  • v0.23.0
  • v0.24.0
  • v0.24.1
  • v0.24.2
  • v0.25.0
  • v0.26.0
  • v0.27.0
  • v0.27.1
  • v0.28.0
  • v0.29.0
  • v0.3.0
  • v0.30.0
  • v0.31.0
  • v0.31.1
  • v0.32.0
  • v0.33.0
  • v0.34.0
  • v0.35.0
  • v0.35.1
  • v0.35.2
  • v0.36.0
  • v0.37.0
  • v0.37.1
  • v0.38.0
  • v0.39.0
  • v0.4.0
  • v0.40.0
  • v0.41.0
  • v0.42.0
  • v0.43.0
  • v0.43.1
  • v0.43.2
  • v0.44.0
  • v0.45.0
  • v0.46.0
  • v0.47.0
  • v0.47.1
  • v0.48.0
  • v0.48.1
  • v0.49.0
  • v0.5.0
  • v0.5.1
  • v0.5.2
  • v0.50.0
  • v0.51.0
  • v0.53.0
  • v0.53.1
  • v0.53.2
  • v0.54.0
  • v0.55.0
  • v0.56.0
  • v0.6.0
  • v0.7.0
  • v0.8.0
  • v0.8.1
  • v0.8.2
  • v0.8.3
  • v0.9.0
  • validate-docker-names

25 Jul 2025 12:08PM UTC coverage: 87.214% (+0.001%) from 87.213%
16621300066

push

github

web-flow
fix: refactor get_all_project_copies for performance reasons (#940)

The implementation had some issues that make it slow:

- It doesn't implement any paging, so we are potentially transporting
  a lot of data. This is not fixed in this PR.

- At very first, it retrieves *all* copied projects for a given
  template_id and then filters it in memory to retain only the
  accessible ones of the current user.

  This is done by next retrieving all project ids the user has access
  to, including all public ones. This is potentially returning a lot
  of data.

  The filtering then continues to loop through the database objects
  and checks each id for membership in the `project_ids` list. A
  python list has O(n) time for membership tests, so depending on the
  number of results this gets slow quite quickly.

Measuring this call shows that by far the longest time is spent
filtering:
```python
[p for p in project_orms if p.id in project_ids]
```
It can quickly get to multi-seconds response time, if the data is a
bit larger.

The improvements involve the following:

- Exchange order of retrieval: first get all accessible project ids,
  except those for public projects. This can reduce the resulting set of
  ids to check against as it doesn't contain public entities.

- With these ids, the SQL query is constructed to only return projects
  whose ids are in this set. If the scope is read, then the condition
  includes all public ones and the ones the user has more specific
  access to.

In my measurements on my machine with a generated data set of 2000
project copies, these changes resulted in 10x faster response times.

9 of 9 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

21644 of 24817 relevant lines covered (87.21%)

1.53 hits per line

Relevant lines Covered
Build:
Build:
24817 RELEVANT LINES 21644 COVERED LINES
1.53 HITS PER LINE
Source Files on v0.52.0
  • Tree
  • List 325
  • Changed 14
  • Source Changed 1
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
16621300066 v0.52.0 fix: refactor get_all_project_copies for performance reasons (#940) The implementation had some issues that make it slow: - It doesn't implement any paging, so we are potentially transporting a lot of data. This is not fixed in this PR. - At ... push 30 Jul 2025 11:39AM UTC web-flow github
87.21
See All Builds (2933)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc