Git Product home page Git Product logo

gocosi's People

Contributors

renovate[bot] avatar shanduur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gocosi's Issues

[FEATURE]: Add healthcheck

Are you interested in contributing to the development of this feature?

Yes

Is your feature request related to a problem? Please describe.

A lot of repositories struggle with implementing health check. We can standardise it for COSI Drivers.

Describe the solution you'd like.

Write a proposal/proof of concept, that will implement the custom health check mechanism. The healthcheck should:

  • define a Checker interface;
  • Checker should have methods for:
    • checking if the connection to the Object Storage Provider (OSP) can be established (CanConnect() error ?);
    • checking if the driver can authenticate to the OSP (IsAuthenticated() error ?)
  • start a http server that can be used by Kubernetes or docker to check the /healthz endpoint.

Describe alternatives you've considered.

N/A

Additional Information

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
cmd/bootstrap/template/Dockerfile.tpl
  • docker.io/library/golang 1.21.4
github-actions
.github/workflows/conventional-changelog.yaml
  • actions/checkout v4
  • requarks/changelog-action v1
  • ncipollo/release-action v1.13.0
.github/workflows/labels.yaml
  • actions/checkout v4
  • actions/setup-go v4
.github/workflows/linters.yaml
  • actions/checkout v4
  • actions/setup-go v4
  • golangci/golangci-lint-action v3
.github/workflows/semantic-pr.yaml
  • amannn/action-semantic-pull-request v5
.github/workflows/tests.yaml
  • actions/checkout v4
  • actions/setup-go v4
  • codecov/codecov-action v3
gomod
go.mod
  • go 1.21
  • github.com/doomshrine/must v1.0.0
  • github.com/doomshrine/testcontext v1.0.0
  • github.com/go-logr/logr v1.3.0
  • github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1
  • github.com/hellofresh/health-go/v5 v5.5.0
  • github.com/stretchr/testify v1.8.4
  • go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0
  • go.opentelemetry.io/otel v1.20.0
  • go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0
  • go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0
  • go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0
  • go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0
  • go.opentelemetry.io/otel/sdk v1.20.0
  • go.opentelemetry.io/otel/sdk/metric v1.20.0
  • google.golang.org/grpc v1.59.0
  • sigs.k8s.io/container-object-storage-interface-spec v0.1.0

  • Check this box to trigger a request for Renovate to run again on this repository

[FEATURE]: Add Dockerfile while bootstraping a repository

Are you interested in contributing to the development of this feature?

Yes

Is your feature request related to a problem? Please describe.

New repos often are missing Dockerfiles, while learning and applying best practices is commonly a time consuming job.

Describe the solution you'd like.

Provide Dockerfile while bootstraping the new repository.

Dockerfile should include:

  • Multi stage build (docker.io/library/golang:1.<x> as builder and other base image, e.g. gcr.io/distroless/static:<X>, docker.io/rockylinux/rockylinux:<X>-ubi-micro or something similar);
  • Non root user;
  • Cache mechanism in the builder;
  • HEALTHCHECK instruction;

Describe alternatives you've considered.

N/A

Additional Information

N/A

[FEATURE]: Add default OTLP exporter configuration for Metrics and Tracing

Are you interested in contributing to the development of this feature?

Yes

Is your feature request related to a problem? Please describe.

Exporting Traces and Metrics should be integrated into the code by default. Right now, we are only starting spans/traces and counting metrics for the number of panics. Setting up the exporter is done exclusively by the driver developer, which can be a cumbersome process and often leads to inconsistency in how traces and metrics are collected and exported across different projects.

By providing default configurations for exporters, we can streamline the process and ensure that every project benefits from a standardised and efficient approach to exporting trace and metric data. This not only saves valuable development time but also promotes best practices in observability and monitoring.

Furthermore, default configurations can be optimized for common use cases, making it easier for developers to get started quickly with tracing and metrics without having to dive deep into the configuration details. This approach can greatly improve the out-of-the-box experience for new users and reduce the barrier to entry for adopting these essential monitoring and debugging tools.

Incorporating exporter configurations into the codebase as defaults doesn't mean eliminating flexibility. Advanced users can still override these defaults to tailor the setup to their specific needs. However, having sensible defaults in place ensures that even those who are not well-versed in observability can benefit from these features without a steep learning curve.

Ultimately, integrating trace and metric exporters into the codebase by default with well-thought-out default configurations can lead to more consistent, reliable, and accessible observability across your projects, benefiting both developers and end-users.

Describe the solution you'd like.

I would like a new Option (e.g. WithDefaultMetricExporter and WithDefaultTraceExporter), that will allow using default configuration of OTEL Exporters for Traces and Metrics, by just setting up the endpoint of OTEL Collector as documented in:

  1. specification;
  2. README of opentelemetry-go/exporters/otlp/otlptrace;
  3. documentation of opentelemetry-go/exporters/otlp/otlpmetiric/otlpmetrichttp.

Describe alternatives you've considered.

N/A

Additional Information

Libraries that should be looked into:

[FEATURE]: Add readiness probe

Are you interested in contributing to the development of this feature?

Yes

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like.

Write a proposal/proof of concept, that will implement the custom readiness probe mechanism.

Describe alternatives you've considered.

N/A

Additional Information

[BUG]: TestSetLogger/TestRun failing with data race

What happened?

One of the runs in the GitHub Actions failed with the following log indicating data race.

Relevant log output

==================
WARNING: DATA RACE
Read at 0x00000128de40 by goroutine 11:
  github.com/doomshrine/gocosi.(*Driver).Run()
      /home/runner/work/gocosi/gocosi/gocosi.go:98 +0x51b
  github.com/doomshrine/gocosi.TestRun.func2()
      /home/runner/work/gocosi/gocosi/gocosi_test.go:102 +0xf6
  testing.tRunner()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1629 +0x47

Previous write at 0x00000128de40 by goroutine 8:
  github.com/doomshrine/gocosi.SetLogger()
      /home/runner/work/gocosi/gocosi/gocosi.go:74 +0xca
  github.com/doomshrine/gocosi.TestSetLogger()
      /home/runner/work/gocosi/gocosi/gocosi_test.go:36 +0x74
  testing.tRunner()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1629 +0x47

Goroutine 11 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1629 +0x805
  github.com/doomshrine/gocosi.TestRun()
      /home/runner/work/gocosi/gocosi/gocosi_test.go:94 +0x97
  testing.tRunner()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1629 +0x47

Goroutine 8 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1629 +0x805
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:2036 +0x8d
  testing.tRunner()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1576 +0x216
  testing.runTests()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:2034 +0x87c
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.20.7/x64/src/testing/testing.go:1906 +0xb44
  main.main()
      _testmain.go:84 +0x2fc
==================
--- FAIL: TestRun (0.00s)
    --- FAIL: TestRun/run_with_defaults (0.00s)
        testing.go:1446: race detected during execution of test
--- FAIL: TestSetLogger (0.00s)
    testing.go:1446: race detected during execution of test
FAIL

[FEATURE]: Generate template for Kustomize

Are you interested in contributing to the development of this feature?

Yes

Is your feature request related to a problem? Please describe.

New repos often are missing Dockerfiles, while learning and applying best practices is commonly a time consuming job.

Describe the solution you'd like.

Bootstrapping repo should generate the Kustomization scaffolding.

Describe alternatives you've considered.

Helm chart in the bootstrapped repo - this would introduce additional unwanted dependency on Helm, and it can interfere with the idea of central Helm repository in company/project.

Additional Information

No response

[FEATURE]: Simplify process of creating secrets for GrantBucketAccess

Are you interested in contributing to the development of this feature?

Yes

Is your feature request related to a problem? Please describe.

The credentials returned in the Driver is of type map[string]string. It is sometimes confusing to new developers how to structure this value for available protocols.

Describe the solution you'd like.

I would like to have functions that simplify the creation of the credentials, e.g.:

func S3Credential(secretKeyID, secretKey, bucketName string, endpoint *url.URL) (map[string]string, error)

Additionally, for the purpose of custom functions that can be written in the future, provide each map key in form of constant, e.g.:

import "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts"

const (
	S3SecretAccessKeyID string = consts.SecretAccessKeyID
	// ...
)

Describe alternatives you've considered.

Importing the sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts and creating the credentials by hand.

Additional Information

N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.