Skip to content

chore: add ingestion svc test - #4159

Merged
krishna2020 merged 7 commits into
developfrom
chore.add_ingestion_svc_test
Mar 24, 2025
Merged

krishna2020 merged 7 commits into
developfrom
chore.add_ingestion_svc_test

Conversation

@maheshkutty

@maheshkutty maheshkutty commented Mar 12, 2025 •

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Write a brief explainer on your code changes.

What is the related Linear task?

Resolves INT-2926

Please explain the objectives of your changes below

Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

N/A

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

N/A

Any technical or performance related pointers to consider with the change?

N/A

@coderabbitai review


Developer checklist

  • My code follows the style guidelines of this project

  • No breaking changes are being introduced.

  • All related docs linked with the PR?

  • All changes manually tested?

  • Any documentation changes needed with this change?

  • Is the PR limited to 10 file changes?

  • Is the PR limited to one linear task?

  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?

  • Verified that there are no credentials or confidential data exposed with the changes.

Summary by CodeRabbit

  • Tests
    • Introduced an automated testing workflow designed to enhance code quality and overall reliability.

@maheshkutty
maheshkutty requested a review from a team March 12, 2025 11:52
@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@codecov

codecov Bot commented Mar 12, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.39%. Comparing base (131759c) to head (2867c54).
Report is 30 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4159   +/-   ##
========================================
  Coverage    91.39%   91.39%           
========================================
  Files          635      635           
  Lines        33113    33113           
  Branches      7821     7825    +4     
========================================
  Hits         30262    30262           
  Misses        2645     2645           
  Partials       206      206           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

1 similar comment
@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@coderabbitai

coderabbitai Bot commented Mar 20, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request adds a new GitHub Actions workflow file, ingestion-service-test.yml. The workflow triggers on pushes to the master branch and on specific pull request events (opened, edited, reopened, and synchronized). It uses concurrency settings to manage runs, checks out the repository, sets up a Go environment (v1.23.5), clones an external repository using a personal access token, installs Go module dependencies, and runs tests while excluding certain paths.

Changes

File(s) Change Summary
.github/workflows/ingestion-service-test.yml Added a GitHub Actions workflow triggered on master and specific pull request events. It sequentially checks out code, sets up Go (v1.23.5), clones a repository using a PAT, installs dependencies, and runs tests with exclusions.

Sequence Diagram(s)

sequenceDiagram
    participant Trigger as GitHub Event
    participant Workflow as Actions Workflow
    participant Checkout as Repository Checkout
    participant GoSetup as Go Environment Setup
    participant Clone as Clone Repository
    participant Test as Test Runner

    Trigger->>Workflow: Push/PR Event on master
    Workflow->>Checkout: Checkout repository
    Checkout-->>Workflow: Repository code
    Workflow->>GoSetup: Set up Go (v1.23.5)
    Workflow->>Clone: Clone rudder-ingestion-svc using PAT
    Clone-->>Workflow: Cloned repository
    Workflow->>Test: Install dependencies & run tests (exclude specific paths)
    Test-->>Workflow: Output test results
Loading

Poem

I'm a rabbit coding with delight,
Hop-scotching through workflows day and night,
Tokens and clones in a gentle ballet,
Tests run smoothly on a bright Ubuntu day,
With a twitch of whiskers, I cheer "Hooray!" 🐇

Happy hops and code, all is in play!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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 generate docstrings to generate docstrings for this 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (2)
.github/workflows/ingestion-service-test.yml (2)

32-34: Cloning the Ingestion Service Repository.

The cloning command uses a personal access token (secrets.PAT) to securely clone the rudder-ingestion-svc repository.
Consider using a shallow clone to potentially speed up the process if the full history is not needed:

-        run: |
-          git clone https://${{secrets.PAT}}@github.com/rudderlabs/rudder-ingestion-svc.git
+        run: |
+          git clone --depth=1 https://${{secrets.PAT}}@github.com/rudderlabs/rudder-ingestion-svc.git

This change is optional but can improve performance.


39-43: Test Execution Command.

The test step:

  • Navigates to the cloned repository directory.
  • Runs pwd (which appears to be for debugging purposes).
  • Executes the test command using make test with parameters to target a specific package and exclude files in internal/gateway matching the given regex.

If the pwd command was intended for debugging, consider removing or commenting it out in production workflows to keep logs concise.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0073502 and 2867c54.

📒 Files selected for processing (1)
  • .github/workflows/ingestion-service-test.yml (1 hunks)
🧰 Additional context used
🪛 GitHub Check: Check for formatting & lint errors
.github/workflows/ingestion-service-test.yml

[warning] 1-1:
File ignored by default.

⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
  • GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
  • GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
  • GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
  • GitHub Check: Code Coverage
  • GitHub Check: UT Tests
  • GitHub Check: ingestion-service-test
  • GitHub Check: test_and_publish
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (7)
.github/workflows/ingestion-service-test.yml (7)

1-2: Workflow Name Declaration Looks Good.

The declared workflow name "Ingestion Service Test" is intuitive and accurately reflects the purpose of this workflow.

🧰 Tools
🪛 GitHub Check: Check for formatting & lint errors

[warning] 1-1:
File ignored by default.


3-13: Trigger Events Configuration.

The workflow is properly set up to trigger on pushes to the master branch as well as on pull request events (opened, edited, reopened, and synchronize). Verify that these events fully cover your testing requirements.


14-17: Concurrency Setup.

The concurrency configuration using a dynamic group identifier (based on the workflow name and either the head ref or commit SHA) is an effective way to cancel in-progress runs for outdated commits. This should help manage resource usage efficiently.


18-24: Job and Environment Configuration.

The job ingestion-service-test is defined to run on ubuntu-latest with an appropriately scoped environment variable (GITHUB_TOKEN). Make sure that the provided token has the necessary permissions for all the required operations.


25-26: Checkout Step Validation.

The action uses actions/checkout@v4 to check out the repository, which is the recommended approach. No changes are needed here.


27-31: Go Environment Setup.

The workflow sets up the Go environment using actions/setup-go@v5 with version 1.23.5. Confirm that this specific version meets all the requirements of the ingestion service.


35-38: Dependency Installation.

Switching directory to rudder-ingestion-svc and running go mod download is standard for installing Go dependencies. This step looks correct.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@sonarqubecloud

Copy link
Copy Markdown

@krishna2020
krishna2020 merged commit b7be28f into develop Mar 24, 2025
@krishna2020
krishna2020 deleted the chore.add_ingestion_svc_test branch March 24, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants