Skip to content

Conversation

sujitha-av
Copy link
Contributor

@sujitha-av sujitha-av commented Jan 27, 2025

Description

When importing a store, we usually import the model and the tuples from the file. But these changes enable us to also import the assertions (only Check assertions) from the Model Tests as a part of the store import.

References

closes #224

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@sujitha-av sujitha-av requested a review from a team as a code owner January 27, 2025 16:59
@sujitha-av
Copy link
Contributor Author

sujitha-av commented Jan 27, 2025

fixing the linting tomorrow

@sujitha-av
Copy link
Contributor Author

need some help with this - running golangci-lint gives
cmd/store/import_test.go:7:1: File is not properly formatted (goimports)
but running goimports separately does not seem to be catching this.

@ewanharris
Copy link
Member

@sujitha-av are you running make lint? If that doesn't make any changes, check what golangci-lint --version reports (latest is v1.63.4) if your version is lower than this then go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest will update it to latest and then make lint should fix any issues

@sujitha-av
Copy link
Contributor Author

Thanks @ewanharris! it works and have pushed the changes now

ewanharris
ewanharris previously approved these changes Feb 6, 2025
Copy link
Member

@ewanharris ewanharris left a comment

Choose a reason for hiding this comment

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

Did some local testing and this looks good. Thank you @sujitha-av!

@ewanharris ewanharris changed the title Import assertions when importing store feat: support importing assertions as part of a store Feb 7, 2025
@ewanharris ewanharris added this pull request to the merge queue Feb 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 7, 2025
@ewanharris
Copy link
Member

When attempting to merge looks like there was a potential race issue arising due to the shared clientConfig used in tests. Have pushed a commit to make this internal to each test to avoid this

@ewanharris ewanharris enabled auto-merge February 7, 2025 15:20
@ewanharris ewanharris added this pull request to the merge queue Feb 7, 2025
Merged via the queue into openfga:main with commit 31bcc57 Feb 7, 2025
13 of 15 checks passed
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.

Support importing assertions along with the store
3 participants