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

refactor: add t parameter for plugin bundle resources #4804

Merged

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Nov 1, 2023

What type of PR is this?

/area console
/kind improvement
/milestone 2.11.x

What this PR does / why we need it:

为插件的 bundle.css 和 bundle.js 重定向请求添加时间戳参数,防止被浏览器、Nginx、CDN 服务缓存,导致插件的资源不能及时更新。

Which issue(s) this PR fixes:

Fixes #4803

Special notes for your reviewer:

测试方式:

  1. 在 Firefox 浏览器测试启动和停止若干插件,观察插件提供的 UI 样式是否正常即可。

Does this PR introduce a user-facing change?

优化 Console 端插件捆绑资源的请求,防止在操作插件状态之后无法及时更新资源。

Signed-off-by: Ryan Wang <i@ryanc.cc>
@f2c-ci-robot f2c-ci-robot bot added area/console Issues or PRs related to the Halo Console release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 1, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.11.x milestone Nov 1, 2023
@f2c-ci-robot f2c-ci-robot bot added the kind/improvement Categorizes issue or PR as related to a improvement. label Nov 1, 2023
@ruibaby
Copy link
Member Author

ruibaby commented Nov 1, 2023

/cherry-pick release-2.10

@halo-dev-bot
Copy link
Collaborator

@ruibaby: once the present PR merges, I will cherry-pick it on top of release-2.10 in a new PR and assign it to you.

In response to this:

/cherry-pick release-2.10

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.

Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Merging #4804 (f40f34e) into main (dcf0996) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #4804   +/-   ##
=========================================
  Coverage     61.46%   61.46%           
  Complexity     2798     2798           
=========================================
  Files           403      403           
  Lines         14783    14783           
  Branches       1031     1031           
=========================================
  Hits           9086     9086           
  Misses         5202     5202           
  Partials        495      495           

Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Nov 1, 2023
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

It works very well.

image

/approve

Copy link

f2c-ci-robot bot commented Nov 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

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

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 2, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit a8a5413 into halo-dev:main Nov 2, 2023
4 checks passed
@JohnNiang
Copy link
Member

Hi @ruibaby ,当前修复需要发布到 release-2.10 分支么?

@ruibaby
Copy link
Member Author

ruibaby commented Nov 2, 2023

/cherry-pick release-2.10

@ruibaby ruibaby deleted the fix/bundle-css-not-request-in-firefox branch November 2, 2023 07:47
@halo-dev-bot
Copy link
Collaborator

@ruibaby: new pull request created: #4816

In response to this:

/cherry-pick release-2.10

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.

f2c-ci-robot bot pushed a commit that referenced this pull request Nov 2, 2023
…4816)

This is an automated cherry-pick of #4804

/assign ruibaby

```release-note
优化 Console 端插件捆绑资源的请求,防止在操作插件状态之后无法及时更新资源。
```
@JohnNiang JohnNiang modified the milestones: 2.11.x, 2.11.0 Nov 6, 2023
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/console Issues or PRs related to the Halo Console kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

在 Firefox 浏览器下,启动和停止插件可能无法重新请求插件的捆绑 CSS
4 participants