Commit Graph

331 Commits

Author SHA1 Message Date
e6189a8551 fix: bump sientia_do to 1.12.5
sientia_do 1.12.5 pins the psycopg2 driver in the Postgres engine URL.
Without it, rebuilding the image pulls SQLAlchemy 2.1.x, whose default
'postgresql://' driver is psycopg (v3), and the worker crashes at
startup with "ModuleNotFoundError: No module named 'psycopg'".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:05:10 -03:00
github-actions[bot]
1c9940a0bb chore: bump version to 1.3.4 2026-09-14 12:13:49 +00:00
faca362fb8 Merge pull request #44 from Aignosi/fix/SIENTIAPDE-1993
fix: preserve real timestamps in get_tag_values when max_count > 1
2026-09-14 09:13:23 -03:00
Eduardo Rios
1d764439cb test: parametrize SIENTIAPDE-1993 e2e regression over max_count=1 and >1
Feedback (Vitor): the intent was a single scenario covering both
max_count=1 and max_count>1, checking that in both cases each tag's
own latest (properly aggregated) timestamp prevails — not just the
max_count>1 case from the previous commit.

Renamed the existing fixture to
pi_web_api_scouter_distinct_tag_timestamps_multi_point.json and added
a sibling _single_point.json (max_count=1, one point per tag, distinct
timestamps across tags). test_scenario_2_1_4 is now parametrized over
both fixtures with the same assertion: each tag's stored Postgres row
keeps its own real timestamp, never another tag's.

SIENTIAPDE-1993

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 08:39:00 -03:00
Eduardo Rios
4767fbbfb1 test: add e2e regression scenario for SIENTIAPDE-1993
Existing e2e coverage (2.1.2 multiple_tags) never exercised the actual
bug, since all its tags happened to share the same latest timestamp,
so aggregation's own per-tag last-timestamp pick coincided with the
old (buggy) batch-wide max regardless of the fix.

Add scenario 2.1.4: two tags with max_count=2, each with two historical
points, but with genuinely different latest timestamps (~12:00 vs
~15:00). Asserts each tag's stored Postgres row keeps its own real
timestamp rather than the other tag's. This test fails against the
pre-fix code (both rows would show ~15:00) and passes with the fix.

SIENTIAPDE-1993

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 16:17:54 -03:00
Eduardo Rios
f79d51336f fix: remove timestamp normalization instead of gating it by max_count
Review feedback (Vitor): gating the batch-max normalization behind
max_count == 1 just hid the same collapsing behavior for the single-point
case, where it's redundant anyway (aggregation/export don't need it) while
still being the wrong fix conceptually. Removed the normalization block
entirely so every record always keeps its own real timestamp from the PI
Web API, regardless of max_count.

Updated unit tests accordingly and confirmed no e2e scenario needs
adjustment: aggregate_data groups by (tag, name) and always collapses to
one output row per tag per execution, independent of per-record timestamp
values, so pi_web_api_scouter_multiple_tags' aggregated-value assertions
are unaffected.

SIENTIAPDE-1993

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 16:05:37 -03:00
Eduardo Rios
fc3660433f fix: preserve real timestamps in get_tag_values when max_count > 1
Timestamp normalization in API.get_tag_values previously overwrote all
records with the batch's maximum timestamp regardless of max_count.
With max_count > 1, this collapsed distinct historical points for the
same tag onto a single timestamp, causing them to collide on the
(model_id, timestamp, variable) unique constraint and get silently
dropped via ON CONFLICT DO NOTHING.

Normalization is now only applied when max_count == 1, which is the
only case where it is meaningful (aligning minor sampling differences
across tags for a single point each).

SIENTIAPDE-1993

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 14:08:15 -03:00
554a26bf2c ci(deploy): Update env_list_path to array format in workflow 2026-09-11 00:12:06 -03:00
github-actions[bot]
f2d8c85322 chore: bump version to 1.3.3 2026-09-10 13:14:03 +00:00
Bruno Domingues
db7ecda40a Merge pull request #43 from Aignosi/fix/SIENTIAPDE-2068
Automate Version Updates in pyproject.toml via Deploy Workflow
2026-09-10 10:13:33 -03:00
827a42e123 SIENTIAPDE-2068: Configure deploy workflow to update version in pyproject.toml 2026-09-10 10:03:06 -03:00
Bruno Domingues
1c454dd2f0 Merge pull request #42 from Aignosi/fix/SIENTIAPDE-2068
Some checks failed
Quality gate / quality-gate (push) Has been cancelled
feat(cicd): Migrate scouter-worker deployment to Flow B
2026-09-09 18:06:38 -03:00
82687839dc SIENTIAPDE-2068: feat(cicd): migrate scouter-worker deploy to Flow B
- Delete release.yml (tarball-only, no deploy job).
- Add deploy.yml calling reusable-deploy-dataops.yml — mirror to Gitea,
  dual-bump GITHUB_BRANCH (development + chart-ref label branch), helmfile
  deploy. workflow_dispatch has no inputs: uses the picked branch as-is.
- Add require-chart-ref-label.yml (branch-protection check, wired separately).
2026-09-09 17:49:26 -03:00
6ab33755d3 Merge pull request #41 from Aignosi/fix/SIENTIAPDE-2072
SIENTIAPDE-2072: bump sientia_do pin to 1.12.2
2026-09-09 11:08:20 -03:00
Eduardo Rios
837c236209 fix: pin minimum sientia_do version in requirements.txt
Addresses review feedback: requirements-local.txt was bumped to 1.12.2
but requirements.txt was left with an unpinned sientia_do, missing the
minimum version bump.
2026-09-09 11:02:16 -03:00
Eduardo Rios
10fc434629 SIENTIAPDE-2072: bump sientia_do pin to 1.12.2
Picks up the notification timestamp -> native datetime fix.
2026-08-17 16:42:09 -03:00
1f43545f9d chore(release): Bump version to 1.3.0, enhance CI, and add Claude AI guidance 2026-08-05 23:35:17 -03:00
968bcdaa51 Merge pull request #38 from Aignosi/feature/SIENTIAPDE-1646
Project Configuration, Dependency, and SonarQube Updates with values.yaml Removal
2026-07-21 14:55:47 -03:00
b78ead85df SIENTIAPDE-1646
SIENTIAPDE-1646: Configure quality-gate workflow to use requirements-local.txt.
2026-07-21 09:53:38 -03:00
c4ca9dafe8 SIENTIAPDE-1646
Merge branch 'main' into feature/SIENTIAPDE-1646
2026-07-21 09:43:47 -03:00
8cbff7d693 SIENTIAPDE-1712
Remove validate.sh script and fix typo in POSTGRES_USER value in values.yaml
2026-07-21 09:35:08 -03:00
293528161f SIENTIAPDE-1712
Update values.yaml for GITHUB_BRANCH and POSTGRES credentials; add unique_columns to CoreScouter and related tests for conflict resolution.
2026-07-21 09:35:00 -03:00
12683e1eff SIENTIAPDE-1712
Add unique constraint on (model_id, timestamp, variable) in schema and implement idempotent export test to ensure no duplicates are created. Update CoreScouter and related tests to handle conflict resolution by ignoring duplicates.
2026-07-21 09:34:53 -03:00
26a132d02a Merge pull request #31 from Aignosi/fix/SIENTIAPDE-1712
Implement Unique Constraint for Export Data and Handle Duplicates
2026-07-21 09:33:16 -03:00
7a7d202081 SIENTIAPDE-1712
Merge branch 'main' into fix/SIENTIAPDE-1712
2026-07-21 08:20:35 -03:00
9fd32e79fb SIENTIAPDE-1945: Delete values.yaml file. 2026-07-21 08:18:13 -03:00
8c033f6793 chore(sonar): Update SonarQube project key 2026-07-21 08:18:08 -03:00
Bruno Domingues
eb672c7a49 Merge pull request #37 from Aignosi/feature/SIENTIAPDE-1945
SIENTIAPDE-1945: Remove values.yaml file
2026-07-10 11:52:12 -03:00
f560467aa1 SIENTIAPDE-1945: Delete values.yaml file. 2026-07-08 22:13:16 -03:00
724c2291a0 chore(sonar): Update SonarQube project key 2026-07-01 21:18:44 -03:00
027a100691 SIENTIAPDE-1646
Update .gitignore to include 'openspec' and 'collect_scripts'
2026-05-27 08:02:43 -03:00
07056c2cdf SIENTIAPDE-1646
Update PostgreSQL configuration in values.yaml

- Changed POSTGRES_USER from "sientia" to "postgres".
- Updated POSTGRES_PASSWORD to a new secure value.
2026-05-25 14:10:38 -03:00
34dbc886f3 SIENTIAPDE-1646
Update project configuration and dependencies

- Added .mypy_cache and .cursor to .gitignore.
- Changed asyncio_default_fixture_loop_scope and asyncio_default_test_loop_scope to "session" in pyproject.toml.
- Updated e2e testing dependencies in requirements-dev.txt, replacing fakeredis and mongomock with pytest-httpserver.
- Updated requirements.txt to use sientia_do instead of a specific git commit.
- Modified sonar-project.properties to remove a file from coverage exclusions.
- Enhanced E2E test fixtures in e2e/conftest.py for better container management.
- Cleaned up e2e test files related to CoreScouter and PIWebAPIScouter workflows.
2026-05-25 12:58:03 -03:00
aa91f69c4b SIENTIAPDE-1712
Remove validate.sh script and fix typo in POSTGRES_USER value in values.yaml
2026-03-24 11:48:58 -03:00
09658bee52 SIENTIAPDE-1712
Update values.yaml for GITHUB_BRANCH and POSTGRES credentials; add unique_columns to CoreScouter and related tests for conflict resolution.
2026-03-24 11:47:04 -03:00
d7cd9043b2 SIENTIAPDE-1712
Add unique constraint on (model_id, timestamp, variable) in schema and implement idempotent export test to ensure no duplicates are created. Update CoreScouter and related tests to handle conflict resolution by ignoring duplicates.
2026-03-24 11:34:57 -03:00
Matheus Demoner
909ad25b63 Merge pull request #30 from Aignosi/fix/SIENTIAPDE-1478
API Class: Add Headers Configuration
2026-01-29 10:48:30 -03:00
a9b098dca5 SIENTIAPDE-1478
Add headers configuration to test API for enhanced request handling
2026-01-29 10:04:10 -03:00
c8b287ecdd SIENTIAPDE-1478
Add headers configuration to API class for improved request handling
2026-01-27 11:43:46 -03:00
30b1bea846 Merge pull request #29 from Aignosi/fix/SIENTIAPDE-1478
Fix/sientiapde 1478
2026-01-23 13:49:27 -03:00
c904b85be2 Update tests.ipynb
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
2026-01-23 13:37:42 -03:00
1a91bee548 Update tests.ipynb
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
2026-01-23 13:37:28 -03:00
59e8f9c8c7 Update scouter/workflow/pi_web_api_scouter.py
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
2026-01-23 13:15:28 -03:00
dc8ff4db1a SIENTIAPDE-1478
Update sientia-dataops-library dependency version in requirements.txt from 1.8.0 to 1.8.2 for improved functionality.
2026-01-23 13:09:49 -03:00
cf367f2319 SIENTIAPDE-1478
Enhance API class to format timestamps correctly and improve logging. Update test cases to include 'end_time' parameter for better data retrieval flexibility.
2026-01-23 10:40:30 -03:00
fb4bef317d SIENTIAPDE-1478
Remove unused import for DATETIME_FORMAT_WITH_TZ in API class to streamline code and improve readability.
2026-01-23 10:10:52 -03:00
e64af1aa7c SIENTIAPDE-1478
Update tests.ipynb and API class in scouter module

- Reset execution counts in tests.ipynb for reproducibility.
- Removed unnecessary outputs and adjusted execution counts for clarity.
- Enhanced API class to accept 'end_time' parameter for improved data retrieval flexibility.
- Commented out timestamp formatting and normalization for future adjustments.
2026-01-21 15:38:22 -03:00
9dab8da5b3 SIENTIAPDE-1478
Refactor API class to remove unnecessary blank line and improve code readability. Update test cases to rename 'timeout' parameter to 'request_timeout' for consistency.
2026-01-19 10:11:36 -03:00
dc38309348 SIENTIAPDE-1478
Update tests.ipynb and prepare_worker.py

- Reset execution counts in tests.ipynb for reproducibility.
- Removed error outputs and added new tags in TAG_NAMES for enhanced data retrieval.
- Introduced JSON export of web_ids to 'web_ids.json' for better data management.
- Added comments in prepare_worker.py to clarify worker configuration parameters.
2026-01-13 15:53:25 -03:00
efeb29414e SIENTIAPDE-1478
Refactor timestamp normalization in API class to handle NaN values correctly by dropping them before calculating the maximum timestamp.
2026-01-12 12:38:59 -03:00