Commit Graph

574 Commits

Author SHA1 Message Date
github-actions[bot]
b5a54147f5 chore: bump version to 0.9.0
Some checks failed
Quality gate / quality-gate (push) Has been cancelled
2026-09-29 15:33:26 +00:00
ci-dependencies-fetcher[bot]
150e2f7259 Revert "chore: bump version to 0.8.0"
This reverts commit e5cea1ef96.
2026-09-29 14:22:49 +00:00
github-actions[bot]
e5cea1ef96 chore: bump version to 0.8.0 2026-09-29 14:22:15 +00:00
Carla Fernandes
08b2986f81 Merge pull request #53 from Aignosi/feature/SIENTIAPDE-2162
feature/SIENTIAPDE-2162 Prediction Metadata — Collection prediction_metadata no MongoDB
2026-09-29 16:21:48 +02:00
Carla Pinto
8b69b2cb29 feature/SIENTIAPDE-2162 - Inject mongo_repository into gates and add best-effort prediction metadata write 2026-09-28 19:33:24 +02:00
9920cd61c2 SIENTIAPDE-1646
Add tests for retrain, drift, storage, OPC repo, worker paths

- covers csv lookup fallback, drift insufficient-data passthrough,
  timestamp tz normalization, storage close without engine, OPC
  watchdog/write_value fallbacks and reconnect reporting, and
  legacy runtime install in worker main
2026-09-28 11:53:01 -03:00
d27f6573fe SIENTIAPDE-1646
Simplify merge in retrain: expose timestamp explicitly for join

Refactor evaluation_data merge to reset both frames' index into a
"timestamp" column before joining, instead of merging on index then
copying it out afterward. Same validate='one_to_one' safety check,
fewer intermediate steps.
2026-09-25 12:45:19 -03:00
f323da7b56 SIENTIAPDE-1646
Harden retrain merge and OPC write against silent failures

- pandas merge now uses validate='one_to_one' so duplicated timestamps
  from wrapper.retrain fail loudly instead of silently multiplying rows
- OPC write_data raises OpcClientNotInitializedError instead of a bare
  assert when client is torn down between validation and write, so
  callers get a reported error instead of an AssertionError
- add regression test covering the torn-down client path

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-25 12:27:17 -03:00
5c3c9292fc SIENTIAPDE-1646
Fix flaky shutdown assertions in test suite

GC-collected instances during tests also invoke patched shutdown,
making assert_called_once_with flaky. Count calls for this instance
specifically instead of asserting total call count.
2026-09-25 12:10:18 -03:00
9fb81ef556 SIENTIAPDE-1646
Pin sqlalchemy<2.1 to fix psycopg driver break; use tmp_path in retrain

- sqlalchemy 2.1 defaults postgresql:// URLs to psycopg (v3), but sientia_do
  only ships psycopg2-binary, breaking with "No module named psycopg"
- Replace hardcoded 'tmp' mkdtemp mock with pytest tmp_path fixture in
  retrain_model tests to avoid writing to a fake path
2026-09-25 11:58:55 -03:00
26e37e0a0a SIENTIAPDE-1646
Fix quality-gate repo list: remove space, swap mlops-library for model-l

Correct repo list breaks scan otherwise: space in name mismatched dep, wrong package name (mlops-library doesn't exist / renamed to model-library).
2026-09-25 11:03:53 -03:00
116330fc3f SIENTIAPDE-1646
Use requirements.txt for quality-gate scan instead of light variant

Switch dependency scan input from requirements-light.txt to requirements.txt
so quality gate checks full dependency set, not partial one.
2026-09-25 11:00:18 -03:00
00b6382a88 SIENTIAPDE-1646
Simplify bandit nosec comments and mock metrics_controller with real spe

- drift.py/simple_metrics.py: move nosec rationale to a code comment above
  the query instead of an inline suppression comment, keeping bandit happy
  with a plain `# nosec`
- tests: replace bare `MagicMock()` with `MagicMock(spec=MetricsController)`
  for metrics_controller across activities/repository tests so mocks fail
  fast on attribute typos instead of silently accepting any call
2026-09-25 10:57:46 -03:00
4c51e7c2b3 SIENTIAPDE-1646
SIENTIAPDE-1646 Merge origin/main into release/SIENTIAPDE-1646

Bring main up to date while keeping this branch's sync execution, PluginStore
runtime and sientia_model (SientiaMLflowRepository/SientiaModel) structure.

Resolution decisions:
- OPC: keep the sync asyncua.sync implementation; port main's server_uri
  validation, e2e race fix (lock held until released) and the new unit tests
  converted to sync.
- Model import workflow (.sientia bundles), joblib/transform flavors and the
  local MLFlowRepository (model_repository.py) are dropped, with their tests,
  docs, metrics, env vars and connectors config.
- Worker: drift/simple_metrics stay pinned to the 'core' runtime; port main's
  HOSTNAME pod id, logger-based prometheus startup and sys.exit after finally.
- values.yaml removed, following main (SIENTIAPDE-1945).
- Deps: keep sientia_model; take main's fsspec/s3fs/botocore/boto3 pins and
  sientia_do>=1.12.2; drop import-only deps (pynacl, cryptography, pymongo,
  python-dotenv, pycaret, joblib, gcsfs).
- e2e: keep sientia_data schema and scenario input files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:45:43 -03:00
8ef7ed800a SIENTIAPDE-2071: chore: remove dead Makefile
Some checks failed
Quality gate / quality-gate (push) Has been cancelled
Card 16 of the SIENTIAPDE-2052 epic. This repo is a Flow B dataops
worker, it does not build its own image at all anymore, it runs off
a shared runtime image with code cloned from Gitea at deploy time. A
per repo image build Makefile pointing at aignosi.azurecr.io is dead
weight, no workflow calls make. Safe to remove.
2026-09-15 00:08:37 -03:00
github-actions[bot]
ac67d5b447 chore: bump version to 0.7.2 2026-09-11 15:19:06 +00:00
ci-dependencies-fetcher[bot]
ce91a0bbb6 Revert "chore: bump version to 0.7.2"
This reverts commit 959c78170c.
2026-09-11 14:49:24 +00:00
github-actions[bot]
959c78170c chore: bump version to 0.7.2 2026-09-11 14:43:24 +00:00
ci-dependencies-fetcher[bot]
5690e792a9 Revert "chore: bump version to 0.7.1"
This reverts commit 76351fdf8a.
2026-09-11 13:47:36 +00:00
github-actions[bot]
76351fdf8a chore: bump version to 0.7.1 2026-09-11 13:47:07 +00:00
Bruno Domingues
070956def9 Merge pull request #51 from Aignosi/fix/SIENTIAPDE-2068
feat(cicd): Migrate laborious-worker deployment to Flow B
2026-09-11 10:46:41 -03:00
85fe4663b1 SIENTIAPDE-2068: feat(cicd): migrate laborious-worker deploy to Flow B (legacy only)
- Delete release.yml (tarball-only, no deploy job).
- Add deploy.yml calling reusable-deploy-dataops.yml, bumping only the
  legacy runtime's GITHUB_BRANCH via the new profile/profile_env_list_path
  mechanism — basic is left untouched for now. workflow_dispatch has no
  inputs.
- Add require-chart-ref-label.yml.
2026-09-11 10:36:06 -03:00
e2fbf841fc Merge pull request #49 from Aignosi/feature/QTZPOC-20
QTZPOC-20: .sientia Model Import, Workflow Enhancements, and Robust Failure Handling
2026-09-10 16:56:56 -03:00
b65cf2ba68 QTZPOC-20
QTZPOC-20: Pin mlflow dependency to version 2.10.1 in requirements-light.txt
2026-09-10 16:18:18 -03:00
1c32e9d678 QTZPOC-20
QTZPOC-20: Remove trailing newline from sonar-project.properties
2026-09-10 15:09:35 -03:00
bf48a18c7b QTZPOC-20
QTZPOC-20: Improve worker shutdown handling by allowing SystemExit and KeyboardInterrupt to propagate directly, preserving their original exit codes and ensuring cleanup.
2026-09-10 14:25:08 -03:00
6c0d178f99 QTZPOC-20
QTZPOC-20: Implement structured logging with metadata for repository, worker, and OPC activities.
2026-09-10 14:15:42 -03:00
4cccc45c34 QTZPOC-20
QTZPOC-20: Consolidate written_code_dir assignment into a single line in sklearn flavor retrain E2E test.
2026-09-10 11:50:51 -03:00
512a49f78f QTZPOC-20
QTZPOC-20: Enable code_paths for sklearn models; improve worker shutdown handling

The MLFlowRepository now resolves and forwards code_paths to mlflow.sklearn.log_model, ensuring custom code dependencies for sklearn models are preserved and correctly reloaded. A new integration test validates this end-to-end functionality. Additionally, worker exception handling is refined to distinguish between deliberate shutdowns (SystemExit, KeyboardInterrupt) and unhandled exceptions, preventing unnecessary error logging for expected exits.
2026-09-10 11:46:29 -03:00
bda83e7943 QTZPOC-20
QTZPOC-20: Remove redundant parentheses from BaseException catch clauses
2026-09-10 09:43:04 -03:00
e600c7922e QTZPOC-20
QTZPOC-20: Remove redundant NOSONAR comments across multiple files.
2026-09-10 09:39:21 -03:00
9e0da03717 QTZPOC-20
QTZPOC-20: Refactor test calls by extracting inline arguments into local variables for improved readability.
2026-09-10 09:34:06 -03:00
7c45dbb407 QTZPOC-20
QTZPOC-20: Apply minor formatting adjustments to improve code readability.
2026-09-10 09:23:31 -03:00
4c7cae502f QTZPOC-20
QTZPOC-20: Refactor ModelImport status engine for lazy initialization, add byte-counted size validation to bundle extraction, optimize MLflow run ID lookups, and ensure workflow cancellation propagates correctly.
2026-09-10 08:59:31 -03:00
d06ce0daae QTZPOC-20
QTZPOC-20: Improve test readability by assigning claim_input() to a payload variable before use.
2026-09-09 08:58:48 -03:00
37544edafe QTZPOC-20
QTZPOC-20: Improve error handling and classification tests for model import activities and add validation for OPC repository security.
2026-09-09 08:49:23 -03:00
abfd474e4d QTZPOC-20
QTZPOC-20: Enhance OPC repository client configuration and secure connection validation; refine MLflow test error handling and async test execution; add SonarQube suppressions.
2026-09-09 08:26:59 -03:00
eb89917c5a QTZPOC-20
QTZPOC-20: Clarify broad exception handling in OPC repository and refactor asyncio imports in worker tests.
2026-09-08 17:19:45 -03:00
192834bde3 QTZPOC-20
QTZPOC-20: Refactor model import workflow, introduce atomic model ID generation, and clarify MinIO expiry.

Fuses bundle download, decryption, MLflow experiment creation, and artifact upload into a single activity to prevent cross-worker issues. Implements an atomic counter for MongoDB model IDs, replacing the max(id) + 1 scan to avoid collisions during concurrent imports. Adds comprehensive documentation for MinIO object expiry mechanisms and refines lifecycle rule application. Improves error handling with clearer responsibility classification and centralizes MLflow repository injection.
2026-09-08 17:06:25 -03:00
e4fc12e529 QTZPOC-20
QTZPOC-20: Enhance system robustness and test coverage across bundle processing, activity error handling, and worker operations.

*   Strengthen bundle reader validation with new tests for archive integrity, security vulnerabilities (e.g., path traversal, duplicate entries, special file types), and I/O error resilience.
*   Improve error handling and status propagation in PI Web API, MLflow, and OPC activities, including partial write scenarios and OPC session management.
*   Add comprehensive tests for worker startup, configuration, graceful shutdown, and Prometheus metrics server initialization.
*   Introduce a new utility for intelligent DataFrame debugging, summarizing large dataframes for concise logging, and refine exception chain summarization.
*   Update code coverage configuration to exclude @overload decorator lines.
2026-09-08 09:42:23 -03:00
61db575cdc QTZPOC-20
QTZPOC-20: Add NOSONAR comment to summarize_failure function to suppress static analysis warning.
2026-09-04 15:23:55 -03:00
72a55c0900 QTZPOC-20
QTZPOC-20: Raise non-retryable Temporal ApplicationError when no data is returned from query in minimal retrain workflow.
2026-09-04 11:55:18 -03:00
d257e70465 QTZPOC-20
QTZPOC-20: Refactor test inputs into named variables for improved readability and debugging.
2026-09-04 11:35:34 -03:00
7b2e90a9f9 QTZPOC-20
QTZPOC-20: Simplify base64 decoding error handling and improve run name derivation test specificity
2026-09-04 11:15:48 -03:00
bde614e2a6 QTZPOC-20
QTZPOC-20: Refactor model repository tests for improved assertion logic and exception handling, including correcting pytest.raises exception access and refining mock verifications.
2026-09-04 10:54:23 -03:00
6a412147ee QTZPOC-20
QTZPOC-20: Add pynacl==1.5.0 to requirements-light.txt
2026-09-04 10:02:26 -03:00
220ee5509c QTZPOC-20
QTZPOC-20: Remove hashlib from development requirements.
2026-09-04 09:53:08 -03:00
09027bc93b QTZPOC-20
QTZPOC-20: Add skip_predict_timestamp flag to model_config to prevent timestamp reinsertion in prediction data, and document other ad-hoc behavioral flags.
2026-09-03 12:04:47 -03:00
d3691989bb SIENTIAPDE-1646
SIENTIAPDE-1646: Introduce new experimental OPSX workflow commands and their corresponding OpenSpec skills.
2026-09-01 15:16:21 -03:00
086b65c45f QTZPOC-20
QTZPOC-20: Make metadata parameter optional in check_artifact_exists method.
2026-09-01 13:54:51 -03:00