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

Add debug logging of the usage of array access methods so that we can… #3013

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

cooperaj
Copy link
Contributor

@cooperaj cooperaj commented Dec 17, 2024

… discover all the hidden places it's being used.

Purpose

Whilst trying to get the feature flagged tests working when it's enabled I keep coming across bits of the app that were never migrated to the new interfaces and continue to use the old array access.

This PR adds debug logging to those usages so that we can see them in the logs.

It's quite possible that even whilst not logging at the debug level there will be a performance impact in production since the data is still collected. If that's found to be the case then we should back it out.

Approach

Add log calls to offset* methods.

Learning

If we'd done our due diligence when putting together the interim Sirius object and had mandated the usage of a factory class to build them (instead of 'newing' up everywhere) this PR would be about 4 files and 3 hours less work.

Checklist (tick/delete or strikethrough as appropriate)

  • I have performed a self-review of my own code
  • I have added tests to prove my work
  • I have added relevant and appropriately leveled logging, without PII, to my code
  • New event_codes have been documented on the wiki page
  • I have updated documentation (Confluence/GitHub wiki/tech debt doc)
  • I have added welsh translation tags and updated translation files
  • I have run an accessibility tool on any pages I have made changes to and fixed any issues found
  • I have notified the Interaction Designer of any content changes so that appropriate screenshots/flow diagram changes can be made
  • The product team have tested these changes

@cooperaj cooperaj requested a review from a team as a code owner December 17, 2024 18:45
@github-actions github-actions bot added php Pull requests that update Php code service-api labels Dec 17, 2024
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.93%. Comparing base (f00760a) to head (deec2b0).
Report is 202 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3013      +/-   ##
============================================
+ Coverage     91.25%   91.93%   +0.68%     
- Complexity     1504     1778     +274     
============================================
  Files           309      389      +80     
  Lines          6393     8263    +1870     
============================================
+ Hits           5834     7597    +1763     
- Misses          542      649     +107     
  Partials         17       17              
Flag Coverage Δ
use-an-lpa-admin 78.85% <ø> (-0.41%) ⬇️
use-an-lpa-api 97.30% <100.00%> (-0.07%) ⬇️
use-an-lpa-front 90.69% <ø> (+1.15%) ⬆️
Files with missing lines Coverage Δ
...p/src/App/src/DataAccess/ApiGateway/SiriusLpas.php 98.79% <100.00%> (-1.21%) ⬇️
...vice-api/app/src/App/src/Service/Lpa/SiriusLpa.php 96.42% <100.00%> (ø)
...e-api/app/src/App/src/Service/Lpa/SiriusPerson.php 95.91% <100.00%> (ø)

... and 223 files with indirect coverage changes

@cooperaj cooperaj force-pushed the add-debug-logging-of-array-usage branch from b21b589 to deec2b0 Compare December 18, 2024 16:22
@cooperaj cooperaj merged commit 6c72e3f into main Dec 19, 2024
34 checks passed
@cooperaj cooperaj deleted the add-debug-logging-of-array-usage branch December 19, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
php Pull requests that update Php code service-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants