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

Make the description dependent on the deployment environment #153

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Akecel
Copy link

@Akecel Akecel commented Nov 5, 2024

I recently noticed that in my AWS Lambda Console, the descriptions of my Lambda functions deployed by Sidecar didn't have the right description.

For example, I had : MyAPP [testing]: Sidecar function 'LambdaFunction' for a function deployed for the production environment.

After investigating, I realised that the function generating this description was based on the current execution environment at the time the deploy command was used, and not on the potential environment defined with --env= in cases where they are different.

If we take the case of a final CI/CD Pipeline where we execute a final set of tests before deploying a potential new version of our Lambda Functions and finally deploying our code (with a vapor command or other script), we end up with a description corresponding to the test environment, even if the command was : php artisan sidecar deploy --env=production

To counter this problem :

  • Updated description function to make it use Sidecar::getEnvironment() instead of config('app.env')
    Allows the right environment to be used every time.

  • Modified the documentation to add a reference to possible customization of the description
    In addition to the name and prefix already present in the doc

Thank you for this package 🚀

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.

1 participant