Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
c06a7a8e
Commit
c06a7a8e
authored
1 year ago
by
Charlotte Hausman
Browse files
Options
Downloads
Patches
Plain Diff
don't create artifacts tars for curation
parent
6dd3b489
No related branches found
No related tags found
3 merge requests
!1606
catch 2.8.3 up with main
,
!1605
Merge 2.8.2.3 work to main
,
!1601
don't create artifacts tars for curation
Pipeline
#14646
failed
1 year ago
Stage: pull-db
Stage: build-packages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/cli/executables/pexable/ingest_envoy/test/test_curator_manifest.py
+14
-16
14 additions, 16 deletions
...tables/pexable/ingest_envoy/test/test_curator_manifest.py
with
14 additions
and
16 deletions
apps/cli/executables/pexable/ingest_envoy/test/test_curator_manifest.py
+
14
−
16
View file @
c06a7a8e
...
...
@@ -300,16 +300,16 @@ def test_manifest_full_curation_image(use_file_list: bool, ingest_path: Path, al
ingest_artifacts_tar
=
find_ingestion_artifacts_tar
(
manifest_destination_dir
)
ingest_artifacts_candidates
=
[
ap
for
ap
in
aps
if
ap
.
filename
==
ingest_artifacts_tar
.
name
]
assert
len
(
ingest_artifacts_candidates
)
==
1
assert
ingest_artifacts_candidates
[
0
].
type
==
AncillaryProductType
.
INGESTION_ARTIFACTS
"""
The ingestion_artifacts tar should contain ONLY the ingestion manifest
"""
with
tarfile
.
open
(
ingest_artifacts_tar
,
"
r
"
)
as
tar
:
members
=
tar
.
getmembers
()
assert
len
(
members
)
==
1
for
member
in
members
:
assert
member
.
name
.
endswith
(
CURATOR_MANIFEST_FILENAME
)
assert
len
(
ingest_artifacts_candidates
)
==
0
#
assert ingest_artifacts_candidates[0].type == AncillaryProductType.INGESTION_ARTIFACTS
#
"""
#
The ingestion_artifacts tar should contain ONLY the ingestion manifest
#
"""
#
with tarfile.open(ingest_artifacts_tar, "r") as tar:
#
members = tar.getmembers()
#
assert len(members) == 1
#
for member in members:
#
assert member.name.endswith(CURATOR_MANIFEST_FILENAME)
# Inspect the manifest's JSON dict
"""
...
...
@@ -341,14 +341,12 @@ def test_manifest_full_curation_image(use_file_list: bool, ingest_path: Path, al
for
ap_json
in
ap_jsons
:
filename
=
ap_json
[
"
filename
"
]
if
filename
.
endswith
(
TARFILE_EXT
):
if
filename
.
startswith
(
AncillaryProductType
.
INGESTION_ARTIFACTS
.
value
)
or
filename
.
startswith
(
AncillaryProductType
.
PIPELINE_ARTIFACTS
.
value
):
if
filename
.
startswith
(
AncillaryProductType
.
PIPELINE_ARTIFACTS
.
value
):
filenames_found
.
append
(
filename
)
elif
filename
==
WEBLOG_FILENAME
:
filenames_found
.
append
(
filename
)
assert
len
(
filenames_found
)
==
3
assert
len
(
filenames_found
)
==
2
# Check that manifest file exists on disk
with
open
(
actual_manifest_file
)
as
f
:
...
...
@@ -389,8 +387,8 @@ def test_manifest_full_curation_image(use_file_list: bool, ingest_path: Path, al
sorted
(
expected_aps
,
key
=
PRODUCT_SORT_KEY
),
sorted
(
actual_aps
,
key
=
PRODUCT_SORT_KEY
)
):
assert
expected_ap
[
"
type
"
]
==
actual_ap
[
"
type
"
]
if
expected_ap
[
"
type
"
]
!=
AncillaryProductType
.
INGESTION_ARTIFACTS
.
value
:
assert
expected_ap
[
"
filename
"
]
==
actual_ap
[
"
filename
"
]
#
if expected_ap["type"] != AncillaryProductType.INGESTION_ARTIFACTS.value:
#
assert expected_ap["filename"] == actual_ap["filename"]
def
test_reingest_block_json_well_formed_partial_curation
():
...
...
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