Azure / Azure/azure-sdk-for-python

[Reopening] Can't access image build failure logs for AML Registry environments

Open
#41,536 9 comments 1 reaction 1 assignee Claimed by @PratibhaShrivastav18 View on GitHub
Client customer-reported Machine Learning needs-team-attention question Service Attention
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

- Package Name: azure-ai-ml
- Package Version: 1.23.0
- Operating System: Ubuntu
- Python Version: 3.11.11

**Describe the bug**
When publishing a failing environment to the AML Registry, it would be useful to have access to the build failure logs to troubleshoot failing image builds. The error message I get is as follows:

```
ERROR: (UserError) Image build failed. Build log: https://acrtaskprodweu013.blob.core.windows.net/container-dee26eff3a33424593981f27ba060ce1/logs/cb9u/rawtext.log
Code: UserError
Message: Image build failed. Build log: https://acrtaskprodweu013.blob.core.windows.net/container-dee26eff3a33424593981f27ba060ce1/logs/cb9u/rawtext.log
```
When I try to access the build log, I get the following error:

ERROR 409: Public access is not permitted on this storage account..

**To Reproduce**

Steps to reproduce the behavior:

Create an environment with an error in the Docker build context, i.e. using:

```python
from pathlib import Path

from azure.ai.ml import MLClient
from azure.ai.ml.entities import BuildContext, Environment

def main(ml_client: MLClient):
_ = ml_client.environments.create_or_update(
Environment(
build=BuildContext(
path=Path(__file__).parent / "environment",
)
)
)
```

I used the following Dockerfile to provoke an error:

`some_error`

Expected behavior

The error message should contain enough information to allow me to debug the failing image build.

The docker container I am using it builds perfectly locally.

This was raised in here: https://github.com/Azure/azure-sdk-for-python/issues/39535

But it was closed without any explanation.

[achauhan-scc](https://github.com/achauhan-scc) pointed that owners can see the logs. But I dont think this is correct as there is a deny assignment as this is a managed resource:

![Image](https://github.com/user-attachments/assets/2ca89b29-693b-4ec6-9f8d-700ec0c5424c)

Please can you provide a solution?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.