Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-lister
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine R. Dumont
swh-lister
Commits
197fb340
Verified
Commit
197fb340
authored
1 year ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
lister.nixguix: Propagate the origin reference to the loader
Without this, the loader will fail. Refs.
swh/meta#4979
parent
0756c44e
Branches
fix-nixguix-lister-propagate-ref-to-lister
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2907
passed
1 year ago
Stage: external
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swh/lister/nixguix/lister.py
+8
-5
8 additions, 5 deletions
swh/lister/nixguix/lister.py
swh/lister/nixguix/tests/test_lister.py
+3
-0
3 additions, 0 deletions
swh/lister/nixguix/tests/test_lister.py
with
11 additions
and
5 deletions
swh/lister/nixguix/lister.py
+
8
−
5
View file @
197fb340
...
...
@@ -626,15 +626,18 @@ class NixGuixLister(StatelessLister[PageResult]):
def
artifact_to_listed_origin
(
self
,
artifact
:
Artifact
)
->
Iterator
[
ListedOrigin
]:
"""
Given an artifact (tarball, file), yield one ListedOrigin.
"""
assert
self
.
lister_obj
.
id
is
not
None
loader_arguments
=
{
"
checksums
"
:
artifact
.
checksums
,
"
checksum_layout
"
:
artifact
.
checksum_layout
.
value
,
"
fallback_urls
"
:
artifact
.
fallback_urls
,
}
if
artifact
.
ref
:
loader_arguments
[
"
ref
"
]
=
artifact
.
ref
yield
ListedOrigin
(
lister_id
=
self
.
lister_obj
.
id
,
url
=
artifact
.
origin
,
visit_type
=
artifact
.
visit_type
,
extra_loader_arguments
=
{
"
checksums
"
:
artifact
.
checksums
,
"
checksum_layout
"
:
artifact
.
checksum_layout
.
value
,
"
fallback_urls
"
:
artifact
.
fallback_urls
,
},
extra_loader_arguments
=
loader_arguments
,
)
def
get_origins_from_page
(
...
...
This diff is collapsed.
Click to expand it.
swh/lister/nixguix/tests/test_lister.py
+
3
−
0
View file @
197fb340
...
...
@@ -359,6 +359,9 @@ def test_lister_nixguix_ok(datadir, swh_scheduler, requests_mock):
# no last update is listed on those manifests
assert
listed_origin
.
last_update
is
None
if
listed_origin
.
visit_type
in
{
"
git-checkout
"
,
"
svn-export
"
,
"
hg-checkout
"
}:
assert
listed_origin
.
extra_loader_arguments
[
"
ref
"
]
is
not
None
mapping_visit_types
[
listed_origin
.
visit_type
]
+=
1
assert
dict
(
mapping_visit_types
)
==
expected_visit_types
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment