Skip to content

Commit

Permalink
Merge pull request #1255 from tigrisdata/main
Browse files Browse the repository at this point in the history
beta release
  • Loading branch information
pboros committed Jun 2, 2023
2 parents c59f645 + 99b78c8 commit 76c6986
Show file tree
Hide file tree
Showing 31 changed files with 763 additions and 388 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/publish-debug-image.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/push-docker-amd64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: docker image

on:
pull_request:
paths:
- docker/Dockerfile*
- scripts/install_*.sh
- .github/workflows/push-docker-amd64.yaml
- .github/workflows/push-docker-image.yaml
push:
branches:
- main
release:
types: [published]

jobs:
amd64:
uses: ./.github/workflows/push-docker-image.yaml
secrets: inherit
with:
docker_repository: "tigrisdata/tigris"
quay_repository: "quay.io/tigrisdata/tigris"
file: docker/Dockerfile
platforms: amd64
event_name: ${{ github.event_name }}
25 changes: 25 additions & 0 deletions .github/workflows/push-docker-arm64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: docker image

on:
pull_request:
paths:
- docker/Dockerfile*
- scripts/install_*.sh
- .github/workflows/push-docker-arm64.yaml
- .github/workflows/push-docker-image.yaml
push:
branches:
- main
release:
types: [published]

jobs:
arm64:
uses: ./.github/workflows/push-docker-image.yaml
secrets: inherit
with:
docker_repository: "tigrisdata/tigris"
quay_repository: "quay.io/tigrisdata/tigris"
file: docker/Dockerfile
platforms: arm64
event_name: ${{ github.event_name }}
18 changes: 18 additions & 0 deletions .github/workflows/push-docker-debug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: docker image

on:
pull_request:
types:
- labeled

jobs:
debug:
if: ${{ github.event.label.name == 'debug image' }}
uses: ./.github/workflows/push-docker-image.yaml
secrets: inherit
with:
docker_repository: "tigrisdata/tigris-debug"
quay_repository: "quay.io/tigrisdata/tigris-debug"
file: docker/Dockerfile
platforms: amd64
event_name: push
50 changes: 22 additions & 28 deletions .github/workflows/push-docker-image.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
name: publish docker image
name: docker image

on:
pull_request:
paths:
- docker/Dockerfile*
- scripts/install_*.sh
- .github/workflows/push-docker-*.yaml
merge_group:
paths:
- docker/Dockerfile*
- scripts/install_*.sh
- .github/workflows/push-docker-*.yaml
push:
branches:
- main
release:
types: [published]

env:
DOCKER_REPOSITORY: "tigrisdata/tigris"
QUAY_REPOSITORY: "quay.io/tigrisdata/tigris"
workflow_call:
inputs:
docker_repository:
type: string
quay_repository:
type: string
platforms:
type: string
file:
type: string
event_name:
type: string

jobs:
build-and-push-image:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -46,7 +39,8 @@ jobs:
password: ${{ secrets.GH_DOCKER_ACCESS_TOKEN }}

- name: Login to Quay.io
uses: docker/login-action@v1
if: ${{ inputs.quay_repository != '' }}
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_REGISTRY_USER }}
Expand All @@ -58,16 +52,16 @@ jobs:
with:
# list of Docker images to use as base name for tags
images: |
${{ env.DOCKER_REPOSITORY }}
${{ env.QUAY_REPOSITORY }}
${{ inputs.docker_repository }}
${{ inputs.quay_repository }}
# generate Docker tags based on the following events/attributes
# we generate the latest tag off the beta branch
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
type=raw,value=latest,enable=${{ inputs.event_name == 'release' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -79,8 +73,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
file: ${{ inputs.file }}
platforms: ${{ inputs.platforms }}
push: ${{ inputs.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
77 changes: 0 additions & 77 deletions .github/workflows/push-docker-local-image.yaml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/push-docker-local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: docker image

on:
pull_request:
paths:
- docker/Dockerfile*
- scripts/install_*.sh
- .github/workflows/push-docker-local.yaml
- .github/workflows/push-docker-image.yaml
merge_group:
paths:
- docker/Dockerfile*
- scripts/install_*.sh
- .github/workflows/push-docker-*.yaml
push:
branches:
- main
release:
types: [published]

jobs:
local:
uses: ./.github/workflows/push-docker-image.yaml
secrets: inherit
with:
docker_repository: "tigrisdata/tigris-local"
platforms: amd64,arm64
file: docker/Dockerfile.local
event_name: ${{ github.event_name }}
2 changes: 1 addition & 1 deletion api/proto
Submodule proto updated from fedd43 to 2f9df7
26 changes: 26 additions & 0 deletions api/server/v1/marshaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,32 @@ func (x *ListInvoicesRequest) UnmarshalJSON(data []byte) error {
return nil
}

// UnmarshalJSON on ListAppKeysRequest. Handles query param.
func (x *ListAppKeysRequest) UnmarshalJSON(data []byte) error {
var mp map[string]jsoniter.RawMessage

if err := jsoniter.Unmarshal(data, &mp); err != nil {
return err
}

for key, value := range mp {
var v any

switch key {
case "key_type":
v = &x.KeyType
case "project":
v = &x.Project
default:
continue
}
if err := jsoniter.Unmarshal(value, v); err != nil {
return err
}
}
return nil
}

func (x *GetNamespaceMetadataResponse) MarshalJSON() ([]byte, error) {
resp := struct {
MetadataKey string `json:"metadataKey,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions api/server/v1/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const (
QuotaLimitsMetricsMethodName = ObservabilityMethodPrefix + "QuotaLimits"
QuotaUsageMethodName = ObservabilityMethodPrefix + "QuotaUsage"
GetInfoMethodName = ObservabilityMethodPrefix + "GetInfo"
WhoAmIMethodName = ObservabilityMethodPrefix + "WhoAmI"

// Realtime.
PresenceMethodName = realtimeMethodPrefix + "Presence"
Expand Down
6 changes: 6 additions & 0 deletions config/server.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ auth:
- issuer: http://tigris_gotrue:8086
algorithm: HS256
audience: https://tigris-testB
api_keys:
auds:
- https://tigris-test
length: 120
email_suffix: "@apikey.tigrisdata.com"
user_password: hello
token_cache_size: 100
primary_audience: https://tigris-test
oauth_provider: gotrue
Expand Down
Loading

0 comments on commit 76c6986

Please sign in to comment.