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

Example All-In-AWS-Infrastructure-SEP/ts broken #1009

Open
mainframenzo opened this issue Mar 23, 2023 · 2 comments
Open

Example All-In-AWS-Infrastructure-SEP/ts broken #1009

mainframenzo opened this issue Mar 23, 2023 · 2 comments
Labels
bug This issue is a bug. documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.

Comments

@mainframenzo
Copy link

mainframenzo commented Mar 23, 2023

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:

  1. yarn stage step is broken, and it errors on both mainline and release branches with Cannot find module './stage-deadline.js'
  2. ./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 skip yarn 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 Report

@mainframenzo mainframenzo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 23, 2023
@jusiskin
Copy link
Contributor

jusiskin commented Mar 27, 2023

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.

@jusiskin jusiskin added the documentation This is a problem with documentation. label Mar 27, 2023
@jusiskin
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants