Skip to content

feat: add phase 4 resources - #25

Merged
Sivivatu merged 1 commit into
masterfrom
03-18-feat_add_phase_4_resources
Jun 23, 2026
Merged

feat: add phase 4 resources#25
Sivivatu merged 1 commit into
masterfrom
03-18-feat_add_phase_4_resources

Conversation

@Sivivatu

@Sivivatu Sivivatu commented Mar 18, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Documentation
    • Updated code examples for collection permission management, including expiration date handling
    • Revised credential management examples to reflect current supported operations: list, get, and delete only

@Sivivatu Sivivatu mentioned this pull request Mar 18, 2026

Sivivatu commented Mar 18, 2026

Copy link
Copy Markdown
Owner Author

@Sivivatu
Sivivatu marked this pull request as ready for review March 18, 2026 17:03
Copilot AI review requested due to automatic review settings March 18, 2026 17:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e31b59a05

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/alteryx_server_py/resources/credentials.py Outdated
Comment thread src/alteryx_server_py/resources/collections.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds new Alteryx Server V3 resource wrappers (collections, credentials, server) and wires them into the sync/async clients to expand the public API surface of alteryx_server_py.

Changes:

  • Introduces CollectionResource/AsyncCollectionResource, CredentialResource/AsyncCredentialResource, and ServerResource/AsyncServerResource.
  • Exposes the new resources via AlteryxClient / AsyncAlteryxClient properties and resources.__init__ exports.
  • Adds CollectionNotFoundError / CredentialNotFoundError and adjusts request header Content-Type handling for form/json/multipart requests.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/alteryx_server_py/resources/server.py New server info/settings resource (sync + async).
src/alteryx_server_py/resources/credentials.py New credential CRUD resource (sync + async) + response coercion helper.
src/alteryx_server_py/resources/collections.py New collections CRUD/share/permission APIs (sync + async) + response coercion helper.
src/alteryx_server_py/resources/init.py Re-exports newly added resources.
src/alteryx_server_py/exceptions.py Adds collection/credential-specific 404 exceptions.
src/alteryx_server_py/client.py Adds .collections/.credentials/.server properties + adjusts Content-Type selection.
src/alteryx_server_py/async_client.py Adds .collections/.credentials/.server properties + adjusts Content-Type selection.
src/alteryx_server_py/init.py Exposes new exceptions at package root.
Comments suppressed due to low confidence (2)

src/alteryx_server_py/client.py:154

  • These debug logs print the full data / json_data payload. With the new credential APIs sending passwords via data, enabling debug logging would leak secrets to logs. Redact sensitive fields (e.g., password/new_password/client_secret) or avoid logging request bodies altogether.
        logger.debug(f"{method} {url}")
        logger.debug(f"Params: {params}")
        logger.debug(f"Data: {data}")
        logger.debug(f"JSON: {json_data}")

src/alteryx_server_py/async_client.py:145

  • These debug logs print the full data / json_data payload. With the new credential APIs sending passwords via data, enabling debug logging would leak secrets to logs. Redact sensitive fields (e.g., password/new_password/client_secret) or avoid logging request bodies altogether.
        logger.debug(f"ASYNC {method} {url}")
        logger.debug(f"Params: {params}")
        logger.debug(f"Data: {data}")
        logger.debug(f"JSON: {json_data}")

Comment thread src/alteryx_server_py/resources/credentials.py Outdated
Comment thread src/alteryx_server_py/resources/collections.py Outdated
Comment thread src/alteryx_server_py/async_client.py
Comment thread src/alteryx_server_py/resources/collections.py
Comment thread src/alteryx_server_py/resources/credentials.py Outdated
Comment thread src/alteryx_server_py/resources/server.py Outdated
Comment thread src/alteryx_server_py/exceptions.py
@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f370fab3-d7a7-4d0e-9f2a-f363c07c4c4a

📥 Commits

Reviewing files that changed from the base of the PR and between bae74ce and 9f9034e.

📒 Files selected for processing (9)
  • README.md
  • src/alteryx_server_py/async_client.py
  • src/alteryx_server_py/client.py
  • src/alteryx_server_py/resources/collections.py
  • src/alteryx_server_py/resources/credentials.py
  • tests/unit/test_collection_resource.py
  • tests/unit/test_credential_resource.py
  • tests/unit/test_exceptions.py
  • tests/unit/test_server_resource.py

📝 Walkthrough

Walkthrough

Removes create and update methods from both sync and async CredentialResource classes. Switches CollectionResource.create (sync and async) from JSON-encoded to form-encoded request bodies, updates list return types from typing.List to built-in list, and suppresses request-body content from debug logs in both clients. Updates README examples and extends test coverage for exception types and the synchronous server resource.

Changes

Credential API reduction, collection encoding fix, and logging hardening

Layer / File(s) Summary
Remove credential create/update and update README example
src/alteryx_server_py/resources/credentials.py, tests/unit/test_credential_resource.py, README.md
Drops create and update from CredentialResource and AsyncCredentialResource, removes their imports, adds a test asserting neither method is exposed, and replaces the README credentials example with a list/get/delete flow.
Switch collection create to form-encoded body; update typing and README
src/alteryx_server_py/resources/collections.py, tests/unit/test_collection_resource.py, README.md
Changes create in both sync and async collection resource classes to pass the payload via data= instead of json_data=, updates return-type annotations from typing.List to list, adds Content-Type and exact body assertions to the create test, and extends the README permissions example with expiration_date and new datetime imports.
Suppress request body from debug logs
src/alteryx_server_py/client.py, src/alteryx_server_py/async_client.py
Replaces per-field (data, json_data) debug log statements with a single generic "request body omitted" message in both sync and async _request methods.
Exception and sync server resource test coverage
tests/unit/test_exceptions.py, tests/unit/test_server_resource.py
Adds a parametrized test verifying CollectionNotFoundError and CredentialNotFoundError message format, id attribute, and NotFoundError inheritance; adds a sync_client fixture and two synchronous tests for server info and settings retrieval.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • Sivivatu/AlteryxGalleryAPI#24: Introduced collection permission request models that define and serialize expirationDate, directly corresponding to this PR's addition of expiration_date to the README permissions example and the underlying collection request wiring.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 03-18-feat_add_phase_4_resources

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kilo-code-bot

kilo-code-bot Bot commented May 5, 2026

Copy link
Copy Markdown

Kilo Code Review could not run — your account is out of credits.

Add credits or switch to a free model to enable reviews on this change.

Sivivatu commented May 6, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

  • May 6, 12:05 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 6, 12:06 PM UTC: Graphite couldn't merge this pull request because a downstack PR removed comment section #22 failed to merge.
  • May 8, 9:29 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 8, 9:50 AM UTC: Graphite couldn't merge this pull request because a downstack PR removed comment section #22 failed to merge.
  • May 8, 10:58 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 8, 11:01 AM UTC: Graphite couldn't merge this pull request because a downstack PR feat: add phase 4 models #24 failed to merge.
  • Jun 22, 9:00 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 22, 9:21 AM UTC: Graphite couldn't merge this pull request because a downstack PR feat: add phase 4 models #24 failed to merge.
  • Jun 22, 9:47 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 22, 10:07 AM UTC: Graphite couldn't merge this pull request because a downstack PR feat: add phase 4 models #24 failed to merge.
  • Jun 22, 12:24 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 22, 12:45 PM UTC: Graphite couldn't merge this pull request because a downstack PR feat: add phase 4 models #24 failed to merge.
  • Jun 22, 5:29 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 22, 5:50 PM UTC: Graphite couldn't merge this pull request because a downstack PR feat: add phase 4 models #24 failed to merge.
  • Jun 23, 10:54 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 23, 11:16 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 23, 11:16 AM UTC: @Sivivatu merged this pull request with Graphite.

@Sivivatu
Sivivatu changed the base branch from 03-18-feat_add_phase_4_models to graphite-base/25 May 8, 2026 11:01
@Sivivatu
Sivivatu force-pushed the 03-18-feat_add_phase_4_resources branch from bb45e8a to 008081f Compare June 19, 2026 20:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 008081f227

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/alteryx_server_py/models/workflows.py
Comment thread .github/workflows/python-package.yml

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 008081f227

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/alteryx_server_py/models/workflows.py
Comment thread src/alteryx_server_py/resources/collections.py
@Sivivatu
Sivivatu force-pushed the 03-18-feat_add_phase_4_resources branch from 008081f to 3b2450f Compare June 22, 2026 08:39
@Sivivatu
Sivivatu force-pushed the 03-18-feat_add_phase_4_resources branch 2 times, most recently from 5739c59 to 1a80fef Compare June 22, 2026 08:48
@Sivivatu
Sivivatu force-pushed the 03-18-feat_add_phase_4_resources branch from 1a80fef to 68cbece Compare June 22, 2026 08:52
@kilo-code-bot

kilo-code-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No New Issues Found | Recommendation: Merge

This incremental review confirms all changes address previous findings:

  • Unused logging imports removed from collections.py and credentials.py (lines 3, 24)
  • json_datadata for form-encoding in collection create methods (lines 93-94, 363-364)
  • Sync client tests added to test_server_resource.py
  • Parametrized tests for CollectionNotFoundError and CredentialNotFoundError added
  • hasattr-based test for removed credential create/update methods added
  • CI workflow already includes main branch trigger (resolved)

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0
Files Reviewed (10 files)
  • .github/workflows/python-package.yml — Branch triggers now include both main and master
  • README.md — Documentation examples updated for new API surface
  • src/alteryx_server_py/async_client.py — Sensitive data logging removed
  • src/alteryx_server_py/client.py — Sensitive data logging removed
  • src/alteryx_server_py/resources/collections.py — Unused imports removed, form-encoding fixed, type hints updated to lowercase list[Collection]
  • src/alteryx_server_py/resources/credentials.py — Unused imports removed, create/update methods removed
  • tests/unit/test_collection_resource.py — Form-encoding assertion added for create
  • tests/unit/test_credential_resource.py — Negative tests for removed methods added
  • tests/unit/test_exceptions.py — Parametrized tests for CollectionNotFoundError and CredentialNotFoundError
  • tests/unit/test_server_resource.py — Sync client tests added
Previous Review Summaries (2 snapshots, latest commit 7f0e811)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 7f0e811)

Status: No New Issues Found | Recommendation: Merge

This incremental review confirms all changes address previous findings:

  • Unused logging imports removed from collections.py and credentials.py (lines 3, 24)
  • json_datadata for form-encoding in collection create methods (lines 93-94, 363-364)
  • Sync client tests added to test_server_resource.py
  • Parametrized tests for CollectionNotFoundError and CredentialNotFoundError added
  • hasattr-based test for removed credential create/update methods added
  • CI workflow already includes main branch trigger (resolved)

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0
Files Reviewed (10 files)
  • .github/workflows/python-package.yml — Branch triggers now include both main and master
  • README.md — Documentation examples updated for new API surface
  • src/alteryx_server_py/async_client.py — Sensitive data logging removed
  • src/alteryx_server_py/client.py — Sensitive data logging removed
  • src/alteryx_server_py/resources/collections.py — Unused imports removed, form-encoding fixed, type hints updated to lowercase list[Collection]
  • src/alteryx_server_py/resources/credentials.py — Unused imports removed, create/update methods removed
  • tests/unit/test_collection_resource.py — Form-encoding assertion added for create
  • tests/unit/test_credential_resource.py — Negative tests for removed methods added
  • tests/unit/test_exceptions.py — Parametrized tests for CollectionNotFoundError and CredentialNotFoundError
  • tests/unit/test_server_resource.py — Sync client tests added

Previous review (commit 68cbece)

Status: No New Issues Found | Recommendation: Merge

All introduced code changes have been verified against the existing review comments.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0
Existing Open Issues (from prior reviews, not duplicated)
  • src/alteryx_server_py/async_client.py / src/alteryx_server_py/client.py — Debug log lines that previously emitted data and json_data were removed; this addresses the earlier sensitive-data logging finding.
  • src/alteryx_server_py/models/workflows.py:104 — Validator rewrites executionMode=Standard to Safe; the ExecutionMode enum defines STANDARD = "Standard", so this path is valid and should not be coerced (open finding, not a new comment).
  • src/alteryx_server_py/resources/collections.py:94create now sends data= (form-encoded) matching the other collection mutation endpoints; covered by the updated test.
  • .github/workflows/python-package.yml:11pull_request trigger limited to master while the active base branch is main; add main so CI runs on PRs.
  • src/alteryx_server_py/resources/credentials.py — Breaking API change (removed create/update methods); covered by new hasattr test.
  • New resources (collections, credentials, server, exceptions) — New tests added; sync server resource coverage now present.
Files Reviewed (10 files)
  • src/alteryx_server_py/async_client.py — Log sanitization; no new issues
  • src/alteryx_server_py/client.py — Log sanitization; no new issues
  • src/alteryx_server_py/resources/collections.pyjson_data -> data for create; no new issues
  • src/alteryx_server_py/resources/credentials.py — Removed create/update; no new issues
  • tests/unit/test_collection_resource.py — Form-encoding assertion added; no new issues
  • tests/unit/test_credential_resource.py — Negative tests for removed methods; no new issues
  • tests/unit/test_exceptions.py — Parametrized phase-4 exception tests; no new issues
  • tests/unit/test_server_resource.py — Sync client tests added; no new issues
  • .github/workflows/python-package.yml — Branch trigger mismatch (open finding above)
  • src/alteryx_server_py/models/workflows.pyExecutionMode coercion bug (open finding above)
  • README.md — Example updated to reflect new API surface

Fix these issues in Kilo Cloud


Reviewed by laguna-m.1-20260312:free · Input: 245.6K · Output: 3.3K · Cached: 83.9K

@Sivivatu
Sivivatu changed the base branch from graphite-base/25 to 03-18-feat_add_phase_4_models June 22, 2026 08:59
@Sivivatu
Sivivatu force-pushed the 03-18-feat_add_phase_4_models branch from 41abc4f to a295dd4 Compare June 22, 2026 09:09
@Sivivatu
Sivivatu force-pushed the 03-18-feat_add_phase_4_resources branch from 68cbece to 7f0e811 Compare June 22, 2026 09:09
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Sivivatu
Sivivatu changed the base branch from 03-18-feat_add_phase_4_models to master June 23, 2026 11:14
@Sivivatu
Sivivatu force-pushed the 03-18-feat_add_phase_4_resources branch from 7f0e811 to 9f9034e Compare June 23, 2026 11:15
@Sivivatu
Sivivatu merged commit 9c43848 into master Jun 23, 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants