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

Fix events-extrinsics relation in hasura metadata #931

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

marc-aurele-besner
Copy link
Collaborator

@marc-aurele-besner marc-aurele-besner commented Nov 8, 2024

User description

Fix events-extrinsics relation in hasura metadata


PR Type

bug_fix


Description

  • Fixed the relationship between events and extrinsics in Hasura metadata.
  • Updated column mappings to ensure correct linkage between tables.
  • Addressed issues in array relationships for better data integrity.

Changes walkthrough 📝

Relevant files
Bug fix
consensus_events.yaml
Fix array relationship and column mapping in consensus_events

indexers/db/metadata/databases/default/tables/consensus_events.yaml

  • Added an array relationship for extrinsic.
  • Changed column mapping from block_height to extrinsic_id.
  • +2/-1     
    consensus_extrinsics.yaml
    Correct column mapping in consensus_extrinsics                     

    indexers/db/metadata/databases/default/tables/consensus_extrinsics.yaml

    • Changed column mapping from block_height to id.
    +1/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    netlify bot commented Nov 8, 2024

    Deploy Preview for dev-astral canceled.

    Name Link
    🔨 Latest commit bff68db
    🔍 Latest deploy log https://app.netlify.com/sites/dev-astral/deploys/6731cf3919a4010008cb9f6f

    Copy link

    github-actions bot commented Nov 8, 2024

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Data Integrity
    Ensure that the new column mapping 'extrinsic_id' to 'id' correctly maintains data integrity and accurately reflects the intended relationships.

    Data Integrity
    Verify that the column mapping 'id' to 'extrinsic_id' is correctly implemented and does not disrupt existing data relationships.

    Copy link

    github-actions bot commented Nov 8, 2024

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Ensure the id to extrinsic_id mapping is consistent and accurate

    Verify that the id field in the column_mapping of the events table accurately
    reflects the intended relationship and is consistent with other database schemas.

    indexers/db/metadata/databases/default/tables/consensus_extrinsics.yaml [35]

    -id: extrinsic_id
    +id: extrinsic_id  # Confirm field consistency and relationship accuracy
    Suggestion importance[1-10]: 1

    Why: The suggestion is valid in terms of ensuring consistency and accuracy in database schema relationships. However, it is not actionable within the code itself as it merely suggests a verification without providing a concrete code change or improvement.

    1

    @marc-aurele-besner marc-aurele-besner merged commit ae27438 into main Nov 11, 2024
    12 checks passed
    @marc-aurele-besner marc-aurele-besner deleted the fix/fix-events-extrinsics-relation branch November 11, 2024 09:36
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants