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

feat(CLI): adds force-sink flag #84

Merged
merged 4 commits into from
Mar 8, 2023

Conversation

shellcromancer
Copy link
Contributor

@shellcromancer shellcromancer commented Mar 8, 2023

Description

This adds a -force-sink flag to the development app to mutate the Sink configuration to a user overridden value. This currently only supports the standard output sink but can be extended to override HTTP, S3 or any sink.

Motivation and Context

When iterating on Substation configs and checking output for pipelines typically destined to a remote output a developer needs to edit the configuration's sink to check results. This change often meant for local testing is an error prone chore which can be automated for this use case via the new -force-sink stdout flag for the development app.

How Has This Been Tested?

I've been using this locally for a few months to save some config while testing.

$ substation -h
...
  -force-sink string
    	force sink output to value (supported: stdout)
...
$ substation -force-sink stdout ...

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@shellcromancer shellcromancer requested a review from a team as a code owner March 8, 2023 17:09
Adds a flag to mutate the Sink configuration
to always be sent to standard output.
@shellcromancer shellcromancer force-pushed the shellcromancer/file-app-improvments branch from f6513cb to 0fecadb Compare March 8, 2023 17:40
@shellcromancer shellcromancer changed the title feat(CLI): adds force-stdout flag feat(CLI): adds force-sink flag Mar 8, 2023
Copy link
Collaborator

@jshlbrd jshlbrd left a comment

Choose a reason for hiding this comment

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

updates look good, asked for a change to the GetConfig method but otherwise it's ready to go

cmd/app.go Outdated Show resolved Hide resolved
@shellcromancer shellcromancer merged commit cb7e697 into main Mar 8, 2023
@shellcromancer shellcromancer deleted the shellcromancer/file-app-improvments branch March 8, 2023 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants