Skip to content

feat: dynamic config#80

Merged
reneca merged 3 commits into
mainfrom
config
Jul 16, 2026
Merged

feat: dynamic config#80
reneca merged 3 commits into
mainfrom
config

Conversation

@reneca

@reneca reneca commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

New release with dynamic config reloading.
It'll be useful to not implement any type of remote command.
It replace what it was sketch before and imply a release.

reneca added 2 commits June 27, 2026 08:06
Signed-off-by: Jeremy HERGAULT <jeremy@hergault.fr>
Signed-off-by: Jeremy HERGAULT <jeremy@hergault.fr>
@reneca reneca requested review from Timmy80 and oschijns June 27, 2026 16:50
@reneca reneca self-assigned this Jun 27, 2026
@reneca reneca added the enhancement New feature or request label Jun 27, 2026
Signed-off-by: Jeremy HERGAULT <jeremy@hergault.fr>
@oschijns

Copy link
Copy Markdown
Contributor

When creating a ProSA from scratch, the Cargo.toml still uses previous version.

$ cargo prosa --version
cargo-prosa 0.5.0
[package]
name = "my-prosa2"
version = "0.1.0"
edition = "2024"

[dependencies]
clap = "4.6.1"
config = { version = "0.15.25", features = ["toml", "yaml", "json", "convert-case"] }
log = "0.4.33"
prosa = "0.4.3"
prosa-utils = "0.4.3"
serde = "1.0.228"
tokio = { version = "1.52.3", features = ["macros", "rt", "rt-multi-thread"] }

[build-dependencies]
cargo-prosa = "0.4.2"
toml = "1.1.3"

@oschijns

Copy link
Copy Markdown
Contributor

Some additional tests I tried:

  • Modifying the config file with a text editor triggers a configuration reload. ✅
  • Copying another config file over the one used by the ProSA triggers a reload. ✅
  • Deleting the config file and creating a new one does not trigger a reload. ❌
  • Moving the config file and moving it back triggers a reload. ✅
  • If the ProSA's config is a symlink, editing the destination of the symlink triggers a reload. ✅
  • If the destination of the symlink is deleted and recreated, there is no reload. ❌

@reneca

reneca commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Yes cargo-prosa use the latest release when it import modules.
From your test (we discussed about it) the config file should not be deleted. It's a non sense, ProSA can't run without a config file. So if the config file is deleted ProSA will keep the same config until its shutdown.

@reneca reneca merged commit fd0a15a into main Jul 16, 2026
7 checks passed
@reneca reneca deleted the config branch July 16, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants