-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add versioning and resource_id to function names(#230) #232
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request introduces a new version tracking mechanism for the Serverless Benchmarking System (SeBS). The changes span multiple files, adding a Changes
Sequence DiagramsequenceDiagram
participant Config as Config System
participant BuildTool as Build Docker Images
participant Deployment as Deployment Client
Config->>Config: Add SeBS_version
Config->>BuildTool: Pass SeBS version
BuildTool->>BuildTool: Tag images with version
Deployment->>Deployment: Generate function names with resources
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
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)
config/systems.json (1)
3-4
: Consider using environment variables for versioning.While adding versioning is good, hardcoding the version in the config file may lead to version drift. Consider:
- Using environment variables for the version.
- Adding a VERSION file at the root of the project.
- Using git tags for version tracking.
This would make version management more maintainable and automated.
sebs/gcp/gcp.py (1)
107-111
: LGTM! Consider these minor improvements.The changes align well with the PR objectives. Two suggestions to improve the code:
- Consider using named placeholders for better readability
- Consider converting this to an instance method since it uses an instance parameter
- @staticmethod - def default_function_name(code_package: Benchmark,resources:Resources) -> str: - # Create function name - func_name = "{}-{}-{}-{}".format( - code_package.benchmark, code_package.language_name, code_package.language_version,resources.resources_id - ) + def default_function_name(self, code_package: Benchmark, resources: Resources) -> str: + # Create function name + func_name = "{benchmark}-{lang}-{ver}-{res_id}".format( + benchmark=code_package.benchmark, + lang=code_package.language_name, + ver=code_package.language_version, + res_id=resources.resources_id + )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
config/systems.json
(1 hunks)sebs.py
(1 hunks)sebs/aws/aws.py
(1 hunks)sebs/config.py
(1 hunks)sebs/gcp/gcp.py
(1 hunks)sebs/local/local.py
(2 hunks)sebs/openwhisk/openwhisk.py
(2 hunks)tools/build_docker_images.py
(1 hunks)
🔇 Additional comments (8)
sebs/config.py (1)
93-95
: LGTM! Good use of dict.get() with default value.The implementation safely handles missing version information by defaulting to "unknown".
tools/build_docker_images.py (1)
40-41
: LGTM! Consistent with config.py implementation.The implementation maintains consistency with config.py by using the same default value and version retrieval method.
sebs/local/local.py (2)
20-20
: LGTM!The import of
Resources
fromsebs.faas.config
is correctly added to support the new resource ID functionality.
345-349
: LGTM! Function name generation enhanced with resource ID.The function name format now includes the resource ID, which improves uniqueness and traceability of deployed functions.
sebs/openwhisk/openwhisk.py (2)
15-15
: LGTM!The import of
Resources
fromsebs.faas.config
is correctly added to support the new resource ID functionality.
Line range hint
392-399
: LGTM! Function name generation enhanced with resource ID.The function name format now includes the resource ID, which improves uniqueness and traceability of deployed functions.
sebs.py (1)
496-496
: LGTM! Function call updated to include resource configuration.The call to
default_function_name
is correctly updated to pass the required resource configuration.sebs/aws/aws.py (1)
392-401
: LGTM! Function name generation enhanced with resource ID and AWS-specific formatting.The function name format now includes the resource ID and maintains AWS Lambda naming restrictions by replacing hyphens and dots with underscores.
Summary by CodeRabbit
Release Notes
Configuration
Functionality
Versioning