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

63 Commits

Author SHA1 Message Date
jbpratt
6b49b030ee fix(config-tool): remove config-tool UI (PROJQUAY-10096) (#4769)
Remove the config-tool editor UI while preserving the validation CLI
functionality. The editor UI is no longer needed as configuration is now
managed through other means.

Changes:
- Delete pkg/lib/editor/ directory with all Angular UI components
- Delete editor command and related Go code
- Remove config-editor from supervisord and deployment configs
- Simplify Dockerfile without JS build stage
- Remove Cypress E2E tests from GitHub workflow
- Clean up unused dependencies

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 11:40:49 -06:00
Shubhra Deshpande
57101500ea bug: fixing pull statistics Redis flush worker with aggregation support (PROJQUAY-9607) (#4407)
* fixing pull statistics Redis flush worker with aggregation support

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-10-29 15:23:39 -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
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
Brandon Caton
7c72cdd49c init: dynamically looking up python user base (PROJQUAY-9011) (#4055)
Add check for ubi8 to install based on python user base env variable.
2025-06-13 11:13:35 -04: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
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
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
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
Kenny Lee Sin Cheong
4546163e83 registry: implements the OCI 1.1 referrers API (PROJQUAY-7280) (#2597)
* registry: implements the OCI 1.1 referrers API

Migrations:
- Adds a subject column for lookup
- Adds a subject_backfilled column to track status of the backfilling
of existing manifests
- Adds a manifest_json column making use of postgres' JSONB support,
for future use.

Manifestsubjectbackfillworker: Indexes existing manifests for possible
existing subject field.

* Deprecate IGNORE_UNKNOWN_MEDIATYPES

* Cleanup
2024-06-07 13:28:13 -04:00
Brandon Caton
0e496b46a5 autoprune: add initial setup for the autoprune feature (PROJQUAY-6094) (#2277)
Adds the auto-prune worker, database models, and feature flag.
2023-10-05 13:37:36 -04:00
Michaela Lang
324844bd5c init(postgresclientcerts): add Postgresql client certificate authentication (PROJQUAY-2417) (#2156)
* add Postgresql client certificate authentication option

* fixed tailing whitespace as reported by pre-commit
2023-08-30 12:54:04 +02:00
Kenny Lee Sin Cheong
5f63b3a7bb chore: drop deprecated tables and remove unused code (PROJQUAY-522) (#2089)
* chore: drop deprecated tables and remove unused code

* isort imports

* migration: check for table existence before drop
2023-08-25 12:17:24 -04:00
Brandon Caton
db4fc04124 quota: disabling quota worker when running config editor (PROJQUAY-5925) (#2131) 2023-08-15 08:56:47 -04:00
Brandon Caton
6cf0a3531b quota: calculating registry size (PROJQUAY-5476) (#1879)
Allows superusers to trigger a calculation of the deduplicated registry size. A superuser can go to the organization panel of the superuser page and select Calculate to queue a calculation of the registry total. The total will only be calculated when requested. Includes warning to user of increase of database load when running calculation.
2023-05-24 17:10:40 -04:00
Brandon Caton
e6f2dc3354 quota: excluding robots from quota total (PROJQUAY-5469) (#1871)
Adding quotatotalworker to config services / excluding robots from quota total
2023-05-10 14:54:57 -04:00
Marcus Kok
0a1c7fb22e marketplace: add reconciler (PROJQUAY-5320) (#1817)
marketplace: add reconciler (PROJQUAY-5320)
* check RH marketplace after stripe for private repo creation / changing visibility
* add reconciliation worker that creates RH subscriptions in marketplace for pre-existing stripe customers
2023-05-08 09:48:17 -04:00
Brandon Caton
a2c379d47c quota: Include blob deduplication in totals (PROJQUAY-3942) (#1751)
Allows for only unique blobs are counted at the namespace and repository level. Calculation includes manifest list sizes.
Add's the following internal configurations that default to true:
QUOTA_INVALIDATE_TOTALS: Invalidates calculated totals when FEATURE_QUOTA_MANAGEMENT is set to false
RESET_CHILD_MANIFEST_EXPIRATION: Resets the expiry for child manifests on push of the manifest list for immediate GC eligibility
PERMANENTLY_DELETE_TAGS: Enables features related to the permanent deletion of tags outside the configured time machine window
2023-05-01 16:40:01 -04:00
Kenny Lee Sin Cheong
6e8e2d2fe7 chore: remove deprecated appr code (PROJQUAY-4992) (#1718) 2023-01-24 10:11:04 +01:00
Dave O'Connor
69ad27724b Add feature flags for IPv6 (#1525)
Signed-off-by: Dave O'Connor <doconnor@redhat.com>
2022-09-12 09:09:39 -04:00
Ivan Bazulic
eb30813683 task: remove obsolete logrotate.conf file (PROJQUAY-4364) (#1500)
Removes the obsolete `logrotate.conf` file which was used in Quay 2.9 and below when nginx logs were stored under `/var/log/nginx` inside the container instead of being redirected to `/dev/stdout`. This file is no longer needed.
2022-08-31 17:27:41 +02:00
Kenny Lee Sin Cheong
e1745a9b13 init: fix bash path before appending certs (PROJQUAY-3881) (#1359) 2022-06-03 13:37:34 -04:00
Kenny Lee Sin Cheong
8786ef2efd init: ensure a newline is present before appending certs (PROJQUAY-3881) (#1356)
Make sure the script still works when mounting certs as a read-only fs.
2022-06-02 16:53:50 -04:00
Kenny Lee Sin Cheong
16d9a2ce41 init: ensure a newline is present before appending certs (PROJQUAY-3881) (#1352) 2022-05-31 15:00:04 -04:00
Kenny Lee Sin Cheong
5471d3cbcb secscan: deprecate support for Clair V2 (PROJQUAY-2837) (#951)
Removes read support for Clair V2, along with the need to package
jwtproxy with Quay.

TODO: Drop deprecate image api + image table, remove image data model.
2022-05-31 10:15:54 -04:00
Oleg Bulatov
a13f4cf624 Use final image for development (#1060) 2022-03-16 14:15:42 +01:00
Kenny Lee Sin Cheong
829b77cee5 Set QUAYRUN default to be backward compatible (#1008)
Set QUAYRUN to default to QUAYCONF. If needed, QUAYRUN can be set as
environment variable.
2021-12-01 15:14:51 -05:00
Kenny Lee Sin Cheong
1ba53f4f09 nginx: support client ip through x-forwarded-for header (PROJQUAY-2883) (#1003)
Support client ip from x-forwarded header. This is needed if one of
the intermediate proxy between the client and Quay does not support
proxy protocol.

If set, FEATURE_PROXY_PROTOCOL will use the L4 feature. If not, say,
when a L7 proxy is used, fallback to using x-forwarded-for, and allow
specifying trusted ip/cidr for Nginx.
2021-12-01 09:30:42 -05:00
Oleg Bulatov
7fe6d506a8 Use /run for supervisord socket (#947) 2021-12-01 10:14:16 +01:00
mosen
fca67e7729 feat: mypy type annotations (PROJQUAY-740) (#455)
* Add dev dependencies mypy and typing

* Add makefile target `types-test`, not yet included in `test` target.

* Generate stubs for imported modules to avoid mypy complaining about missing types.

* Remove generated stubs as there are way too many and they cause tons of mess in the repo. Switched to ignoring untyped modules for now, to concentrate on Quay-only type checking.

* mypy config changed to ignore missing imports

* ignore property decorator as it is not supported by mypy

* mypy annotations for many configuration variables

* re-generate mypy_stubs directory as its necessary in some classes for base classes to prevent mypy errors

* util/registry/queuefile referred to non existent definition of Empty class in multiprocessing.queues

* ignore type checking for things like monkey patching and exported/re-imported objects that 
mypy does not allow.

* Adjust mypy config to warn us about unreachable return paths and useless expressions.

* Add the __annotations__ property to INTERNAL_ONLY_PROPERTIES so that it is not part of the config schema testing

* Remove redundant dependencies `typing` and `typing-extensions` which are NOOP after Python 3.5

* Remove mypy-extensions which only provides a TypedDict implementation but has not been updated since 2019.

* updated mypy to 0.910 which requires all types packages to be installed manually.

* exclude local-dev from type checking until core team can suggest an outcome for __init__.py duplicate packages

* re-add typing dependency which will be needed until Python 3.9

* ignore .mypy_cache

* add mypy stub for features module to replace inline definitions

* import annotations eager evaluation in billing.py as it was required to reference a class declared later in the module.

* remove the type definition of V1ProtocolSteps/V2ProtocolSteps to make tox happy
2021-10-25 09:56:26 +02:00
Jonathan King
1f7d128c8d dockerfile: Fix downstream python site-packages location (PROJQUAY-2258) (#842)
- Allow PYTHONUSERBASE_SITE_PACKAGE to be added as an environment variable
- Set PYTHONUSERBASE_SITE_PACKAGE to /usr/local/lib/python3.8/site-packages in downstream Dockerfile
2021-07-22 10:04:30 -04:00
Kenny Lee Sin Cheong
86d150a204 dockerfile: refactor dockerfile (PROJQUAY-1997) (#787)
* cicd: toggle on more OCI conformance tests (PROJQUAY-1997)

This commit also has the CI keep the report around as a workflow
artifact.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>

* external_libraries: patch out wider dependencies (PROJQUAY-1997)

This change makes it possible to run the external_libraries script
without needing to pull in the entire quay configuration framework. This
will allow for a more granular Dockerfile.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>

* cicd: enable docker buildkit backend (PROJQUAY-1997)

Signed-off-by: Hank Donnay <hdonnay@redhat.com>

* Dockerfile: rework to be faster (PROJQUAY-1997)

This change allows for the Dockerfile to reuse more cache, and run in
parallel when using the BuildKit backend.

* init: Uses user site-package directory as Python root (PROJQUAY-1997)

Use `python3 -m site --user-site` as Python root when installing certs.

Co-authored-by: Hank Donnay <hdonnay@redhat.com>
2021-05-12 10:36:58 -04:00
thomasmckay
c81eed7640 PROJQUAY-1580 - remove TLSv1 from nginx (#696) 2021-03-22 15:43:51 -04:00
robertzaage
c4067e5759 Fixed typo in if statement (#695)
Co-authored-by: Robert Zaage <robert@zaage.it>
2021-03-17 11:18:55 -04:00
Kurtis Mullins
bd7252c536 [PROJQUAY-1021] task: Update "Black" to version 20.8b1 2020-11-30 18:48:19 -05:00
Kenny Lee Sin Cheong
6f441e9889 PROJQUAY-1255 grpc nginx ssl (#603)
* Use safe_load when loading the config yaml

* Setup nginx ssl termination for grpc endpoints

* Bootstrap Quay's ca cert in the build executor nodes

* Update certificate mount point in ignition config

Mount the Fedora CoreOS/RHCOS based cert directory to /certs in the
builder container, where it will be installed by the container's
entrypoint.
2020-11-25 11:46:56 -05:00
thomasmckay
8609e2f7aa PROJQUAY-1133 - turn off extra config workers (#572) 2020-10-14 12:18:33 -04:00
thomasmckay
98c988f51f PROJQUAY-1131 - use /tmp for created certs (#570) 2020-10-14 12:15:23 -04:00
thomasmckay
61af543a92 PROJQUAY-516 - requests no longer needs cacert.pem (#569) 2020-10-13 15:47:59 -04:00
Jonathan King
a9ee2dc4ec new config-tool (#566) 2020-10-07 16:17:45 -04:00
Alec Merdler
a4390c3785 implement notification system for security scanner v4 (#557) 2020-10-01 12:27:45 -07:00
thomasmckay
ca620e59bf PROJQUAY-1027 - remove nginx 'use_old_certs' (#539) 2020-09-09 08:23:48 -04:00
Alec Merdler
f99cdf87e7 remove k8s-specific extra CA cert handling code (#545) 2020-09-04 08:52:03 -07:00
Joseph Schorr
0e628b1569 Deprecate Image rows and move to in-memory synthesized legacy images [Python 3] (#442)
* Change verbs to use a DerivedStorageForManifest table instead of DerivedStorageForImage

This allows us to deprecate the DerivedStorageForImage table.

Fixes https://issues.redhat.com/browse/PROJQUAY-519

* Change uploaded blob tracking to use its own table and deprecate
RepositoryTag

* Start recording the compressed layers size and config media type on the
manifest row in the database

NOTE: This change includes a database migration which will *lock* the
manifest table

* Change tag API to return the layers size from the manifest

* Remove unused code

* Add new config_media_type field to OCI types

* Fix secscan V2 test for us no longer writing temp images

* Remove unused uploading field

* Switch registry model to use synthetic legacy images

Legacy images are now (with exception of the V2 security model) read from the *manifest* and sythensized in memory. The legacy image IDs are generated realtime based on the hashids library. This change also further deprecates a bunch of our Image APIs, reducing them to only returning the image IDs, and emptying out the remaining metadata (to avoid the requirement of us loading the information for the manifest from storage).

This has been tested with our full clients test suite with success.

* Add a backfill worker for manifest layers compressed sizes

* Change image tracks into manifest tracks now that we no longer have
manifest-less tags

* Add back in the missing method

* Add missing joins to reduce extra queries

* Remove unnecessary join when looking up legacy images

* Remove extra hidden filter on tag queries

* Further DB improvements

* Delete all Verbs, as they were deprecated

* Add back missing parameter in manifest data type

* Fix join to return None for the robot if not defined on mirror config

* switch to using secscan_v4_model for all indexing and remove most of secscan_v2_model code

* Add a missing join

* Remove files accidentally re-added due to rebase

* Add back hashids lib

* Rebase fixes

* Fix broken test

* Remove unused GPG signer now that ACI conversion is removed

* Remove duplicated repomirrorworker

* Remove unused notification code for secscan. We'll re-add it once Clair
V4 security notifications are ready to go

* Fix formatting

* Stop writing Image rows when creating manifests

* Stop writing empty layer blobs for manifests

As these blobs are shared, we don't need to write ManifestBlob rows
for them

* Remove further unused code

* Add doc comment to _build_blob_map

* Add unit test for synthetic V1 IDs

* Remove unused import

* Add an invalid value test to synthetic ID decode tests

* Add manifest backfill worker back in

Seems to have been removed at some point

* Add a test for cached active tags

* Rename test_shared to not conflict with another same-named test file

Pytest doesn't like having two test modules with the same name

* Have manifestbackfillworker also copy over the config_media_type if present

Co-authored-by: alecmerdler <alecmerdler@gmail.com>
2020-07-28 13:03:10 -04:00
Kenny Lee Sin Cheong
3fdf2ff9ba Decode b64 bytes to str (#477) 2020-07-15 09:52:55 -04:00
Kurtis Mullins
f1237bdb29 [PROJQUAY-753] Reduce logging noise (#445) 2020-06-18 13:54:20 -04:00
Kurtis Mullins
38be6d05d0 Python 3 (#153)
* Convert all Python2 to Python3 syntax.

* Removes oauth2lib dependency

* Replace mockredis with fakeredis

* byte/str conversions

* Removes nonexisting __nonzero__ in Python3

* Python3 Dockerfile and related

* [PROJQUAY-98] Replace resumablehashlib with rehash

* PROJQUAY-123 - replace gpgme with python3-gpg

* [PROJQUAY-135] Fix unhashable class error

* Update external dependencies for Python 3

- Move github.com/app-registry/appr to github.com/quay/appr
- github.com/coderanger/supervisor-stdout
- github.com/DevTable/container-cloud-config
- Update to latest mockldap with changes applied from coreos/mockldap
- Update dependencies in requirements.txt and requirements-dev.txt

* Default FLOAT_REPR function to str in json encoder and removes keyword assignment

True, False, and str were not keywords in Python2...

* [PROJQUAY-165] Replace package `bencode` with `bencode.py`

- Bencode is not compatible with Python 3.x and is no longer
  maintained. Bencode.py appears to be a drop-in replacement/fork
  that is compatible with Python 3.

* Make sure monkey.patch is called before anything else (

* Removes anunidecode dependency and replaces it with text_unidecode

* Base64 encode/decode pickle dumps/loads when storing value in DB

Base64 encodes/decodes the serialized values when storing them in the
DB. Also make sure to return a Python3 string instead of a Bytes when
coercing for db, otherwise, Postgres' TEXT field will convert it into
a hex representation when storing the value.

* Implement __hash__ on Digest class

In Python 3, if a class defines __eq__() but not __hash__(), its
instances will not be usable as items in hashable collections (e.g sets).

* Remove basestring check

* Fix expected message in credentials tests

* Fix usage of Cryptography.Fernet for Python3 (#219)

- Specifically, this addresses the issue where Byte<->String
  conversions weren't being applied correctly.

* Fix utils

- tar+stream layer format utils
- filelike util

* Fix storage tests

* Fix endpoint tests

* Fix workers tests

* Fix docker's empty layer bytes

* Fix registry tests

* Appr

* Enable CI for Python 3.6

* Skip buildman tests

Skip buildman tests while it's being rewritten to allow ci to pass.

* Install swig for CI

* Update expected exception type in redis validation test

* Fix gpg signing calls

Fix gpg calls for updated gpg wrapper, and add signing tests.

* Convert / to // for Python3 integer division

* WIP: Update buildman to use asyncio instead of trollius.

This dependency is considered deprecated/abandoned and was only
used as an implementation/backport of asyncio on Python 2.x
This is a work in progress, and is included in the PR just to get the
rest of the tests passing. The builder is actually being rewritten.

* Target Python 3.8

* Removes unused files

- Removes unused files that were added accidentally while rebasing
- Small fixes/cleanup
- TODO tasks comments

* Add TODO to verify rehash backward compat with resumablehashlib

* Revert "[PROJQUAY-135] Fix unhashable class error" and implements __hash__ instead.

This reverts commit 735e38e3c1d072bf50ea864bc7e119a55d3a8976.
Instead, defines __hash__ for encryped fields class, using the parent
field's implementation.

* Remove some unused files ad imports

Co-authored-by: Kenny Lee Sin Cheong <kenny.lee@redhat.com>
Co-authored-by: Tom McKay <thomasmckay@redhat.com>
2020-06-05 16:50:13 -04:00
Joseph Schorr
e1ca6f649b Add an option for running Quay without running database migrations (#312) 2020-04-03 11:34:48 -04:00
Joseph Schorr
69ac731086 Make the maximum size of CNR layers configurable and default to 2M (#303)
Fixes https://issues.redhat.com/browse/PROJQUAY-403
2020-04-02 15:38:42 -04:00