Skip to content

v0.30.0

Compare
Choose a tag to compare
@stephenplusplus stephenplusplus released this 04 Apr 18:49

Updating

$ npm install gcloud@0.30

⚠️ Breaking Changes

Datastore: v1beta3 released!


PR: #897

v1beta3 of Datastore was released, which brings a single, but significant re-structure to our API. You can read over the official API's release notes for a detailed breakdown of the changes. For most users, the following explanation will be sufficient:

Before
var datastore = gcloud.datastore;
var dataset = datastore.dataset();

var key = dataset.key(['Product', 'Computer']);
After
var datastore = gcloud.datastore();

var key = datastore.key(['Product', 'Computer']);

That's right-- remove dataset from your Datastore vocabulary! The object no longer exists, allowing you to access all of the methods you used to use dataset for right from the datastore object.

Important things!

If you haven't accessed Datastore within the last 7 days, you will need to re-enable the Cloud Datastore API. The "On Your Own Server" section of our Authentication guide will show you how you can do this.

Additionally, we are now using gRPC to give a performance boost to your Datastore calls. As of now, the gcloud SDK does not have a gRPC emulator, meaning if you wish to use a localhost backend instead of the upstream API, you will have to use the gcd.sh tool directly.

Logging: log.createWriteStream method removed


PR: #1049

This release swaps our transport layer under all Logging API requests. Previously, we've been using the JSON API, but we are now using grpc. This new layer invalidates the log.createWriteStream method, which is why it has been removed.

If you were using this method before, consider the following solution after upgrading using concat-stream and log.write:

var concat = require('concat-stream');

getEntryStream.pipe(concat(writeEntries));

function writeEntries(entries) {
  log.write(entries, function(err, apiResponse) {
    if (!err) {
      // The log entries were written.
    }
  });
}

Features

Fixes

  • Core (#1164, #1182): Cache gRPC channels for better memory usage.
  • Prediction (#1165): In model.query(), only return result scores when not querying a regression model.

Thank you!

If you catch any regressions, please open an issue. See the Contributing guide for how to get started.