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

[SVCS-826] S3 Compatibility #8418

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

NyanHelsing
Copy link
Contributor

@NyanHelsing NyanHelsing commented Jun 7, 2018

Purpose

This PR enables users to connect any s3 compatible storage provider to their OSF account using the s3 addon.

Changes

  • Adds host, port, encrypted, and a nickname to ExternalAccount model
  • Enables a user to modify settings on their s3 account after it has been connected
    • The configuration for each account is more complex, requiring a user to enter all information if the account is updated or changes is error prone and inconvenient for the user
  • Updates waterbutler url creators to add host, port, and encrypted as a query params
    • Waterbutler needs this to connect to the provider

QA Notes

Ensure that users can connect s3-compatible providers

Documentation

Side Effects

Users modifying an account will necessarily modify that account for any other user that also has connected this account. (This is already a behaviour experienced using the 'connect or reauthorize dialog)

Ticket

https://openscience.atlassian.net/browse/SVCS-826

@NyanHelsing NyanHelsing changed the title Add hostname field to model and propagate to views [wip] Add hostname field to model and propagate to views Jun 7, 2018
@NyanHelsing NyanHelsing changed the title [wip] Add hostname field to model and propagate to views [SVCS-826] Add hostname field to model and propagate to views Jun 20, 2018
@NyanHelsing NyanHelsing changed the title [SVCS-826] Add hostname field to model and propagate to views [SVCS-826] S3 Compatibility Jun 29, 2018
- adds host name to Node Settings model in s3
- updates waterbutler url creators to add hostname as a query param
Original implementation tried to put the host on node_settings, the
final version puts the attribute on the external account model.
The serializer wasn't passing a couple of attributes, hots and nickname,
and the view model did not have attributes to accommodate them. This
adds in the attributes to allow this data to pass to and from the
backend.
Defer till future so product can consider it longer. This removes the
modify dialog that wouild allo a user to change settings on an
externalAccount without requiring them to reenter any information they
had already entered. Note that users will be required to use the
"Connect or Reauthorize" dialog, and they will be required to enter all
information for the account.
Removes the facility for a user to provide a string to use as a nickname
for the account. The system will instead try to guess the most useful
thing, using the account's username, and then falling back to the url of
the provider.
Runs migrations to remove nickname field from ExternalAccount model.
This is being deferred for product to have more time to discuss its
merits.
Removes extraneous `console.log` statements, etc..
Rather than create new fields to store settings about the
ExternalAccount, format the settings into a string and store that in
provider_id so we don't add new fields.

Update serializer/views so they can figure out how to get the data in
and out of the string.
Missing a paren and a few semicolons in addonSettings.js
user_settings mako file was missing a closing table row, this adds it
back in.
A couple of errors happend when creating the external account, like the
connection to s3 looking for attributes in the wrong places. This
resolves those problems
`provider_id` encodes some values needed on a provider-type basis. This
migration takes all the existing values and updates them to the new
format.
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

1 participant