-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:dust-tt/dust into thib/homerevamp
- Loading branch information
Showing
37 changed files
with
1,158 additions
and
653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: Revert Workflow | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
region: | ||
description: "Region to revert" | ||
required: true | ||
default: "us-central1" | ||
type: choice | ||
options: | ||
- "us-central1" | ||
- "europe-west1" | ||
image_tag: | ||
description: "The image tag/SHA to deploy" | ||
type: string | ||
required: true | ||
component: | ||
description: "Component to revert" | ||
type: choice | ||
options: | ||
- alerting-temporal | ||
- connectors | ||
- core | ||
- front | ||
- front-edge | ||
- metabase | ||
- oauth | ||
- prodbox | ||
- viz | ||
required: true | ||
secrets: | ||
SLACK_CHANNEL_ID: | ||
required: true | ||
SLACK_BOT_TOKEN: | ||
required: true | ||
INFRA_DISPATCH_APP_ID: | ||
required: true | ||
INFRA_DISPATCH_APP_PRIVATE_KEY: | ||
required: true | ||
|
||
jobs: | ||
check-branch: | ||
runs-on: ubuntu-latest | ||
if: ${{ !inputs.enforce_main || github.ref == 'refs/heads/main' }} | ||
steps: | ||
- name: Check branch condition | ||
run: | | ||
if [[ "${{ inputs.enforce_main }}" == "true" && "${{ github.ref }}" != "refs/heads/main" ]]; then | ||
echo "Reverts are only allowed from the main branch" | ||
exit 1 | ||
fi | ||
notify-start: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
thread_ts: ${{ steps.build_message.outputs.thread_ts }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Notify Start | ||
id: build_message | ||
uses: ./.github/actions/slack-notify | ||
with: | ||
step: "start" | ||
channel: ${{ secrets.SLACK_CHANNEL_ID }} | ||
component: ${{ inputs.component }} | ||
image_tag: ${{ inputs.image_tag }} | ||
region: ${{ inputs.region }} | ||
slack_token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
is_revert: true | ||
|
||
revert: | ||
needs: [notify-start] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Generate token | ||
id: generate-token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ secrets.INFRA_DISPATCH_APP_ID }} | ||
private-key: ${{ secrets.INFRA_DISPATCH_APP_PRIVATE_KEY }} | ||
owner: ${{ github.repository_owner }} | ||
repositories: dust-infra | ||
|
||
- name: Trigger dust-infra workflow | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ steps.generate-token.outputs.token }} | ||
script: | | ||
await github.rest.repos.createDispatchEvent({ | ||
owner: '${{ github.repository_owner }}', | ||
repo: 'dust-infra', | ||
event_type: 'trigger-component-revert', | ||
client_payload: { | ||
regions: '${{ inputs.region }}', | ||
component: '${{ inputs.component }}', | ||
image_tag: '${{ inputs.image_tag }}', | ||
slack_thread_ts: "${{ needs.notify-start.outputs.thread_ts }}", | ||
slack_channel: '${{ secrets.SLACK_CHANNEL_ID }}', | ||
run_playwright: false, | ||
} | ||
}) | ||
- name: Notify Failure | ||
if: failure() | ||
uses: ./.github/actions/slack-notify | ||
with: | ||
step: "failure" | ||
channel: ${{ secrets.SLACK_CHANNEL_ID }} | ||
component: ${{ inputs.component }} | ||
image_tag: ${{ inputs.image_tag }} | ||
region: ${{ inputs.region }} | ||
slack_token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
thread_ts: "${{ needs.notify-start.outputs.thread_ts }}" | ||
is_revert: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- Migration created on Jan 21, 2025 | ||
ALTER TABLE "public"."remote_databases" ADD COLUMN "permission" VARCHAR(255) NOT NULL DEFAULT 'selected'; | ||
ALTER TABLE "public"."remote_schemas" ADD COLUMN "permission" VARCHAR(255) NOT NULL DEFAULT 'selected'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.