Skip to content

feat: support to preheat multiple files#3997

Merged
chlins merged 3 commits intomainfrom
feature/files
Apr 25, 2025
Merged

feat: support to preheat multiple files#3997
chlins merged 3 commits intomainfrom
feature/files

Conversation

@gaius-qi
Copy link
Copy Markdown
Member

Description

This pull request introduces enhancements to the preheat job creation logic, making it more flexible and robust by supporting multiple file URLs and improving parameter validation. It also includes minor updates to comments for better clarity.

Enhancements to preheat job creation:

  • Added validation to ensure the URL parameter is required for image preheat jobs. If URL is missing, an error is returned. (manager/job/preheat.go, manager/job/preheat.goR119-R140)
  • Enhanced file preheat jobs to support both a single URL and multiple URLs. If both are provided, URLs takes precedence, and the URL is appended to the list of URLs. Validation ensures at least one of URL or URLs is provided. (manager/job/preheat.go, [1] [2]

Updates to type definitions:

  • Clarified the comment for the Type field in CreatePreheatJobRequest to reflect its purpose more accurately. (manager/types/job.go, manager/types/job.goL94-R94)
  • Updated the URL field comment in PreheatArgs to indicate it can represent either an image or file URL. Added a new URLs field to support multiple file URLs, with a note on its priority relative to URL. (manager/types/job.go, manager/types/job.goL111-R117)

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.

Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
@gaius-qi gaius-qi added the enhancement New feature or request label Apr 25, 2025
@gaius-qi gaius-qi added this to the v2.3.0 milestone Apr 25, 2025
@gaius-qi gaius-qi self-assigned this Apr 25, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner April 25, 2025 08:29
Liam-Zhao
Liam-Zhao previously approved these changes Apr 25, 2025
Copy link
Copy Markdown

@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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2025

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 34.30%. Comparing base (50083ff) to head (9c6f48d).
Report is 1 commits behind head on main.

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

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3997      +/-   ##
==========================================
- Coverage   34.31%   34.30%   -0.02%     
==========================================
  Files         342      342              
  Lines       40139    40150      +11     
==========================================
- Hits        13775    13774       -1     
- Misses      25454    25466      +12     
  Partials      910      910              
Flag Coverage Δ
unittests 34.30% <0.00%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
manager/job/preheat.go 44.01% <0.00%> (-1.78%) ⬇️

... 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.

@gaius-qi gaius-qi changed the title feat: add content for calculating task id feat: support to preheat multiple files Apr 25, 2025
Comment thread manager/types/job.go Outdated
…/files

Signed-off-by: Gaius <gaius.qi@gmail.com>
Copy link
Copy Markdown
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) April 25, 2025 08:54
Copy link
Copy Markdown

@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 62c03a7 into main Apr 25, 2025
28 of 29 checks passed
@chlins chlins deleted the feature/files branch April 25, 2025 09:37
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.

5 participants