Skip to content

feat: add task type to ID generation for Standard and PersistentCache tasks #1149

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

Merged
merged 1 commit into from
May 14, 2025

Conversation

gaius-qi
Copy link
Member

Description

This pull request updates the IDGenerator in dragonfly-client-util to include the TaskType in its hashing logic and modifies the associated test cases to reflect the new behavior. These changes ensure that task IDs are now uniquely influenced by their task type, improving the specificity of the generated IDs.

Core functionality updates:

  • Added TaskType::Standard and TaskType::PersistentCache to the hashing logic in the IDGenerator implementation, ensuring task IDs are differentiated by their task type. [1] [2]

Test updates:

  • Updated expected hash values in mod tests to align with the new hashing logic that incorporates TaskType. This affects multiple test cases, ensuring they reflect the updated ID generation behavior:
    • Updated hash values for various configurations of application and filtered_query_params. [1] [2] [3] [4] [5] [6]
    • Updated hash values for configurations involving tag and application. [1] [2] [3] [4]

Related Issue

Motivation and Context

Screenshots (if appropriate)

… tasks

Signed-off-by: Gaius <gaius.qi@gmail.com>
@gaius-qi gaius-qi added this to the v2.3.0 milestone May 14, 2025
@gaius-qi gaius-qi self-assigned this May 14, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner May 14, 2025 09:28
@gaius-qi gaius-qi added the enhancement New feature or request label May 14, 2025
@gaius-qi gaius-qi requested review from jim3ma, hyy0322 and eryugey May 14, 2025 09:28
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

@chlins chlins enabled auto-merge (squash) May 14, 2025 09:29
Copy link
Contributor

@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

@chlins chlins merged commit 604a945 into main May 14, 2025
9 checks passed
@chlins chlins deleted the feature/id branch May 14, 2025 09:38
Copy link

codecov bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.45%. Comparing base (086bc6d) to head (4ca284d).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1149      +/-   ##
==========================================
- Coverage   49.51%   49.45%   -0.06%     
==========================================
  Files          58       58              
  Lines       12085    12085              
==========================================
- Hits         5984     5977       -7     
- Misses       6101     6108       +7     
Files with missing lines Coverage Δ
dragonfly-client-util/src/id_generator/mod.rs 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

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.

4 participants