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

Create relaycode-milestone_1 #1244

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Create relaycode-milestone_1 #1244

wants to merge 5 commits into from

Conversation

itsyogesh
Copy link

Created the milestone delivery report for Relaycode first milestone

Milestone Delivery Checklist

  • The milestone-delivery-template.md has been copied and updated.
  • This pull request is being made by the same account as the accepted application.
  • I have disclosed any and all sources of reused code in the submitted repositories and have done my due diligence to meet its license requirements.
  • In case of acceptance, invoices must be submitted and payments will be transferred to the Polkadot AssetHub and/or fiat account provided in the application.
  • The delivery is according to the Guidelines for Milestone Deliverables.

Link to the application pull request: w3f/Grants-Program#2410 < please fill this in with the PR number of your application.

Created the milestone delivery report for Relaycode first milestone
@keeganquigley keeganquigley self-assigned this Feb 3, 2025
@keeganquigley keeganquigley changed the title Create relaycode-milestone_1 Create relaycode-milestone_1.md Feb 7, 2025
@keeganquigley keeganquigley changed the title Create relaycode-milestone_1.md Create relaycode-milestone_1 Feb 7, 2025
Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @itsyogesh could you please rename the file to include the .md extension? That way it will get saved correctly.

@itsyogesh
Copy link
Author

Thanks @itsyogesh could you please rename the file to include the .md extension? That way it will get saved correctly.

Hey @keeganquigley thanks for pointing it out, just made the change, fixed another typo while I was at it!

@keeganquigley
Copy link
Contributor

Thanks @itsyogesh when I click the testing guide link, I get a 404 error: https://github.com/itsyogesh/relaycode/blob/master/__tests__/

Could you fix it to point to the correct test files? Thanks!

Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, could you please include instructions in the readme for installing and running the app locally, as well as with Docker? I was able to get it running with npm, but trying to build the Docker image w/ docker build -t relaycode . gives an error:

Output
docker build -t relaycode .

[+] Building 121.4s (18/21)                                                                                 docker:default
 => [internal] load build definition from Dockerfile                                                                  0.1s
 => => transferring dockerfile: 2.24kB                                                                                0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1                                             1.4s
 => docker-image://docker.io/docker/dockerfile:1@sha256:93bfd3b68c109427185cd78b4779fc82b484b0b7618e36d0f104d4d801e6  0.7s
 => => resolve docker.io/docker/dockerfile:1@sha256:93bfd3b68c109427185cd78b4779fc82b484b0b7618e36d0f104d4d801e66d25  0.0s
 => => sha256:93bfd3b68c109427185cd78b4779fc82b484b0b7618e36d0f104d4d801e66d25 8.40kB / 8.40kB                        0.0s
 => => sha256:6427b0634e7650a14afc322b71a37b4654b4471539d1f9a19cb16525a2fb2e56 850B / 850B                            0.0s
 => => sha256:6e15488ac914a453a6e13f419cde418c67927d93d6b0a0f23b5c70c8ecda3fc6 1.26kB / 1.26kB                        0.0s
 => => sha256:8a2af9a64344571e7f712dde5e52bb25729d3ea0f3208ec86dd5af836b4ef1b9 12.78MB / 12.78MB                      0.3s
 => => extracting sha256:8a2af9a64344571e7f712dde5e52bb25729d3ea0f3208ec86dd5af836b4ef1b9                             0.2s
 => [internal] load build definition from Dockerfile                                                                  0.0s
 => [internal] load metadata for docker.io/library/node:18-alpine                                                     1.4s
 => [internal] load .dockerignore                                                                                     0.0s
 => => transferring context: 126B                                                                                     0.0s
 => [base 1/1] FROM docker.io/library/node:18-alpine@sha256:974afb6cbc0314dc6502b14243b8a39fbb2d04d975e9059dd066be3e  3.1s
 => => resolve docker.io/library/node:18-alpine@sha256:974afb6cbc0314dc6502b14243b8a39fbb2d04d975e9059dd066be3e274fb  0.0s
 => => sha256:974afb6cbc0314dc6502b14243b8a39fbb2d04d975e9059dd066be3e274fbb25 7.67kB / 7.67kB                        0.0s
 => => sha256:6e804119c3884fc5782795bf0d2adc89201c63105aece8647b17a7bcebbc385e 1.72kB / 1.72kB                        0.0s
 => => sha256:dcbf7b337595be6f4d214e4eed84f230eefe0e4ac03a50380d573e289b9e5e40 6.18kB / 6.18kB                        0.0s
 => => sha256:1f3e46996e2966e4faa5846e56e76e3748b7315e2ded61476c24403d592134f0 3.64MB / 3.64MB                        0.2s
 => => sha256:37892ffbfcaa871a10f813803949d18c3015a482051d51b7e0da02525e63167c 40.01MB / 40.01MB                      0.8s
 => => sha256:5650d6de56fd0bb419872b876ac1df28f577b39573c3b72fb0d15bf426d01bc1 1.26MB / 1.26MB                        0.4s
 => => extracting sha256:1f3e46996e2966e4faa5846e56e76e3748b7315e2ded61476c24403d592134f0                             0.1s
 => => sha256:6504e29600c8d5213b52cda800370abb3d12639802d06b46b6fce368990ca771 444B / 444B                            0.4s
 => => extracting sha256:37892ffbfcaa871a10f813803949d18c3015a482051d51b7e0da02525e63167c                             1.9s
 => => extracting sha256:5650d6de56fd0bb419872b876ac1df28f577b39573c3b72fb0d15bf426d01bc1                             0.1s
 => => extracting sha256:6504e29600c8d5213b52cda800370abb3d12639802d06b46b6fce368990ca771                             0.0s
 => [internal] load build context                                                                                     0.1s
 => => transferring context: 810.05kB                                                                                 0.0s
 => [deps 1/4] RUN apk add --no-cache libc6-compat                                                                    1.0s
 => [builder 1/4] WORKDIR /app                                                                                        0.3s
 => [runner 2/6] RUN addgroup --system --gid 1001 nodejs                                                              0.3s
 => [runner 3/6] RUN adduser --system --uid 1001 nextjs                                                               0.4s
 => [deps 2/4] WORKDIR /app                                                                                           0.1s 
 => [deps 3/4] COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./                             0.2s 
 => [deps 4/4] RUN     if [ -f yarn.lock ]; then yarn --frozen-lockfile;     elif [ -f package-lock.json ]; then np  52.7s 
 => [builder 2/4] COPY --from=deps /app/node_modules ./node_modules                                                   6.3s 
 => [builder 3/4] COPY . .                                                                                            0.1s 
 => ERROR [builder 4/4] RUN     if [ -f yarn.lock ]; then yarn run build;     elif [ -f package-lock.json ]; then n  49.1s 
------                                                                                                                     
 > [builder 4/4] RUN     if [ -f yarn.lock ]; then yarn run build;     elif [ -f package-lock.json ]; then npm run build;     elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build;     else echo "Lockfile not found." && exit 1;     fi:                                                                                                                    
0.698 yarn run v1.22.22
0.741 $ next build
1.629 Attention: Next.js now collects completely anonymous telemetry regarding usage.
1.629 This information is used to shape Next.js' roadmap and prioritize features.
1.629 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
1.629 https://nextjs.org/telemetry
1.629 
1.716    Next.js 14.2.16
1.716   - Environments: .env
1.716 
1.819    Creating an optimized production build ...
33.33   Compiled successfully
33.33    Linting and checking validity of types ...
37.23 
37.23 ./app/builder/page.tsx
37.23 48:6  Warning: React Hook useEffect has missing dependencies: 'client' and 'getClient'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
37.23 
37.23 ./components/builder/extrinsic-builder.tsx
37.23 73:6  Warning: React Hook useEffect has missing dependencies: 'builderForm' and 'client'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
37.23 73:7  Warning: React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked.  react-hooks/exhaustive-deps
37.23 86:6  Warning: React Hook useEffect has missing dependencies: 'builderForm', 'client.tx', and 'onTxChange'. Either include them or remove the dependency array. If 'onTxChange' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
37.23 86:7  Warning: React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked.  react-hooks/exhaustive-deps
37.23 142:6  Warning: React Hook useEffect has a missing dependency: 'getAllTypes'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
37.23 
37.23 ./components/builder/information-pane.tsx
37.23 58:6  Warning: React Hook useEffect has a missing dependency: 'builderForm'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
37.23 58:7  Warning: React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked.  react-hooks/exhaustive-deps
37.23 71:6  Warning: React Hook useEffect has missing dependencies: 'argsHex', 'functionHex', and 'sectionHex'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
37.23 
37.23 ./components/sections/hero-section.tsx
37.23 53:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 58:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 63:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 68:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 77:19  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 
37.23 ./components/sections/testimonials.tsx
37.23 147:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 
37.23 ./components/sections/why-developers.tsx
37.23 240:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 245:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 250:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 255:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
37.23 
37.23 info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
48.94 Failed to compile.
48.94 
48.94 ./components/params/types.ts:5:30
48.94 Type error: Cannot find module '@polkadot/types/interfaces' or its corresponding type declarations.
48.94 
48.94   3 | import type { DedotClient } from "dedot";
48.94   4 | import { PolkadotApi } from "@dedot/chaintypes";
48.94 > 5 | import { PortableType } from "@polkadot/types/interfaces";
48.94     |                              ^
48.94   6 |
48.94   7 | export interface ParamInputProps {
48.94   8 |   name: string;
49.01 error Command failed with exit code 1.
49.01 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
Dockerfile:32
--------------------
  31 |     
  32 | >>> RUN \
  33 | >>>     if [ -f yarn.lock ]; then yarn run build; \
  34 | >>>     elif [ -f package-lock.json ]; then npm run build; \
  35 | >>>     elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
  36 | >>>     else echo "Lockfile not found." && exit 1; \
  37 | >>>     fi
  38 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c if [ -f yarn.lock ]; then yarn run build;     elif [ -f package-lock.json ]; then npm run build;     elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build;     else echo \"Lockfile not found.\" && exit 1;     fi" did not complete successfully: exit code: 1

@itsyogesh
Copy link
Author

itsyogesh commented Feb 7, 2025

Thanks @itsyogesh when I click the testing guide link, I get a 404 error: https://github.com/itsyogesh/relaycode/blob/master/__tests__/

Could you fix it to point to the correct test files? Thanks!

Hey @keeganquigley, fixed the url in the delivery file, you can access them here url and run them with yarn test

@itsyogesh
Copy link
Author

Additionally, could you please include instructions in the readme for installing and running the app locally, as well as with Docker? I was able to get it running with npm, but trying to build the Docker image w/ docker build -t relaycode . gives an error:

Output

I've fixed the build issue in the main repo, so the same command should work if you can pull again. The build issue was a general build issue not related to Docker, but it was causing the build the fail. Let me know if you still need me to add the docs @keeganquigley

P.S. Thank you for such quick responses 🤩

@keeganquigley
Copy link
Contributor

Thanks @itsyogesh and no problem. Thanks for the fix, it gets further now but is still failing for me:

[+] Building 127.1s (20/21)                                                                                 docker:default
 => [internal] load build definition from Dockerfile                                                                  0.0s
 => => transferring dockerfile: 2.24kB                                                                                0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1                                             0.8s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:93bfd3b68c109427185cd78b4779fc82b484b0b7618e36d0f104d  0.0s
 => [internal] load build definition from Dockerfile                                                                  0.0s
 => [internal] load metadata for docker.io/library/node:18-alpine                                                     0.8s
 => [internal] load .dockerignore                                                                                     0.0s
 => => transferring context: 126B                                                                                     0.0s
 => [internal] load build context                                                                                     0.0s
 => => transferring context: 1.04MB                                                                                   0.0s
 => [base 1/1] FROM docker.io/library/node:18-alpine@sha256:974afb6cbc0314dc6502b14243b8a39fbb2d04d975e9059dd066be3e  0.0s
 => CACHED [builder 1/4] WORKDIR /app                                                                                 0.0s
 => CACHED [runner 2/6] RUN addgroup --system --gid 1001 nodejs                                                       0.0s
 => CACHED [runner 3/6] RUN adduser --system --uid 1001 nextjs                                                        0.0s
 => CACHED [deps 1/4] RUN apk add --no-cache libc6-compat                                                             0.0s
 => CACHED [deps 2/4] WORKDIR /app                                                                                    0.0s
 => [deps 3/4] COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./                             0.2s
 => [deps 4/4] RUN     if [ -f yarn.lock ]; then yarn --frozen-lockfile;     elif [ -f package-lock.json ]; then np  51.9s
 => [builder 2/4] COPY --from=deps /app/node_modules ./node_modules                                                   8.8s 
 => [builder 3/4] COPY . .                                                                                            0.1s 
 => [builder 4/4] RUN     if [ -f yarn.lock ]; then yarn run build;     elif [ -f package-lock.json ]; then npm run  56.8s 
 => CACHED [runner 4/6] COPY --from=builder /app/public ./public                                                      0.0s 
 => ERROR [runner 5/6] COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./                             0.0s 
------                                                                                                                     
 > [runner 5/6] COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./:                                        
------                                                                                                                     
Dockerfile:54                                                                                                              
--------------------
  52 |     # Automatically leverage output traces to reduce image size
  53 |     # https://nextjs.org/docs/advanced-features/output-file-tracing
  54 | >>> COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
  55 |     COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
  56 |     
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 4b785416-72dd-423f-8121-7cae594f4729::jup92gn0sjreckd2p2pmm956y: "/app/.next/standalone": not found

I'm running Ubuntu 20.04, I'll try on Mac too to make sure the issue isn't on my end.

@itsyogesh
Copy link
Author

Thanks @itsyogesh and no problem. Thanks for the fix, it gets further now but is still failing for me:
Output

I'm running Ubuntu 20.04, I'll try on Mac too to make sure the issue isn't on my end.

Hey @keeganquigley, glad it fixed the previous issue. I've pushed a new change that should fix this new issue you encounter. Could you try pulling and running again, it should work on ubuntu too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants