Skip to content

Conversation

@JustAnotherNormalDev
Copy link
Contributor

Description

Please describe the change you have made.

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.

- Add entry for version 7.90.0 with today's date (2025-11-26)
- Document new pause/resume functionality and is_paused field
- Follow conventional changelog format
- Add pause and resume methods to workflow triggers documentation section
- Follow existing documentation patterns and module paths
- Generated from docstrings for pause() and resume() methods
@JustAnotherNormalDev JustAnotherNormalDev requested review from a team as code owners November 26, 2025 06:49
@gemini-code-assist
Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

- Change expected error message from 'Workflow trigger not found' to 'Trigger not found'
- Match actual API response for non-existent trigger operations
- Fix failing integration test test_pause_resume_nonexistent_trigger
@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.27%. Comparing base (a2cc565) to head (9d4da32).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2413      +/-   ##
==========================================
- Coverage   91.28%   91.27%   -0.01%     
==========================================
  Files         192      192              
  Lines       26184    26190       +6     
==========================================
+ Hits        23903    23906       +3     
- Misses       2281     2284       +3     
Files with missing lines Coverage Δ
cognite/client/_api/workflows/triggers.py 95.00% <100.00%> (-5.00%) ⬇️
cognite/client/data_classes/workflows.py 95.96% <100.00%> (+0.01%) ⬆️

... and 4 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.

- Remove invalid Returns sections from void methods (pause/resume)
- Fix test to expect isPaused field even when None
- Remove unused WorkflowTaskExecution import
- Address custom repo check failures
- Fix line spacing and remove trailing whitespace
- Collapse multiline dictionaries to single lines
- Standardize code formatting across test files
- Fix test assertion for is_paused field when None
- Ensure consistency with project style guidelines
…g permanent one

- Create temporary trigger for testing pause/resume functionality
- Test pause and resume operations on the new trigger
- Clean up trigger after test completes
- Remove unnecessary additional tests as requested
…d field

- Add test for loading with parent_task_external_id present
- Add test for loading without parent_task_external_id (None case)
- Covers both workflow test files as requested
Only needed pause/resume tests, not parent_task_external_id tests
- Add pause() and resume() API methods for workflow triggers
- Add read-only is_paused field to track trigger state
- Include integration tests for pause/resume functionality
- Remove self-explanatory comments from code and tests
- Create dedicated trigger for testing instead of using permanent one
- Add proper cleanup in finally block to delete test trigger
- Use time-based external ID to ensure uniqueness
- Verify trigger remains paused after second pause call
- Verify trigger remains resumed after second resume call
- Ensures idempotent operations maintain correct state
- Remove unused WorkflowScheduledTriggerRule import
- Remove unused WorkflowTrigger import
- Remove unnecessary blank lines
Address PR review feedback from @haakonvt:
- Remove json={} from pause() POST request
- Remove json={} from resume() POST request
- POST requests without body content don't need empty json parameter
- Add missing try/except block in finally clause for trigger cleanup
- Fix IndentationError that was preventing test from running
- Remove duplicate finally: line that was causing syntax error
- Keep only one finally block with proper cleanup code
- Consolidated test coverage into parameterized test_dump_is_paused which handles all cases including None values
- Improved test suite cleanliness and maintainability
- Changed is_paused from optional (bool | None) to required (bool) parameter
- Moved is_paused before optional parameters to fix syntax
- Simplified dump() method to always include is_paused field
- Updated _load() method to require isPaused from API response (fail fast)
- Updated class docstring to reflect mandatory parameter
- Added test case to verify is_paused is always included in dump output
- Per code review feedback, this test was unnecessary
- The existing parameterized test already covers is_paused field behavior adequately
- Fixed extra empty line before assert statement
- Clean up formatting to have no unnecessary whitespace
- Fixed ruff check failure due to missing newline at end of file
- Files must end with a newline character per Python standards
VerstraeteBert
VerstraeteBert previously approved these changes Dec 10, 2025
@JustAnotherNormalDev JustAnotherNormalDev added waiting-for-risk-review Waiting for a member of the risk review team to take an action and removed waiting-for-team Waiting for the submitter or reviewer of the PR to take an action labels Dec 12, 2025
@erlendvollset erlendvollset added waiting-for-team Waiting for the submitter or reviewer of the PR to take an action and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Dec 12, 2025
@JustAnotherNormalDev JustAnotherNormalDev added waiting-for-risk-review Waiting for a member of the risk review team to take an action and removed waiting-for-team Waiting for the submitter or reviewer of the PR to take an action labels Dec 15, 2025
@JustAnotherNormalDev JustAnotherNormalDev added waiting-for-team Waiting for the submitter or reviewer of the PR to take an action and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Dec 15, 2025
@JustAnotherNormalDev JustAnotherNormalDev added waiting-for-risk-review Waiting for a member of the risk review team to take an action and removed waiting-for-team Waiting for the submitter or reviewer of the PR to take an action labels Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-review-ongoing Risk review is in progress waiting-for-risk-review Waiting for a member of the risk review team to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants