Skip to content

Sync fails on gems with colons in dependency specs #446

Description

@decko

Version
pulp_gem: 0.7.5
pulpcore: 3.112.0.dev

Describe the bug

Syncing any gem from https://index.rubygems.org/ fails with ValueError in read_info() at pulp_gem/specs.py:160.

Root cause

RubyGems.org rolled out compact index v2 in June 2026, adding a per-version created_at field to info files to support Bundler's new Cooldown feature. Every info line now includes created_at:<ISO8601 timestamp> (e.g., created_at:2009-07-25T18:01:49Z).

This causes two failures in read_info():

  1. stmt.split(":") without maxsplit fails on the timestamp colons → ValueError: too many values to unpack (expected 2)
  2. Even with split(":", 1), created_at is not a recognized key and hits raise InvalidRequirementError

To reproduce

# Create remote and repo
curl -u admin:password -X POST http://localhost:5001/pulp/default/api/v3/remotes/gem/gem/ \
  -H 'Content-Type: application/json' \
  -d '{"name": "rubygems-rails", "url": "https://index.rubygems.org/", "includes": {"rails": null}}'

curl -u admin:password -X POST http://localhost:5001/pulp/default/api/v3/repositories/gem/gem/ \
  -H 'Content-Type: application/json' -d '{"name": "test-rails"}'

# Sync (replace hrefs with actual values)
curl -u admin:password -X POST http://localhost:5001/pulp/default/api/v3/repositories/gem/gem/<repo-uuid>/sync/ \
  -H 'Content-Type: application/json' \
  -d '{"remote": "/pulp/default/api/v3/remotes/gem/gem/<remote-uuid>/"}'

# Poll task — fails with "too many values to unpack (expected 2)"
curl -u admin:password http://localhost:5001/pulp/default/api/v3/tasks/<task-uuid>/

Any gem from rubygems.org triggers this (rails, rake, nokogiri, etc.). Fixtures from fixtures.pulpproject.org pass because they don't include created_at.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions