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

Refactor dns flows and workers #349

Merged
merged 1 commit into from
Mar 17, 2023
Merged

Conversation

Genne23v
Copy link
Contributor

@Genne23v Genne23v commented Mar 15, 2023

Close #315
Close #333

  • Split DNS module into two phases (DB and DNS)
  • Specify type to each flow, worker and job
  • Change name to subdomain or fqdn to distinguish

How to test

Currently integration is only set up in /dev route. You don't need any environment setup to test.

I'm not sure how DNS handling should be initiated after DB update (same frontend call or background job).
@dadolhay This update requires DB table ID in addDnsRequest call in your function. Please let me know if you have any concern with this approach.

@Genne23v Genne23v requested review from a user and humphd March 15, 2023 02:22
@Genne23v Genne23v self-assigned this Mar 15, 2023
@Genne23v Genne23v added this to the Milestone 0.6 milestone Mar 15, 2023
@humphd
Copy link
Contributor

humphd commented Mar 15, 2023

@Genne23v it would have been better to separate the new functionality you've added from the refactoring. Is there any way to split this PR into smaller PRs?

If not, I'll review it as is. But this isn't ideal.

@Genne23v
Copy link
Contributor Author

I can separate. I will push an update soon.

@Genne23v Genne23v force-pushed the issue-315 branch 3 times, most recently from 9d1ad06 to 6cdfbac Compare March 15, 2023 14:02
@Genne23v
Copy link
Contributor Author

@humphd I have removed new functionalities although they are very small. I would appreciate your review.

@humphd
Copy link
Contributor

humphd commented Mar 15, 2023

Can you rebase and fix CI before I review?

@Genne23v
Copy link
Contributor Author

Can you rebase and fix CI before I review?

Let me connect with frontend that is just merged.

@Genne23v Genne23v force-pushed the issue-315 branch 2 times, most recently from 8ca7ec2 to 09cd66e Compare March 15, 2023 15:18
@Genne23v
Copy link
Contributor Author

@humphd @dadolhay I connected DNS module with frontend. It's functional, but it needs more backend error validation and display the error somewhere in frontend. Let me know if anything needs to be added.

app/lib/record-db.server.ts Outdated Show resolved Hide resolved
app/queues/dns/add-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/add-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/update-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/workers/dns-record-worker.server.ts Outdated Show resolved Hide resolved
app/queues/dns/workers/poll-dns-status-worker.server.ts Outdated Show resolved Hide resolved
app/queues/dns/workers/sync-db-status-worker.server.ts Outdated Show resolved Hide resolved
app/routes/__index/domains/new.tsx Outdated Show resolved Hide resolved
app/routes/dev.tsx Outdated Show resolved Hide resolved
@Genne23v Genne23v requested a review from a user March 16, 2023 21:53
@Genne23v
Copy link
Contributor Author

@dadolhay @humphd I updated the PR. I would appreciate another round of review!

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've made an initial set of comments. Looking good.

app/models/record.server.ts Outdated Show resolved Hide resolved
app/models/record.server.ts Outdated Show resolved Hide resolved
app/queues/dns/add-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/add-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/delete-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/workers/poll-dns-status-worker.server.ts Outdated Show resolved Hide resolved
app/routes/__index/domains/new.tsx Show resolved Hide resolved
app/queues/dns/update-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/update-record-flow.server.ts Outdated Show resolved Hide resolved
app/models/record.server.ts Outdated Show resolved Hide resolved
@Genne23v Genne23v requested a review from humphd March 17, 2023 02:24
app/queues/dns/add-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/add-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/delete-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/update-record-flow.server.ts Outdated Show resolved Hide resolved
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.

Two small things. This is looking so much better, great work.

app/queues/dns/add-record-flow.server.ts Outdated Show resolved Hide resolved
app/queues/dns/update-record-flow.server.ts Show resolved Hide resolved
app/queues/dns/workers/poll-dns-status-worker.server.ts Outdated Show resolved Hide resolved
@Genne23v Genne23v merged commit ed332d5 into DevelopingSpace:main Mar 17, 2023
@humphd
Copy link
Contributor

humphd commented Mar 17, 2023

Only took 2 days, not bad!

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.

DNS flow refactors Break DNS update into two phases
2 participants