digital-asset / digital-asset/dpm
dpm publish append index
- Dominant language
- Go
- Stars
- 3
- Forks
- 2
- Avg merge
- 21h 16m
- Merged PRs (30d)
- 1
Description
# Dpm Publish Independent Platform Artifacts
## Goals
- I want to be able to publish a single platform artifact using `dpm publish` without having to wait on all other platforms to be built
- I want the ability to append to the multi-platform index adding the particular platform I have built for that component version
## Preferred Approach
### append to shared index when each platform artifact is published
```
dpm publish foo 1.2.3 --append-to-index --platform windows=./dist/windows
```
with the caveat that if multiple of these dpm publish are being run simultanesouly, the last one will win
## Alternatives Considered
### reference artifacts by platform specific tag
in latest version of dpm you can do
```
# daml.yaml
components:
- oci://europe-docker.pkg.dev/da-images/public/damlc:1.2.3.linux_amd64
```
so you can publish every platform indiviually the moment you've built it, via the same command, to get dpm to publish that tag for you.
(this will create intermediate indexes which only contain 1 platform, but that's okay)
At the end of the CI workflow once you know that all your tests have passed, publish again with all the platform (this will overwrite whatever intermediate index existed with a new one that contains all the platforms)
(this requires no changes on the dpm side)
### use a unique version (and index) per platform
```
dpm publish component oci://europe-docker.pkg.dev/da-images/playground/components/damlc:3.6.0-snapshot-linux-arm64 --extra-tags=3.6.0-snapshot -p linux/arm64=build-tools
```
so you are basically controlling the tag you want to make your platform-specific things available through with the 3.6.0-snapshot-linux-arm64 version, or your extra-tags 3.6.0-snapshot
if you do want the same index to append with additional platforms as they come available it will need the #2 suggested above
if you don’t care so much and can just pull the artifacts for the specific platform you care about you could control the tag using the approach here (edited)
Contributor guide
Research direction
Start by tracing the existing `dpm publish` entry point and how it publishes platform artifacts and multi-platform indexes. Compare the proposed `--append-to-index` flow with the documented alternatives, and define done as publishing one platform while preserving the shared index behavior described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, release
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100