Skip to content

Fix ripcord bug in generic-api#4972

Merged
dskloetc merged 1 commit into
mainfrom
kloet/generic-api-ripcord
May 18, 2026
Merged

Fix ripcord bug in generic-api#4972
dskloetc merged 1 commit into
mainfrom
kloet/generic-api-ripcord

Conversation

@dskloetc

Copy link
Copy Markdown
Contributor

Description

Currently, when the ripcord field is absent in the response, this does not cause an error even when the ripcord path is configured in the params.

The ripcord path is optional so when it's configured, it should be interpreted as expected in the response.

Changes

  1. Don't skip ripcord check if ripcord is absent in the response but present in the params.

Steps to Test

  1. yarn test packages/sources/generic-api
  2. I tested it with all 18 existing feeds and streams that use generic-api with ripcord.

Quality Assurance

  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant infra-k8s configuration file.
  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant adapter-secrets configuration file.
  • If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • This is related to a maximum of one Jira story or GitHub issue.
  • Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.

@changeset-bot

changeset-bot Bot commented May 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4d12c52

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chainlink/generic-api-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dskloetc dskloetc marked this pull request as ready for review May 18, 2026 13:54
@danwilliams-cll danwilliams-cll requested a review from Copilot May 18, 2026 14:55
@danwilliams-cll danwilliams-cll self-requested a review May 18, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates generic-api ripcord handling so configured ripcord paths are no longer silently skipped when absent from provider responses.

Changes:

  • Adjusts ripcord comparison logic in shared transport utilities.
  • Updates HTTP and integration tests/snapshots for ripcord-present vs ripcord-absent behavior.
  • Adds a patch changeset for the adapter.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/sources/generic-api/src/transport/utils.ts Updates ripcord activation check logic.
packages/sources/generic-api/test/unit/http.test.ts Updates and adds HTTP transport ripcord tests.
packages/sources/generic-api/test/integration/adapter.test.ts Removes ripcord config from a success fixture request.
packages/sources/generic-api/test/integration/__snapshots__/adapter.test.ts.snap Updates expected integration response snapshot.
.changeset/petite-parents-win.md Adds patch release note.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/sources/generic-api/src/transport/utils.ts
@dskloetc dskloetc merged commit 7191dd0 into main May 18, 2026
21 of 22 checks passed
@dskloetc dskloetc deleted the kloet/generic-api-ripcord branch May 18, 2026 15:02
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