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

Fix the issue that the expires shortened after merging cloned mirror #1051

Merged
merged 8 commits into from
Jan 13, 2021

Conversation

lucklove
Copy link
Member

@lucklove lucklove commented Jan 8, 2021

What problem does this PR solve?

For the cloned mirror, we set the expires filed expire after 50 years since the user rarely modify the mirror so we can assume that's safe. However, when the user try to publish component to the cloned mirror, the problem occurred:the expire time will be shortened to just one. month because we think it's unsafe if the user need to modify it. It's OK when the user need to modify it frequently, because every time he modify it, the expire time will be push forward to a month latter. However, what if the user just modify it once and use it alone the time? The mirror will expire after a month so that the user must modify it again in a month even though he don't want to do that.

What is changed and how it works?

We compare the new expire time and the old one, use the longer one.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

NONE

@ti-chi-bot ti-chi-bot requested review from july2993 and lonng January 8, 2021 11:26
@lucklove lucklove added the type/bug-fix Categorizes PR as a bug-fix label Jan 8, 2021
@ti-chi-bot ti-chi-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 8, 2021
@lucklove lucklove added this to the v1.3.2 milestone Jan 8, 2021
@codecov-io
Copy link

codecov-io commented Jan 8, 2021

Codecov Report

Merging #1051 (eaebd26) into master (5dd25ae) will decrease coverage by 0.08%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1051      +/-   ##
==========================================
- Coverage   55.98%   55.89%   -0.09%     
==========================================
  Files         282      282              
  Lines       19892    19896       +4     
==========================================
- Hits        11136    11121      -15     
- Misses       7032     7044      +12     
- Partials     1724     1731       +7     
Flag Coverage Δ
cluster 43.98% <0.00%> (-0.10%) ⬇️
dm 24.04% <0.00%> (-0.01%) ⬇️
integrate 50.20% <57.14%> (-0.09%) ⬇️
playground 20.29% <0.00%> (-0.02%) ⬇️
tiup 16.48% <57.14%> (-0.03%) ⬇️
unittest 22.25% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/repository/v1manifest/manifest.go 52.25% <57.14%> (-0.73%) ⬇️
pkg/utils/http_client.go 67.56% <0.00%> (-5.41%) ⬇️
pkg/cluster/api/pdapi.go 58.67% <0.00%> (-3.48%) ⬇️
pkg/repository/store/txn.go 59.68% <0.00%> (-2.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5dd25ae...eaebd26. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 12, 2021
@AstroProfundis
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: c1cbe13

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 12, 2021
@ti-chi-bot
Copy link
Member

@lucklove: Your PR has out-of-dated, I have automatically updated it for you.

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 ti-community-infra/ti-community-prow repository.

@ti-chi-bot ti-chi-bot merged commit fdc32c5 into pingcap:master Jan 13, 2021
lucklove added a commit that referenced this pull request Jan 28, 2021
…1051)

Co-authored-by: Ti Prow Robot <71242396+ti-community-prow-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/bug-fix Categorizes PR as a bug-fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants