Commit Graph

982 Commits

Author SHA1 Message Date
Abhijeet
cd2f1cb5dd
chore: Cleanup Flagsmith envs from CI (#33704)
## 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/9210729164>
> Commit: ffb04c3dd1eb214aa4d3cdd3d97a28ca0ada7de1
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9210729164&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
2024-05-24 10:19:48 +05:30
Arpit Mohan
9faab949cc
ci: Making minor improvements to the CI workflow files (#33636)
This is trivial housekeeping task to keep the workflow files consistent
and remove warnings.
2024-05-23 19:47:34 +05:30
Shrikant Sharat Kandula
8480704398
ci: Don't mount volume for TED's git repos (#33666)
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
2024-05-23 18:39:53 +05:30
Abhijeet
7e339d419d
test: Enable server tests for the PRs with base PG branch (#33429)
## 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>
2024-05-22 15:55:20 +05:30
Shrikant Sharat Kandula
c22917599f ci: Remove unused ads-compliant-check input 2024-05-21 11:22:32 +05:30
Shrikant Sharat Kandula
35774bb4f6
ci: Remove inert ADS compliance check (#33603)
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
2024-05-21 11:21:15 +05:30
Shrikant Sharat Kandula
e9102d5085 ci: Get PR number from env variable 2024-05-20 20:47:15 +05:30
Shrikant Sharat Kandula
2459607a3f
ci: Move check for new JS Cypress tests to GitHub script (#33560)
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.
2024-05-20 20:39:33 +05:30
Arpit Mohan
f81cb9f970
ci: Removing outdated Github action actions-cache (#33568)
Using actions/cache/save which is the supported version now.
2024-05-20 19:26:31 +05:30
Arpit Mohan
ddefab7306
ci: Adding the overwrite: true parameter to actions/upload-artifact@v4 command (#33593)
## 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
2024-05-20 17:22:22 +05:30
Shrikant Sharat Kandula
cb973941d5
ci: Add sloppy /test command (#33558)
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:

![shot-2024-05-18-03-40-30](https://github.com/appsmithorg/appsmith/assets/120119/0d495e88-a242-4f2b-a73c-bcf6e58cc9ad)

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>
2024-05-20 15:26:12 +05:30
Arpit Mohan
6aeb456c62
ci: Upgrade GitHub Action steps to github-script@v7 and pload-artifact@v4 (#33554)
## 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>
2024-05-20 10:49:27 +05:30
Shrikant Sharat Kandula
16cd15a103
ci: Include edition in failure messages to Slack (#33553) 2024-05-18 00:14:20 +05:30
Shrikant Sharat Kandula
3e06f1a570
ci: Disable manual run on limited test workflow (#33534)
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.
2024-05-17 10:42:04 +05:30
Shrikant Sharat Kandula
0591c4636e
chore: Validate tag before doing anything (#32978)
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).
2024-05-01 11:44:53 +05:30
Shrikant Sharat Kandula
4b9dddc861
ci: Remove Postgres from client-build workflow 2024-04-24 15:08:16 +05:30
Shrikant Sharat Kandula
cd22fc1087
test: Some cleanup for Git Cypress tests (#32836)
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 -->
2024-04-23 10:01:14 +05:30
Valera Melnikov
6d90ce8dc9
chore: update storybook (#32828)
## 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 -->
2024-04-22 12:17:28 +03:00
Shrikant Sharat Kandula
85bed5bfc7
ci: Publish port 4200 for TED (#32835)
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"
2024-04-22 10:33:07 +05:30
yatinappsmith
94958b538a
CI: fix checkout for label (#32775)
fix checkout for label
2024-04-18 16:19:27 +05:30
yatinappsmith
655548d948
CI: Fix label Checker (#32770)
Fix label Checker
2024-04-18 14:38:17 +05:30
yatinappsmith
4e6f3c599e
CI: Check for valid cypress tags (#32764)
## 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 -->
2024-04-18 13:20:59 +05:30
Hetu Nandu
7a02a1764b
ci: [Cypress Test Results] Remove code wrappers from commit refs (#32543) 2024-04-10 15:06:16 +05:30
Shrikant Sharat Kandula
7c89a3bad0
ci: Better and more visible colors (#32541) 2024-04-10 13:33:02 +05:30
Shrikant Sharat Kandula
08ef7ad53b
ci: Weekly schedule for Caddy route tests 2024-04-08 12:19:16 +05:30
Shrikant Sharat Kandula
5968f87be0
ci: Show default TED tag when blank 2024-04-06 10:09:57 +05:30
Nidhi
74b9ac16ba
ci: Delete jobs that are not part of SDLC process anymore (#32461) 2024-04-05 19:20:29 +05:30
Nidhi
a258690356
ci: Delete Build DP via ops.appsmith and Add label for Cyp fix (#32455) 2024-04-05 16:50:46 +05:30
Nidhi
055b0dffa9
ci: Remove unused Cypress related jobs (#32450) 2024-04-05 15:01:20 +05:30
Nidhi
f75f0871d5
ci: Removing perf-test related jobs (#32447) 2024-04-05 14:06:23 +05:30
Shrikant Sharat Kandula
bdd130d95c
ci: Show TED tag used in run name and summary (#32445)
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.
2024-04-05 12:09:02 +05:30
Nidhi
f544e7ca49
ci: Removing DocumentDB related jobs (#32436) 2024-04-05 11:11:23 +05:30
Nidhi
0b5349231c
ci: Removing pr-test-file-check since it does not seem to be a requirement today (#32435) 2024-04-05 11:10:51 +05:30
Nidhi
7c7038c87a
ci: Removing ci-merge-check workflow as it is not required anymore (#32434) 2024-04-05 11:10:30 +05:30
Gurudatt S A
7a596f5ab6
fix: fix typo in pr-test-file-check.yml (#32422) 2024-04-05 06:52:55 +05:30
yatinappsmith
2af8c4ef42
CI: Change TBP Schedule (#32319)
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 -->
2024-04-02 12:10:42 +05:30
Arpit Mohan
86cd40982b
ci: Upgrading the github action steps from Node 16 to Node 20. (#32004)
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content 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._

This is a maintenance fix that removes the warnings in our CI runs to
make it more readable.
Refer:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

> [!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  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8386795331>
> Commit: `2b1bfe7ed505ad9ba67bfe9211d50ebabb8ea0ce`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8386795331&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Updated DockerHub login action across multiple workflows to version 3
for enhanced security and performance.
- Updated various GitHub Actions to newer versions in different
workflows for improved compatibility and performance.
- Modified file path pattern in a workflow step for consistency and
clarity.
- Updated setup actions for Java to version 4 for better Java
environment setup.
- Updated setup-node version in a workflow and adjusted comments for
Cypress test results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-01 15:41:43 +05:30
Shrikant Sharat Kandula
efc0428682
ci: Checkout repo so package.json is available 2024-03-31 08:21:39 +05:30
Shrikant Sharat Kandula
38cefce9af
ci: Add dashboard link in PR comment (#32205)
[Slack
conversation](https://theappsmith.slack.com/archives/C0134BAVDB4/p1711545944961399).
2024-03-28 13:27:30 +05:30
Shrikant Sharat Kandula
0291ef7e46
ci: Allow special chars in PR body (#32089)
Currently, we get the value of the PR body into a variable, by injecting
it into a variable definition. This has two problems:

1. If the PR body has a `'` character in it, then the string definition
will terminate there, and cause an syntax error in the rest of the
script.
2. This is prone to [script injections as documented by
GitHub](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections).
2024-03-27 08:58:27 +05:30
Valera Melnikov
92c72ee20e
chore: update node version and appropriate git workflows (#31486)
## Description
- update node version and appropriate git workflow
- added the path to webpack cache folder, this should speed up bundle
creation about a minute

[Test, build and push Docker
Image](https://github.com/appsmithorg/appsmith/actions/runs/8421752151)
[Build Client, Server & Run only
Cypress](https://github.com/appsmithorg/appsmith/actions/runs/8421752151)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Chores**
- Updated actions/cache and actions/setup-node to v4 across various
workflows for improved caching and Node.js setup.
- Modified the `yarn install` command to use `--immutable` flag,
enhancing dependency management.
- **Documentation**
- Updated comments within workflows to include cautionary and important
notes, ensuring better clarity.
- **Refactor**
	- Adjusted caching paths and keys for more efficient caching behavior.
- Changed Node.js installation to version 20.11.1 in Dockerfile,
aligning with the latest version for better performance and security.
- **Tests**
- Modified assertion in `getCurrentLocationSaga` test to check for the
presence of a property, improving test accuracy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Aman Agarwal <aman@appsmith.com>
2024-03-26 14:12:11 +03:00
Shrikant Sharat Kandula
54832b6ac3
ci: Fix TED tag 2024-03-19 14:29:27 +05:30
Shrikant Sharat Kandula
7f56d70fb9
ci: Make TED image tag configurable (#31815)
With this, we should be able to set the image tag (`latest` or `nightly`
for example), to be used for the TED run for Cypress tests.

Unless we already have a different method to run Cypress with nightly
TED, this should give us that flexibility.
2024-03-19 11:57:59 +05:30
Nidhi
c5c3dc4caf
ci: Modified older ok-to-test job to redirect to the new one (#31673) 2024-03-12 10:01:44 +05:30
Nidhi
3756e94d91
ci: Prettify and remove redundancies (#31638) 2024-03-09 17:48:13 +05:30
Nidhi
86f5e8617e
ci: Prettify and remove redundancies (#31637) 2024-03-09 13:46:56 +05:30
Nidhi
01954c15d6
ci: Prettify and remove redundancies (#31635) 2024-03-09 13:24:38 +05:30
Nidhi
96655ec988
ci: Prettify and remove redundancies (#31634) 2024-03-09 12:56:02 +05:30
Nidhi
3b10f233cd
ci: Make Cypress results show up in body as well (#31631) 2024-03-09 09:55:50 +05:30
Nidhi
cd8cefd965
ci: Inherit secrets in workflow call to integrations tests (#31630) 2024-03-09 09:08:47 +05:30