-
Notifications
You must be signed in to change notification settings - Fork 237
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
Introduce PureModelContextCollection type and use it in WorkspaceSDLCLoader #2641
Conversation
e2292c6
to
a1c241c
Compare
@abhishoya-gs |
Okay sure, seems like a better approach |
{ | ||
return this.alloyLoader.getCacheKey(context); | ||
PureModelContextCollection pureModelContextCollection = (PureModelContextCollection) context; | ||
Assert.assertTrue(pureModelContextCollection.getContexts().stream().allMatch(pureModelContext -> pureModelContext instanceof PureModelContextPointer), () -> "Invalid type of PureModelContext in PureModelContextCollection for cacheKey"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constrains defeats one of the main purposes of the collection I wanted to introduce - improve studio flow. For example - studio can manage a collection, where an entry is a PMCD of the current project, and the other entries are pointer to the project dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this constraint so it will help improve studio flow. I will also change the constraint added on shouldCache but since we cache compiled model only for PureModelContextPointer, we won't gain much there in case of studio.
Also, I have placed another check in SDLCFetcher see here. It's required as my implementation only uses alloy loaders and thus only AlloySDLC. If there's a use case to support sourcing from multiple loaders the logic would have to be changed accordingly.
994a87b
to
6cf6c9e
Compare
6cf6c9e
to
916427f
Compare
Support GitlabPersonalAccessTokenClient
916427f
to
082f08a
Compare
This PR is stale because it has been open for 30 days with no activity. Please remove stale label or add any comment to keep this open. Otherwise this will be closed in 5 days. |
This PR was closed because it has been inactive for 35 days. Please re-open if this PR is still relevant. |
What type of PR is this?
Improvement
What does this PR do / why is it needed ?
As of today, WorkspaceSDLCLoader calls ModelLoader for each dependency. This introduces as many numbers of HTTP requests and doesn't account for dependency override.
Solution
Additionally, PureModelContextCollection can be used further to send smaller payloads from clients like Studio.
Which issue(s) this PR fixes:
Fixes #
Other notes for reviewers:
For testing, I rely on change in test setup and manual testing.
Does this PR introduce a user-facing change?
No