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

451 Commits

Author SHA1 Message Date
OpenShift Cherrypick Robot
c6110a1480 [redhat-3.15] quota: only create notification if one doesn't already exist (PROJQUAY-8857) (#4236)
* quota: only create notification if one doesn't already exist

* adding tests

---------

Co-authored-by: bcaton <bcaton@redhat.com>
2025-09-02 10:41:22 -04:00
OpenShift Cherrypick Robot
475dac7ddd [redhat-3.15] proxy: fix err on pulls from public repos if anonymous (PROJQUAY-9346) (#4230)
* proxy: fix err on pulls from public repos if anonymous (PROJQUAY-9346)

* fixing tests

---------

Co-authored-by: bcaton <bcaton@redhat.com>
2025-08-28 09:48:23 -04:00
OpenShift Cherrypick Robot
007f7aa7ca [redhat-3.15] db: enable WAL mode and other PRAGMA stmts for SQLite to avoid db locking during concurrent writes (PROJQUAY-8758) (#4209)
* ADD PRAGMA statements for SQLITE to avoid database locking

* Fix formating

---------

Co-authored-by: harishsurf <hgovinda@redhat.com>
2025-08-21 20:03:31 +00:00
OpenShift Cherrypick Robot
b62d25c9be [redhat-3.15] ldap: Get federated login identifier and use that when checking user privileges in FederatedUserManager (PROJQUAY-8879) (PROJQUAY-5880) (#4181)
ldap: Get federated login identifier and use that when checking user privileges in FederatedUserManager (PROJQUAY-8879) (PROJQUAY-5880)

Co-authored-by: Elliot Gustafsson <elliot.gustafsson@fortnox.se>
2025-08-08 13:02:40 -04:00
OpenShift Cherrypick Robot
a0c1f7b7e9 [redhat-3.15] federationuser(ldap): avoid doing LDAP lookups for Robot accounts (PROJQUAY-5137) (#4145)
BREAKING CHANGE: LDAP lookup of robot accounts in the UI for granting permission has been dropped in context of permissions granting. This impacts Users from LDAP if they have not logged in to Quay already (pre provisioning) as a Federation User will only be available after logging in or being part of a Team.

Co-authored-by: Michaela Lang <milang@redhat.com>
2025-07-25 10:10:59 -04:00
OpenShift Cherrypick Robot
c92ec3e894 [redhat-3.15] proxycache: include hidden manifests when querying for child manifests on tag creation (PROJQUAY-8536) (#4101)
* proxycache: include hidden manifests when querying for child manifests on tag creation (PROJQUAY-8536)

* Fix mocked call

---------

Co-authored-by: Kenny Lee Sin Cheong <kenny.lee28@gmail.com>
Co-authored-by: Brandon Caton <bcaton@redhat.com>
2025-07-17 10:39:32 -04:00
OpenShift Cherrypick Robot
1256ca79f0 [redhat-3.15] deps: updating python protobuf (PROJQUAY-9081) (#4099)
* deps: updating python protobuf

* updating registry proxy tests

---------

Co-authored-by: bcaton <bcaton@redhat.com>
2025-07-07 09:58:03 -04:00
OpenShift Cherrypick Robot
5d2191f13c [redhat-3.15] splunk: only raise error when ALLOW_WITHOUT_STRICT_LOGGING is unset (PROJQUAY-8595) (#4083)
splunk: only raise error when ALLOW_WITHOUT_STRICT_LOGGING is unset (PROJQUAY-8595)

Co-authored-by: Jonathan <jonathan@Jonathans-MacBook-Pro.local>
2025-06-18 16:05:04 -04:00
OpenShift Cherrypick Robot
0cc01a11f1 [redhat-3.15] proxycache: fix queueitem payload for proxycachblobworker (PROJQUAY-9018) (#4081)
* proxycache: fix queueitem payload for proxycachblobworker (PROJQUAY-9018)

* Add feature flag for proxycacheblobworker

* PROXY_CACHE_BLOB_DOWNLOAD stub

---------

Co-authored-by: Kenny Lee Sin Cheong <kenny.lee28@gmail.com>
2025-06-18 14:35:52 -04:00
OpenShift Cherrypick Robot
2d1d46e5b2 [redhat-3.15] mirror: Add job timeout to mirror configurations (PROJQUAY-7249) (#4051)
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), maximum job length is 43200 seconds (12 hours). The option to change skopeo timeout is added to the repo mirroring settings. Additionally, repository mirroring will now correctly react to pressing of the Cancel button in the UI or invoking the cancel mirror API request. When invoked, the sync will be immediately terminated once the current tag finishes upload and will not be queued again until again explicitly enqueued. Previously, pressing the Cancel button would not stop the sync and the worker would still continue to work as if nothing happened.

Push of very large images with very large layers (> 50 GiB) is currently impossible with Ceph/RADOS driver. S3 protocol allows up to 10 thousand chunks to be uploaded per file, with 5 MiB chunk size the maximum theoretical limit for the layer size is 50 GiB. This PR adds an additional optional argument to RadosGWStorage and RHOCSStorage drivers called minimum_chunk_size_mb that allows user to define the upload chunk size. If the parameter is not defined, the driver defaults to 5 MiB.

---------

Co-authored-by: Ivan Bazulic <ibazulic@redhat.com>
Co-authored-by: Ivan Bazulic <ibazulic@laptop.skynet>
2025-06-12 15:25:47 -04:00
OpenShift Cherrypick Robot
d6164e4fa6 [redhat-3.15] fix: migrate to logging.warning (PROJQUAY-8996) (#4028)
fix: migrate to logging.warning

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
Co-authored-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-06-10 14:46:44 -04:00
OpenShift Cherrypick Robot
2ed0dd83da [redhat-3.15] proxycache: Download blob not cached when pulling manifests with blobs available locally (PROJQUAY-6708) (#4025)
* proxycache: Download blob not cached when pulling manifests with blob available locally (PROJQUAY-6708)

* Skip downloading blobs without placeholders

---------

Co-authored-by: Kenny Lee Sin Cheong <kenny.lee28@gmail.com>
Co-authored-by: Brandon Caton <bcaton@redhat.com>
2025-06-10 13:09:09 -04:00
OpenShift Cherrypick Robot
cf26ec3994 [redhat-3.15] fix: do not fail on splunk errors when flag set (PROJQUAY-8595) (#4022)
fix: do not fail on splunk errors when flag set (PROJQUAY-8595)

Co-authored-by: Jonathan King <jonathankingfc@gmail.com>
Co-authored-by: Brandon Caton <bcaton@redhat.com>
2025-06-10 11:51:24 -04:00
OpenShift Cherrypick Robot
343a075172 [redhat-3.15] ci: fixing app type import (PROJQUAY-8991) (#4023)
ci: fixing app type import

Co-authored-by: bcaton <bcaton@redhat.com>
2025-06-10 10:47:00 -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
Michaela Lang
be82aefb44 proxycache(permissions): CVE-2025-4374 (PROJQUAY-8892) (#3941)
fixing CVE-2025-4374 by extending the create_repository method to understand if we are requesting a proxy_cache repository
added unittests for create_repository when proxy_cache.
2025-05-22 09:09:02 -04:00
Brandon Caton
feb2f2e459 deps: upgrading gevent (PROJQUAY-8938) (#3928)
Upgrading gevent and greenlet
2025-05-19 13:08:04 -04:00
Sunandadadi
8abbfc8ef0 migration: adding conditional check on manifestblob alter column type (#3886)
* migration: adding conditional check on manifestblob alter column type

* convert string to lower

* fix

* fixing column type fetch
2025-05-13 13:32:38 -04:00
Sunandadadi
d3bcbe0610 migration: alter id column type for table manifestblob (#3885)
* migration: alter id column type for table manifestblob

* adding raw queries
2025-05-13 10:21:20 -04:00
Brandon Caton
3f34e3a822 Reverting PROJQUAY-8536 (#3833)
* Revert "bug: Adding allow hidden flag while looking up for manifests (PROJQUAY-8536) (#3722)"

This reverts commit f0c153fab5.

* Revert "proxy: moving manifest check to after upstream manifest fetch (PROJQUAY-8536) (#3814)"

This reverts commit 944edd064b.
2025-04-29 14:31:16 -04:00
Syed Ahmed
d674ab54cb db: use iterator chain for _get_user_repo_permissions (PROJQUAY-8839) (#3822)
* db: use iterator chain for _get_user_repo_permissions (PROJQUAY-8839)

Unwrapping can cause increase in CPU. Use iterator chain to let
the caller unwrap
2025-04-29 11:44:31 -04:00
Kenny Lee Sin Cheong
454f09ed89 logging: fix unreferenced variable from logging (PROJQUAY-8136) (#3819) 2025-04-25 18:44:46 +00:00
Syed Ahmed
36a552058a db: optimize _get_user_repo_permissions to send to read replica (PROJQUAY-8839) (#3818)
* db: optimize _get_user_repo_permissions to send to read replica (PROJQUAY-8839)

it uses a union query which doesn't invoke the replica selection
logic. Make this into 2 seperate queries

* fix unit tests
2025-04-25 09:36:43 -04:00
Brandon Caton
944edd064b proxy: moving manifest check to after upstream manifest fetch (PROJQUAY-8536) (#3814)
moving manifest check to after upstream manifest fetch
2025-04-24 14:22:18 -04:00
Kenny Lee Sin Cheong
5c51ab85e1 gc: garbage collect manifests not targetted by any tags when deleting repository (PROJQUAY-8136) (#3797)
* gc: garbage collect manifests not targetted by any tags when deleting repository (PROJQUAY-8136)

* test untagged manifest removal
2025-04-22 10:42:48 -04:00
Sunandadadi
3bf6e1b16b db: moving robot search and find repo to garbage collect queries to read replica (PROJQUAY-8792) (#3795)
* db: moving robot search and find repository to garbage collect queries to read replica (PROJQUAY-8792)

* removing lookup_robot from read_replica
2025-04-17 15:13:51 +00:00
Sunandadadi
fda188e23f db: revert get_namespace_user from read replica (PROJQUAY-8792) (#3796) 2025-04-17 15:06:37 +00:00
Sunandadadi
43bc1db13e db: moving get sorted matching repos and find repos to garbage collect to read replica (PROJQUAY-8792) (#3782) 2025-04-16 13:13:06 -04:00
Marcus Kok
b629054fe5 reconciler: fix typo in exception type (PROJQUAY-0000) (#3779)
* fix typo in exception type

* update test cases
2025-04-16 09:39:29 -04:00
Sunandadadi
275b6e8540 db: moving robot search query to read replica (PROJQUAY-8792) (#3781) 2025-04-15 09:51:12 -04:00
Sunandadadi
433124d95f db: moving get user from username query to read replica (PROJQUAY-8792) (#3773) 2025-04-14 11:58:06 -04:00
Sunandadadi
58357ca84f db: moving get user repo permissions query to read replica (PROJQUAY-8792) (#3772) 2025-04-10 15:16:04 -04: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
Shubhra Deshpande
f0c153fab5 bug: Adding allow hidden flag while looking up for manifests (PROJQUAY-8536) (#3722)
When an image is pulled by digest, a temp tag is created to prevent the manifest from being garbage collected. This is true when a manifest list is pulled by tag as well. However, if this temporary tag expires (default is 1 day for proxied organizations) and the same manifest is pulled again by digest, the system attempts to create the manifest again, leading to an integrity error because the manifest already exists in the database.

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-03-20 11:03:11 -04:00
Shubhra Deshpande
b48e1b47ad chore: added test for proxy cache (PROJQUAY-8440) (#3610)
* adding unit test for proxy cache

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-02-03 19:20:08 +00:00
Kenny Lee Sin Cheong
b674c7cfc4 gc: Allow setting a deleted repo name's suffix (PROJQUAY-8408) (#3563)
Allows adding a suffix to uuid repo names to collect metrics
2025-01-13 14:21:47 -05:00
Marcus Kok
8d835a9a94 worker: include orgs in reconciler runs (PROJQUAY-8431) (#3560)
Adds an include_orgs param to the active users query used by the reconciler and sets it to true for reconciler runs

Reconciler is not including orgs as a candidate for creating corresponding RH entitlements. As a result it misses users with stripe billing that are considered orgs.
2025-01-10 13:05:22 -05:00
Sunandadadi
70a0edef5b teamsync: peewee integrity error check on teamsync (PROJQUAY-7747) (#3550)
This issue should fix PROJQUAY-7747 and PROJQUAY-8130. Adding IntegrityError to the try except block to skip adding existing user to team.
2025-01-09 15:40:01 -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
Kenny Lee Sin Cheong
6c10313eea gc: allow setting the repositorygc queueitems' availability (PROJQUAY-8408) (#3551) 2025-01-07 15:05:17 -05:00
Marcus Kok
de9f42c2cc chore: Revert "cve: upgrade elasticsearch and elasticsearch-dsl to 8.13.0 (PROJQUAY-6962)" (PROJQUAY-6962) (#3449)
Revert "cve: upgrade elasticsearch and elasticsearch-dsl to 8.13.0 (PROJQUAY-…"

This reverts commit fb95c90574.
2024-12-04 13:06:13 -05:00
Marcus Kok
fb95c90574 cve: upgrade elasticsearch and elasticsearch-dsl to 8.13.0 (PROJQUAY-6962) (#3418)
* upgrade elasticsearch and elasticsearch-dsl to 8.13.0
* update tests and elasticsearch logs to handle new major version
* pinning elasticsearch-transport according to check requirements.txt test
2024-12-02 09:50:42 -05:00
Syed Ahmed
f7f4fbcbde oci: fix nested index parsing (PROJQUAY-8272) (#3427)
image index can refer to another index when parsing. We currently
assume only a manifest can be referenced from an index. This fixes
the parse logic
2024-11-26 19:24:16 +00:00
Ivan Bazulic
1b27dd3c01 auth: Implement is_restricted_user for federated auth systems (PROJQUAY-8208) (#3400)
* auth: Implement is_restricted_user for OIDC and allow super users to create content regardless of set restriction (PROJQUAY-8208)
Currently, if OIDC is set as an authentication mechanism and restricted users is set, Quay will return a `501 Not Implemented` on invocation. Now, Quay will properly check the restricted user whitelist for federated users.
Additionally, if user restriction is in place and super user's username was **not** explicitly whitelisted, super users would not be able to create new content inside the registry. Now, the username is explicitly checked in the UI to allow super users to create both organizations and repos regardless of restricted users whitelist.

* Add tests

* Add tests for usermanager
2024-11-25 14:47:03 -05:00
Brandon Caton
ce11c87a8e config: adding builder db host param (PROJQUAY-8184) (#3371)
adding builder db host param
2024-10-31 10:00:49 -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
Sunandadadi
409d464cca autoprune: order policies by method before execution (PROJQUAY-8104) (#3334) 2024-10-16 14:35:16 -04:00
Brandon Caton
92d1a31ace api: allowing superuser to read catalog endpoint (PROJQUAY-8023) (#3310)
Allows for the full access and global readonly superuser to read all repositories from the /v2/_catalog endpoint.
2024-10-16 09:44:01 -04:00
Sunandadadi
d39a6f06c3 autoprune: fix tags returned by autoprune worker (PROJQUAY-8070) (#3314)
* autoprune: fix tags returned by autoprune worker (PROJQUAY-8070)

* fixing tests

* moving limit and offset to db_regex_search

* adding test cases
2024-10-11 12:10:59 -04:00
Ivan Bazulic
77bc70a637 logs: Audit export logs requests (PROJQUAY-7679) (#3146)
* logs: Audit export logs requests (PROJQUAY-7679))
We add the ability to audit export logs requests that were previously not tracked.

* Add UI elements to properly render new audit log

* Truncate date/time column on exterme zooms

* Add initdb.py entries

* Fix migration and add test db data

* Add test database and fix migration paths

* Changed logging mechanism to grab raised exceptions

* Fix improper import

* Add date/time timestamp to saved metadata

* Change message on export logs screen in UI

* Changed message in old UI as well

* Change log description in new UI too

* Simplify call logic and add additonal information to logged errors
2024-10-03 13:07:22 -04:00