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(adapter/alibaba-cloud-fc3): add alibaba cloud function compute 3.0 adapater support #3641

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

rwv
Copy link
Contributor

@rwv rwv commented Nov 7, 2024

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Docs

https://www.alibabacloud.com/help/en/functioncompute/fc-3-0/

Tests

Differences with Hono's Getting Started with Aliyun Function Compute

The primary difference between this adapter and the setup described in Hono's official documentation lies in the deployment method for Alibaba Cloud Function Compute (FC).

  • Debian Docker Container (Hono Documentation): The official guide provides a setup using a Debian-based Docker container to deploy Hono applications on Aliyun FC. This approach involves creating a custom Docker environment that packages and runs the application, offering flexibility with OS-level configurations.

  • Native Node.js Environment (This Adapter): In contrast, this adapter uses Alibaba Cloud's Node.js runtime environment directly, similar to AWS Lambda. It leverages Alibaba Cloud FC's built-in Node.js support, bypassing the need for a custom Docker container. This approach simplifies deployment by focusing on function code rather than container management, making it faster to set up and closer in experience to other serverless platforms like AWS Lambda.

@rwv rwv changed the title feat: add aliyun function compute 3.0 adapater support feat(adapter/aliyun-fc3): add aliyun function compute 3.0 adapater support Nov 7, 2024
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 98.43750% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.72%. Comparing base (0a18c02) to head (76f5e87).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/adapter/alibaba-cloud-fc3/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3641      +/-   ##
==========================================
+ Coverage   89.80%   91.72%   +1.92%     
==========================================
  Files         159      161       +2     
  Lines       10120    10199      +79     
  Branches     2793     2919     +126     
==========================================
+ Hits         9088     9355     +267     
+ Misses       1032      842     -190     
- Partials        0        2       +2     

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

@rwv
Copy link
Contributor Author

rwv commented Nov 7, 2024

Maybe change aliyun to alibaba-cloud to make this more international.

@rwv rwv changed the title feat(adapter/aliyun-fc3): add aliyun function compute 3.0 adapater support feat(adapter/alibaba-cloud-fc3): add alibaba cloud function compute 3.0 adapater support Nov 8, 2024
@rwv
Copy link
Contributor Author

rwv commented Nov 8, 2024

The renaming and runtime test are complete. Could you please review and let me know if there’s anything else that needs to be adjusted? Thanks!

@yusukebe
Copy link
Member

yusukebe commented Nov 9, 2024

Hi @rwv

It's hard to decide if we should accept this PR because it's possible that no one can maintain this adapter. At least, I don't know much about Aliyun Function Compute. You may be able to maintain it, but that may not be possible in the future, and it will be hard for me to maintain it.

@rwv
Copy link
Contributor Author

rwv commented Nov 9, 2024

Hi,

Thank you for considering this PR. I understand the concern regarding long-term maintenance, especially since Aliyun Function Compute might not be widely familiar to the core team. I’d be glad to help maintain this adapter for as long as possible. Additionally, I’ve achieved 100% test coverage on this adapter, which should help with ensuring stability and making future maintenance easier. I can also provide documentation and implementation details to further support the team. If there are any specific concerns or suggestions, please let me know, and I’d be happy to address them.

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.

2 participants