From afaffd7619de552753a533d9d7acd27208c5940d Mon Sep 17 00:00:00 2001 From: mbordash2 <43893544+mbordash2@users.noreply.github.com> Date: Tue, 2 May 2023 15:09:41 -0700 Subject: [PATCH] Maintenance/deprecation notices and maintenance (#1878) * added module deprecation notices * updated dockerfile and version bumps * version bumps * update publish on release to notify --- .devcontainer/Dockerfile | 10 +++---- .github/scripts/cicd/build_pyinstaller.sh | 4 +-- .github/workflows/on-push-pyinstaller.yml | 6 ++-- .github/workflows/publish-on-release.yml | 35 ++++++++++++++++------- runway/module/cdk.py | 6 ++++ runway/module/k8s.py | 6 ++++ runway/module/staticsite/handler.py | 6 ++++ 7 files changed, 53 insertions(+), 20 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 96dfa17ac..8efd0f444 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,6 @@ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/ubuntu/.devcontainer/base.Dockerfile -# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04 +# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-20.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04 ARG VARIANT="ubuntu-22.04" FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} @@ -13,9 +13,9 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # Add additional python options RUN sudo add-apt-repository ppa:deadsnakes/ppa -# Install Python 3.7, 3.8, and 3.9 +# Install Python 3.10, 3.8, and 3.9 RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends python3.7 python3.7-venv python3.7-dev \ + && apt-get -y install --no-install-recommends python3.10 python3.10-venv python3.10-dev \ python3.8 python3.8-venv python3.8-dev \ python3.9 python3.9-venv python3.9-dev @@ -23,7 +23,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # Setup alternatives RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 -# Update to use python 3.7 by default +# Update to use python 3.9 by default RUN update-alternatives --set python $(update-alternatives --list python | grep python3.9) # VSCODE user commands @@ -44,4 +44,4 @@ RUN bash -c "export PATH=$HOME/.local/bin:\$PATH \ && poetry completions bash > ~/.bash_completion.d/poetry.bash-completion" # Setup OS_NAME var for runway builds from this dev container -RUN echo "export OS_NAME=ubuntu-18.04" >> ~/.bashrc +RUN echo "export OS_NAME=ubuntu-20.04" >> ~/.bashrc diff --git a/.github/scripts/cicd/build_pyinstaller.sh b/.github/scripts/cicd/build_pyinstaller.sh index ad0838d3c..8fcc7aa03 100644 --- a/.github/scripts/cicd/build_pyinstaller.sh +++ b/.github/scripts/cicd/build_pyinstaller.sh @@ -4,14 +4,14 @@ set -ev -if [ "$OS_NAME" == "ubuntu-18.04" ]; then +if [ "$OS_NAME" == "ubuntu-20.04" ]; then LOCAL_OS_NAME="linux" elif [ "$OS_NAME" == "macos-10.15" ]; then LOCAL_OS_NAME="osx" elif [ "$OS_NAME" == "windows-latest" ]; then LOCAL_OS_NAME="windows" else - echo 'Environment variable "OS_NAME" must be one of ["ubuntu-18.04", "macos-10.15", "windows-latest"]' + echo 'Environment variable "OS_NAME" must be one of ["ubuntu-20.04", "macos-10.15", "windows-latest"]' exit 1 fi diff --git a/.github/workflows/on-push-pyinstaller.yml b/.github/workflows/on-push-pyinstaller.yml index 52b99282f..c17ace92b 100644 --- a/.github/workflows/on-push-pyinstaller.yml +++ b/.github/workflows/on-push-pyinstaller.yml @@ -22,7 +22,7 @@ jobs: name: Pyinstaller "One File" Build strategy: matrix: - os: [macos-10.15, ubuntu-18.04, windows-latest] + os: [macos-10.15, ubuntu-20.04, windows-latest] python-version: [3.8] runs-on: ${{ matrix.os }} env: @@ -72,7 +72,7 @@ jobs: name: Pyinstaller "One Folder" Build strategy: matrix: - os: [macos-10.15, ubuntu-18.04, windows-latest] + os: [macos-10.15, ubuntu-20.04, windows-latest] python-version: [3.8] runs-on: ${{ matrix.os }} env: @@ -129,7 +129,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-18.04] + os: [ubuntu-20.04] python-version: [3.8] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml index 6731fce26..666f6f9fc 100644 --- a/.github/workflows/publish-on-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -16,8 +16,8 @@ jobs: strategy: fail-fast: true matrix: - os: [macos-10.15, ubuntu-18.04, windows-latest] - python-version: [3.7] + os: [macos-10.15, ubuntu-20.04, windows-latest] + python-version: [3.8] runs-on: ${{ matrix.os }} env: OS_NAME: ${{ matrix.os }} @@ -67,8 +67,8 @@ jobs: strategy: fail-fast: true matrix: - os: [macos-10.15, ubuntu-18.04, windows-latest] - python-version: [3.7] + os: [macos-10.15, ubuntu-20.04, windows-latest] + python-version: [3.8] runs-on: ${{ matrix.os }} env: OS_NAME: ${{ matrix.os }} @@ -123,8 +123,8 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-18.04] - python-version: [3.7] + os: [ubuntu-20.04] + python-version: [3.8] runs-on: ${{ matrix.os }} steps: - name: Checkout Repo (complete) @@ -167,7 +167,7 @@ jobs: - name: Download Artifacts (ubuntu) uses: actions/download-artifact@v3 with: - name: pyinstaller-onefolder-ubuntu-18.04 + name: pyinstaller-onefolder-ubuntu-20.04 path: artifacts - name: Download Artifacts (windows) uses: actions/download-artifact@v3 @@ -200,8 +200,8 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-18.04] - python-version: [3.7] + os: [ubuntu-20.04] + python-version: [3.8] runs-on: ${{ matrix.os }} steps: - uses: actions/setup-node@v3 @@ -311,7 +311,7 @@ jobs: - name: Download Artifacts (ubuntu) uses: actions/download-artifact@v3 with: - name: pyinstaller-onefile-ubuntu-18.04 + name: pyinstaller-onefile-ubuntu-20.04 path: artifacts - name: Download Artifacts (windows) uses: actions/download-artifact@v3 @@ -366,3 +366,18 @@ jobs: --table-region $TABLE_REGION \ --version $VERSION \ --latest + notify-on-publish: + name: Notify + needs: + - publish-npm + - publish-pypi + - update-urlshortener + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Microsoft Teams Notification + uses: skitionek/notify-microsoft-teams@v1.0.8 + if: always() + with: + webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} + overwrite: '{title: `New Runway release available!`}' diff --git a/runway/module/cdk.py b/runway/module/cdk.py index e9b0d6742..c3aeba30f 100644 --- a/runway/module/cdk.py +++ b/runway/module/cdk.py @@ -41,6 +41,11 @@ class CloudDevelopmentKit(RunwayModuleNpm): """CDK Runway Module.""" + DEPRECATION_MSG = ( + "CDK Runway module support has been deprecated and " + "may be removed in the next major release." + ) + options: CloudDevelopmentKitOptions def __init__( @@ -83,6 +88,7 @@ def __init__( ) # logger needs to be created here to use the correct logger self.logger = PrefixAdaptor(self.name, LOGGER) + LOGGER.warning("%s:%s", self.name, self.DEPRECATION_MSG) @cached_property def cli_args(self) -> List[str]: diff --git a/runway/module/k8s.py b/runway/module/k8s.py index d40c4edcb..9af23fd81 100644 --- a/runway/module/k8s.py +++ b/runway/module/k8s.py @@ -51,6 +51,11 @@ class K8s(RunwayModule): """Kubectl Runway Module.""" + DEPRECATION_MSG = ( + "Kubectl Runway module support has been deprecated and " + "may be removed in the next major release." + ) + options: K8sOptions def __init__( @@ -95,6 +100,7 @@ def __init__( ) # logger needs to be created here to use the correct logger self.logger = PrefixAdaptor(self.name, LOGGER) + LOGGER.warning("%s:%s", self.name, self.DEPRECATION_MSG) @cached_property def kbenv(self) -> KBEnvManager: diff --git a/runway/module/staticsite/handler.py b/runway/module/staticsite/handler.py index 7b869ccda..da6379b11 100644 --- a/runway/module/staticsite/handler.py +++ b/runway/module/staticsite/handler.py @@ -31,6 +31,11 @@ class StaticSite(RunwayModule): """Static website Runway Module.""" + DEPRECATION_MSG = ( + "Static website Runway module support has been deprecated and " + "may be removed in the next major release." + ) + options: StaticSiteOptions parameters: RunwayStaticSiteModuleParametersDataModel @@ -77,6 +82,7 @@ def __init__( ) # logger needs to be created here to use the correct logger self.logger = PrefixAdaptor(self.name, LOGGER) + LOGGER.warning("%s:%s", self.name, self.DEPRECATION_MSG) self._ensure_valid_environment_config() self._ensure_cloudfront_with_auth_at_edge() self._ensure_correct_region_with_auth_at_edge()