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: snowflake envs for credentials #39065

Merged
merged 1 commit into from
Feb 6, 2025
Merged

Conversation

sagar-qa007
Copy link
Contributor

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

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="@tag.SignIn"

🔍 Cypress test results

Tip

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


Thu, 06 Feb 2025 09:38:32 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Chores

    • Improved testing workflow consistency by standardizing credential naming conventions.
  • New Features

    • Added new test parameters to allow configurable run counts and snapshot update options.
    • Enhanced artifact handling and caching to better preserve logs and results during test executions.

Copy link
Contributor

coderabbitai bot commented Feb 6, 2025

Walkthrough

This pull request updates several GitHub Actions workflow files. The primary change is renaming environment variables for Snowflake credentials from the format SNOWFLAKE_* to CYPRESS_SNOWFLAKE_*. In addition, one workflow now accepts new input parameters, run_count and update_snapshot, and adjusts its logic to conditionally update snapshots and handle artifact uploads. The overall workflow control remains unchanged.

Changes

Files Change Summary
.github/workflows/ci-test-hosted.yml,
.github/workflows/ci-test-limited.yml,
.github/workflows/ci-test-limited-with-count.yml
Renamed environment variables for Snowflake credentials from SNOWFLAKE_ACCOUNT_NAME, SNOWFLAKE_USERNAME, and SNOWFLAKE_PASSWORD to CYPRESS_SNOWFLAKE_ACCOUNT_NAME, CYPRESS_SNOWFLAKE_USERNAME, and CYPRESS_SNOWFLAKE_PASSWORD.
.github/workflows/ci-test-limited-with-count.yml Added new input parameters run_count and update_snapshot, enhanced specs_to_run handling, and conditionally executed tests with or without snapshot updates, including artifact upload and caching.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant W as Workflow
    participant T as Test Runner

    U->>W: Trigger workflow (input: update_snapshot, run_count)
    W->>W: Set environment variables (CYPRESS_SNOWFLAKE_*)
    W->>T: Evaluate update_snapshot flag
    alt Snapshot update is true
        T->>T: Run tests with snapshot update
    else
        T->>T: Run tests normally
    end
    T->>W: Upload logs, snapshots, and cache results
Loading

Possibly related PRs

Suggested labels

skip-changelog, CI, ok-to-test

Suggested reviewers

  • sharat87
  • yatinappsmith

Poem

In workflows deep and code so fine,
Credentials don a brand new sign,
CYPRESS_ leads the secret parade,
With inputs and tests freshly arrayed,
Artifacts dance in digital art,
Cheers to clean code and a happy heart!
🚀🎉

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 6, 2025
@sagar-qa007 sagar-qa007 added the ok-to-test Required label for CI label Feb 6, 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)

431-444: Conditional Cypress Test Execution Based on Snapshot Update Flag
The workflow now conditionally runs Cypress tests with snapshot updates if update_snapshot is set to true. For improved consistency, consider renaming the inline environment variable from CYPRESS_updateSnapshots to CYPRESS_UPDATE_SNAPSHOTS (all uppercase) to match the naming style used elsewhere. For example:

-              CYPRESS_updateSnapshots=true npx cypress-repeat-pro run -n "${{ inputs.run_count }}" --force \
+              CYPRESS_UPDATE_SNAPSHOTS=true npx cypress-repeat-pro run -n "${{ inputs.run_count }}" --force \

This adjustment can help avoid potential confusion.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 35ba3cc and 414bca8.

📒 Files selected for processing (3)
  • .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: Environment Variable Naming Update for Snowflake Credentials
The Snowflake credential variables are now renamed as CYPRESS_SNOWFLAKE_ACCOUNT_NAME, CYPRESS_SNOWFLAKE_USERNAME, and CYPRESS_SNOWFLAKE_PASSWORD to align with the Cypress testing context. Ensure that your repository’s secret configuration is updated accordingly.

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

342-344: Consistent Credential Variable Renaming Across Workflows
The Snowflake environment variables have been updated to use the CYPRESS_ prefix. Please verify that all references to these variables—including in secrets and downstream usage—are consistently updated throughout the codebase.

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

17-31: New Input Parameters in Workflow Dispatch
New inputs (run_count, update_snapshot, and specs_to_run) have been added in the workflow dispatch section. This enhances the configurability of test runs. Please ensure these parameters are validated and that their default values meet your testing requirements.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

(indentation)


33-59: Enhanced Workflow Call Inputs
The inputs in the workflow_call section now mirror those in workflow_dispatch, ensuring consistent behavior regardless of the trigger type. This uniformity improves usability when the workflow is invoked programmatically or manually.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

(indentation)


426-428: Snowflake Credentials Renaming Consistency
The renaming of the Snowflake credential environment variables in this section aligns with other workflows. Ensure that the corresponding secrets (e.g., SNOWFLAKE_ACCOUNT_NAME) are available and correctly mapped under the new names.

@sagar-qa007 sagar-qa007 merged commit 8ebe577 into release Feb 6, 2025
49 checks passed
@sagar-qa007 sagar-qa007 deleted the ci/addingcypresssnowcred branch February 6, 2025 09:52
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