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

Add path arugment to rake task for updating versions list file #1402

Closed
wants to merge 1 commit into from

Conversation

sonalkr132
Copy link
Member

usage:
rake compact_index:update_versions_file["path_to_file/versions.list"]

@simi
Copy link
Member

simi commented Aug 30, 2016

  1. Why raise when file is not present?
  2. Is versions_file_location config still needed in config/rubygems.yml?
  3. Why not to use ENV arg?

@dwradcliffe
Copy link
Member

Don't we only update this in the other repository?

@sonalkr132
Copy link
Member Author

sonalkr132 commented Aug 30, 2016

@indirect

I can't run the update_versions_file task in production because it will overwrite the versions file on one of the app servers

Idea is to generate versions.list using database of rubygems.org on any given path. The file would be later be copied to bundler-api.

We have more sensible plan/requirements logged at #1400

@indirect
Copy link
Member

@dwradcliffe we currently keep the file in the other repo, but we are generating it from the rubygems production database as a precursor to getting rid of the other repo completely. once everything is being served from this app, we'll move the versions file to S3 or something and retire the other repo.

file_path = Rails.application.config.rubygems['versions_file_location']
versions_file = CompactIndex::VersionsFile.new file_path
task :update_versions_file, [:file_path] => :environment do |_t, args|
raise "#{args[:file_path]} does not exist" unless File.exist?(args[:file_path])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not raise since this will often be a completely new file on disk... for this task, the file is written from scratch, not updating from an old file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I update it to creation of the file if one doesn't exist?

@dwradcliffe
Copy link
Member

@indirect Ah ok. Currently we're automatically syncing the other repo on all the app servers and symlinking the file (via Chef). So it will be simpler to update the file in the other repo until we're totally done with it.

@homu
Copy link
Contributor

homu commented Oct 11, 2016

☔ The latest upstream changes (presumably #1453) made this pull request unmergeable. Please resolve the merge conflicts.

usage:
rake compact_index:update_versions_file["path_to_file/versions.list"]
@homu
Copy link
Contributor

homu commented Nov 6, 2016

☔ The latest upstream changes (presumably #1459) made this pull request unmergeable. Please resolve the merge conflicts.

@jvanbaarsen
Copy link
Contributor

@sonalkr132 Are you still working on this? If not, would it be an idea to close this PR? That way the list open PRs is kept to active ones only :-)

@sonalkr132
Copy link
Member Author

Are you still working on this?

Not really. This is an insufficient solution anyway.

@sonalkr132 sonalkr132 closed this Apr 14, 2017
@sonalkr132 sonalkr132 deleted the rake_path branch April 14, 2017 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants