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

[vcl] don't manually interfere with compression #38211

Merged

Conversation

gquintard
Copy link
Contributor

@gquintard gquintard commented Nov 22, 2023

Description (*)

Varnish already has default compression handling. This code only kicks into gear in case of a miss or a pass, and in those cases, the backend should be responsible for these.

Manual testing scenarios (*)

automated testing should do the job

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] [vcl] don't manually interfere with compression #38309: [vcl] don't manually interfere with compression

Copy link

m2-assistant bot commented Nov 22, 2023

Hi @gquintard. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance:
  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@engcom-Hotel engcom-Hotel added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Nov 22, 2023
@hostep
Copy link
Contributor

hostep commented Nov 22, 2023

This was also proposed in #36796, but since it lacked feedback from Adobe people it got closed.

Maybe taking things in smaller steps will have a bigger chance of being accepted (but knowing Adobe, it will still take months if not years 🙁 )

@ihor-sviziev
Copy link
Contributor

@magento run all tests

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Delta engcom-Delta added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Dec 8, 2023
@sinhaparul sinhaparul added the Project: Community Picked PRs upvoted by the community label Dec 18, 2023
@engcom-Echo
Copy link
Contributor

@magento create issue

@engcom-Hotel
Copy link
Contributor

@magento run Functional Tests B2B

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Hotel
Copy link
Contributor

engcom-Hotel commented Jan 2, 2024

Hello @gquintard,

Thanks for the contribution!

We need a testing scenario to check this PR manually. Please provide us with the same.

Meanwhile we are moving this PR On Hold.

Thanks

@gquintard
Copy link
Contributor Author

well, that's unexpected: pwd=<PATH>38211 What kind of platform are you running this on?

the "extra characters at the end of h command" error message makes no sense to me at the moment but I expect the > and < in the path are messing us up, so I did something very stupid to debug: I replicated the command multiple time, adding more and more arguments with every line, to see which argument causes the problem. If you could grab the latest version and share the new logs, it would be great.

(I've also quoted the path to avoid more issue, and it could solve the problem entirely, I'm unsure)

@engcom-Hotel
Copy link
Contributor

engcom-Hotel commented Jan 11, 2024

@gquintard Thanks for the quick workaround!

We are using Mac OS and set up the instance in our local machine.

After taking the latest pull, the test is still failing. Please refer to the updated log below:

test.log

We have just replaced our folder path with /DummyPath/ in the log file.

After digging into the compression.vtc file, I found that we need to pass an empty quote after the sed command for MAC machines. I added the same in the vtc file, but it shows failed. Please refer to the latest log file below:

test.log

Please let us know if we missed anything.

Thanks

Varnish already has [default compression handling](https://varnish-cache.org/docs/trunk/users-guide/compression.html#default-behaviour).
This code only kicks into gear in case of a `miss` or a `pass`, and in
those cases, the backend should be responsible for these.
@gquintard
Copy link
Contributor Author

@engcom-Hotel , thank you for your patience. I was able to get access to a mac thanks to the awesome @briiians, and it looks like on it, sed FILE -e EXPRESSION doesn't work (FILE is interpreted as an expression).

So, normally, this should be fixed, please have another look

@engcom-Hotel
Copy link
Contributor

@magento run all tests

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Hotel
Copy link
Contributor

@magento run Functional Tests B2B

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

Copy link
Contributor

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

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

The failed Functional Tests B2B test seems flaky to me.

Hence approving this PR.

@engcom-Hotel
Copy link
Contributor

✔️ QA Passed

Varnish already has default compression handling. This code only kicks into gear in case of a miss or a pass, and in those cases, the backend should be responsible for these.

Preconditions:

Varnish should be enabled as Full Page Cache

Manual testing scenario:

Run the below command to check the test result:
varnishtest dev/tests/varnish/compression.vtc

Actual Result: ✔️
The test should pass:
image

This PR is just an improvement.

Tested all the manual scenarios, no impact on regression testing.

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 795942b into magento:2.4-develop Feb 24, 2024
12 checks passed
@ihor-sviziev ihor-sviziev mentioned this pull request Mar 29, 2024
5 tasks
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: test coverage Component: PageCache Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Project: Community Picked PRs upvoted by the community Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Status: Recently Merged
Development

Successfully merging this pull request may close these issues.

[Issue] [vcl] don't manually interfere with compression
8 participants