From 6781926b2e3422e9b3182452db44efa0b5b3fd55 Mon Sep 17 00:00:00 2001 From: kdestin <101366538+kdestin@users.noreply.github.com> Date: Mon, 25 Sep 2023 23:02:57 -0400 Subject: [PATCH] chore: Remove 'Send IcM on Failure' step from tutorial workflows (#2670) * chore: Remove 'Send IcM on Failure' step that hasn't been in use for a while * chore: Run tutorials/readme.py * chore: Remove unused local 'generate-icm' action --- .github/actions/generate-icm/.gitignore | 165 ---------- .github/actions/generate-icm/action.yaml | 43 --- .github/actions/generate-icm/main.py | 310 ------------------ .github/actions/generate-icm/requirements.txt | 3 - ...started-azureml-getting-started-studio.yml | 19 -- ...ials-azureml-in-a-day-azureml-in-a-day.yml | 19 -- ...ect-classification-distributed-pytorch.yml | 19 -- ...ials-e2e-ds-experience-e2e-ml-workflow.yml | 19 -- ...et-started-notebooks-cloud-workstation.yml | 19 -- ...als-get-started-notebooks-deploy-model.yml | 19 -- ...als-get-started-notebooks-explore-data.yml | 19 -- ...torials-get-started-notebooks-pipeline.yml | 19 -- ...rials-get-started-notebooks-quickstart.yml | 19 -- ...ials-get-started-notebooks-train-model.yml | 19 -- tutorials/readme.py | 20 -- 15 files changed, 731 deletions(-) delete mode 100644 .github/actions/generate-icm/.gitignore delete mode 100644 .github/actions/generate-icm/action.yaml delete mode 100644 .github/actions/generate-icm/main.py delete mode 100644 .github/actions/generate-icm/requirements.txt diff --git a/.github/actions/generate-icm/.gitignore b/.github/actions/generate-icm/.gitignore deleted file mode 100644 index cc1b33efde..0000000000 --- a/.github/actions/generate-icm/.gitignore +++ /dev/null @@ -1,165 +0,0 @@ -#### -# Pythno -#### - - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ \ No newline at end of file diff --git a/.github/actions/generate-icm/action.yaml b/.github/actions/generate-icm/action.yaml deleted file mode 100644 index 1b59b2753c..0000000000 --- a/.github/actions/generate-icm/action.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: Generate IcM -description: | - A github action that facilitates IcM generation using the the IcM - connector webservice. -inputs: - connector_id: - description: "IcM Connector ID" - required: true - host: - description: "Hostname for the IcM webservice" - required: true - certificate: - description: A certificate - required: true - private_key: - description: The unencrypted private-key associated with the certificate - required: true - args: - description: | - A yaml encoded string that describes the arguments for - AddOrUpdateIncident2. See IcM documentation on Connector API - required: true - -runs: - using: "composite" - steps: - - name: Install Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - cache: "pip" - - name: Install Dependencies - run: pip install -r "${{ github.action_path }}/requirements.txt" - shell: bash - - name: Send IcM - run: python "${{ github.action_path }}/main.py" - shell: bash - env: - INPUT_HOST: ${{ inputs.host }} - INPUT_CONNECTOR_ID: ${{ inputs.connector_id }} - INPUT_CERTIFICATE: ${{ inputs.certificate }} - INPUT_PRIVATE_KEY: ${{ inputs.private_key }} - INPUT_ARGS: ${{ inputs.args }} \ No newline at end of file diff --git a/.github/actions/generate-icm/main.py b/.github/actions/generate-icm/main.py deleted file mode 100644 index d7297f7838..0000000000 --- a/.github/actions/generate-icm/main.py +++ /dev/null @@ -1,310 +0,0 @@ -import argparse -import contextlib -from datetime import datetime -import os -from pathlib import Path -import sys -from tempfile import NamedTemporaryFile -from typing import Any, Literal, Optional, TypeAlias, TypeVar, overload -import requests -import yaml -from pydantic import BaseModel -from xml.etree import ElementTree - -T = TypeVar("T") -U = TypeVar("U") - -RoutingOptions: TypeAlias = Literal["None", "SkipTransferOnUpdate"] - - -class SOAPFault(Exception): - """SOAP 1.2 Fault""" - - def __init__( - self, - *, - code: str, - reason: str, - role: Optional[str] = None, - node: Optional[str], - detail: Optional[str] = None, - ): - self.code = code - self.reason = reason - self.role = role - self.node = node - self.detail = detail - - -class AuthCert(BaseModel): - cert: Path - private_key: Path - - -class AddOrUpdateIncident2Args(BaseModel): - routingOptions: RoutingOptions = "None" - incident: dict - connectorId: str - - -class AddOrUpdateIncident2Result(BaseModel): - IncidentId: int - Status: Literal[ - "Invalid", - "AddedNew", - "UpdatedExisting", - "DidNotChangeExisting", - "AlertSourceUpdatesPending", - "UpdateToHoldingNotAllowed", - "Discarded", - ] - - -class ActionArgs(BaseModel): - host: str - auth: AuthCert - args: AddOrUpdateIncident2Args - - -def sorted_dict(val: T) -> T: - """Returns a copy of dict `val` where key-values are inserted in - alphabetical order. If `val` is not a dict, it's returned unchanged - - Args: - val (T): Any value - - Returns: - T: Either the same value passed in if not a dict, or a copy - with keys inserted in alphabetical order - """ - if not isinstance(val, dict): - return val - - return {k: sorted_dict(v) for k, v in sorted(val.items(), key=lambda kv: kv[0])} - - -@overload -def mergeLeft(left: T, right: U) -> U: - ... - - -def mergeLeft(left: dict, right: dict) -> dict: - if not (isinstance(left, dict) and isinstance(right, dict)): - return right - for k, v in right.items(): - left[k] = mergeLeft(left.get(k, None), v) - - return left - - -def string_to_tempfile(s: str): - """Writes a utf-8 encoded string into a temporary file - - Args: - s (str): Base64 encoded string - - Returns: - NamedTemporaryFile: Temp File, must be closed by caller - """ - tmp = NamedTemporaryFile() - tmp.write(bytes(s, encoding="utf-8")) - tmp.seek(0) - return tmp - - -def toXML(obj: dict, xsi_namespace="i") -> str: - """Serializes a dict into an XML string - - Args: - obj (dict): dict to serialize - xsi_namespace (str, optional): Prefix for the Schema Instance Namespace. Defaults to "i". - - Returns: - str: xml string representing the dict - """ - ATTRIBUTESKEY = "$attributes" - NAMESPACEKEY = "$namespace" - - def tag( - name: str, value: str, *, attributes: dict = {}, namespace: str = None - ) -> str: - """Surrounds a string in xml tags - - Args: - name (str): Name of tag - value (str): Value of tag - attributes (dict, optional): Dict of attributes for xml element. Defaults to {}. - namespace (str, optional): Namespace prefix for the tag. Defaults to None. - - Returns: - str: xml string - """ - attributes_str = " ".join(f'{k}="{v}"' for k, v in attributes.items()) - ns = f"{namespace}:" if namespace else "" - if attributes_str: - attributes_str = " " + attributes_str - if value: - return f"<{ns}{name}{attributes_str}>{value}" - return f"<{ns}{name}{attributes_str} />" - - def serialize_dict(val: dict, namespace: str = None) -> str: - ns = val.pop(NAMESPACEKEY, namespace) - return "".join(serialize(k, v, ns) for k, v in val.items()) - - def serialize(name: str, val: Any, namespace: str = None) -> str: - """Serializes a key value pair into an XML element - - Args: - name (str): Tag name for element - val (Any): Value to serialize - namespace (str, optional): Namespace to prepend to child tags - of value. Defaults to None. - - Returns: - str: XML string - """ - t = lambda v, a={}: tag(name, v, attributes=a, namespace=namespace) - if isinstance(val, dict): - attrs = val.pop(ATTRIBUTESKEY, {}) - return t(serialize_dict(val, namespace), attrs) - if isinstance(val, list): - return t("".join(serialize_dict(v, namespace=namespace) for v in val)) - elif isinstance(val, bool): - return t(str(val).lower()) - elif val is None: - return t(None, {f"{xsi_namespace}:nil": "true"}) - else: - return t(str(val)) - - return serialize_dict(obj) - - -@contextlib.contextmanager -def parseArgs(): - """Parses the github action arguments. Must be invoke with `with` statement - - Yields: - _type_: ActionArgs - """ - - def getInput(name: str, *, required=False): - val = os.environ.get(f'INPUT_{name.replace(" ", "_").upper()}', "") - if not val and required: - raise ValueError(f"Missing required parameter: {name}") - return val - - certificate = getInput("certificate", required=True) - private_key = getInput("private_key", required=True) - connectorId = getInput("connector_id", required=True) - host = getInput("host", required=True) - body = yaml.load(getInput("args", required=True), yaml.Loader) - - with string_to_tempfile(certificate) as cert_file, string_to_tempfile( - private_key - ) as key_file: - yield ActionArgs( - host=host, - auth=AuthCert(cert=Path(cert_file.name), private_key=Path(key_file.name)), - args=AddOrUpdateIncident2Args(**body, connectorId=connectorId), - ) - - -def add_or_update_incident_2(host: str, auth: AuthCert, args: AddOrUpdateIncident2Args): - now = datetime.utcnow().isoformat() - soap_ns = "http://www.w3.org/2003/05/soap-envelope" - icm_ns = "http://schemas.datacontract.org/2004/07/Microsoft.AzureAd.Icm.Types" - baseIncident = { - "OccurringLocation": {}, - "RaisingLocation": {}, - "Source": { - "CreatedBy": "Monitor", - "Origin": "Monitor", - "SourceId": args.connectorId, - "CreateDate": now, - "ModifiedDate": now, - }, - "Severity": 4, - } - incident = sorted_dict( - { - "$attributes": { - "xmlns:b": icm_ns, - "xmlns:i": "http://www.w3.org/2001/XMLSchema-instance", - }, - "$namespace": "b", - **mergeLeft(baseIncident, args.incident), - } - ) - soap_message = { - "s:Envelope": { - "$attributes": { - "xmlns:s": soap_ns, - "xmlns:a": "http://www.w3.org/2005/08/addressing", - }, - "s:Header": { - "a:Action": "http://tempuri.org/IConnectorIncidentManager/AddOrUpdateIncident2", - "a:To": f"https://{host}/Connector3/ConnectorIncidentManager.svc", - }, - "s:Body": { - # Key order is significant, must be in alphabetical - # order - "AddOrUpdateIncident2": { - "connectorId": args.connectorId, - "incident": incident, - "routingOptions": args.routingOptions, - "$attributes": {"xmlns": "http://tempuri.org/"}, - } - }, - } - } - - response = requests.post( - f"https://{host}/Connector3/ConnectorIncidentManager.svc", - cert=(auth.cert, auth.private_key), - headers={"Content-Type": "application/soap+xml; charset=utf-8"}, - data='\n' + toXML(soap_message), - ) - - xml_result = ElementTree.fromstring(response.text) - fault = xml_result.find(f".//{{{soap_ns}}}Fault") - - if fault: - - def innerXML(element: Optional[ElementTree.Element]) -> Optional[str]: - return element and ( - element.text - or "".join(ElementTree.tostring(e, "unicode") for e in element) - ) - - raise SOAPFault( - code=innerXML(fault.find(f".//{{{soap_ns}}}Code")), - reason=innerXML(fault.find(f".//{{{soap_ns}}}Reason")), - role=innerXML(fault.find(f".//{{{soap_ns}}}Role")), - detail=innerXML(fault.find(f".//{{{soap_ns}}}Detail")), - node=innerXML(fault.find(f".//{{{soap_ns}}}Node")), - ) - - return AddOrUpdateIncident2Result( - IncidentId=int(xml_result.findtext(f".//{{{icm_ns}}}IncidentId")), - Status=xml_result.findtext(f".//{{{icm_ns}}}Status"), - ) - - -def main(): - # Utility functions to report status to Github Action Runner - core = { - "debug": lambda s: print(f"::debug::{s}"), - "error": lambda s: print(f"::error::{s}"), - } - - with parseArgs() as args: - try: - add_or_update_incident_2(**vars(args)) - except SOAPFault as e: - core["debug"](e.detail) - core["error"](e.reason) - sys.exit(1) - - -if __name__ == "__main__": - main() diff --git a/.github/actions/generate-icm/requirements.txt b/.github/actions/generate-icm/requirements.txt deleted file mode 100644 index d89a1e6f13..0000000000 --- a/.github/actions/generate-icm/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pydantic -requests -pyyaml \ No newline at end of file diff --git a/.github/workflows/tutorials-azureml-getting-started-azureml-getting-started-studio.yml b/.github/workflows/tutorials-azureml-getting-started-azureml-getting-started-studio.yml index 6a78f53bb5..4729672e1f 100644 --- a/.github/workflows/tutorials-azureml-getting-started-azureml-getting-started-studio.yml +++ b/.github/workflows/tutorials-azureml-getting-started-azureml-getting-started-studio.yml @@ -75,22 +75,3 @@ jobs: with: name: azureml-getting-started-studio path: tutorials/azureml-getting-started - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'azureml-getting-started/azureml-getting-started-studio.ipynb'" - Summary: | - Notebook 'azureml-getting-started/azureml-getting-started-studio.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "azureml-getting-started/azureml-getting-started-studio.ipynb[${{ github.ref_name }}]" diff --git a/.github/workflows/tutorials-azureml-in-a-day-azureml-in-a-day.yml b/.github/workflows/tutorials-azureml-in-a-day-azureml-in-a-day.yml index f3d29aa051..2e7dc74a43 100644 --- a/.github/workflows/tutorials-azureml-in-a-day-azureml-in-a-day.yml +++ b/.github/workflows/tutorials-azureml-in-a-day-azureml-in-a-day.yml @@ -75,22 +75,3 @@ jobs: with: name: azureml-in-a-day path: tutorials/azureml-in-a-day - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'azureml-in-a-day/azureml-in-a-day.ipynb'" - Summary: | - Notebook 'azureml-in-a-day/azureml-in-a-day.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "azureml-in-a-day/azureml-in-a-day.ipynb[${{ github.ref_name }}]" diff --git a/.github/workflows/tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch.yml b/.github/workflows/tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch.yml index 053e64473e..4bf4e521bc 100644 --- a/.github/workflows/tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch.yml +++ b/.github/workflows/tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch.yml @@ -75,22 +75,3 @@ jobs: with: name: e2e-object-classification-distributed-pytorch path: tutorials/e2e-distributed-pytorch-image - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'e2e-distributed-pytorch-image/e2e-object-classification-distributed-pytorch.ipynb'" - Summary: | - Notebook 'e2e-distributed-pytorch-image/e2e-object-classification-distributed-pytorch.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "e2e-distributed-pytorch-image/e2e-object-classification-distributed-pytorch.ipynb[${{ github.ref_name }}]" diff --git a/.github/workflows/tutorials-e2e-ds-experience-e2e-ml-workflow.yml b/.github/workflows/tutorials-e2e-ds-experience-e2e-ml-workflow.yml index eaf749608c..3ee9913957 100644 --- a/.github/workflows/tutorials-e2e-ds-experience-e2e-ml-workflow.yml +++ b/.github/workflows/tutorials-e2e-ds-experience-e2e-ml-workflow.yml @@ -75,22 +75,3 @@ jobs: with: name: e2e-ml-workflow path: tutorials/e2e-ds-experience - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'e2e-ds-experience/e2e-ml-workflow.ipynb'" - Summary: | - Notebook 'e2e-ds-experience/e2e-ml-workflow.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "e2e-ds-experience/e2e-ml-workflow.ipynb[${{ github.ref_name }}]" diff --git a/.github/workflows/tutorials-get-started-notebooks-cloud-workstation.yml b/.github/workflows/tutorials-get-started-notebooks-cloud-workstation.yml index 7d4f2a25fd..6085c7e4f1 100644 --- a/.github/workflows/tutorials-get-started-notebooks-cloud-workstation.yml +++ b/.github/workflows/tutorials-get-started-notebooks-cloud-workstation.yml @@ -75,22 +75,3 @@ jobs: with: name: cloud-workstation path: tutorials/get-started-notebooks - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'get-started-notebooks/cloud-workstation.ipynb'" - Summary: | - Notebook 'get-started-notebooks/cloud-workstation.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "get-started-notebooks/cloud-workstation.ipynb[${{ github.ref_name }}]" diff --git a/.github/workflows/tutorials-get-started-notebooks-deploy-model.yml b/.github/workflows/tutorials-get-started-notebooks-deploy-model.yml index 55e522e6eb..a07c0bfd60 100644 --- a/.github/workflows/tutorials-get-started-notebooks-deploy-model.yml +++ b/.github/workflows/tutorials-get-started-notebooks-deploy-model.yml @@ -73,22 +73,3 @@ jobs: with: name: deploy-model path: tutorials/get-started-notebooks - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'get-started-notebooks/deploy-model.ipynb'" - Summary: | - Notebook 'get-started-notebooks/deploy-model.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "get-started-notebooks/deploy-model.ipynb[${{ github.ref_name }}]" diff --git a/.github/workflows/tutorials-get-started-notebooks-explore-data.yml b/.github/workflows/tutorials-get-started-notebooks-explore-data.yml index e5d833484f..96819785bf 100644 --- a/.github/workflows/tutorials-get-started-notebooks-explore-data.yml +++ b/.github/workflows/tutorials-get-started-notebooks-explore-data.yml @@ -79,22 +79,3 @@ jobs: with: name: explore-data path: tutorials/get-started-notebooks - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'get-started-notebooks/explore-data.ipynb'" - Summary: | - Notebook 'get-started-notebooks/explore-data.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "get-started-notebooks/explore-data.ipynb[${{ github.ref_name }}]" diff --git a/.github/workflows/tutorials-get-started-notebooks-pipeline.yml b/.github/workflows/tutorials-get-started-notebooks-pipeline.yml index 34291916fa..a77bd455ac 100644 --- a/.github/workflows/tutorials-get-started-notebooks-pipeline.yml +++ b/.github/workflows/tutorials-get-started-notebooks-pipeline.yml @@ -75,22 +75,3 @@ jobs: with: name: pipeline path: tutorials/get-started-notebooks - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'get-started-notebooks/pipeline.ipynb'" - Summary: | - Notebook 'get-started-notebooks/pipeline.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "get-started-notebooks/pipeline.ipynb[${{ github.ref_name }}]" diff --git a/.github/workflows/tutorials-get-started-notebooks-quickstart.yml b/.github/workflows/tutorials-get-started-notebooks-quickstart.yml index f7c97cfed7..d5b78efbf3 100644 --- a/.github/workflows/tutorials-get-started-notebooks-quickstart.yml +++ b/.github/workflows/tutorials-get-started-notebooks-quickstart.yml @@ -75,22 +75,3 @@ jobs: with: name: quickstart path: tutorials/get-started-notebooks - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'get-started-notebooks/quickstart.ipynb'" - Summary: | - Notebook 'get-started-notebooks/quickstart.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "get-started-notebooks/quickstart.ipynb[${{ github.ref_name }}]" diff --git a/.github/workflows/tutorials-get-started-notebooks-train-model.yml b/.github/workflows/tutorials-get-started-notebooks-train-model.yml index cd1c984746..e794694168 100644 --- a/.github/workflows/tutorials-get-started-notebooks-train-model.yml +++ b/.github/workflows/tutorials-get-started-notebooks-train-model.yml @@ -75,22 +75,3 @@ jobs: with: name: train-model path: tutorials/get-started-notebooks - - - name: Send IcM on failure - if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }} - uses: ./.github/actions/generate-icm - with: - host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }} - connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }} - certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }} - private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'get-started-notebooks/train-model.ipynb'" - Summary: | - Notebook 'get-started-notebooks/train-model.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "get-started-notebooks/train-model.ipynb[${{ github.ref_name }}]" diff --git a/tutorials/readme.py b/tutorials/readme.py index 9b0c016844..a0526f68fb 100644 --- a/tutorials/readme.py +++ b/tutorials/readme.py @@ -242,26 +242,6 @@ def write_notebook_workflow( - name: Remove the compute if notebook did not done it properly. run: bash "{github_workspace}/infra/bootstrapping/remove_computes.sh" {nb_config.get(section=name, option=COMPUTE_NAMES)}\n""" - workflow_yaml += f""" - - name: Send IcM on failure - if: ${{{{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }}}} - uses: ./.github/actions/generate-icm - with: - host: ${{{{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }}}} - connector_id: ${{{{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }}}} - certificate: ${{{{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }}}} - private_key: ${{{{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }}}} - args: | - incident: - Title: "[azureml-examples] Notebook validation failed on branch '${{{{ github.ref_name }}}}' for notebook '{posix_notebook}'" - Summary: | - Notebook '{posix_notebook}' is failing on branch '${{{{ github.ref_name }}}}': ${{{{ github.server_url }}}}/${{{{ github.repository }}}}/actions/runs/${{{{ github.run_id }}}} - Severity: 4 - RoutingId: "github://azureml-examples" - Status: Active - Source: - IncidentId: "{posix_notebook}[${{{{ github.ref_name }}}}]"\n""" - workflow_file = os.path.join( "..", ".github", "workflows", f"tutorials-{classification}-{name}.yml" )