Skip to content

Feature/clean urls - #67

Merged
tbarbugli merged 8 commits into
masterfrom
feature/clean-urls
Dec 13, 2017
Merged

tbarbugli merged 8 commits into
masterfrom
feature/clean-urls

Conversation

@tbarbugli

Copy link
Copy Markdown
Member

Summary:

Change how urls are constructed for API, Collections and Personalization.

Regular API endpoints:

https://${api_location}-api.stream-io-api.com/api/v1.0/
https://api.stream-io-api.com/api/v1.0/

Personalization API endpoints:

https://${api_location}-personalization.stream-io-api.com/personalization/v1.0/
https://personalization.stream-io-api.com/personalization/v1.0/

Collections API endpoint:

https://${api_location}-api.stream-io-api.com/api/v1.0/meta/
https://api.stream-io-api.com/api/v1.0/meta/

This PR should also keep supporting QA test runs, local test runs (LOCAL=1), Heroku URLs and the use of arbitrary urls provided via base_url.

Submitter checklist:

  • CHANGELOG updated or N/A
  • Documentation updated or N/A

Merger checklist:

  • ALL tests have passed
  • Code Review is done
  • Dependencies satisfied

Dependencies:

@tbarbugli
tbarbugli requested a review from JelteF December 11, 2017 06:52
Comment thread stream/tests.py Outdated

if not self.local_tests:
self.assertEqual(
feed_url, 'https://api-tokyo.stream-io-api.com/api/v1.0/meta/')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this test is wrong

Comment thread stream/tests.py Outdated

if not self.local_tests:
self.assertEqual(
feed_url, 'https://personalization-tokyo.stream-io-api.com/personalization/v1.0/recommended')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this as well

Comment thread stream/tests.py Outdated

if not self.local_tests:
self.assertEqual(
feed_url, 'https://api-tokyo.stream-io-api.com/api/v1.0/feed/')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this as well

@tschellenbach

Copy link
Copy Markdown
Member

With this approach we also need to verify that the domains are used correctly:

  • do the personalization endpoints actually point to the personalization server (to me it seems they don't)
  • when we use custom locations we should still include the region. ie uacf is a terrible name. uacf-us-east would be much better.

@tbarbugli

Copy link
Copy Markdown
Member Author

@tschellenbach both uacf-personalization.stream-io-api.com and personalization.stream-io-api.com point to the ELB if that does not work let me and Alessandro know.

@BalazsHoranyi

Copy link
Copy Markdown

Did not mean to push that last change, apologies. Next push should put it back to where it was before.

@tbarbugli
tbarbugli merged commit 88572d2 into master Dec 13, 2017
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

Successfully merging this pull request may close these issues.

4 participants