Skip to content

Commit dba469f

Browse files
committed
Merge remote-tracking branch 'origin/release' into fix/app-15912
# Conflicts: # app/client/yarn.lock
2 parents 55be004 + e43a783 commit dba469f

104 files changed

Lines changed: 50315 additions & 82 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ad-hoc-docker-image.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ jobs:
4141
with:
4242
branch: ${{ inputs.branch }}
4343

44+
mcp-build:
45+
name: mcp-build
46+
uses: ./.github/workflows/mcp-build.yml
47+
secrets: inherit
48+
with:
49+
branch: ${{ inputs.branch }}
50+
4451
rts-build:
4552
name: rts-build
4653
uses: ./.github/workflows/rts-build.yml
@@ -49,7 +56,7 @@ jobs:
4956
branch: ${{ inputs.branch }}
5057

5158
package:
52-
needs: [server-build, client-build, rts-build]
59+
needs: [server-build, client-build, mcp-build, rts-build]
5360
runs-on: ubuntu-latest
5461
# Set permissions since we're using OIDC token authentication between Depot and GitHub
5562
permissions:
@@ -94,6 +101,18 @@ jobs:
94101
echo "Cleaning up the tar files"
95102
rm app/client/packages/rts/dist/rts-dist.tar
96103
104+
- name: Download the MCP build artifact
105+
uses: actions/download-artifact@v4
106+
with:
107+
name: mcp-dist
108+
path: app/client/packages/mcp/dist
109+
110+
- name: Untar the MCP folder
111+
run: |
112+
tar -xvf app/client/packages/mcp/dist/mcp-dist.tar -C app/client/packages/mcp/
113+
echo "Cleaning up the MCP tar files"
114+
rm app/client/packages/mcp/dist/mcp-dist.tar
115+
97116
- name: Generate info.json
98117
id: info_json
99118
run: |

.github/workflows/build-client-server-count.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@ jobs:
137137
with:
138138
pr: ${{fromJson(needs.file-check.outputs.pr)}}
139139
skip-tests: "true"
140+
141+
mcp-build:
142+
name: mcp-build
143+
needs: [file-check]
144+
if: success() && needs.file-check.outputs.runId == '0'
145+
uses: ./.github/workflows/mcp-build.yml
146+
secrets: inherit
147+
with:
148+
pr: ${{fromJson(needs.file-check.outputs.pr)}}
140149

141150
rts-build:
142151
name: rts-build
@@ -148,7 +157,7 @@ jobs:
148157
pr: ${{fromJson(needs.file-check.outputs.pr)}}
149158

150159
build-docker-image:
151-
needs: [file-check, client-build, server-build, rts-build]
160+
needs: [file-check, client-build, server-build, mcp-build, rts-build]
152161
# Only run if the build step is successful
153162
if: success() && needs.file-check.outputs.runId == '0'
154163
name: build-docker-image

.github/workflows/build-client-server.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,15 @@ jobs:
345345
checkout-ref: ${{ needs.file-check.outputs.merge_sha }}
346346
skip-tests: "true"
347347

348+
mcp-build:
349+
name: mcp-build
350+
needs: [file-check]
351+
if: success() && needs.file-check.outputs.runId == '0'
352+
uses: ./.github/workflows/mcp-build.yml
353+
secrets: inherit
354+
with:
355+
pr: ${{fromJson(needs.file-check.outputs.pr)}}
356+
348357
rts-build:
349358
name: rts-build
350359
needs: [file-check]
@@ -356,7 +365,7 @@ jobs:
356365
checkout-ref: ${{ needs.file-check.outputs.merge_sha }}
357366

358367
build-docker-image:
359-
needs: [file-check, client-build, server-build, rts-build]
368+
needs: [file-check, client-build, server-build, mcp-build, rts-build]
360369
# Only run if the build step is successful
361370
if: success() && needs.file-check.outputs.runId == '0'
362371
name: build-docker-image

.github/workflows/build-docker-image.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ jobs:
7878
name: server-build
7979
path: app/server/dist/
8080

81+
- name: Download the MCP build artifact
82+
if: steps.run_result.outputs.run_result != 'success'
83+
uses: actions/download-artifact@v4
84+
with:
85+
name: mcp-dist
86+
path: app/client/packages/mcp/dist
87+
88+
- name: Un-tar the MCP folder
89+
run: |
90+
tar -xvf app/client/packages/mcp/dist/mcp-dist.tar -C app/client/packages/mcp/
91+
echo "Cleaning up the MCP tar files"
92+
rm app/client/packages/mcp/dist/mcp-dist.tar
93+
8194
- name: Download the rts build artifact
8295
if: steps.run_result.outputs.run_result != 'success'
8396
uses: actions/download-artifact@v4

.github/workflows/docs/test-build-docker-image.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ The `client-build` job builds the client-side codebase. It uses the configuratio
3232

3333
The `rts-build` job builds the "rts" (real-time suggestions) package of the client-side codebase. It uses the configuration defined in `.github/workflows/rts-build.yml` and inherits secrets from the repository.
3434

35+
### `mcp-build`
36+
37+
This job builds and tests the MCP service, then supplies its bundled artifact to the Docker-image jobs.
38+
3539
### `build-docker-image`
3640

37-
This job, named `build-docker-image`, creates and pushes the Docker image for the application. It is dependent on the success of the `client-build`, `server-build`, and `rts-build` jobs. The Docker image is built with two platforms: `linux/arm64` and `linux/amd64`.
41+
This job, named `build-docker-image`, creates and pushes the Docker image for the application. It is dependent on the success of the `client-build`, `server-build`, `rts-build`, and `mcp-build` jobs. The Docker image is built with two platforms: `linux/arm64` and `linux/amd64`.
3842

3943
### `ci-test`
4044

.github/workflows/github-release.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,16 @@ jobs:
197197
path: app/client/packages/rts/rts-dist.tar
198198
overwrite: true
199199

200+
mcp-build:
201+
needs:
202+
- prelude
203+
uses: ./.github/workflows/mcp-build.yml
204+
secrets: inherit
205+
with:
206+
branch: ${{ github.ref }}
207+
200208
package:
201-
needs: [prelude, client-build, server-build, rts-build]
209+
needs: [prelude, client-build, server-build, rts-build, mcp-build]
202210

203211
runs-on: ubuntu-latest
204212
permissions:
@@ -231,6 +239,18 @@ jobs:
231239
name: server-build
232240
path: app/server/dist
233241

242+
- name: Download the MCP build artifact
243+
uses: actions/download-artifact@v4
244+
with:
245+
name: mcp-dist
246+
path: app/client/packages/mcp/dist
247+
248+
- name: Untar the MCP folder
249+
run: |
250+
tar -xvf app/client/packages/mcp/dist/mcp-dist.tar -C app/client/packages/mcp/
251+
echo "Cleaning up the MCP tar files"
252+
rm app/client/packages/mcp/dist/mcp-dist.tar
253+
234254
- name: Download the rts build artifact
235255
uses: actions/download-artifact@v4
236256
with:

.github/workflows/mcp-build.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Build MCP Workflow
2+
3+
# Least privilege: this workflow only reads the repo and uploads/downloads artifacts.
4+
permissions:
5+
contents: read
6+
7+
on:
8+
workflow_dispatch:
9+
workflow_call:
10+
inputs:
11+
pr:
12+
description: "PR number when building a pull-request merge commit"
13+
required: false
14+
type: number
15+
skip-tests:
16+
description: "Skip unit tests for image-only builds"
17+
required: false
18+
type: string
19+
default: "false"
20+
branch:
21+
description: "Branch to build when pr is 0"
22+
required: false
23+
type: string
24+
25+
pull_request:
26+
branches: [release, master]
27+
paths:
28+
- "app/client/packages/mcp/**"
29+
30+
defaults:
31+
run:
32+
working-directory: app/client/packages/mcp
33+
shell: bash
34+
35+
jobs:
36+
build:
37+
runs-on: ubuntu-latest
38+
if: |
39+
github.event.pull_request.head.repo.full_name == github.repository ||
40+
github.event_name == 'push' ||
41+
github.event_name == 'workflow_dispatch' ||
42+
github.event_name == 'repository_dispatch' ||
43+
github.event_name == 'schedule' ||
44+
github.event_name == 'release'
45+
steps:
46+
- name: Checkout the merged pull-request commit
47+
if: inputs.pr != 0
48+
uses: actions/checkout@v4
49+
with:
50+
fetch-tags: true
51+
persist-credentials: false
52+
ref: refs/pull/${{ inputs.pr }}/merge
53+
54+
- name: Checkout the specified branch
55+
if: inputs.pr == 0 && inputs.branch != ''
56+
uses: actions/checkout@v4
57+
with:
58+
fetch-tags: true
59+
persist-credentials: false
60+
ref: ${{ inputs.branch }}
61+
62+
- name: Checkout the head commit
63+
if: inputs.pr == 0 && inputs.branch == ''
64+
uses: actions/checkout@v4
65+
with:
66+
fetch-tags: true
67+
persist-credentials: false
68+
69+
- name: Use Node.js
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version-file: app/client/package.json
73+
74+
# actions/setup-node@v4 does not restore Yarn 3 caches from a subdirectory.
75+
- name: Restore Yarn cache
76+
uses: actions/cache@v4
77+
with:
78+
path: app/client/.yarn/cache
79+
key: v1-yarn3-${{ hashFiles('app/client/yarn.lock') }}
80+
restore-keys: |
81+
v1-yarn3-
82+
83+
- name: Install dependencies
84+
run: |
85+
corepack enable
86+
yarn install --immutable
87+
88+
- name: Check types
89+
run: yarn check-types
90+
91+
- name: Lint
92+
run: yarn lint
93+
94+
- name: Check formatting
95+
run: yarn prettier
96+
97+
- name: Run unit tests
98+
if: inputs.skip-tests != 'true'
99+
run: yarn test:unit
100+
101+
- name: Build
102+
run: yarn build
103+
104+
- name: Tar the MCP bundle
105+
run: tar -cvf mcp-dist.tar dist
106+
107+
- name: Upload MCP build bundle
108+
uses: actions/upload-artifact@v4
109+
with:
110+
name: mcp-dist
111+
path: app/client/packages/mcp/mcp-dist.tar
112+
overwrite: true

.github/workflows/on-demand-build-docker-image-deploy-preview.yml

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,36 @@ on:
1616
description: Base image tag to use (overrides branch-based default)
1717
required: false
1818
type: string
19+
skip-tests:
20+
description: Skip tests during the build (same as slash-command skip-tests)
21+
required: false
22+
type: boolean
23+
default: true
1924

2025
jobs:
2126
resolve-params:
2227
runs-on: ubuntu-latest
2328
outputs:
2429
pr_number: ${{ steps.resolve.outputs.pr_number }}
30+
skip_tests: ${{ steps.resolve.outputs.skip_tests }}
2531
steps:
26-
- name: Resolve PR number
32+
- name: Resolve PR number and skip-tests
2733
id: resolve
34+
env:
35+
SLASH_PR: ${{ github.event.client_payload.pull_request.number }}
36+
INPUT_PR: ${{ inputs.issue_number }}
37+
SLASH_SKIP_TESTS: ${{ github.event.client_payload.slash_command.args.named.skip-tests }}
38+
INPUT_SKIP_TESTS: ${{ inputs.skip-tests }}
2839
run: |
29-
if [[ -n "${{ github.event.client_payload.pull_request.number }}" ]]; then
30-
echo "pr_number=${{ github.event.client_payload.pull_request.number }}" >> "$GITHUB_OUTPUT"
40+
if [[ -n "$SLASH_PR" ]]; then
41+
echo "pr_number=$SLASH_PR" >> "$GITHUB_OUTPUT"
42+
else
43+
echo "pr_number=$INPUT_PR" >> "$GITHUB_OUTPUT"
44+
fi
45+
if [[ -n "$SLASH_SKIP_TESTS" ]]; then
46+
echo "skip_tests=$SLASH_SKIP_TESTS" >> "$GITHUB_OUTPUT"
3147
else
32-
echo "pr_number=${{ inputs.issue_number }}" >> "$GITHUB_OUTPUT"
48+
echo "skip_tests=$INPUT_SKIP_TESTS" >> "$GITHUB_OUTPUT"
3349
fi
3450
3551
notify-job-details:
@@ -44,7 +60,7 @@ jobs:
4460
body: |
4561
Deploying Your Preview: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
4662
Workflow: `${{ github.workflow }}`.
47-
skip-tests: `${{ github.event.client_payload.slash_command.args.named.skip-tests }}`.
63+
skip-tests: `${{ needs.resolve-params.outputs.skip_tests }}`.
4864
env: `${{ github.event.client_payload.slash_command.args.named.env }}`.
4965
PR: ${{ needs.resolve-params.outputs.pr_number }}.
5066
recreate: ${{ github.event.client_payload.slash_command.args.named.recreate }}.
@@ -58,7 +74,7 @@ jobs:
5874
secrets: inherit
5975
with:
6076
pr: ${{ fromJSON(needs.resolve-params.outputs.pr_number) }}
61-
skip-tests: ${{ github.event.client_payload.slash_command.args.named.skip-tests }}
77+
skip-tests: ${{ needs.resolve-params.outputs.skip_tests }}
6278
is-pg-build: ${{ github.event.client_payload.pull_request.base.ref == 'pg' }}
6379

6480
client-build:
@@ -69,7 +85,17 @@ jobs:
6985
secrets: inherit
7086
with:
7187
pr: ${{ fromJSON(needs.resolve-params.outputs.pr_number) }}
72-
skip-tests: ${{ github.event.client_payload.slash_command.args.named.skip-tests }}
88+
skip-tests: ${{ needs.resolve-params.outputs.skip_tests }}
89+
90+
mcp-build:
91+
needs: [resolve-params]
92+
name: mcp-build
93+
if: github.event.client_payload.slash_command.args.named.env != 'release'
94+
uses: ./.github/workflows/mcp-build.yml
95+
secrets: inherit
96+
with:
97+
pr: ${{ fromJSON(needs.resolve-params.outputs.pr_number) }}
98+
skip-tests: ${{ needs.resolve-params.outputs.skip_tests }}
7399

74100
rts-build:
75101
needs: [resolve-params]
@@ -79,7 +105,7 @@ jobs:
79105
secrets: inherit
80106
with:
81107
pr: ${{ fromJSON(needs.resolve-params.outputs.pr_number) }}
82-
skip-tests: ${{ github.event.client_payload.slash_command.args.named.skip-tests }}
108+
skip-tests: ${{ needs.resolve-params.outputs.skip_tests }}
83109

84110
vercel-build:
85111
needs: [resolve-params]
@@ -149,7 +175,7 @@ jobs:
149175
})
150176
151177
push-image:
152-
needs: [resolve-params, client-build, rts-build, server-build]
178+
needs: [resolve-params, client-build, mcp-build, rts-build, server-build]
153179
runs-on: ubuntu-latest
154180
permissions:
155181
contents: read
@@ -189,6 +215,18 @@ jobs:
189215
name: server-build
190216
path: app/server/dist
191217

218+
- name: Download the MCP build artifact
219+
uses: actions/download-artifact@v4
220+
with:
221+
name: mcp-dist
222+
path: app/client/packages/mcp/dist
223+
224+
- name: Untar the MCP folder
225+
run: |
226+
tar -xvf app/client/packages/mcp/dist/mcp-dist.tar -C app/client/packages/mcp/
227+
echo "Cleaning up the MCP tar files"
228+
rm app/client/packages/mcp/dist/mcp-dist.tar
229+
192230
- name: Download the rts build artifact
193231
uses: actions/download-artifact@v4
194232
with:
@@ -343,4 +381,4 @@ jobs:
343381
with:
344382
issue-number: ${{ needs.resolve-params.outputs.pr_number }}
345383
body: |
346-
Deploy-Preview-URL: https://${{ vars.EDITION }}-${{ needs.resolve-params.outputs.pr_number }}.dp.appsmith.com
384+
Deploy-Preview-URL: https://${{ vars.EDITION }}-${{ needs.resolve-params.outputs.pr_number }}.dp.appsmith.com

0 commit comments

Comments
 (0)