Is it possible to use a Go package built from a different version? - google-app-engine

I'm using Go for Google App Engine, which uses an older version of Go. I want to use a third party package that requires a newer version of Go (goauth). It is possible to use that package in my Google App Engine program?
Goauth uses strings.SplitN, which does not seem to be present in the GAE version of Go.

Not without hacking the source of oauth to make it compatible, I'm afraid.
Either that, or you can try and contact the author to see if they are willing to publish a version compatible with AppEngine's Go version.
A third option would be to find an older revision of oauth which is compatible with your Go version and just use that one.

Related

Download an old version of Google App Engine SDK

Where can I find for download an old GAE SDK, say 1.9.15 ? I need to find out coverage and maybe use 3rd party API, which do not work well with the recent version.
It depends if the respective SDK is still officially supported or not. Both kinds are available in the appengine-sdks GCS bucket.
No longer supported SDKs (like the 1.9.15 one you're seeking) are available in the deprecated folder. Note that they may be under a subdirectory named as the version number without the dots, i.e. 1915 for 1.9.15).
Still supported SDK versions are available in the featured folder.

Which is the latest API for the Watson Conversation Service

I am checking out the documentation on IBM Cognitive Services and have come across two ways of connecting to my existing workspace.
Version 1
Version 2
My question is which of them is the one that needs to be used. They both appear to work but I am not sure which one to go with. Is there another API that is latest perhaps?
The latest version API will be on the release notes and the API reference.
https://www.ibm.com/watson/developercloud/doc/conversation/release-notes.html
Using an earlier version number will disable later features, but any workspace created with a later version may not be backward compatible, and results may be unpredictable.
There is currently no way to create earlier workspace structures once there has been an update to the version. But if you have older workspaces, they will still remain compatible.

AppEngine/Go: Using a new version of Go with the SDK

The Go SDK currently ships with Go version is 1.6.2 but the most recent is 1.7.1 . I need some enhancements/bugfixes that were released since 1.6.2 . However, when I replace the goroot directory in the SDK directory that contains Go 1.6.2 with a symlink that points to 1.7.1, I get an error that has to do with not being able to find bin/goapp, which looks to be AppEngine-specific and not provided in the standard Go build.
Does anyone know a way to upgrade the Go available in the AppEngine SDK? Does this mean that the Go in production is also 1.6.2?
Unfortunately you're stuck with the Go version that comes bundled in the latest App Engine Go SDK.
Even if you "switch" it locally with Go 1.7.1 and somehow you manage to compile and run your app with Go 1.7.1 (by adding the missing files from the SDK's Go root), the production environment currently also uses Go 1.6.2, so your app and Go code will run into errors in the live environment when code that is missing from 1.6.2 is referenced. Most likely even the deployment would fail.
Also note that when you deploy your app to App Engine, only the source files are uploaded, and your app is compiled in the cloud. So you can't even "trick" it by compiling it locally and somehow "exclude" source files and upload only the binaries (binaries are not even uploaded).
You can't do anything else but wait for Go 1.7.1 (or a newer version) to make it to the SDK. Note that the Go version bundled in the SDK usually lags a few versions behind, because for it to become the "live" version, it usually needs modifications / altering for the sandboxed environment of App Engine (certain restrictions must be applied / implemented), and it needs further / additional testing / strengthening regarding security.
At this point you should be able to upgrade - App Engine has supported Go 1.8 since 2017 and recently announced early support for 1.9.
In general, though, you're pretty much stuck with the versions supported in production - there's no way to link in your own version of Go to the SDK, and I'd argue that it would be extremely ill-advised to do so even if you could.

Can I run Appengine apps without the goapp tool/builder?

I'm wondering if there is any way to run and test GAE Go apps using the standard go test || go build etc tools and if it's not possible what's the technical reason.
The Go App Engine SDK contains the standard Go packages and tools, but a modified version of them.
The GAE SDK also contains local versions of the GAE platform services API implementations which are not part of the SDK (not even the API). So you can't just use the standard Go SDK. When you build or test with the GAE SDK, the SDK takes care of a context mockup so your app will have everything (or most of the things) required to "feel" it is running in the GAE environment. The SDK also contains the sandbox restrictions that are in effect in the production environment (e.g. you can't write to local files).
Also note that some features of the GAE SDK also rely on a Python runtime (because the Go GAE SDK was created using the existing Python GAE SDK), not everything is rewritten in go.
So taking all these into consideration it would not be feasible to build/test using the standard Go SDK and it is not even possible.

appengine disable app versions

I have a test app on app engine.
I incremented its version and deployed again
now If I modify some data in one version, it is written on datastore that 2nd version uses (because version point to same store)
how can I disable the version, without deleting it?
There's only one datastore that's common to all versions. It's not like each version has its own datastore.
You can set a default version, but you can't prevent anyone from directly forcing a version by going to http://version.appid.appspot.com
you could use namespaces to separate the data between versions.
https://developers.google.com/appengine/docs/python/multitenancy/overview

Resources