Skip to content

Conversation

gaius-qi
Copy link
Member

Description

This pull request introduces updates to dependency versions, refines Redis configuration defaults, and modifies task group handling to improve performance and maintainability. The most notable changes include upgrading the dragonflyoss/machinery dependency, updating Redis-related constants, and adjusting task group timeout values.

Dependency Updates:

  • Updated dragonflyoss/machinery to version v1.10.13 in go.mod for compatibility and bug fixes.

Redis Configuration Enhancements:

  • Updated Redis-related constants in internal/job/constants.go:
    • Set DefaultRedisMaxIdle to 0 and introduced DefaultRedisMaxActive with a value of 300.
    • Reduced DefaultRedisIdleTimeout to 30 seconds.
    • Added polling periods for normal (DefaultRedisNormalTasksPollPeriod = 2000) and delayed tasks (DefaultRedisDelayedTasksPollPeriod = 500).
  • Applied these new constants in the Redis configuration within internal/job/job.go.

Task Group Timeout Adjustments:

  • Increased the timeout for SendGroupWithContext calls from 0 to 50 across multiple functions to improve task group handling:
    • createGroupJob in manager/job/preheat.go.
    • CreateGetTask in manager/job/task.go.
    • CreateDeleteTask in manager/job/task.go.

Related Issue

Motivation and Context

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

… for weak network conditions

Signed-off-by: Gaius <gaius.qi@gmail.com>
@gaius-qi gaius-qi added this to the v2.3.0 milestone May 16, 2025
@gaius-qi gaius-qi self-assigned this May 16, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner May 16, 2025 07:45
@gaius-qi gaius-qi added the enhancement New feature or request label May 16, 2025
@gaius-qi gaius-qi requested review from imeoer, eryugey and fcgxz2003 May 16, 2025 07:45
Copy link

@Liam-Zhao Liam-Zhao left a comment

Choose a reason for hiding this comment

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

LGTM

@Liam-Zhao Liam-Zhao enabled auto-merge (squash) May 16, 2025 07:47
Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 16.66667% with 10 lines in your changes missing coverage. Please review.

Project coverage is 34.38%. Comparing base (254040a) to head (f1b6c8e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/job/job.go 0.00% 9 Missing ⚠️
manager/job/preheat.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4072   +/-   ##
=======================================
  Coverage   34.37%   34.38%           
=======================================
  Files         346      346           
  Lines       40486    40489    +3     
=======================================
+ Hits        13917    13922    +5     
+ Misses      25653    25651    -2     
  Partials      916      916           
Flag Coverage Δ
unittests 34.38% <16.66%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
manager/job/task.go 66.99% <100.00%> (ø)
manager/job/preheat.go 44.09% <0.00%> (ø)
internal/job/job.go 13.75% <0.00%> (-0.27%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@chlins chlins left a comment

Choose a reason for hiding this comment

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

lgtm

@Liam-Zhao Liam-Zhao merged commit 63b3cca into main May 16, 2025
30 checks passed
@Liam-Zhao Liam-Zhao deleted the feature/preheat branch May 16, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants