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

ASTRO_DB_APP_TOKEN environment variable not being recognized for Astro DB libSQL #11890

Closed
1 task
edburtnieks opened this issue Aug 31, 2024 · 2 comments · Fixed by #11894
Closed
1 task

ASTRO_DB_APP_TOKEN environment variable not being recognized for Astro DB libSQL #11890

edburtnieks opened this issue Aug 31, 2024 · 2 comments · Fixed by #11894
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: db

Comments

@edburtnieks
Copy link

edburtnieks commented Aug 31, 2024

Astro Info

Astro                    v4.15.1
Node                     v22.5.1
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             astro:db
                         @astrojs/db/file-url

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Hi, couldn't figure out why ASTRO_DB_APP_TOKEN environment variable as per documentation wasn't being recognized, and everytime I used astro build --remote/astro db push --remote I was prompted to link my project to Astro Studio

However, replacing ASTRO_DB_APP_TOKEN with ASTRO_STUDIO_APP_TOKEN worked like a charm and as expected

So my .env file looks like this

ASTRO_DB_REMOTE_URL=libsql://...
ASTRO_STUDIO_APP_TOKEN=...

Related PR - #11385


By the way, huge thanks for rolling out this feature, love this 🙏

What's the expected result?

The ASTRO_DB_APP_TOKEN environment variable is being recognized and doesn't prompt you to link your project in Astro Studio

ASTRO_DB_REMOTE_URL=libsql://...
ASTRO_DB_APP_TOKEN=...

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-jm88qd

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Aug 31, 2024
@edburtnieks
Copy link
Author

edburtnieks commented Aug 31, 2024

Update:

I needed the ASTRO_STUDIO_APP_TOKEN only locally

When tried to deploy on Vercel, needed to add both ASTRO_STUDIO_APP_TOKEN and ASTRO_DB_APP_TOKEN. Without ASTRO_DB_APP_TOKEN actually didn't work

@Fryuni
Copy link
Member

Fryuni commented Aug 31, 2024

Thanks for the report. Indeed my projects I used during development had the token on both env vars locally, initially this new feature used the existing ASTRO_STUDIO_APP_TOKEN variable.

I'll send a PR in a bit fixing it

@Fryuni Fryuni added - P4: important Violate documented behavior or significantly impacts performance (priority) pkg: db and removed needs triage Issue needs to be triaged labels Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: db
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants