Serverless application infrastructure
Summary by CodeRabbit
-
New Features
- Enhanced AWS event handling with support for SQS and S3 triggers.
- Introduced
queueclass for AWS SQS interactions. - Added
storageclass methods for file upload, retrieval, and listing in S3. - New Azure function handlers for queue and blob triggers.
- Added
queueclass for Azure Queue Storage interactions. - Introduced
GCPQueueclass for Google Cloud Pub/Sub management. - New trigger types for AWS, Azure, and GCP functions.
- New configuration files for various benchmarks to specify execution parameters.
- Added new Python functions for handling input and processing in multiple benchmarks.
-
Bug Fixes
- Improved error handling and logging for various operations.
-
Documentation
- Updated documentation to reflect new features and usage instructions.
-
Chores
- Updated configuration files for Python 3.9 support across platforms.
- Added new dependencies for Azure and GCP functionalities.
Walkthrough
This pull request introduces extensive modifications across multiple files, primarily enhancing the functionality of serverless benchmarks for AWS, Azure, and GCP. Key changes include the introduction of new trigger types, such as Queue and Storage triggers, and the addition of methods for handling messages in queues and storage operations. The configurations for Python runtime and dependencies have been updated to support new features. Documentation has been improved for clarity on modularity and platform-specific configurations. Overall, these changes aim to provide greater flexibility and functionality in managing serverless functions and their interactions with various cloud services.
Changes
| File Path | Change Summary |
|---|---|
| benchmarks/wrappers/aws/python/handler.py | Modified handler function to process AWS events with new return_http flag and SQS/S3 checks. Enhanced logging and control flow. |
| benchmarks/wrappers/aws/python/queue.py | Introduced queue class for AWS SQS interactions, with methods to send messages. |
| benchmarks/wrappers/aws/python/storage.py | Updated upload method with overwrite parameter; added get_object and list_blobs methods. |
| benchmarks/wrappers/azure/python/handler.py | Renamed main to handler_http; added handler_queue and handler_storage functions for processing queue and blob events. |
| benchmarks/wrappers/azure/python/queue.py | Introduced queue class for Azure Queue Storage interactions, with message sending capabilities. |
| benchmarks/wrappers/azure/python/storage.py | Updated upload method with overwrite parameter; added get_object and list_blobs methods. |
| benchmarks/wrappers/gcp/python/handler.py | Renamed handler to handler_http; added handler_queue, handler_storage, and measure functions for queue and storage events. |
| benchmarks/wrappers/gcp/python/queue.py | Introduced queue class for Google Cloud Pub/Sub interactions, with message publishing capabilities. |
| benchmarks/wrappers/gcp/python/storage.py | Updated upload method with overwrite parameter; added get_object and list_blobs methods. |
| config/example.json | Updated Python runtime version from "3.7" to "3.9". |
| config/systems.json | Added Python 3.9 base image; included queue.py in AWS, Azure, and GCP deployment files. Added Azure dependencies. |
| docs/modularity.md | Enhanced documentation for SeBS framework, clarifying modularity and configuration management. |
| docs/platforms.md | Updated platform documentation for AWS, Azure, and GCP, improving clarity and detail. |
| requirements.azure.txt | Added dependencies for azure-storage-queue and azure-identity. |
| requirements.gcp.txt | Added dependency for google-cloud-pubsub. |
| scripts/run_experiments.py | Introduced minio_storage class for managing MinIO storage; updated local storage handling. |
| sebs.py | Enhanced benchmark command with new trigger options for queue and storage. |
| sebs/aws/aws.py | Updated package_code and create_function methods to handle new trigger types. |
| sebs/aws/function.py | Added application_name parameter to LambdaFunction constructor; updated deserialization logic. |
| sebs/aws/queue.py | Introduced SQS class for AWS SQS interactions, including queue management methods. |
| sebs/aws/triggers.py | Enhanced trigger classes to support new parameters for result queues and application names. |
| sebs/azure/azure.py | Added support for multiple trigger types in function creation and configuration management. |
| sebs/azure/function.py | Updated AzureFunction class to handle new trigger types and application name. |
| sebs/azure/queue.py | Introduced AzureQueue class for Azure Storage Queue interactions. |
| sebs/azure/triggers.py | Enhanced trigger classes for managing result queues and storage interactions. |
| sebs/benchmark.py | Updated BenchmarkConfig and Benchmark classes to include new parameters for triggers. |
| sebs/cache.py | Modified add_code_package method for improved readability. |
| sebs/experiments/config.py | Integrated trigger functionality into Config class, enhancing serialization and deserialization. |
| sebs/faas/function.py | Added collect_async_results method for managing execution results from queues. |
| sebs/faas/queue.py | Introduced abstract Queue class for queue management, defining necessary methods. |
| sebs/faas/storage.py | No changes made to exported or public entities. |
| sebs/faas/system.py | Added abstract method for default application name; updated trigger creation methods. |
| sebs/gcp/function.py | Updated GCPFunction class to handle new trigger types and application name. |
| sebs/gcp/gcp.py | Enhanced trigger resource management and updated function creation methods. |
| sebs/gcp/queue.py | Introduced GCPQueue class for managing Google Cloud Pub/Sub interactions. |
| sebs/gcp/triggers.py | Enhanced trigger classes to manage result queues and interactions with GCP services. |
| sebs/local/local.py | Updated package_code method to accept trigger type. |
| sebs/openwhisk/openwhisk.py | Updated package_code and create_function methods to integrate triggers. |
| sebs/sebs.py | Added app_function_name parameter to get_benchmark method. |
| sebs/utils.py | Enhanced find_benchmark function with optional function parameter; modified logging setup. |
| tests/aws/create_function.py | Updated test class to include new queue.py file in deployment package for AWS. |
Poem
In the meadow where the code does play,
New features hop in, brightening the day.
With queues and triggers, the functions now sing,
A dance of data, oh what joy they bring!
From AWS to Azure, GCP's delight,
Our serverless dreams take glorious flight! 🐇✨
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?
🪧 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
@coderabbitaiin 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
@coderabbitaiin 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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile 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.