Skip to content

Commit

Permalink
Merge branch 'main' into divi/config-server-ci-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
imperfect-fourth authored Oct 19, 2023
2 parents 3d6ee93 + 8faaebb commit ac8111b
Show file tree
Hide file tree
Showing 125 changed files with 4,280 additions and 4,561 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Nix ❄
uses: DeterminateSystems/nix-installer-action@v5
uses: DeterminateSystems/nix-installer-action@v6

- name: Run the Magic Nix Cache 🔌
uses: DeterminateSystems/magic-nix-cache-action@v2
Expand All @@ -36,11 +36,8 @@ jobs:
mkdir -p generated
docker compose up --detach --wait agent-configuration
CONFIGURATION_SERVER_PORT="$(docker compose port agent-configuration 9100 | sed 's/.\+://')"
CONFIGURATION_SERVER_URL="http://localhost:${CONFIGURATION_SERVER_PORT}/"
curl -fsS "$CONFIGURATION_SERVER_URL" \
| jq --arg uri 'postgresql://postgres:password@postgres' '. + {"connectionUri": {"uri": $uri}}' \
| curl -fsS "$CONFIGURATION_SERVER_URL" -H 'Content-Type: application/json' -d @- \
| jq . \
CONFIGURATION_SERVER="localhost:${CONFIGURATION_SERVER_PORT}"
../../scripts/new-configuration.sh "$CONFIGURATION_SERVER" 'postgresql://postgres:password@postgres' \
| tee ./generated/deployment.json
docker compose down agent-configuration
Expand Down Expand Up @@ -78,7 +75,7 @@ jobs:

# scream into Slack if something goes wrong
- name: Report Status
if: github.ref == 'refs/heads/main'
if: always()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/cargo-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,3 @@ jobs:
- name: lint
run: |
cargo clippy --release -- --deny=clippy::all
# scream into Slack if something goes wrong
- name: report status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}
12 changes: 0 additions & 12 deletions .github/workflows/cargo-machete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,3 @@ jobs:
- name: find unused dependencies
run: |
cargo machete
# scream into Slack if something goes wrong
- name: Report Status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}
24 changes: 0 additions & 24 deletions .github/workflows/cargo-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@ jobs:
env:
RUST_LOG: INFO

# scream into Slack if something goes wrong
- name: report status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}

test-connector:
strategy:
matrix:
Expand Down Expand Up @@ -202,15 +190,3 @@ jobs:
cargo nextest run --no-fail-fast --release -p other-db-tests --features yugabyte
env:
RUST_LOG: INFO

# scream into Slack if something goes wrong
- name: report status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}
28 changes: 2 additions & 26 deletions .github/workflows/check-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,48 +41,24 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: DeterminateSystems/nix-installer-action@v5
- uses: DeterminateSystems/nix-installer-action@v6

- uses: DeterminateSystems/magic-nix-cache-action@v2

- name: check formatting
run: |
nix develop --command nixpkgs-fmt --check .
# scream into Slack if something goes wrong
- name: Report Status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}

prettier:
name: check formatting with prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: DeterminateSystems/nix-installer-action@v5
- uses: DeterminateSystems/nix-installer-action@v6

- uses: DeterminateSystems/magic-nix-cache-action@v2

- name: check formatting
run: |
nix develop --command prettier --check .
# scream into Slack if something goes wrong
- name: Report Status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}
28 changes: 2 additions & 26 deletions .github/workflows/nix-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,24 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: DeterminateSystems/nix-installer-action@v5
- uses: DeterminateSystems/nix-installer-action@v6

- uses: DeterminateSystems/magic-nix-cache-action@v2

- name: nix flake check
run: |
nix flake check --print-build-logs
# scream into Slack if something goes wrong
- name: Report Status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}

nix-develop:
name: nix develop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: DeterminateSystems/nix-installer-action@v5
- uses: DeterminateSystems/nix-installer-action@v6

- uses: DeterminateSystems/magic-nix-cache-action@v2

- name: nix develop --command true
run: |
nix develop --print-build-logs --command true
# scream into Slack if something goes wrong
- name: Report Status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}
29 changes: 26 additions & 3 deletions .github/workflows/nix-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,53 @@ jobs:
- ndc-citus
- ndc-cockroach
- ndc-postgres
fail-fast: false
permissions:
contents: read
id-token: write
packages: write

steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install Nix ❄
uses: DeterminateSystems/nix-installer-action@v5
uses: DeterminateSystems/nix-installer-action@v6

- name: Run the Magic Nix Cache 🔌
uses: DeterminateSystems/magic-nix-cache-action@v2

- id: gcloud-auth
name: Authenticate to Google Cloud 🔑
uses: google-github-actions/auth@v1
with:
token_format: access_token
service_account: "[email protected]"
workload_identity_provider: "projects/1025009031284/locations/global/workloadIdentityPools/hasura-ddn/providers/github"

- name: Login to Google Container Registry 📦
uses: "docker/login-action@v3"
with:
registry: "us-docker.pkg.dev"
username: "oauth2accesstoken"
password: "${{ steps.gcloud-auth.outputs.access_token }}"

- name: Login to GitHub Container Registry 📦
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and deploy docker images 🚀
- name: Build and deploy Docker images to Google Container Registry 🚀
run: nix run .#publish-docker-image '${{ github.ref }}' '${{ matrix.connector }}' 'us-docker.pkg.dev/hasura-ddn/ddn/${{ matrix.connector }}'

- name: Build and deploy Docker images to GitHub Packages 🚀
run: nix run .#publish-docker-image '${{ github.ref }}' '${{ matrix.connector }}' 'ghcr.io/hasura/${{ matrix.connector }}'

# scream into Slack if something goes wrong
- name: Report Status
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
if: always()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/schema-definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
RUSTFLAGS: "-D warnings" # fail on warnings
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install tools
run: rustup show
Expand All @@ -19,15 +19,3 @@ jobs:

- name: OpenAPI Definitions
run: cargo test --bin openapi-generator

# scream into Slack if something goes wrong
- name: Report Status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}
29 changes: 14 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ resolver = "2"

package.version = "0.1.0"
package.edition = "2021"
package.license = "Apache-2.0"

members = [
"crates/connectors/ndc-citus",
Expand Down
6 changes: 1 addition & 5 deletions benchmarks/component/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ if ! kill -0 "$AGENT_PID"; then
echo >&2 'The agent stopped abruptly. Take a look at agent.log for details.'
exit 1
fi
curl -fsS http://localhost:9100 \
| jq \
--arg uri "postgresql://postgres:password@${POSTGRESQL_SOCKET}" \
'. + {"connectionUri": {"uri": $uri}}' \
| curl -fsS http://localhost:9100 -H 'Content-Type: application/json' -d @- \
../../scripts/new-configuration.sh localhost:9100 "postgresql://postgres:password@${POSTGRESQL_SOCKET}" \
> ./generated/deployment.json
kill "$AGENT_PID" && wait "$AGENT_PID" || :
rm -f ./agent.pid
Expand Down
Loading

0 comments on commit ac8111b

Please sign in to comment.