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

Show version of parent & planet (connects #1671) #1676

Merged
merged 4 commits into from
Jul 19, 2018

Conversation

paulbert
Copy link
Member

Uses the new /version endpoint rather than the database.

@paulbert paulbert removed the WIP label Jul 16, 2018
@paulbert
Copy link
Member Author

I'd like to merge this so we at least don't have to manually add a configuration document to be able to login, but this doesn't fully fix the issue.

It's not working to show the version in the dashboard, and the GET request is failing to the nation and returning this error:

Failed to load https://paulbert.media.mit.edu/version: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://localhost:3000' is therefore not allowed access. The response had HTTP status code 405.

Because the development environment won't have a local /version location, I can't debug why the local version isn't showing up in the docker container, either. In any case I just wanted to fix up the changes we made to the configuration database and then pass this off.

@paulbert
Copy link
Member Author

Figured out what was going wrong: the headers were incorrect for the request. This appears to work now.

@paulbert paulbert requested review from lmmrssa, i5o and dogi July 17, 2018 01:50
@paulbert
Copy link
Member Author

After testing with the dev and paulbert nations, it looks like the changes I made were not enough and we will need to add the Access-Control-Allow-Origin header to the server.

@mappuji @dogi @lmmrssa Tagging so we can discuss at systems meeting.

Copy link
Contributor

@empeje empeje left a comment

Choose a reason for hiding this comment

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

I thought you are using file, but seems you're using the db-init to import the veersion and then call the database via angular.

how about if I update the planet, in couchdb if we re add different value to different document, it will update the record with the new one right?

@paulbert
Copy link
Member Author

@mappuji We're not using the database anymore for the version number. This PR removes changes that would involve db-init or CouchDB for storing & accessing the version. Basically the DB would be easier to accidentally change, so with this we just expose a file to read externally with the version as text (see #1666 for that change). Problem is we need to read that file with cross origins.

@empeje
Copy link
Contributor

empeje commented Jul 18, 2018

Cool, LGTM 👍

@dogi
Copy link
Member

dogi commented Jul 18, 2018

@paulbert how would I test this?

hmm - assume if I just look at the manager view ... but not sure

@paulbert
Copy link
Member Author

@dogi Yes look at the manager view to test. If you create a community on the "Paul" nation you will see both nation & community versions, if not you'll just see community.

@paulbert
Copy link
Member Author

@dogi I'm going to merge this & we can test tomorrow.

@paulbert paulbert merged commit 0672937 into master Jul 19, 2018
@lmmrssa lmmrssa deleted the 1671-show-version-number branch July 19, 2018 12:09
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.

None yet

4 participants