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

[Docs] Fix "Where does redwood load my environment variables?" code & link #11882

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Philzen
Copy link
Contributor

@Philzen Philzen commented Jan 6, 2025

This is a work in progress.

I was researching the docs to find out how to set up a dedicated .env.test for a prisma test environment on our CI and found the link in that section linking to outdated code.

Only by looking at the code i discovered the --load-env-files option – i shall add a little section on this if it enables what i hope it does.

@Philzen Philzen marked this pull request as draft January 6, 2025 22:12
@Philzen
Copy link
Contributor Author

Philzen commented Jan 6, 2025

@Tobbe i remember from a doc fix i contributed a long time ago that the team back then decided against using permalinks (which i still think would have been the better option, b/c in many cases the versioned docs simply fall apart over time, rather than staying at least consistent with the state they were at the time of writing).

I am fine with fixing all the past versioned docs as well, and would suggest to tether them to the tag – as demonstrated in this fix commit for the v8.4 docs. Not as rigorous as a permalink, but even more descriptive / easier to navigate, but most importantly: at least they stay functional over time.

Would you be OK with this?

@Tobbe
Copy link
Member

Tobbe commented Jan 7, 2025

i remember from a doc fix i contributed a long time ago that the team back then decided against using permalinks

Yes. We wanted to find a better (i.e. automated) way of handling this. But never got around to it. I agree linking to the tag like you did here is better now.

You don't have to go back and update older docs unless you want to. We sometimes do, but generally don't.

@Tobbe
Copy link
Member

Tobbe commented Jan 7, 2025

BTW, here's the PR that introduced the flag you found in the code: #9961

@Tobbe Tobbe added the release:docs This PR only updates docs label Jan 7, 2025
@Tobbe Tobbe added this to the next-release-patch milestone Jan 7, 2025
@Tobbe Tobbe added the changesets-ok Override the changesets check label Jan 7, 2025
@Philzen
Copy link
Contributor Author

Philzen commented Jan 7, 2025

We wanted to find a better (i.e. automated) way of handling this.

One idea i had floating around in my mind ever since was to check the docs for URLs that give a 404 as part of the CI to identify those that have vanished asap.

Doesn't solve the general question of how to keep the links stable in the first place, but at least would give us early notice when something breaks.

@Tobbe
Copy link
Member

Tobbe commented Jan 7, 2025

Doesn't solve the general question of how to keep the links stable in the first place, but at least would give us early notice when something breaks.

And, crucially, doesn't sound too difficult to implement!

@Philzen
Copy link
Contributor Author

Philzen commented Jan 7, 2025

And, crucially, doesn't sound too difficult to implement!

I made a little RFC writeup so we can follow this up when there is time for it: #11886

@Philzen
Copy link
Contributor Author

Philzen commented Jan 7, 2025

@Tobbe i've now added a doc section for --load-env-files, kindly review at your discretion. If you have any comments, i will gladly incorporate them and then copy the updates over to canary (and maybe a few other versions).

Needs #11885 to be merged in order to work as expected.

@Philzen Philzen force-pushed the docs/fix-env-code-reference-and-improve-doc branch from 481d368 to 01127b4 Compare January 7, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changesets-ok Override the changesets check release:docs This PR only updates docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants