dlt icon indicating copy to clipboard operation
dlt copied to clipboard

Added deploy with modal.

Open dat-a-man opened this issue 1 year ago • 8 comments

Description

Added deploy with modal

dat-a-man avatar Sep 13 '24 11:09 dat-a-man

Deploy Preview for dlt-hub-docs ready!

Name Link
Latest commit c97e935ca114a66ab3986cb9911ffe84a09df487
Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/672b9b743cba580008a2eca2
Deploy Preview https://deploy-preview-1805--dlt-hub-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Sep 13 '24 11:09 netlify[bot]

@burnash - ready for review. Thanks!

dat-a-man avatar Sep 30 '24 07:09 dat-a-man

the more i think about it actually, maybe it makes sense to write a really pared down example for this space that is runnable end-to-end for the user (e.g. using duckdb) and linking out to our blog post for a "real-world example". happy to help contribute a pared down example

kning avatar Sep 30 '24 18:09 kning

here's a simpler gist that should just work if you run modal run dlt_example.py and will deploy a daily scheduled job with modal deploy dlt_example.py.

i think this section will have better engagement if the user can simply copy-paste a script and it works immediately; we can adapt this to your docs style and perhaps just link out to the original blog post as a more detailed, real-world example of dlt (i also need to update that one to be compatible with 1.1.0).

lmk what you think! also happy to chat i know ive shared a lot of info here haha.

https://gist.github.com/kning/6a2af9e08ebaad0e486968f98c1939be

kning avatar Sep 30 '24 21:09 kning

@kning hey! Thanks for your thoughts here, your idea with testing is great! We actually practice this, you can find here some getting started snippets that we test on every CI/CD run. We can also add your gist to our testing process, we just need to understand what we call a successful run, we can run this command modal run dlt_example.py on every CI/CD run and stop it immediately if it ran without errors, is that enough? or should it be deployed as well?

AstrakhantsevaAA avatar Oct 03 '24 11:10 AstrakhantsevaAA

running modal run dlt_example.py should be sufficient, but you'd also need to set up a Modal account and set the MODAL_TOKEN_ID and MODAL_TOKEN_SECRET variables in your CI environment.

also checked out the snippets, are those ever surfaced in the docs? i guess i'd expect it to be synced with the snippets on this page but it looks different.

kning avatar Oct 03 '24 14:10 kning

@kning

MODAL_TOKEN_ID and MODAL_TOKEN_SECRET variables in your CI environment.

It shouldn't be a problem.

i guess i'd expect it to be synced with the snippets on this page but it looks different.

We changed our docs significantly recently, and getting started page was removed and replaced with intro. Relevant example you can find here: doc and snippets

AstrakhantsevaAA avatar Oct 03 '24 15:10 AstrakhantsevaAA

i see. how do you think we should move forward then with the modal snippet? ideally i'd like to see a "deploy with modal" page that explains how to create a modal account and the runnable code snippet (which should also regularly be run somehow to ensure that it's correct) and finally a link to the blog post for a "real-world" example. but i guess from what i understand it seems that code in the docs page and CI/CD snippets are managed separately?

kning avatar Oct 03 '24 15:10 kning

@dat-a-man will do that, he will create a snippet file with example and use tags to ingest this snippet into doc page, here we will run modal command to test it

AstrakhantsevaAA avatar Oct 08 '24 14:10 AstrakhantsevaAA

amazing looks way cleaner now, thanks!

kning avatar Oct 09 '24 00:10 kning

left a few tiny comments, but any other hold up here? would love to get this published soon!

kning avatar Oct 21 '24 20:10 kning

@kning hey Kenny! Everything is ready to be merged, we just need modal token for tests, is it possible to run it without token? does this token expire? how often we should refresh token? can we do that automatically? Can you help us with it?

In current implementation we only run snippet as a python script via pytest, I added simple test inspired by this example

AstrakhantsevaAA avatar Oct 22 '24 12:10 AstrakhantsevaAA

you need to create a modal account / token for yourself, we actually have a guide for this: https://modal.com/docs/guide/continuous-deployment. fwiw, i wouldn't consider that blocking if it's too much work for now i know you've been working hard on this for a long time and i can always help you figure out the ci / cd modal part later.

kning avatar Oct 22 '24 17:10 kning

@kning let's move this conversation in our slack :D I contact you there, I think it will help us to solve this problem faster

AstrakhantsevaAA avatar Oct 23 '24 12:10 AstrakhantsevaAA

woohoo! i don't see it on the docs website yet though is there a separate deploy process?

kning avatar Nov 07 '24 14:11 kning

@kning You can see it in devel version here (it will be publish in main documentation with next release) https://dlthub.com/docs/devel/walkthroughs/deploy-a-pipeline/deploy-with-modal

AstrakhantsevaAA avatar Nov 07 '24 14:11 AstrakhantsevaAA

great! reading this there are some parts of the modal API (e.g. proxy, etc.) that have updated, i can go ahead and open a pr later.

kning avatar Nov 07 '24 16:11 kning