We migrated to using the long form for key IDs sometime ago, but we
never updated the client of the gpgchallenge accordingly, so in
functions that take a keyID as an argument, it would fail to find the
given long keyID within a key ring.
However, for usability reasons, we want to keep the short form in the
hostname of the instance (and hence as the DNS entry), so we revert to
using the short form when perkeepd is setting its host name.
Change-Id: I8373016671fdead32780a04f6d64045e81cc9cd1
We had checks in place to return an error if a search query had both
no constraint and no expression. However:
1) we accepted " " as a valid search expression (which is the
work-around that was used by the web UI for the index page)
2) the rest of the code seems to be coping well if we remove these
checks, which this CL does.
This allows us to remove the q=" " trick in the web UI, which does not
seem to be breaking anything, and has the side-effect of improving the
map aspect story (issue 1081). Because with this change, the index page
is not considered anymore as the result of a search query, which means
if one then clicks on an image, one then gets to the image permanode as
a "standalone" item, instead of as one item part of set.
As a consequence:
1) If one then clicks on the map aspect, one gets only this item on the
map (with the proper zoom level), instead of all the items from the
index page.
2) The other side of the coin is left/right navigation does not "work"
anymore in this context, since the item is not part of a set anymore.
In other words, this change makes the index page (i.e. the empty search)
a somewhat particular case, and makes it behave a little differently
from the result of any other (non-empty) search.
Updates issue #1081
Change-Id: Ibbb1711c67c7cf8adaf94ab5d2c68c3755e4983b
Also disable the annoying mouse hover enter/exit behavior. Require
clicks. TODO: more focus events elsewhere should close the menu, but
this is better than before.
Also, rename the PIGGY variable to KEEPY for now, in prep for changing
the logo from a pig to the Keepy the Perkeep Parakeet mascot.
Updates #981
Change-Id: I48d9dd7267701b39122836aaad708726b1c105ac
We actually don't need to know the filename of an image for a valid
thumber to be created, so this change is removing such a strict check,
which was making foursquare venue photos not be displayed.
Also fix broken initialization of the thumber in foursquare container.
Change-Id: Iefb36fc403a3c1101d83f6af916b447e149f5acf
We still need to figure out the root cause of the problem, i.e.
why a sha224 importer node was created in the first place, when a
valid sha1 one already existed. Next CL.
Updates #1069
Change-Id: I00b4aab9a4f67b9c4ee198774378630615f6d11d
The blobserver uses a base blobserver in read-only mode,
and uses another stage blobserver to record changes.
In a sense it is a read-write view on the master
blobserver that never changes base itself.
Change-Id: I39c7d7bbac713c32fd17710fab43754b546ebb3b
The download handler was setting the Content-Disposition to attachment
when the MIME type was "application/octet-stream". That means when e.g.
a plain text file (and probably others) is (incorrectly) detected as
"application/octet-stream", it is saved to disk instead of being opened
as text by the browser, when using the "View Original" button of the web
UI.
Conversely, when using the "Download" button of the web UI, the file
should always be saved to disk, and never be opened by the browser.
Therefore, we add the ?inline request parameter to the downloadhandler
GET handler to unambiguously request whether the response should have an
inline or an attachment Content-Disposition.
The View Original button action now always requests an inlined response.
The Download button action now detects whether the selection was only
about one file, and if yes it requests the file as an attachment
(instead of using the POST handler that zips all the requested files).
Change-Id: I4bbc42f17fb4ea0aff9e17056e80156611d4b419
Check that all blobpacked zips are in the blobpacked meta, and
vice-versa (that all entries in meta do exist as a zip in large
storage).
As the current recovery code would not fix the case of stale entries
(large blobRefs in the blobpacked index of large blobs that don't exist
anymore), this change also adds a new recovery mode, which wipes the
existing blobpacked index, before rebuilding it.
In doing so, the recovery var in blobpacked pkg, as well as the
flagRecovery in camlistored.go have been changed to ints instead of bools,
to take into account that we now have several modes of operation for
recovery.
Fixes#946
Change-Id: I1fe76b805af34933e362d70c9f27bfd5403e3f3a
The current maximum size for a schema blob is 1MB. For a large enough
directory (~20000 children), the resulting static-set JSON schema is
over that maximum size.
We could increase that maximum, but we would eventually hit the maximum
blob size (16MB), which would only allow for ~300000 children. Even if
that is an uncommon size, it is technically possible to have such large
directories, so I don't think it would be reasonable to restrict users
to such a limit. So it does not seems like enough of a solution.
The solution proposed in this CL is to spread the children of a
directory (when they are more numerous than a given maximum, here set to
10000) onto several static-sets, recursively if needed. These
static-sets (subsets of the whole lot of children) are stored in the new
"mergeSets" field of their parent static-set schema. The actual fileRefs
or dirRefs, are still stored in the "members" field of the subset they were
spread in. The "mergeSets" and "members" field of a static-set are therefore
mutually exclusive.
Fixes#924
Change-Id: Ibe47b50795d5288fe904d3cce0cc7f780d313408
when its wholeref index lines contain any "sha1-" wholeref lines.
Then, have the client use that info when uploading files to also
compute the sha-1 (in addition to the sha-224) and ask the server for
both.
By client, we mean changes to cmd/camput, to pkg/client functions (for
camput and other Go clients, such as the apps), and to the web UI.
Also, add a -sha1 mode to devcam server, as well as the
CAMLI_SHA1_ENABLED env var, to facilitate testing/debugging of the
legacy sha1 mode. Fix/document unrelated options in devcam server
while we're at it.
Change-Id: I369679d2a4719f6f8b409f78dd4d065e13a3f62f
This removes NewDefault and NewFromParams.
Now the default way to create a client is:
client.New() -> (*Client, error)
Specifying a server is optional and now requires
client.OptionServer(server).
If the caller really wants to log.Fatal on error, they can use
client.NewOrFail.
Also, some of the boilerplate from GopherJS callers is now promoted to
be the default behavior in the client package.
Change-Id: Icb106cf3e13cc492fe5b2f7f240e1ad4227eaf33
I had intended for this to be a small change.
I was going to just add context.Context to the BlobReceiver interface,
but then I saw blob.Fetcher could also use one, so I decided to do two
in one CL.
And then it got a bit infectious and ended up touching everything.
I ended up doing SubFetch in the process by necessity.
At a certain point I finally started using context.TODO() in a few
spots, but not too many. But removing context.TODO() will come in the
future. There are more blob storage interfaces lacking context, too,
like RemoveBlobs.
Updates #733
Change-Id: Idf273180b3f8e397ac5929c6d7f520ccc5cdce08
The web UI support the old sha1 blob hash only.
Add initial support for sha224 blob refs.
Also add sha2.js and sha224.js to goog/crypt in the embedded resources.
Change-Id: If52d75d254d6163a737c56cf1676be1ef7eddb31
As the priority is to fix GCE instances, the port for the http-01
challenge is not configurable for now (80) even not on GCE, but it will
be in a follow-up change.
update golang.org/x/crypto/* (for acme) to rev
13931e22f9e72ea58bb73048bc752b48c6d4d4ac
update golang.org/x/sys/* to rev
fff93fa7cd278d84afc205751523809c464168ab (because unix is a dep of
crypto)
remove warning about Let's Encrypt security issue from pkg/deploy/gce
I had to manually exclude vendor/golang.org/x/crypto/acme/jws_test.go
for now because it contains a private key, and git whines about it, and
i could not override it.
Fixes#1033
Change-Id: Ie4f2049e97892dee9ab513300a5f12e64976aec8
This blobserver is just "cat"ing the given "read" storages.
This is read-only, so you should use some other storage to augment this for
writing and removing - for example the "cond" storage is perfect for this.
My use-case is to use blobpacked with large=diskpacked, small=filesystem,
but consolidate the small blob storage into a diskpacked + filesystem
after the filesystem becomes huge.
Another use-case is joining separately built camlistore servers into one.
(For me, they have to be separated later, so I've built them separately,
but I've to use it joined for a month).
Change-Id: I4e7e42cd59286f0f34da2f6ff01e44439771d53c
Calls to net.Dial* are prohibited with GopherJS. This can happen if the
client's transport is set by the user.
This change forces transportForConfig to return nil when the client
package is compiled with gopherjs, in order to make sure that a call to
newClient returns a client with a nil transport.
Change-Id: I577457bd7d924d31710168086dc2b394df3d1ae0
Notably: pkg/misc all moves.
And pkg/googlestorage is deleted, since it's not used. Only the
x/net/http2/h2demo code used to use it, but that ended in
https://go-review.googlesource.com/33230 (our vendored code is old).
So just nuke that dir for now. When it's refreshed, it'll either be
gone (dep prune) or new enough to not need googlestorage.
Also move pkg/pools, pkg/leak, and pkg/geocode to internal.
More remains.
Change-Id: I2640c4d18424062fdb8461ba451f1ce26719ae9d
Part of the project renaming, issue #981.
After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.
This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.
Also, this only moves the lru package to internal. More will move to
internal later.
Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.
This updates some docs, but not all.
devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).
Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
Update myitcv.io/react to revision:
bca7c66b77ed8a5b86fb77cff70914c4a7cc3ce5
Update react, react-dom to v15.6.2 based on instructions in
https://reactjs.org/blog/2017/09/25/react-v15.6.2.html
Add vendor/embed/react/update.sh script to assist with future updates
Update mobile UI to fix problems documented here:
https://reactjs.org/warnings/legacy-factories.html
Update mobile.html and debug_console.html to use minified js
Fixes#977
Change-Id: I15ea81822e4f85669b321d5b3eb8b169f534def7
This switches most usages of the pre-1.7 context library to use the
standard library. Remaining usages are in:
app/publisher/main.go
pkg/fs/...
Change-Id: Ia74acc39499dcb39892342a2c9a2776537cf49f1
When on the permanode details aspect, and navigating from one permanode
to the next, if some change had already been started on the new
attribute row, the change would "propagate" to the next permanode, which
is not desirable.
That is because the state of the new attribute row was not reset on
navigation, which this change does.
Fixes#923
Change-Id: I6dee8763b2c1fcac4b3592b21adc954eab9d0ffe
I had pasted them from an example when I started to work on the map
aspect, and forgot to look up their meaning/use afterwards.
Fixes#964
Change-Id: Ic92dcd9641a7fad49707c24f114b370f2c887828
On GCE, on startup, we did not set the camliNetIP in the high-level
config if the camlistore-hostname instance var vas already set.
The camliNetIP presence in the config is the signal for the server
that it should be configured as part of camlistore.net (and in
particular that it should update the record for its name on the
camlistore.net DNS server). Part of this configuration is to set the
camlistore-hostname var for the instance.
Therefore, a server which had been configured once as described above,
would not, on a subsequent restart, behave as if part of camlistore.net
and would skip the related configuration code path. Unless the
camlistore-hostname var was manually wiped before restart.
As this manual step is not an obvious one, this CL changes the
initialization, so that if a camlistore-hostname var is set, but the
value is a subdomain of "camlistore.net", the var is treated as empty
and initialization proceeds as if with a new server.
Fixes#963
Change-Id: Iab70185d7b90ef7e70bb831d363ff9d525922e35
To rev 37a4c36ce6286bb78bceb20579fecdfe7a759e02
Fix vendor/embed/closure/updatelibrary.go to now fetch from github.
Fix pkg/misc/closure/gendeps.go to work with new addDependency calls.
Fixes#903Fixes#961
Change-Id: Ie555cf9bf5a8624845095fb3351482a690a2571c
It looks like our vendored version of goog.dom.getDocumentScrollElement().scrollTop
does not work anymore for all browsers, as infinite scrolling is broken
for some.
This change is a work-around while we're working on a cleaner fix, like
seeing if an updated closure lib works correctly.
Fixes#961
Change-Id: I713529ff796f50ff7cf9234befbf6abbfb75e3cb
The Blob aspect in the web UI for non-permanodes is broken, because the
initial search now uses a ref: predicate instead of a Constraint. That
is because for now, expression searches (as opposed to constraint searches)
only match permanodes, so the initial search on the concerned blob
fails. See issue #944.
Until we figure out whether we want to allow non-permanode expression
searches, this change therefore reverts that initial search to a constraint
instead of a ref: predicate search.
And since the getQueryExprOrRef function in search_session.js still uses
a ref: predicate, the map aspect (for the single node case) is not
affected.
Issue #944
Change-Id: I5c4b4d0bca704a550b6a730f24b8e96568c5c8b6
The DownloadHandler only accepted file schemas as input for building a
zip archive so far.
It can now zip directories and their contents as well.
Non-regular files (socket, fifo, symlink) are now handled too.
As previously, no compression is applied when zipping.
When the DownloadHandler's Fetcher is a caching fetcher, all the files
that are supposed to be included in the archive are read, so we can
report reading errors even before starting to create the archive. We now
also take advantage of this optimization to build a
blobRef->filepath mapping when checking the files. Then, when the zip
archive is actually being built, the file path can be looked up in the
map, instead of having to assemble it again with recursive concatenation
of directory names.
Change-Id: I853c495798a9a43e12f3386603a70560ff46a237
myitcv.io/react replaces github.com/myitcv/gopherjs/react.
This commits also includes relevant changes to reflect the new API of
myitcv.io/react:
https://github.com/myitcv/react/wiki/Changelog
myitcv.io/react
rev 0b147f16090bc5007116c494ca7ea95f78ee4a16
myitcv.io/gogenerate (required by myitcv.io/react/cmd/reactGen)
rev bd69a94c96953d20e106734856b69d71c8fa122b
github.com/gopherjs/jsbuiltin (required by myitcv.io/react)
rev 67703bfb044e3192fbcab025c3aeaeedafad1f2f
Change-Id: I1951519d30455915aa2f75fbb418057f8075e27c
-keep the browser URL bar in sync with the current search/zoom-level
-introduce the "map:" predicate, to be used as the current viewport in
the map aspect. This was previously achieved with the locrect predicate. We
try to keep this new predicate unknown to the server, and replaced on
the fly by an equivalent locrect predicate.
-stay on the map aspect when the search expression has a map predicate.
Same thing when loading a URL with a map predicate parameter: try to
load directly on map aspect, instead of going to search aspect first.
-make sure there's only at most one map query in flight at all times
Change-Id: Ibf928ee5c926670c221f212f14ca9799e1e7bb79
Add a plugin to the markers cluster, strongly inspired (but trimmed, and
modified) from https://github.com/ghybs/Leaflet.MarkerCluster.Freezable
to freeze the markers cluster as it is on each zoom level.
Fixes#940
Change-Id: Id7f1ed8182a5bd701c6c47e02b144a67f9b69b36
The "ref:prefix" search predicate is simply the equivalent of the
Constraint {
BlobRefPrefix: prefix,
}
search constraint.
The "ref:prefix" search expression was already supported by the search
box of the web UI, but as opposed to (all, I think) other search
expressions, it was not supported server-side. Which means, it had to be
converted to a search Constraint as the above, before being sent in the
query.
This change therefore fixes this inconsistency. In addition, but
relatedly, since the map aspect relies on expressing the zoom-level as a
locrect expression, it is much simpler if the search query it uses only
has to be constructed from search expressions, and without search
constraints. So if we want to be able to support marking a single node
search with the map aspect, while dealing only with search expressions,
this change is necessary.
Fixes#939
Change-Id: Ia58f410198ecd1f7e0981321da370d687df3a120
Let the map aspect cluster markers by proximity, using the Marker
Clustering plugin for Leaflet.
Since we already do the work of spreading markers evenly server-side,
this plugin is a bit redundant.
However, it is still usefull as it allows us to request e.g. 1000 nodes,
and display a representation of all these nodes, without actually
displaying them all individually. This offers a work-around for the
bugs/glitches described in
https://github.com/camlistore/camlistore/issues/937
Even better, it allows us to re-enable the use of the awesome markers
that were introduced in e4b7db8274, but
that we had to disable because of the aforementioned glitches.
Also, added the 2x awesome marker images that the leaflet awesome markers
plugin uses for retina/mobile displays.
https://github.com/Leaflet/Leaflet.markercluster vendored in
vendor/embed/leaflet at version 1.0.6
Related: issue #947
Change-Id: I28c1184ad171af5eca953bb05f4a943d3573bfb4
This change makes zooming and panning on the map aspect send a new
"MapSort" search query, so that the (1000, by default) most relevant
results for the currently displayed area always appear as markers
after a zoom/pan.
This required completely "lifting up" (in React lingo) the currentSearch
state out of the Header class, and into the Index class, which should
have already been done in a56372830a. This
is necessary because we need the expression in the search box to be mutable
both by the user('s input) and by the map aspect, which represents the
zoom level as a trailing "locrect" predicate in the search expression.
Fixes#938
Change-Id: I0004c9ff09f03b4f1d95a35e54605689eebf0c1a
This change adds the logic to:
1) once a map aspect is loaded, get the area that includes all the
displayed results (the "zoom level")
2) modify the current query search predicate so that it includes the
above zoom-level as a locrect predicate
3) propagate that predicate change to the predicate that is displayed in
the search box, through the newly introduced currentSearch parameter
(a state parameter of the Index instance).
Change-Id: I955e6195ba71b2000c68c28278a534cec87f5311
Also make use of the new "locrect" search predicate, which allows us to
drop support for raw query with coordinates.
Also revert for now to using the native leaflet markers instead of the
AwesomeMarkers icons, as something in their style seems to be interfering
badly with the UI.
Fixes#934
Change-Id: Idd85eeb42673c43a216bce81c26a6bff5ad0c08a
Systemd by default sends SIGTERM to child processes when shutting down
or restarting a service, which is not handled by camlistored and results
in a hard kill.
This change makes camlistored listen for SIGTERM next to SIGINT to allow
graceful shutdowns. The log message for SIGHUP is adjusted for
consistency.
Change-Id: Ia9be84b0b2284343e1776042fdfc99363110bfb1
Notably:
-do not load any markers on an empty search query, because that would
mean loading absolutely all of the items with a location, which seems
like a bad idea.
-use different markers for different nodes. For now, foursquare
checkins, file images, and files have their own marker.
-vendor in https://github.com/lvoogdt/Leaflet.awesome-markers to achieve
the above, which relies on Font Awesome, which we already have in.
icons available for the markers: http://fontawesome.io/icons/
-when no location can be inferred from the search query, set the view to
encompass all markers that were drawn.
-when a location search is known, draw a rectangle representing the
results zone.
-use thumber for image in marker popup
-use title, if possible, instead of blobRef for link text in marker
popup
-switch to directly using OpenStreetMap tiles, instead of MapBox ones.
https://storage.googleapis.com/camlistore-screenshots/Screenshot_20170622-232359.png
Change-Id: Ibc84fa988aea8b8d3a2588ee8790adf6d9b5ad7a
When the blobpacked index gets corrupted/destroyed, it needs to be
rebuilt and hence camlistored refuses to start without the -recovery
flag being set if it detects it is needed.
This is a problem on GCE, because camlistored is handled by systemd, and
so the only way to restart camlistored with -recovery is to edit the
systemd service, then issue 'systemctl daemon-reload', and 'systemctl
restart camlistored'. Then revert the change for the next time
camlistored restarts. This is not user-friendly.
This change adds a check on camlistored startup based on the presence
and value (as a boolean) of the "camlistore-recovery" key as an instance
attribute. Therefore, the user only has to add the
("camlistore-recovery", "true") attribute in the Custom metadata of
their Google Cloud instance page to switch to recovery mode. (And
restart the instance).
As an additional feature (for non-GCE users), this change also adds the
option to restart the server in recovery mode from the status page of
the web UI.
Change-Id: I44f5ca293ddd0a0033fc5d9c2edca1bac0ee9c8f
The code to find the prefix URL that is used to display the share URL on
after successfully sharing an item, worked only on the main web UI page.
This change makes it work on hopefully any page.
Change-Id: I05e085f91ef7ebe39f880104e52ca487b80c607a
The download action of the web UI uses an ephemeral form, that we do not
connect to the DOM, behind the scenes. However, according to
https://html.spec.whatwg.org/multipage/forms.html#form-submission-algorithm,
step 2., a form must be connected to the DOM in order for it to be
submitted.
This change connects the form right before submitting, and removes it
from the DOM right after submission.
Fixes#921
Change-Id: I4d993c633c60a369ce4260f84731a64e8b955c76
The default server config on GCE (as deployed by the launcher) did not
have a share handler. This CL adds one, so that users can benefit from
the new sharing feature from the web UI.
Also, the button for sharing from the web UI does not appear anymore if
the config that the web UI gets from the discovery does not have a
"shareRoot", because it's a strong hint that the server does not have a
share handler.
Change-Id: I6c444995339fda8dba864b1d6729fb7c1b6d72bd
Sharing through the web UI was limited to a selection of one (permanode)
file or directory.
This change enables sharing of all the selected items, as long as they
are (permanodes of) files or directories, by creating a new directory
blob containing the selected items. The new directory is the item
getting shared. For clarity, and hopefully helping with search later,
the new directory is named "shared-YYYYMMDDhhmmss".
Change-Id: Iabd2266c9af85f3e8fbfa56ce98f653c0ce0f1ee
To share a file or directory through Camlistore's sharing
mechanism (https://camlistore.org/doc/sharing).
Only single-item sharing supported for now.
On success, the share URL is displayed in a dialog.
If the item is a file, it can be fetched with any HTTP client through
that URL. If the item is a dir, the share URL is of the claim, so one
must follow the transitive chain of sharing to get the directory's
children, i.e. use camget -shared.
Fixes#880
Change-Id: I324a684dec10225e5b8314dda7f1b77a0de6f727
We want to add a feature for clients (the web UI), where they can select
a bunch of files and ask the server for a zip archive of all these files.
This CL modifies the DownloadHandler so it does exactly that upon
reception of a POST request with a query parameter of the form
files=sha1-foo,sha1-bar,sha1-baz
This CL also adds a new button to the contextual sidebar of the web UI,
that takes care of sending the download request to the server.
known limitations: only permanodes with file as camliContent are
accepted as a valid selection (i.e. no sets, or static-dirs, etc) for
now.
Implementation detail:
We're creating an ephemeral DOM form on the fly to send the request.
The reason is: if we sent it as a Go http request, we'd have to read
the response manually and then we'd have no way of writing it to disk.
If we did it with an xhr, we could write the response to disk by
creating a File or Blob and then using URL.createObjectURL(), but we'd
have to keep the response in memory while doing so, which is
unacceptable for large enough archives.
Fixes#899
Change-Id: I104f7c5bd10ab3369e28d33752380dd12b5b3e6b
This change adds an "About" entry to the header menu, that pops up an
"About" dialog when clicked on.
But, under this innocent sounding feature is actually a more important
change: this feature is partly added through the use of gopherjs
generated code. In addition, the element added (a menu item) is
integrated
seamlessly into the menu as a React element, thanks to the use of
github.com/myitcv/gopherjs/react.
pkg/env had to be broken with build tags, because importing
"cloud.google.com/go/compute/metadata" (or one of its deps) seems to be
breaking the generated javascript.
https://github.com/camlistore/camlistore/issues/904
github.com/myitcv/gopherjs/react at rev
c04b811da4a086defd882a94cc1901da2d2158b0
honnef.co/go/js/dom at rev 24aa052bc5c63cfb9383bf59493ee48621ca788c
Issue #904Fixes#798
Change-Id: Ic09b94014d520277f8178727293787ece468babd
React would bail out with:
Uncaught TypeError: this.refs.searchbox.getDOMNode is not a function
at Object.getSearchNode_ (http://localhost:3179/ui/header.js:321:33)
Change-Id: I26e3474ed08c9339eda2e78de87b458a4130c746
In addition to API changes, the V2 logging API uses
google.golang.org/grpc, which does not rely directly on net/http. This
is a problem for us because, among other things, when needed (on
CoreOS), we insert the system Root CAs in the TLSConfig of the
default http client through httputil.InstallCerts, which has no effect
on google.golang.org/grpc calls. Therefore, we switch to
github.com/bradfitz/grpc-go instead, which does rely on net/http.
And since GRPC requires HTTP/2, we also now need to manually configure
the default transport (since we're already modifying it) to be HTTP/2
enabled.
Related dependencies updated/added:
updated:
cloud.google.com/go/logging
a64eb5d53f434cc548fd6b2898b5a3e8a0c31b78
github.com/golang/protobuf
8ee79997227bf9b34611aee7946ae64735e6fd93
added:
github.com/bradfitz/grpc-go
188a132adcfba339f1f2d5da52498451341f9ee8
as a replacement for google.golang.org/grpc
github.com/googleapis/gax-go
da06d194a00e19ce00d9011a13931c3f6f6887c7
google.golang.org/genproto/googleapis/logging
08f135d1a31b6ba454287638a3ce23a55adace6f
google.golang.org/genproto/googleapis/datastore
08f135d1a31b6ba454287638a3ce23a55adace6f
google.golang.org/api/support/bundler
e4c04685e5d7db47ff294aa9e514b3a638c431c9
google.golang.org/genproto/googleapis/rpc/status
08f135d1a31b6ba454287638a3ce23a55adace6f
Fixes#873
Change-Id: I3ba14c94122dd9f1b88ef61c2dc26430690d28a9
The main motivation is that we want to use gopherjs +
github.com/myitcv/gopherjs/react , which requires a recent react.
This CL also fully switches to only using minified js files.
The changes in server/camlistored/ui are the result of some react
API changes, such as:
- wraps component instantiation in React.createElement
- React.classSet -> classNames
- Need tbody between table and tr in a couple places
- component array elts need unique keys (longstanding warning)
- change root elt from body to a child div (to fix warning)
- don't check isMounted in container render function
- fix a bunch of style keys using kebab-case instead of camelCase
Change-Id: Idc22d07704688ccde3e4f67d4f188a5ad32b6e32
Add the -staging flag to camweb so one can deploy on a staging
instance.
The instance name is then "camweb-staging" instead of "camweb", and its
hostname is "staging.camlistore.net", instead of "camlistore.org".
server/camnetdns: automatically and regularly discovers the IP of the
"camweb-staging" instance, so it can keep the record for
"staging.camlistore.net" up to date.
Change-Id: I7d64a774049ac01472666ee7e351fd6fb5e4c287
When reindexing on a (My)SQL based sorted.KeyValue, we should recreate
the database schema from scratch, which means dropping the tables.
However, index.Reindex just calls Wipe on the newly created
sorted.KeyValue, which only deletes the rows, and does not drop the
tables.
Therefore, this CL changes the implementation of Wipe in the MySQL case,
so that it takes care of dropping the tables, and doing everything that
needs to be done afterwards to set up the sorted.KeyValue.
In addition, with the introduction of the sorted.NeedWipeError, we detect
upon initialization of a sorted.KeyValue if it failed because it needed
a schema update. If that is the case, and we're in reindex mode, we can
fix the sorted.KeyValue with a Wipe and carry on.
Finally, we introduce the new sorted.NewKeyValueMaybeWipe function that
automatically wipes a KeyValue when a NeedWipeError was returned upon
its creation.
Next, do the same with other sorted SQLs.
Fixes#806
Change-Id: I2032781cbf453a364880bd3e2e8b3c09aac7aed9
This CL changes the GCE launcher to work with the new features of
camlistored: i.e. that it can automatically get a hostname in
camlistore.net, and that it can get an HTTPS certificate from Let's
Encrypt, for said hostname.
In order for the user to easily (without having to look at the logs)
know what their hostname is, camlistored stores it as the
"camlistore-hostname" key in the custom metadata of the GCE instance.
The deployer can then query for that key, to report the hostname on the
instance creation success page.
Change-Id: Iaaef2d51f34fa5e1e0ee90097919abab7ee72a12
In order to use HTTPS, one must have a certificate, and one must have a
domain name for which the certificate is valid.
The first part is solved by the use of Let's Encrypt. For the second
part, we want to provide to any Camlistore instance a name such as
<gpgKeyId>.camlistore.net, where gpgKeyId is the fingerprint of its GPG
key. The DNS for camlistore.net agrees to add a record for that name if
and only if the Camlistore instance can prove it owns the GPG key, as
well as the IP address bound to that name in the DNS record.
A protocol such as the above is already implemented in pkg/gpgchallenge.
This CL:
- uses the client-side of the gpgchallenge protocol in camlistored, so
that it can claim a hostname in camlistore.net on startup (and then use
that hostname when requesting a certificate from Let's Encrypt).
- adds the configuration parameter "CamliNetIP" for the high-level
config. This parameter specifies the IP address that camlistored will
supply during the gpgpchallenge, so it can prove to the DNS server that
we own this address.
Fixes#722
Change-Id: I6bf4ec149b6dffd0ae93a6fa7bf208b2e8a05445