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

Var created in UI but unavailable in envkey-source #70

Open
thomasLeclaire opened this issue Jul 6, 2023 · 11 comments
Open

Var created in UI but unavailable in envkey-source #70

thomasLeclaire opened this issue Jul 6, 2023 · 11 comments

Comments

@thomasLeclaire
Copy link

Hello!
I got a really strange issue today creating some new vars.
Everything ok in the envkey UI, change commited, available on UI from others users. When I export the full env, the new variable is available.

However, on a specific env (the Development one), when checking envkey-source, the var is not available when it is available on the others one like staging or prod.

I renamed the var to "BLA", still unavailable.
I recreated an other var with the original problematic name and values : this new one is available. The problematic BLA one still unavailable, still only on the Development env.

I modify this BLA var to a different value : it's now available!
I remodify to the hypothetic problematic value : it's available..

I use the UI feature to rollback to initial value (which is yet the same) : it's unavailable again..

I know it's for sure impossible to reproduce on your side, and probably impossible to investigate, but I thought it can be interesting to say, at least if anyone has a such issue in the future!

@danenania
Copy link
Contributor

Thanks for reporting this and for all the details. What flags are you passing to envkey-source when loading in development? Are you using any of --watch / w, --cache / -c, or --mem-cache / -m?

@thomasLeclaire
Copy link
Author

I didn't use any flags.
just ENVKEY=XXX envkey-source

tried to removed the potential local .envkey folder, but not better
tried to use --force flag but not better

@danenania
Copy link
Contributor

danenania commented Jul 10, 2023

Thanks @thomasLeclaire. If you see it again, could you try running envkey-source with the --verbose flag? Our hypothesis currently is that the envkey-source requests you saw issues with were failing to hit the primary API endpoint for some reason and then failed over to an eventually consistent backup endpoint that was slow to update. The --verbose output shows whether the primary or a failover is being used, so it could help to confirm that's what is happening. While it should be a very rare scenario, it could cause results like you describe.

@thomasLeclaire
Copy link
Author

in fact I didn't removed the problematic var and so I can still observe it at this time.
and sounds I hit correctly the primary API endpoint.

using ENVKEY environment var
loaded ENVKEY
Attempting to load encrypted config from url: https://api-v2.envkey.com/fetch?fetchServiceVersion=2&envkeyIdPart=XXXX&clientName=envkey-source&clientVersion=2.4.1&clientOs=darwin&clientArch=amd64
Parsing and decrypting response...
export XXXXXXX

@adityapatadia
Copy link

We are also facing the same issue and downgrading envkey-source resolved the problem. Definitely something is wrong with new version.

@danenania
Copy link
Contributor

Hi @adityapatadia which version were you on where you saw the issue and which did you downgrade to?

@adityapatadia
Copy link

adityapatadia commented Aug 2, 2023 via email

@danenania
Copy link
Contributor

@adityapatadia Do you have any .env files either in the project root directory or a higher-level directory? There were some changes to how .env files that don't include an ENVKEY were handled in 2.4.0 - https://github.com/envkey/envkey/releases/tag/envkeysource-v2.4.0

Previously they were ignored, but now they are applied and will take precedence over EnvKey vars if set. This could potentially cause the behavior you're seeing.

@adityapatadia
Copy link

adityapatadia commented Aug 2, 2023 via email

@danenania
Copy link
Contributor

No @adityapatadia, there has been no change to how an env file with just an ENVKEY in it is handled.

@aqidd
Copy link

aqidd commented Nov 15, 2023

Encounter the same problem today. One of the env variables is not detected in production, but available in development. We're using the latest 2.4.3 version

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

No branches or pull requests

4 participants