Conversation
| // TaskResourceDefaults defines default and limit resource requests for tasks. | ||
| message TaskResourceDefaults { | ||
| StringSetting min_cpu = 1; | ||
| StringSetting min_gpu = 2; |
There was a problem hiding this comment.
did we say we were getting rid of GPU?
| StringSetting min_gpu = 2; | ||
| StringSetting min_memory = 3; | ||
| StringSetting min_storage = 4; | ||
| StringSetting limits_cpu = 5; |
There was a problem hiding this comment.
limits are the max that can be specified right? can we call it a cap or a maximum? i'm worried the word limit is confusing in the context of k8s.
Also does it make sense to support GPU here @EngHabu ?
There was a problem hiding this comment.
so i think k8s has request/limit, I think if we want to make it match we should use that, but to me it is more intuitive to say min/max... except if we have scale down as a feature we might also start in the middle somewhere rather than at the minimum. my gut says we should say min/max because that is pretty clear, but that also isnt coming from a k8s background
| TaskResourceSettings task_resource = 4; | ||
| StringListSetting labels = 5; | ||
| StringMapSetting annotations = 6; | ||
| StringMapSetting environment_variables = 7; |
There was a problem hiding this comment.
I think we need a property bag here as well. i feel like that one is a generic struct @EngHabu? Or should it be property bags? dictionary of structs keyed off a string?
There was a problem hiding this comment.
I think there is only one way that really makes sense - and that is if we are making these consumable by customers or 3rd parties where we do not use or do not have control or simply cannot implement them in our control plane. Adding an 'everything else' bucket basically means that the very next change someone makes to add a setting they need to answer the question 'does this get proper proto or does it go in the bag'. and then every consumer has to ask 'did that new setting get proper proto definition, or is it in the bag, and if it is in the bag where is its name defined'. and that mental work I really want to avoid.
There was a problem hiding this comment.
chatted offline... let's ignore this for now and come to it when we need to work on cluster resource controller
| // StringSetting is a string-valued setting with inheritance control. | ||
| message StringSetting { | ||
| SettingState state = 1; | ||
| string value = 2; |
There was a problem hiding this comment.
weren't these originally going to be a oneof? Is there a benefit to making these separate objects (StringSetting, IntSetting, etc.). I understand you did this so that you can do
StringSetting raw_data_path = 1;
and then if someone receives a StorageSettings object, they'll know that it contains a string type... just wondering if this is a useful feature - in what scenario will this be useful to know above and beyond what the original oneof block would give you?
(see the SettingValue object in the md file)
There was a problem hiding this comment.
i am not that familiar with the oneofs - if someone makes a create request with a setting that is a oneof, can they put whatever type they want in there?
|
|
||
| // IntSetting is an integer-valued setting with inheritance control. | ||
| message IntSetting { | ||
| SettingState state = 1; |
There was a problem hiding this comment.
we should add a description to each setting also.
| // Per-setting source level. Keys are dot-separated field paths | ||
| // (e.g. "run.default_queue", "task_resource.defaults.min_cpu"). | ||
| // Only present for settings with state = SETTING_STATE_VALUE. | ||
| map<string, SettingScopeLevel> sources = 3; |
There was a problem hiding this comment.
what is this for again? shouldn't it already be in each setting object?
There was a problem hiding this comment.
oh, yeah, let me change it so that it is in the settings wrapper
| SettingsKey key = 1 [(buf.validate.field).required = true]; | ||
|
|
||
| // Serialized settings blob. | ||
| string data = 2 [(buf.validate.field).string.min_len = 1]; |
There was a problem hiding this comment.
i don't think we should use string data here. This is the endpoint that the SDK CLI will probably use right? The sole purpose of this endpoint is so that changes to the settings object can be handled without forcing the user to upgrade. But I think a plain string is too loose right? I think we can assume that the SDK will always have access to the base setting value objects (be it SettingValue or the collection of StringSetting, IntSetting, etc.)... given that, shouldn't this be something like map<string, oneof stringsetting...> or map<string, SettingValue>?
Also, what was the plan for map/list types? the original plan was to have them be additive. We don't need to do that - if we just force the user to copy/paste any values from higher scopes that actually makes the editing experience simpler. (search for "Map-type settings should show each scope's contribution separately" in the md file to see what i mean) Is that the plan? just make the user do it?
I know i'm referencing the original doc... don't worry about the yaml formatting part in that doc please (we'll take care of the actual yaml parts), but the information does need to be in the api responses.
There was a problem hiding this comment.
the reason for it to be string data is for the comments. that may be unnecessary if we code into the sdk the comments about the level and description and which can be edited and which not, but if we wanted to add any other descriptive elements or anything like that this would allow it to be totally controlled by the back end and not the sdk.
That said, we can change it (and update) so that there is less parsing work involved by the backend.
d2d5872 to
32ff857
Compare
* add: validation Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> * fix Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> * [V2] Add GitHub Actions workflow for Go unit tests (#6999) Signed-off-by: Kevin Su <pingsutw@apache.org> * add: validation Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> * fix Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> * minor fix Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> * fix: tests Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --------- Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> Signed-off-by: Kevin Su <pingsutw@apache.org> Co-authored-by: Kevin Su <pingsutw@apache.org>
* Notifications IDL Signed-off-by: Iaroslav Ciupin <iaroslav@union.ai>
* Fix Docker build for CGO-dependent sqlite3 package
The build was failing because `go-sqlite3` requires CGO, but the
Dockerfile used cross-compilation (`--platform=${BUILDPLATFORM}`) which
disables CGO. Additionally, the .dockerignore negation pattern for
`gen/go` was unreliable when the parent `gen/` directory was excluded.
- Remove cross-compilation, enable CGO_ENABLED=1 for native build
- Copy only gen/go instead of full gen directory
- Replace .dockerignore negation with explicit subdirectory exclusions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kevin Su <pingsutw@apache.org>
* test
Signed-off-by: Kevin Su <pingsutw@apache.org>
---------
Signed-off-by: Kevin Su <pingsutw@apache.org>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Iaroslav Ciupin <iaroslav@union.ai>
…ng the /config HTTP endpoint. Add pflags-generated config files and fix import paths to use non-versioned module. (#7015) * Add DisableConfigEndpoint option to profutils Config to allow disabling the /config HTTP endpoint. Add pflags-generated config files and fix import paths to use non-versioned module. Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com> * fix imports Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com> * Fix tests Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com> * Fix config registration Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com> * Fix unit tests Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com> --------- Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
* feat: simple state manager to store actions Signed-off-by: machichima <nary12321@gmail.com> * feat: run state manager record node tree Signed-off-by: machichima <nary12321@gmail.com> * fix: also include root action in ListActions Signed-off-by: machichima <nary12321@gmail.com> * fix: prevent error when create default project on startup Signed-off-by: machichima <nary12321@gmail.com> * feat: add watch_actions.sh test script Signed-off-by: machichima <nary12321@gmail.com> * fix: continue for nil enrichedAction for defense Signed-off-by: machichima <nary12321@gmail.com> * fix: raise error in CreateProject when already exists Signed-off-by: machichima <nary12321@gmail.com> --------- Signed-off-by: machichima <nary12321@gmail.com>
…ehavior (#7028) Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
Signed-off-by: Kevin Su <pingsutw@apache.org>
…7031) * abort - add Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> * update Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> * update test Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --------- Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
…7033) * fix problems about missing charts and kubeconfig permission Signed-off-by: yuteng <a08h0283@gmail.com> * make dep_build including updating helm-repo and build charts Signed-off-by: yuteng <a08h0283@gmail.com> * deleted unused operator Signed-off-by: yuteng <a08h0283@gmail.com> --------- Signed-off-by: yuteng <a08h0283@gmail.com>
* adjust notifications IDL to support notifications per phases * drop delivery config id & rule id * email idl adjustments Signed-off-by: Iaroslav Ciupin <iaroslav@union.ai>
To facilitate getting logs just for a single node, add an optional field to the ContainerSelector message. Signed-off-by: Eugene Yakubovich <eyakubovich@gmail.com>
| SettingState state = 1; | ||
|
|
||
| // A plain string value. | ||
| string string_value = 2; |
There was a problem hiding this comment.
i think we also need boolean
| // GetSettingsResponse contains resolved effective settings. | ||
| // Each setting's scope_level field indicates which scope provided its value. | ||
| message GetSettingsResponse { | ||
| SettingsKey key = 1; |
There was a problem hiding this comment.
should we not just use SettingsRecord here?
|
|
||
| // CreateSettingsResponse contains the created settings and initial version. | ||
| message CreateSettingsResponse { | ||
| SettingsKey key = 1; |
There was a problem hiding this comment.
Can this also be SettingsRecord
|
|
||
| // UpdateSettingsResponse contains the updated settings and new version. | ||
| message UpdateSettingsResponse { | ||
| SettingsKey key = 1; |
|
|
||
| // UpdateSettingsRawResponse contains the stored raw settings and new version. | ||
| message UpdateSettingsRawResponse { | ||
| SettingsKey key = 1; |
There was a problem hiding this comment.
i think message can just be empty. we can attach error details
import (
"context"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/genproto/googleapis/rpc/errdetails"
)
func (s *Server) CreateUser(ctx context.Context, req *pb.CreateUserRequest) (*pb.CreateUserResponse, error) {
var violations []*errdetails.BadRequest_FieldViolation
if req.Email == "" {
violations = append(violations, &errdetails.BadRequest_FieldViolation{
Field: "email",
Description: "email is required",
})
}
if req.Age < 18 {
violations = append(violations, &errdetails.BadRequest_FieldViolation{
Field: "age",
Description: "must be at least 18",
})
}
if len(violations) > 0 {
st := status.New(codes.InvalidArgument, "validation failed")
br := &errdetails.BadRequest{
FieldViolations: violations,
}
stWithDetails, err := st.WithDetails(br)
if err != nil {
return nil, st.Err() // fallback
}
return nil, stWithDetails.Err()
}
return &pb.CreateUserResponse{UserId: "123"}, nil
}upon getting a validation error, the sdk/yaml client should call the get for edit endpoint again, and show the validation error message.
Maybe upon success we return the new version, but i think that is even not needed.
Tracking issue
Why are the changes needed?
What changes were proposed in this pull request?
How was this patch tested?
Labels
Please add one or more of the following labels to categorize your PR:
This is important to improve the readability of release notes.
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link
main