-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Seqera: List Workflows, not Runs #14464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
@olgabot is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
WalkthroughThe changes in this pull request involve a significant update to the Changes
Suggested reviewers
Tip CodeRabbit can generate a title for your PR based on the changes.Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- components/seqera/seqera.app.mjs (1 hunks)
🔇 Additional comments (2)
components/seqera/seqera.app.mjs (2)
168-172
: 🛠️ Refactor suggestion
Consider adding workspaceId to propDefinitions.
Since workspaceId
is a required parameter and already defined in propDefinitions for other methods, consider updating the documentation to indicate it's required.
Apply this diff to update the prop definition:
workspaceId: {
type: "string",
label: "Workspace ID",
description: "The ID of the workspace to use.",
- optional: true,
+ optional: false,
async options() {
Likely invalid or redundant comment.
168-172
: Verify pagination handling for workflows endpoint.
The method is using the generic _makeRequest
, but we should verify if the Seqera workflows endpoint supports pagination and if it follows the same pattern as other endpoints.
Let's check if other files in the codebase use this endpoint and how they handle pagination:
✅ Verification successful
Let me search for more context about pagination patterns in the codebase.
Let me check the constants and any pagination-related configuration in the codebase.
Based on the search results, I can see that the Seqera API uses pagination with page_size
and page_token
parameters, and the codebase has a standard pagination implementation in getIterations
method that handles this pattern. The listWorkflows
method is properly integrated with this pagination mechanism through _makeRequest
.
Pagination is properly implemented for the workflows endpoint
The endpoint follows the standard pagination pattern used across the Seqera API:
- Uses
page_size
parameter (default 50) - Returns
next_page_token
for subsequent requests - Integrated with the common
getIterations
pagination handler
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for workflow endpoint usage and pagination patterns
rg -l "workflow\?workspaceId" | while read -r file; do
echo "=== $file ==="
rg -A 10 "workflow\?workspaceId" "$file"
done
Length of output: 466
Script:
#!/bin/bash
# Search for pagination related patterns and getIterations usage
rg -A 10 "getIterations" components/seqera/seqera.app.mjs
# Look for other API endpoints that might show pagination patterns
rg -A 5 "_makeRequest" components/seqera/seqera.app.mjs
# Check if there are any pagination related parameters in the codebase
rg -i "pageSize|nextPageToken|offset|limit" components/seqera/seqera.app.mjs
Length of output: 1896
Script:
#!/bin/bash
# Check constants file for pagination defaults
rg -A 5 "DEFAULT_LIMIT|DEFAULT_MAX" .
# Look for the actual implementation of getIterations to understand pagination logic
ast-grep --pattern 'async *getIterations($_) {
$$$
}'
Length of output: 281629
Hi everyone, all test cases are passed! Ready for release! Test report |
* List Workflows, not Runs * updates * pnpm-lock.yaml --------- Co-authored-by: michelle0927 <[email protected]>
WHY
As mentioned (#14358), Seqera "runs" turns out to be named "workflows" in the API (unlike "runs", which I called them in my original request #10142). The Seqera Pipedream app needs to call
/workflows
in the API, while specifying the workspace ID withworkspaceId
. From my testing, IfworkspaceId
is not specified, then no workflow runs are returned, soworkspaceId
is required, and I think should be specified when creating the integration, kind of like with Notion, you specify which databases the integration has access to.getResourcesFn
incomponents/seqera/sources/new-run-created/new-run-created.mjs
also needs to be updated tolistWorkflows
:pipedream/components/seqera/sources/new-run-created/new-run-created.mjs
Line 27 in 46e7530
Let me know how I can help!
Summary by CodeRabbit
New Features
listRuns
tolistWorkflows
, enhancing clarity in functionality.workspaceId
for workflow retrieval.workspaceId
added to support event emission for new workflows.Bug Fixes
Chores