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

306 Commits

Author SHA1 Message Date
Ryan Wallace
a06cc6fa43 chore: update all black versions to 24.4.2 and run make black (#4754)
* chore(pre-commit): match black version with requirements-dev

* run `make black` against repo

* ci: switch to black 24.4.2

* fix: py312

* fix: flake8 errors

* fix: flake8 conflicts

* chore: add git blame ignore revs file
2025-12-19 11:29:53 -06:00
Kenny Lee Sin Cheong
c24a2fd22f metrics: rename namespace label to avoid conflict (PROJQUAY-9388) (#4746)
Rename namespace label to avoid conflict
2025-12-17 18:18:02 +00:00
Ryan Wallace
40d9458053 fix(sentry): filter out repo metadata when sending events (PROJQUAY-9436) (#4723)
fix(sentry): filter out repo metadata when sending events
2025-12-11 15:54:33 -05:00
Kenny Lee Sin Cheong
5cbdf7ba3c metrics: add support for flask request buckets (PROJQUAY-9853) (#4638)
* metrics: add support for flask request buckets

* Add config flag to schema

* Remove unused function

* Add type annotation for config flag
2025-12-04 10:47:23 -05:00
Ryan Wallace
e0c74cb334 feat(sentry): add more comprehensive filtering (PROJQUAY-9436) (#4641)
* feat(sentry): add more comprehensive filtering

* test: add tests for sentry filtering

* fix: conflicting patterns

* feat: filter out OTEL logs

* feat: add more robust 4xx error filtering

* chore(4xx): test

* fix: potential AttributeError on sentry event object

* fix: rm .tool-versions

* fix: parse status codes as ints

* test: add JWT filtering test

* chore: tighten 4xx exceptions

* test: remove some duplicate tests

* chore: add a default error sampling rate of 0.1

* test: add to buildman/sentry tests

* refactor: combine EXCLUDE_PATTERNS into one list

* chore: remove some duplicated tests
2025-12-01 16:11:07 -05:00
Frank Villaro-Dixon
8b0eb84b43 fix(secscan): Don't show inexistant stacktrace (#4526)
`logger.exception` prints the stacktrace. However in this case there is
no stacktrace to output, as we are not inside an exception. This results
in log lines where the stack trace (`NoneType: None`) is confusing:
```
securityworker stdout | 2025-11-17 08:59:21,431 [102] [ERROR] [util.secscan.v4.api] Security scanner endpoint responded with non-200 HTTP status code: 500
securityworker stdout | NoneType: None
```

This commit fixes that

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
2025-11-24 10:21:44 -05:00
Shubhra Deshpande
587dff07f3 fix: Fix race conditions in pull metrics tracking and flushing (PROJQUAY-9776) (#4561)
* Fix race conditions in pull metrics tracking and flushing

Replace non-atomic operations with atomic Redis operations to prevent
data loss when concurrent pulls occur during flush operations.

* fixing tests

* updating tests

* added uuid to the rename factors to ensure unique key at concurrent requests

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-11-20 09:47:47 -05:00
jbpratt
5de525bfa1 chore: extract logo selection logic into reusable hook (#4566)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-19 18:38:05 +00:00
Ryan Wallace
4ac6522bd5 feat: add IRSA support when creating Quay.io clients (PROJQUAY-9228) (#4312) 2025-11-19 09:51:47 -05:00
Shubhra Deshpande
fb9bedc91c fix: Added lazy initialization for redis to retry the connection after pod restart automatically connect when available (PROJQUAY-9791) (#4538)
* Fix: Add lazy Redis connection with retry logic for pull metrics

- Implement lazy initialization to prevent startup failures when Redis unavailable
- Add retry logic (3 attempts, 1s delay) for automatic reconnection
- Add health checks before each Redis operation
- Improve error logging from DEBUG to WARNING level
- Fix silent failures after pod restart when Redis not immediately available

This fixes the issue where pull statistics tracking was permanently broken
after registry component restart if Redis wasn't available at startup.

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-11-18 06:15:37 +00:00
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