Closed rafaelgomesxyz closed 3 months ago
The recent changes enhance the control-plane-flow
tool by allowing per-job overrides for --image
, --cpu
, and --memory
parameters, effectively resolving race conditions during simultaneous job runs. Default CPU and memory sizes are now set to 1 core and 2 GiB, respectively. Deprecated options have been updated, and specific validations now run before commands, ensuring proper execution and error handling.
File | Change Summary |
---|---|
CHANGELOG.md |
Documented new features, default settings, and deprecated options. |
README.md |
Updated to reflect new default CPU and memory sizes, and per-job overrides. |
docs/commands.md |
Clarified how to override entrypoint, set default CPU and memory sizes, and adjust terminal size settings. |
examples/controlplane.yml |
Updated default CPU and memory settings, added threshold for listing apps for deletion. |
lib/command/run.rb |
Corrected spelling errors, refactored methods, added default settings for image, CPU, and memory, improved job handling. |
sequenceDiagram
participant User
participant CLI
participant ControlPlane
User->>CLI: Execute `run` command with overrides
CLI->>ControlPlane: Validate command
ControlPlane-->>CLI: Validation result
alt Validation Passes
CLI->>ControlPlane: Set default or overridden image, CPU, memory
ControlPlane-->>CLI: Confirmation
CLI->>ControlPlane: Start job
ControlPlane-->>CLI: Job started
else Validation Fails
CLI-->>User: Error message
end
CLI-->>User: Job status
Objective (Issue #164) | Addressed | Explanation |
---|---|---|
Resolve race conditions by allowing per-job overrides for settings | ✅ | |
Set default CPU and memory sizes for jobs | ✅ | |
Replace deprecated --skip-secret-access-binding with new option |
✅ | |
Ensure validations run before commands | ✅ |
In the land of code, where changes flow, Jobs now run with a smoother glow. No more races, no more haste, CPU and memory, set with grace. Commands validated, errors caught, Control plane's power, finely wrought.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Fixes #164
cpln
now accepts overridingimage
,cpu
, andmemory
when starting a Cron workload job, so we no longer have to worry about race conditions when running simultaneous jobs with different overrides.This PR updates the
run
command to reflect those changes.Also changes jobs to use a CPU size of 1 (1 core) and a memory size of 2Gi (2 gibibytes) by default (configurable through
runner_job_default_cpu
andrunner_job_default_memory
incontrolplane.yml
), as just copying the sizes from the original workload may lead to an overprovision of resources.Summary by CodeRabbit
New Features
--image
,--cpu
, and--memory
for each job individually in therun
command.Improvements
--skip-secret-access-binding
option with--skip-secrets-setup
.Documentation
--entrypoint
and terminal size configuration options.