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: Return without an error if relation is finalized #698

Merged
merged 1 commit into from Aug 2, 2022

Conversation

shahzadlone
Copy link
Member

@shahzadlone shahzadlone commented Jul 30, 2022

Relevant issue(s)

Resolves #697

Description

Fixes the following errors that took over when starting up defradb server with loaded schemas.

Error while registering single relation, {"Error": "Cannot update a relation that is already finalized"}

Other Info

I do see issue #574 was resolved in PR #638 but the error is still happening, hence the purpose of this PR.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

Local and CI

Specify the platform(s) on which this was tested:

  • Manjaro WSL2

@shahzadlone shahzadlone added bug Something isn't working invalid This doesn't seem right area/schema Related to the schema system area/errors Related to the internal management or design of our error handling system code quality Related to improving code quality area/cli Related to the CLI binary labels Jul 30, 2022
@shahzadlone shahzadlone added this to the DefraDB v0.3 milestone Jul 30, 2022
@shahzadlone shahzadlone requested a review from a team July 30, 2022 06:50
@shahzadlone shahzadlone self-assigned this Jul 30, 2022
@shahzadlone shahzadlone added the action/no-benchmark Skips the action that runs the benchmark. label Jul 30, 2022
@codecov
Copy link

codecov bot commented Jul 30, 2022

Codecov Report

Merging #698 (29d9665) into develop (fd88444) will decrease coverage by 0.03%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #698      +/-   ##
===========================================
- Coverage    57.42%   57.39%   -0.04%     
===========================================
  Files          143      143              
  Lines        16396    16398       +2     
===========================================
- Hits          9416     9412       -4     
- Misses        6098     6102       +4     
- Partials       882      884       +2     
Impacted Files Coverage Δ
query/graphql/schema/generate.go 83.93% <0.00%> (-0.66%) ⬇️
query/graphql/schema/relations.go 61.22% <100.00%> (+0.39%) ⬆️

@source-devs

This comment was marked as outdated.

Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

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

LGTM. Just a few things related to code comments.

query/graphql/schema/relations.go Outdated Show resolved Hide resolved
query/graphql/schema/relations.go Outdated Show resolved Hide resolved
query/graphql/schema/relations.go Outdated Show resolved Hide resolved
Copy link
Member

@jsimnz jsimnz left a comment

Choose a reason for hiding this comment

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

LGTM

@jsimnz jsimnz modified the milestones: DefraDB v0.3, DefraDB v0.3.1 Aug 2, 2022
@shahzadlone shahzadlone merged commit 3fcf231 into develop Aug 2, 2022
@shahzadlone shahzadlone deleted the lone/fix/schema-cli-errors branch August 2, 2022 17:27
shahzadlone added a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
)

- Resolves sourcenetwork#697

- Description:
Fixes the following errors that took over when starting up `defradb` server with loaded schemas.
```
Error while registering single relation, {"Error": "Cannot update a relation that is already finalized"}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/cli Related to the CLI binary area/errors Related to the internal management or design of our error handling system area/schema Related to the schema system bug Something isn't working code quality Related to improving code quality invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot update a relation that is already finalized
4 participants