This PR switches the steps updating PR description to a local Javascript
script, run using `actions/github-script`, instead of depending on an
external third-party action.
Why? Besides reducing our dependency on third-party actions, which have
been found to break with surprises, we need this to fix a bug with the
`/test` command. The `/test` command, when is written with invalid tags,
reports the error in the workflow run, but doesn't update the PR
description. Because of how it's written in Javascript, we need a
Javascript way to update the description to fix that. This will provide
for that.
Further PRs will replace other uses of PR description update steps with
this.
**/test sanity**
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9556890596>
> Commit: 00d06858f6f7d14c6393cb16c894ddfd808b7cf8
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9556890596&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
<!-- end of auto-generated comment: Cypress test results -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Chores**
- Updated GitHub Actions workflow to enhance pull request automation
with Cypress test results.
- Improved PR body updates with detailed test outcomes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
**/test sanity**
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Style**
- Improved clarity and formatting of messages related to Cypress
dashboard links.
- Enhanced information display for test failures, flaky tests, and
successful test runs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
Temporary arrangement to consume different base image for `pg` vs
`release`, until we upgrade Postgres to v15 on release.
## Automation
/ok-to-test tags="@tag.Sanity"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9479342636>
> Commit: 69d29d1657d606d78c5f85aa130cf773eb693d27
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9479342636&attempt=1"
target="_blank">Click here!</a>
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced a new input parameter `is-pg-build` to several workflows
for better customization of PostgreSQL builds.
- Enhanced Docker image build processes with dynamic base image tagging
based on pull request conditions.
- **Chores**
- Updated GitHub Actions workflows to improve build automation and
conditional logic handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
The cyclic deps check workflow was running on all PRs. This PR skips the
workflow when the client files are unchanged.
Also log the cyclic deps in the workflow run to improve debugging
experience.
Fixes #`Issue Number`
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags="@tag.Sanity"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9468903312>
> Commit: 83d6a9c8c40e5a5bb874ba82738fab7715cd5b7d
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9468903312&attempt=1"
target="_blank">Click here!</a>
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Chores**
- Introduced conditional checks in CI workflow to optimize the execution
of circular dependency checks based on changes in specific files.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Upgrading nefrob/pr-description to v1.1.2 to remove warnings in Github
action logs for Node 20.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Chores**
- Updated GitHub Actions workflows to use the latest version (`v1.1.2`)
of the `nefrob/pr-description` action for improved stability and
performance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
> [!TIP]
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._
Fixes #`Issue Number`
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags=""
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!CAUTION]
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
## Description
This is being done to ensure that RTS jest test cases are run in TBP on
release as well as master.
Fixes #`Issue Number`
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags=""
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!CAUTION]
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
## Description
Add a GitHub workflow to compare the number of cyclic dependencies in a
PR to the number in the release branch. If the PR introduces new cyclic
dependencies, a comment should be posted in the conversation to alert
the developer.
Fixes #`Issue Number`
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags="@tag.Sanity"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9228474130>
> Commit: c93f3e5df863ab7e2e287bf093a14a3f5f43e8e8
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9228474130&attempt=1"
target="_blank">Click here!</a>
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
The upcoming TED version is about come with a Git repo, baked into the
image. We're going to use this to test import of git repos.
But since we mount a blank folder onto this, the baked-in contents of
`/git-server/repos` is effectively cleared and overwritten. This PR
fixes that. We don't really need this volume mount, should be okay to
remove.
/test sanity
## Description
1. PR to enable server tests on PRs with `pg` as the base branch.
2. Replace the DB URI from `APPSMITH_MONGODB_URI` to `APPSMITH_DB_URL`
## Automation
/ok-to-test tags="@tag.Sanity, @tag.GenerateCRUD, @tag.Fork"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9174148396>
> Commit: 762b4255f654946a1a47a196df5a1afae5be09f2
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9174148396&attempt=1"
target="_blank">Click here!</a>
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
---------
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
The ADS compliance check relies on the condition
`github.pull_request.base.ref == 'true'`, but this variable just doesn't
exist. There's no `pull_request` under the `github` context, so this ADS
compliance check never worked.
If we want this check, we can add it later as part of the
`client-build.compliance.js` script. Here's a PoC for the record, based
on the intention I interpreted:
```javascript
function doADSCheck({core, github, context, affectedFiles}) {
const filesForADSCheck = affectedFiles.filter(f => (f.status === "added" || f.status === "modified") && f.filename.startsWith("app/client/src/"));
const violatedFiles = new Set();
for (const f of filesForADSCheck) {
const content = fs.readFileSync(f.filename, "utf8");
if (content.match(/(color|Color).*#|border.*#|(color|Color).*"/)) {
violatedFiles.add(f.filename);
}
}
if (violatedFiles.size === 0) {
return;
}
const body = [
"🔴 Below files are not compliant with ADS. Please fix and re-trigger ok-to-test",
...Array.from(violatedFiles).sort().map(f => "1. " + f),
].join("\n");
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body,
});
}
```
/test sanity
We have a check when running Cypress tests to ensure that no new `.js`
files are added under Cypress folder. This PR moves this check to a
separate JS file. There's another check that does some ADS compliance,
which I'll port in a follow-up PR.
Why am I hitting on this? One, to move away from `umani/changed-files`
workflow, which has randomly failed for us in the past, and id doesn't
do so much special for us anyway. Two, this workflow is the last usage
of `APPSMITH_CI_TEST_PAT` secret, so I should be able to remove that
secret as well. One less secret.
## Description
By default the value of overwrite is false. In previous versions of
upload-artifact, this setting was implicit and true. Making this change
to fix the error `Failed to CreateArtifact: Received non-retryable
error: Failed request: (409) Conflict: an artifact with this name
already exists on the workflow run` in Github actions.
## Automation
/ok-to-test tags=""
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!CAUTION]
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
Adds support for a `/test` command, without breaking the existing
`/ok-to-test` habits.
This is a _sloppy_ version of `/ok-to-test`. Turns out humans are
sloppy. So let's embrace the human. 🤯
Example incantation:
```
/test sanity workflow
```
The sloppy parser at work:

Of course, if a PR body contains `/ok-to-test`, that takes precedence,
and any `/test` is ignored.
We're also moving the logic of parsing the tags to a separate Javascript
file. It's still not in a form that's easily testable, perhaps, but I
hope this is a start for us to get to a "unit-tested CI". ❤️
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
## Description
> [!TIP]
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._
Fixes #`Issue Number`
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags=""
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!CAUTION]
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
---------
Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
The step to get the PR number when run manually has error in its code.
The `res=` line doesn't work, in that it'll mangle the JSON output from
the `curl` command, before setting it into the variable. It should've
been
```sh
res="$(curl ...)"
```
Considering we don't use this functionality today, and it doesn't work
either, we're removing it.
This workflow is only used with `repository_dispatch`, and we make that
explicit.
1. Add validation for the tag before building the image or doing
anything. This is strict case-sensitive validation, that will allow only
three numbers in the version, and the first number has to be a single
digit. Support for `-beta` versions is also being removed, as we just
don't use it. Thanks to removing this, we'll build the `latest` and
`v1.2.3` images together, instead of building two separate images.
2. The server and client are reading version from `version` key in
`info.json`, but RTS is reading it from `githubRef` key in `info.json`.
This discrepancy is debt, and has no reason to exist. We fix RTS to also
read the version from the `version` field.
Why are we doing this? [Slack
conversation](https://theappsmith.slack.com/archives/C0341RERY4R/p1714098736865219?thread_ts=1714066995.288859&cid=C0341RERY4R).
1. Change usage of ports bound to 3000, 5000 and 8000 to 4200, which
will be the canonical port for TED in the future.
2. Switch to using TED's native git repo management APIs, instead of the
Gitea compatibility layer.
3. Remove code from GitHub ages.
/ok-to-test tags="@tag.Sanity, @tag.Git"<!-- This is an auto-generated
comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8785291879>
> Commit: b38f4eb388716f7fcfc2a032d788c2ebb951568b
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8785291879&attempt=2"
target="_blank">Click here!</a>
<!-- end of auto-generated comment: Cypress test results -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Refactor**
- Enhanced Git integration by shifting from GitHub to Gitea for
repository operations in test environments.
- Updated URLs and endpoints across various test scripts and data
fixtures to align with new configurations.
- **Tests**
- Modified test scenarios to reflect changes in Git operations and URL
configurations.
- **Chores**
- Updated CI workflows by replacing old secrets with new ones for better
configuration management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
- Update Storybook and related dependencies
- Delete the stories for old widget components
- Rewrite stories for new widgets(mdx to tsx)
Note: local chromatic doesn't work because of this
https://github.com/storybookjs/storybook/issues/22531
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced new component stories across various packages to enhance
design system documentation and user experience.
- **Documentation**
- Updated `.gitignore` files to optimize version control settings for
Storybook and build logs.
- **Refactor**
- Modified UI element positioning in Storybook theming for improved
layout management.
- **Style**
- Adjusted CSS properties for the `Select` component to ensure better
visual presentation.
- **Chores**
- Updated dependencies and scripts in package configurations to maintain
up-to-date development tools.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This changes to publish TED's canonical app port, `4200`.
What's wrong with the currently used ports?
57f63003ef/app/app.ts (L18-L20)
Quoting here:
> 8000, // Past static webserver port, to be removed, after switching to
4200, clashes with CloudServices on CI.
> 5000, // Past Postgraphile port, to be removed, after switching to
4200, clashes with macOS AirDrop.
> 3000, // Past Gitea port, to be removed, after removing Gitea, because
it clashes with `yarn start` in Appsmith.
/ok-to-test tags="@tag.Sanity"
## Description
Add a check to validate PRs
Fixes #`32763`
## Automation
/ok-to-test tags=""
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!CAUTION]
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.
<!-- end of auto-generated comment: Cypress test results -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Integrated a new workflow step to validate tags in pull requests,
providing guidance for corrections and halting the workflow if tags are
incorrect.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This is to make it apparent what TED tag was used to run a workflow, so
that runs that happened with an unstable (non `latest`) tag of TED
aren't taken seriously.
Change TBP Schedule
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Chores**
- Modified the schedule for running the workflow to trigger every 6
hours instead of every 3 hours on weekdays.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->