#Use case for workspaces?

1 messages · Page 1 of 1 (latest)

cloud crater
#

Hi @sage ether , can you explain your use case more specifically, in terms of what you want to achieve rather than how you think it should work?

sage ether
#

Yes, sure!

My team designs the CI as a black box. Developers provide a manifest describing their application, which is composed of multiple components (a website, an API, or a library), similar to what Backstage does: https://backstage.io/docs/features/software-catalog/descriptor-format/.

Once the manifest is complete, developers trigger the CI by calling a common Dagger module (via GitLab). This module parses the manifest and orchestrates common integration tasks (building, testing, publishing artifacts, etc.) by delegating to technology‑specific modules (Maven, npm, .NET…). Each of these technology modules may in turn call technology agnostic modules. For example, a security analysis module that produces a report file.

At this point, we effectively have three layers of modules:

  1. the entrypoint module
  2. the technology module
  3. the security module

Documentation on Descriptor Format of Catalog Entities which describes the default data shape and semantics of catalog entities

#

Sometimes we need to share files with the SCM/CI engine to decorate merge requests (https://docs.gitlab.com/ci/yaml/artifacts_reports/).

Today, this requires exporting files from the entrypoint module to the host filesystem.

As Yves mentioned, we could add a function to our security module that returns a Changeset. I haven’t tried Changed yet, but I assume the technology module would catch the Changeset and pass it back up to the entrypoint module. This would work but it means modifying every technology module as well as the security module so that each one exposes the security report. If tomorrow we add new technologies (Python, Go, Rust, PHP, etc.), we would need to add a new function returning a Changeset for each of them. This feels for me redundant and time consuming.

If I understood the new feature correctly, maybe a Workspace could act as a shared directory where any module including our security analysis module can write files into it. Once the security report is stored there, the entrypoint module could directly export it to the host filesystem, without requiring changes across all the intermediate modules.

cloud crater