-
Notifications
You must be signed in to change notification settings - Fork 109
Add Linux Consumption Testing Utils #882
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
Conversation
|
This test works fine on local machine.
|
|
Able to run docker with command, but failed to mount in mesh container. |
|
Running the docker container with |
|
|
||
| return f'http://localhost:{self._ports[self._uuid]}' | ||
|
|
||
| def assign_container(self, env: Dict[str, str] = {}): |
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.
This is great. How long do we wait after the container starts before sending the /assign request?
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.
It waits for 3 seconds in the spawn_container method. I want to ensure the container is already in ready state when calling
with Linux ConsumptionWebHostController() as container:
# container is ready here
container.assign_container({})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.
great. that should be good enough.
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.
Is there a way we can call an API in the container to check if it is active and responding? Such that we don't have to add an artificial wait?
vrdmr
left a comment
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.
review in progress - will complete by tomorrow.
|
|
||
| return f'http://localhost:{self._ports[self._uuid]}' | ||
|
|
||
| def assign_container(self, env: Dict[str, str] = {}): |
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.
Is there a way we can call an API in the container to check if it is active and responding? Such that we don't have to add an artificial wait?
Description
This new
testutils_lc.pyallows end-to-end testing scenario to run through the Linux Consumption Container => Placeholder Mode => Specialization => Function Load => Function Invocation.It ensures any gaps between linux consumption specialization is well covered.
The example apps are not lying in the repository, it is in the following blob storage (read-only):
https://pythonworker36sa.blob.core.windows.net/python-worker-lc-apps?restype=container&comp=list
https://pythonworker37sa.blob.core.windows.net/python-worker-lc-apps?restype=container&comp=list
https://pythonworker38sa.blob.core.windows.net/python-worker-lc-apps?restype=container&comp=list
https://pythonworker39sa.blob.core.windows.net/python-worker-lc-apps?restype=container&comp=list
When failure occurs, it also prints out the error messages from the containers for fast diagnoses.
To add more scenarios:
func azure functionapp publish python-worker-<python_version>-lc-functo remote build the artifact (e.g. python-worker-37-lc-func)https://python-worker-<python_version>-lc-func.scm.azurewebsites.net/api/settings=>SCM_RUN_FROM_PACKAGE.Simple BatchSubscription =>AzureFunctionsPythonWorkerCILinuxDevOpsResource Group =>pythonworker<python_major><python_minor>saStorage Account =>python-worker-lc-appsBlob Containerendtoend/test_linux_consumption.pyto create a new test case./cc: @AnatoliB @vrdmr @stefanushinardi
PR information
Quality of Code and Contribution Guidelines