Skip to content
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

Cu 86bzhmv6z custom aux gid not accepted during golden record creation or restoration #273

Conversation

martino-jembi
Copy link
Contributor

@martino-jembi martino-jembi commented Jul 12, 2024

@MatthewErispe I think the logic needs a sanity check. Do you see any potential knock-on effects of the change to the java and scala "Generate" inputs? Seems safe from what I see.

And this "interactionField" argument added to the "generate" prop:
{ "fieldName": "aux_gid", "fieldType": "String", "source": { "generate": { "func": "AppUtils::autoGenerateId", **"interactionField": "aux_gid"** } } }

We could make this more generic, like an "args" object, if the future scope of "generate > func" is likely to expand? Could introduce type safety issues doing it that way so just checking what you think...

Summary by CodeRabbit

  • New Features

    • Introduced interactionField in various components for enhanced field mapping and data population logic.
    • Added defaultIfFalsy method for handling default values in utilities.
  • Refactor

    • Improved constructor logic in AuxGoldenRecordData to handle new interaction field conditions.
  • Chores

    • Cleaned up unused logging imports and declarations in utility components.

@rcrichton
Copy link
Member

Copy link
Contributor

coderabbitai bot commented Jul 12, 2024

Walkthrough

Recent updates affect various components across the JeMPI application. The Generate case class now includes an interactionField, enhancing data configuration. AppUtils has been streamlined and enriched with a utility method. Configuration JSON files were updated to align with these changes, and constructor logic in AuxGoldenRecordData was refined for improved handling of interaction fields.

Changes

File Path Change Summary
JeMPI_Apps/JeMPI_EM_Scala/.../Config.scala Updated Generate case class to include an optional interactionField.
JeMPI_Apps/JeMPI_LibShared/.../Generate.java Added new field interactionField and a constructor in the Generate record.
JeMPI_Apps/JeMPI_LibShared/.../AuxGoldenRecordData.java Refactored constructor logic to better handle interactionField conditions.
JeMPI_Apps/JeMPI_LibShared/.../AppUtils.java Removed logging imports and LOGGER, added defaultIfFalsy method.
devops/linux/docker/.../config-reference-link-dp.json Added new field aux_gid and updated existing fields with interactionField properties.

Poem

In the land of JeMPI's code,
New fields and methods now unfold,
Interaction fields with grace,
Default values take their place,
Logging's gone, but fear not dear,
For clarity is very near. 🌟


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9963b83 and 57ee869.

Files selected for processing (5)
  • JeMPI_Apps/JeMPI_EM_Scala/src/main/scala/org/jembi/jempi/em/config/Config.scala (2 hunks)
  • JeMPI_Apps/JeMPI_LibShared/src/main/java/org/jembi/jempi/shared/config/input/Generate.java (1 hunks)
  • JeMPI_Apps/JeMPI_LibShared/src/main/java/org/jembi/jempi/shared/models/AuxGoldenRecordData.java (2 hunks)
  • JeMPI_Apps/JeMPI_LibShared/src/main/java/org/jembi/jempi/shared/utils/AppUtils.java (3 hunks)
  • devops/linux/docker/data-config/config-reference-link-dp.json (2 hunks)
Additional comments not posted (7)
JeMPI_Apps/JeMPI_LibShared/src/main/java/org/jembi/jempi/shared/config/input/Generate.java (2)

6-8: LGTM! New field added to Generate record.

The interactionField field has been correctly added to the Generate record.


10-12: LGTM! New constructor added to initialize interactionField.

The new constructor correctly initializes the interactionField field to null if not provided.

JeMPI_Apps/JeMPI_EM_Scala/src/main/scala/org/jembi/jempi/em/config/Config.scala (1)

39-42: LGTM! New field added to Generate case class.

The interactionField field has been correctly added to the Generate case class with a default value of None.

JeMPI_Apps/JeMPI_LibShared/src/main/java/org/jembi/jempi/shared/utils/AppUtils.java (1)

55-76: LGTM! New method defaultIfFalsy added.

The method correctly handles default values for various types by returning a default value if the input is considered falsy.

JeMPI_Apps/JeMPI_LibShared/src/main/java/org/jembi/jempi/shared/models/AuxGoldenRecordData.java (1)

Line range hint 31-51:
LGTM! Constructor refined to handle interactionField conditions.

The changes ensure that the interactionField is correctly handled and the appropriate value is assigned.

devops/linux/docker/data-config/config-reference-link-dp.json (2)

29-37: Addition of aux_gid to auxInteractionFields looks good.

A new field aux_gid with type String and a generation function AppUtils::autoGenerateId has been added. This addition is consistent with other fields using the same generation function.


62-63: Modification of aux_id and addition of aux_gid to auxGoldenRecordFields looks good.

The existing field aux_id is updated to include an interactionField property referencing aux_gid. A new field aux_gid with type String and a generation function AppUtils::autoGenerateId has been added. These changes are consistent with the PR objectives and context.

@MatthewErispe
Copy link
Collaborator

This change is no longer required

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