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

Remove get-earn-protocol-* lambdas #545

Merged
merged 9 commits into from
Oct 23, 2024

Conversation

marcinciarka
Copy link
Member

@marcinciarka marcinciarka commented Oct 23, 2024

Remove get-earn-protocol-* lambdas

Summary by CodeRabbit

  • Chores
    • Removed the addEarnProtocolConfig function and its references from the project, indicating the Earn Protocol configuration is no longer part of the stack setup.
    • Deleted multiple configuration files including package.json, Dockerfile, and various TypeScript and ESLint configurations, which may impact the build and deployment processes.
    • Removed GraphQL queries related to fleet and portfolio details, which may affect data retrieval capabilities for users interacting with the Earn Protocol.

Copy link
Contributor

coderabbitai bot commented Oct 23, 2024

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Walkthrough

The pull request involves the removal of several files and functions related to the Earn Protocol, including the addEarnProtocolConfig function from stacks/earn-protocol.ts. This function was responsible for configuring serverless functions and API routes for the Earn Protocol. Correspondingly, the API function in stacks/summer-stack.ts has been updated to remove references to this configuration. Additionally, multiple configuration files for ESLint, Docker, Jest, TypeScript, and GraphQL queries related to the Earn Protocol have been deleted, indicating a significant reduction in the project's scope regarding the Earn Protocol.

Changes

File Path Change Summary
stacks/earn-protocol.ts Removed method addEarnProtocolConfig responsible for configuring the Earn Protocol.
stacks/summer-stack.ts Removed import and invocation of addEarnProtocolConfig.
summerfi-api/get-earn-protocol-fleets/.eslintrc.cjs Removed ESLint configuration file for the project.
summerfi-api/get-earn-protocol-fleets/Dockerfile Removed Dockerfile for AWS Lambda function.
summerfi-api/get-earn-protocol-fleets/codegen.yml Removed GraphQL code generation configuration file.
summerfi-api/get-earn-protocol-fleets/jest.config.js Removed Jest configuration file for testing.
summerfi-api/get-earn-protocol-fleets/package.json Removed package.json file containing project metadata and dependencies.
summerfi-api/get-earn-protocol-fleets/src/graphql/GetFleetDetails.graphql Removed GraphQL query for retrieving fleet details.
summerfi-api/get-earn-protocol-fleets/src/graphql/GetFleets.graphql Removed GraphQL query for retrieving various vaults.
summerfi-api/get-earn-protocol-fleets/src/index.ts Removed AWS Lambda function handler for processing API requests related to fleets.
summerfi-api/get-earn-protocol-fleets/tsconfig.json Removed TypeScript configuration file for the project.
summerfi-api/get-earn-protocol-fleets/tsconfig.test.json Removed TypeScript testing configuration file.
summerfi-api/get-earn-protocol-portfolio/.eslintrc.cjs Removed ESLint configuration file for the portfolio project.
summerfi-api/get-earn-protocol-portfolio/Dockerfile Removed Dockerfile for AWS Lambda function.
summerfi-api/get-earn-protocol-portfolio/jest.config.js Removed Jest configuration file for testing.
summerfi-api/get-earn-protocol-portfolio/package.json Removed package.json file containing project metadata and dependencies.
summerfi-api/get-earn-protocol-portfolio/src/index.ts Removed AWS Lambda function handler for processing API requests related to user portfolios.
summerfi-api/get-earn-protocol-portfolio/tsconfig.json Removed TypeScript configuration file for the project.
summerfi-api/get-earn-protocol-portfolio/tsconfig.test.json Removed TypeScript testing configuration file.

Possibly related PRs

  • Initial commit for earn-protocol-landing-page app #511: The main PR involves the removal of the addEarnProtocolConfig function, which is directly related to the changes in the stacks/summer-stack.ts file where this function is imported and invoked.
  • Earn Protocol WIP #2 #520: The changes in the main PR regarding the Earn Protocol configuration may relate to the updates in the apps/earn-protocol-landing-page/app/page.tsx, where the home page component is modified, potentially affecting how the Earn Protocol is displayed.
  • Earn Protocol WIP #4 #524: The introduction of the PortfolioRewards component in the main PR aligns with the updates in the apps/earn-protocol/features/portfolio/components/PortfolioRewards/PortfolioRewards.tsx, which enhances the portfolio view.
  • Earn protocol WIP #12 #539: The modifications in the PortfolioPageView component to include walletData in the main PR relate to the changes in the apps/earn-protocol/app/portfolio/[wallet_address]/page.tsx, which also handles wallet data.
  • Earn Protocol Lambdas #541: The addition of new lambdas for get-earn-protocol-fleets and get-earn-protocol-portfolio in the main PR is directly related to the changes in the stacks/earn-protocol.ts, where the Earn Protocol configuration is defined.

🎉 In the land of code, changes abound,
Functions and files, all tumbling down.
The Earn Protocol's gone, like a whisper in the night,
With Docker and Jest, taking flight.
So here's to the cleanup, a digital cheer,
May your codebase be tidy, and your errors be clear! 🌟


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c362513 and 1ef3e6b.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • summerfi-api/get-earn-protocol-fleets/src/generated/client.ts is excluded by !**/generated/**
📒 Files selected for processing (19)
  • stacks/earn-protocol.ts (0 hunks)
  • stacks/summer-stack.ts (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/.eslintrc.cjs (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/Dockerfile (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/codegen.yml (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/jest.config.js (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/package.json (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/src/graphql/GetFleetDetails.graphql (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/src/graphql/GetFleets.graphql (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/src/index.ts (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/tsconfig.json (0 hunks)
  • summerfi-api/get-earn-protocol-fleets/tsconfig.test.json (0 hunks)
  • summerfi-api/get-earn-protocol-portfolio/.eslintrc.cjs (0 hunks)
  • summerfi-api/get-earn-protocol-portfolio/Dockerfile (0 hunks)
  • summerfi-api/get-earn-protocol-portfolio/jest.config.js (0 hunks)
  • summerfi-api/get-earn-protocol-portfolio/package.json (0 hunks)
  • summerfi-api/get-earn-protocol-portfolio/src/index.ts (0 hunks)
  • summerfi-api/get-earn-protocol-portfolio/tsconfig.json (0 hunks)
  • summerfi-api/get-earn-protocol-portfolio/tsconfig.test.json (0 hunks)
💤 Files with no reviewable changes (19)
  • stacks/earn-protocol.ts
  • stacks/summer-stack.ts
  • summerfi-api/get-earn-protocol-fleets/.eslintrc.cjs
  • summerfi-api/get-earn-protocol-fleets/Dockerfile
  • summerfi-api/get-earn-protocol-fleets/codegen.yml
  • summerfi-api/get-earn-protocol-fleets/jest.config.js
  • summerfi-api/get-earn-protocol-fleets/package.json
  • summerfi-api/get-earn-protocol-fleets/src/graphql/GetFleetDetails.graphql
  • summerfi-api/get-earn-protocol-fleets/src/graphql/GetFleets.graphql
  • summerfi-api/get-earn-protocol-fleets/src/index.ts
  • summerfi-api/get-earn-protocol-fleets/tsconfig.json
  • summerfi-api/get-earn-protocol-fleets/tsconfig.test.json
  • summerfi-api/get-earn-protocol-portfolio/.eslintrc.cjs
  • summerfi-api/get-earn-protocol-portfolio/Dockerfile
  • summerfi-api/get-earn-protocol-portfolio/jest.config.js
  • summerfi-api/get-earn-protocol-portfolio/package.json
  • summerfi-api/get-earn-protocol-portfolio/src/index.ts
  • summerfi-api/get-earn-protocol-portfolio/tsconfig.json
  • summerfi-api/get-earn-protocol-portfolio/tsconfig.test.json

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.

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.

@marcinciarka
Copy link
Member Author

@coderabbitai pause

Copy link
Contributor

coderabbitai bot commented Oct 23, 2024

✅ Actions performed

Reviews paused.

@piotrwitek
Copy link
Collaborator

piotrwitek
piotrwitek previously approved these changes Oct 23, 2024
Copy link
Collaborator

@piotrwitek piotrwitek left a comment

Choose a reason for hiding this comment

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

Looks good

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Please upload report for BASE (dev@c362513). Learn more about missing BASE report.
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...entation/ArmadaManager/ArmadaManagerUsersClient.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             dev     #545   +/-   ##
======================================
  Coverage       ?   70.76%           
======================================
  Files          ?       25           
  Lines          ?      260           
  Branches       ?       19           
======================================
  Hits           ?      184           
  Misses         ?       75           
  Partials       ?        1           

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

@piotrwitek
Copy link
Collaborator

Added usage examples and tests:

it('should getVaults', async () => {
  const raw = await sdk.armada.users.getVaultsRaw({
    chainInfo,
  })
  expect(raw.vaults).toHaveLength(1)
  expect(raw.vaults[0]?.id).toEqual(`${fleetAddress.value}`)
})

it('should getVault', async () => {
  const raw = await sdk.armada.users.getVaultRaw({
    poolId: ArmadaVaultId.createFrom({
      chainInfo,
      fleetAddress,
    }),
  })
expect(raw.vault?.id).toEqual(`${fleetAddress.value}`)

Copy link
Collaborator

@piotrwitek piotrwitek left a comment

Choose a reason for hiding this comment

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

Approved :)

@piotrwitek piotrwitek merged commit f3f2150 into dev Oct 23, 2024
2 checks passed
@piotrwitek piotrwitek deleted the marcinciarka/remove-not-needed-lambdas branch October 23, 2024 12:53
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.

3 participants