Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gemfury::Client::yank_version has been raising 404 for the last month #92

Open
raulcd opened this issue Oct 25, 2023 · 0 comments
Open

Comments

@raulcd
Copy link

raulcd commented Oct 25, 2023

Hi,

In the Apache Arrow community we do use Gemfury to store our nightly pyarrow and adbc wheels. We had a job to clean up old wheels that run nightly with the following ruby script:

# Clean old releases from Gemfury.

require "gemfury"

client = Gemfury::Client.new(user_api_key: ENV["GEMFURY_API_TOKEN"])

client.list.each do |artifact|
  puts artifact["name"]
  versions = client.versions(artifact["name"])
  versions.sort_by! { |v| v["created_at"] }

  # Keep all versions uploaded within 90 days of the last uploaded version
  cutoff = DateTime.parse(versions.last['created_at']) - 90.0

  versions.each do |version|
    time = DateTime.parse(version['created_at'])
    if time < cutoff
      client.yank_version(artifact["name"], version["version"])
      puts "Yanked #{artifact['name']} #{version['version']} (created #{version['created_at']})"
    else
      puts "Kept #{artifact['name']} #{version['version']} (created #{version['created_at']})"
    end
  end
end

This had been working for us for a long time (~1 year) but on the last month we started getting 404's when trying to yank existing old wheels:

Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:14:54.440Z with Gemfury::NotFound
Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:14:55.255Z with Gemfury::NotFound
Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:22:53.335Z with Gemfury::NotFound
Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:23:02.456Z with Gemfury::NotFound
Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:30:59.804Z with Gemfury::NotFound
Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:32:31.240Z with Gemfury::NotFound
Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:34:39.163Z with Gemfury::NotFound
Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:36:48.953Z with Gemfury::NotFound
Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:37:44.074Z with Gemfury::NotFound
Failed to yank pyarrow 13.0.0.dev497 (created 2023-07-13T10:39:39.833Z with Gemfury::NotFound

Those wheels do exist on Gemfury.

We have temporarily disabled those jobs but we would like to be able to clean the old wheels. Has there been any change that makes this obsolete? I can see the method should still be available: https://github.com/gemfury/gemfury/blob/main/lib/gemfury/client.rb#L69

These are the related issues on arrow adbc: apache/arrow-adbc#1085
and arrow: apache/arrow#38308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant