Skip to content

fix: revalidate sort bug - #647

Open
UestcCarpediem wants to merge 1 commit into
cnpm:masterfrom
UestcCarpediem:fix/revalidate_sort
Open

UestcCarpediem wants to merge 1 commit into
cnpm:masterfrom
UestcCarpediem:fix/revalidate_sort

Conversation

@UestcCarpediem

@UestcCarpediem UestcCarpediem commented Jan 31, 2024 •

Copy link
Copy Markdown

#646 修复在同步过程中,revalidate 时 lodash sortby 无法正常将 18-Dec-2019 16:41 格式的date排序导致 diff 添加了非预期的 dir

@fengmk2

fengmk2 commented Jan 31, 2024

Copy link
Copy Markdown
Member

得加个单测确保一下

@codecov

codecov Bot commented Jan 31, 2024 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.82%. Comparing base (64bb78c) to head (2470621).
⚠️ Report is 394 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #647   +/-   ##
=======================================
  Coverage   96.82%   96.82%           
=======================================
  Files         180      180           
  Lines       17626    17630    +4     
  Branches     2293     2297    +4     
=======================================
+ Hits        17067    17071    +4     
  Misses        559      559           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@UestcCarpediem

Copy link
Copy Markdown
Author

得加个单测确保一下

又调整了一下,排序放在循环体内,复杂度为n平方,有超时风险。

@fengmk2
fengmk2 requested a review from elrrrrrrr March 8, 2024 04:03
@fengmk2 fengmk2 changed the title fix revalidate sort bug fix: revalidate sort bug Mar 8, 2024
@fengmk2 fengmk2 added the bug Something isn't working label Mar 8, 2024
Comment thread app/core/service/BinarySyncerService.ts Outdated
}
const latestItem = sortBy(fetchItems, item => {
return new Date(item.date);
}).pop();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

如果 dir.endsWith(latestVersionParent) 不满足的时候时候不需要设置 🤔

@elrrrrrrr

Copy link
Copy Markdown
Member

@UestcCarpediem 用例修复下? 🙏🏻

@UestcCarpediem

Copy link
Copy Markdown
Author

@UestcCarpediem 用例修复下? 🙏🏻

好的

@UestcCarpediem

Copy link
Copy Markdown
Author

@UestcCarpediem 用例修复下? 🙏🏻
Node.js CI / test-mysql57-fs-nfs (16, ubuntu-latest) 这个用例报错好像是node16的CVE导致的
image

@elrrrrrrr elrrrrrrr mentioned this pull request Jun 13, 2024
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.

3 participants