Skip to content

[issue 15620] Import Github Release attachments

What does this MR do and why?

Implementation for GitHub Importer - Import GitHub Release attached files

feature flag

Screenshots or screen recordings

Local test

Database review

Query 1

Query plan looks good, reads from index.

SELECT "releases"."id", "releases"."description"
FROM   "releases"
WHERE  "releases"."project_id" = 1 
 Index Scan using index_releases_on_project_tag_unique on public.releases  (cost=0.43..37.78 rows=27 width=203) (actual time=0.033..0.307 rows=126 loops=1)  
   Index Cond: (releases.project_id = 278964)  
   Buffers: shared hit=128  
   I/O Timings: read=0.000 write=0.000  

Query 2

Query plan also looks good

SELECT "releases"."id", "releases"."description"
FROM   "releases"
WHERE  "releases"."project_id" = 1
ORDER  BY "releases"."id" ASC
LIMIT  1 offset 100
 Limit  (cost=38.49..38.49 rows=1 width=203) (actual time=9.340..9.342 rows=0 loops=1)
   Buffers: shared hit=5 read=1
   I/O Timings: read=9.148 write=0.000
   ->  Sort  (cost=38.42..38.49 rows=27 width=203) (actual time=9.335..9.336 rows=0 loops=1)
         Sort Key: releases.id
         Sort Method: quicksort  Memory: 25kB
         Buffers: shared hit=5 read=1
         I/O Timings: read=9.148 write=0.000
         ->  Index Scan using index_releases_on_project_tag_unique on public.releases  (cost=0.43..37.78 rows=27 width=203) (actual time=9.202..9.203 rows=0 loops=1)
               Index Cond: (releases.project_id = 1)
               Buffers: shared hit=2 read=1
               I/O Timings: read=9.148 write=0.000

How to set up and validate locally

Enable github_importer_release_attachments_import feature flag. Create project via import from Github. The project should have releases with attachments in description. After import make sure that release description has attachment links that belongs to gitlab server.

Edited by Rostyslav Safonov

Merge request reports