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

ci: Removed port 22 from ted in ci-test #37180

Merged
merged 1 commit into from
Nov 1, 2024
Merged

Conversation

yatinappsmith
Copy link
Contributor

@yatinappsmith yatinappsmith commented Nov 1, 2024

Description

Removed port 22 from ted in ci-test

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

Caution

🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11625284598
Commit: 8edce8c
Cypress dashboard.
Tags: @tag.Sanity
Spec:
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/Apps/MongoDBShoppingCart_spec.ts
  2. cypress/e2e/Regression/ClientSide/AppNavigation/AppNavigationWithGit_spec.ts
  3. cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts
  4. cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts
  5. cypress/e2e/Regression/ClientSide/Git/GitDiscardChange/DiscardChanges_spec.js
  6. cypress/e2e/Regression/ClientSide/Git/GitImport/GitImport_spec.js
  7. cypress/e2e/Regression/ClientSide/Git/GitSync/DeleteBranch_spec.js
  8. cypress/e2e/Regression/ClientSide/Git/GitSync/Deploy_spec.js
  9. cypress/e2e/Regression/ClientSide/Git/GitSync/GitConnectV2_spec.ts
  10. cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncGitBugs_spec.js
  11. cypress/e2e/Regression/ClientSide/Git/GitSync/Merge_spec.js
  12. cypress/e2e/Regression/ClientSide/Git/GitSync/SwitchBranches_spec.js
  13. cypress/e2e/Regression/ClientSide/Git/GitWithJSLibrary/GitwithCustomJSLibrary_spec.js
  14. cypress/e2e/Regression/ClientSide/Git/GitWithTheming/GitWithTheming_spec.js
  15. cypress/e2e/Sanity/Datasources/RestApiOAuth2Validation_spec.ts
List of identified flaky tests.
Fri, 01 Nov 2024 06:51:10 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Chores
    • Simplified CI workflow by removing unnecessary SSH port exposure.
    • Enhanced caching mechanism for test run results.
    • Improved artifact management with better organization of logs and reports.
    • Streamlined handling of environment variables for Cypress tests.

Copy link
Contributor

coderabbitai bot commented Nov 1, 2024

Walkthrough

The pull request modifies the CI workflow configuration in the .github/workflows/ci-test-custom-script.yml file. Key changes include the removal of SSH port mapping for the test-event-driver service, refinements in job execution conditions based on previous step results, enhancements to the caching mechanism for run results, and additional artifact management steps. The handling of environment variables for Cypress tests has also been streamlined, contributing to a clearer and more efficient CI workflow.

Changes

File Change Summary
.github/workflows/ci-test-custom-script.yml - Removed SSH port mapping for test-event-driver service.
- Refined job conditions using run_result output.
- Enhanced caching mechanism for run results.
- Added steps for managing artifacts (logs, screenshots).
- Streamlined environment variable handling for Cypress tests.

Possibly related PRs

Suggested labels

skip-changelog, CI

Suggested reviewers

  • sharat87
  • ApekshaBhosale

🎉 In the CI realm, changes take flight,
With ports trimmed down, our code feels light.
Artifacts now managed, logs neatly stored,
Cypress runs smoother, our tests are adored!
Let’s celebrate clarity, efficiency’s gain,
In the world of workflows, we’ll dance in the rain! 🌧️


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.

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 951be4a and 8edce8c.

📒 Files selected for processing (1)
  • .github/workflows/ci-test-custom-script.yml (1 hunks)

Comment on lines +153 to 154
docker run --name test-event-driver -d -p 5001:5001 -p 3306:3306 \
-p 5433:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 -p 6001:6001 -p 8001:8000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Port 22 removal is consistent with other workflow changes

The removal of port 22 mapping in ci-test-custom-script.yml is part of a deliberate security pattern. All workflow files stop the SSH service before running containers, and other workflow files (ci-test-limited.yml, ci-test-limited-with-count.yml, ci-debugging.yml) should also have port 22 mapping removed for consistency.

  • .github/workflows/ci-test-limited.yml: Remove -p 22:22 from docker run command
  • .github/workflows/ci-test-limited-with-count.yml: Remove -p 22:22 from docker run command
  • .github/workflows/ci-debugging.yml: Remove -p 22:22 from docker run command
🔗 Analysis chain

Security improvement: SSH port removal

The removal of port 22 mapping enhances security by reducing the attack surface in the CI environment.

Let's verify that no CI operations depend on SSH access:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for SSH-related operations in the workflow files
rg -i "ssh|port.*22" .github/workflows/

Length of output: 359


Script:

#!/bin/bash
# Let's check the context around the SSH stop commands to understand their purpose
rg -B 5 -A 5 "ssh stop" .github/workflows/

# Also check if there are any SSH-related configurations or keys being used
rg -i "ssh.*key|ssh.*config" .github/workflows/

Length of output: 4494

@hetunandu hetunandu changed the title CI: Removed port 22 from ted in ci-test ci: Removed port 22 from ted in ci-test Nov 1, 2024
@github-actions github-actions bot added skip-changelog Adding this label to a PR prevents it from being listed in the changelog CI labels Nov 1, 2024
@hetunandu hetunandu added the ok-to-test Required label for CI label Nov 1, 2024
@yatinappsmith yatinappsmith merged commit 29be788 into release Nov 1, 2024
41 of 50 checks passed
@yatinappsmith yatinappsmith deleted the ci/removeport22 branch November 1, 2024 06:31
@coderabbitai coderabbitai bot mentioned this pull request Dec 16, 2024
2 tasks
@coderabbitai coderabbitai bot mentioned this pull request Dec 31, 2024
2 tasks
@coderabbitai coderabbitai bot mentioned this pull request Feb 4, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 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.

3 participants