Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
/ flytestdlib Public archive

A apache commons style library in Golang, use by the Flyte project. Contains utilities for metrics, pflags, config management, storage abstraction, caching etc

License

Notifications You must be signed in to change notification settings

flyteorg/flytestdlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fe5ccfe ยท Oct 9, 2023
Jul 17, 2023
Apr 9, 2019
Feb 23, 2022
Aug 22, 2023
Sep 14, 2023
Jul 11, 2023
Jul 7, 2023
Apr 8, 2023
May 12, 2022
Jun 5, 2020
Oct 25, 2021
Aug 30, 2022
Jun 4, 2020
Feb 23, 2021
Apr 8, 2022
Aug 30, 2022
Aug 30, 2022
Aug 30, 2022
May 27, 2021
Oct 20, 2021
Jul 11, 2023
Feb 23, 2021
Aug 30, 2022
Feb 11, 2023
Apr 9, 2019
Jan 31, 2021
May 27, 2021
Jul 7, 2023
Apr 10, 2019
Jul 21, 2021
Apr 9, 2019
Nov 7, 2022
Apr 9, 2019
Oct 9, 2023
Jun 19, 2020
Aug 5, 2023
Aug 5, 2023
Apr 26, 2019
Jun 28, 2021

Repository files navigation

๐Ÿ—‘ As of Oct-23 we moved the development of this component to the monorepo. ๐Ÿ—‘

Common Go Tools

Current Release Build Status GoDoc License CodeCoverage Go Report Card Commit activity Commit since last releast Slack

Shared components we found ourselves building time and time again, so we collected them in one place!

This library consists of:

  • config

    Enables strongly typed config throughout your application. Offers a way to represent config in go structs. takes care of parsing, validating and watching for changes on config.

  • cli/pflags

    Tool to generate a pflags for all fields in a given struct.

    Install

    On POSIX systems, run: curl -sfL https://raw.githubusercontent.com/flyteorg/flytestdlib/godownloader/godownloader.sh | sh

    On Windows:

    Install scoop: iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

    Run: scoop bucket add flytestdlib https://github.com/flyteorg/flytestdlib.git

    Run: scoop install pflags

  • storage

    Abstract storage library that uses stow behind the scenes to connect to s3/azure/gcs but also offers configurable factory, in-memory storage (for testing) as well as native protobuf support.

  • contextutils

    Wrapper around golang's context to set/get known keys.

  • logger

    Wrapper around logrus that's configurable, taggable and context-aware.

  • profutils

    Starts an http server that serves /metrics (exposes prometheus metrics), /healthcheck and /version endpoints.

  • promutils

    Exposes a Scope instance that's a more convenient way to construct prometheus metrics and scope them per component.

  • atomic

    Wrapper around sync.atomic library to offer AtomicInt32 and other convenient types.

  • sets

    Offers strongly types and convenient interface sets.

  • utils

  • version

Contributing

Versioning

This repo follows semantic versioning.

Releases

This repository is hooked up with goreleaser. Maintainers are expected to create tags and let goreleaser compose the release message and create a release.

To create a new release, follow these steps:

  • Create a PR with your changes.

  • [Optional] Create an alpha tag on your branch and push that.

    • First get existing tags git describe --abbrev=0 --tags

    • Figure out the next alpha version (e.g. if tag is v1.2.3 then you should create a v1.2.4-alpha.0 tag)

    • Create a tag git tag v1.2.4-alpha.0

    • Push tag git push --tags

  • Merge your changes and checkout master branch git checkout master && git pull

  • Bump version tag and push to branch.

    • First get existing tags git describe --abbrev=0 --tags

    • Figure out the next release version (e.g. if tag is v1.2.3 then you should create a v1.2.4 tag or v1.3.0 or a v2.0.0 depending on what has changed. Refer to Semantic Versioning for information about when to bump each)

    • Create a tag git tag v1.2.4

    • Push tag git push --tags