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

ODHack: Fix Node Workflow Build Issue #160

Open
Julian-dev28 opened this issue Jul 2, 2024 · 9 comments
Open

ODHack: Fix Node Workflow Build Issue #160

Julian-dev28 opened this issue Jul 2, 2024 · 9 comments
Assignees
Labels
good first issue Good for newcomers OD Hack Bounties for OnlyDust

Comments

@Julian-dev28
Copy link
Contributor

Please add PRs to the update-P21 branch

Title:

Description:
Resolve the build issue in the Node workflow where the next build command fails due to a type error in contracts.ts during a workflow check in the following pull request: #154

Error Log:

Failed to compile.

./shared/contracts.ts:8:25
Type error: Property 'testnet' does not exist on type '{ readonly futurenet: { readonly networkPassphrase: "Test SDF Future Network ; October 2022"; readonly contractId: "CAU23MVDEW7VMB3AXC5PL5GZO3HBYZPEIP2P46X4T3AIC4Y7FXYZWES5"; }; }'.

6 |
7 | export const abundance = new Abundance.Client({

8 | ...Abundance.networks.testnet,
| ^
9 | rpcUrl: rpcUrl,
10 | allowHttp: true,
11 |
Error: Process completed with exit code 1.

Tasks:

  1. Review Current Implementation:

    • Review the shared/contracts.ts file to identify the source of the type error.
    • Verify the available networks in the Abundance client.
  2. Update Network Configuration:

    • Correct the network configuration to use the appropriate network available in the Abundance client.
    • Ensure the testnet network configuration is correctly defined or replace it with an available network.
  3. Configure Build Caching:

    • Configure build caching for Next.js to improve build times and provide faster rebuilds.
    • Follow the guidelines in the Next.js documentation for setting up build caching.
  4. Test the Build:

    • Run npm run build to ensure the build completes successfully without errors.
    • Verify that the application runs correctly after the build.
    • Create a PR to test the workflow on Github

Expected Outcome:

  • The type error in shared/contracts.ts is resolved.
  • The build completes successfully without errors.
  • The application runs correctly post-build.
  • Improved build times with build caching configured.

Why This Is Important:
Fixing this build issue is crucial to ensure the continuous integration and deployment pipeline functions correctly, improving development efficiency and reliability.

@kamalbuilds
Copy link

Hi Julian , looking to pick this up as this is crucial to ensure the CI , CD pipeline functions correctly,

@Julian-dev28 Julian-dev28 added the good first issue Good for newcomers label Jul 18, 2024
@Julian-dev28 Julian-dev28 added OD Hack Bounties for OnlyDust and removed LambdaHackWeek labels Jul 26, 2024
@Julian-dev28 Julian-dev28 changed the title LambdaHackWeek: Fix Node Workflow Build Issue ODHack: Fix Node Workflow Build Issue Jul 26, 2024
@fishseabowl
Copy link

fishseabowl commented Jul 29, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

@Julian-dev28 Can I take on this issue? I have contributed to several open source projects focused on CI/CD. Thanks.

How I plan on tackling this issue

I will follow your task to identify and fix the issue.

Copy link

onlydustapp bot commented Jul 29, 2024

Hey @fishseabowl!
Thanks for showing interest.
We've created an application for you to contribute to Soroban Example Dapp.
Go check it out on OnlyDust!

@zarah-s
Copy link

zarah-s commented Jul 29, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

With my strong background in Rust, Solidity and JavaScript, I can apply my expertise in solving this issue

@Ugo-X
Copy link

Ugo-X commented Jul 29, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello Project Lead! I'm Ugo, a fullstack (js,React,Node,Next.js,Three.js) developer with a strong track record in OD hack projects. I've been actively involved since Edition 1, contributing to various initiatives, and I'm thrilled to be part of Edition 6!
Having used OnlyDust extensively (see my profile: https://app.onlydust.com/u/Ugo-X)), I'm confident in my ability to tackle new challenges within this edition.
I'm eager to leverage my skills and experience to contribute effectively.

i’d be sure to follow the instructions as given to find the build error and solve this issue

@lindsaymoralesb
Copy link

lindsaymoralesb commented Jul 29, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi! My name is Lindsay, and I'm a Software Engineer based in Costa Rica. I'm part of Dojo Coding community, and thanks to that I've already successfully contributed to the last 4 ODHacks in various projects, feel free to check my profile and contributions.
I've been working over the past 4.5 years as a full stack developer, specializing myself in frontend development. I've successfully integrated APis, developed new features, optmize projects, etc with the most known/used FE frameworks such as React, Next, Vue, and Angular. All this experience plus some courses I've taken had helped me master both javascript and typescript languages.
For the past months I've been digging deep into blockchain technologies, starting with mastering rust and cairo on bootcamps and self-studying.

How I plan on tackling this issue

The given tasks give an excellent approach on how to tackle things. I would:

  1. Research on the available networks for Abundance.
  2. Dive deep into the contract code to spot the bug.
  3. Test the build to make sure the issue was solved.
  4. After the issue is already fixed, I would start implemented the caching configuration for Next.

@ScottyDavies
Copy link

I am applying to this issue via OnlyDust platform.
Review Current Implementation:
I would review the shared/contracts.ts file to understand the source of the type error.
I would verify the available networks in the Abundance client and check if the testnet property is actually available.
Update Network Configuration:
Based on the available networks in the Abundance client, I would update the network configuration in the shared/contracts.ts file to use the correct network.
If the testnet network is not available, I would replace it with an appropriate network that is available.
Configure Build Caching:
I would follow the Next.js documentation to set up build caching for the project.
This would involve adding the necessary configuration to the next.config.js file and potentially modifying the GitHub Actions workflow to leverage the cached build artifacts.
Test the Build:
I would run npm run build to ensure the build completes successfully without any errors.
I would also verify that the application runs correctly after the build.
Create a PR to Test the Workflow on GitHub:
After making the necessary changes, I would create a new pull request to the update-P21 branch and test the GitHub Actions workflow.
I would monitor the workflow run and ensure that the build completes successfully without any errors.
Verify the Application:
I would test the application locally to ensure that it is functioning correctly after the updates.
I would also test the application in the production-like environment to ensure that it works as expected.
Document the Changes:
I would document the changes made in the pull request, including the rationale behind the changes and any relevant information for future reference.

Copy link

onlydustapp bot commented Jul 30, 2024

Hi @ScottyDavies!
Maintainers during the ODHack #6.0 will be tracking applications via OnlyDust.
Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

@Ugo-X
Copy link

Ugo-X commented Aug 1, 2024

I visited the pull request #154 and went through the workflow checks for the failed Job, identified the problem and fixed it. but it was not the same build error as provided in the issue description that i saw there.

Please do take a look at the PR so we can know what next to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers OD Hack Bounties for OnlyDust
Projects
None yet
Development

No branches or pull requests

7 participants