Skip to content

Updating python sdk to include group_by at dashboard level#703

Merged
yec-akamai merged 3 commits into
linode:devfrom
mawasthy-lgtm:add-groupby-to-monitor-dashboard
Jun 4, 2026
Merged

Updating python sdk to include group_by at dashboard level#703
yec-akamai merged 3 commits into
linode:devfrom
mawasthy-lgtm:add-groupby-to-monitor-dashboard

Conversation

@mawasthy-lgtm
Copy link
Copy Markdown
Contributor

@mawasthy-lgtm mawasthy-lgtm commented May 27, 2026

📝 Description

Updating python sdk to include group_by at dashboard level

What does this PR do and why is this change necessary?

Adds full SDK support for Monitor Dashboards (list, get, filter by service type) used by tests and examples.
Ensures dashboard-level and widget-level [group_by] fields are parsed and exposed as per the latest API response.
Makes integration fixtures resilient to new dashboard types and groupings, ensuring robust response throughout.

This change is necessary because:

The SDK was missing support for dashboard-level [group_by] causing mismatches with the API response.

✔️ How to Test
Clone the repository
Prepare environment (zsh / macOS)

✔️create & activate venv (recommended)
python3 -m venv .venv
source .venv/bin/activate

install deps
python -m pip install --upgrade pip

Install runtime dependencies:
pip3 install requests polling deprecated

Install dev/test extras
pip3 install -e '.[dev,test]'

test deps
pip3 install pytest mock httpretty pytest-rerunfailures

✔️How do I run the relevant unit tests?
cd <PROJECT_DIRECTORY>/linode_api4-python
Unit tests: python -m pytest test/unit -q

Unit test for all monitor: python -m pytest test/unit/objects/monitor_test.py -q -s

Single unit: python -m pytest test/unit/objects/monitor_test.py::MonitorTest -q -s

What are the steps to reproduce the issue or verify the changes?
End to end integration testing should suffice

✔️How do I run the relevant integration tests?
Integration tests (E2E):
Note:
#if you have PAT token with write access only to Monitor and read for rest of the services for integration
export SKIP_E2E_FIREWALL=1 # optional: skip firewall autouse fixture
export LINODE_TOKEN="YOUR_REAL_TOKEN" # required for integration
export SKIP_E2E_FIREWALL=1 # optional: skip firewall autouse fixture

python -m pytest test/integration/models/monitor/test_monitor.py::test_get_all_dashboards -q -s

@mawasthy-lgtm mawasthy-lgtm requested review from a team as code owners May 27, 2026 11:24
@mawasthy-lgtm mawasthy-lgtm requested review from ezilber-akamai and psnoch-akamai and removed request for a team May 27, 2026 11:24
@mawasthy-lgtm mawasthy-lgtm marked this pull request as draft May 27, 2026 11:24
@mawilk90 mawilk90 requested review from mawilk90 and yec-akamai May 27, 2026 11:27
@mawasthy-lgtm mawasthy-lgtm marked this pull request as ready for review June 3, 2026 09:43
@yec-akamai yec-akamai added the community-contribution for contributions made by a non-DX author label Jun 4, 2026
@yec-akamai yec-akamai added the improvement for improvements in existing functionality in the changelog. label Jun 4, 2026
@yec-akamai yec-akamai merged commit 1b1eaff into linode:dev Jun 4, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution for contributions made by a non-DX author improvement for improvements in existing functionality in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants