-
Notifications
You must be signed in to change notification settings - Fork 669
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
Inject offloading literal env vars #6027
Conversation
Signed-off-by: Eduardo Apolinario <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6027 +/- ##
==========================================
+ Coverage 33.09% 37.06% +3.97%
==========================================
Files 1013 1316 +303
Lines 107489 132115 +24626
==========================================
+ Hits 35570 48967 +13397
- Misses 68767 78895 +10128
- Partials 3152 4253 +1101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
envVars = append(envVars, | ||
v1.EnvVar{ | ||
Name: "_F_L_MIN_SIZE_MB", | ||
Value: strconv.FormatInt(propellerConfig.LiteralOffloadingConfig.MinSizeInMBForOffloading, 10), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we could directly use strconv.Itoa() which defaults to base 10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://pkg.go.dev/strconv#FormatInt handles int64 directly (which those two values are, instead of int).
assert.NoError(t, propellerCfg.SetConfig(&propellerCfg.Config{ | ||
LiteralOffloadingConfig: propellerCfg.LiteralOffloadingConfig{ | ||
Enabled: tt.offloadingEnabled, | ||
MinSizeInMBForOffloading: 1, | ||
MaxSizeInMBForOffloading: 42, | ||
}, | ||
})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit : I think instead of introducing SetConfig, you could do this
cfg := propellerCfg.GetConfig()
cfg.LiteralOffloadingConfig = propellerCfg.LiteralOffloadingConfig{
Enabled: tt.offloadingEnabled,
MinSizeInMBForOffloading: 1,
MaxSizeInMBForOffloading: 42,
}
As GetConfig returns a pointer.
Signed-off-by: Eduardo Apolinario <[email protected]>
Tracking issue
Related to #5103
Why are the changes needed?
Flytekit uses the environment variables _F_L_MIN_SIZE_MB and _F_L_MAX_SIZE_MB to define the minimum and maximum sizes (in MB) for offloading literals. This PR injects those variables in case offloading is enabled.
What changes were proposed in this pull request?
Inject 2 new variables to task pods in case offloading of literals is enabled.
How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link