Website: Netlify changes to redirects behavior about forced rules and file shadowing

Created on 13 Mar 2020  ·  14Comments  ·  Source: kubernetes/website

This is a Bug Report
According the netlify announcement, If you have a redirect rule that’s not explicitly marked as forced, and you also have a file under the same path, we will serve the file.

See details with netlify announcement: https://community.netlify.com/t/changed-behavior-in-redirects/10084 , netlify will change the redirects behavior about forced rules and file shadowing, and we need to check the affected redirect rules and correct them if needed.


Problem:
Some redirect rules may broken.

Proposed Solution:
Correct them if needed.

Page to Update:

  • [x] Update redirects, branch:master, PR #19695
  • [ ] Update redirects, branch: 1.16
  • [ ] Update redirects, branch: 1.15
  • [ ] Update redirects, branch: 1.14
  • [ ] Update redirects, branch: 1.13


kinbug prioritimportant-soon

Most helpful comment

I think this is kind of done: Netlify have already made the changes, @kbhawkey and others put effort in beforehand to plan for it, and the site still looks OK.

Is there more to do?

All 14 comments

/kind bug

priority to this?
/priority important-soon

We think (without detailed checking so far) that this will need changes to fix it
/cc

@sftim Could you please paste the netlify mail content ( the checklist ) into this issue, just like kubeflow/website 1794 did, it could help us more effectively track the needed changes.


The redirect rules listed below are currently behaving as forced redirects (redirecting past existing content), even though you haven’t explicitly configured them to do so. You may want to check each redirect to be sure you want to continue this behavior, and if so, explicitly mark the rule as forced. In a _redirects file, you can do this by adding ! to the redirect status code. In a netlify.toml file, add the key and value force=true.

The following redirect rules might be affected by this change:

/api-ref/ ... https://github.com/kubernetes/kubernetes/milestones/ 301 ...
/concepts/containers/container-lifecycle-hooks/ ... /docs/concepts/containers/container-lifecycle-hooks/ 301 ...
/docs/ ... /docs/home/ 301 ...
/de/docs/ ... /de/docs/home/ 301 ...
/es/docs/ ... /es/docs/home/ 301 ...
/fr/docs/ ... /fr/docs/home/ 301 ...
/id/docs/ ... /id/docs/home/ 301 ...
/ja/docs/ ... /ja/docs/home/ 301 ...
/ko/docs/ ... /ko/docs/home/ 301 ...
/no/docs/ ... /no/docs/home/ 301 ...
/pl/docs/ ... /pl/docs/home/ 301 ...
/pt/docs/ ... /pt/docs/home/ 301 ...
/ru/docs/ ... /ru/docs/home/ 301 ...
/vi/docs/ ... /vi/docs/home/ 301 ...
/zh/docs/ ... /zh/docs/home/ 301 ...
/blog/2018/03/kubernetes-1.10-stabilizing-storage-security-networking/ ... /blog/2018/03/27/kubernetes-1.10-stabilizing-storage-security-networking/ 301 ...
/docs/admin/ ... /docs/concepts/cluster-administration/cluster-administration-overview/ 301 ...
/docs/admin/add-ons/ ... /docs/concepts/cluster-administration/addons/ 301 ...
/docs/admin/addons/ ... /docs/concepts/cluster-administration/addons/ 301 ...
/docs/admin/apparmor/ ... /docs/tutorials/clusters/apparmor/ 301 ...
/docs/admin/audit/ ... /docs/tasks/debug-application-cluster/audit/ 301 ...
/docs/admin/authorization/rbac.md ... /docs/admin/authorization/rbac/ 301 ...
/docs/admin/cluster-components/ ... /docs/concepts/overview/components/ 301 ...
/docs/admin/cluster-management/ ... /docs/tasks/administer-cluster/cluster-management/ 301 ...
/docs/admin/cluster-troubleshooting/ ... /docs/tasks/debug-application-cluster/debug-cluster/ 301 ...
/docs/admin/daemons/ ... /docs/concepts/workloads/controllers/daemonset/ 301 ...
/docs/admin/disruptions/ ... /docs/concepts/workloads/pods/disruptions/ 301 ...
/docs/admin/dns/ ... /docs/concepts/services-networking/dns-pod-service/ 301 ...
/docs/admin/etcd/ ... /docs/tasks/administer-cluster/configure-upgrade-etcd/ 301 ...
/docs/admin/etcd_upgrade/ ... /docs/tasks/administer-cluster/configure-upgrade-etcd/ 301 ...
/docs/admin/extensible-admission-controllers.md ... /docs/admin/extensible-admission-controllers/ 301 ...
/docs/admin/garbage-collection/ ... /docs/concepts/cluster-administration/kubelet-garbage-collection/ 301 ...
/docs/admin/ha-master-gce/ ... /docs/tasks/administer-cluster/highly-available-master/ 301 ...
/docs/admin/ha-master-gce.md/ ... /docs/tasks/administer-cluster/highly-available-master/ 301 ...
/docs/admin/high-availability/ ... /docs/admin/high-availability/building/ 301 ...
/docs/admin/kubeadm-upgrade-1-7/ ... /docs/tasks/administer-cluster/upgrade-downgrade/kubeadm-upgrade-1-7/ 301 ...
/docs/admin/kubelet-authentication-authorization/ ... /docs/reference/command-line-tools-reference/kubelet-authentication-authorization/ 301 ...
/docs/admin/kubelet-tls-bootstrapping/ ... /docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/ 301 ...
/docs/admin/limitrange/ ... /docs/tasks/administer-cluster/cpu-memory-limit/ 301 ...
/docs/admin/limitrange/Limits/ ... /docs/tasks/administer-cluster/limit-storage-consumption/#limitrange-to-limit-requests-for-storage/ 301 ...
/docs/admin/master-node-communication/ ... /docs/concepts/architecture/master-node-communication/ 301 ...
/docs/admin/multiple-schedulers/ ... /docs/tasks/administer-cluster/configure-multiple-schedulers/ 301 ...
/docs/admin/namespaces/ ... /docs/tasks/administer-cluster/namespaces/ 301 ...
/docs/admin/namespaces/walkthrough/ ... /docs/tasks/administer-cluster/namespaces-walkthrough/ 301 ...
/docs/admin/network-plugins/ ... /docs/concepts/cluster-administration/network-plugins/ 301 ...
/docs/admin/networking/ ... /docs/concepts/cluster-administration/networking/ 301 ...
/docs/admin/node/ ... /docs/concepts/architecture/nodes/ 301 ...
/docs/admin/node-allocatable/ ... /docs/tasks/administer-cluster/reserve-compute-resources/ 301 ...
/docs/admin/node-allocatable.md ... /docs/tasks/administer-cluster/reserve-compute-resources/ 301 ...
/docs/admin/node-conformance.md ... /docs/admin/node-conformance/ 301 ...
/docs/admin/node-problem/ ... /docs/tasks/debug-application-cluster/monitor-node-health/ 301 ...

@Colstuwjx would you be willing to revise the issue description to match?

Yes, let me give a try.
/assign

@sftim Sorry, I misread it. I have been updated the issue description, added the checklist.

@Colstuwjx Thanks for opening an issue with these changes.

We're receiving multiple emails for different production branches. (Each past release has its own production branch.) Because multiple branches are affected, I think it makes sense to:

  1. Treat this issue as an umbrella issue. ☂️
  2. Open separate issue with redirects for each affected branch.
  3. Change this issue's description to:
    a. Remove redirects from the description
    b. Add links to feature PRs under the umbrella

Thoughts?

As far as I know, the netlify redirects change would change the behavior to: if there is a redirect rule which the path matches the exist file, it would choose the file by default, and you need to set forced=true while you're very sure to do this redirect.

And I have scanned the redirect rules under the _redirects, it seems ONLY this line need to set forced=true, since it did have the specified file exists in our directory:

/docs/tasks/access-application-cluster/access-cluster.md     /docs/tasks/access-application-cluster/access-cluster/ 301!

and the others even don't have the directory or target file, so I think it's no need to change.
May I misunderstand ?

@Colstuwjx , Add a list of TODOs?

  • [X] Update redirects, branch:master, PR #19695
  • [x] Update redirects, branch: 1.16
  • [x] Update redirects, branch: 1.15
  • [x] Update redirects, branch: 1.14
  • [x] Update redirects, branch: 1.13

@kbhawkey Updated.

I think this is kind of done: Netlify have already made the changes, @kbhawkey and others put effort in beforehand to plan for it, and the site still looks OK.

Is there more to do?

@sftim Good call, I think we can close it.

Thank you, @Colstuwjx and @kbhawkey for your contributions here! ⭐

/close

@zacharysarah: Closing this issue.

In response to this:

@sftim Good call, I think we can close it.

Thank you, @Colstuwjx and @kbhawkey for your contributions here! ⭐

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seokho-son picture seokho-son  ·  3Comments

ahmetb picture ahmetb  ·  4Comments

jbeda picture jbeda  ·  4Comments

inductor picture inductor  ·  4Comments

zacharysarah picture zacharysarah  ·  4Comments