Skip to content

AstarteImport: Add Support for Dynamic Cassandra Host/Port in Astarte Import #1061

Open
Jusuf95 wants to merge 1 commit intoastarte-platform:masterfrom
Jusuf95:astarte-import-cassandra-env-vars
Open

AstarteImport: Add Support for Dynamic Cassandra Host/Port in Astarte Import #1061
Jusuf95 wants to merge 1 commit intoastarte-platform:masterfrom
Jusuf95:astarte-import-cassandra-env-vars

Conversation

@Jusuf95
Copy link
Contributor

@Jusuf95 Jusuf95 commented Jan 29, 2025

Enhancements to Astarte Import Functionality:

  • Updated Astarte.Import to accept db_host_and_port as an argument, providing more flexibility for database configuration.
  • Modified CLI.main/3 to receive and handle db_host_and_port, improving flexibility when running imports.
  • Replaced reliance on Application.get_env/1 for database configuration, ensuring db_host_and_port is directly passed to populate/4.
  • Improved flexibility in database configuration by enabling direct specification of Cassandra host and port.
  • Added @db_host_and_port to test cases to ensure proper import functionality, including importing into a Cassandra database.

Code Maintenance:

  • Ensured that the database configuration is more adaptable by allowing direct specification of db_host_and_port.
  • Improved the clarity of test cases, ensuring the new configuration is properly tested and validated.

What this PR does / why we need it:

This update enhances the Astarte import functionality by allowing for a more flexible and configurable database connection, improving compatibility across different environments.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Please review the changes in Astarte.Import and CLI.main/3 to confirm the correct implementation of the db_host_and_port parameter.

Does this PR introduce a user-facing change?
  • Yes
  • No

Additional documentation e.g. usage docs, diagrams, etc.:


@Jusuf95 Jusuf95 marked this pull request as draft January 29, 2025 13:02
@Jusuf95 Jusuf95 changed the title AstarteImport: Add Support for Dynamic Cassandra Host/Port in Astarte Import [WIP]AstarteImport: Add Support for Dynamic Cassandra Host/Port in Astarte Import Jan 29, 2025
@Jusuf95 Jusuf95 changed the title [WIP]AstarteImport: Add Support for Dynamic Cassandra Host/Port in Astarte Import [WIP] AstarteImport: Add Support for Dynamic Cassandra Host/Port in Astarte Import Jan 29, 2025
@Jusuf95 Jusuf95 force-pushed the astarte-import-cassandra-env-vars branch from eba79fa to 6bd0463 Compare January 29, 2025 14:01
@Jusuf95 Jusuf95 force-pushed the astarte-import-cassandra-env-vars branch 2 times, most recently from bb0e38a to f43b0cc Compare February 10, 2025 13:50
Updated Astarte.Import to accept db_host_and_port as the argument

Updated CLI.main/3 to receive and handle db_host_and_port

Improved flexibility in database configuration by allowing direct host and port specification

Add test for Cassandra import with db_host_and_port

Signed-off-by: Jusuf <jusuf.avdic@secomind.com>
@Jusuf95 Jusuf95 force-pushed the astarte-import-cassandra-env-vars branch from f43b0cc to cbd265a Compare February 18, 2025 12:32
@Jusuf95 Jusuf95 changed the title [WIP] AstarteImport: Add Support for Dynamic Cassandra Host/Port in Astarte Import AstarteImport: Add Support for Dynamic Cassandra Host/Port in Astarte Import Feb 18, 2025
@Jusuf95 Jusuf95 marked this pull request as ready for review February 18, 2025 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant