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

Fastly: fix the cache rule for the version markers. #7518

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ameukam
Copy link
Member

@ameukam ameukam commented Nov 14, 2024

Related:

We do not capture the latest-1.txt and stable-1.txt due to the regex
rule define for all the version markers.

Related:
  - kubernetes#7447

We do not capture the latest-1.txt and stable-1.txt due to the regex
rule define for all the version markers.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 14, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ameukam

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 14, 2024
@k8s-ci-robot k8s-ci-robot added area/infra Infrastructure management, infrastructure design, code in infra/ sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 14, 2024
@ameukam
Copy link
Member Author

ameukam commented Nov 14, 2024

/hold

Not exactly sure about this regex rule.

how to test it:

echo "151.101.0.204 cdn.dl-sandbox.k8s.dev" > /etc/hosts
curl -vvv -H "fastly-debug:1" http://cdn.dl-sandbox.k8s.dev/release/latest-1.txt

A MISS is expected for this version marker

cc @BenTheElder

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 14, 2024
@@ -45,7 +45,7 @@ sub vcl_fetch {
}

# Ensure version markers are not cached at the edge
if (req.url.path ~ "^/release/(latest|stable)(-\d+(\.\d+))?\.txt\z") {
if (req.url.path ~ "^/release/(latest|stable)(-\d+(\.\d+)?)?\.txt\z") {
Copy link
Member

Choose a reason for hiding this comment

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

Why don't we do:

Suggested change
if (req.url.path ~ "^/release/(latest|stable)(-\d+(\.\d+)?)?\.txt\z") {
if (req.url.path ~ "^/release/(latest|stable)([^/]*)\.txt\z") {

So any top level release file that starts with latest or stable, ends with .txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/infra Infrastructure management, infrastructure design, code in infra/ cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants