Skip to content
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

Block environment/image releases based on Ubuntu 20.04 #3714

Merged
merged 4 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scripts/azureml-assets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
### 🚀 New Features


## 1.16.68 (2024-01-02)
### 🚀 New Features
- [#3714](https://github.com/Azure/azureml-assets/pull/3714) Block environment/image releases based on Ubuntu 20.04

## 1.16.67 (2024-11-18)
### 🚀 New Features
- [#3605](https://github.com/Azure/azureml-assets/pull/3605) Improve logging for environment release tag already found in copy_assets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@ def validate_py_version(build_log_file_name, build_log_content):
return 0


def validate_ubuntu_version(build_log_file_name, build_log_content):
"""Validate Ubuntu version.

Args:
build_log_file_name (str): Build log file name.
build_log_content (str): Build log content

Returns:
int: Number of errors.
"""
ubuntu2004_match = re.search(r"FROM\s+(.*20\.04.*|.*2004.*)", build_log_content)

if ubuntu2004_match:
logger.log_error(f"{build_log_file_name}: Ubuntu 20.04 reference found in build log."
f"Ubuntu 20.04 is nearing or has reached EOL. Please create an environment "
f"based on a newer Ubuntu version.")
return 1

return 0


def validate_build_logs(build_logs_dir):
"""Validate environment build logs.

Expand All @@ -50,6 +71,7 @@ def validate_build_logs(build_logs_dir):
with open(build_log_file_path, "r") as f:
build_log_content = f.read()
error_count += validate_py_version(build_log_file_name, build_log_content)
error_count += validate_ubuntu_version(build_log_file_name, build_log_content)

return error_count == 0

Expand Down
2 changes: 1 addition & 1 deletion scripts/azureml-assets/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="azureml-assets",
version="1.16.67",
version="1.16.68",
description="Utilities for publishing assets to Azure Machine Learning system registries.",
author="Microsoft Corp",
packages=find_packages(),
Expand Down
Loading