Commit Graph

183 Commits

Author SHA1 Message Date
vitor-aignosi
f415207d5b Update OPC server update method to include NOSONAR comment for code quality tools 2025-10-23 11:55:55 -03:00
vitor-aignosi
eea6ccb48f Refactor OPC manager shutdown logic for improved reliability
Updated the IngestorManager class to ensure that OPC managers are properly shut down and removed from the management list when servers are lost or removed. This change enhances the integrity checks for OPC server management by ensuring asynchronous handling of shutdown operations.
2025-10-23 11:52:00 -03:00
vitor-aignosi
6d2a0e46be Refactor OPC server integrity checks to be asynchronous
Updated the Ingestor and IngestorManager classes to use async methods for checking OPC server integrity and shutting down OPC managers. Adjusted related tests to ensure proper mocking of asynchronous behavior.
2025-10-23 11:46:02 -03:00
Bruno Domingues
d62a1e3381 Merge pull request #23 from Aignosi/feature/SIENTIAPDE-1327-controle-de-releases
SIENTIAPDE-1327: Remove push trigger from quality gate workflow
2025-10-23 08:58:23 -03:00
vitor-aignosi
a4664edee0 SIENTIAPDE-1327
Remove unnecessary blank line from quality gate workflow for improved clarity
2025-10-23 08:38:35 -03:00
vitor-aignosi
cb28eb7e0f Merge branch 'main' into feature/SIENTIAPDE-1327-controle-de-releases 2025-10-23 08:05:19 -03:00
vitor-aignosi
7cfc1435f6 SIENTIAPDE-1327
Remove push trigger from quality gate workflow to streamline execution on pull requests only
2025-10-23 07:56:38 -03:00
Bruno Domingues
e97a006068 Merge pull request #22 from Aignosi/feature/SIENTIAPDE-1327-controle-de-releases
Enhance Quality Gate Workflow for Branch-Based Versioning
2025-10-22 16:47:39 -03:00
vitor-aignosi
c33869be9f SIENTIAPDE-1327
SIENTIAPDE-1327: Replace existing release workflow with a template for improved maintainability and permissions
2025-10-22 16:39:00 -03:00
vitor-aignosi
e1da6964f4 SIENTIAPDE-1327
SIENTIAPDE-1327: Add write-all permissions to quality gate workflow for enhanced functionality
2025-10-22 16:31:56 -03:00
vitor-aignosi
6fce58fa6a SIENTIAPDE-1327
Enhance quality gate workflow by adding a blank line for improved readability
2025-10-22 16:25:31 -03:00
vitor-aignosi
8a9d2e4d73 SIENTIAPDE-1327
SIENTIAPDE-1327: Add secrets inheritance to quality gate workflow configuration
2025-10-22 16:21:27 -03:00
vitor-aignosi
a8b2fe0bd9 SIENTIAPDE-1327
Update quality gate workflow path to use the correct GitHub repository template
2025-10-22 16:13:16 -03:00
vitor-aignosi
88129f2914 SIENTIAPDE-1327
Update quality gate workflow path in GitHub Actions configuration
2025-10-22 15:59:13 -03:00
vitor-aignosi
c8bd6c78d7 SIENTIAPDE-1327
Update quality gate workflow path in GitHub Actions configuration
2025-10-22 15:52:26 -03:00
vitor-aignosi
19ee884c0a SIENTIAPDE-1327
test
2025-10-22 15:50:24 -03:00
vitor-aignosi
6bd695d5a2 SIENTIAPDE-1327
Update quality gate workflow path in GitHub Actions configuration
2025-10-22 15:48:00 -03:00
vitor-aignosi
6a65403e17 SIENTIAPDE-1327
Update requirements and simplify quality gate workflow

- Updated the sientia-dataops-library dependency version from 1.4.6 to 1.4.7 in requirements.txt.
- Replaced the existing quality gate workflow with a simplified version that utilizes a template for better maintainability.
2025-10-22 15:44:19 -03:00
vitor-aignosi
3d5af42fc0 SIENTIAPDE-1327
Remove unnecessary persist-credentials option from quality gate workflow configuration
2025-10-22 15:21:27 -03:00
vitor-aignosi
5c823eea22 SIENTIAPDE-1327
SIENTIAPDE-1312: Enhance quality gate workflow to determine next version based on branch type

- Added steps to fetch the branch name and calculate the next version based on the latest tag.
- Implemented versioning logic to increment major, minor, or patch numbers depending on the branch type (release, feature, fix).
- Updated SonarQube analysis step to use the dynamically calculated version.
2025-10-22 14:52:03 -03:00
Matheus Demoner
d7274cd72e Merge pull request #21 from Aignosi/SIENTIAPDE-1312-melhorias-e-correcoes-nas-pipelines-de-dados
SIENTIAPDE-1312: Improve OpcManager Connection Handling, Configuration, and Error Logging
2025-10-21 17:25:02 -03:00
vitor-aignosi
95c9ad85f9 SIENTIAPDE-1312
Update image tag in values.yaml and refactor OpcManager error handling

- Updated the image tag in values.yaml from "0.4.5" to "0.4.9" for the latest version.
- Refactored error handling in OpcManager to improve logging and maintain code clarity.
- Adjusted unit tests for better readability and consistency in assertions.
2025-10-21 17:03:58 -03:00
vitor-aignosi
3eacf27faf SIENTIAPDE-1312
Refactor OpcManager connection error handling and enhance unit tests

- Simplified error handling during connection attempts in OpcManager by removing redundant disconnection logic.
- Updated unit tests to include subscription_period_ms in server configuration and adjusted connection assertions to include a timeout parameter.
- Added new tests for disconnection fallback functionality to ensure robust error handling during disconnect attempts.
2025-10-20 17:08:40 -03:00
vitor-aignosi
aaa8d00f56 SIENTIAPDE-1312
Update OpcManager to set a timeout for the client connection

- Added a timeout parameter to the Client initialization in OpcManager to enhance connection reliability and prevent indefinite blocking during connection attempts.
2025-10-20 16:26:24 -03:00
vitor-aignosi
8c552f50a8 SIENTIAPDE-1312
Fix pod URI formatting and enhance disconnection error logging in OpcManager

- Updated pod URI construction to replace hyphens with colons for correct formatting.
- Improved error logging during disconnection attempts to include the attempt number for better traceability.
- Changed disconnection_fallback method call to be awaited for proper asynchronous handling.
2025-10-20 15:56:00 -03:00
vitor-aignosi
7001b5e9bd SIENTIAPDE-1312
SIENTIAPDE-1318 Enhance OpcManager disconnection handling

- Introduced a disconnection_fallback method to attempt multiple disconnects from the OPC UA server, improving reliability.
- Updated error handling during connection attempts to ensure proper logging and notification of disconnection failures.
- Refactored disconnect method to utilize the new fallback mechanism and maintain metrics accurately.
2025-10-20 15:27:05 -03:00
vitor-aignosi
44a9367663 SIENTIAPDE-1312
Update GITHUB_BRANCH in values.yaml to reflect changes for SIENTIAPDE-1312, focusing on improvements and corrections in data pipelines.
2025-10-20 12:41:30 -03:00
vitor-aignosi
47b3159e71 SIENTIAPDE-1312
Enhance OpcManager to accept subscription period from configuration

- Updated OpcManager to include subscription_period_ms as a parameter for better configurability.
- Refactored create_subscription method to utilize the new subscription period parameter.
- Adjusted unit tests to reflect changes in subscription handling and ensure correct functionality.
2025-10-20 12:41:05 -03:00
Matheus Demoner
64a1a14a8b Merge pull request #20 from Aignosi/SIENTIAPDE-1318-adicionar-pipeline-de-qualidade
Chore: Update dependencies, improve CI, and enhance code formatting
2025-10-20 08:37:51 -03:00
vitor-aignosi
acae38377f SIENTIAPDE-1318
Refactor app.py for consistency in comment formatting

- Updated the main asynchronous function and loop condition comments for improved readability and consistency.
2025-10-17 16:25:50 -03:00
vitor-aignosi
a192e2ba04 SIENTIAPDE-1318
Update app.py to add a comment for clarity in the main asynchronous function
2025-10-17 16:25:24 -03:00
vitor-aignosi
fe9fce0ba6 SIENTIAPDE-1318
Update app.py to add a comment for clarity in the main loop condition
2025-10-17 16:17:41 -03:00
vitor-aignosi
4c3289647b SIENTIAPDE-1318
Refactor app.py and enhance unit tests for better clarity and structure

- Updated `app.py` to improve async compatibility with a clearer comment.
- Added blank lines in `test_ingestor.py` for improved readability and organization of test cases.
2025-10-17 16:09:41 -03:00
vitor-aignosi
2fad392dcb SIENTIAPDE-1318
Refactor async handling and enhance unit tests for ingestor manager

- Updated `app.py` to improve async compatibility by adding a comment for clarity.
- Added new unit tests to handle scenarios where the ingestor manager is None, ensuring robustness in `manage_leases` and `loop` methods.
- Enhanced existing tests to cover edge cases related to the ingestor manager's state.
2025-10-17 16:07:13 -03:00
vitor-aignosi
1e4085d8c4 SIENTIAPDE-1318
Update GitHub Actions workflow to include a blank line for improved readability
2025-10-17 15:25:38 -03:00
vitor-aignosi
7e460018fe SIENTIAPDE-1318
Enhance GitHub Actions workflow for quality gate

- Added steps to generate a GitHub App token for authentication.
- Prepared `requirements.txt` to use HTTPS for GitHub dependencies.
- Configured Git to utilize the generated App token for repository access.
- Updated caching strategy to use the processed requirements file for improved dependency management.
2025-10-17 14:58:13 -03:00
vitor-aignosi
e19b57d4b1 SIENTIAPDE-1318
Refactor project structure and update configurations

- Deleted the empty `__init__.py` file to clean up the project structure.
- Renamed the project from "laborious" to "ingestor" in `pyproject.toml`, updating the description accordingly.
- Improved type hints and conditional checks in the `Ingestor`, `DataManager`, `IngestorManager`, and `OpcManager` classes for better code clarity and type safety.
- Enhanced error handling and assertions in various methods to ensure robustness.
- Updated unit tests to reflect changes in class names and error handling improvements.
2025-10-17 14:54:39 -03:00
vitor-aignosi
e2462af31c Update dependencies, improve CI workflow, and enhance code formatting
- Updated the `sientia-dataops-library` dependency version from 1.4.3 to 1.4.6 in `requirements.txt`.
- Modified the GitHub Actions workflow to install development and runtime dependencies separately, improving clarity and organization.
- Added code formatting and linting checks using Ruff, along with type checking using mypy, to ensure code quality.
- Updated `.gitignore` to include additional cache directories and log files.
- Refactored code in various files for consistency in string formatting and improved logging messages.
2025-10-17 12:58:24 -03:00
Matheus Demoner
464c9aae9b Merge pull request #19 from Aignosi/OPC-connection-changes
Atualiza o OPC Manager para incluir um intervalo de watchdog de 1 hor…
2025-09-03 13:28:45 -03:00
Matheus
1eb5711345 Atualiza o OPC Manager para incluir um intervalo de watchdog de 1 hora e define o nome do cliente como o ID do pod. Ajusta os testes para refletir essas mudanças na inicialização do cliente. 2025-09-03 11:47:47 -03:00
Bruno Domingues
28dd9eb5c7 Merge pull request #18 from Aignosi/SIENTIAPDE-1084-ajustar-documentacao
SIENTIAPDE-1084: Enhance Data Management and Documentation
2025-09-03 13:32:48 +00:00
vitor-aignosi
0a3826b767 Merge branch 'main' into SIENTIAPDE-1084-ajustar-documentacao 2025-09-01 16:04:25 -03:00
vitor-aignosi
26f776f8e1 SIENTIAPDE-1084
Enhance documentation and improve shutdown methods for DataManager and IngestorManager

- Updated README.md to clarify persistent storage capabilities.
- Enhanced docstrings in DataManager and IngestorManager for shutdown processes, detailing resource cleanup and error handling.
- Improved comments in various methods to provide clearer explanations of functionality and side effects.
2025-09-01 12:47:39 -03:00
vitor-aignosi
873c733730 SIENTIAPDE-1084
Update README.md to clarify data streaming and storage features

- Revised descriptions for Real-time Data Streaming and Persistent Storage to emphasize historical data streaming capabilities.
- Updated Data Manager section to reflect the integration of both MongoDB and Kafka for data management.
- Enhanced configuration example in the prerequisites section with additional fields for server configuration.
2025-08-29 11:26:36 -03:00
vitor-aignosi
8f6ba4ddcf SIENTIAPDE-1084
Remove deprecated files and enhance documentation

- Deleted `coverage.sh`, `docker-compose.yaml`, `Dockerfile`, and simulator-related files to streamline the project structure.
- Updated `README.md` to provide a comprehensive overview of the OPC Ingestor, including features, architecture, installation, usage, and troubleshooting.
- Enhanced docstrings across various classes and methods in the `ingestor` module for better clarity and maintainability.
- Improved Prometheus metrics documentation in `metrics.py` to ensure proper monitoring and observability of the system.
2025-08-29 11:20:28 -03:00
Bruno Domingues
a384a077a9 Merge pull request #17 from Aignosi/SIENTIAPDE-1205-alterar-opc-para-assincrono
SIENTIAPDE-1205: Refactor Ingestor and OPC Manager for Asynchronous Shutdown and Enhanced Testing
2025-08-29 13:59:43 +00:00
vitor-aignosi
f92ee20831 SIENTIAPDE-1205
Update quality-gate.yml to include pytest-asyncio for enhanced async testing capabilities
2025-08-28 12:54:58 -03:00
vitor-aignosi
102507d815 SIENTIAPDE-1205
Enhance unit tests for async shutdown and improve assertions

- Updated `test_app.py` to verify multiple calls to `asyncio_sleep` and ensure proper handling of sleep intervals.
- Added new tests in `test_ingestor.py` and `test_opc_manager.py` to validate shutdown behavior and error handling for async operations.
- Improved assertions in existing tests to enhance reliability and clarity of test outcomes.
2025-08-28 08:34:30 -03:00
vitor-aignosi
f55604c7db SIENTIAPDE-1205
Refactor tests for async compatibility and enhance IngestorManager functionality

- Updated test cases in `test_app.py`, `test_ingestor.py`, and `test_ingestor_manager.py` to use async/await syntax for improved concurrency.
- Refactored methods in IngestorManager and related classes to support asynchronous operations, ensuring non-blocking behavior during execution.
- Enhanced mock setups in tests to accommodate async methods, improving test reliability and performance.
2025-08-27 17:00:06 -03:00
vitor-aignosi
c09a96d4a4 SIENTIAPDE-1205
Remove __del__ method from Ingestor class to prevent blocking during cleanup and ensure proper async shutdown handling.
2025-08-27 08:49:19 -03:00