-
Notifications
You must be signed in to change notification settings - Fork 16
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
Integrate Azure Functions deployment with In-Vitro #569
base: main
Are you sure you want to change the base?
Conversation
Looks like there is an error in the checks.
You can find more details about these requirements in our contributing guide: |
f717c64
to
bae6305
Compare
Hi @leokondrashov, I've completed my initial review of this PR. @cavinkavi has made the corresponding changes, and the current version looks good to me. Do you have any additional feedback or concerns? |
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.
First, there are no tests for the infrastructure, please add. Better even add them into CI tests.
Second, does Azure support Go deployments? We don't use Python that much and I'm not sure that our main Python implementation is well-behaved. It would be preferable to use Go instead.
# Simulate the busySpin function | ||
def busy_spin(duration_ms: int) -> None: | ||
end_time = perf_counter() + duration_ms / 1000 # Convert ms to seconds | ||
while perf_counter() < end_time: | ||
continue | ||
|
||
# Convert TraceFunctionExecution | ||
def trace_function_execution(start: float, time_left_milliseconds: int) -> str: | ||
time_consumed_milliseconds = int((time.time() - start) * 1000) | ||
if time_consumed_milliseconds < time_left_milliseconds: | ||
time_left_milliseconds -= time_consumed_milliseconds | ||
if time_left_milliseconds > 0: | ||
busy_spin(time_left_milliseconds) | ||
|
||
return f"OK - {hostname}" |
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.
Please reuse this parts from existing Python implementation (server/trace-func-py/trace_func.py
). Don't reimplement because this creates duplicates in the code and incorrect performance comparisons.
No need to throw out the Python deployment, though. It could be an option to deploy one of them during runtime. But the default should be Go to align with other deployments. |
Signed-off-by: Kavithran <[email protected]>
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.
Also, please change the message of your commit to something meaningful. Addressing my comments doesn't make any sense when you are looking at the history of commits.
} | ||
|
||
// Helper function to copy files | ||
func copyFile(src, dst string) error { |
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.
Put this function in utils
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.
Here you have the end-to-end test. Please add a test that would check the potential zip file for being operational. This wouldn't require the Azure credentials, so we can run it without any concerns about spending. This test would show when we have problems with our file copies in the archive.
Please also add them to the CI, so we can see the results right in the PRs.
At the same time, we can have an end-to-end test by just running the loader.go
with the correct config file and checking for the output. There is no reason to add the script that duplicates the experiment pipeline. Better to repurpose it to test specific parts of the pipeline (deploying/cleaning functions, checking for the zip health).
Summary
A small summary of the requirements (in one/two sentences).
To integrate Azure Functions deployment with In-Vitro. This feature enables deployment of serverless functions on the Azure Functions platform.
Implementation Notes ⚒️
This PR adds a workflow to deploy multiple functions to Azure Functions via ZIP deployment.
Documentation on the steps to deploy the functions to Azure are included in
loader.md
.azurefunctions_setup
: this folder contains the relevant config and workload files to be used for deployment.azure_functions.go
: initializes Azure resources required for deployment to Azure Functions, such as Resource Group, Storage Account, and Function App. In order to deploy multiple functions via ZIP, each function must have its own specific folder containing required dependencies, before zipping and deploying all the function folders as a single package. After successful deployment, local temporary folders holding the functions and the zip package are cleaned up.(Note: All cleanup, including local temporary folders, will be done after entire experiment is completed.)
In order to run test script (
azure_functions_test.go
), follow steps 1 to 5 inloader.md
and rungo test -v ./pkg/driver/deployment
from root.External Dependencies 🍀
Breaking API Changes⚠️
Simply specify none (N/A) if not applicable.