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: hooks triggers #641

Merged
merged 2 commits into from
Jan 23, 2024
Merged

fix: hooks triggers #641

merged 2 commits into from
Jan 23, 2024

Conversation

elrrrrrrr
Copy link
Member

@elrrrrrrr elrrrrrrr commented Jan 22, 2024

Since the eventBus#cork , version & tag events are triggered at same time, cause the abnormal triggers of different types of hooks.

  • 🐞 Fix triggerHook type targetName to be tagetName:changeId
  • 🤖 Only merge sync tasks (binary, package) which in waiting states

由于 eventBus#cork 机制,版本事件同时触发,导致不同类型 hook 触发异常

  • 🐞 修改 triggerHook 类型 targetName 为 包名:changeId
  • 🤖 仅合并 waiting 状态下包同步任务

@elrrrrrrr elrrrrrrr added the bug Something isn't working label Jan 22, 2024
@elrrrrrrr elrrrrrrr changed the title fix: hooks fix: hooks triggers Jan 22, 2024
app/core/entity/Task.ts Outdated Show resolved Hide resolved
@elrrrrrrr elrrrrrrr force-pushed the fix-hooks branch 2 times, most recently from d0e45b4 to eaea81f Compare January 22, 2024 13:38
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: 168 lines in your changes are missing coverage. Please review.

Comparison is base (6624a36) 97.45% compared to head (351d856) 96.84%.
Report is 162 commits behind head on master.

Files Patch % Lines
config/config.default.ts 56.33% 31 Missing ⚠️
.../port/controller/admin/PaddingVersionController.ts 48.83% 22 Missing ⚠️
app/core/service/FixNoPaddingVersionService.ts 54.54% 15 Missing ⚠️
app/core/service/PackageSearchService.ts 93.72% 15 Missing ⚠️
app/core/service/PackageSyncerService.ts 85.84% 15 Missing ⚠️
app/port/schedule/SyncBinaryWorker.ts 21.42% 11 Missing ⚠️
app/repository/PackageVersionRepository.ts 87.95% 10 Missing ⚠️
app/core/service/PackageVersionFileService.ts 92.59% 8 Missing ⚠️
app/core/entity/PaddingSemVer.ts 88.00% 6 Missing ⚠️
app/core/service/PackageVersionService.ts 94.91% 6 Missing ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #641      +/-   ##
==========================================
- Coverage   97.45%   96.84%   -0.61%     
==========================================
  Files         168      180      +12     
  Lines       15691    17582    +1891     
  Branches     2018     2292     +274     
==========================================
+ Hits        15291    17027    +1736     
- Misses        400      555     +155     

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

@elrrrrrrr elrrrrrrr marked this pull request as ready for review January 22, 2024 14:15
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

Copy link
Contributor

@killagu killagu left a comment

Choose a reason for hiding this comment

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

LGTM

@elrrrrrrr elrrrrrrr merged commit 838eecf into master Jan 23, 2024
11 of 13 checks passed
@elrrrrrrr elrrrrrrr deleted the fix-hooks branch January 23, 2024 07:34
fengmk2 pushed a commit that referenced this pull request Jan 23, 2024
[skip ci]

## [3.51.1](v3.51.0...v3.51.1) (2024-01-23)

### Bug Fixes

* hooks triggers ([#641](#641)) ([838eecf](838eecf))
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