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

feat: sources v2 spec support along with adapters #3810

Merged
merged 12 commits into from
Nov 13, 2024

Conversation

vinayteki95
Copy link
Contributor

@vinayteki95 vinayteki95 commented Oct 17, 2024

Changes made in this PR

  • /v2/sources/:source ( v2 endpoint support has been added )
  • Controller and its utility adaptInputToVersion has been upgraded to support v2 -> v1 and v2 -> v0 conversion
    • Previous adapter function are also upgraded to support error handling while version conversion
  • Main source service sourceTransformRoutine is upgraded to support the new return type (including errors) from the adapter.
  • New feature flag upgradedToSourceTransformV2 is introduced.
  • Corresponding test cases are changed and new test cases are added.

What is the related Linear task?

Resolves INT-2755 (partly)

Objectives

This PR is part of the webhook sources specification upgrade project. This partly resolves step-1 of this project.
Corresponding documentation of the project

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

  • Previous adapter function are also upgraded to support error handling while version conversion

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.

@devops-github-rudderstack
Copy link
Contributor

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 93.06931% with 7 lines in your changes missing coverage. Please review.

Project coverage is 89.05%. Comparing base (d76c37d) to head (e90d2ad).
Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
src/services/source/nativeIntegration.ts 66.66% 4 Missing ⚠️
src/controllers/util/versionConversion.ts 92.30% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3810   +/-   ##
========================================
  Coverage    89.04%   89.05%           
========================================
  Files          610      618    +8     
  Lines        32982    33071   +89     
  Branches      7797     7814   +17     
========================================
+ Hits         29370    29452   +82     
- Misses        3329     3336    +7     
  Partials       283      283           

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

@vinayteki95
Copy link
Contributor Author

vinayteki95 commented Oct 17, 2024

Regarding the failed Verify / Check for formatting & lint errors (pull_request):
The issue is with npx prettier .gitignore command where .gitignore file is modified in the commit.

The github actions workflow https://github.com/rudderlabs/rudder-transformer/actions/runs/11385814974/workflow will have to be changed to only include js, ts files to pass this check.

Here are the changes to be done:

  • Modify Run format Checks
  • Add a stage before it to filter out ts,js files
     - name: Filter JS/TS Files
        run: |
          echo "${{ steps.files.outputs.added_modified }}" | tr ' ' '\n' | grep -E '\.(js|ts|jsx|tsx)$' > changed_files.txt
          if [ ! -s changed_files.txt ]; then
            echo "No JS/TS files to format or lint."
            exit 0
          fi

      - name: Run format Checks
        run: |
          npx prettier --write $(cat changed_files.txt)
      - run: git diff --exit-code

src/middlewares/routeActivation.ts Outdated Show resolved Hide resolved
src/middlewares/routeActivation.ts Outdated Show resolved Hide resolved
src/types/index.ts Outdated Show resolved Hide resolved
koladilip
koladilip previously approved these changes Oct 29, 2024
src/features.json Outdated Show resolved Hide resolved
koladilip
koladilip previously approved these changes Nov 12, 2024
sanpj2292
sanpj2292 previously approved these changes Nov 12, 2024
@vinayteki95 vinayteki95 requested review from a team and aashishmalik and removed request for a team November 12, 2024 09:59
@vinayteki95 vinayteki95 requested review from ItsSudip and koladilip and removed request for ItsSudip November 12, 2024 09:59
src/types/index.ts Outdated Show resolved Hide resolved
sanpj2292
sanpj2292 previously approved these changes Nov 13, 2024
Copy link

sonarcloud bot commented Nov 13, 2024

@vinayteki95 vinayteki95 merged commit c51cfbb into develop Nov 13, 2024
26 checks passed
@vinayteki95 vinayteki95 deleted the feat.sources-v2-spec-controller branch November 13, 2024 13:22
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.

5 participants