{"push_id":683552379,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"8a5cf561b4ad3d389f3ef5849a8f801649b35319","before":"72619ca38dac127e9e888d315d36f5af0e496384","commits":[{"sha":"8a5cf561b4ad3d389f3ef5849a8f801649b35319","author":{"email":"62498b354efd85f076ae452773c1bfd7ee225dbe@redhat.com","name":"Adam Samalik"},"message":"Upload files to new and old paths + remove email\n\n=============\ndistgit: Upload files to both the new and old path\n\nCurrently, the CGI script is set to upload files:\n- to the old path if the upload uses md5\n- to the new path if the upload uses sha512\n\nThe old path is as follows:\n    /%(srpmname)s/%(filename)s/%(hash)s/%(filename)s\n\nThe new path is:\n    /%(srpmname)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s\n\nThis was meant to ensure compatibility with current fedpkg which\nalways downloads from the old path, but will eventually download from\nthe new path when we move to sha512.\n\nHowever, working more on this, I now think it would make for a smoother\ntransition if we instead always stored the files at the new path, but\njust hardlinked to the old path if the upload is using md5.\n\nThis is what this patch achieves.\n\nWith this deployed in production, fedpkg could be patched to try\ndownloading from the new path, and fallback to the old one if necessary,\nwhich decouples the migration to the new path from the migration to the\nnew hash.\n\n=============\ndistgit: Ensure the folder exists\n\nWe can't hard link the file if the folder containing the link\ndestination does not exist.\n\nHurray for testing in staging!\n\n=============\ndistgit: os.link fails if the dest already exists\n\n=============\ndistgit: And so does os.makedirs\n\n=============\ndistgit: Actually hardlink over the existing source at the old path\nWithout this, the file could exist at both the old and new path, taking\nthe space on the disk twice.\n\nThis forces a hardlink if the file already existed at the old path.\n\n=============\nRemove the lookaside email hook (rely on fedmsg now).","distinct":true,"url":"https://api.github.com/repos/release-engineering/dist-git/commits/8a5cf561b4ad3d389f3ef5849a8f801649b35319"}]}