Skip to content

Commit a91b462

Browse files
authored
Merge pull request #537 from v3io/development
Development
2 parents 1b90384 + 5869c02 commit a91b462

File tree

17 files changed

+261
-206
lines changed

17 files changed

+261
-206
lines changed

.github/workflows/ci.yaml

-132
This file was deleted.

.github/workflows/pr.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- development
7+
- 'v[0-9]+.[0-9]+.x'
8+
9+
jobs:
10+
test:
11+
name: Lint & test
12+
runs-on: ubuntu-latest
13+
env:
14+
TSDB_TEST_TABLE_PATH: TSDB_INTEGRATION_TESTS/${{ github.sha }}
15+
16+
steps:
17+
- name: Dump github context
18+
run: echo "$GITHUB_CONTEXT"
19+
env:
20+
GITHUB_CONTEXT: ${{ toJson(github) }}
21+
22+
- name: Dump runner context
23+
run: echo "$RUNNER_CONTEXT"
24+
env:
25+
RUNNER_CONTEXT: ${{ toJson(runner) }}
26+
27+
- name: Dump github ref
28+
run: echo "$GITHUB_REF"
29+
30+
- uses: actions/setup-go@v2
31+
with:
32+
go-version: "^1.14.0"
33+
34+
- uses: actions/cache@v2
35+
with:
36+
path: ~/go/pkg/mod
37+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
38+
restore-keys: |
39+
${{ runner.os }}-go-
40+
41+
- uses: actions/checkout@v2
42+
with:
43+
ref: refs/pull/${{ github.event.number }}/merge
44+
45+
- name: Lint
46+
run: make lint
47+
48+
- name: Test short
49+
run: make test
50+
51+
- name: Test integration
52+
env:
53+
V3IO_API: ${{ secrets.V3IO_API }}
54+
V3IO_ACCESS_KEY: ${{ secrets.V3IO_ACCESS_KEY }}
55+
V3IO_TSDB_CONFIG: ${{ github.workspace }}/test/ci_v3io.yaml
56+
run: make integration
57+
58+
- name: Benchmark
59+
env:
60+
V3IO_API: ${{ secrets.V3IO_API }}
61+
V3IO_ACCESS_KEY: ${{ secrets.V3IO_ACCESS_KEY }}
62+
V3IO_TSDB_CONFIG: ${{ github.workspace }}/test/ci_v3io_bench.yaml
63+
TSDB_BENCH_INGEST_CONFIG: ${{ github.workspace }}/test/benchmark/testdata/tsdb-bench-test-config-ci.yaml
64+
run: make bench

.github/workflows/push.yaml

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
release:
9+
types:
10+
- created
11+
12+
jobs:
13+
test:
14+
name: Lint & test
15+
runs-on: ubuntu-latest
16+
env:
17+
TSDB_TEST_TABLE_PATH: TSDB_INTEGRATION_TESTS/${{ github.sha }}
18+
19+
steps:
20+
- name: Dump github context
21+
run: echo "$GITHUB_CONTEXT"
22+
env:
23+
GITHUB_CONTEXT: ${{ toJson(github) }}
24+
25+
- name: Dump runner context
26+
run: echo "$RUNNER_CONTEXT"
27+
env:
28+
RUNNER_CONTEXT: ${{ toJson(runner) }}
29+
30+
- name: Dump github ref
31+
run: echo "$GITHUB_REF"
32+
33+
- uses: actions/setup-go@v2
34+
with:
35+
go-version: "^1.14.0"
36+
37+
- uses: actions/cache@v2
38+
with:
39+
path: ~/go/pkg/mod
40+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
41+
restore-keys: |
42+
${{ runner.os }}-go-
43+
44+
- uses: actions/checkout@v2
45+
46+
- name: Lint
47+
run: make lint
48+
49+
- name: Test short
50+
run: make test
51+
52+
- name: Test integration
53+
env:
54+
V3IO_API: ${{ secrets.V3IO_API }}
55+
V3IO_ACCESS_KEY: ${{ secrets.V3IO_ACCESS_KEY }}
56+
V3IO_TSDB_CONFIG: ${{ github.workspace }}/test/ci_v3io.yaml
57+
run: make integration
58+
59+
- name: Benchmark
60+
env:
61+
V3IO_API: ${{ secrets.V3IO_API }}
62+
V3IO_ACCESS_KEY: ${{ secrets.V3IO_ACCESS_KEY }}
63+
V3IO_TSDB_CONFIG: ${{ github.workspace }}/test/ci_v3io_bench.yaml
64+
TSDB_BENCH_INGEST_CONFIG: ${{ github.workspace }}/test/benchmark/testdata/tsdb-bench-test-config-ci.yaml
65+
run: make bench
66+
67+
release:
68+
name: Release
69+
runs-on: ubuntu-latest
70+
if: github.event_name == 'release'
71+
needs:
72+
- test
73+
strategy:
74+
matrix:
75+
go-os:
76+
- linux
77+
- darwin
78+
- windows
79+
80+
steps:
81+
- name: Dump GitHub context
82+
run: echo "$GITHUB_CONTEXT"
83+
env:
84+
GITHUB_CONTEXT: ${{ toJson(github) }}
85+
86+
- name: Dump runner context
87+
run: echo "$RUNNER_CONTEXT"
88+
env:
89+
RUNNER_CONTEXT: ${{ toJson(runner) }}
90+
91+
- name: Dump github ref
92+
run: echo "$GITHUB_REF"
93+
94+
- name: Extract ref info
95+
id: release_info
96+
run: |
97+
echo ::set-output name=REF_BRANCH::${GITHUB_REF#refs/heads/}
98+
echo ::set-output name=REF_TAG::${GITHUB_REF#refs/tags/}
99+
100+
- name: Set TSDB_LABEL to release tag
101+
run: |
102+
echo "::set-env name=TSDB_LABEL::${{ steps.release_info.outputs.REF_TAG }}"
103+
104+
- uses: actions/checkout@v2
105+
106+
- uses: actions/setup-go@v2
107+
with:
108+
go-version: "^1.14.0"
109+
110+
- uses: actions/cache@v2
111+
with:
112+
path: ~/go/pkg/mod
113+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
114+
restore-keys: |
115+
${{ runner.os }}-go-
116+
117+
- name: Build binaries for ${{ matrix.go-os }}
118+
run: make bin
119+
env:
120+
GOPATH: ${{ github.workspace }}/go
121+
GOARCH: amd64
122+
GOOS: ${{ matrix.go-os }}
123+
124+
- name: Upload binaries
125+
uses: AButler/[email protected]
126+
with:
127+
files: ${{ github.workspace }}/go/bin/tsdbctl-*
128+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

-13
This file was deleted.

examples/nuclio/ingest/ingest_example.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func Handler(context *nuclio.Context, event nuclio.Event) (interface{}, error) {
9090
if ref == 0 {
9191
ref, err = tsdbAppender.Add(labels, sampleTime, sample.Value.N)
9292
} else {
93-
err = tsdbAppender.AddFast(labels, ref, sampleTime, sample.Value.N)
93+
err = tsdbAppender.AddFast(ref, sampleTime, sample.Value.N)
9494
}
9595
if err != nil {
9696
return "", errors.Wrap(err, "Failed to add sample")

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ require (
66
github.com/cespare/xxhash v1.1.0
77
github.com/cpuguy83/go-md2man v1.0.10 // indirect
88
github.com/ghodss/yaml v1.0.0
9+
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9
910
github.com/imdario/mergo v0.3.7
1011
github.com/nuclio/logger v0.0.1
1112
github.com/nuclio/nuclio-sdk-go v0.0.0-20190205170814-3b507fbd0324

0 commit comments

Comments
 (0)