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

envchain --list reports include dupe #34

Open
JammalGerardo opened this issue Sep 14, 2023 · 12 comments
Open

envchain --list reports include dupe #34

JammalGerardo opened this issue Sep 14, 2023 · 12 comments

Comments

@JammalGerardo
Copy link

JammalGerardo commented Sep 14, 2023

Background

I am using envchain from a while ago, but recently I am experiencing issues with the namespaces.
The AWS_ACCESS_KEY_ID , AWS_SECRET_ACCESS_KEY secrets are not getting updated on both namespaces (nonprod and prod), the problem is that when I check for the available namespaces I am seeing duplications:
Note: Namespaces 'test', 'nonprod1' and 'prod1' I set them for testing purposes.

$envchain --list                                                                                                                                               ok | 14:32:03
prod
nonprod
prod1
nonprod
prod1
prod
nonprod
nonprod1
prod
nonprod1
prod
test
prod1

Problem

I already tried a couple things:

  1. Uninstalling envchain to have a clean installation and set the namespaces again, but it keeps carrying the old and bad namespaces.

brew uninstall envchain

As well, I checked for any residual files but nothing is prompting.

brew list envchain                                           ok | 14:52:10
Error: No such keg: /usr/local/Cellar/envchain

And there is no configuration in the shell in my '.zshrc' related to envchain.

 ~  brew uninstall envchain                                                                  ok | 15:03:50

Error: No such keg: /usr/local/Cellar/envchain
 ~  brew install envchain                                                                 1 err | 15:04:01

==> Downloading https://formulae.brew.sh/api/formula.jws.json
##################################################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
##################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/envchain/manifests/1.0.1
Already downloaded: /Users/gerardojammal/Library/Caches/Homebrew/downloads/5b1f306f33edaf81010971e94a0fab349073eb178d43d3fb3d32097ae9010a96--envchain-1.0.1.bottle_manifest.json
==> Fetching envchain
==> Downloading https://ghcr.io/v2/homebrew/core/envchain/blobs/sha256:747395bd5b5f304844923251c84df54fb23e5
Already downloaded: /Users/gerardojammal/Library/Caches/Homebrew/downloads/002013d2304cbfc4311081ed3e1bef12813a2e3739ce327af5e311f6c911328c--envchain--1.0.1.ventura.bottle.tar.gz
==> Pouring envchain--1.0.1.ventura.bottle.tar.gz
🍺  /usr/local/Cellar/envchain/1.0.1: 5 files, 42.7KB
==> Running `brew cleanup envchain`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
 ~  envchain --list                                                                     ok | 5s | 15:04:12
test
prod
nonprod1
prod
nonprod1
prod
prod1
nonprod
prod1
nonprod
prod1
nonprod
prod1
prod
  1. Tried to upgrade to the latest version in order to use --unset option but seem like the version available for Homebrew is not getting the latest release that includes that option.

Any help is more than welcome =D

Thanks!

@kromiii
Copy link

kromiii commented Oct 7, 2023

I have the same issue.

@sorah
Copy link
Owner

sorah commented Oct 8, 2023

Hmm, it might be related to the recent Ventura release? Can you confirm that the issue has been started to occur after upgrade?

@kromiii
Copy link

kromiii commented Oct 8, 2023

Yes, this issue occurred after upgrading.

% brew upgrade envchain
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 3 taps (bakks/bakks, homebrew/core and homebrew/cask).
==> New Formulae
[email protected]                    python-setuptools          [email protected]
[email protected]           [email protected]
==> New Casks
devtunnel

You have 27 outdated formulae and 1 outdated cask installed.

Warning: envchain 1.0.1 already installed
[9:48:15] 
% envchain --list
personal
personal
emulation
personal

My Mac Version is Monterey, not Ventura.

% sw_vers
ProductName:	macOS
ProductVersion:	12.6.2
BuildVersion:	21G320

@sorah
Copy link
Owner

sorah commented Oct 8, 2023

Because the project is not affiliated with Homebrew so I don't want to give support for Homebrew-provided binary.

To distinguish the cause of precompiled binary, can you try reproducing the issue by brew install --build-from-source? Also, I need xcodebuild -version to investigate.

@kromiii
Copy link

kromiii commented Oct 8, 2023

Thanks for your instruction.
--build-from-source seems not to be supported for this library and the results were the same.

% brew reinstall --build-from-source envchain
Warning: building from source is not supported!
You're on your own. Failures are expected so don't create any issues, please!
==> Fetching envchain
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/a49dba6
######################################################################### 100.0%
==> Downloading https://github.com/sorah/envchain/archive/v1.0.1.tar.gz
==> Downloading from https://codeload.github.com/sorah/envchain/tar.gz/refs/tags
#=#=#                                                                          
==> Reinstalling envchain 
==> make DESTDIR=/opt/homebrew/Cellar/envchain/1.0.1 install
🍺  /opt/homebrew/Cellar/envchain/1.0.1: 5 files, 43.2KB, built in 2 seconds
==> Running `brew cleanup envchain`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
% envchain --list
personal
emulation
personal
personal

However, XCode is not installed in my laptop, and I need to upgrade OS to install XCode.
I will report the results after the upgrade.

@sorah
Copy link
Owner

sorah commented Oct 8, 2023

seems not to be supported for this library

The warning message says Homebrew does not provide support for non-prebuilt binaries, not build-from-source option is not supported for the formulae

@sorah
Copy link
Owner

sorah commented Oct 8, 2023

However, XCode is not installed in my laptop, and I need to upgrade OS to install XCode.

xcodebuild should be available if you have CLI tools installed (you should have as you have Homebrew), xcodebuild -version should report version information - isn't it available?

@kromiii
Copy link

kromiii commented Oct 8, 2023

Thank you for the comments. Finannly, I could check the xcodebuild version.

% xcodebuild -version
Xcode 15.0
Build version 15A240d

Plus, I noticed that the namespace duplication occurs randomly even if I used the same command; I could see no duplicate in the first try, but duplicate appeared in the second try.

[23:00:02] ~
% envchain --list
emulation
personal
[23:00:03] ~
% envchain --list
personal
emulation
personal

As I upgraded to the Mac OS version to 14.0, this may be caused by the new OS specifications.

@kromiii
Copy link

kromiii commented Oct 8, 2023

Finally, I tried the installation from the source code.
https://github.com/sorah/envchain#from-source

It resolved my problem completely. Everything seems to work fine.

% envchain --list
emulation
personal
[23:15:47] ~
% envchain --list
emulation
personal

@sorah
Copy link
Owner

sorah commented Oct 11, 2023

@JammalGerardo @kromiii I think this is an issue on Homebrew prebuilt binary, please report to Homebrew if you'd want to keep using Homebrew for envchain: https://docs.brew.sh/Troubleshooting

@sorah sorah changed the title Problem with envchain namespaces envchain --list reports include dupe (maybe Homebrew prebuilt binary problem) Oct 11, 2023
@sorah sorah changed the title envchain --list reports include dupe (maybe Homebrew prebuilt binary problem) envchain --list reports include dupe Oct 11, 2023
@sorah
Copy link
Owner

sorah commented Oct 11, 2023

oops, appearently this is a dupe of #24 - I'll proceed to release the new version 😫 sorry

@kromiii
Copy link

kromiii commented Oct 13, 2023

Oh, I didn't notice. Thank you for your resolving the issue.

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

3 participants