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

Change QPS type to float64 #6303

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Change QPS type to float64 #6303

wants to merge 6 commits into from

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Mar 4, 2025

Tracking issue

NA

Why are the changes needed?

it will allow people to set the qps to 0~1.

What changes were proposed in this pull request?

change the type to float64

How was this patch tested?

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Summary by Bito

This PR updates the QPS configuration type from int to float64, enabling fractional values for more precise rate limiting. The changes span core validation logic, command flag definitions, and web API configuration to ensure consistent configuration throughout the system. These modifications affect both production code and test cases, improving flexibility and accuracy for granular control over query rates.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 1

@flyte-bot
Copy link
Collaborator

flyte-bot commented Mar 4, 2025

Code Review Agent Run #89d79f

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: d49475f..d49475f
    • flyteplugins/go/tasks/pluginmachinery/webapi/pluginconfig.go
  • Files skipped - 0
  • Tools
    • Golangci-lint (Linter) - ✖︎ Failed
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

AI Code Review powered by Bito Logo

@flyte-bot
Copy link
Collaborator

flyte-bot commented Mar 4, 2025

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Feature Improvement - QPS Configuration Update

core.go - Replaced validateRangeInt with validateRangeFloat64 for both read and write QPS validations.

config_flags.go - Changed command flag type from Int to Float64 for read and write QPS settings.

pluginconfig.go - Updated the QPS field type from int to float64 to allow fractional values.

pluginconfig_flags.go - Switched command flag functions from Int to Float64 to support QPS as float64.

config_flags.go - Modified command flag definitions to use Float64 for QPS values.

config_flags.go - Updated command flag calls to Float64 for a precise QPS configuration.

Testing - QPS Tests Update

config_flags_test.go - Updated test to retrieve Float64 flag for QPS instead of an integer.

config_flags_test.go - Changed test from GetInt to GetFloat64 for verifying QPS flag values.

config_flags_test.go - Revised tests to check Float64 flag retrieval for both read and write QPS parameters.

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.88%. Comparing base (22eaeab) to head (ad0094e).
Report is 7 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6303       +/-   ##
===========================================
+ Coverage   33.82%   57.88%   +24.05%     
===========================================
  Files        1329      774      -555     
  Lines      147835    57318    -90517     
===========================================
- Hits        50004    33176    -16828     
+ Misses      92989    21649    -71340     
+ Partials     4842     2493     -2349     
Flag Coverage Δ
unittests-datacatalog 59.06% <ø> (+11.05%) ⬆️
unittests-flyteadmin 56.27% <ø> (+6.16%) ⬆️
unittests-flytecopilot 30.99% <ø> (ø)
unittests-flytectl 64.70% <ø> (+6.56%) ⬆️
unittests-flyteidl 76.12% <ø> (+69.33%) ⬆️
unittests-flyteplugins ?
unittests-flytepropeller 54.79% <ø> (+18.26%) ⬆️
unittests-flytestdlib 64.02% <ø> (+13.63%) ⬆️

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

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

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

Signed-off-by: Kevin Su <[email protected]>
@flyte-bot
Copy link
Collaborator

flyte-bot commented Mar 6, 2025

Code Review Agent Run #80662d

Actionable Suggestions - 0
Review Details
  • Files reviewed - 4 · Commit Range: d49475f..f9043d5
    • flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/pluginconfig_flags.go
    • flyteplugins/go/tasks/plugins/webapi/athena/config_flags.go
    • flyteplugins/go/tasks/plugins/webapi/bigquery/config_flags.go
  • Files skipped - 0
  • Tools
    • Golangci-lint (Linter) - ✖︎ Failed
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

AI Code Review powered by Bito Logo

pingsutw added 4 commits March 6, 2025 14:39
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@flyte-bot
Copy link
Collaborator

flyte-bot commented Mar 6, 2025

Code Review Agent Run #5823fd

Actionable Suggestions - 0
Review Details
  • Files reviewed - 4 · Commit Range: f9043d5..ad0094e
    • flyteplugins/go/tasks/pluginmachinery/webapi/example/config_flags.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/example/config_flags_test.go
    • flyteplugins/go/tasks/plugins/webapi/athena/config_flags_test.go
    • flyteplugins/go/tasks/plugins/webapi/bigquery/config_flags_test.go
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

AI Code Review powered by Bito Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants