Let's say that a project generates additional sources in post-upstream-clone or pre-sync action and then synces them using files_to_sync so they are picked up and uploaded to lookaside cache. If sync_release runs for multiple branches, unless the generated files are identical in each run (i.e. have the same hash), they are uploaded to lookaside cache every time, wasting resources.
One way to prevent that, other than ensuring that source generation is reproducible (which could be hard or even impossible to do), would be to check if the file is already present in lookaside cache before generating it.
Document this, likely here:
|
### Custom archive creation for release syncing |
|
|
|
If you need to generate local archive(s) during release syncing, you can utilise e.g. `pre-sync` action |
|
to place the commands necessary for the creation. You also have to include the archive(s) in the list of files to |
|
be moved to the dist-git repo so that it is then handled by Packit from there. |
|
|
|
|
|
<details> |
|
<summary>Creating an archive using tito and syncing it to dist-git repo</summary> |
|
|
|
```yaml |
|
actions: |
|
pre-sync: |
|
- tito build -o . --tgz |
|
|
|
files_to_sync: |
|
- src: |
|
- "<my-package>-*.tar.gz" |
|
dest: . |
|
``` |
|
|
|
</details> |
Let's say that a project generates additional sources in
post-upstream-cloneorpre-syncaction and then synces them usingfiles_to_syncso they are picked up and uploaded to lookaside cache. If sync_release runs for multiple branches, unless the generated files are identical in each run (i.e. have the same hash), they are uploaded to lookaside cache every time, wasting resources.One way to prevent that, other than ensuring that source generation is reproducible (which could be hard or even impossible to do), would be to check if the file is already present in lookaside cache before generating it.
Document this, likely here:
packit.dev/docs/configuration/examples.md
Lines 110 to 131 in b39979c