Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanshukumar397 authored Oct 8, 2024
2 parents e22de33 + 7b275ff commit 578c77e
Show file tree
Hide file tree
Showing 402 changed files with 91,839 additions and 14,222 deletions.
6 changes: 6 additions & 0 deletions .github/actions/build-push-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ runs:
with:
platforms: arm64

- name: Set BUILD_TIME env
shell: bash
run: echo BUILD_TIME=$(date -u +'%Y-%m-%dT%H:%M:%SZ') >> ${GITHUB_ENV}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down Expand Up @@ -80,3 +84,5 @@ runs:
type=image,name=target,annotation-index.org.opencontainers.image.licenses=Apache-2.0
build-args: |
VERSION=${{ github.sha }}
DATE=${{ env.BUILD_TIME }}
COMMIT=${{ github.sha }}
5 changes: 4 additions & 1 deletion .github/workflows/aws-router-binary-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
separator: "@"
msg: "${{ github.event.release.tag_name }}"

- name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date -u +'%Y-%m-%dT%H:%M:%SZ') >> ${GITHUB_ENV}

- uses: wangyoucao577/go-release-action@v1
name: Build and attach binaries to GitHub Release
with:
Expand All @@ -51,7 +54,7 @@ jobs:
pre_command: export CGO_ENABLED=0
build_flags: -trimpath
# -w = omits the DWARF symbol table, effectively removing debugging information. Reduces binary size by ~30%.
ldflags: -w -extldflags -static -X github.com/wundergraph/cosmo/aws-lambda-router/internal.Version=${{ steps.split.outputs._1 }}
ldflags: -w -extldflags -static -X "github.com/wundergraph/cosmo/aws-lambda-router/internal.Version=${{ steps.split.outputs._1 }}" -X "github.com/wundergraph/cosmo/aws-lambda-router/internal.Date=${{ env.BUILD_TIME }}" -X "github.com/wundergraph/cosmo/aws-lambda-router/internal.Commit=${{ github.sha }}"
overwrite: true
extra_files: LICENSE
#release_tag: [email protected]
30 changes: 30 additions & 0 deletions .github/workflows/connect-go-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Proto CI
on:
pull_request:
paths:
- "connect-go/**/*"
- "proto/**/*"
- ".github/workflows/connect-go-ci.yaml"

concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: true

env:
CI: true

jobs:
build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/go

- name: Install tools
run: make setup-build-tools

- name: Generate code
run: make generate-go

- name: Check if git is not dirty after generating files
run: git diff --no-ext-diff --exit-code
5 changes: 5 additions & 0 deletions .github/workflows/image-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ jobs:
- name: Generate Summary
run: echo -e "# ${{ inputs.name }}\n## Tags\n\`\`\`${{ steps.meta.outputs.tags }}\n\`\`\`\n## Labels\n\`\`\`${{ steps.meta.outputs.labels }}\n\`\`\`" >> $GITHUB_STEP_SUMMARY

- name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date -u +'%Y-%m-%dT%H:%M:%SZ') >> ${GITHUB_ENV}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand All @@ -103,3 +106,5 @@ jobs:
type=image,name=target,annotation-index.org.opencontainers.image.licenses=Apache-2.0
build-args: |
VERSION=${{ inputs.tag }}
DATE=${{ env.BUILD_TIME }}
COMMIT=${{ github.sha }}
5 changes: 4 additions & 1 deletion .github/workflows/router-binary-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
separator: "@"
msg: "${{ github.event.release.tag_name }}"

- name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date -u +'%Y-%m-%dT%H:%M:%SZ') >> ${GITHUB_ENV}

- uses: wangyoucao577/go-release-action@v1
name: Build and attach binaries to GitHub Release
with:
Expand All @@ -51,7 +54,7 @@ jobs:
binary_name: "router"
pre_command: export CGO_ENABLED=0
build_flags: -trimpath
ldflags: -extldflags -static -X github.com/wundergraph/cosmo/router/core.Version=${{ steps.split.outputs._1 }}
ldflags: -extldflags -static -X "github.com/wundergraph/cosmo/router/core.Version=${{ steps.split.outputs._1 }}" -X "github.com/wundergraph/cosmo/router/core.Date=${{ env.BUILD_TIME }}" -X "github.com/wundergraph/cosmo/router/core.Commit=${{ github.sha }}"
overwrite: true
extra_files: LICENSE
#release_tag: [email protected]
5 changes: 2 additions & 3 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{

"helm/cosmo": "0.11.1",
"helm/cosmo/charts/router": "0.8.0"
"helm/cosmo": "0.12.1",
"helm/cosmo/charts/router": "0.8.1"
}
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ generate:
generate-go:
rm -rf router/gen && buf generate --path proto/wg/cosmo/node --path proto/wg/cosmo/common --path proto/wg/cosmo/graphqlmetrics --template buf.router.go.gen.yaml
rm -rf graphqlmetrics/gen && buf generate --path proto/wg/cosmo/graphqlmetrics --path proto/wg/cosmo/common --template buf.graphqlmetrics.go.gen.yaml
rm -rf connect-go/wg && buf generate --path proto/wg/cosmo/platform --path proto/wg/cosmo/notifications --path proto/wg/cosmo/common --path proto/wg/cosmo/node --template buf.connect-go.go.gen.yaml

start-cp:
pnpm -r run --filter './controlplane' dev
Expand Down Expand Up @@ -162,3 +163,17 @@ check-buf:

buf-lint:
buf lint

new-cp-data-migration:
@if [ -z "$(name)" ]; then \
echo "Usage: make new-data-migration name=<migration_name>"; \
exit 1; \
fi
mkdir -p data_migrations/controlplane/$(shell date +%s)_$(name)

new-gm-data-migration:
@if [ -z "$(name)" ]; then \
echo "Usage: make new-data-migration name=<migration_name>"; \
exit 1; \
fi
mkdir -p data_migrations/graphqlmetrics/$(shell date +%s)_$(name)
68 changes: 68 additions & 0 deletions aws-lambda-router/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,74 @@ Binaries are attached to the github release otherwise all images can be found [h
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.27.1](https://github.com/wundergraph/cosmo/compare/[email protected]@0.27.1) (2024-10-07)

**Note:** Version bump only for package aws-lambda-router

# [0.27.0](https://github.com/wundergraph/cosmo/compare/[email protected]@0.27.0) (2024-10-07)

### Features

* allow specified fields in subgraph errors ([#1248](https://github.com/wundergraph/cosmo/issues/1248)) ([72c770d](https://github.com/wundergraph/cosmo/commit/72c770d1d4d795f70586dfaa1a0ffab2943638a4)) (@thisisnithin)

## [0.26.1](https://github.com/wundergraph/cosmo/compare/[email protected]@0.26.1) (2024-10-03)

### Bug Fixes

* apollo compatibility for truncating floats, invalid __typenames ([#1242](https://github.com/wundergraph/cosmo/issues/1242)) ([a773ea5](https://github.com/wundergraph/cosmo/commit/a773ea53d7f9abe48033dad822f4424a31e28af2)) (@devsergiy)

# [0.26.0](https://github.com/wundergraph/cosmo/compare/[email protected]@0.26.0) (2024-10-03)

### Features

* router version command ([#1240](https://github.com/wundergraph/cosmo/issues/1240)) ([39970e5](https://github.com/wundergraph/cosmo/commit/39970e5b1c6d8e2a2958f5ea55bb0d8aa7206d92)) (@StarpTech)

# [0.25.0](https://github.com/wundergraph/cosmo/compare/[email protected]@0.25.0) (2024-10-02)

### Features

* add apollo compatibility flag to truncate floats ([#1236](https://github.com/wundergraph/cosmo/issues/1236)) ([17c80c9](https://github.com/wundergraph/cosmo/commit/17c80c91f4e594cf48dae887840517b588bbe0f8)) (@jensneuse)

## [0.24.4](https://github.com/wundergraph/cosmo/compare/[email protected]@0.24.4) (2024-09-30)

### Bug Fixes

* upgrade engine for ws deadlock, remove pont pool ([#1230](https://github.com/wundergraph/cosmo/issues/1230)) ([3ac50f8](https://github.com/wundergraph/cosmo/commit/3ac50f8b878fb6a5e2460c22aa94412a28c49600)) (@StarpTech)

## [0.24.3](https://github.com/wundergraph/cosmo/compare/[email protected]@0.24.3) (2024-09-30)

### Bug Fixes

* value completion reset, preserve __typename field location ([#1228](https://github.com/wundergraph/cosmo/issues/1228)) ([9d671f0](https://github.com/wundergraph/cosmo/commit/9d671f071af6d6b5789968682b98a9c5b7f9a7ec)) (@devsergiy)

## [0.24.2](https://github.com/wundergraph/cosmo/compare/[email protected]@0.24.2) (2024-09-30)

### Bug Fixes

* planning of consecutive fragments and fragments on union ([#1223](https://github.com/wundergraph/cosmo/issues/1223)) ([3e390cd](https://github.com/wundergraph/cosmo/commit/3e390cd5cf6ca87694c6a25794aecd84d4f0c31e)) (@devsergiy)

## [0.24.1](https://github.com/wundergraph/cosmo/compare/[email protected]@0.24.1) (2024-09-23)

**Note:** Version bump only for package aws-lambda-router

# [0.24.0](https://github.com/wundergraph/cosmo/compare/[email protected]@0.24.0) (2024-09-23)

### Features

* add apollo compatibility mode with support for valueCompletion ([#1205](https://github.com/wundergraph/cosmo/issues/1205)) ([18b1ef0](https://github.com/wundergraph/cosmo/commit/18b1ef01b12945d2f3acc80ea9548a17f9effa21)) (@jensneuse)

# [0.23.0](https://github.com/wundergraph/cosmo/compare/[email protected]@0.23.0) (2024-09-19)

### Features

* return error from Router when Subgraph returns invalid value for __typename field ([#1194](https://github.com/wundergraph/cosmo/issues/1194)) ([b99d2fd](https://github.com/wundergraph/cosmo/commit/b99d2fdcd8b311028d11b501addb9d69e61c7df8)) (@jensneuse)

## [0.22.2](https://github.com/wundergraph/cosmo/compare/[email protected]@0.22.2) (2024-09-17)

### Bug Fixes

* ignore empty errors array ([#1181](https://github.com/wundergraph/cosmo/issues/1181)) ([bc5dda3](https://github.com/wundergraph/cosmo/commit/bc5dda393f727d8ee3483ea7e53c89377a0d2722)) (@devsergiy)

## [0.22.1](https://github.com/wundergraph/cosmo/compare/[email protected]@0.22.1) (2024-09-13)

**Note:** Version bump only for package aws-lambda-router
Expand Down
5 changes: 4 additions & 1 deletion aws-lambda-router/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ bump-router:
cd .. && go work sync

VERSION?=dev
# RFC3339 format
DATE?=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
COMMIT?=$(shell git rev-parse HEAD)
build:
CGO_ENABLED=0 go build -trimpath -ldflags "-extldflags -static -X github.com/wundergraph/cosmo/aws-lambda-router/internal.Version=$(VERSION)" -a -o bootstrap cmd/main.go
CGO_ENABLED=0 go build -trimpath -ldflags "-extldflags -static -X github.com/wundergraph/cosmo/aws-lambda-router/internal.Version=$(VERSION) -X github.com/wundergraph/cosmo/aws-lambda-router/internal.Date=$(DATE) -X github.com/wundergraph/cosmo/aws-lambda-router/internal.Commit=$(COMMIT)" -a -o bootstrap cmd/main.go

build-sam:
rm -rf .aws-sam && sam build --parallel && cp router.json .aws-sam/build/Api/router.json
Expand Down
17 changes: 9 additions & 8 deletions aws-lambda-router/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ require (
github.com/akrylysov/algnhsa v1.1.0
github.com/aws/aws-lambda-go v1.43.0
github.com/stretchr/testify v1.9.0
github.com/wundergraph/cosmo/router v0.0.0-20240913074702-2ed3533dc18e
go.uber.org/zap v1.26.0
github.com/wundergraph/cosmo/router v0.0.0-20241007123147-208912c19a89
go.uber.org/zap v1.27.0
)

require (
connectrpc.com/connect v1.16.2 // indirect
github.com/MicahParks/keyfunc/v2 v2.1.0 // indirect
github.com/alitto/pond v1.8.3 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bep/debounce v1.2.1 // indirect
Expand Down Expand Up @@ -50,7 +49,7 @@ require (
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/jensneuse/abstractlogger v0.0.4 // indirect
github.com/jensneuse/byte-template v0.0.0-20200214152254-4f3cf06e5c68 // indirect
github.com/jensneuse/byte-template v0.0.0-20231025215717-69252eb3ed56 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/kingledion/go-tools v0.6.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
Expand All @@ -71,6 +70,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/pquerna/cachecontrol v0.2.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
Expand All @@ -83,16 +83,17 @@ require (
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sosodev/duration v1.3.1 // indirect
github.com/tidwall/gjson v1.17.0 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tonglil/opentelemetry-go-datadog-propagator v0.1.3 // indirect
github.com/twmb/franz-go v1.16.1 // indirect
github.com/twmb/franz-go/pkg/kmsg v1.7.0 // indirect
github.com/wundergraph/astjson v0.0.0-20240910140849-bb15f94bd362 // indirect
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.81 // indirect
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.100 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.23.0 // indirect
Expand All @@ -115,8 +116,8 @@ require (
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect
Expand Down
Loading

0 comments on commit 578c77e

Please sign in to comment.