Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

adds render services env to show environmental variables#60

Closed
Eunoia wants to merge 0 commit intorender-oss:mainfrom
Eunoia:eunoia/env-var-command
Closed

adds render services env to show environmental variables#60
Eunoia wants to merge 0 commit intorender-oss:mainfrom
Eunoia:eunoia/env-var-command

Conversation

@Eunoia
Copy link
Copy Markdown

@Eunoia Eunoia commented Jun 7, 2023

First time user, first time pull request opener.

Was checking out render, and I'm very pleased with how easier it was to get a new rails app up and running.

Part of my workflow is copying data from my local postgresql database to the production database using using pgsync. To avoid committing my DATABASE_URL in a config file, I was hoping to use a command line tool to pull the url from the app, like in eb printenv, or heroku config. Seeing none, I added this to the render-cli project.

Other people are interested in this too, AleksaButterfly and Robby Helms have asked about this feature.

The interface isn't the same as heroku config, but this is better than the current solution. I'm happy to reimplement heroku config if that's the requirement.

Demo

$ deno task run services env --id srv-<redacted>                                                                                                                 
Task run deno run --unstable --allow-read --allow-net --allow-run --allow-write --allow-env -- entry-point.ts "services" "env" "--id" "srv-<redacted>"
key              value
RAILS_MASTER_KEY <redacted>
DATABASE_URL     <redacted>

On merging

When starting on this project, I was getting this error when installing dependencies:

error: The source code is invalid, as it does not match the expected hash in the lock file. Specifier: https://esm.sh/v86/ajv-formats@2.1.1

I was able to fix with deno cache --lock=deps-lock.json deps.ts --lock-write, but this updated many packages, which may be bad. However, the build was able to pass, and that's pretty good. I'm not sure what the fix here is, but I'm happy to run the proper commands before this gets merged. Alternatively, feel free to edit this PR before merging it.

@Eunoia Eunoia changed the title adds render show env-vars adds render services env to show environmental variables Jun 8, 2023
@robdimarco-render robdimarco-render self-requested a review June 9, 2023 03:18
@robdimarco-render
Copy link
Copy Markdown
Contributor

This looks great! Thanks for doing it. Code looks good and I'd like to get it in.

I just pushed up #61 to fix the dependencies issue. Once that is merged, maybe we can modify this to just have the necessary JS changes to add the feature (I'd like to keep the PRs distinct).

@Eunoia Eunoia closed this Jun 9, 2023
@Eunoia Eunoia force-pushed the eunoia/env-var-command branch from a0899ba to 7ae178b Compare June 9, 2023 14:36
@JaredShay
Copy link
Copy Markdown

Was this work ever merged into the main branch? I'm also interested in the functionality it adds

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants