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: Adding snowflake env #39031

Merged
merged 1 commit into from
Feb 5, 2025
Merged

ci: Adding snowflake env #39031

merged 1 commit into from
Feb 5, 2025

Conversation

sagar-qa007
Copy link
Contributor

@sagar-qa007 sagar-qa007 commented Feb 5, 2025

Description

Adding env.

Fixes # https://app.zenhub.com/workspaces/qa-63316faf86bb2e170ed2e46b/issues/gh/appsmithorg/appsmith/39030

Automation

/ok-to-test tags="@tag.SignIn"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13155682886
Commit: d3ca22a
Cypress dashboard.
Tags: @tag.SignIn
Spec:


Wed, 05 Feb 2025 11:05:02 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Tests
    • Improved continuous integration workflows with new options for configuring test runs, including setting run counts, toggling snapshot updates, and choosing specific tests.
    • Enhanced integration with an external data service to streamline test data retrieval, ensuring more robust and reliable testing.

Copy link
Contributor

coderabbitai bot commented Feb 5, 2025

Walkthrough

This update enhances multiple GitHub Actions workflows by adding Snowflake credentials as environment variables for Cypress test runs. Additionally, it introduces new input parameters and refined control flows in some workflows, including a fallback mechanism for test specifications and conditional logic for snapshot updates and Docker artifact selection. All changes extend the existing configurations without removing any current functionality.

Changes

File(s) Change Summary
.github/workflows/ci-test-custom-script.yml
.github/workflows/ci-test-hosted.yml
Added environment variables SNOWFLAKE_ACCOUNT_NAME, SNOWFLAKE_USERNAME, and SNOWFLAKE_PASSWORD sourced from GitHub secrets for Cypress test runs.
.github/workflows/ci-test-limited-with-count.yml Introduced new input parameters (run_count, update_snapshot, specs_to_run), added Snowflake environment variables, implemented a fallback mechanism to read specs from a file, and modified the test execution command for conditional snapshot updates.
.github/workflows/ci-test-limited.yml Added Snowflake environment variables and incorporated conditional logic to select the appropriate Docker image artifact based on the previous-workflow-run-id input while preserving existing caching and restore flows.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant W as GitHub Actions (ci-test-limited-with-count)
    participant F as File System
    participant C as Cypress Test Runner

    U->>W: Trigger workflow with inputs (run_count, update_snapshot, specs_to_run)
    alt specs_to_run provided
      W->>W: Use provided specs
    else specs_to_run not provided
      W->>F: Read fallback file (limited-tests.txt)
      F-->>W: Return specs with debug logs
    end
    W->>W: Set environment variables (Snowflake creds and CYPRESS_updateSnapshots based on update_snapshot)
    W->>C: Execute Cypress tests with updated configuration
Loading
sequenceDiagram
    participant W as GitHub Actions (ci-test-limited)
    participant A as Artifact Manager
    participant C as Cypress Test Runner

    W->>W: Check for previous-workflow-run-id input
    alt previous-workflow-run-id provided
      W->>A: Download Docker image artifact
    else Not provided
      W->>A: Use default Docker image artifact
    end
    W->>W: Set Snowflake credentials as environment variables
    W->>C: Run Cypress tests with artifact and new configuration
Loading

Possibly related PRs

Suggested labels

skip-changelog, ok-to-test, CI

Suggested reviewers

  • sharat87
  • yatinappsmith
  • ApekshaBhosale

Poem

In workflows deep and secrets safe,
Snowflake's whispers now find their place,
Tests run smoothly, no step missed—
A cyber-dance of code and grace.
Cheers to builds that truly amaze! 🚀
Keep the magic in each commit!

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

🪧 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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 skip-changelog Adding this label to a PR prevents it from being listed in the changelog CI labels Feb 5, 2025
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: 0

🧹 Nitpick comments (1)
.github/workflows/ci-test-limited-with-count.yml (1)

144-205: Robust Specs Fallback Logic:
The “Get specs to run” step implements a comprehensive mechanism to determine the spec files. It first checks the provided inputs (via both inputs.specs_to_run and github.event.inputs.specs_to_run), and if missing or set to 'no_data', it falls back to reading from the limited-tests.txt file. The debug logging within this block is helpful for troubleshooting. Consider removing or reducing the verbosity of debug logs in production if desired.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 150-150: trailing spaces

(trailing-spaces)


[error] 177-177: trailing spaces

(trailing-spaces)


[error] 205-205: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b04919 and d3ca22a.

📒 Files selected for processing (4)
  • .github/workflows/ci-test-custom-script.yml (1 hunks)
  • .github/workflows/ci-test-hosted.yml (1 hunks)
  • .github/workflows/ci-test-limited-with-count.yml (1 hunks)
  • .github/workflows/ci-test-limited.yml (1 hunks)
🔇 Additional comments (5)
.github/workflows/ci-test-hosted.yml (1)

248-250: Snowflake Credentials Added:
New environment variables (SNOWFLAKE_ACCOUNT_NAME, SNOWFLAKE_USERNAME, and SNOWFLAKE_PASSWORD) have been added to the Cypress test step’s environment. Please ensure the corresponding secrets are defined in the repository settings so that the workflow can access them securely.

.github/workflows/ci-test-limited.yml (1)

342-344: Snowflake Credentials Integrated:
The Snowflake environment variables are now included in the “Run the cypress test” step. Their naming and placement are consistent with other workflows, which helps maintain uniformity across CI configurations.

.github/workflows/ci-test-custom-script.yml (1)

371-373: Snowflake Environment Variables Inclusion:
The new Snowflake credentials (SNOWFLAKE_ACCOUNT_NAME, SNOWFLAKE_USERNAME, and SNOWFLAKE_PASSWORD) have been added to the workflow’s environment. This change aligns with the updates in the other workflows and looks correctly implemented.

.github/workflows/ci-test-limited-with-count.yml (2)

5-59: New Input Parameters for Enhanced Configurability:
The workflow now accepts additional inputs (run_count, update_snapshot, and specs_to_run) under both the workflow_dispatch and workflow_call triggers. These inputs are clearly described with sensible default values, providing extra flexibility for test repetition and snapshot control.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 23-23: wrong indentation: expected 8 but found 10

(indentation)


[warning] 50-50: wrong indentation: expected 8 but found 10

(indentation)


426-428: Consistent Snowflake Credentials Addition:
Snowflake-related environment variables (SNOWFLAKE_ACCOUNT_NAME, SNOWFLAKE_USERNAME, and SNOWFLAKE_PASSWORD) have been added to the test execution environment in this workflow as well. This ensures a uniform configuration for Snowflake integration across all workflows.

@sagar-qa007 sagar-qa007 added the ok-to-test Required label for CI label Feb 5, 2025
@sagar-qa007 sagar-qa007 merged commit 6100515 into release Feb 5, 2025
49 checks passed
@sagar-qa007 sagar-qa007 deleted the ci/snoflakecredadded branch February 5, 2025 11:08
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.

2 participants