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

feat: Queue worker for order creation #255

Merged
3 commits merged into from Feb 23, 2023
Merged

feat: Queue worker for order creation #255

3 commits merged into from Feb 23, 2023

Conversation

ghost
Copy link

@ghost ghost commented Feb 21, 2023

  • Moves directory url to ENV
  • Alters the Let's encrypt library to not always reload challengegs, we only need that when the order is created
  • Alters Prisma schema (+ seed) to comply with our needs (modified Certificate from one-to-one => one-to-many because the foreign key constraint makes testing impossible otherwise)
  • Updates FE to match new db schema
  • Updates related models to better match our needs
  • Implements worker to handle certificate creation flow

Closes #168

@ghost ghost requested a review from humphd February 21, 2023 19:42
@Genne23v Genne23v assigned ghost Feb 22, 2023
@humphd humphd requested a review from cychu42 February 22, 2023 18:05
Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

I was able to run this locally, and the steps I took where:

npx prisma db push --force-reset
npm run db:seed

It might be good to file an issue to add a db:reset script to package.json for the future. I didn't know about being able to do this.

After the db was setup, I went to http://localhost:8080/dev and clicked Request Certificate, and the server logs show the flow happening.

I think this is looking good. Made a few comments/questions.

prisma/schema.prisma Show resolved Hide resolved
prisma/schema.prisma Show resolved Hide resolved
app/components/certificate/description.tsx Show resolved Hide resolved
app/lib/lets-encrypt.server.ts Show resolved Hide resolved
app/lib/lets-encrypt.server.ts Show resolved Hide resolved
app/lib/lets-encrypt.server.ts Show resolved Hide resolved
app/models/certificate.server.ts Show resolved Hide resolved
app/models/certificate.server.ts Show resolved Hide resolved
app/models/challenge.server.ts Show resolved Hide resolved
logger.info(`Adding challenge to DNS`, { domain, challengeKey });

/**
* TODO actually add challenge to DNS
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be cool to connect this to @Genne23v's code soon. It would be good to get you two to start thinking about how we're going to connect the various flows that you're building together.

@SerpentBytes SerpentBytes added this to the Milestone 0.4 milestone Feb 22, 2023
@ghost ghost requested review from humphd, cychu42 and Ririio February 22, 2023 21:05
Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Nice

Copy link
Contributor

@cychu42 cychu42 left a comment

Choose a reason for hiding this comment

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

LGTM. I have no further comment. Nice work!

@ghost ghost merged commit bdc8520 into DevelopingSpace:main Feb 23, 2023
Genne23v pushed a commit to Genne23v/starchart that referenced this pull request Feb 25, 2023
* feat: Queue worker for order creation

* fix: Front-end to match db schema

* fix: based on review comments
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create queue and worker for ACME order creation
5 participants