perkeep/pkg/importer
Brad Fitzpatrick 382794c6ba importer: make RunContext.Context be a read-only accessor
The Picasa importer was deadlocking inside the golang.org/x/oauth2
package because the Picasa code was mutating its parent's context and
accidentally creating a cycle of *oauth2.reuseTokenSource values
(double-acquisition of the reuseTokenSource's sync.Mutex was the
deadlock)

The Picasa code really just wanted to create a subcontext from the
base context, where the subcontext did the oauth2 wrapping, but then
picasa was storing that subcontext in the
camlistore.org/pkg/importer-provided mutable "RunContext" structure's
public, embedded "context.Context" field. Unfortunately, the picasa
importer code had already used that *RunContext (pre-mutation) as the
context.Context for the base HTTP client.

This change changes the camlistore.org/pkg/importer.RunContext to not
have a public embedded Context field. Instead, it only has a read-only
accessor to get at the base context, similar to Go 1.7's
net/http.Request.Context() field. This will prevent this class of
error in the future.

Fixes #698

Change-Id: I9114b64aa1bfd7ea83b36ea1ab18ed88b4a44f7e
2016-04-25 14:30:39 -07:00
..
allimporters add canonical import paths 2016-03-13 19:57:14 -07:00
dummy Delete misc unused objects 2016-04-06 17:59:51 +02:00
feed importer: make RunContext.Context be a read-only accessor 2016-04-25 14:30:39 -07:00
flickr importer: make RunContext.Context be a read-only accessor 2016-04-25 14:30:39 -07:00
foursquare importer: make RunContext.Context be a read-only accessor 2016-04-25 14:30:39 -07:00
picasa importer: make RunContext.Context be a read-only accessor 2016-04-25 14:30:39 -07:00
pinboard importer: make RunContext.Context be a read-only accessor 2016-04-25 14:30:39 -07:00
twitter importer: make RunContext.Context be a read-only accessor 2016-04-25 14:30:39 -07:00
README Importer overhaul. Only Foursquare is currently working. 2014-03-31 10:56:30 -07:00
attrs.go flickr: some attributes changes 2014-07-30 23:13:57 +02:00
html.go importer: make the client secret be input type=password 2016-04-24 08:39:15 -07:00
importer.go importer: make RunContext.Context be a read-only accessor 2016-04-25 14:30:39 -07:00
importer_test.go vendor: go4.org/jsonconfig (and errorutil) 2015-12-01 17:21:49 +01:00
noop.go importers: add SupportsIncremental accessor 2014-07-31 11:34:31 -07:00
oauth.go Move remaining stuff in third_party/* to vendor/* 2016-04-20 16:49:15 -07:00

README

Permanode type:

camliNodeType: "importer"
importerType: "twitter"
authClientID:     "xxx"    // e.g. api token
authClientSecret: "sdkojfsldfjlsdkf"

camliNodeType: "importerAccount"
importerType: "twitter"
twitterAccount: "bradfitz"