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

chore: raystack rename #173

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Lint
on: [ push, pull_request, workflow_dispatch ]

on: [push]

jobs:
golangci-lint:
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: "1.20"
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
skip-go-installation: true
version: v1.50.1
args: --timeout=10m
version: v1.53
args: --timeout=5m
39 changes: 10 additions & 29 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,31 @@ name: Release
on:
push:
tags:
- 'v*'
- "v*"

jobs:
release:
goreleaser:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.18
id: go
- name: Check out code into the Go module directory
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test
env:
POSTGRES_PASSWORD: postgres
run: make test
- name: Get release tag
id: get_version
uses: battila7/get-version-action@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.6.1
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}
20 changes: 9 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Test
on: [push, pull_request]

Expand All @@ -18,13 +17,10 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up Go 1.18
uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.18
id: go
go-version: "1.20"
- name: Install dependencies
run: sudo apt-get install build-essential
- name: Install packages
Expand All @@ -33,7 +29,9 @@ jobs:
env:
POSTGRES_PASSWORD: postgres
run: make test
- name: Send coverage to coveralls
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
- name: Install goveralls and send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go install github.com/mattn/goveralls@latest
goveralls -coverprofile=coverage.out -service=github
85 changes: 43 additions & 42 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,73 @@
project_name: siren

release:
draft: true
prerelease: auto

before:
hooks:
- go mod tidy
- go mod vendor
- make clean

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^build:"

builds:
- main: ./main.go
id: "siren"
- id: siren
main: ./main.go
binary: siren
flags:
- -a
flags: [-a]
ldflags:
- -s -w -X github.com/odpf/siren/config.Version={{.Tag}} -X github.com/odpf/siren/config.BuildCommit={{.FullCommit}} -X github.com/odpf/siren/config.BuildDate={{.Date}}
- -X github.com/raystack/siren/cli.Version={{.Tag}}
- -X github.com/raystack/siren/cli.BuildCommit={{.FullCommit}}
- -X github.com/raystack/siren/cli.BuildDate={{.Date}}
goos: [linux, darwin, windows]
goarch: [amd64, 386, arm, arm64]
env:
- CGO_ENABLED=0
goos: [darwin, linux, windows]
goarch: [amd64, 386]

archives:
- replacements:
darwin: macos
linux: linux
windows: windows
386: i386
amd64: x86_64
- id: "archives"
format_overrides:
- goos: windows
format: zip

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^build:"
- "Merge pull request"
- "Merge branch"

checksum:
name_template: "checksums.txt"

snapshot:
name_template: "{{ .Tag }}-next"

dockers:
- goos: linux
goarch: amd64
ids:
- siren
dockerfile: Dockerfile
- id: dockerhub
image_templates:
- "docker.io/odpf/{{.ProjectName}}:latest"
- "docker.io/odpf/{{.ProjectName}}:{{ .Version }}"
- "docker.io/odpf/{{.ProjectName}}:{{ .Tag }}-amd64"
- "docker.io/raystack/{{.ProjectName}}:latest"
- "docker.io/raystack/{{.ProjectName}}:{{ .Version }}"
- "docker.io/raystack/{{.ProjectName}}:{{ .Tag }}-amd64"

nfpms:
- maintainer: Raystack
description: Universal data observability tool.
homepage: https://github.com/raystack/siren
license: Apache 2.0
formats:
- deb
- rpm
- apk

scoops:
- homepage: "https://github.com/raystack/siren"
description: "Universal data observability tool."
license: Apache 2.0
bucket:
owner: raystack
name: scoop-bucket

brews:
- name: siren
homepage: "https://github.com/odpf/siren"
homepage: "https://github.com/raystack/siren"
description: "Universal data observability tool."
tap:
owner: odpf
name: homebrew-taps
owner: raystack
name: homebrew-tap
license: "Apache 2.0"
folder: Formula
dependencies:
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
NAME="github.com/odpf/siren"
NAME="github.com/raystack/siren"
LAST_COMMIT := $(shell git rev-parse --short HEAD)
LAST_TAG := "$(shell git rev-list --tags --max-count=1)"
APP_VERSION := "$(shell git describe --tags ${LAST_TAG})-next"
PROTON_COMMIT := "9cdffc3c1838ec72b35b2a1b9a170ca9c138db66"
PROTON_COMMIT := "dfad17733cae03f1beea2e9db28001ce3453d8c3"

.PHONY: all build test clean dist vet proto install

Expand Down Expand Up @@ -30,9 +30,9 @@ lint: ## lint checker
golangci-lint run

proto: ## Generate the protobuf files
@echo " > generating protobuf from odpf/proton"
@echo " > generating protobuf from raystack/proton"
@echo " > [info] make sure correct version of dependencies are installed using 'make install'"
@buf generate https://github.com/odpf/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path odpf/siren
@buf generate https://github.com/raystack/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path raystack/siren
@echo " > protobuf compilation finished"

clean: ## Clean the build artifacts
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Siren

![test workflow](https://github.com/odpf/siren/actions/workflows/test.yaml/badge.svg)
![test workflow](https://github.com/raystack/siren/actions/workflows/test.yaml/badge.svg)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?logo=apache)](LICENSE)
[![Version](https://img.shields.io/github/v/release/odpf/siren?logo=semantic-release)](Version)
[![Coverage Status](https://coveralls.io/repos/github/odpf/siren/badge.svg?branch=main)](https://coveralls.io/github/odpf/siren?branch=main)
[![Version](https://img.shields.io/github/v/release/raystack/siren?logo=semantic-release)](Version)
[![Coverage Status](https://coveralls.io/repos/github/raystack/siren/badge.svg?branch=main)](https://coveralls.io/github/raystack/siren?branch=main)

Siren provides alerting on metrics of your applications using [Cortex metrics](https://cortexmetrics.io/) in a simple
DIY configuration. With Siren, you can define templates(using go templates standard), and create/edit/enable/disable
Expand All @@ -21,7 +21,7 @@ with any client such as CI/CD pipelines, Self-Serve UI, microservices etc.
- **Managing bulk rules:** Siren enables users to manage bulk alerting rules using YAML files in specified format with simple CLI.
- **Receivers:** Siren can be used to send out notifications to several channels (slack, pagerduty, email etc).
- **Alert History:** Siren can store alerts triggered by monitoring & alerting provider e.g. Cortex Alertmanager, which can be used for audit purposes.
To know more, follow the detailed [documentation](docs)
To know more, follow the detailed [documentation](docs)

## Usage

Expand All @@ -34,7 +34,7 @@ Explore the following resources to get started with Siren:

## Run with Kubernetes

- Create a siren deployment using the helm chart available [here](https://github.com/odpf/charts/tree/main/stable/siren)
- Create a siren deployment using the helm chart available [here](https://github.com/raystack/charts/tree/main/stable/siren)

## Running locally

Expand All @@ -55,7 +55,7 @@ Update the configs(db credentials etc.) as per your dev machine and docker confi
Run the following commands to compile from source

```sh
$ git clone [email protected]:odpf/siren.git
$ git clone [email protected]:raystack/siren.git
$ cd siren
$ go build main.go
```
Expand All @@ -69,6 +69,7 @@ $ make test
# To run tests locally with coverage
$ make test-coverage
```

## Generate Server Configuration

```sh
Expand Down Expand Up @@ -97,10 +98,10 @@ Read our [contributing guide](docs/contribute/contribution.md) to learn about ou
bugfixes and improvements, and how to build and test your changes to Siren.

To help you get your feet wet and get you familiar with our contribution process, we have a list of
[good first issues](https://github.com/odpf/siren/labels/good%20first%20issue) that contain bugs which have a relatively
[good first issues](https://github.com/raystack/siren/labels/good%20first%20issue) that contain bugs which have a relatively
limited scope. This is a great place to get started.

This project exists thanks to all the [contributors](https://github.com/odpf/siren/graphs/contributors).
This project exists thanks to all the [contributors](https://github.com/raystack/siren/graphs/contributors).

## License

Expand Down
10 changes: 5 additions & 5 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: v1
plugins:
- remote: "buf.build/library/plugins/go:v1.27.1-1"
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: proto
opt: paths=source_relative
- remote: "buf.build/library/plugins/go-grpc:v1.1.0-2"
- plugin: buf.build/grpc/go:v1.3.0
out: proto
opt: paths=source_relative,require_unimplemented_servers=true
- remote: buf.build/odpf/plugins/validate
- remote: buf.build/raystack/plugins/validate
out: "proto"
opt: "paths=source_relative,lang=go"
- remote: "buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.11.3-1"
- plugin: buf.build/grpc-ecosystem/gateway:v2.16.0
out: proto
opt:
- paths=source_relative
- allow_repeated_fields_in_body=true
- remote: "buf.build/grpc-ecosystem/plugins/openapiv2:v2.11.3-1"
- plugin: "buf.build/grpc-ecosystem/openapiv2:v2.16.0"
out: proto
opt:
- allow_repeated_fields_in_body=true
Expand Down
8 changes: 4 additions & 4 deletions cli/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"strconv"

"github.com/MakeNowJust/heredoc"
"github.com/odpf/salt/cmdx"
"github.com/odpf/salt/printer"
"github.com/odpf/siren/pkg/errors"
sirenv1beta1 "github.com/odpf/siren/proto/odpf/siren/v1beta1"
"github.com/raystack/salt/cmdx"
"github.com/raystack/salt/printer"
"github.com/raystack/siren/pkg/errors"
sirenv1beta1 "github.com/raystack/siren/proto/raystack/siren/v1beta1"
"github.com/spf13/cobra"
)

Expand Down
8 changes: 4 additions & 4 deletions cli/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"time"

"github.com/odpf/salt/cmdx"
"github.com/odpf/salt/config"
"github.com/odpf/siren/pkg/errors"
sirenv1beta1 "github.com/odpf/siren/proto/odpf/siren/v1beta1"
"github.com/raystack/salt/cmdx"
"github.com/raystack/salt/config"
"github.com/raystack/siren/pkg/errors"
sirenv1beta1 "github.com/raystack/siren/proto/raystack/siren/v1beta1"
"github.com/spf13/cobra"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
Expand Down
4 changes: 2 additions & 2 deletions cli/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

"github.com/MakeNowJust/heredoc"
"github.com/odpf/salt/cmdx"
"github.com/odpf/salt/printer"
"github.com/raystack/salt/cmdx"
"github.com/raystack/salt/printer"
"github.com/spf13/cobra"
)

Expand Down
Loading