Implement Azure Components infrastructure #33293
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
This PR implements the infrastructure for Dagster-Azure Components, enabling declarative YAML configuration for Azure resources.
We leverage the existing credential classes in dagster-azure by making them dg.Resolvable. This supports environment variable resolution directly within the existing resource structure, avoiding the need for separate credential components.
Key Changes
Credentials: Updated AzureBlobStorage and ADLS2 credential config classes to inherit from dg.Resolvable.
Components: Implemented Pydantic-based components for:
AzureBlobStorageResourceComponent
ADLS2ResourceComponent
ADLS2PickleIOManagerComponent
Registration: Registered dagster_azure in setup.py entry points.
How I Tested These Changes
dagster_azure_tests/components/test_azure_components.py:
Sandbox Integration: Validated full YAML-to-Resource lifecycles using the create_defs_folder_sandbox pattern for Blob Storage, ADLS2, and IO Managers.
Field Synchronization: Added parameterized unit tests to ensure that component configuration schemas match the underlying ConfigurableResource models (checking for missing or extra fields).
Credential Resolution: Verified that different credential types (SAS, Key) are correctly resolved from YAML attributes.
Changelog
Added dagster_azure.components module with foundational infrastructure.
Updated AzureBlobStorage and ADLS2 credential configuration classes to inherit from dg.Resolvable.
Implemented AzureBlobStorageResourceComponent and ADLS2ResourceComponent.
Implemented ADLS2PickleIOManagerComponent.
Registered dagster_azure components in setup.py entry points.
test: Added integration tests using the Dagster sandbox pattern and field synchronization checks.
docs: Added a guide for Azure Components in docs/docs/integrations/libraries/azure/components.md.