Skip to content

IBX-12173: Added Varnish 9 VCL - #84

Open
vidarl wants to merge 4 commits into
IBX-12244-varnish7-vcl-hitfrom
IBX-12173_support_for_varnish9
Open

IBX-12173: Added Varnish 9 VCL#84
vidarl wants to merge 4 commits into
IBX-12244-varnish7-vcl-hitfrom
IBX-12173_support_for_varnish9

Conversation

@vidarl

@vidarl vidarl commented Aug 4, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12173

Caution

DO-NOT-MERGE : PR contains TMP commit with dependencies.json for making CI green

Caution

This PR cannot be merged up as-is as vcl files are different in here vs 5.0. Code for 5.0 is prepared in separate branch: IBX-12173_support_for_varnish9_50

Caution

I based this on IBX-12244-varnish7-vcl-hit for the time being as it is dependent on #86 . However, this one should be merged into 4.6 after #86, not merged into IBX-12244-varnish7-vcl-hit.

Related PRs:

Description:

Adds docs/varnish/vcl/varnish9.vcl for Varnish 9. VCL 4.1 syntax is unchanged between Varnish 7 and 9, so this file is
identical to varnish7.vcl apart from the header comment.

Note:
The SonarCloud warnings are false positives, claiming full commit SHA hash should be used for GitHub actions. But they refer to ibexa repos and can be considered safe

For QA:

Documentation:

@konradoboza konradoboza left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @vidarl! Side note: since 5.0 we most likely need that in https://github.com/ibexa/cloud/blob/5.0/resources/upsun/common/5.0/.platform/varnish.vcl too.

@bnowak bnowak left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved to ublock topic, based on it's 1:1 copy between versions.
I don't know vcl much, so if you want to have more confidence, please wait for some more reviewers 😉

@vidarl

vidarl commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @vidarl! Side note: since 5.0 we most likely need that in https://github.com/ibexa/cloud/blob/5.0/resources/upsun/common/5.0/.platform/varnish.vcl too.

@konradoboza :PR created : ibexa/cloud#12
Talked to @barw4 and we think there is no need to merge up to 5.0 in ibexa/post-install as it is replaced by ibexa/cloud. Give me ping if you disagree

@vidarl
vidarl changed the base branch from 4.6 to IBX-12244-varnish7-vcl-hit August 12, 2026 12:15
@vidarl
vidarl force-pushed the IBX-12173_support_for_varnish9 branch from 83221ba to 4e98423 Compare August 12, 2026 12:18
@vidarl
vidarl changed the base branch from IBX-12244-varnish7-vcl-hit to 4.6 August 12, 2026 12:35
@vidarl
vidarl changed the base branch from 4.6 to IBX-12244-varnish7-vcl-hit August 12, 2026 12:36
@vidarl

vidarl commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Sonar Cloud complains about Github actions can be ignored, ref discussion on #php-team - https://ibexa.slack.com/archives/C06GPEY4542/p1786537399709099

@vidarl

vidarl commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

I am re-requesting reviews on this one, as I have added two more commits.

@vidarl
vidarl requested review from barw4, bnowak and konradoboza August 12, 2026 13:46

@barw4 barw4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 but aren't we missing some yml config as CI shows?

@sonarqubecloud

sonarqubecloud Bot commented Aug 13, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@vidarl

vidarl commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

+1 but aren't we missing some yml config as CI shows?

@barw4 : I added 41e2e28 ( [TMP] Added dependencies.json linking ibexa/docker PR #64 ) in order to make CI green

set req.backend_hint = ezplatform;

// Add a Surrogate-Capability header to announce ESI support.
set req.http.Surrogate-Capability = "abc=ESI/1.0";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can this be e.g. ibx instead of abc?

sub vcl_recv {

// Set the backend
set req.backend_hint = ezplatform;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm assuming ezplatform is going to change in either 5.0 or 6.0 merge up?

set req.url = std.querysort(req.url);

// Retrieve client user context hash and add it to the forwarded request.
call ez_user_context_hash;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Q: did we change this in 5.0 or 6.0? If so, then worth remembering on a merge up.

// Handle purge
// You may add FOSHttpCacheBundle tagging rules
// See http://foshttpcache.readthedocs.org/en/latest/varnish-configuration.html#id4
sub ez_purge {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Naming: Can this be ibx_purge instead? I'm fine with new code referencing the new namespace identifiers despite inconsistency. Distinguishes new vs legacy solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants