Skip to content

chore: Remove Algolia, we don't use it anymore#37664

Merged
sharat87 merged 1 commit intoreleasefrom
chore/de-algolia
Nov 23, 2024
Merged

chore: Remove Algolia, we don't use it anymore#37664
sharat87 merged 1 commit intoreleasefrom
chore/de-algolia

Conversation

@sharat87
Copy link
Member

@sharat87 sharat87 commented Nov 23, 2024

Automation

/test sanity

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11987511676
Commit: 22f0a6f
Cypress dashboard.
Tags: @tag.Sanity
Spec:


Sat, 23 Nov 2024 14:45:28 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

Release Notes

  • Chores

    • Removed Algolia Search configuration from various files, including environment variables and configuration scripts.
  • Refactor

    • Simplified search-related components and utility functions by removing Algolia dependencies, enhancing clarity and usability.
  • Bug Fixes

    • Adjusted search item type handling to improve type safety and reduce complexity.

These updates streamline the application by eliminating unnecessary dependencies and refining existing functionalities.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 23, 2024

Walkthrough

The changes in this pull request primarily involve the removal of Algolia Search-related configurations from various files. This includes environment variable declarations, Nginx configuration settings, Jest configuration, and references in the application code. The modifications suggest a significant shift in the application's dependency on Algolia, as related properties have been eliminated from multiple components, including the main configuration interfaces and utility functions.

Changes

File Path Change Summary
.env.example Removed environment variable declarations for Algolia: APPSMITH_ALGOLIA_API_ID, APPSMITH_ALGOLIA_API_KEY, APPSMITH_ALGOLIA_SEARCH_INDEX_NAME.
app/client/docker/templates/nginx-app.conf.template Removed sub_filter directives for Algolia settings: __APPSMITH_ALGOLIA_API_ID__, __APPSMITH_ALGOLIA_SEARCH_INDEX_NAME__, __APPSMITH_ALGOLIA_API_KEY__.
app/client/jest.config.js Removed algolia configuration object from globals, including apiId, apiKey, and indexName.
app/client/package.json Removed dependency for @types/react-instantsearch-core from devDependencies.
app/client/public/index.html Removed Algolia configuration from window.APPSMITH_FEATURE_CONFIGS: apiId, apiKey, indexName.
app/client/src/ce/configs/index.ts Removed algolia configuration from INJECTED_CONFIGS interface and related retrieval functions.
app/client/src/ce/configs/types.ts Removed algolia object from AppsmithUIConfigs interface.
app/client/src/components/editorComponents/GlobalSearch/SearchResults.tsx Updated ItemProps interface to change item type from `IHit
app/client/src/components/editorComponents/GlobalSearch/index.tsx Removed algoliaHighlightTag import and adjusted CSS in StyledContainer. Refined search result handling.
app/client/src/components/editorComponents/GlobalSearch/utils.tsx Removed algoliaHighlightTag, refined getOptionalFilters, attachKind, getEntityId, and generateCreateNewDSOption functions.
deploy/docker/fs/opt/appsmith/templates/docker.env.sh Removed environment variable declarations for Algolia: APPSMITH_ALGOLIA_API_ID, APPSMITH_ALGOLIA_API_KEY, APPSMITH_ALGOLIA_SEARCH_INDEX_NAME.

Suggested labels

Task

Suggested reviewers

  • ApekshaBhosale
  • nidhi-nair
  • mohanarpit

🌟 In the code's dance, Algolia takes a bow,
With variables gone, we simplify now.
Nginx and Jest, they've shed some weight,
A cleaner path for our code to create!
So here's to the changes, both bold and bright,
In the realm of code, we embrace the light! 🌟

Warning

Rate limit exceeded

@sharat87 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 24 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 5c15017 and 22f0a6f.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 5c15017 and 22f0a6f.

⛔ Files ignored due to path filters (1)
  • app/client/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (11)
  • .env.example (0 hunks)
  • app/client/docker/templates/nginx-app.conf.template (0 hunks)
  • app/client/jest.config.js (0 hunks)
  • app/client/package.json (0 hunks)
  • app/client/public/index.html (0 hunks)
  • app/client/src/ce/configs/index.ts (0 hunks)
  • app/client/src/ce/configs/types.ts (0 hunks)
  • app/client/src/components/editorComponents/GlobalSearch/SearchResults.tsx (1 hunks)
  • app/client/src/components/editorComponents/GlobalSearch/index.tsx (0 hunks)
  • app/client/src/components/editorComponents/GlobalSearch/utils.tsx (0 hunks)
  • deploy/docker/fs/opt/appsmith/templates/docker.env.sh (0 hunks)
💤 Files with no reviewable changes (10)
  • .env.example
  • app/client/docker/templates/nginx-app.conf.template
  • app/client/jest.config.js
  • app/client/package.json
  • app/client/public/index.html
  • app/client/src/ce/configs/index.ts
  • app/client/src/ce/configs/types.ts
  • app/client/src/components/editorComponents/GlobalSearch/index.tsx
  • app/client/src/components/editorComponents/GlobalSearch/utils.tsx
  • deploy/docker/fs/opt/appsmith/templates/docker.env.sh
🔇 Additional comments (1)
app/client/src/components/editorComponents/GlobalSearch/SearchResults.tsx (1)

404-404: LGTM! Type simplification aligns with Algolia removal.

The simplified type definition improves type safety by removing the unused Algolia IHit type.

Let's verify complete removal of Algolia dependencies:

✅ Verification successful

Type simplification looks good - no remaining Algolia dependencies found

The removal of IHit type and simplification to just SearchItem is safe as there are no remaining Algolia or IHit references in the GlobalSearch components or related files.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining Algolia references
# Look for Algolia-related imports, types, or configurations

# Search for any remaining Algolia references in TypeScript/JavaScript files
rg -i "algolia|IHit" --type ts --type js

# Search for Algolia in package.json dependencies
rg -i "algolia" package.json

# Look for any Algolia environment variables
rg -i "algolia" .env* docker*

Length of output: 11991


Script:

#!/bin/bash
# Let's verify Algolia removal more thoroughly

# Check for Algolia-related imports and types in TypeScript files
ast-grep --pattern 'import $_ from "@algolia/$_"'

# Check for Algolia-related types and interfaces
ast-grep --pattern 'interface $_ extends IHit'

# Check for any remaining Algolia configuration or usage
rg -i "algolia" --type ts --type js -g '!*.test.*' -g '!*fixtures*' -g '!*mock*'

# Check for Algolia-related dependencies in package.json files
fd package.json --exec rg -i "algolia" {}

Length of output: 131052


Script:

#!/bin/bash
# Let's check for any remaining Algolia references in the codebase
# Focusing on the specific directory and related files

# Check for Algolia-related imports and usage in SearchResults.tsx and related files
rg -i "algolia|IHit" "app/client/src/components/editorComponents/GlobalSearch/" -A 2 -B 2

# Check for any Algolia-related types/interfaces in the types directory
rg -i "algolia|IHit" "app/client/src/types/"

# Look for any Algolia configuration in the GlobalSearch directory
rg -i "algolia" "app/client/src/components/editorComponents/GlobalSearch/" --type ts --type js

Length of output: 289


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Nov 23, 2024
@sharat87 sharat87 added the ok-to-test Required label for CI label Nov 23, 2024
@sharat87 sharat87 marked this pull request as ready for review November 23, 2024 15:03
@sharat87 sharat87 merged commit 7c66c07 into release Nov 23, 2024
@sharat87 sharat87 deleted the chore/de-algolia branch November 23, 2024 16:08
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Nov 27, 2024
## Automation

/test 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/11987511676>
> Commit: 22f0a6f
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11987511676&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Sat, 23 Nov 2024 14:45:28 UTC
<!-- 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

## Release Notes

- **Chores**
- Removed Algolia Search configuration from various files, including
environment variables and configuration scripts.
  
- **Refactor**
- Simplified search-related components and utility functions by removing
Algolia dependencies, enhancing clarity and usability.
  
- **Bug Fixes**
- Adjusted search item type handling to improve type safety and reduce
complexity.

These updates streamline the application by eliminating unnecessary
dependencies and refining existing functionalities.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants