Rules for code placement in Islet directories and a separate repository #345
Replies: 15 comments
-
The |
Beta Was this translation helpful? Give feedback.
-
I agree with your point that current islet repository contains a lot. |
Beta Was this translation helpful? Give feedback.
-
What exact directory do you have in mind? I just run |
Beta Was this translation helpful? Give feedback.
-
My mistake with the name 'tools'. However, that doesn't mean we have no issues to disuss. |
Beta Was this translation helpful? Give feedback.
-
This is a very valid point. But I don't think this concerns this particular case. I would not call |
Beta Was this translation helpful? Give feedback.
-
I fully agree with @L0czek . These repositories should be placed in the islet-project organization instead of the islet repository. We had similar case when we were developing the remote attestation mechanism. Back then, we decided to put our components into separate repositories and use the git submodules mechanism.
This is the role of documentation. There should be some page that briefly describes what each repository contains and what its purpose is. The short description about the Islet project and the URLs pointing to the documentation (how to build the project, what is the structure of the repositories/organization) should be placed in the README file directly on the landing page (https://github.com/islet-project). I believe that it would help new developers from the community to familiarize with the project. |
Beta Was this translation helpful? Give feedback.
-
No, |
Beta Was this translation helpful? Give feedback.
-
I strongly believe that working with separate git repositories for each element will be much easier to manage. One topic - is that its easier to manage external projects this way in general (forked ones) and we are referencing a lot of external projects already (which do have their separate repos under the organization), but I think that for external elements of the stack its easy to understand such division (tf-a, acs being examples, we already do this and I believe we should). For our own, project-specific code/modules, I think similar approach would be better. Keeping a structure of repositories that corresponds to actual build artifacts & runtime usage will be easier to understand for external developers. If, for instance, we keep all items needed for provisioning in "application provisioning" repo (suggesting that repo is corresponding to functionality/an example usage), we totally hide the fact that for "application provisioning" actual changes are in many other places (hes, rmm/the Islet itself, kvm, ...). A hypothetical repository called "application-provisioning" with many elements that do not even link together (image registry client & server, host & realm daemon...) - such repository on its own is just a random collection, thats why, I think, naming a repository after "feature" or "example functionality" , IMHO is actually misleading. Another argument is re-usability (even within the project) - what if for some reason later, we may want to use ie. some image signer used for provisioning in another future usecase? will we copy it to a new repository, supposedly named after new usecase? Also, with any other aggregation we risk another thing - harder configuration of automation, code style (possibly even later some formal verification, though I am not expert on how this will be done?) & license / static / architectural checking (protex? any SAM or other tool we might want to use for analysis later on?). Typical unit of such analysis is a git repository - we may have different requirements for each of these. TL;DR: I think that the git repositories should correspond to architectural elements of the stack/build artifacts - this way it will be much easier to manage. Less mess in intertwining pull requests and git history, issues separated for each, etc. Of course, if there are any arguments against it, lets discuss. |
Beta Was this translation helpful? Give feedback.
-
First of all, could anyone give me a pointer to what exactly realm-manager and image-registry do? I've read documents in the confluence. (realm metadata, sealing key derivation, vendor specific smc allocation) realm-manager means "Application Manager" in the document? As for realm-metadata-tool, I think it would be better to have a separate repository that deals with "tools" more broadly. It can contain "realm-metadata-tool", "kvmtool-rim-measurer", "tools in remote-attestation repo", ... |
Beta Was this translation helpful? Give feedback.
-
I agree with it. I think that most of libraries and tools should be maintained in a separate repository for better maintenance and history management. On the other hand, components that belong to the RMM architecture (RSI, RMI, PageTable, ETC..) and modules that have dependencies with that components (e.g, stat module) should be managed in islet as a directory. |
Beta Was this translation helpful? Give feedback.
-
I think we should keep materials on main repository if it has build dependency for building For those |
Beta Was this translation helpful? Give feedback.
-
I totally agree with @TomaszSwierczek's points. Also, I think that the priority should be put on the newcomer's usability. If too many components are separated, it might harm the usability. Another criteria I have in mind for the separation is whether it can exist or be built on its own like ACS-tests. I am open towards maintaining |
Beta Was this translation helpful? Give feedback.
-
I voted to separate I believe that organizing repositories in an atomic manner based on functionality is beneficial. This approach offers additional advantages such as ensuring that developers primarily contributing to each repository can maintain high code quality with a sense of ownership. Although managing multiple repositories can pose challenges (e.g., Rust version management, linter tool application, licensing), these can be addressed with proper documentation and tools. For instance, Gramine even separates examples into different repositories, and Veracruz splits modules by repository, showcasing successful implementations of this strategy. |
Beta Was this translation helpful? Give feedback.
-
I think having too much fine-grained repositories would end up with manageability disaster rather than providing a easy maintenance.
Thus, I think they should be grouped in a single repo if they are highly coupled and have the same purpose/use. When code size grows too big, we can split them anytime. In case that a module/component is commonly used by multiple repos, we may split it into a separate repo. I think the Regarding kvm and some other libs, they are developed by different community. I don't think they have other options other than separating them. That's not the case that we need to take a reference. |
Beta Was this translation helpful? Give feedback.
-
I do not agree, that it would be a disaster. Many projects chose this approach (like examples @bitboom quoted). See also how Rust Crypto namespace keeps it repositories. It is really fine-grained, but description in the namespace helps to clarify how to navigate around them. For me it would be especially important to have it fine-grained, because we might (in the future) want to present a different usage for e.g. image-registry. And yes, we can split repository in the future, but it will have more severe consequences, because each dependant will have to update git path to our separated repository. This doesn't happen normally in other projects and we shouldn't really consider it as a "Plan B". As for changes that would trigger updates in dependant repositories - this is something we have to take into the consideration, when designing each component. Of course it happens with opensource libraries from crates.io or other sources, but shouldn't happen too frequently, as it entails breaking changes in other modules. We should also take that into consideration and design appropriately.
We do not have to keep Rust crates in submodules. We can directly add Github dependencies in Cargo.toml.
This is a very good point. Having less fine-grained repositories would e.g. burden developers with unnecesary interrelated rebases, issues, PR-s for unrelated modules/components. Functionality is more clear with fine-grained repositories and other developers could find it easier to find modules that they would like to contribute to (for me, personally, it would be more discouraging to contribute to complex repository with multiple components and functionalities). All of the remarks are valid and at the same time it seems that most of us are in the aggrement that the fine-grained solution will benefit future development, and I'm sure we will manage any complications that may come. |
Beta Was this translation helpful? Give feedback.
-
App provisioning developers are considering creating additional repositories for the following purposes.
It would be good to decide and clarify which codes should go into the Islet repo's directory and which ones should be placed in a separate repo.
Beta Was this translation helpful? Give feedback.
All reactions