Skip to content

fix(SyntheticTimeSeries): synthetic time series query fails when variable contains certain characters - #2766

Draft
MortGron wants to merge 1 commit into
masterfrom
synthetic-time-series-variables-with-dash
Draft

fix(SyntheticTimeSeries): synthetic time series query fails when variable contains certain characters#2766
MortGron wants to merge 1 commit into
masterfrom
synthetic-time-series-variables-with-dash

Conversation

@MortGron

Copy link
Copy Markdown
Contributor

Description

By mistake, synthetic time series queries will fail when re.escape(var) != var for some variable var in a query expression before variable replacement. However, they do not fail when variables contain characters like \.

Even though this fixes a bug, a long term solution to make variable names safer is #2762

Checklist:

  • Tests added/updated.
  • Documentation updated. Documentation is generated from docstrings - these must be updated according to your change.
    If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.
  • The PR title follows the Conventional Commit spec.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.82%. Comparing base (60b6c36) to head (7a00f08).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2766      +/-   ##
==========================================
+ Coverage   93.77%   93.82%   +0.04%     
==========================================
  Files         513      513              
  Lines       52445    52620     +175     
==========================================
+ Hits        49181    49369     +188     
+ Misses       3264     3251      -13     
Files with missing lines Coverage Δ
cognite/client/_api/synthetic_time_series.py 95.96% <100.00%> (ø)
cognite/client/_sync_api/synthetic_time_series.py 100.00% <ø> (ø)
.../tests_unit/test_api/test_synthetic_time_series.py 97.60% <100.00%> (ø)

... and 18 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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