Skip to content

APP-8346 Fix problem in async iterator in AsyncWorkflowSearchResponse#709

Merged
Aryamanz29 merged 2 commits intomainfrom
APP-8346
Sep 1, 2025
Merged

APP-8346 Fix problem in async iterator in AsyncWorkflowSearchResponse#709
Aryamanz29 merged 2 commits intomainfrom
APP-8346

Conversation

@ErnestoLoma
Copy link
Copy Markdown
Contributor

@ErnestoLoma ErnestoLoma commented Aug 27, 2025

✨ Description

Fix Fix problem in async iterator in AsyncWorkflowSearchResponse

Jira link: APP-8346


🧩 Type of change

Select all that apply:

  • 🚀 New feature (non-breaking change that adds functionality)
  • 🐛 Bug fix (non-breaking change that fixes an issue) — please include tests! Refer testing-toolkit 🧪
  • 🔄 Refactor (code change that neither fixes a bug nor adds a feature)
  • 🧹 Maintenance (chores, cleanup, minor improvements)
  • 💥 Breaking change (fix or feature that may break existing functionality)
  • 📦 Dependency upgrade/downgrade
  • 📚 Documentation updates

✅ How has this been tested? (e.g. screenshots, logs, workflow links)

Describe how the change was tested. Include:

  • Added additional check in integration test

📋 Checklist

  • [ X] My code follows the project’s style guidelines
  • [ x] I’ve performed a self-review of my code
  • I’ve added comments in tricky or complex areas
  • I’ve updated the documentation as needed
  • There are no new warnings from my changes
  • [ X] I’ve added tests to cover my changes
  • [ x] All new and existing tests pass locally

Copy link
Copy Markdown
Member

@Aryamanz29 Aryamanz29 left a comment

Choose a reason for hiding this comment

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

LGTM - looks like we missed this when adding iterative pagination to WorkflowSearchResponse.

Just one minor change: can we also update the sync variant ie: WorkflowSearchResponse? 🙏

def _get_next_page(self):
request = WorkflowSearchRequest(
query=self._criteria, from_=self._start, size=self._size
)

@Aryamanz29 Aryamanz29 added the bugfix Bug fix pull request label Aug 28, 2025
@ErnestoLoma
Copy link
Copy Markdown
Contributor Author

LGTM - looks like we missed this when adding iterative pagination to WorkflowSearchResponse.

Just one minor change: can we also update the sync variant ie: WorkflowSearchResponse? 🙏

def _get_next_page(self):
request = WorkflowSearchRequest(
query=self._criteria, from_=self._start, size=self._size
)

@Aryamanz29 I will need to investigate further because the following already works:

from pyatlan.client.atlan import AtlanClient
from pyatlan.model.enums import AtlanWorkflowPhase

client = AtlanClient()

def doit():
    results = client.workflow.find_runs_by_status_and_time_range(
        status=[AtlanWorkflowPhase.SUCCESS, AtlanWorkflowPhase.FAILED],
        started_at=f"now-2h",
    )
    for result in results:
        print(type(result))

if __name__ == '__main__':
    doit()

@ErnestoLoma ErnestoLoma requested a review from Aryamanz29 August 28, 2025 14:44
@Aryamanz29 Aryamanz29 merged commit 7fb7919 into main Sep 1, 2025
553 of 610 checks passed
@Aryamanz29 Aryamanz29 deleted the APP-8346 branch September 1, 2025 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fix pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants