Skip to content

Conversation

ibazulic
Copy link
Member

The TESTING flag is used to set Quay in testing mode. In certain occasions (when Quay is deployed on VMs but config tool hasn't verified the validity of the configuration or when users build their own confuguration), this flag sometimes gets omitted from the end config.yaml file. When this happens, Quay will start with TESTING: true which will disable certain functionality (such as e-mail sending).
We add the check to app.py to notify the user that TESTING: false is missing or misconfigured in their config.yaml file. The change doesn't break Quay startup, merely prints a warning in the container logs when app.py gets initialized.

The `TESTING` flag is used to set Quay in testing mode. In certain occasions (when Quay is deployed on VMs but config tool hasn't verified the validity of the configuration or when users build their own confuguration), this flag sometimes gets omitted from the end `config.yaml` file. When this happens, Quay will start with `TESTING: true` which will disable certain functionality (such as e-mail sending).
We add the check to `app.py` to notify the user that `TESTING: false` is missing or misconfigured in their `config.yaml` file. The change doesn't break Quay startup, merely prints a warning in the container logs when `app.py` gets initialized.
@ibazulic ibazulic requested review from bcaton85 and kleesc October 18, 2024 18:55
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.60%. Comparing base (409d464) to head (e62fe34).
Report is 157 commits behind head on master.

Files with missing lines Patch % Lines
app.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3343      +/-   ##
==========================================
- Coverage   70.60%   70.60%   -0.01%     
==========================================
  Files         442      442              
  Lines       41942    41945       +3     
  Branches     4745     4746       +1     
==========================================
+ Hits        29613    29615       +2     
  Misses      10644    10644              
- Partials     1685     1686       +1     
Flag Coverage Δ
unit 70.60% <66.66%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

# Check if TESTING is properly set
if app.config.get("TESTING", False):
logger.warning(
"🟡🟡🟡 Detected TESTING: true on startup. TESTING property is either missing from config.yaml or set to 'true'."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting we default to starting quay in testing mode

@bcaton85 bcaton85 merged commit 82ad876 into quay:master May 29, 2025
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants