-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Several improvements for caching of diagram cache
This commit requests changes on the PR #1689. In particular, the following has changed: - Replace cache key from path and revision with git_model_id (database id). The unique database ID of the Git model in the Collaboration Manager has to be part of the cache key. For safety reasons, I'd not share a cache between projects even though they link to the same repository. This doesn't really matter currently since we make new requests against the Git API every time, but we can't assure that for the future. - An attack could look like: - Project 1 links Git repository "https://example.com" to a model. - Project 2 links the same Git repository to a model with a different token. - The token of project 1 expires. Project 2 keeps updating the cache with a valid token. - Users of project 1 can still access the cache for project 2 without a valid token. - Since a git_model only has one revision, it's safe to drop the revision for artifacts. The revision is only relevant for files from the repository. In those cases, the value was passed as parameter every time. Therefore, I've removed it from the Cache object. - For license reasons, I switched from Redis to Valkey. - Use a Kubernetes secret for the valkey password. - For REST compatibility, I've changed the resource name of "empty_cache" to "cache". - I've reenabled the model badge error handling. - Added a new function loadDiagramCacheMetadata in model-diagram-dialog.component.ts to reduce duplicated code. - Added the job id to the diagram cache code snippet. - Changed the styling of the "Clear cache" button.
- Loading branch information
1 parent
b60dfb2
commit 4b71fa9
Showing
27 changed files
with
162 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,6 @@ repos: | |
- capellambse | ||
- typer | ||
- types-lxml | ||
- types-redis | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.