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

feat: revalidate latest version #573

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

elrrrrrrr
Copy link
Member

closes #376: fix issue with incomplete binary file after upstream release or sync failure

  • 🧶 Modify the binary diff method, adding latest version check method.
  • ♻️ Perform additional comparison on the latest version, without modifying existing data.

修复 #376 ,兼容上游发布或同步失败后,产物同步不全的问题

  • 🧶 调整 binary diff 方法,添加最新版本校验逻辑
  • ♻️ 对最新版本的子目录进行额外比对,存量数据不做修改

@elrrrrrrr elrrrrrrr added the bug Something isn't working label Aug 22, 2023
@elrrrrrrr elrrrrrrr requested a review from fengmk2 August 22, 2023 07:16
@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #573 (e824a1a) into master (ab2fde7) will decrease coverage by 0.04%.
Report is 30 commits behind head on master.
The diff coverage is 97.67%.

@@            Coverage Diff             @@
##           master     #573      +/-   ##
==========================================
- Coverage   97.02%   96.99%   -0.04%     
==========================================
  Files         174      175       +1     
  Lines       16588    16774     +186     
  Branches     2177     2202      +25     
==========================================
+ Hits        16095    16270     +175     
- Misses        493      504      +11     
Files Changed Coverage Δ
app/port/webauth/WebauthController.ts 85.59% <78.94%> (+0.53%) ⬆️
app/common/PackageUtil.ts 97.61% <90.90%> (-1.42%) ⬇️
app/core/service/PackageSyncerService.ts 98.21% <91.66%> (-0.01%) ⬇️
app/common/FileUtil.ts 100.00% <100.00%> (ø)
app/common/UserUtil.ts 100.00% <100.00%> (ø)
app/common/adapter/CacheAdapter.ts 100.00% <100.00%> (ø)
app/common/adapter/NPMRegistry.ts 100.00% <100.00%> (ø)
app/common/adapter/binary/AbstractBinary.ts 94.17% <100.00%> (+0.11%) ⬆️
app/common/adapter/binary/NodePreGypBinary.ts 98.69% <100.00%> (+<0.01%) ⬆️
app/common/adapter/binary/PlaywrightBinary.ts 99.26% <100.00%> (+0.03%) ⬆️
... and 31 more

... and 2 files with indirect coverage changes

Copy link
Member

@fengmk2 fengmk2 left a comment

Choose a reason for hiding this comment

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

+1

@fengmk2 fengmk2 merged commit 73b4383 into master Aug 22, 2023
@fengmk2 fengmk2 deleted the revalidate-latest-version branch August 22, 2023 07:41
fengmk2 pushed a commit that referenced this pull request Aug 22, 2023
[skip ci]

## [3.42.0](v3.41.0...v3.42.0) (2023-08-22)

### Features

* revalidate latest version ([#573](#573)) ([73b4383](73b4383)), closes [#376](#376)
@@ -262,9 +269,23 @@ export class BinarySyncerService extends AbstractService {
existsItem.sourceUrl = item.url;
existsItem.ignoreDownloadStatuses = item.ignoreDownloadStatuses;
existsItem.date = item.date;
} else if (dir.endsWith(latestVersionParent)) {
const isLatestItem = sortBy(fetchItems, [ 'date' ]).pop()?.name === item.name;
Copy link
Member

Choose a reason for hiding this comment

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

#698 这里有性能问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

binary 同步有异常
2 participants