Skip to content

chore: Convert to Tokio + Reqwest#1868

Open
dbanty wants to merge 1 commit intomainfrom
push-zlpmllnwsnuv
Open

chore: Convert to Tokio + Reqwest#1868
dbanty wants to merge 1 commit intomainfrom
push-zlpmllnwsnuv

Conversation

@dbanty
Copy link
Copy Markdown
Member

@dbanty dbanty commented Mar 27, 2026

Enable future parallel requests and standard retry policy libraries

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates Knope’s networked integrations from ureq to async reqwest and introduces a Tokio runtime entrypoint, enabling future concurrent HTTP operations and reuse of standard async retry/middleware patterns.

Changes:

  • Converted workflow/step execution to async and switched CLI entrypoint to #[tokio::main].
  • Replaced ureq usage across GitHub/Gitea/Jira integrations with reqwest, adding a shared HTTP helper module.
  • Updated dependency configuration (reqwest, tokio) and cargo-deny duplicate-skip rules accordingly.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
deny.toml Adjusts cargo-deny duplicate skip-tree entries for new dependency graph.
crates/knope/src/workflow.rs Makes workflow execution/validation async.
crates/knope/src/step/releases/mod.rs Makes release step async and awaits forge release calls.
crates/knope/src/step/releases/github.rs Makes GitHub release step async.
crates/knope/src/step/releases/gitea.rs Makes Gitea release step async.
crates/knope/src/step/mod.rs Makes Step::run async and awaits async steps.
crates/knope/src/step/issues/jira.rs Replaces Jira HTTP calls with reqwest client usage.
crates/knope/src/step/issues/github.rs Replaces GitHub issues query with reqwest and async flow.
crates/knope/src/step/issues/gitea.rs Awaits async issue listing for Gitea.
crates/knope/src/step/create_pull_request.rs Awaits async PR creation for GitHub/Gitea.
crates/knope/src/state.rs Stores reqwest::Client in forge states instead of ureq::Agent.
crates/knope/src/main.rs Converts main to async and starts Tokio runtime.
crates/knope/src/integrations/mod.rs Refactors HTTP helpers into a dedicated module and re-exports helpers.
crates/knope/src/integrations/http.rs Adds shared reqwest client builder + response handling.
crates/knope/src/integrations/github/mod.rs Updates GitHub integration state init to reqwest::Client.
crates/knope/src/integrations/github/create_release.rs Converts GitHub release creation + asset upload to reqwest.
crates/knope/src/integrations/github/create_pull_request.rs Converts GitHub PR create/update to reqwest.
crates/knope/src/integrations/gitea/mod.rs Updates Gitea integration state init to reqwest::Client.
crates/knope/src/integrations/gitea/list_issues.rs Converts Gitea issue listing to reqwest.
crates/knope/src/integrations/gitea/create_release.rs Converts Gitea release creation to reqwest.
crates/knope/src/integrations/gitea/create_pull_request.rs Converts Gitea PR create/update to reqwest.
crates/knope/Cargo.toml Swaps ureq for reqwest + adds tokio.
Cargo.lock Lockfile updates for new async HTTP stack dependencies.

Comment thread crates/knope/src/integrations/mod.rs
Comment thread crates/knope/src/integrations/github/create_release.rs Outdated
Comment thread crates/knope/src/integrations/github/create_release.rs Outdated
Comment thread crates/knope/src/integrations/http.rs Outdated
@dbanty dbanty force-pushed the push-zlpmllnwsnuv branch 2 times, most recently from 48bed4a to 58d2813 Compare March 30, 2026 19:10
@dbanty dbanty requested a review from Copilot March 30, 2026 19:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated 4 comments.

Comment thread crates/knope/src/integrations/github/create_release.rs Outdated
Comment thread crates/knope/src/integrations/http.rs Outdated
Comment thread crates/knope/src/integrations/gitea/create_pull_request.rs Outdated
Comment thread crates/knope/src/integrations/gitea/mod.rs Outdated
@dbanty dbanty force-pushed the push-zlpmllnwsnuv branch 3 times, most recently from dd57c96 to 98d4dca Compare March 30, 2026 19:29
@dbanty dbanty force-pushed the push-zlpmllnwsnuv branch from 98d4dca to eaeeecd Compare March 30, 2026 19:31
@dbanty
Copy link
Copy Markdown
Member Author

dbanty commented Mar 30, 2026

@copilot please make a new PR which adds some integration tests for these services since changing them all seems risky. Assume I can create repos/accounts for testing and will provide required tokens/credentials in CI only. Don't make these tests run by default, only in their own CI job/context where I can put the secrets.

You can choose what is easiest from:

  1. Writing integration tests in Rust, potentially using some of the helpers from existing tests
  2. Writing tests in Python to better coordinate with checking results from external services
  3. Scripting the tests with nushell if it would be less code / easier to maintain

Make sure to provide in that PR instructions on how to set up the required repos/accounts for the tests.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

@dbanty I've opened a new pull request, #1871, to work on those changes. Once the pull request is ready, I'll request review from you.

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.

3 participants