You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by pi...@apache.org on 2025/09/22 09:45:14 UTC
(iggy) branch connectors_test updated (0b85a821 -> d9555dc3)
This is an automated email from the ASF dual-hosted git repository.
piotr pushed a change to branch connectors_test
in repository https://gitbox.apache.org/repos/asf/iggy.git
discard 0b85a821 Merge branch 'master' into connectors_test
new d9555dc3 Merge branch 'master' into connectors_test
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (0b85a821)
\
N -- N -- N refs/heads/connectors_test (d9555dc3)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
core/connectors/runtime/config.toml | 6 +++---
core/connectors/runtime/example_config.toml | 6 +++---
core/connectors/runtime/src/configs.rs | 4 ++--
core/connectors/runtime/src/context.rs | 2 +-
core/connectors/runtime/src/main.rs | 2 +-
core/integration/src/test_connectors_runtime.rs | 2 +-
6 files changed, 11 insertions(+), 11 deletions(-)
(iggy) 01/01: Merge branch 'master' into connectors_test
Posted by pi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
piotr pushed a commit to branch connectors_test
in repository https://gitbox.apache.org/repos/asf/iggy.git
commit d9555dc314cc72295a42bbd0f8ddc165a0858e27
Merge: ce45bde6 a5124c84
Author: spetz <pi...@gmail.com>
AuthorDate: Mon Sep 22 11:22:14 2025 +0200
Merge branch 'master' into connectors_test
.github/actions/csharp-dotnet/pre-merge/action.yml | 28 +--
.github/config/components.yml | 5 +-
.github/workflows/_test_examples.yml | 9 +-
core/connectors/runtime/config.toml | 6 +-
core/connectors/runtime/example_config.toml | 6 +-
core/connectors/runtime/src/configs.rs | 4 +-
core/connectors/runtime/src/context.rs | 2 +-
core/connectors/runtime/src/main.rs | 2 +-
core/integration/src/test_connectors_runtime.rs | 2 +-
examples/csharp/Iggy_SDK.Examples.sln | 101 +++++++++
examples/csharp/README.md | 80 ++++++++
.../Iggy_SDK.Examples.Basic.Consumer.csproj | 24 +++
.../Iggy_SDK.Examples.Basic.Consumer/Program.cs | 92 +++++++++
.../Iggy_SDK.Examples.Basic.Consumer/Settings.cs | 32 +++
.../appsettings.json | 10 +
.../Iggy_SDK.Examples.Basic.Producer.csproj | 24 +++
.../Iggy_SDK.Examples.Basic.Producer/Program.cs | 100 +++++++++
.../Iggy_SDK.Examples.Basic.Producer/Settings.cs | 34 +++
.../appsettings.json | 12 ++
...ggy_SDK.Examples.GettingStarted.Consumer.csproj | 15 +-
.../Program.cs | 37 ++++
.../Utils.cs | 118 +++++++++++
...ggy_SDK.Examples.GettingStarted.Producer.csproj | 15 +-
.../Program.cs | 38 ++++
.../Utils.cs | 145 +++++++++++++
.../src/Iggy_SDK.Examples.Shared/ExampleHelpers.cs | 66 ++++++
.../Iggy_SDK.Examples.Shared.csproj | 11 +
.../src/Iggy_SDK.Examples.Shared/Messages.cs | 115 +++++++++++
.../Iggy_SDK.Examples.Shared/MessagesGenerator.cs | 69 +++++++
...gy_SDK.Examples.MessageEnvelope.Consumer.csproj | 19 ++
.../Program.cs | 37 ++++
.../Utils.cs | 146 +++++++++++++
...gy_SDK.Examples.MessageEnvelope.Producer.csproj | 19 ++
.../Program.cs | 38 ++++
.../Utils.cs | 153 ++++++++++++++
...ggy_SDK.Examples.MessageHeaders.Consumer.csproj | 15 +-
.../Program.cs | 37 ++++
.../Utils.cs | 147 +++++++++++++
...ggy_SDK.Examples.MessageHeaders.Producer.csproj | 15 +-
.../Program.cs | 38 ++++
.../Utils.cs | 158 ++++++++++++++
foreign/csharp/Iggy_SDK.sln | 12 --
foreign/csharp/Iggy_Sample_Consumer/Program.cs | 227 ---------------------
.../Iggy_Sample_Producer/MessageGenerator.cs | 85 --------
foreign/csharp/Iggy_Sample_Producer/Program.cs | 224 --------------------
helm/README.md | 5 -
helm/charts/iggy-server/README.md | 53 -----
helm/charts/iggy-server/templates/NOTES.txt | 22 --
helm/charts/iggy-server/templates/_helpers.tpl | 67 ------
helm/charts/iggy-server/templates/deployment.yaml | 92 ---------
helm/charts/iggy-server/templates/ingress.yaml | 79 -------
helm/charts/iggy-server/values.yaml | 126 ------------
helm/charts/iggy-ui/.helmignore | 23 ---
helm/charts/iggy-ui/Chart.yaml | 30 ---
helm/charts/iggy-ui/README.md | 47 -----
helm/charts/iggy-ui/templates/deployment.yaml | 83 --------
helm/charts/iggy-ui/templates/ingress.yaml | 78 -------
helm/charts/iggy-ui/values.yaml | 105 ----------
helm/charts/{iggy-server => iggy}/.helmignore | 0
helm/charts/{iggy-server => iggy}/Chart.yaml | 8 +-
helm/charts/iggy/README.md | 94 +++++++++
helm/charts/{iggy-ui => iggy}/templates/NOTES.txt | 22 +-
.../{iggy-ui => iggy}/templates/_helpers.tpl | 48 ++++-
helm/charts/iggy/templates/deployment.yaml | 200 ++++++++++++++++++
.../{iggy-server => iggy}/templates/hpa.yaml | 6 +-
.../service.yaml => iggy/templates/iggy-pvc.yaml} | 33 ++-
helm/charts/iggy/templates/ingress.yaml | 143 +++++++++++++
.../templates/root-user-credentials.yaml} | 19 +-
.../{iggy-server => iggy}/templates/service.yaml | 29 ++-
.../templates/serviceaccount.yaml | 4 +-
.../templates/servicemonitor.yaml | 14 +-
helm/charts/iggy/values.yaml | 219 ++++++++++++++++++++
scripts/run-csharp-examples-from-readme.sh | 210 +++++++++++++++++++
73 files changed, 2942 insertions(+), 1489 deletions(-)
diff --cc core/connectors/runtime/config.toml
index f106cb5d,ea868f8e..3446708a
--- a/core/connectors/runtime/config.toml
+++ b/core/connectors/runtime/config.toml
@@@ -15,12 -15,12 +15,12 @@@
# specific language governing permissions and limitations
# under the License.
--[http_api] # Optional HTTP API configuration
++[http] # Optional HTTP API configuration
enabled = true
address = "127.0.0.1:8081"
# api_key = "secret" # Optional API key for authentication to be passed as `api-key` header
--[http_api.cors] # Optional CORS configuration for HTTP API
++[http.cors] # Optional CORS configuration for HTTP API
enabled = false
allowed_methods = ["GET", "POST", "PUT", "DELETE"]
allowed_origins = ["*"]
@@@ -29,7 -29,7 +29,7 @@@ exposed_headers = [""
allow_credentials = false
allow_private_network = false
--[http_api.tls] # Optional TLS configuration for HTTP API
++[http.tls] # Optional TLS configuration for HTTP API
enabled = false
cert_file = "core/certs/iggy_cert.pem"
key_file = "core/certs/iggy_key.pem"
diff --cc core/connectors/runtime/example_config.toml
index ea868f8e,ea868f8e..3e00608c
--- a/core/connectors/runtime/example_config.toml
+++ b/core/connectors/runtime/example_config.toml
@@@ -15,12 -15,12 +15,12 @@@
# specific language governing permissions and limitations
# under the License.
--[http_api] # Optional HTTP API configuration
++[http] # Optional HTTP API configuration
enabled = true
address = "127.0.0.1:8081"
# api_key = "secret" # Optional API key for authentication to be passed as `api-key` header
--[http_api.cors] # Optional CORS configuration for HTTP API
++[http.cors] # Optional CORS configuration for HTTP API
enabled = false
allowed_methods = ["GET", "POST", "PUT", "DELETE"]
allowed_origins = ["*"]
@@@ -29,7 -29,7 +29,7 @@@ exposed_headers = [""
allow_credentials = false
allow_private_network = false
--[http_api.tls] # Optional TLS configuration for HTTP API
++[http.tls] # Optional TLS configuration for HTTP API
enabled = false
cert_file = "core/certs/iggy_cert.pem"
key_file = "core/certs/iggy_key.pem"
diff --cc core/connectors/runtime/src/configs.rs
index 8974798d,bf4ca248..d8778532
--- a/core/connectors/runtime/src/configs.rs
+++ b/core/connectors/runtime/src/configs.rs
@@@ -45,10 -38,9 +45,10 @@@ pub enum ConfigFormat
Text,
}
-#[derive(Debug, Clone, Deserialize, Serialize)]
+#[derive(Debug, Default, Clone, Deserialize, Serialize)]
+#[serde(default)]
pub struct RuntimeConfig {
-- pub http_api: HttpApiConfig,
++ pub http: HttpApiConfig,
pub iggy: IggyConfig,
pub sinks: HashMap<String, SinkConfig>,
pub sources: HashMap<String, SourceConfig>,
@@@ -119,76 -111,3 +119,76 @@@ pub struct SharedTransformConfig
pub struct StateConfig {
pub path: String,
}
+
+impl std::fmt::Display for RuntimeConfig {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(
+ f,
+ "RuntimeConfig {{ http: {:?}, iggy: {:?}, sinks: {:?}, sources: {:?}, state: {:?} }}",
- self.http_api, self.iggy, self.sinks, self.sources, self.state
++ self.http, self.iggy, self.sinks, self.sources, self.state
+ )
+ }
+}
+
+impl Default for StateConfig {
+ fn default() -> Self {
+ Self {
+ path: "local_state".to_owned(),
+ }
+ }
+}
+
+impl Default for IggyConfig {
+ fn default() -> Self {
+ Self {
+ address: "localhost:8090".to_owned(),
+ username: Some(DEFAULT_ROOT_USERNAME.to_owned()),
+ password: Some(DEFAULT_ROOT_PASSWORD.to_owned()),
+ token: None,
+ }
+ }
+}
+
+impl Default for HttpApiConfig {
+ fn default() -> Self {
+ Self {
+ enabled: true,
+ address: "localhost:8081".to_owned(),
+ cors: None,
+ api_key: None,
+ tls: None,
+ }
+ }
+}
+
+impl RuntimeConfig {
+ pub fn config_provider(path: String) -> FileConfigProvider<ConnectorsEnvProvider> {
+ let default_config = Toml::string(include_str!("../../../connectors/runtime/config.toml"));
+ FileConfigProvider::new(path, default_config, ConnectorsEnvProvider::default())
+ }
+}
+
+#[derive(Debug, Clone)]
+pub struct ConnectorsEnvProvider {
+ provider: CustomEnvProvider<RuntimeConfig>,
+}
+
+impl Default for ConnectorsEnvProvider {
+ fn default() -> Self {
+ Self {
+ provider: CustomEnvProvider::new("IGGY_CONNECTORS_", &[]),
+ }
+ }
+}
+
+impl Provider for ConnectorsEnvProvider {
+ fn metadata(&self) -> Metadata {
+ Metadata::named("iggy-connectors-config")
+ }
+
+ fn data(&self) -> Result<figment::value::Map<Profile, Dict>, figment::Error> {
+ self.provider.deserialize().map_err(|_| {
+ figment::Error::from("Cannot deserialize environment variables for connectors config")
+ })
+ }
+}
diff --cc core/connectors/runtime/src/context.rs
index 6dd005b6,6dd005b6..d7dea9f8
--- a/core/connectors/runtime/src/context.rs
+++ b/core/connectors/runtime/src/context.rs
@@@ -40,7 -40,7 +40,7 @@@ pub fn init
RuntimeContext {
sinks: SinkManager::new(map_sinks(config, sink_wrappers)),
sources: SourceManager::new(map_sources(config, source_wrappers)),
-- api_key: config.http_api.api_key.clone(),
++ api_key: config.http.api_key.clone(),
}
}
diff --cc core/connectors/runtime/src/main.rs
index bb615ebe,0219d926..1eecc3cc
--- a/core/connectors/runtime/src/main.rs
+++ b/core/connectors/runtime/src/main.rs
@@@ -178,7 -170,7 +178,7 @@@ async fn main() -> Result<(), RuntimeEr
let context = context::init(&config, &sink_wrappers, &source_wrappers);
let context = Arc::new(context);
-- api::init(&config.http_api, context).await;
++ api::init(&config.http, context).await;
source::handle(source_wrappers);
sink::consume(sink_wrappers);
diff --cc core/integration/src/test_connectors_runtime.rs
index 00e419b9,b2427090..43b00b3d
--- a/core/integration/src/test_connectors_runtime.rs
+++ b/core/integration/src/test_connectors_runtime.rs
@@@ -91,7 -93,7 +91,7 @@@ impl TestConnectorsRuntime
pub fn start(&mut self) {
self.envs
- .entry("IGGY_CONNECTORS_HTTP_API_ADDRESS".to_string())
- .entry("IGGY_MCP_HTTP_ADDRESS".to_string())
++ .entry("IGGY_CONNECTORS_HTTP_ADDRESS".to_string())
.or_insert(self.server_address.to_string());
let mut command = if let Some(server_executable_path) = &self.server_executable_path {
Command::new(server_executable_path)