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 an error when resources can't be loaded in context cache generation #16508

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

Mark-H
Copy link
Collaborator

@Mark-H Mark-H commented Jan 10, 2024

What does it do?

Checks for errors loading resources in the generation of the context cache.

Why is it needed?

This is used in the aliasMap and resourceMap, but would fail silently if the query failed. In the specific case preceding this PR, the problem was a borked migration, but it took too much sleuthing to figure out where it was failing exactly due to this information not being available.

How to test

Make sure no message gets logged in normal use.

Related issue(s)/PR(s)

N/a

@Mark-H Mark-H requested a review from opengeek as a code owner January 10, 2024 17:52
@Mark-H Mark-H added this to the v3.0.5 milestone Jan 10, 2024
Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (32aba73) 17.95% compared to head (62bbe83) 21.68%.
Report is 59 commits behind head on 3.x.

Files Patch % Lines
core/src/Revolution/mysql/modContext.php 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.x   #16508      +/-   ##
============================================
+ Coverage     17.95%   21.68%   +3.73%     
- Complexity    10442    10497      +55     
============================================
  Files           561      561              
  Lines         39051    31706    -7345     
============================================
- Hits           7010     6877     -133     
+ Misses        32041    24829    -7212     

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

@opengeek opengeek merged commit fe2df18 into modxcms:3.x Apr 10, 2024
7 checks passed
opengeek pushed a commit that referenced this pull request Apr 10, 2024
### What does it do?
Checks for errors loading resources in the generation of the context
cache.

### Why is it needed?
This is used in the aliasMap and resourceMap, but would fail silently if
the query failed. In the specific case preceding this PR, the problem
was a borked migration, but it took too much sleuthing to figure out
where it was failing exactly due to this information not being
available.

### How to test
Make sure no message gets logged in normal use. 

### Related issue(s)/PR(s)
N/a
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.

2 participants