Skip to content

Conversation

gaius-qi
Copy link
Member

Description

This pull request removes the deprecated "V1 Preheat" functionality from the project. It includes the deletion of associated API endpoints, data models, handlers, and tests, as well as a minor unrelated addition of a rate limiter middleware for the "Create Job" endpoint.

Removal of "V1 Preheat" functionality:

  • API Endpoints:

    • Removed /preheats (POST) and /preheats/{id} (GET) endpoints from swagger.json, swagger.yaml, and docs.go. These endpoints were used for creating and retrieving "V1 Preheat" resources. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Data Models:

    • Removed CreateV1PreheatRequest, CreateV1PreheatResponse, and GetV1PreheatResponse models from swagger.json, swagger.yaml, and docs.go. These models were specific to the "V1 Preheat" feature. [1] [2] [3] [4] [5] [6]
  • Handlers:

    • Deleted CreateV1Preheat and GetV1Preheat handler functions from preheat.go. These functions implemented the logic for the removed endpoints.
  • Tests:

    • Removed the corresponding test cases for "V1 Preheat" from preheat_test.go. These tests validated the behavior of the deleted handlers.
  • Router Configuration:

    • Removed routing for the deprecated /preheats endpoints from router.go.

Other Changes:

  • Rate Limiter Middleware:
    • Added a rate limiter middleware to the "Create Job" endpoint in router.go to control request rates.

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.

@gaius-qi gaius-qi added this to the v2.3.0 milestone May 15, 2025
@gaius-qi gaius-qi self-assigned this May 15, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner May 15, 2025 12:08
@gaius-qi gaius-qi requested a review from hhhhsdxxxx May 15, 2025 12:08
@gaius-qi gaius-qi added the enhancement New feature or request label May 15, 2025
@gaius-qi gaius-qi requested review from CormickKneey and chlins May 15, 2025 12:08
Liam-Zhao
Liam-Zhao previously approved these changes May 15, 2025
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 15, 2025 12:10
chlins
chlins previously approved these changes May 15, 2025
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

Signed-off-by: Gaius <gaius.qi@gmail.com>
@gaius-qi gaius-qi dismissed stale reviews from chlins and Liam-Zhao via 34bc806 May 15, 2025 12:13
Copy link

codecov bot commented May 15, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 34.41%. Comparing base (6c6e295) to head (34bc806).
Report is 1 commits behind head on main.

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

Impacted file tree graph

@@            Coverage Diff            @@
##           main    #4070       +/-   ##
=========================================
+ Coverage      0   34.41%   +34.41%     
=========================================
  Files         0      344      +344     
  Lines         0    40366    +40366     
=========================================
+ Hits          0    13890    +13890     
- Misses        0    25563    +25563     
- Partials      0      913      +913     
Flag Coverage Δ
unittests 34.41% <0.00%> (?)

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

Files with missing lines Coverage Δ
api/manager/docs.go 0.00% <ø> (ø)
manager/service/mocks/service_mock.go 94.66% <ø> (ø)
manager/service/service.go 0.00% <ø> (ø)
manager/router/router.go 0.00% <0.00%> (ø)

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

@gaius-qi gaius-qi closed this May 15, 2025
auto-merge was automatically disabled May 15, 2025 13:25

Pull request was closed

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