Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Get release's version if needed #37777

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Conversation

sharat87
Copy link
Member

@sharat87 sharat87 commented Nov 27, 2024

/test sanity

Summary by CodeRabbit

  • New Features
    • Enhanced script to retrieve and export the Appsmith application version when using a specific release URL.
  • Bug Fixes
    • Improved error handling and messaging for missing dependencies or incorrect configurations.

Copy link
Contributor

coderabbitai bot commented Nov 27, 2024

Walkthrough

The start-https.sh script has been updated to include functionality for retrieving and exporting the Appsmith application's version when the backend is set to a specific release URL. A conditional check for the backend URL triggers a curl command to fetch version information from the backend's /info endpoint, storing it in the APPSMITH_VERSION_ID variable. Existing functionalities for starting NGINX and handling command-line options remain intact, ensuring consistent error handling and control flow.

Changes

File Change Summary
app/client/start-https.sh Added functionality to retrieve and export APPSMITH_VERSION_ID when backend is at a specific release URL. Retained existing functionalities for NGINX and command-line options.

Possibly related PRs

  • chore: Don't need wget anymore #37667: The removal of wget in favor of curl aligns with the changes in the main PR where curl is used to fetch version information, indicating a related focus on using curl for network operations.

Suggested labels

ok-to-test

Suggested reviewers

  • nidhi-nair
  • pratapaprasanna
  • mohanarpit

🎉 In the script where the servers play,
A version fetch now leads the way!
With curl to call, and ID to show,
Appsmith's version, now in the know!
NGINX still stands, strong and bright,
Keeping our app running just right! 🚀


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 27, 2024
@sharat87 sharat87 marked this pull request as ready for review November 27, 2024 08:01
@sharat87 sharat87 requested a review from riodeuno November 27, 2024 08:01
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 381dcaa and dee8e85.

📒 Files selected for processing (1)
  • app/client/start-https.sh (1 hunks)
🔇 Additional comments (1)
app/client/start-https.sh (1)

89-95: Verify APPSMITH_VERSION_ID usage

Let's ensure this version ID is being used correctly throughout the application.

✅ Verification successful

APPSMITH_VERSION_ID changes are properly integrated

The version ID is correctly used across the application for version tracking and display:

  • Used in index.html for client-side version information
  • Properly configured in nginx for environment substitution
  • Integrated with Caddy server configuration
  • Correctly set up in Jest testing environment

The changes in start-https.sh are consistent with the existing version ID usage pattern across the codebase, and no other scripts are attempting to export this variable.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for APPSMITH_VERSION_ID usage
echo "Searching for APPSMITH_VERSION_ID usage in the codebase..."
rg "APPSMITH_VERSION_ID" -l

# Check if any other scripts are setting this variable
echo "Checking for other scripts setting APPSMITH_VERSION_ID..."
rg "export APPSMITH_VERSION_ID" -l

Length of output: 527


Script:

#!/bin/bash
# Let's check how APPSMITH_VERSION_ID is being used in these files
echo "=== Usage in index.html ==="
rg "APPSMITH_VERSION_ID" app/client/public/index.html -C 2

echo "=== Usage in nginx config ==="
rg "APPSMITH_VERSION_ID" app/client/docker/templates/nginx-app.conf.template -C 2

echo "=== Usage in caddy reconfigure ==="
rg "APPSMITH_VERSION_ID" deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs -C 2

echo "=== Usage in jest config ==="
rg "APPSMITH_VERSION_ID" app/client/jest.config.js -C 2

Length of output: 1642

app/client/start-https.sh Show resolved Hide resolved
@sharat87 sharat87 merged commit 0b10696 into release Nov 27, 2024
18 checks passed
@sharat87 sharat87 deleted the chore/release-version branch November 27, 2024 08:41
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Dec 2, 2024
**/test sanity**



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

## Summary by CodeRabbit

- **New Features**
- Enhanced script to retrieve and export the Appsmith application
version when using a specific release URL.
- **Bug Fixes**
- Improved error handling and messaging for missing dependencies or
incorrect configurations.

<!-- 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
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