Project

Profile

Help

Test #6476

closed

Repomd compression behaves differently for S3

Added by fao89 over 2 years ago. Updated 12 months ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Version:
Platform Release:
Tags:
Sprint:
Quarter:

Description

Ticket moved to GitHub: "pulp/pulp_rpm/2244":https://github.com/pulp/pulp_rpm/issues/2244


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
Actions #1

Updated by fao89 over 2 years ago

  • Description updated (diff)
Actions #2

Updated by fao89 over 2 years ago

  • Description updated (diff)
Actions #3

Updated by fao89 over 2 years 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

Actions #4

Updated by ttereshc over 2 years ago

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

Updated by dalley over 1 year ago

  • Sprint set to Sprint 101
Actions #6

Updated by dalley over 1 year ago

  • Tracker changed from Issue to Test
  • Severity deleted (2. Medium)
  • Triaged deleted (Yes)
  • Groomed deleted (No)
  • Sprint Candidate deleted (No)

fao89 This sounds like a test issue so I'm going to mark it as one - let me know if that is incorrect.

Actions #7

Updated by dalley over 1 year ago

  • Sprint/Milestone changed from Priority items (outside of planned milestones/releases) to Pulp 3.x RPM (Katello 4.1)
  • Sprint deleted (Sprint 101)

Also dropping from the sprint since I mis-interpreted this issue earlier.

Actions #8

Updated by dalley over 1 year ago

  • Sprint/Milestone changed from Pulp 3.x RPM (Katello 4.1) to Priority items (outside of planned milestones/releases)
Actions #9

Updated by pulpbot 12 months ago

  • Description updated (diff)
  • Status changed from NEW to CLOSED - DUPLICATE

Also available in: Atom PDF