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

refactor: Clean up internal storage #936

Merged
merged 1 commit into from Sep 8, 2021
Merged

Conversation

joachimvh
Copy link
Member

@joachimvh joachimvh commented Aug 31, 2021

Each IDP class using storage now has a different storage. This way those classes don't have to worry about clashing keys anymore.

All internal storage is now in the /internal/ container, thereby making it easier to take the location of the internal data into account: only 1 path needs to be blocked and a regex router handling internal data differently only has to match 1 path as well.

This also makes it less invasive to add a new storage somewhere in the future.

Might also help with #892

@joachimvh joachimvh added the semver.major Requires a major version bump label Aug 31, 2021
Copy link
Member

@RubenVerborgh RubenVerborgh left a comment

Choose a reason for hiding this comment

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

Super, what an improvement!

Would name it .internal though, to emphasize its special nature. We could treat all dot folders in a special way then later on.

@@ -13,26 +13,46 @@
"@type": "JsonResourceStorage",
"source": { "@id": "urn:solid-server:default:ResourceStore_Backend" },
"baseUrl": { "@id": "urn:solid-server:default:variable:baseUrl" },
"container": "/locks/"
"container": "/internal/locks/"
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps

Suggested change
"container": "/internal/locks/"
"container": "/.internal/locks/"

Copy link
Member

Choose a reason for hiding this comment

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

and idem throughout

Each IDP class using storage now has a different storage.
This way those classes don't have to worry about clashing keys anymore.

All internal storage is now in the /.internal/ container,
thereby making it easier to take the location of the internal data into account:
only 1 path needs to be blocked and a regex router handling internal data
differently only has to match 1 path as well.
@joachimvh joachimvh merged commit 1e1edd5 into versions/2.0.0 Sep 8, 2021
@joachimvh joachimvh deleted the refactor/storage branch September 8, 2021 08:01
@joachimvh joachimvh added this to the v2.0.0 milestone Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver.major Requires a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants