Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-1557] Add prod sampler new api (#1631)
This pull request introduces a new `ProbabilisticSamplerAction` to the codebase, along with the necessary updates to support its creation, update, and deletion. The key changes include adding the new action type, updating the GraphQL schema, and implementing the corresponding service functions. ### Addition of `ProbabilisticSamplerAction`: * [`frontend/graph/model/models_gen.go`](diffhunk://#diff-642ccd7ed71fdfa394bd7f7fd99c9c33e20ff18c876a91cb989d379a44390469R311-R337): Added the `ProbabilisticSamplerAction` struct and its methods to the model. * [`frontend/graph/schema.graphqls`](diffhunk://#diff-bc07b91dedd1782d9ddbbb6374ad97c7604f9a267de5174645723d863c732f80R309-R318): Updated the GraphQL schema to include the `ProbabilisticSamplerAction` type. ### Resolver Updates: * [`frontend/graph/schema.resolvers.go`](diffhunk://#diff-8e6e95029056db2c0301fc338e0ca5a04356ce5d45ee9514bbd167f2d85bae70L568-R571): Updated the `CreateAction`, `UpdateAction`, and `DeleteAction` resolvers to handle the new `ProbabilisticSamplerAction` type. [[1]](diffhunk://#diff-8e6e95029056db2c0301fc338e0ca5a04356ce5d45ee9514bbd167f2d85bae70L568-R571) [[2]](diffhunk://#diff-8e6e95029056db2c0301fc338e0ca5a04356ce5d45ee9514bbd167f2d85bae70L586-R591) [[3]](diffhunk://#diff-8e6e95029056db2c0301fc338e0ca5a04356ce5d45ee9514bbd167f2d85bae70L617-R630) ### Constants Update: * [`frontend/services/actions/constants.go`](diffhunk://#diff-377602090c56364ea3a4d6cdadda1ad9b1c6ba9e122f882e5a1f640b1e62acf8L8-R9): Added `ActionTypeProbabilisticSampler` and corrected the naming of `ActionTypeLatencySampler`. ### Service Implementation: * [`frontend/services/actions/probabilisticsampler.go`](diffhunk://#diff-2f6dc14f04b67e0a11a5b999216a0e08f575927294c5033187b84f1179fb5624R1-R139): Implemented the service functions `CreateProbabilisticSampler`, `UpdateProbabilisticSampler`, and `DeleteProbabilisticSampler` to manage `ProbabilisticSamplerAction` in Kubernetes.
- Loading branch information