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

84 Commits

Author SHA1 Message Date
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
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
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
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
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
Brandon Caton
5c1c21bb1b ci: fixing app type import (PROJQUAY-8991) (#4021)
ci: fixing app type import
2025-06-10 09:14:57 -04:00
Harish Govindarajulu
a2f02db8ca deps: bump protobuf (PROJQUAY-7970) (#3331)
* deps: bump protobuf (PROJQUAY-7970)

Signedoff-by: harishsurf <hgovinda@redhat.com>

* Regenerate .proto buildman_pb2*.py files

Bumping protobuf to 5.28.2 requires regenerating python files
from .proto file

* Bump grpcio + fix import

* Add generated buildman_pb2.pyi file

* Add ignore type check for import

* Fix black + isort formatting
2024-11-25 11:23:22 +05:30
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
Oleg Bulatov
1643b40c3a fix: Pass CONTAINER_RUNTIME to quay-builder (PROJQUAY-5910) (#2096) 2023-08-07 15:50:53 -04:00
Marcus Kok
1a60cbe7fb buildman: add SLO metric that calculates build success (PROJQUAY-4486) (#1609)
Added a counter metrics to track total number of build jobs and total number of failed builds. These can be used to calculate the build success rate in grafana.
2022-11-28 13:16:45 -05:00
Marcus Kok
ea67af5a04 buildman: add SLO metric for time spent in queue for build jobs (PROJQUAY-4487) (#1575)
This adds a metric that calculates the time a build job spends in the queue.
2022-11-02 16:59:08 -04:00
Kenny Lee Sin Cheong
9a11e4760e buildman: allow fallback on non-exception build failures (PROJQUAY-4609) (#1605)
i.e Failed api calls caused by the external builder servic (expired
certificate, network issues, ...)
2022-11-02 12:36:19 -04:00
Dave O'Connor
db225c3293 Bump PyJWT (#1465) 2022-08-08 11:02:09 -04:00
Brandon Caton
b8d3e17406 builders: Add cacert's to build agent (PROJQUAY-3819) (#1398)
Allows the quay-builder to use user provided certificates.
2022-07-06 08:31:55 -04:00
Oleg Bulatov
5eaf0584db chore: Run mypy as CI job (#1363)
* Run mypy as CI job

* Fix peewee.pyi and configure pyright
2022-06-13 11:01:17 +02:00
Brandon Caton
d11d45f208 builders: Send notifications on build completion (PROJQUAY-3614) (#1346)
Currently builds do not send notifications on success or failure. Adding calls to send out those notifications.
2022-06-02 09:49:19 -04:00
Brandon Caton
1d2e55b63d builders: Set imagePullPolicy to always (PROJQUAY-3507) (#1330)
Currently imagePullPolicy is set to IfNotPresent. This will ignore updates to the builder image.
2022-05-17 10:05:26 -04:00
Kenny Lee Sin Cheong
e3b170ea3f buildman: fix type when getting ec2 ami (#1328) 2022-05-13 12:37:33 -04:00
Brandon Caton
3a63fd7187 builders: Add dnsPolicy option (PROJQUAY-3755) (#1305)
Some clusters use `dnsPolicy: ClusterFirst` while we have the field hardcoded to `Default`. This change allows the field to be configurable.
2022-05-09 11:15:31 -04:00
Brandon Caton
9557cb9abb builders: Set default kubernetesPodman image (PROJQUAY-3586) (#1245)
Update kubernetesPodman builders default image with the production image.
2022-05-02 10:34:46 -04:00
Brandon Caton
d8ae686f9b builders: Persist build pod when DEBUG is true (PROJQUAY-3710) (#1297)
In the previous kubernetes executor the build job was persisted in DEBUG mode due to the virtual machine in the pod never exiting. This kept the job alive for users to view the debug information. The `kubernetesPodman` executor does not run the VM so it will be cleaned up due to `ttlSecondsAfterFinished` being set on the job. This change prevents the `ttlSecondsAfterFinished` field from being set when DEBUG is true, allowing the pod to stay alive to retrieve the logs.
2022-04-29 16:24:03 -04:00
Brandon Caton
88e86eb11e builders: Set backoffLimit to 1 (PROJQUAY-3587) (#1246)
Setting the backoffLimit to 1 for kubernetes and kubernetesPodman builds. Prevents subsequent attempts from failing due to the token expiring. Having the job recreate pods is unnecessary as the build manager already has the retry logic.
2022-04-18 09:13:26 -04:00
Syed Mushtaq Ahmed
2d053e37fb builders: add a check for expired key (PROJQUAY-3489) (#1214)
This fixes the crash:

DataError: Invalid input of type: 'NoneType'. Convert to a bytes, string, int or float first.

This is happening because we access a value of a key which has expired
2022-03-30 12:48:38 -04:00
Brandon Caton
ef91c57c23 format: Updating black to resolve click dependency issue (PROJQUAY-3487) (#1209)
Currently the CI breaks due to a dependency of black, `click`, breaking with it's latest release with `ImportError: cannot import name '_unicodefun' from 'click'`. Since black does not pin it's version of click it pulls in the latest version containing the breaking change and fails the CI check. This updates black with the patch. [See the original issue here.](https://github.com/psf/black/issues/2964) The rest of the changes are format updates introduced with the latest version of black.
2022-03-29 15:34:57 -04:00
Brandon Caton
4ecbcded06 builders: Add DEBUG and JOB_REGISTRATION_TIMEOUT options (PROJQUAY-3395) (#1177)
Adding JOB_REGISTRATION_TIMEOUT to take effect on generating the build registration token. Also adding the DEBUG option to the kubernetesPodman executor.
2022-03-10 11:40:57 -05:00
Brandon Caton
ceb9262b7e buildman: Add EXECUTOR parameter (PROJQUAY-3278) (#1134)
Changes made to allow use of a single quay-builder image for kubernetes and kubernetesPodman builds.
Implements the following changes:
- Added EXECUTOR env var to kubernetsPodman job configuration
- Updated the builder ignition config to overwrite the registry.conf file to set short name mode to permissive
- Always run the quay-builder in the VM as root
2022-03-02 14:37:21 -05:00
Kenny Lee Sin Cheong
3ca44073b1 buildman: prevent systemd oneshot service from timing (PROJQUAY-3304) (#1149)
If not set, TimeoutStartSec for the Docker service is set to
600. Since it's a service of type oneshot, this should either not be
set, or at least the length of the machine's lifetime.
2022-02-25 15:34:28 -05:00
Kenny Lee Sin Cheong
32691dd812 buildman: Set build token expiration to builder's lifetime (PROJQUAY-3281) (#1142)
Make sure the build token doesn't expire before the builder instance
does. Set the expiration to the builder instances' max expiration.
2022-02-23 18:11:19 -05:00
Kenny Lee Sin Cheong
a0443340cb buildman: fix multiple build retries phase (PROJQUAY-3281) (#1139)
Allow the build to move forward if it is already in the desired
phase/state. When a build fails, ang gets retried from the queue, its
phase doesn't get updated back to WAITING. So it is possible that it
is already in a phase such as SCHEDULED, which could prevent the
buildman from marking the new attempt as scheduled, as there would be
no aparent changes made to the build phase.
2022-02-23 13:01:39 -05:00
Kenny Lee Sin Cheong
9b89262640 buildman: configurable build job registration timeout (PROJQUAY-3280) (#1135)
With the previous 15 sec hard-coded value, some build could
sporadically expire before having the time to boot start instance and
make the registration rpc call. Change the default to 30 sec, and make
it configurable.
2022-02-22 10:11:57 -05:00
Brandon Caton
a29e64be18 buildman: Add kubernetesPodman build option (PROJQUAY-3052) (#1066)
Additional option allowing for Quay builds to leverage Podman directly in Openshift.
2022-02-11 09:01:55 -05:00
Kenny Lee Sin Cheong
eaaa3adbf0 buildman: allow use of public builder image (PROJQUAY-3179) (#1103)
These username + password are only necessary if the quay-builder image is private, and should be optional
2022-02-09 12:37:15 -05:00
Kenny Lee Sin Cheong
b07b44a7eb buildman: fix kubernetes not returning correct running count (PROJQUAY-3169) (#1099)
Filter the completed or failed jobs from the kubernetes api requests.
2022-02-09 09:51:57 -05:00
Syed Mushtaq Ahmed
dce0b93433 builders: Remove socket_timeout from the redis client (PROJQUAY-2542) (#1084)
Redis needs a long-living connection for pubsub which is used by the
build manager
2022-02-03 12:31:25 -05:00
Harish Govindarajulu
79703a9176 chore: Move qemu outside of quay repo to its github repo (PROJQUAY-2342) (#866)
The quay-builder-qemu container image is built from this
directory alone. For cpaas integration, the case
where two container images are built from
the same source repo is not supported. To tackle this,
the removed directory would live in the new
"quay-builder-qemu" github repo

Signed-off-by: harishsurf <hgovinda@redhat.com>
2021-08-09 11:49:58 -04:00
Ivan Bazulic
f5b9492ac6 buildman: Add proxy variables to builds if they exist (PROJQUAY-2120) (#834)
* buildman: Add proxy variables to builds if they exist (PROJQUAY-2120)

Adds the ability to define proxy variables for builders. The proxy variables are parsed as env. variables and defined in Quay's config.yaml file.

* buildman: Add proxy variables to builds if they exist (PROJQUAY-2120)

Adds the ability to define proxy variables for builders. The proxy variables are parsed as env. variables and defined in Quay's config.yaml file.
2021-07-13 10:53:26 -04:00
Kenny Lee Sin Cheong
a839a78eb5 chore: allows Quay to run for account recoveries (PROJQUAY-970) (#793)
Adds ACCOUNT_RECOVERY_MODE to allow Quay to run with some core
features disabled. When this is set, the instance should only be used
in order by existing users who hasn't linked their account to an
external login service, after database authentication has been
disabled.
2021-07-07 12:45:24 -04:00
Kenny Lee Sin Cheong
bfb8602d5a buildman: fix vm image name in startup script (PROJQUAY-2120) (#811)
Reference correct filename in start.sh
2021-06-16 14:46:36 -04:00
Kenny Lee Sin Cheong
635dd6a73a chore: import missing logging.config module (#706)
Add missing module import from logging package
2021-03-25 14:03:17 -04:00
Kenny Lee Sin Cheong
b28965cdf6 Update log level when unable to write build duration metrics to a WARNING (#665)
Update the log level from EXCEPTION to WARNING when getting a KeyError
from the orchestrator. The KeyError is valid and happens when a build
has expired.
2021-01-22 14:40:37 -05:00
Kenny Lee Sin Cheong
6578618d9a Remove extra extra parameter when calling commit_sha (#660)
Remove extra extra parameter when calling commit_sha when a private key is used during a build
2021-01-20 10:58:19 -05:00
Alec Merdler
1346005404 fix default value for 'server_grpc_addr' in build manager (#657) 2021-01-14 18:33:43 -08:00
Kenny Lee Sin Cheong
cba3492970 Don't replace port by default 55443 if BUILDMAN_HOSTNAME is defined (#654) 2021-01-14 14:49:38 -05:00
Kenny Lee Sin Cheong
4819119fc2 fix-missing-comma (#650) 2021-01-12 12:25:29 -05:00
Kenny Lee Sin Cheong
d4aa9d5b5c Copy the certs needed to allow the clients (docker or podman) to operate on self signed registries (#647)
See:
- https://docs.docker.com/engine/security/certificates/
- https://github.com/containers/image/pull/594/files
2021-01-11 15:18:36 -05:00
Kenny Lee Sin Cheong
fb88294205 Make sure network is up before starting the quay-builder systemd service (#645)
Occasional DNS resolution issue would happen when running `podman
login` if network-online.target was not a prerequisite for quay-builder.service
2021-01-08 12:05:07 -05:00
Kenny Lee Sin Cheong
64df754da0 PROJQUAY-1392 prevent over shrinking vm image (#642)
* Prevent shrinking the qemu image smaller than the vdisk size

* Mount correct cert directory on builder container
2021-01-07 14:29:12 -05:00
Kenny Lee Sin Cheong
bb0381f17c Allow build canceller to set keys in orchestrator (#639) 2021-01-05 11:18:31 -05:00
Kenny Lee Sin Cheong
709e487a8c Add a --shrink flag when resizing the qemu image. (#635)
Newer version of qemu will return a non-zero error when --shrink is not set when resizing an image.
2021-01-04 11:19:07 -05:00