Skip to content
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

CLI Show Workflow Namespaces Option #200

Merged
merged 30 commits into from
Jul 23, 2024
Merged

CLI Show Workflow Namespaces Option #200

merged 30 commits into from
Jul 23, 2024

Conversation

mfleader
Copy link
Member

@mfleader mfleader commented Jul 19, 2024

Changes introduced with this PR

  • Adds the ability to get the objects and their namespaces from a workflow and present them as a table
  • Adds the option flag --get-namespaces to execute this behavior from the command line with an Arcaflow executable

Behavior Happy Path

❯ ./arcaflow --get-namespaces --workflow workflow.yaml --config config.yaml --input input.yaml
OBJECT              NAMESPACE   
HogCpuInput          $.steps.hog_cpu_wf.execute.inputs.items
KubernetesTarget     $.steps.hog_cpu_wf.execute.inputs.items
ThirdObject          $.steps.hog_cpu_wf.execute.inputs.items
StressNGParams       $.steps.hog_cpu_wf.execute.inputs.items.stressng_params
error                $.steps.hog_cpu_wf.failed.outputs.error
data                 $.steps.hog_cpu_wf.outputs.outputs.success

given workflow.yaml

version: v0.2.0
input:
  root: HogCpuInput
  objects:
    ThirdObject:
      id: ThirdObject
      properties:
        name:
          type:
            type_id: string
    KubernetesTarget:
      id: KubernetesTarget
      properties:
        kubeconfig_path:
          type:
            type_id: string
        namespace:
          type:
            type_id: string
          required: true
    HogCpuInput:
      id: HogCpuInput
      properties:
        stressng_params:
          type:
            type_id: ref
            id: StressNGParams
            namespace: $.steps.stressng.starting.inputs.input

steps:
  stressng:
    plugin: 
      src: quay.io/arcalot/arcaflow-plugin-stressng:0.6.0
      deployment_type: image
    step: workload
    input: !expr $.input.stressng_params
            
outputs:
  success:
    stressng: !expr $.steps.stressng.outputs.success

By contributing to this repository, I agree to the contribution guidelines.

@mfleader mfleader self-assigned this Jul 19, 2024
@mfleader mfleader marked this pull request as ready for review July 19, 2024 21:54
@mfleader mfleader requested a review from webbnh July 19, 2024 21:54
cmd/arcaflow/main.go Show resolved Hide resolved
cmd/arcaflow/main.go Outdated Show resolved Hide resolved
internal/tableprinter/tableprinter.go Outdated Show resolved Hide resolved
internal/tableprinter/tableprinter.go Show resolved Hide resolved
internal/tidy/tidy_test.go Outdated Show resolved Hide resolved
internal/tidy/tidy_test.go Outdated Show resolved Hide resolved
internal/tidy/tidy.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jaredoconnell jaredoconnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will be ready once Dave's concerns are addressed.

internal/tidy/tidy.go Outdated Show resolved Hide resolved
cmd/arcaflow/main.go Show resolved Hide resolved
@mfleader mfleader added the enhancement New feature or request label Jul 23, 2024
@mfleader mfleader requested a review from dbutenhof July 23, 2024 16:28
@mfleader mfleader merged commit 43c7889 into main Jul 23, 2024
5 checks passed
@mfleader mfleader deleted the cli-show-namespaces branch July 23, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants