fedora-copr / copr

RPM build system - upstream for https://copr.fedorainfracloud.org/
115 stars 61 forks source link

The "follow fedora branching" option doesn't work with "manual createrepo" feature #2202

Open fedora-copr-github-bot opened 1 year ago

fedora-copr-github-bot commented 1 year ago

Original issue: https://pagure.io/copr/copr/issue/2202 Opened: 2022-05-18 05:45:05 Opened by: praiskup

I'm not sure what builds we actually copy in such a case, that will be the first part of this issue.

The other issue reported recently is that the /devel/ repository is not actually created, and any subsequent build using the forked /devel/ repo fail (skip_if_unavailable=False).

We just run createrepo for the normal copr_repo directory: https://pagure.io/copr/copr/blob/682a1e945adb007e26229f1f4adcd8243ea835a7/f/backend/copr_backend/actions.py#_442-443

praiskup commented 7 months ago

Today @Conan-Kudo reported that his projects in the @asahi/* group fail to build in fedora-40 chroots. E.g. the `@asahi/mesa uses manual createrepo feature.

coprdb=# select id, result, action_type, data from action where created_on > 1707606000 and copr_id = 75912 and action_type = 6;
┌─────────┬────────┬─────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│   id    │ result │ action_type │                                                                                      data                                                                                       │
├─────────┼────────┼─────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 1485064 │      1 │           6 │ {"projectname": "mesa", "ownername": "@asahi", "rawhide_chroot": "fedora-rawhide-i386", "appstream": false, "dest_chroot": "fedora-40-i386", "builds": ["06749430-mesa"]}       │
│ 1488794 │      1 │           6 │ {"projectname": "mesa", "ownername": "@asahi", "rawhide_chroot": "fedora-rawhide-aarch64", "appstream": false, "dest_chroot": "fedora-40-aarch64", "builds": ["06967180-mesa"]} │
│ 1479943 │      1 │           6 │ {"projectname": "mesa", "ownername": "@asahi", "rawhide_chroot": "fedora-rawhide-x86_64", "appstream": false, "dest_chroot": "fedora-40-x86_64", "builds": ["06967180-mesa"]}   │
└─────────┴────────┴─────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Those all succeeded like:

[root@copr-be copr-3016][PROD]# cat actions.log-20240218.gz | gunzip | grep /usr/bin/copr-backend-process-action.managed.pid-2593320
[2024-02-12 16:46:16,539][  INFO][PID:2593320][/usr/bin/copr-backend-process-action.managed.pid-2593320][copr-backend-process-action:handle_action:24] Handling action 1479943
[2024-02-12 16:46:16,617][  INFO][PID:2593320][/usr/bin/copr-backend-process-action.managed.pid-2593320][copr-backend-process-action:handle_action:34] Executing: <RawhideToRelease(Action): {'action_type': 6, 'copr_id': 75912, 'created_on': 1707747904, 'data': '{"projectname": "mesa", "ownername": "@asahi", "rawhide_chroot": "fedora-rawhide-x86_64", "appstream": false, "dest_chroot": "fedora-40-x86_64", "builds": ["06967180-mesa"]}', 'ended_on': None, 'id': 1479943, 'message': None, 'new_value': None, 'object_id': None, 'object_type': 'None', 'old_value': None, 'priority': 0, 'result': 0}>
[2024-02-12 16:46:16,620][  INFO][PID:2593320][/usr/bin/copr-backend-process-action.managed.pid-2593320][actions.py:run:428] Create directory: /var/lib/copr/public_html/results/@asahi/mesa/fedora-40-x86_64
[2024-02-12 16:46:17,007][  INFO][PID:2593320][/usr/bin/copr-backend-process-action.managed.pid-2593320][actions.py:run:440] Copying directory (link RPMs): /var/lib/copr/public_html/results/@asahi/mesa/fedora-rawhide-x86_64/06967180-mesa -> /var/lib/copr/public_html/results/@asahi/mesa/fedora-40-x86_64/06967180-mesa
[2024-02-12 16:46:17,678][  INFO][PID:2593320][/usr/bin/copr-backend-process-action.managed.pid-2593320][helpers.py:_info:109] Running command 'copr-repo --batched /var/lib/copr/public_html/results/@asahi/mesa/fedora-40-x86_64 --no-appstream-metadata' as PID 2593576
[2024-02-12 16:46:23,859][  INFO][PID:2593320][/usr/bin/copr-backend-process-action.managed.pid-2593320][helpers.py:_info:109] Finished after 6 seconds with exit code 0 (copr-repo --batched /var/lib/copr/public_html/results/@asahi/mesa/fedora-40-x86_64 --no-appstream-metadata)
[2024-02-12 16:46:23,861][  INFO][PID:2593320][/usr/bin/copr-backend-process-action.managed.pid-2593320][copr-backend-process-action:handle_task:46] Action 1479943 ended with status=SUCCESS

So the repository in devel/ sub-directory has not been even generated.

praiskup commented 7 months ago

If nothing, we should at least add the "manual_createrepo=True" attribute to the action'đ data, and generate an empty repo.