Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log warning if DATABASES cannot be defined #2346

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

stveit
Copy link
Contributor

@stveit stveit commented Feb 15, 2022

Fixes #2341

logs a warning if something goes wrong while defining DATABASES.

Struggled a bit as the warning never showed up in the log when refreshing the site. I think my PHP experiences
have infected my brain, as I guess I assumed all code would be rerun for each refresh.

But the warning shows up when starting up (with docker-compose up) or after making changes to the code.

image
This is shown in the log during docker-compose up when I cause an error to happen.

Is this something along the lines of what is wanted?

@codecov
Copy link

codecov bot commented Feb 15, 2022

Codecov Report

Merging #2346 (672e8bf) into master (43a8657) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 672e8bf differs from pull request most recent head b9b44e5. Consider uploading reports for the commit b9b44e5 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2346      +/-   ##
==========================================
- Coverage   58.07%   58.07%   -0.01%     
==========================================
  Files         552      552              
  Lines       40206    40207       +1     
==========================================
- Hits        23351    23350       -1     
- Misses      16855    16857       +2     
Impacted Files Coverage Δ
python/nav/django/settings.py 97.59% <100.00%> (+0.02%) ⬆️
python/nav/web/maintenance/views.py 43.06% <0.00%> (-1.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43a8657...b9b44e5. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Feb 15, 2022

Test results

       14 files         14 suites   14m 48s ⏱️
  2 980 tests   2 884 ✔️   96 💤 0
11 394 runs  11 010 ✔️ 384 💤 0

Results for commit b9b44e5.

♻️ This comment has been updated with latest results.

@CLAassistant
Copy link

CLAassistant commented Feb 15, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

This is succinct and to-the-point 👍

I would merge this, but I ask that you squash the branch into a single commit first :)

@stveit stveit force-pushed the bugfix.config-error branch from 672e8bf to b9b44e5 Compare February 18, 2022 11:28
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lunkwill42 lunkwill42 merged commit e4e08ad into Uninett:master Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn when database config isn't readable
3 participants