Skip to content

[vcl] Better debug #28944

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

Merged
merged 3 commits into from
Feb 24, 2024
Merged

Conversation

gquintard
Copy link
Contributor

@gquintard gquintard commented Jun 30, 2020

Detecting if the response is a hit usingthe x-varnish header is flaky
and notably doesn't work in a multi-tier setup.

On top of this, HIT/MISS is a false dichotomy (https://info.varnish-software.com/blog/using-obj-hits)
and while I'd like something more detailed like
https://docs.varnish-software.com/tutorials/hit-miss-logging/ (tech
version of the blog), I recognize that it's "a lot" of VCL, so this
commit only differentiates between hits, misses and passes, the latter
being pretty useful to identify while debugging.

note: all versions have been changed for the sake of consistency
but both the 4.x and 5.x series have been EOL'd a (long) while ago and users
should be encouraged to upgraded as soon as possible.

edit: I've added a test that you can run with varnishtest dev/tests/varnish/*.vtc since the current php suite doesn't correctly test the committed VCL. It would probably be smart to run that command as part of the test suite, but I'll leave that to more knowledgeable people than myself.

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)
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] [vcl] Better debug #37912: [vcl] Better debug

@m2-assistant
Copy link

m2-assistant bot commented Jun 30, 2020

Hi @gquintard. Thank you for your contribution
Here is some useful tips 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

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

@gquintard
Copy link
Contributor Author

@magento run all tests

@lbajsarowicz
Copy link
Contributor

@magento run Unit Tests

lbajsarowicz
lbajsarowicz previously approved these changes Jun 30, 2020
Copy link
Contributor

@lbajsarowicz lbajsarowicz left a comment

Choose a reason for hiding this comment

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

✔️ Thank you for your expertise!

@magento-engcom-team
Copy link
Contributor

Hi @lbajsarowicz, thank you for the review.
ENGCOM-7766 has been created to process this Pull Request
✳️ @lbajsarowicz, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@lbajsarowicz
Copy link
Contributor

@magento run Integration Tests, Functional Tests CE

@gquintard
Copy link
Contributor Author

@lbajsarowicz, apologies for my ignorance, is there anything I should do here?

@lbajsarowicz
Copy link
Contributor

@gquintard No. Now we wait for the process of the merge to be performed.

@engcom-Alfa engcom-Alfa mentioned this pull request Jul 24, 2020
4 tasks
@lbajsarowicz lbajsarowicz added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Jul 24, 2020
@lbajsarowicz
Copy link
Contributor

Automated Tests are not applicable, as the change is related to infrastructure configuration.

@sdzhepa sdzhepa added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Aug 11, 2020
@sidolov sidolov added Priority: P3 May be fixed according to the position in the backlog. Risk: low Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. and removed Priority: P3 May be fixed according to the position in the backlog. labels Sep 10, 2020
@engcom-Bravo
Copy link
Contributor

Dev experience is required for testing of this PR. Please note that Manual testing has not been performed.

@andrewbess
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.

@andrewbess
Copy link
Contributor

Hello @gquintard
Thank you for your contribution
Could you please change commit messages to more relevant?
I think the message: "[varnish] fix debug.vtc on mac" is not clear and doesn't describe your fixes.
Thank you in advance

@gquintard
Copy link
Contributor Author

hi @andrewbess, sure. Can I do that once we are just about to merge? I'll rebase an squash at that time.

@andrewbess
Copy link
Contributor

hi @andrewbess, sure. Can I do that once we are just about to merge? I'll rebase an squash at that time.

Yes, of course
Thank you

Copy link
Contributor

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

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

The fixes look nice for me
Approved

@andrewbess
Copy link
Contributor

@magento run Functional Tests EE, 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

@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 19, 2024

✔️ QA Passed

Preconditions:
This PR differentiates between hits, misses, and passes, the latter being pretty useful to identify while debugging.

Manual testing scenario:
Run the below varnishtest command to check whether it is working fine or not:

varnishtest dev/tests/varnish/debug.vtc

Actual Result: ✔️

The above test should show passed as below:
image

Failed Test seems flaky to me hence moving this PR in merge in progress

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

@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

@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 30, 2024

The failed B2B test seems flaky to me. Please refer to the below screenshots:

**B2B Failed Test 1 **
image

B2B Failed Test 2
image

@gquintard
Copy link
Contributor Author

We've established earlier that the VCL code changes aren't taken into account by automated tests (the test used the system-wide VCL which doesn't match the in-repository code). I do believe it's an issue in itself, but I'm fairly confident the flaky tests aren't caused by this change.

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 7d7bf7d into magento:2.4-develop Feb 24, 2024
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: category of expertise Award: test coverage Component: PageCache Priority: P3 May be fixed according to the position in the backlog. Progress: accept Project: Community Picked PRs upvoted by the community Release Line: 2.4 Risk: low Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] [vcl] Better debug