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

post-shard Podspec URL isn't reflected in cocoapods.org #314

Closed
johnbushnell opened this issue Jan 12, 2017 · 15 comments
Closed

post-shard Podspec URL isn't reflected in cocoapods.org #314

johnbushnell opened this issue Jan 12, 2017 · 15 comments

Comments

@johnbushnell
Copy link

johnbushnell commented Jan 12, 2017

https://cocoapods.org/pods/KochavaTrackeriOSGK should take me to my pod page, but instead it redirects to the value set in s.homepage of the podspec.

Also when you search for the pod on cocoapods.org using the search option, you see the page in the list (currently listed 5 times though which doesn't seem right) and when you click on one of them it redirects to the s.homepage the same way.

@orta
Copy link
Member

orta commented Jan 12, 2017

Hi there, as the issue template requests - please consult the CocoaDocs repo about how to debug this.

@orta orta closed this as completed Jan 12, 2017
@paynerc
Copy link

paynerc commented Apr 27, 2017

We are seeing the same issues with https://cocoapods.org/pods/TwilioVideo. When you go there, it immediately redirects you to our homepage from the podspec, http://www.twilio.com/video.

We provided a documentation_url in the podspec, https://media.twiliocdn.com/sdk/ios/video/releases/1.0.0/docs, however I see that CocoaDocs was still run anyways.

I followed the suggestions in the CocoaDocs issue template and I am not sure how relevant they are because we are providing our own documentation url anyways.

The other odd thing, the entry in the Cocoapods.org search page doesn't link to the podspec properly. If you hover over the Spec link, it is showing https://github.com/CocoaPods/Specs/tree/master/Specs/TwilioVideo/1.0.0/TwilioVideo.podspec.json which it cannot find. It is actually https://github.com/CocoaPods/Specs/blob/master/Specs/1/d/9/TwilioVideo/1.0.0/TwilioVideo.podspec.json

wrong path to spec

Any help getting this resolved would be greatly appreciated, @orta. We are announcing our 1.0 GA of TwilioVideo today and would like to have things in order when the announcements happen.

Thanks again!

@segiddins
Copy link
Member

@paynerc a PR that fixes the URLs to the sharded ones would be appreciated!

@paynerc
Copy link

paynerc commented Apr 27, 2017

@segiddins If I had a clue as to why the following happened:

  1. The link to the https://cocoapods.org/pods/TwilioVideo is being redirected to homepage, http://www.twilio.com/video
  2. Documentation was generated by Cocoadocs, even with the presence of documentation_url
  3. The spec link is pointing to the incorrect place

I would be happy to fix. But at present I am not sure where to begin looking.

I am also trying to resolve CocoaPods/trunk.cocoapods.org#155 as we wanted to change the name associated with our account, but specifying the name param on subsequent registrations has no effect.

@segiddins
Copy link
Member

Looking at the code seems to suggest we just haven't re-deployed to heroku in many months?

@segiddins
Copy link
Member

https://github.com/CocoaPods/cocoapods.org/blob/master/assets/javascripts/search.config.js#L269
is what needs to be updated (the ruby stuff is correct, the JS just was never updated)

@paynerc
Copy link

paynerc commented Apr 27, 2017

Not sure if this is relevant:

  # Gets a Pod Page
  #
  get '/pods/:name/?' do
    STDOUT.sync = true
    result = metrics.where(pods[:deleted] => false, pods[:normalized_name] => params[:name].downcase).first
    unless result
      result = pods.where(pods[:deleted] => false, pods[:normalized_name] => params[:name].downcase).first
      halt 404, "404 - Pod not found" unless result

      # Support redirecting to the pods homepage if we can't do it.
      version = pod_versions.where(pod_id: result["id"], deleted: false).sort_by { |v| Pod::Version.new(v.name) }.last
      commit = commits.where(pod_version_id: version.id, deleted_file_during_import: false).first
      pod = Pod::Specification.from_json commit.specification_data
      redirect pod.homepage
    end

    @content = pod_page_for_result result
    slim :pod_page
  end

When we go to https://cocoapods.org/pods/TwilioVideo, we are being directed to the homepage... So both results are returning nil, and we get redirected... Now if I could just figure out why those results are nil...

@paynerc
Copy link

paynerc commented Apr 27, 2017

Looking at the code seems to suggest we just haven't re-deployed to heroku in many months?

Are you suggesting that what is running isn't current, @segiddins ? Are there plans to deploy?

@paynerc
Copy link

paynerc commented Apr 27, 2017

I still maintain that there are a few issues going on here.

The first is that when you try and navigate to the pod page directly, both queries are returning nil for the pod lookup. This is then causing the redirect to the site URL.

The second issue is indeed with the search results and display. For some reason when you issue this search http://search.cocoapods.org/api/v1/pods.picky.hash.json?query=pod:twiliovideo, the results do not contain the cocoadocs parameter. Since it does not have this parameter, it wants to render the non-expandable search results. And then that is causing the doc links to be wrong because from what I can tell, the search result JSON never contains a documentation_url... I searched the specs repo for pod specs with documentation_url and then issued queries against search.cocoapods.org, documentation_url doesn't appear.

So yes, it appears that there is a discrepancy in search.config.js, but my initial issue still appears to be data related. I should have "cocoadocs": true in the response, but that isn't coming across, and when I attempt to navigate to https://cocoapods.org/pods/TwilioVideo we get no love either.

I am continuing trying to troubleshoot this issue and will hopefully have PRs later.

@orta
Copy link
Member

orta commented Apr 27, 2017

Sorry - I've been at a conference, I ran the cocoadosc code manually and it's working on your page now: https://cocoapods.org/pods/TwilioVideo

The search should update with cocoadocs:true soon, I request it to re-index.

@orta
Copy link
Member

orta commented Apr 27, 2017

WRT the "Podspec" link, that does look a bug, might need to re-create the Podspec location algorithm in JS, which I don't have time to do, so I've re-opened that

@orta orta reopened this Apr 27, 2017
@orta
Copy link
Member

orta commented Apr 27, 2017

CocoaPods/cocoadocs.org#508 will "fix" this in the sense that things that could have stopped the trunk:true happening will be removed from the CocoaPods architecture

@paynerc
Copy link

paynerc commented Apr 27, 2017

Thank you for taking a look at this, @orta!

@orta orta changed the title Pod page redirects to s.homepage post-shard Podspec URL isn't reflected in cocoapods.org Apr 28, 2017
@orta
Copy link
Member

orta commented Nov 5, 2017

I removed the link to the podspec in non-CocoaDocs results

@orta orta closed this as completed Nov 5, 2017
@yasirmturk
Copy link

same issue https://cocoapods.org/pods/OpenALPRSwift

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

5 participants