aws-rfdk
aws-rfdk copied to clipboard
Example All-In-AWS-Infrastructure-SEP/ts broken
Hi folks,
The example Typescript tutorial linked here is broken for mainline branch and release branch. I expected the mainline branch to be broken based on the docs from the linked tutorial, but not the release branch.
What's wrong:
-
yarn stage
step is broken, and it errors on both mainline and release branches withCannot find module './stage-deadline.js'
-
./build.sh
step is broken, and it errors on both mainline and release branches with...LICENSE should contain exactly
. Not sure if this is because I had to skipyarn stage
.
Reproduction Steps
I found it helpful to use Docker to reproduce this. (aside: perhaps ya'll can build on this example to provide a deployment environment that works out of the box?)
Docker build command: DOCKER_BUILDKIT=1 docker build -f ./dockerfile --build-arg EXTEND="public.ecr.aws/docker/library/ubuntu:focal-20230308" -t "rfdk-deploy:latest"
Docker file (lower-cased) dockerfile
:
# This Dockerfile is responsible for defining an rfdk deployment environment.
# See: https://docs.docker.com/build/building/multi-stage/
# syntax=docker/dockerfile:1
ARG EXTEND=""
FROM ${EXTEND}
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_ENV="production"
ENV NODE_OPTIONS=--max-old-space-size=4096
ENV GENERATE_SOURCEMAP=false
RUN apt-get update --fix-missing -y
RUN apt-get install -y \
gpgv \
unzip \
git \
curl \
build-essential && \
curl --silent --location https://deb.nodesource.com/setup_14.x | bash - && \
apt-get remove -y --purge cmdtest && \
apt-get update && \
apt-get install -y nodejs && \
node -v && npm -v
RUN npm install --global yarn
# This absolutely kills Docker build even at 5GB memory allocated, not sure it is necessary?
#RUN npx lerna init
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update
RUN mkdir -p /opt/app && cd /opt/app && git clone https://github.com/aws/aws-rfdk.git -b release .
WORKDIR /opt/app/examples/deadline/All-In-AWS-Infrastructure-SEP/ts
RUN yarn install
RUN sed -i "s/10.1/10.2.0.10/g" ./package.json && cat ./package.json
# TODO replace this with our version, fails regardless of this
RUN sed -i "s/ami-0814954855da0e4c3/ami-0814954855da0e4c3/g" ./bin/config.ts && cat ./bin/config.ts
# yarn stage is broken
RUN yarn stage
This is :bug: Bug Report
Hi @mainframenzo,
Thank you for your feedback, we are aware of this problem and the root cause of the problem is 2) in the issue description. A fix was merged in #1008 and the problem should no longer exist in the mainline
branch. Once the fix has been released, the example will work again in the release
branch.
We will keep this issue open until we have confirmed that the example is working again in the release
branch.
EDIT: After re-evaluating the issue, I believe you are reporting a different problem. We will investigate further and reply here with further information.
After experimentation, I discovered that no. 1 in your bug report may be caused by missing instructions. Step 5 of the README instructs building the repository yarn monorepo workspace, which links the stage-deadline
command to become available from yarn in the example. We should reorder the instructions to instead build the workspace in the first step.
For the issue with running the example in the release
branch (2 in your bug report), please see #1008 which has been merged and is pending release.