Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Add deprecation warning when using conductor UI server #1602

Merged
merged 5 commits into from Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG-UNRELEASED.md
Expand Up @@ -9,6 +9,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Added a `get_links_count` method which allows the user to get number of links by base and tag [#1568](https://github.com/holochain/holochain-rust/pull/1568)### Changed
- The Conductor will shut down gracefully when receiving SIGINT (i.e. Ctrl+C) or SIGKILL, also causing a graceful shutdown of an attached n3h instance, if running [#1599](https://github.com/holochain/holochain-rust/pull/1599)

- DEPRECATION WARNING, conductor static UI server is to be removed in an upcoming release. Devs will receive a warning when starting a conductor with a UI server configured [PR#1602](https://github.com/holochain/holochain-rust/pull/1602)

### Deprecated

### Removed
Expand Down
6 changes: 1 addition & 5 deletions conductor/example-config/static-only.toml
@@ -1,8 +1,4 @@
[[agents]]
id = "test agent 1"
name = "Holo Tester 1"
public_address = "HoloTester1-----------------------------------------------------------------------AAACZp4xHB"
keystore_file = "holo_tester.key"
agents = []

[[ui_bundles]]
id = "bundle1"
Expand Down
8 changes: 8 additions & 0 deletions conductor_api/src/conductor/base.rs
Expand Up @@ -158,6 +158,14 @@ impl Conductor {
let rules = config.logger.rules.clone();
lib3h_sodium::check_init();

if config.ui_bundles.len() > 0 || config.ui_interfaces.len() > 0 {
println!();
println!("{}", std::iter::repeat("!").take(20).collect::<String>());
println!("DEPRECATION WARNING - Hosting a static UI via the conductor will not be supported in future releases");
println!("{}", std::iter::repeat("!").take(20).collect::<String>());
println!();
}

Conductor {
instances: HashMap::new(),
instance_signal_receivers: Arc::new(RwLock::new(HashMap::new())),
Expand Down
3 changes: 3 additions & 0 deletions conductor_api/src/config.rs
Expand Up @@ -63,12 +63,15 @@ pub struct Configuration {
/// List of bridges between instances. Optional.
#[serde(default)]
pub bridges: Vec<Bridge>,

/// !DEPRECATION WARNING! - Hosting a static UI via the conductor will not be supported in future releases
/// List of ui bundles (static web dirs) to host on a static interface. Optional.
#[serde(default)]
pub ui_bundles: Vec<UiBundleConfiguration>,
/// List of ui interfaces, includes references to ui bundles and dna interfaces it can call. Optional.
#[serde(default)]
pub ui_interfaces: Vec<UiInterfaceConfiguration>,

/// Configures how logging should behave. Optional.
#[serde(default)]
pub logger: LoggerConfiguration,
Expand Down