Skip to content

fix(functions): list schedules with function external id - #2783

Open
MortGron wants to merge 3 commits into
masterfrom
function-schedules-list-with-function-external-id
Open

fix(functions): list schedules with function external id#2783
MortGron wants to merge 3 commits into
masterfrom
function-schedules-list-with-function-external-id

Conversation

@MortGron

@MortGron MortGron commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Description

Specifying function_external_id in schedules.list always return an empty list even though schedules exists:

image

Pytest has been updated to v9 to support subtests

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.

@MortGron
MortGron marked this pull request as ready for review August 23, 2026 08:40
@MortGron
MortGron requested review from a team as code owners August 23, 2026 08:40
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.06%. Comparing base (56aa085) to head (ae0d23a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2783      +/-   ##
==========================================
+ Coverage   93.03%   93.06%   +0.03%     
==========================================
  Files         515      515              
  Lines       53006    53017      +11     
==========================================
+ Hits        49313    49340      +27     
+ Misses       3693     3677      -16     
Files with missing lines Coverage Δ
cognite/client/_api/functions/schedules.py 88.23% <100.00%> (+0.93%) ⬆️
cognite/client/_sync_api/functions/schedules.py 96.87% <ø> (ø)
tests/tests_integration/test_api/test_functions.py 86.61% <100.00%> (+0.66%) ⬆️

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the function schedules listing API to retrieve and filter by a function's internal ID when an external ID is provided, returning an empty list if the function is not found. It also bumps the pytest dependency to >=9 and adds integration tests for these changes. However, the new tests introduce the subtests fixture, which requires the pytest-subtests package that is not declared in the project dependencies.

Comment thread tests/tests_integration/test_api/test_functions.py
Comment thread tests/tests_integration/test_api/test_functions.py
Comment thread cognite/client/_api/functions/schedules.py
@haakonvt

Copy link
Copy Markdown
Contributor

@HMEiding could you take a quick look on this one?

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.

2 participants