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

added resource env variables in service for convox run command - fix/convox-run-resource-env-vars #3739

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

numcys
Copy link
Contributor

@numcys numcys commented Aug 16, 2024

What is the feature/fix?

Fix: Include All Resource-Specific Environment Variables in convox run Commands

We have updated the convox run command to include all resource-specific environment variables for services created by the command. Previously, only the older X_URL environment variable was included. Now, all relevant environment variables are automatically added to the ECS Task definition for the service, ensuring comprehensive access to resource credentials and configurations.

Why is this important?

This update ensures that when executing commands with convox run, all necessary environment variables are available to the service container. This update includes the following variables for each resource defined in your convox.yml:

  • X_URL=
  • X_USER=
  • X_PASS=
  • X_HOST=
  • X_PORT=
  • X_NAME=

Where X represents the name of the resource as defined in convox.yml.

Does it have a breaking change?

There are no breaking changes introduced with this fix.

How to use/test it?

  1. Update your rack to the latest version (20240829164739 or later):

    $ convox rack update -r rackName
    
  2. Run any command with convox run and verify the environment variables are present:

    $ convox run serviceName env -a appName | grep -i resouceName
    

Requirements

To use this fix, you must be on at least rack version 20240829164739.
You can check your rack's version with the command convox rack -r rackName.
Update your rack to the latest version with the command convox rack update -r rackName.

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 33.17%. Comparing base (5c54672) to head (a75776b).
Report is 1 commits behind head on master.

Files Patch % Lines
provider/aws/processes.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3739      +/-   ##
==========================================
- Coverage   33.18%   33.17%   -0.01%     
==========================================
  Files         183      183              
  Lines       20556    20559       +3     
==========================================
  Hits         6821     6821              
- Misses      12585    12588       +3     
  Partials     1150     1150              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nightfury1204 nightfury1204 merged commit b89d969 into master Aug 22, 2024
4 checks passed
@nightfury1204 nightfury1204 deleted the fix/convox-run-resource-env-vars branch August 22, 2024 18:21
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.

2 participants