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

Yola.change_site_domain 404s #19

Closed
blaix opened this issue Oct 27, 2015 · 17 comments
Closed

Yola.change_site_domain 404s #19

blaix opened this issue Oct 27, 2015 · 17 comments

Comments

@blaix
Copy link
Contributor

blaix commented Oct 27, 2015

Yola.change_site_domain errors with a 404. I haven't figured out why, or if the fault is in yolapy, wl-proxy, or sbbe. (partially blocking #3)

@snitch
Copy link

snitch commented Nov 2, 2015

@blaix: This issue is now a priority.

@blaix blaix changed the title change_site_domain 404s Yola.change_site_domain 404s Nov 2, 2015
@blaix blaix assigned ekoval and unassigned blaix Nov 5, 2015
@ekoval
Copy link
Contributor

ekoval commented Nov 6, 2015

I've verified this and it works for me without YolaPy:

curl -H "Content-Type:application/json" -u WL_TOPLINE:...8c4 -X PUT -d '{"partner_domain":"www.ddd"}' https://wl.qa.yola.net/sites/ff8081813eefb1ea013f132438e803d1/partner_domain/ 

Response:

{"id":"ff8081813eefb1ea013f132438e803d1","name":"Stalkers Inc","screenshot_url":null,"preview_url":"/template_resources/0/Suarez/thumbnails/192x192.gif","created_at":"2013-06-05T07:01:48","last_edited_at":"2015-11-06T16:48:10","last_opened_at":"2015-11-06T16:48:10","deleted_at":null,"storage_used":0,"is_archived":false,"is_defunct":false,"user_id":"38e2afc86615457d83ca6532b6ab0a41"}

I had 404 ("Partner Domain not found") there until I've added partner domain for this site manually using Django ORM.
Is it possible that you're trying to specify partner domain name, which just doesn't exist?

I've also reviewed code in YolaPy and it seems so straightforward that I can't believe it is it's issue.

@blaix
Copy link
Contributor Author

blaix commented Nov 6, 2015

It sounds like the problem is that we 404 when trying to PUT a domain on a site that doesn't have one yet. Please consider that the fix you need to make here.

@snitch
Copy link

snitch commented Nov 9, 2015

@ekoval: This issue is now a priority.

blaix added a commit that referenced this issue Nov 9, 2015
Will restore after #19 is resolved.
@blaix
Copy link
Contributor Author

blaix commented Nov 9, 2015

Also, please restore this test once the issue is resolved: 36229ba

@RayeN
Copy link
Member

RayeN commented Nov 9, 2015

@blaix Do we have a real use case for it? I mean AFAIK right now partners cannot create site without partner_domain. And we have a complete mess with creation vs update right now. Side effects for creation are done in JSBBE, but for update - in SBBE. I think creation on update flow will probably be used only in tests (but might be wrong) atm.

So, what I'm trying to say here - I'm not sure if we should just fix it in that method, without considering how should our flow look like in general.

@blaix
Copy link
Contributor Author

blaix commented Nov 9, 2015

are you saying if a site is created without a partner domain, it can never have one?

@RayeN
Copy link
Member

RayeN commented Nov 9, 2015

I mean that the current flow won't allow you to create one, I think.

@RayeN
Copy link
Member

RayeN commented Nov 9, 2015

SSO URL contains partner_domain name AFAIK

@ekoval
Copy link
Contributor

ekoval commented Nov 9, 2015

So current behavior seems correct?

@RayeN
Copy link
Member

RayeN commented Nov 9, 2015

I'm not sure about correctness. Just want to say that the scenario we are about to handle here won't be used in real flow. And also it might not have much sense - for real flow. Let me try to explain:

  • We create site without partner domain - means site isn't published.
  • We set partner_domain via the change_site_domain endpoint - site is still unpublished
  • When we publish site - it will do all the things we already did in change_site_domain once again.

@ekoval
Copy link
Contributor

ekoval commented Nov 9, 2015

So maybe I'll just reMOVE a failing test? :)

@blaix
Copy link
Contributor Author

blaix commented Nov 11, 2015

@RayeN can you explain to me what the relationship is with publishing a site and setting a partner domain? I didn't realize publishing was involved in setting it.

@RayeN
Copy link
Member

RayeN commented Nov 11, 2015

Sorry, looks like I confused myself and everyone else :( Just ignore all my comments. Setting partner domain shouldn't be related to publishing (and it isn't). So, we should allow to create partner domain on update. Sorry again for confusing.

@blaix
Copy link
Contributor Author

blaix commented Nov 11, 2015

It sounds like the problem is that we 404 when trying to PUT a domain on a site that doesn't have one yet. Please consider that the fix you need to make here.

So do we all agree that this is the fix we need? If so, we should create the issue on sbbe.

@RayeN
Copy link
Member

RayeN commented Nov 11, 2015

Yeah, I think we're on the same page now. Please create a proper ticket.

@ekoval
Copy link
Contributor

ekoval commented Nov 12, 2015

Status

Solution is known, estimate - 4 hours.

@ekoval ekoval closed this as completed Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants