furiko-io / furiko

Kubernetes cron and batch job platform
https://furiko.io
Apache License 2.0
483 stars 21 forks source link

feat(cli): Add enable/disable subcommands #89

Closed irvinlim closed 2 years ago

irvinlim commented 2 years ago

Adds two new subcommands:

Usage:
  furiko [command]

Available Commands:
  ...
  disable     Disable automatic scheduling for a JobConfig.
  enable      Enable automatic scheduling for a JobConfig.
  ...

Detailed subcommand help:

Disables automatic scheduling for a JobConfig.

If the specified JobConfig does not have a schedule, then an error will be thrown.
If the specified JobConfig is already disabled, then this is a no-op.

Usage:
  furiko disable [flags]

Examples:
  # Disable scheduling for the JobConfig.
  furiko disable send-weekly-report
Enables automatic scheduling for a JobConfig.

If the specified JobConfig does not have a schedule, then an error will be thrown.
If the specified JobConfig is already enabled, then this is a no-op.

Usage:
  furiko enable [flags]

Examples:
  # Enable scheduling for the JobConfig.
  furiko enable send-weekly-report
codecov[bot] commented 2 years ago

Codecov Report

Merging #89 (867c7f4) into main (25d2757) will increase coverage by 0.26%. The diff coverage is 73.68%.

@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
+ Coverage   62.87%   63.13%   +0.26%     
==========================================
  Files         200      202       +2     
  Lines       10334    10456     +122     
==========================================
+ Hits         6497     6601     +104     
- Misses       3489     3498       +9     
- Partials      348      357       +9     
Impacted Files Coverage Δ
pkg/cli/cmd/cmd_disable.go 73.21% <73.21%> (ø)
pkg/cli/cmd/cmd_enable.go 73.21% <73.21%> (ø)
pkg/cli/cmd/cmd.go 92.68% <100.00%> (+0.37%) :arrow_up:
pkg/runtime/testing/action.go 75.86% <0.00%> (+3.44%) :arrow_up:
pkg/execution/mutation/mutation.go 89.09% <0.00%> (+5.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 25d2757...867c7f4. Read the comment docs.