1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00
Commit Graph

296 Commits

Author SHA1 Message Date
Jordi Piriz
747d1694cd revert: tracing improving otlp handling (PROJQUAY-8902) (#4438)
Revert "tracing: improving otlp handling (PROJQUAY-8902) (#4198)"

This reverts commit 89e758846f.
2025-11-03 16:17:32 +01:00
Shubhra Deshpande
aa1188024d sentry: added additional filtering for sentry events (PROJQUAY-9436) (#4418)
* sentry: added additional filtering for sentry events


---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-10-31 09:42:23 -04:00
Asgeir Storesund Nilsen
d0f45ad375 notifications: Support slash in repository names (PROJQUAY-7538) (#3778)
* notifications: Support slash in repository names (PROJQUAY-7538)

Fix for PROJQUAY-7538 discussed in #3069 by only considering the first slash when separating namespace and repository.

* Test and devcontainer

* Remove devcontainer.json

* Revert irrelevant test change.
2025-10-30 09:53:46 -04:00
Brandon Caton
54b52901ec ui: adding DISABLE_ANGULAR_UI config param (PROJQUAY-9590) (#4385)
* ui: removing default ui check

* ui: add option to disable angular UI

* Creating explicit angular and react cookies with config default

* Fixing "current ui" display text to respond to light theme
2025-10-30 09:26:50 -04:00
Mark Franceschelli
dce7cb8339 ui: Add Superuser functionality to UI (PROJQUAY-6307) (#4174)
* initial superuser framework

* all service key functionality except create key

* add create preshareable key

* add change logs panel and fresh login component

* messages ui and config without display

* add global display of messages

* CSRF token changes required for fresh login

* usage logs functionality first pass

* fix fetch user logs, colors, legend, chart and default route

* usage logs prevent greater than 30 days

* usage logs functionality complete

* superuser organization action menu commands

* add framework and service keys tests, fix service key date mismatch

* add all remaining superuser tests

* Re-design sidenav for superuser component

* Add missing columns and access control for organization list

Signed-off-by: harishsurf <hgovinda@redhat.com>

Adds Size and Admin columns and superuser checks + readonly support
for superuser capabilities

* Add build logs functionality for superusers

* Add missing functionality for user and org management for superuser

Adds create user modal, and other missing modals for superuser related
actions for both user and organization

* Redesign quota functionality for superuser

Only superuser should be allowed to configure quota. Adds new modal
to configure quota. Removes modifying quota from org settings tab

* Fix cypress tests + formatting + undo X-Next-CSRF-Token token change

---------

Signed-off-by: harishsurf <hgovinda@redhat.com>
Co-authored-by: harishsurf <hgovinda@redhat.com>
2025-10-30 08:41:38 -04:00
Shubhra Deshpande
240d6441ba feat: Add image pull statistics API endpoints and UI integration (PROJQUAY-7176) (#4382)
feat: Add image pull statistics API endpoints and UI integration

- Add new API endpoints for tag and manifest pull statistics
- Integrate pull metrics into web UI with new table columns
- Add FEATURE_IMAGE_PULL_STATS feature flag and PULL_METRICS_REDIS config
- Add pullstatsredisflushworker to supervisord configuration
- Add comprehensive test coverage for pull statistics functionality

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-10-27 15:19:52 -04:00
Michaela Lang
89e758846f tracing: improving otlp handling (PROJQUAY-8902) (#4198)
improve OpenTelemetry implementation
2025-10-23 12:20:34 -04:00
Dave O'Connor
d83e2c8647 feat(api v1): global readonly superuser support and app token visibility (PROJQUAY-8279) (#4276)
Implements global read-only superuser permissions for v1 endpoints, adjusts superuser write checks, and updates app token listing and detail endpoints; includes comprehensive tests.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-21 15:00:59 -04:00
Shubhra Deshpande
49ff0da0c2 feat: Added Redis database and Redis flush worker (PROJQUAY-7176) (#4321)
* Added redis database and redis flush worker

* updated digest validation

* adding test coverage for scan_keys function

* adding test coverage

* added tests for scan function

* added coverage for flush to database function

* added coverage for gnuicorn worker initialization

* Replaced mock methods in the test with actual function calls

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-10-17 09:27:11 -04:00
Harish Govindarajulu
f63d25bdd3 nginx: Add nginx routing logic to default to react UI for downstream (PROJQUAY-9207) (#4252)
* Add ngnix routing logic to default to react UI for downstream

* Remove defaulting from env, update Makefile to build react by default for local

* Add cypress test for signin and create account workflow

* Add missing routes + fallback to backend server

* Hide UI toggle when defaulting to new UI

* Adds forgot password + recovery email, recaptcha, missing login checks

* Add external login screen + support for other login types for new UI

* Add new screen for update user after external login

* Add authorized apps section under external logins tab

* Implement updateuser react component + fix cypress test

* Fix external login OAuth flow for react

* switch logic to default to new ui

* Add DEFAULT_UI: angular to config for cypress CI

* Fix cypress tests for oauth-callback

* Rebase and fix merge conflicts

---------

Signed-off-by: harishsurf <hgovinda@redhat.com>
2025-10-14 15:10:39 -04:00
Jordi Piriz
b46458e06f fix: create_entitlement return object (PROJQUAY-8960) (#4366)
Fix create_entitlement return object
2025-10-14 13:01:02 -04:00
Jordi Piriz
2964764455 feat: Instrument reconciliationworker (PROJQUAY-8960) (#4357)
* Extend markeplace API client to allow raising exceptions

* Refactor reconciliationworker with clearer logic and instrumentation
2025-10-14 10:05:14 -04:00
Brandon Caton
ed5851e356 sentry: filtering out invalid token format errors (PROJQUAY-9436) (#4323) 2025-10-06 16:33:53 -04:00
Shubhra Deshpande
57915a5ef3 fix: Fix Sentry transport KeyError in exception logging initialization (PROJQUAY-9198) (#4295)
Fix Sentry transport KeyError in exception logging initialization

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-09-17 10:40:00 -04:00
Shubhra Deshpande
3654b22d03 fix: added sentry initialization and logging (PROJQUAY-9198) (#4241)
* added sentry initialization and logging


---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-09-11 13:23:43 -04:00
Shubhra Deshpande
d10032d27c bug: Add configurable timeout to Splunk HEC requests (PROJQUAY-9375) (#4248)
Add configurable timeout to Splunk HEC requests

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-09-08 14:57:09 -04:00
Shubhra Deshpande
d0f45f545a fix: resolve Sentry/OpenTelemetry integration conflicts (PROJQUAY-9198) (#4232)
* fix: resolve Sentry/OpenTelemetry integration conflicts

Configure Sentry to use minimal integrations when OTEL_TRACING is enabled
to prevent instrumentation conflicts that broke exception capture


---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-09-04 16:19:27 -04:00
Shubhra Deshpande
22290c9812 deps: updated raven dependency to be compatible with python 3.12 (PROJQUAY-9198) (#4169)
* Updated raven dependency to be compatible with python 3.12

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-08-07 15:58:59 -04:00
Kenny Lee Sin Cheong
40031c2356 proxycache: fix queueitem payload for proxycachblobworker (PROJQUAY-9018) (#4076)
* proxycache: fix queueitem payload for proxycachblobworker (PROJQUAY-9018)

* Add feature flag for proxycacheblobworker

* PROXY_CACHE_BLOB_DOWNLOAD stub
2025-06-18 12:34:43 -04:00
Ivan Bazulic
9be679eb58 mirror: Add job timeout to mirror configurations (PROJQUAY-7249) (#3723)
* mirror: Add job timeout to mirror configurations (PROJQUAY-7249)
Previous global job timeout of 5 minutes was inadequate for big images. The timeout should now be configurable in much the same way as sync is. Minimum job length is 300 seconds/5 minutes.

The PR is still work in progress.

* Fix init db, remove reference to user data in logs

* Fix tests, change repo mirror configuration

* Fix tests, make mirroring cancellable through UI

* Add cancel mirror test, change HTML document to reflect mirror timeout

* Flake8 doesn't like when '==' is used with 'None'

* Fix mirror registry tests

* Add new cypress data to fix cypress tests

* Added ability to define upload chunk size to RADOS driver, small changes to repo mirror HTML page

* Fix database migration to follow HEAD

* Upload new database data for Cypress tests

* Make skopeo_timeout_interval mandatory on API calls

---------

Co-authored-by: Ivan Bazulic <ibazulic@redhat.com>
2025-06-12 19:09:51 +02:00
Kenny Lee Sin Cheong
ed70eff752 proxycache: Download blob not cached when pulling manifests with blobs available locally (PROJQUAY-6708) (#4007)
* proxycache: Download blob not cached when pulling manifests with blob available locally (PROJQUAY-6708)

* Skip downloading blobs without placeholders
2025-06-10 10:34:23 -04:00
Brandon Caton
5c1c21bb1b ci: fixing app type import (PROJQUAY-8991) (#4021)
ci: fixing app type import
2025-06-10 09:14:57 -04:00
Syed Ahmed
723102e641 build: move quay to python 3.12 (PROJQUAY-8800) (#3780)
Move Quay to python version 3.12 and switch out rehash with the resumable hash library.
2025-05-29 09:35:48 -04:00
Marcus Kok
c874086e06 chore: add systemName parameter to subscription create call (PROJQUAY-0000) (#3955)
add systemName parameter to subscription create call
2025-05-27 10:03:40 -04:00
Marcus Kok
7ca6f7c6ed otel: fix dynatrace issue (PROJQUAY-8902) (#3877)
* fix dynatrace issue
2025-05-12 18:14:00 +00:00
Kenny Lee Sin Cheong
a6be0c446d tracing: default to using http/protobuf for otlp (PROJQUAY-8902) (#3878)
tracing: default to using http/protobuf for otlp
2025-05-12 13:26:50 -04:00
Kenny Lee Sin Cheong
e838a58b54 util: Add opentelemetry support (PROJQUAY-8902) (#3863)
Instrument psycog2 and Flask for tracing with OpenTelemetry
---------

Co-authored-by: Marcus Kok <mkok@redhat.com>
2025-05-07 19:55:27 +00:00
Syed Ahmed
f3edf96030 config: Add feature flag for user events (PROJQUAY-8839) (#3830)
* config: Add feature flag for user events (PROJQUAY-8839)
2025-04-29 09:33:49 -04:00
Michaela Lang
d80f1ffc20 utils(config/schema): updating schema for validation on /api/v1/superuser/config endpoint (PROJQUAY-4559) (#3255)
* initial checkin of schema update

* finished first iteration

* re-added the comments that got lost with json to python dict conversion

* fixed space on comments

* fixed comments

* repush for checks

* black fix

* fixed typos in schema
2025-04-28 12:53:34 -05:00
Michaela Lang
8332d99da4 endpoints(v1/superuser/config): adding a full config dump for compliance reasons (PROJQUAY-4559) (#3253)
* initial checkin for the superuser/config endpoint to show how its intended to return data

bug: fixing NaN value error for quota displayed on member org page (PROJQUAY-6465) (#3224)

bug: fixing NaN value error for quota displayed on member org page (PROJQUAY-6465)

fixed black formatting

fixed flake and black formatting

fixed isort formatting

test need to be updated for superuser endpoints. There is no explicit superuser token test so globalreadonlysuperuser shall succeed too

fixed double json encoding

changed naming to comply with other SuperUserClasses, added SuperUserPermission check as scope only isnt sufficient

fixed another black error

fixed response for devtable check

fixed response for devtable as that is a superuser

fixed black format :/

added allow_if_global_readonly_superuser to config endpoint

repush for checks

fixed app.logger to module specific logger ; added missed SCHEMA return

added unittest for checking superuser config dump API call (no clue if the unittests build up a full setup since we mock all kind of stuff in the other calls)

removed env PWD check as it seems to be unset in the github runners

added missing unittest step

added FeatureFlag for config dump

formatting

* removed wrong commit in the branch

* changed from route decorator to in method check and changed unittests to fail as the default config is to deny the request

* added one test for security_tests

* rebumped the security tests
2025-04-28 11:29:58 -05:00
Marcus Kok
5e2fbd986b marketplace: free tier integration for reconciler (PROJQUAY-5698) (#3589)
free sku integration for reconciliation worker
2025-04-08 08:55:37 -04:00
Kenny Lee Sin Cheong
5f8ca041e7 ui: implement change to render modelcard stored in layers (PROJQUAY-8642) (#3692)
* ui: implement change to render modelcard stored in layers (PROJQUAY-8412)

When a manifest has certain annotations or artifactTypes, render the
applicable modelcard markdown in a new tags detail tab.

* removing untar when fetching model card

* removing extra api calls

* Add modelcar check tests

---------

Co-authored-by: bcaton <bcaton@redhat.com>
2025-03-05 19:14:22 +00:00
Kotakonda Sai Deekshith
abcf94536b chore: Filtering repeatPassword in debuglogs (PROJQUAY-8559) (#3659)
* Filtering repeatPassword in debuglogs

* updated test_log_util.py for format issues
2025-02-11 20:31:31 +05:30
Ivan Bazulic
4c5b2d50c5 ui: Expand support for customized footer links (PROJQUAY-5648) (#3556)
* ui: Expand support for customized footer links (PROJQUAY-5648)
Previous iteration only allowed changes to the terms of service. With this push, all footer links should be customizable through the `FOOTER_LINKS` object. Example:

~~~
FOOTER_LINKS:
  TERMS_OF_SERVICE_URL: "some_url"
  PRIVACY_POLICY_URL: "some_url"
  SECURITY_URL: "some_url"
  ABOUT_URL: "some_url"
~~~

Missing entries will not be printed out in the UI.

* Fixes to parsing of config object

* Add type annotation
2025-02-07 10:07:55 -05:00
Marcus Kok
f69716b867 marketplace: splittable sku for MW02702 (PROJQUAY-8151) (#3389)
* marketplace: splittable sku for MW02702 (PROJQUAY-8151)
* Alembic migration to drop unique constraint on the orgrhsubscriptions
  table
* Can split sub quantities of MW02702 across multiple orgs
* Can specify quantity for the MW02702 SKU across orgs on react UI
* Update angular UI to allow user to specify quantities for MW02702
2025-01-09 09:37:09 -05:00
Marcus Kok
4bd036b6c5 storage: add namespace filter to direct download responses (PROJQUAY-8147) (#3363)
* add namespace filter to direct download responses
2024-10-28 13:09:54 -04:00
Sunandadadi
296b5f35c3 notifications: fetch autoprune tags with multiple policies for image expiry notification (PROJQUAY-8117) (#3340)
* notifications: fetch autoprune tags with multiple policies for image expiry notification(PROJQUAY-8117)

* don't fetch notifications if tags expiry is greater than notification days + add tests
2024-10-18 16:17:07 -04:00
Marcus Kok
3b3b112690 marketplace: remove database lookup when retrieving customer ids (PROJQUAY-8017) (#3302)
remove database lookup when retrieving customer ids
2024-10-04 09:54:16 -04:00
Syed Ahmed
e9161cb3ae robots: Add robot federation for keyless auth (PROJQUAY-7803) (#3207)
robots: Add robot federation for keyless auth (PROJQUAY-7652)

adds the ability to configure federated auth for robots by
using external OIDC providers. Each robot can be configured
to have multiple external OIDC providers as the source for
authentication.
2024-09-24 11:32:38 -04:00
sayalibhavsar
6470831587 logging: hide entries when debuglog is set to false and add missing worker names (PROJQUAY-6562) (#3193)
* fixing discrepancy in debug logs after changes to util.migrate.allocator

* Revert "fixing discrepancy in debug logs after changes to util.migrate.allocator"

This reverts commit b7adb7ba71.

* fixing discrepancy in logs suggested by Ivan in #3160 after verbosity of logs are altered

* fixing discrepancy in logs suggested by Ivan in #3160 after verbosity of logs are altered
2024-09-09 19:31:40 +05:30
Marcus Kok
c49ba1725a security: change timeout for vulnerability requests (PROJQUAY-7751) (#3194)
Changes the timeout value for non-indexing requests to clair from 600 to
30.

Because the timeout for a vulnerability report request is so high, heavy
traffic to the security enpdoint results in database connections being
exhausted. Lowering the timeout value should allow requests to complete
and connections to the database to close.
2024-09-06 09:35:29 -04:00
sayalibhavsar
5d91a7dae3 logging: hide entries when debuglog is set to false and add missing worker names (PROJQUAY-6562) (#3160)
* deps: bump PyMySQL version (PROJQUAY-7251) (#3113)

bug: bump PyMySQL version (PROJQUAY-7251)
This should resolve CVE-2024-36039.

* hide logs if debuglog is false

* test for new allocator.py code changes

* test for new allocator.py code changes

---------

Co-authored-by: Ivan Bazulic <ibazulic@redhat.com>
2024-08-26 20:16:07 +05:30
Syed Ahmed
78e9a3b6b8 nginx: revert #3098 (PROJQUAY-7573) (#3129)
reverting this change because we won't use keepalive with gunicorn workers
2024-08-09 16:36:08 -04:00
Ivan Bazulic
62e42f8f54 storage: Disable pushes on registry (PROJQUAY-6870) (#2755)
* storage: Disable pushes on registry (PROJQUAY-6870)

The current read-only option for Quay is not sometimes feasible, since it requires an insert of the service key and other manual config changes. For instance, if you want to just recalculate quota on the registry, but would like to allow all registry operations (including UI) without the possibility of pushes until recalculation is done, setting the whole registry `read-only` cannot be done since it makes the database read only as well.

This PR introduces a new flag called `DISABLE_PUSHES` which allows all registry operations to continue (changing tags, repo editing, robot account creation/deletion, user creation etc.) but will disable pushes of new images to the registry (i.e. backend storage will not change). If a registry already contains the image and a new tag is simply being added, that operation should succeed.

The following message would appear in the logs:

~~~
gunicorn-registry stdout | 2024-03-13 20:19:49,414 [369] [DEBUG] [endpoints.v2] sending response: b'{"errors":[{"code":"METHOD NOT ALLOWED","detail":{},"message":"Pushes to the registry are currently disabled. Please contact the administrator for more information."}]}\n'
gunicorn-registry stdout | 2024-03-13 20:19:49,414 [369] [INFO] [gunicorn.access] 172.17.0.1 - - [13/Mar/2024:20:19:49 +0000] "PUT /v2/ibazulic/mariadb/manifests/sha256:c4694ba424e0259694a5117bbb510d67340051f0bdb7f9fa8033941a2d66e53e HTTP/1.1" 405 169 "-" "skopeo/1.9.3"
nginx stdout | 172.17.0.1 (-) - - [13/Mar/2024:20:19:49 +0000] "PUT /v2/ibazulic/mariadb/manifests/sha256:c4694ba424e0259694a5117bbb510d67340051f0bdb7f9fa8033941a2d66e53e HTTP/1.1" 405 169 "-" "skopeo/1.9.3" (0.002 3813 0.002)
~~~

The flag defaults to `False` (pushes enabled), unless set otherwise.

* Removed constraint on storage replication when pushes are disabled

* Rebase

* Fix isort sorting

* Fix isort sorting #2

* Removed constraint on storage replication when pushes are disabled

* Rebase

* Remove constraint on storage replication worker

* Fix linting on config.py
2024-08-07 15:40:10 -04:00
Sunandadadi
c597c2b9e3 nginx: set proxy_read_timeout on manifests endpoint (PROJQUAY-7573) (#3112)
* nginx: set proxy_read_timeout on manifests endpoint (PROJQUAY-7573)

* fixing indentation
2024-08-06 09:27:53 -04:00
Sunandadadi
912ce8c814 nginx: increasing keepalive timeout for manifests endpoint (PROJQUAY-7573) (#3098)
* nginx: increasing keepalive timeout for manifests endpoint (PROJQUAY-7573)

* nginx: increasing keepalive timeout for manifests endpoint (PROJQUAY-7573)

* fixing datatype

* changing MANIFESTS_ENDPOINT_KEEPALIVE_TIMEOUT to 60s

* add config param in schema

* fix formating

* set default to 0
2024-08-01 15:39:44 -04:00
Sunandadadi
6dbfdf05c5 events: fix notification methods for image expiry events (PROJQUAY-7487) (#3054) 2024-07-19 18:55:48 +00:00
Brandon Caton
854046d904 ui: adding message that registry wide autoprune has been enabled (PROJQUAY-7452) (#3042)
adding message that registry wide autoprune has been enabled
2024-07-17 13:55:56 -04:00
sayalibhavsar
f6c781dc30 logging: reduce noise in quay logs and add missing worker names (PROJQUAY-6562) (#2697)
Changing logger.info to logger.debug to stop too many INFO log lines from displaying in Quay logs + Adding the missing worker name that print those

The idea of the log is to tell you which block is being procesed by worker that is processing it. These logs are missing the worker names
```
2023-11-27 15:24:05,825 [80] [INFO] [util.migrate.allocator] No candidates, marking entire block completed 210690-213109
2023-11-27 15:24:05,832 [80] [INFO] [util.migrate.allocator] No candidates, marking entire block completed 131657-134076
[sbhavsar-mac:~ sayalibhavsar]$ grep "No candidates, marking entire block completed" quay | wc -l
5300
```
For huge registries above logs  could be a bit noisy. We could hide it as a debug message rather than as an info message.
2024-07-10 23:52:38 +05:30
Sunandadadi
6b9a96863f events: Expose notification rerun time interval in a variable (PROJQUAY-7441) (#3009)
* events: Expose notification rerun time interval in a variable (PROJQUAY-7441)

* remove comment

* change interval from miliseconds to minutes
2024-07-09 14:01:30 -04:00