common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
957 stars 90 forks source link

v0.20.4: registry sync regression: failed to copy aws config to tempfile for update #580

Closed nocnokneo closed 5 months ago

nocnokneo commented 6 months ago

Starting with v20.5.4 (and v0.20.5) I get "failed to copy aws config to tempfile for update":

❯ sudo tar -zxf ~/Downloads/granted_0.20.3_linux_x86_64.tar.gz -C /usr/local/bin/

❯ granted registry sync
[i] From gitlab.com:cytotronics/cyto
[i]  * branch              HEAD       -> FETCH_HEAD
[✔] Successfully synced registry cyto

❯ sudo tar -zxf ~/Downloads/granted_0.20.4_linux_x86_64.tar.gz -C /usr/local/bin/

❯ granted registry sync
[✘] failed to copy aws config to tempfile for update
shwethaumashanker commented 6 months ago

@nocnokneo Can you please check your ~/.aws/config file to see if the sync went through successfully in v0.20.3? v0.20.4 has added logic for when the registry sync fails. Can you please share what your ~/.granted/config looks like for further debugging?

nocnokneo commented 6 months ago

The sync seems to work fine with 0.20.3. The mtime of ~/.aws/config shows that the file was touched and the contents are correct and working. [granted_registry_start cyto] ... [granted_registry_end cyto] with all the expected profile configs.

This is my ~/.granted/config:

DefaultBrowser = "FIREFOX"
CustomBrowserPath = "/usr/bin/firefox"
CustomSSOBrowserPath = ""
Ordering = ""
ExportCredentialSuffix = ""

[ProfileRegistry]
  PrefixAllProfiles = false
  PrefixDuplicateProfiles = false

  [[ProfileRegistry.Registries]]
    name = "cyto"
    url = "git@gitlab.com:cytotronics/cyto.git"
    path = "infra/granted-registry"
webframp commented 6 months ago

Also seeing this for a few team members

shwethaumashanker commented 6 months ago

@nocnokneo and @webframp Can you please check if you are still seeing this issue with v0.20.6, we have added some fixes to granted registry sync

nocnokneo commented 6 months ago

Fixed with v0.20.6 for me!

nocnokneo commented 6 months ago

Unfortunately v0.20.3 continues to be the only usable release for me due to #591 regression

webframp commented 6 months ago

This issue is fixed in v0.20.6 for me, but now getting the same as @nocnokneo. Similar EKS use case as #591