-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Memento Database - new components #19537
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
WalkthroughAdds a full Memento Database integration: new actions (create/get/list/update entries), two polling sources (new-entry-created, entry-updated) built on a reusable polling base, an API client and prop definitions in the app, a recursive JSON parse utility, and a package version bump to 0.1.0. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 5
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
components/memento_database/actions/create-entry/create-entry.mjs(1 hunks)components/memento_database/actions/get-library/get-library.mjs(1 hunks)components/memento_database/actions/list-entries/list-entries.mjs(1 hunks)components/memento_database/actions/update-entry/update-entry.mjs(1 hunks)components/memento_database/common/utils.mjs(1 hunks)components/memento_database/memento_database.app.mjs(1 hunks)components/memento_database/package.json(2 hunks)components/memento_database/sources/common/base-polling.mjs(1 hunks)components/memento_database/sources/entry-updated/entry-updated.mjs(1 hunks)components/memento_database/sources/new-entry-created/new-entry-created.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2024-10-30T15:24:39.294Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Applied to files:
components/memento_database/actions/create-entry/create-entry.mjs
📚 Learning: 2024-10-10T19:18:27.998Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Applied to files:
components/memento_database/sources/entry-updated/entry-updated.mjscomponents/memento_database/sources/common/base-polling.mjs
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
components/memento_database/package.json
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
Applied to files:
components/memento_database/memento_database.app.mjs
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.
Applied to files:
components/memento_database/memento_database.app.mjs
🧬 Code graph analysis (3)
components/memento_database/actions/create-entry/create-entry.mjs (2)
components/memento_database/actions/update-entry/update-entry.mjs (1)
entry(40-47)components/memento_database/common/utils.mjs (2)
parseJson(1-40)parseJson(1-40)
components/memento_database/sources/entry-updated/entry-updated.mjs (1)
components/memento_database/sources/common/base-polling.mjs (1)
ts(81-81)
components/memento_database/actions/update-entry/update-entry.mjs (2)
components/memento_database/actions/create-entry/create-entry.mjs (1)
entry(31-37)components/memento_database/common/utils.mjs (2)
parseJson(1-40)parseJson(1-40)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (15)
components/memento_database/package.json (1)
1-18: LGTM!Version bump and dependency addition are appropriate for the new action and source components. The
@pipedream/platformdependency is correctly added to support the polling infrastructure and configuration utilities used throughout the new modules.components/memento_database/sources/common/base-polling.mjs (2)
44-55: LGTM - Abstract method pattern.The abstract methods with
ConfigurationErrorthrows enforce implementation by subclasses, which is the correct pattern for this base polling framework.
100-107: No action needed. The implementation is correct.The review comment is based on incorrect assumptions about item ordering. The Memento API returns entries sorted by creation time, from newest to oldest. The code collects items in the order received from the API (newest-first), and when
maxis specified, the truncation at line 100-102 retains the first 10 items—which are the newest entries, not older ones as the comment suggests. Additionally, Pipedream automatically emits events from oldest to newest when you add a timestamp, which handles the ordering correctly regardless of the emit sequence. Items are not emitted in oldest-first order; they're emitted in the order collected from the API. The current behavior properly ensures that during deploy, the 10 most recent entries are fetched and emitted, with Pipedream's system handling the final chronological ordering.components/memento_database/common/utils.mjs (1)
14-18: WeakSet circular detection resets on nested JSON strings.When a JSON string is parsed at line 15,
parseJsonis called recursively, creating a newWeakSet. This means circular reference detection doesn't persist across JSON parsing boundaries. If the parsed JSON contains an object reference that was already seen in an outer structure, it won't be detected.This is likely acceptable given the use case (parsing user-provided field values), but worth noting for maintainability.
components/memento_database/actions/create-entry/create-entry.mjs (1)
30-40: LGTM!The action correctly uses
parseJsonto handle the fields input, passes the required parameters tocreateEntry, and provides a helpful summary. The implementation is consistent with theupdate-entryaction pattern.components/memento_database/actions/get-library/get-library.mjs (1)
1-31: LGTM!Clean implementation of a read-only action. Annotations correctly indicate
readOnlyHint: true, and the action properly retrieves and returns the library with an informative summary.components/memento_database/actions/update-entry/update-entry.mjs (2)
23-31: Good use of dependent prop definition.The
entryIdprop correctly uses a function to passlibraryIdfor dynamic options, ensuring entries are filtered by the selected library.
39-50: LGTM!The run function correctly parses fields, calls the update API, and provides a clear summary. Implementation is consistent with the create-entry pattern.
components/memento_database/actions/list-entries/list-entries.mjs (1)
47-62: LGTM - Clean implementation with proper pluralization.The run function correctly passes all pagination parameters and handles singular/plural forms in the summary.
components/memento_database/sources/entry-updated/entry-updated.mjs (2)
18-19: Good filtering logic for updates only.The
isRelevantcheck correctly excludes newly created entries (wheremodifiedTime === createdTime) ensuring this source only emits genuine update events.
21-28: LGTM - Composite ID enables multiple events per entry.Using
${entry.id}-${ts}as the event ID correctly allows the same entry to emit multiple update events over time, each with a unique identifier.components/memento_database/memento_database.app.mjs (4)
7-20: LGTM! Well-structured dynamic options for library selection.The libraryId prop correctly implements async options with proper null-safety using optional chaining and a fallback to an empty array. The mapping to
{ value, label }format follows Pipedream conventions.
21-47: LGTM! Pagination correctly implemented.The entryId prop properly implements pagination using
prevContextandnextPageToken, following Pipedream's pagination patterns. The optional chaining ensures safe access to the entries array.
70-109: LGTM! API methods follow consistent patterns.The API client methods are well-structured with:
- Consistent destructuring pattern for required parameters
- Appropriate HTTP methods (GET, POST, PATCH)
- Flexible
...optsspreading for additional request options- Clean path construction using template literals
The implementation follows Pipedream best practices for app files.
58-69: Authentication method is correct per Memento Database API documentation.The Memento Database API uses query parameters for authentication token, as shown in official integration examples:
params: { token:${this.memento_database.$auth.api_token}, }The implementation correctly follows this pattern.
components/memento_database/sources/new-entry-created/new-entry-created.mjs
Show resolved
Hide resolved
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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
components/memento_database/actions/list-entries/list-entries.mjs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (1)
components/memento_database/actions/list-entries/list-entries.mjs (1)
28-33: Past review feedback addressed.The
startRevisionprop type has been correctly changed to"integer", resolving the previous review comment about type consistency with the polling sources and API expectations.
GTFalcao
left a comment
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.
LGTM!
For Integration QA: |
Resolves #17639
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.