Skip to content

feat: V2 library worker#1667

Closed
hallvictoria wants to merge 49 commits intodevfrom
hallvictoria/library-worker
Closed

feat: V2 library worker#1667
hallvictoria wants to merge 49 commits intodevfrom
hallvictoria/library-worker

Conversation

@hallvictoria
Copy link
Copy Markdown
Contributor

@hallvictoria hallvictoria commented Apr 15, 2025

Description

The library worker holds the main logic for responding to the host, indexing function apps, and executing functions.

Fixes #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

configure_opentelemetry(fi_context)

# Extensions are not supported
call_result = await execute_async(fi.func, args)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extensions are not supported in 3.13+

+ str(indexed_function_bindings_logs))
indexed_function_logs.append(function_log)

log_data = {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This formats the log into a JSON that we can easily parse in Kusto. We log the app setting state here alone -- this ensures that the app settings that are logged are accurate.

import traceback

# Logging Prefixes
SDK_LOG_PREFIX = "azure.functions"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo: change log prefix?

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

import asyncio
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor: moved methods related to the loop & executing out from dispatcher.py

Comment thread eng/ci/official-build.yml
@@ -49,31 +47,7 @@ extends:
- stage: Build
jobs:
- template: /eng/templates/official/jobs/build-artifacts.yml@self
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will be only unit tests for the library worker. E2E tests will remain in the proxy worker.

Comment thread eng/templates/jobs/build.yml Outdated
@hallvictoria hallvictoria changed the base branch from 1.x to dev May 1, 2025 19:09
@hallvictoria hallvictoria marked this pull request as ready for review May 1, 2025 19:25
@hallvictoria hallvictoria deleted the hallvictoria/library-worker branch March 9, 2026 15:02
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.

1 participant