CLI tool for the OpenSLO spec

Related tags

Command Line oslo
Overview

oslo

CLI tool for the OpenSLO spec. For more information also check the website: openslo.com.

Prerequisites

Installation

  1. Checkout this repository
  2. Install oslo with go get github.com/OpenSLO/oslo

Usage

Right now, the only function is validate, which you can call with oslo validate

Testing

To test out the features of oslo, from the root of the project run oslo validate test/valid-service.yaml That will validate against a valid yaml file. There are other files in that directory to test out the functionality of oslo

Comments
  • Image push is failing

    Image push is failing

    Summary

    When running actions on a PR, the image push step is failing with a 403. Example

    Steps to reproduce

    Create a PR on a remote branch and notice that the image push step will fail, and the checks in the PR will fail.

    bug 
    opened by ian-bartholomew 11
  • Oslo does not have a --version command

    Oslo does not have a --version command

    Summary

    When running Oslo, I wanted to confirm that I was running the latest version. This information is not output as part of --help, and there is no --version tag, so it is difficult to check which version is running.

    Steps to reproduce

    1. Build Oslo from source or download it from Github
    2. Execute oslo -h, oslo --help, or oslo --version
    3. Observe that none of the commands print a version number

    What is the current bug behavior?

    The version is not available

    What is the expected correct behavior?

    I'd expect to see a version number printed to the console

    Relevant logs and/or screenshots

    oslo help
    Oslo is a CLI tool for the OpenSLO spec
    
    Usage:
      oslo [command]
    
    Available Commands:
      completion  Generate the autocompletion script for the specified shell
      fmt         Formats the provided input into the standard format.
      help        Help about any command
      validate    Validates your yaml file against the OpenSLO spec.
    
    Flags:
      -h, --help   help for oslo
    
    Use "oslo [command] --help" for more information about a command.
    

    Possible fixes

    Add code to output this value somehow?

    bug 
    opened by proffalken 5
  • Bump github.com/go-playground/validator/v10 from 10.8.0 to 10.9.0

    Bump github.com/go-playground/validator/v10 from 10.8.0 to 10.9.0

    Bumps github.com/go-playground/validator/v10 from 10.8.0 to 10.9.0.

    Release notes

    Sourced from github.com/go-playground/validator/v10's releases.

    Release 19.9.0

    What's new?

    • Fixed panic when use ru lang for translation, thanks @​anisov for the PR
    • Add boolean baked-in validator to check a string value is a valid boolean representation, thanks @​xvello for the PR
    • Document thread safety and recommended singleton usage, thanks @​andrascz for the PR
    • Add validations for ISO 4217 currency codes, thanks @​metinogurlu for the PR
    • Update universal-translator and locales dependencies to their latest versions.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 3
  • Consider cue for heavy lifting

    Consider cue for heavy lifting

    Given the current feature set is on validation, I was wondering if using cue (pkg or CLI) can have a positive overall impact on OpenSLO tooling and schema definition (separate repo)?

    https://cuelang.org/ has lots of benefits and gains more traction every day, especially in the K8s ecosystem, to define, validate and export configuration schemas.

    Thoughts?

    opened by embano1 3
  • Propagate validity check to CLI level as return code

    Propagate validity check to CLI level as return code

    As mentioned in https://github.com/OpenSLO/oslo/issues/8, reflect properly in the CLI return code whether or not the config has passed a validity check.

    [niallm:~/Documents/GitHub/oslo] change-return-code(+31/-7) ± ./oslo validate test/valid.yaml; echo $? Valid! 0 [niallm:~/Documents/GitHub/oslo] change-return-code(+32/-6) ± ./oslo validate test/invalid.yaml; echo $? Invalid

    • Conf.Age (less than min) Error: Error in validation 1

    This requires a fairly awkward dance to suppress usage messages given how cobra does things, but this probably isn't a terrible first draft.

    opened by niallrmurphy 3
  • Adding a '--version' command

    Adding a '--version' command

    Cobra already provides the --version command, I just had to pass the version attribute in the root command. The value used comes dynamically from Github's releases, so when installing it, it pulls the version from Github and sticks with that with no need for manual interference other than tagging the release (which is already done). I decided to pass the version in the main file and inject it into the command because I think it makes the most sense - after all it's the build version which includes the whole code base. But I don't have a strong opinion about it.

    This was my first time coding in Go so all and every constructive feedback is appreciated. Resolves #133

    opened by Jataki 2
  • Bump cspell from 6.4.2 to 6.5.0

    Bump cspell from 6.4.2 to 6.5.0

    Bumps cspell from 6.4.2 to 6.5.0.

    Release notes

    Sourced from cspell's releases.

    v6.5.0

    Changes

    ci: Workflow Bot -- Update Integration Snapshots (main) (#3320)

    Update Integration Repositories

    integration-tests/config/config.json | 46 +- .../Azure/azure-rest-api-specs/snapshot.txt | 53 +- .../SoftwareBrothers/admin-bro/snapshot.txt | 3 +- .../snapshots/TheAlgorithms/Python/report.yaml | 66 +- .../snapshots/TheAlgorithms/Python/snapshot.txt | 66 +- .../aspnetboilerplate/report.yaml | 8 +- .../aspnetboilerplate/snapshot.txt | 4 +- .../snapshots/aws-amplify/docs/snapshot.txt | 9 +- .../snapshots/caddyserver/caddy/report.yaml | 117 ++-- .../snapshots/caddyserver/caddy/snapshot.txt | 113 ++-- .../snapshots/django/django/report.yaml | 434 ++++++------- .../snapshots/django/django/snapshot.txt | 432 ++++++------- .../snapshots/eslint/eslint/report.yaml | 36 +- .../snapshots/eslint/eslint/snapshot.txt | 32 +- .../googleapis/google-cloud-cpp/report.yaml | 189 +++--- .../googleapis/google-cloud-cpp/snapshot.txt | 185 +++--- .../snapshots/ktaranov/sqlserver-kit/report.yaml | 160 ++--- .../snapshots/ktaranov/sqlserver-kit/snapshot.txt | 160 ++--- .../microsoft/TypeScript-Website/report.yaml | 12 +- .../microsoft/TypeScript-Website/snapshot.txt | 8 +- .../snapshots/php/php-src/report.yaml | 669 +++++++++++---------- .../snapshots/php/php-src/snapshot.txt | 667 ++++++++++---------- .../snapshots/prettier/prettier/snapshot.txt | 4 +- .../snapshots/pycontribs/jira/report.yaml | 64 +- .../snapshots/pycontribs/jira/snapshot.txt | 64 +- .../snapshots/wireapp/wire-webapp/snapshot.txt | 22 +- 26 files changed, 1879 insertions(+), 1744 deletions(-)


    Features

    feat: Use CSpellIO as the default file read layer. (#3323)

    ... (truncated)

    Changelog

    Sourced from cspell's changelog.

    6.5.0 (2022-07-29)

    Bug Fixes

    Features

    • Support Ignoring characters before checking (#3311) (d3fbe6c)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 2
  • Validation fails with uppercase characters in label key

    Validation fails with uppercase characters in label key

    Summary

    Validation of label keys in metadata fails with an uppercase character in the name.

    What is the current bug behavior?

    SLO yaml with the following content will fail validation:

    metadata:
      name: string
      displayName: string # optional
      labels:
        userImpacting:
          - "true"
    

    What is the expected correct behavior?

    Validation succeeds

    Possible fixes

    The check here can be removed to allow uppercase characters in the label key. As per https://github.com/openslo/openslo#general-schema it should be possible

    bug 
    opened by kenfinnigan 2
  • [WIP] Automate the build of Oslo for use in CI/CD pipelines

    [WIP] Automate the build of Oslo for use in CI/CD pipelines

    This PR creates a Dockerfile and associated Github Actions to build and release Oslo as a Docker container.

    To avoid limits set by DockerHub, we deploy to Github Container Registry.

    We build a container on every PR that is created so it can be tested in any environment, and only tag builds to main with :latest to ensure that PR code does not get released to production systems by mistake.

    Note: There is an assumption that any code merged to main has been fully tested and is ready for deployment. If code is merged to main that is not ready for deployment, the containers will still be built, and anyone running :latest will get the new code.

    opened by proffalken 2
  • Make Threshold Metric more useful

    Make Threshold Metric more useful

    Currently, the threshold metric object is lacking in potential, looking for some feedback on this proposal:

    Current functionality:

    thresholdMetric:
          source: 'splunk'
          query: '<query_string>'
          queryType: 'query'
    

    A few questions:

    1. What is the purpose of queryType here? I'm sure there are examples, so some would be helpful
    2. Would there be an issue with adding a field like sourceType for things like splunk or newRelic and shift source to the exact URL to the instance being referred to?
    • For most systems that are going to generate metrics, URL solves some nice issues:
      • Solves the use case at scale that there might be more than one source in use
      • Solves the use case where adding indexes and spaces within a source allows for differentiation
      • Allows the query field to be used more explicitly as the query string for various platforms which generate the metrics

    Proposed Functionality:

    thresholdMetric:
          source: '<url_to_specific_splunk_instance_and_app>'
          sourceType: 'splunk'
          query: 'index=<index> host IN (<hosts>)'
          queryType: 'query'
    
    opened by its02003 2
  • Add code of conduct

    Add code of conduct

    In order to help foster an inclusive community, we should add and adopt a code of conduct. This one would a be a reasonable one to adopt: https://www.contributor-covenant.org/version/2/0/code_of_conduct/

    documentation 
    opened by ian-bartholomew 2
  • Document the process for releasing

    Document the process for releasing

    Summary

    With the community growing and maintainers being added, we should document how to release a new version of Oslo and the process for deciding a release is needed and the semantic versioning.

    documentation 
    opened by kenfinnigan 0
  • Allow for overrides when coverting

    Allow for overrides when coverting

    Problem to solve

    Nobl9 requires a few things that the OpenSLO spec does not support. However, for the use case of someone keeping the source of truth in OpenSLO and converting to Nobl9, we don't have a good way of providing those values, outside of manual updating.

    Example: The MetricSourceSpec here has Name and Kind that we need to add when assigning here

    Proposal

    It would be ideal to have a way to provide inline attributes that are not part of the OpenSLO spec to give hints to the converter to include in the output. We don't want to add these to the spec structs tho, since they are not part of the spec.

    Another option is to use something like yk to merge the output with an override file, though this way is less than ideal since its brittle

    enhancement 
    opened by ian-bartholomew 0
  • Create a dependency graph output of the various components for visual aids to debugging etc.

    Create a dependency graph output of the various components for visual aids to debugging etc.

    Problem to solve

    As a user of OpenSLO I want to be able to draw a dependency graph of my spec So I can easily see where the connections are between components

    Proposal

    Something like an oslo map or oslo graph command that then uses the spec and the relationships within it to draw out a map/directed dependency diagram using graphviz or similar?

    Further details

    I'm thinking about something along the lines of the terraform graph command so we get a DOT format output which can then be used by Graphviz and other tools to create PNG/PDF documents etc.

    Links / references

    https://graphviz.org/ https://graphviz.org/resources/#go https://github.com/hashicorp/terraform/blob/main/internal/command/graph.go

    enhancement 
    opened by proffalken 1
  • Should spec tests be executed?

    Should spec tests be executed?

    Summary

    Should the various SLO test files in /test be run when the project tests are executed?

    Steps to reproduce

    Run make run/tests.

    What is the current bug behavior?

    PASS
    coverage: 61.8% of statements
    ok  	github.com/OpenSLO/oslo/internal/pkg/validate	0.562s	coverage: 61.8% of statements
    ?   	github.com/OpenSLO/oslo/pkg/manifest	[no test files]
    ?   	github.com/OpenSLO/oslo/pkg/manifest/v1	[no test files]
    ?   	github.com/OpenSLO/oslo/pkg/manifest/v1alpha	[no test files]
    

    What is the expected correct behavior?

    Tests for spec versions are run.

    bug 
    opened by kenfinnigan 2
  • Clarify SLO AlertPolicy

    Clarify SLO AlertPolicy

    Summary

    See https://github.com/OpenSLO/OpenSLO/issues/133 for details.

    We need to resolve the ambiguity in the approach in the spec, and update the Oslo structs to match what is agreed

    bug 
    opened by kenfinnigan 0
  • Update Oslo to use Go structs from OpenSLO

    Update Oslo to use Go structs from OpenSLO

    • Moved v1alpha structs to OpenSLO spec project
    • Modified validation logic to utilize structs from OpenSLO spec project
    • Added tests for v1beta1 of spec
    opened by kenfinnigan 1
Releases(v0.6.2)
Owner
OpenSLO is a service level objective (SLO) language that declaratively defines reliability and performance targets using a simple YAML specification
null
Symfony-cli - The Symfony CLI tool For Golang

Symfony CLI Install To install Symfony CLI, please download the appropriate vers

Symfony CLI 387 Nov 22, 2022
bcrypt-cli is the CLI tool for hashing passwords with bcrypt.

bcrypt-cli bcrypt-cli is the CLI tool for hashing passwords with bcrypt. Install go install github.com/ryicoh/bcrypt-cli Usage It can be used like bas

Ryuichiroh Ikeuchi 1 Sep 11, 2022
GTDF-CLI - The official CLI tool to operate with Getting Things Done Framework

This is the official CLI tool to operate with Getting Things Done Framework. How

akrck02 1 Feb 14, 2022
This tool is a CLI-interactive tool for TA who use eeclass platform

NTHU eeclass TA helper. This tool is a CLI-interactive tool for TA who use eeclass platform. It helps TA to download all the submitted homework, and use CSV to record the score and comment, and upload CSV score directly to the eeclass platform with just 2 Enter key!

Bo-Wei Chen 1 Dec 11, 2021
Elegant CLI wrapper for kubeseal CLI

Overview This is a wrapper CLI ofkubeseal CLI, specifically the raw mode. If you just need to encrypt your secret on RAW mode, this CLI will be the ea

Elm 4 Jan 8, 2022
CLI to run a docker image with R. CLI built using cobra library in go.

BlueBeak Installation Guide Task 1: Building the CLI The directory structure looks like Fastest process: 1)cd into bbtools 2)cd into bbtools/bin 3)I h

Aniruddha Chattopadhyay 0 Dec 20, 2021
A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode.

aliyun-dns A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode. Installation Install aliyun-cli. Usage $ aliyun-dns -h A wra

许嘉华 0 Dec 21, 2021
Go-file-downloader-ftctl - A file downloader cli built using golang. Makes use of cobra for building the cli and go concurrent feature to download files.

ftctl This is a file downloader cli written in Golang which uses the concurrent feature of go to download files. The cli is built using cobra. How to

Dipto Chakrabarty 2 Jan 2, 2022
Cli-algorithm - A cli program with A&DS in go!

cli-algorithm Objectives The objective of this cli is to implement 4 basic algorithms to sort arrays been Merge Sort Insertion Sort Bubble Sort Quick

Leonardo Brombilla Antunes 0 Jan 2, 2022
Nebulant-cli - Nebulant's CLI

Nebulant CLI Website: https://nebulant.io Documentation: https://nebulant.io/docs.html The Nebulant CLI tool is a single binary that can be used as a

Develatio 2 Jan 11, 2022
News-parser-cli - Simple CLI which allows you to receive news depending on the parameters passed to it

news-parser-cli Simple CLI which allows you to receive news depending on the par

Maxym 0 Jan 4, 2022
Go-api-cli - Small CLI to fetch data from an API sync and async

Async API Cli CLI to fetch data on "todos" from a given API in a number of ways.

Pete Robinson 0 Jan 13, 2022
Syno-cli - Synology unofficial API CLI and library

Synology CLI Unofficial wrapper over Synology API in Go. Focus on administrative

Aleksandr Baryshnikov 15 Nov 8, 2022
Gobby-cli - CLI application to debug gobby applications

go(bby) Interactive debugging tool for gobby applications Usage Coming soon™ Ins

Qwiri 0 Feb 8, 2022
A CLI tool implemented by Golang to manage `CloudComb` resource

CloudComb CLI tool: comb Get Started comb is a CLI tool for manage resources in CloudComb base on cloudcomb-go-sdk. Support Mac, Linux and Windows. We

Bingo Huang 22 Jan 4, 2021
A small CLI tool to check connection from a local machine to a remote target in various protocols.

CHK chk is a small CLI tool to check connection from a local machine to a remote target in various protocols.

null 26 Oct 10, 2022
A CLI Tool to easily generate your Terraform configuration

Tf Tf is a command line tool to easily generate your Terraform configuration with an interactive prompt. Inspiration Boredom in Covid-19 Installation

Gowtham Munukutla 20 Sep 30, 2022
A powerful cli tool to implement gin annotation ⭐

gin-annotation A powerful cli tool to implement gin annotation Chinese Document Features Using code generating technology by operating golang AST Rout

Tang WenXuan 49 Mar 24, 2022