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

Fixes #6922 3.17: Hashes are not removed from the source when there is no LRC data #6937

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

Khadreal
Copy link
Contributor

@Khadreal Khadreal commented Sep 2, 2024

Description

Hashes should be removed when visiting uncached page that have [] LRC in DB

Fixes #6922

Type of change

  • Bug fix (non-breaking change which fixes an issue).

Detailed scenario

Please check #6922 for detailed scenario.

Technical description

Updatehas_lrc method in LazyRenderContent database row to check for '[]' instead of 'not found' which doesn't exist in db records and updated the optimize method to return html without hashes when the logic checks passed.

Documentation

Hashes should be removed when visiting uncached page that have [] LRC in DB

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I did not introduce unnecessary complexity.

@Khadreal Khadreal changed the base branch from develop to feature/lrc September 2, 2024 10:40
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 1d52f9d1 62.13% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1d52f9d) Report Missing Report Missing Report Missing
Head commit (0ea0a6b) 37911 16526 43.59%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6937) 573 356 62.13%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

Copy link

codacy-production bot commented Sep 2, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.04% (target: -0.10%) 100.00% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (88bfea5) 37910 16525 43.59%
Head commit (5c93aed) 37912 (+2) 16541 (+16) 43.63% (+0.04%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6937) 5 5 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@Khadreal Khadreal marked this pull request as ready for review September 2, 2024 10:52
@Khadreal Khadreal requested a review from a team September 2, 2024 10:52
@Khadreal Khadreal self-assigned this Sep 2, 2024
@Khadreal Khadreal added the type: bug Indicates an unexpected problem or unintended behavior label Sep 2, 2024
@Khadreal Khadreal changed the title Fixes #6922 Fixes #6922 3.17: Hashes are not removed from the source when there is no LRC data Sep 2, 2024
@Khadreal Khadreal added the module: ALR Issues related to the Automatic Lazy Rendering feature label Sep 2, 2024
@Mai-Saad
Copy link
Contributor

Mai-Saad commented Sep 3, 2024

@MathieuLamiot
Copy link
Contributor

Test plan all 🆗 for me. @wp-media/qa-team Feel free to merge or explore more if you prefer 👍

@Mai-Saad Mai-Saad merged commit 1b921c1 into feature/lrc Sep 6, 2024
13 checks passed
@Mai-Saad Mai-Saad deleted the fix/6922-3.17-hashes-not-removed branch September 6, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: ALR Issues related to the Automatic Lazy Rendering feature type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.17: Hashes arenot removed from the source when there is no LRC data
4 participants