Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document gotchas with sources generated in actions during sync_release #911

Open
nforro opened this issue Jul 25, 2024 · 0 comments
Open
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. kind/documentation Documentation needs updates.

Comments

@nforro
Copy link
Member

nforro commented Jul 25, 2024

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>

@lbarcziova lbarcziova added kind/documentation Documentation needs updates. area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. labels Jul 25, 2024
@lbarcziova lbarcziova moved this from new to backlog in Packit Kanban Board Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. kind/documentation Documentation needs updates.
Projects
Status: backlog
Development

No branches or pull requests

2 participants