Project

Profile

Help

Issue #6476

Repomd compression behaves differently for S3

Added by fao89 6 months ago. Updated 5 months ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

on repomd we have: primary.xml.gz update_info.xml.gz When testing xml.gz behaves like it is not compressed On the other hand, it behaves as compressed on S3 testing
https://github.com/pulp/pulp_rpm/blob/master/pulp_rpm/tests/functional/api/test_publish.py#L51-L67

def read_xml_gz(content):
    """
    Read xml and xml.gz.
    Tests work normally but fails for S3 due '.gz'
    Why is it only compressed for S3?
    """
    with NamedTemporaryFile() as temp_file:
        temp_file.write(content)
        temp_file.seek(0)

        try:
            content_xml = gzip.open(temp_file.name).read()
        except OSError:
            # FIXME: fix this as in CI primary/update_info.xml has '.gz' but it is not gzipped
            content_xml = temp_file.read()
        return content_xml

History

#1 Updated by fao89 6 months ago

  • Description updated (diff)

#2 Updated by fao89 6 months ago

  • Description updated (diff)

#3 Updated by fao89 5 months ago

I tested with real S3 bucket and got the same behavior, with:

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
MEDIA_ROOT = ''

primary.xml.gz is compressed, as we expect but for:

DEFAULT_FILE_STORAGE = 'pulpcore.app.models.storage.FileSystem'
MEDIA_ROOT = '/var/lib/pulp/'

primary.xml.gz does have the gz suffix, but it is not compressed

#4 Updated by ttereshc 5 months ago

  • Sprint/Milestone set to Priority items (outside of planned milestones/releases)
  • Triaged changed from No to Yes

Please register to edit this issue

Also available in: Atom PDF