Skip to content

rapidpro: migrate from deprecated common-http to fetch #1166

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

Merged
merged 7 commits into from
Apr 29, 2025

Conversation

hunterachieng
Copy link
Contributor

@hunterachieng hunterachieng commented Apr 28, 2025

Summary

Migrate rapidpro from deprecated common-http to fetch

Fixes #1120

Details

The current rapidpro is using the deprecated common-http.
We resorted to using fetch from undici as common.request returns 403

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to
know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our
Responsible AI Policy

Review Checklist

Before merging, the reviewer should check the following items:

  • Does the PR do what it claims to do?
  • If this is a new adaptor, added the adaptor on marketing website ?
  • If this PR includes breaking changes, do we need to update any jobs in
    production? Is it safe to release?
  • Are there any unit tests?
  • Is there a changeset associated with this PR? Should there be? Note that
    dev only changes don't need a changeset.
  • Have you ticked a box under AI Usage?

Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
@hunterachieng hunterachieng changed the base branch from main to feature/1120-common-migration April 28, 2025 14:03
@hunterachieng hunterachieng requested a review from mtuchi April 28, 2025 14:14
@josephjclark
Copy link
Collaborator

Great notes in the PR body here, thanks!

Copy link
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

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

In the exports of Adaptor.js, at the bottom of the file, I can see that http is exported, with a comment.

This comment is now outdated. I also think we should NOT export http at this time. I'd just remove that whole line. And maybe mention this in the changelog too (the http namespace has been removed)

Signed-off-by: Hunter Achieng <[email protected]>
Copy link
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

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

Great!

@josephjclark
Copy link
Collaborator

rapidpro tests are passing so I'm happy to merge this with the failing test (which will be resolved elsewhere)

@josephjclark josephjclark merged commit bc409de into feature/1120-common-migration Apr 29, 2025
1 of 2 checks passed
@josephjclark josephjclark deleted the feature/update-rapidpro branch April 29, 2025 09:01
josephjclark pushed a commit that referenced this pull request May 1, 2025
* feat: update rapidpro

Signed-off-by: Hunter Achieng <[email protected]>

* feat: add changeset

Signed-off-by: Hunter Achieng <[email protected]>

* fix: remove config and fix r`return await`

Signed-off-by: Hunter Achieng <[email protected]>

* fix: update changeset

Signed-off-by: Hunter Achieng <[email protected]>

* fix: remove export of http

Signed-off-by: Hunter Achieng <[email protected]>

* fix: update changeset with removal of http export

Signed-off-by: Hunter Achieng <[email protected]>

* fix: remove nock

Signed-off-by: Hunter Achieng <[email protected]>

---------

Signed-off-by: Hunter Achieng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Common adaptor migration
2 participants