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

Default V6 VCL Template Logic #36492

Closed
5 tasks
icecactus opened this issue Nov 18, 2022 · 7 comments · Fixed by #36524
Closed
5 tasks

Default V6 VCL Template Logic #36492

icecactus opened this issue Nov 18, 2022 · 7 comments · Fixed by #36524
Assignees
Labels
Area: Performance Component: Cache Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: ready for confirmation Priority: P3 May be fixed according to the position in the backlog. Progress: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@icecactus
Copy link

icecactus commented Nov 18, 2022

Preconditions and environment

v2.4.5

Steps to reproduce

Navigate to a page that does a 301 redirect or has "private" in cache-control header with a status code of 200.

Expected result

I would think anything (200, 404, 301 etc) that has "private" in Cache-Control header would not get cached.

Actual result

https status 200 with private in Cache-Control header is now cached and a 301 is also now cached unless it has private in Cache-Control header.

Additional information

From #6150231 File: app/code/Magento/PageCache/etc/varnish6.vcl

Previous versions of generated VCL

# cache only successfully responses and 404s
    if (beresp.status != 200 && beresp.status != 404) {
        set beresp.ttl = 0s;
        set beresp.uncacheable = true;
        return (deliver);
    } elsif (beresp.http.Cache-Control ~ "private") {

New V6 generated VCL

# cache only successfully responses and 404s that are not marked as private
    if (beresp.status != 200  &&
            beresp.status != 404 &&
            beresp.http.Cache-Control ~ "private") {
        set beresp.uncacheable = true;
        set beresp.ttl = 86400s;
        return (deliver);

The logic changed on v6. Perhaps I misunderstand but shouldn't it be
if ((beresp.status != 200 && beresp.status != 404) || (beresp.http.Cache-Control ~ "private")) {

Im running into an issue with a 3rd party module where it no longer works correctly due to this change.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Nov 18, 2022

Hi @icecactus. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@hostep
Copy link
Contributor

hostep commented Nov 19, 2022

I think your remark makes sense. @gquintard what do you think?

@gquintard
Copy link
Contributor

indeed, that should have been

if ((beresp.status != 200 && beresp.status != 404) || (beresp.http.Cache-Control ~ "private")) {

@m2-community-project m2-community-project bot added the Priority: P3 May be fixed according to the position in the backlog. label Dec 13, 2022
@engcom-Lima engcom-Lima added Priority: P3 May be fixed according to the position in the backlog. and removed Priority: P3 May be fixed according to the position in the backlog. labels Dec 22, 2022
@m2-community-project m2-community-project bot added this to Pull Request In Progress in Low Priority Backlog Dec 22, 2022
@m2-community-project m2-community-project bot removed this from Ready for Confirmation in Issue Confirmation and Triage Board Dec 22, 2022
@engcom-Echo engcom-Echo added Area: Frontend Component: Cache Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 30, 2024
@github-jira-sync-bot
Copy link

❌ Something went wrong. Cannot create Jira issue.

@engcom-Echo engcom-Echo added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 30, 2024
@github-jira-sync-bot
Copy link

❌ Something went wrong. Cannot create Jira issue.

@engcom-Echo engcom-Echo added Area: Performance Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Area: Frontend Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 30, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-10944 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Jan 30, 2024

✅ Confirmed by @engcom-Echo. Thank you for verifying the issue.
Issue Available: @engcom-Echo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Performance Component: Cache Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: ready for confirmation Priority: P3 May be fixed according to the position in the backlog. Progress: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Development

Successfully merging a pull request may close this issue.

6 participants