Hello everyone,
Andrew has just landed support for RFC-0208 for SDK packages in http://fxrev.dev/880035. We are now ready to review our first package, heapdump-collector, which Andrew has prototyped out in http://fxrev.dev/880976.
We don’t yet have a process defined for reviewing SDK packages, so I want to propose we treat the subset of package files that users depend upon as our API. All other files would be internal details that could change over time. In order to support this, the fuchsia_sdk_package() gn template supports specifying these files through two rules:
expected_files_present: These files must exist at this package path, but can change over time.
expected_files_exact: These files must exist at this package path, but these files should not change without extra approval. This is done by including the file hash in a golden file, which the build system verifies has not changed.
Both of these produce content-checklist files, which allows the fuchsia build system and downstream projects to assert that packages contain the expected files and contents.
In most cases we would only list the component manifests in a package. However, it’s possible we could have data file packages, such as a package full of fonts, which could be exposed as a capability to super-components.
In our case of heapdump, there is a single component manifest collector.cml, which is compiled into the package as meta/heapdump-collector.cm. Since this exposes capabilities to the super-component, we used expected_files_exact for this file so that any capability changes would go through review.
We’d use expected_files_exact here since removing a capability could break downstream consumers.
We currently are using the partner category, but this was somewhat arbitrarily chosen. The exported FIDL APIs are fuchsia.memory.heapdump.client, which is partner_internal, and fuchsia.memory.heapdump.process, which is internal.
Should we use the most restrictive category internal here? Presumably a super-component of heapdump-collector may only be interested in a subset of the exported capabilities, so it may be okay to use partner or partner_internal with the understanding that OOT users couldn’t use fuchsia.memory.heapdump.process.
Do we need to promote fuchsia.memory.heapdump.process to be partner or partner_internal before we add this package to the SDK?
If we should use the most restrictive category, should fuchsia_sdk_package() enforce this rule for all SDK packages? If so, would it be alright if we implemented that in a future CL? It wouldn't impact OOT partners, and using our current implementation would unblock them to start prototyping their support for SDK packages.
Since this is the first SDK package, we could have made a mistake that’d make it difficult for OOT projects to use the SDK package. Would it make more sense to use the experimental category to allow us to iterate on the design in case we run into issues? Or would it be better to use partner or partner_internal and iterate on the design with OOT projects until we lock in the design?
Thanks,
Erick and Andrew
Hello everyone,
Andrew has just landed support for RFC-0208 for SDK packages in http://fxrev.dev/880035. We are now ready to review our first package, heapdump-collector, which Andrew has prototyped out in http://fxrev.dev/880976.
Do we need to promote fuchsia.memory.heapdump.process to be partner or partner_internal before we add this package to the SDK?
Hello everyone,
Andrew has just landed support for RFC-0208 for SDK packages in http://fxrev.dev/880035. We are now ready to review our first package, heapdump-collector, which Andrew has prototyped out in http://fxrev.dev/880976.
We don’t yet have a process defined for reviewing SDK packages, so I want to propose we treat the subset of package files that users depend upon as our API. All other files would be internal details that could change over time. In order to support this, the fuchsia_sdk_package() gn template supports specifying these files through two rules:
expected_files_present: These files must exist at this package path, but can change over time.
expected_files_exact: These files must exist at this package path, but these files should not change without extra approval. This is done by including the file hash in a golden file, which the build system verifies has not changed.
Both of these produce content-checklist files, which allows the fuchsia build system and downstream projects to assert that packages contain the expected files and contents.
In most cases we would only list the component manifests in a package. However, it’s possible we could have data file packages, such as a package full of fonts, which could be exposed as a capability to super-components.
In our case of heapdump, there is a single component manifest collector.cml, which is compiled into the package as meta/heapdump-collector.cm. Since this exposes capabilities to the super-component, we used expected_files_exact for this file so that any capability changes would go through review.
We’d use expected_files_exact here since removing a capability could break downstream consumers.
We currently are using the partner category, but this was somewhat arbitrarily chosen. The exported FIDL APIs are fuchsia.memory.heapdump.client, which is partner_internal, and fuchsia.memory.heapdump.process, which is internal.
Finally, we some questions as we wrote this up for consideration:
Should we use the most restrictive category internal here? Presumably a super-component of heapdump-collector may only be interested in a subset of the exported capabilities, so it may be okay to use partner or partner_internal with the understanding that OOT users couldn’t use fuchsia.memory.heapdump.process.
Do we need to promote fuchsia.memory.heapdump.process to be partner or partner_internal before we add this package to the SDK?
If we should use the most restrictive category, should fuchsia_sdk_package() enforce this rule for all SDK packages? If so, would it be alright if we implemented that in a future CL? It wouldn't impact OOT partners, and using our current implementation would unblock them to start prototyping their support for SDK packages.
Since this is the first SDK package, we could have made a mistake that’d make it difficult for OOT projects to use the SDK package. Would it make more sense to use the experimental category to allow us to iterate on the design in case we run into issues? Or would it be better to use partner or partner_internal and iterate on the design with OOT projects until we lock in the design?
--Thanks,
Erick and Andrew
You received this message because you are subscribed to the Google Groups "api-council" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-council...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/api-council/CAP%2BUz2bNB6T5GYgXf3%2BqBbyQN0VqVRN-fabn3JLDKFv80jP8ag%40mail.gmail.com.
Do we need to promote fuchsia.memory.heapdump.process to be partner or partner_internal before we add this package to the SDK?
Building on what Fabio says in the side-thread: fuchsia.memory.heapdump.process is kind of an interesting case, since it's not really offered "from the platform to the product", which is how we think of most SDK APIs. Since it's offered by a subpackage to an SDK library, it's sorta "from a product to a product" - the customer could have defined this package and the FIDL protocol and the library all on their own, so it's only in the SDK as a matter of convenience.I'm not 100% convinced by that logic, though. The nice thing about "internal" protocols is that we can change them however we want and nobody outside the platform should mind. Theoretically, a client could code directly against the FIDL, or could introduce version skew between the subpackage and the library, and if they did and we broke compatibility for them, would we say, "sorry about that!" or would we say, "your use case is not supported"? If the former, then this should move to `partner` or `partner_internal` (depending on which use cases we want to support).Fabio, do you think `fuchsia.memory.heapdump.process` is ready to go into the SDK? Or do you think that'd be a serious impediment to velocity?
Hello all,Now that we have landed the realm-builder-server SDK package, I wanted to check in on how we're doing with the heapdump-collector SDK package review in http://fxrev.dev/880976. Are we blocked on getting `fuchsia.memory.heapdump.client partner_internal` through review in http://fxrev.dev/888491?
On Wed, Aug 30, 2023 at 5:30 PM Erick Tryzelaar <etryz...@google.com> wrote:Hello all,Now that we have landed the realm-builder-server SDK package, I wanted to check in on how we're doing with the heapdump-collector SDK package review in http://fxrev.dev/880976. Are we blocked on getting `fuchsia.memory.heapdump.client partner_internal` through review in http://fxrev.dev/888491?I've just approved that CL, so we should be good to go on the package review!