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

[Bug]: sync_frequency = "0" never syncs #2147

Closed
1 task done
heftig opened this issue Jun 17, 2024 · 3 comments · Fixed by #2154
Closed
1 task done

[Bug]: sync_frequency = "0" never syncs #2147

heftig opened this issue Jun 17, 2024 · 3 comments · Fixed by #2154
Labels
bug Something isn't working

Comments

@heftig
Copy link

heftig commented Jun 17, 2024

What did you expect to happen?

Atuin syncs after every command.

What happened?

Atuin never syncs. A manual sync using atuin sync still works, as does using "1s" as the frequency.

I suspect this broke in 18.3.0.

Atuin doctor output

{
  "atuin": {
    "version": "18.3.0",
    "sync": {
      "cloud": false,
      "records": true,
      "auto_sync": true,
      "last_sync": "2024-06-17 6:41:34.445861124 +00:00:00"
    },
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Arch Linux",
    "arch": "x86_64",
    "version": "rolling",
    "disks": [
      {
        "name": "/dev/mapper/cornicle-root",
        "filesystem": "btrfs"
      },
      {
        "name": "/dev/nvme0n1p1",
        "filesystem": "vfat"
      }
    ]
  }
}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@heftig heftig added the bug Something isn't working label Jun 17, 2024
@ellie
Copy link
Member

ellie commented Jun 17, 2024

Could you also share your config file please?

@heftig
Copy link
Author

heftig commented Jun 17, 2024

update_check = false
sync_address = "http://<redacted>"
sync_frequency = "0"
style = "compact"
inline_height = 15
scroll_context_lines = 2
secrets_filter = false
enter_accept = false
[stats]
[keys]
[sync]
records = true
[preview]
[daemon]

@ellie
Copy link
Member

ellie commented Jun 17, 2024

The regression was introduced here: #2074

Error:

Error: failed to check sync: time unit needed, for example 0sec or 0ms

Location:
    crates/atuin-client/src/settings.rs:561:27

Settings

sync_frequency = "0s"

should resolve it

I'll push a patch to make the unitless version work, though really consistent units make sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants