Skip to content

Commit

Permalink
Maintenance/deprecation notices and maintenance (#1878)
Browse files Browse the repository at this point in the history
* added module deprecation notices

* updated dockerfile and version bumps

* version bumps

* update publish on release to notify
  • Loading branch information
mbordash2 committed May 2, 2023
1 parent c1e22e3 commit afaffd7
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 20 deletions.
10 changes: 5 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}

Expand All @@ -13,17 +13,17 @@ 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


# 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
Expand All @@ -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
4 changes: 2 additions & 2 deletions .github/scripts/cicd/build_pyinstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-push-pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
35 changes: 25 additions & 10 deletions .github/workflows/publish-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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!`}'
6 changes: 6 additions & 0 deletions runway/module/cdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down Expand Up @@ -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]:
Expand Down
6 changes: 6 additions & 0 deletions runway/module/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions runway/module/staticsite/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit afaffd7

Please sign in to comment.