tugboat doesn't work with team accounts, because they use api v2

$ DEBUG=1 tugboat droplets
I, [2015-06-02T12:12:38.275351 #8815]  INFO -- : Started GET request to: https://api.digitalocean.com/droplets?client_id=XXX&api_key=XXX
D, [2015-06-02T12:12:38.275687 #8815] DEBUG -- : Request Headers:
----------------
User-Agent : Faraday v0.8.9

Request Body:
-------------

I, [2015-06-02T12:12:39.069769 #8815]  INFO -- : Response from https://api.digitalocean.com/droplets?client_id=XXX&api_key=XXX; Status: 200; Time: 794.3ms
D, [2015-06-02T12:12:39.070229 #8815] DEBUG -- : Response Headers:
----------------
server                 : cloudflare-nginx
date                   : Tue, 02 Jun 2015 09:12:39 GMT
content-type           : application/json; charset=utf-8
transfer-encoding      : chunked
connection             : close
set-cookie             : __cfduid=XXX; expires=Wed, 01-Jun-16 09:12:38 GMT; path=/; domain=.digitalocean.com; HttpOnly
status                 : 200 OK
x-frame-options        : SAMEORIGIN
x-xss-protection       : 1; mode=block
x-content-type-options : nosniff
cache-control          : max-age=0, private, must-revalidate
x-request-id           : XXX
x-runtime              : 0.141621
cf-ray                 : XXX-LHR

Response Body:
-------------
#<Hashie::Rash droplets=[] status="OK">

You don't appear to have any droplets.
Try creating one with `tugboat create`

I've just created a team account, but I'm not sure it's related. This happened before and after i re-executed tugboat authorize and filled all the necessary details. Any idea what's wrong?
Note I deleted anything that resembled a key/hash for security purposes :)

@fuzzyami

UPDATE: this is a bug in digitalocean's api.

UPDATE: API v1 doesn't work with team accounts. The solution to this is to update this repo to use v2 :
#122 #161
any progress on this?

Haven't had a lot of spare time to work on the API 2.0 support, I might just do an alpha for people to start testing things
https://github.com/pearkes/tugboat/issues/161

@oryband Can you try using the latest v2.0.0.ALPHA release and tell me if that works for you?

On OS X getting next error:
bash-3.2$ sudo gem install tugboat:2.0.0.ALPHA
Fetching: faraday-0.9.1.gem (100%)
Successfully installed faraday-0.9.1
Fetching: hashie-3.4.2.gem (100%)
Successfully installed hashie-3.4.2
Fetching: barge-0.10.0.gem (100%)
Successfully installed barge-0.10.0
Fetching: tugboat-2.0.0.ALPHA.gem (100%)
***************************************
Successfully installed tugboat-2.0.0.ALPHA
Parsing documentation for faraday-0.9.1
Installing ri documentation for faraday-0.9.1
Parsing documentation for hashie-3.4.2
Installing ri documentation for hashie-3.4.2
Parsing documentation for barge-0.10.0
Installing ri documentation for barge-0.10.0
Parsing documentation for tugboat-2.0.0.ALPHA
Installing ri documentation for tugboat-2.0.0.ALPHA
4 gems installed

bash-3.2$ tugboat version
Tugboat 2.0.0.ALPHA

bash-3.2$ tugboat authorize
Note: You can get this information from https://cloud.digitalocean.com/api_access
Also Note: Tugboat is setup to work with v1 of the Digital Ocean API (https://developers.digitalocean.com/v1/)

Enter your client key:
Enter your API key: _MY_V2_KEY
Enter your SSH key path (optional, defaults to ~/.ssh/id_rsa):
Enter your SSH user (optional, defaults to root):
Enter your SSH port number (optional, defaults to 22):

To retrieve region, image, size and key ID's, you can use the corresponding tugboat command, such as `tugboat images`.
Defaults can be changed at any time in your ~/.tugboat configuration file.

Enter your default region ID (optional, defaults to 8 (New York 3)):
Enter your default image ID (optional, defaults to 9801950 (Ubuntu 14.04 x64)):
Enter your default size ID (optional, defaults to 66 (512MB)):
Enter your default ssh key ID (optional, defaults to none):
Enter your default for private networking (optional, defaults to false):
Enter your default for enabling backups (optional, defaults to false):
/Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/lib/tugboat/config.rb:95:in `create_config_file': wrong number of arguments (11 for 10) (ArgumentError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/lib/tugboat/middleware/ask_for_credentials.rb:26:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/lib/tugboat/cli.rb:38:in `authorize'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

bash-3.2$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

I'm leaving client id empty, also, tried to put simple 'na' but got exactly the same problem.

Yeah, I haven't got the auto-auth working with the 2.0 API yet, you'll have to manually add it to the ~/.tugboat file:
---
authentication:
  access_token: foo

@petems sorry, my team reverted to v1 so i can't test that now

@petems , it's working, i can see list of droplets, but some commands don't work, like tugboat create.
➜  ~ tugboat verify
Authentication with DigitalOcean was successful.

➜  ~ tugboat create testing11
Queueing creation of droplet 'testing11'.../Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/lib/tugboat/middleware/create_droplet.rb:34:in `call': undefined method `droplets' for #<Barge::Client:0x007faf64b6f038> (NoMethodError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/lib/tugboat/middleware/inject_client.rb:14:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/lib/tugboat/middleware/check_configuration.rb:19:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/lib/tugboat/cli.rb:164:in `create'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

Maybe it's my  ~/.tugboat file. Here it's content
---
authentication:
  access_token: _KEY_
ssh:
  ssh_user: root
  ssh_key_path: ~/.ssh/id_rsa
  ssh_port: 22
defaults:
  region: 8
  image: 9801950
  size: 66
  ssh_key: _ID_
  private_networking: false
  backups_enabled: false

Nah, the create function wasn't working at the time, let me release the second iteration of the Alpha

I can ssh in now. But creating still doesn't work. Do you want me to go over all commands and provide list  that failed and all errors?

@alekseyp That would be great if you could!
For creating servers, can you try changing the ~/.tugboat settings for servers to the following:
defaults:
  region: nyc2
  image: ubuntu-14-04-x64
  size: 512mb
  ssh_key: ''
  private_networking: 'false'
  backups_enabled: 'false'

The new API uses different strings for creating servers.

Alright, here we go. I hope it's readable.
Commands:
  tugboat add-key KEY-NAME                             # WORKS
  tugboat authorize                                    # DOES NOT WORK
  tugboat config                                       # WORKS
  tugboat create NAME                                  # WORKS
  tugboat destroy FUZZY_NAME                           # WORKS
  tugboat destroy_image FUZZY_NAME                     # DOES NOT WORK
  tugboat droplets                                     # WORKS
  tugboat halt FUZZY_NAME                              # WORKS
  tugboat help [COMMAND]                               # WORKS
  tugboat images [OPTIONS]                             # WORKS
  tugboat info FUZZY_NAME [OPTIONS]                    # DOES NOT WORK
  tugboat info_image FUZZY_NAME [OPTIONS]              # DOES NOT WORK
  tugboat keys                                         # WORKS
  tugboat password-reset FUZZY_NAME                    # WORKS
  tugboat rebuild FUZZY_NAME IMAGE_NAME                # DOES NOT WORK
  tugboat regions                                      # WORKS
  tugboat resize FUZZY_NAME -s, --size=N               # DOES NOT WORK
  tugboat restart FUZZY_NAME                           # WORKS
  tugboat sizes                                        # WORKS
  tugboat snapshot SNAPSHOT_NAME FUZZY_NAME [OPTIONS]  # DOES NOT WORK
  tugboat ssh FUZZY_NAME                               # WORKS
  tugboat start FUZZY_NAME                             # WORKS
  tugboat verify                                       # WORKS
  tugboat version                                      # WORKS
  tugboat wait FUZZY_NAME                              # WORKS

➜  ~ tugboat authorize
Note: You can get your Access Token from https://cloud.digitalocean.com/settings/tokens/new

/Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/ask_for_credentials.rb:8:in `call': undefined local variable or method `access_token' for #<Tugboat::Middleware::AskForCredentials:0x007fcf590d1c38> (NameError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/cli.rb:38:in `authorize'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

➜  ~ tugboat info test
Droplet fuzzy name provided. Finding droplet ID...done, 1234567 (test01)
done
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- pry (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/info_droplet.rb:24:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/find_droplet.rb:123:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_client.rb:14:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/check_configuration.rb:19:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/cli.rb:312:in `info'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

➜  ~ tugboat destroy_image testimage
Image fuzzy name provided. Finding image ID.../Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/find_image.rb:71:in `call': undefined method `images' for #<Barge::Client:0x007fbdc2a9e7f0> (NoMethodError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_client.rb:14:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/check_configuration.rb:19:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/cli.rb:247:in `destroy_image'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

➜  ~ tugboat info_image testimage
Image fuzzy name provided. Finding image ID.../Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/find_image.rb:71:in `call': undefined method `images' for #<Barge::Client:0x007fa73b9e84c0> (NoMethodError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_client.rb:14:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/check_configuration.rb:19:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/cli.rb:330:in `info_image'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

➜  ~ tugboat rebuild testing11 12790328
Droplet fuzzy name provided. Finding droplet ID...done, 1233455 (testing11)
Image fuzzy name provided. Finding image ID.../Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/find_image.rb:71:in `call': undefined method `images' for #<Barge::Client:0x007fbfb2816928> (NoMethodError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/find_droplet.rb:123:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_client.rb:14:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/check_configuration.rb:19:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/cli.rb:198:in `rebuild'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

➜  ~ tugboat rebuild testing11 '14.04 x64'
Droplet fuzzy name provided. Finding droplet ID...done, 1233455 (testing11)
Image fuzzy name provided. Finding image ID.../Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/find_image.rb:71:in `call': undefined method `images' for #<Barge::Client:0x007ff3e2002980> (NoMethodError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/find_droplet.rb:123:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_client.rb:14:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/check_configuration.rb:19:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/cli.rb:198:in `rebuild'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

➜  ~ tugboat snapshot testing11111 testing
Droplet fuzzy name provided. Finding droplet ID...done, 1233455 (testing11)
Warning: Droplet must be in a powered off state for snapshot to be successful
Queuing snapshot 'testing11111' for 6253568 (testing11).../Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/snapshot_droplet.rb:13:in `call': undefined method `droplets' for #<Barge::Client:0x007fb079258e48> (NoMethodError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/check_droplet_inactive.rb:12:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/find_droplet.rb:123:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_client.rb:14:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/check_configuration.rb:19:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/cli.rb:348:in `snapshot'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

➜  ~ tugboat resize testing --size=1024
Droplet fuzzy name provided. Finding droplet ID...done, 1233455 (testing11)
Queuing resize for 6253568 (testing11).../Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/resize_droplet.rb:9:in `call': undefined method `droplets' for #<Barge::Client:0x007fe26411a230> (NoMethodError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/find_droplet.rb:123:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_client.rb:14:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/check_configuration.rb:19:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/lib/tugboat/cli.rb:435:in `resize'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.1.0.ALPHA/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

@alekseyp Ok, I think I've fixed it, can you try the 2.0.0.pre1 release?

@petems , thanks!
Right away I see that SSH can't connect to public IP, it's alway using private, even with config changes or -e option
➜  ~ tugboat ssh -e server1111
Droplet fuzzy name provided. Finding droplet ID...done, 1234567 (server1111)
Executing SSH (server1111)...
ssh: connect to host <IP_ADDRESS> port 22: Operation timed out
➜  ~ tugboat ssh delivery311 -e
Droplet fuzzy name provided. Finding droplet ID...done, 1234567 (server1111)
Executing SSH (server1111)...
ssh: connect to host <IP_ADDRESS> port 22: Operation timed out

➜  ~ tugboat config
Current Config (Keys Redacted)
Path: /Users/alekseyp/.tugboat
---
authentication:
  access_token: _KEY_
ssh:
  ssh_user: root
  ssh_key_path: ~/.ssh/id_rsa
  ssh_port: 22
defaults:
  region: nyc2
  image: ubuntu-14-04-x64
  size: 512mb
  ssh_key: ''
  private_networking: 'false'
  backups_enabled: 'false'
  use_public_ip: 'true'

  tugboat authorize                                    # DOES NOT WORK

Is there anyway to configure it to use public ip for SSH?

@alekseyp Sorry was on holiday, I'll push up my fix and release another alpha of the gem.

Thanks! Can't wait for it.

Is there any update on that?

@alekseyp Hey! Wanna try now with v2.0.0.pre2?

@petems it's still using private IP :(

Also, info fails now.
bash-3.2$ DEBUG=1 tugboat info MyVM
Droplet fuzzy name provided. Finding droplet ID...done, 123456 (web01.MyVM.com)
done
/Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.pre2/lib/tugboat/middleware/info_droplet.rb:36:in `call': undefined method `ip_address' for nil:NilClass (NoMethodError)
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.pre2/lib/tugboat/middleware/find_droplet.rb:134:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.pre2/lib/tugboat/middleware/inject_client.rb:14:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.pre2/lib/tugboat/middleware/check_configuration.rb:19:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.pre2/lib/tugboat/middleware/inject_configuration.rb:10:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.pre2/lib/tugboat/cli.rb:319:in `info'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
	from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
	from /Library/Ruby/Gems/2.0.0/gems/tugboat-2.0.0.pre2/bin/tugboat:10:in `<top (required)>'
	from /usr/bin/tugboat:23:in `load'
	from /usr/bin/tugboat:23:in `<main>'

@alekseyp Try now? :+1:

@petems :ok: :+1: hallelujah
Thanks a lot! ill do more tests tonight

Yeah, I'm going to have to speed this up a bit, API 1.0 is EOL soon! :sob:


Create notes property from XML response

Adds note information to JobItem objects. Should resolve #564

Added a test for the notes property

Hey @jorwoods sorry for forever delays, open source 🤦 .
On a re-review, I realized that the note value and type can be very interesting depending on the job -- I'm thinking of cases that want to programmatically take action based on the value, which is more stable that the note text.
What do you think about a simple NoteItem class, or at least a dictionary that holds some of the other attributes on the note element?

What else can the note element contain besides text? statusNotes which is a different element can have other attributes, but for the purposes of solving the problem stated in the issue, as well as the problem I was trying to solve, those were contained with the note.text() instead of somewhere within statusNotes.

Ah-ha, you're right, I've confused the note with the statusNote. I feel like I was PM back when we added this to the API, so I can only blame myself for the overlapping names.


List Search

I couldn't wait, so I wrote a userscript for searching EdRefCard's list page. It's a very basic search for a "very basic" page, but hopefully it helps more people than just me. (Heck, maybe you can make use of it in lieu of a real search)
// ==UserScript==
// @name         EDRefCard Search
// @version      0.1
// @author       Liru Færs
// @match        *edrefcard.info/list*
// ==/UserScript==

document.addEventListener('keydown', function(e) {
    if (e.keyCode != 191) return;
    let search = prompt("Search for what?");
    for (let tr of document.getElementsByTagName('tr')) {
        tr.style.display = !search || tr.innerHTML.includes(search) ? "block" : "none";
    }
});

Simple how to use for those that can't read code:
Copy paste and save this as a new userscript in TamperMonkey/GreaseMonkey, refresh the list page to activate the script. Then navigate to the edrefcard list page.
Press ? or / to bring up a prompt for what to search for.
Type in what you want to search for (it is case sensitive).
To search for something else just press the key to bring up the prompt again.
To clear the search and show everything again just type nothing in the search prompt.
Anyway use it, don't use it, tear it apart, I leave it here for free use.

Superseded by #48


grant @chandler CI kickoffs

I need the ability to run the full CI on my branches to speed up dev cycle and fix issues without someone else having to point them out.

cc @larsbergstrom

@bors-servo r+

:pushpin: Commit 0ec24c6 has been approved by larsbergstrom

:hourglass: Testing commit 0ec24c6 with merge 8741ecb...

:sunny: Test successful - travis


disentangle source-control from packaging

Remove git ls-files from the gemspec.
I think this is one of those religious issues....
I get the value added of 'only release commited files'.  Essentially I'd argue you should be releasing a pure master or release branch, and that branch should have what is released, no-more-no-less. If you have files, etc that shouldn't be released these should be in the excludefiles for the development branch. Git's branching, squash commits, rebase etc means you can keep release/master neat while all the stuff that shouldn't be released is in the development branch.
See here for some details (no doubt google will throw up more):
http://cogniton-mind.tumblr.com/post/1423976659/howto-gitignore-for-different-branches

It is one of those religious issues.
I would say that I am not a fan of having an enforced pure release branch (while it is often convenient to refactor things or develop new features in branches, that is usually an ad-hoc or case-by-case decision for me). Moreover, given the current size, scope, and contributors to librarian, it would be more ceremony than seems to me to be warranted right now.
I do think it is important to enforce that no file is included unintentionally in a release that should have been ignored. The canonical list of which files are part of the project is, at the moment, git, and so no file should make it into a release that I have not explicitly added to git. (I don't do git add ., without at least first verifying via git status that that would only add files I want.)  It is a safeguard against, e.g., accidentally having editor swap files or rubinius compiled files being gitignored but accidentally included in a release. I do understand that I could set up per-branch excludesfiles and not set them up in master, which would help, but it doesn't help against global gitignore files and, for me, it would be too much ceremony.
I recognize that there are a number of problems with shelling out to git from the gemspec. But this is tradeoff. What would the benefits be of moving away from that, and how would one compensate for the benefits lost by moving away from that, without introducing more ceremony than is warranted?

It was quite difficult to disentangle some of the assumptions and logic in a brief response, and after drafting a long response, I think it is better suited to a blog post on this topic.
This is not the first time I've raised this objection, and you are not alone in rejecting it :)
Feel free to close the issue if your mind is made up.

My mind is not made up. But the needs are made up.

Canonical whitelist of files. No blacklist.
Simple process for simple projects. Or no process.


Document the versioning scheme

Once #356 reaches a decision, it needs to be explained in the readme with Cargo.toml code for what stable users and nightly users should do.

Fortunately this was resolved a different way (#358). SemVer as usual.


File -> New File opens two tabs at once

Describe the Bug
If a tab is already open and I choose to add another diagram via File -> New File, the editor opens two tabs at once. Expected behaviour would be just one new tab.
Steps to Reproduce

Have a tab open in Modeler
Select File -> New Fileand choose any diagram type
Two new tabs appear

Expected Behavior
Only one new tab opens.
Environment

OS: MacOS 10.14.6
Camunda Modeler Version: <IP_ADDRESS>49

Thanks for your report.
I cannot reproduce this on Linux so it looks like this may be a MacOS specific issue.

@barmac Can you have a look?

I cannot reproduce it on MacOS, sorry.

@benjschneider can you provide any more details which might help us to reproduce your problem? Or did you find out yourself what went wrong?

Cannot reproduce on Windows either.

I discussed this issue with @benjschneider today and he told me that he couldn't reproduce it afterwards. I am closing this.


Article submission - Building great content for your Intranet

Category

[ ] Content fix
[x] New article

Related issues

mentioned in #533

Contents of the Pull Request
Article containing ideas for creating content for Intranets. Hopefully entice others to add their experience, to share what kinds of things could be added to Intranet to spark ideas for those lacking in inspiration.

I have a guess at the front matter, id be interested to see what corrections are made.

Thanks so much, @pkbullock, for your contribution :) We will get this published in the next couple of days.


Add data quality part for parking_sensor_synapse using great expectations library

Type of PR

Code changes

Purpose

Add the data validataion part for parking_sensor_synapse using great expectations library, following the similar logic in the databricks.
For both 02_standardize and 03_transform notebook, add the following steps for data validation.
0. Create mount point path for spark job
1. Configure DataContext
2. Create a BatchRequest based on dataframe
3. Define Expecation Suite and corresponding Data Expectations
4. Configure a checkpoint and run Expectation suite using checkpoint

Does this introduce a breaking change? If yes, details on what can break
No
Author pre-publish checklist

[x] Executed test to prove my fix is effective or new feature works
[ ] No PII in logs
[ ] Made corresponding changes to the documentation

Validation steps

Run the notebooks: 02_standardize, 03_transform

Issues Closed or Referenced

Closes #issue_number

References #issue_number

Will move change to Archive folder to close this out.

@devlace  - Can this PR just be closed now since the parking_sensors_synapse was archived and is no longer in play?


BUG : "disallowSpacesInsideParentheses" works like "requireSpacesInsideParentheses"

The error "missing space before closing round bracket" appears when I write in my conf file either "disallowSpacesInsideParentheses": true OR "requireSpacesInsideParentheses": "all"
But in the JSCS Rules, disallowSpacesInsideParentheses is the contrary of requireSpacesInsideParentheses !
Here my jscs.json :
{
"preset": "jquery",
"maximumLineLength": null,
"requireMultipleVarDecl": null,
"requireSpacesInsideArrayBrackets": null,
"disallowSpacesInsideArrayBrackets": "all",
"validateQuoteMarks": { "mark": "'", "escape": true },
"disallowSpacesInsideParentheses": true,
"disallowMixedSpacesAndTabs": true,
"requireMultipleVarDecl": true,
"requireBlocksOnNewline": 1
}

Sounds like an issue with JSCS itself. Try looking for and posting the issue in: https://github.com/jscs-dev/node-jscs/issues

OK,
Sorry for the time but I need some explanations.
In the jscs-browser.js file, when I comment the line number 28171 (which correspond to "requireSpacesInsideParentheses": "all", in the module 152) , the error don't appear.
After this change, to show the same error, I must add "requireSpacesInsideParentheses": "all" in my jscs.json.
So this module seem's to be the default conf. It's correct ? Event if I choose jquery preset (it's seems there is no changes if I remove the jquery preset in my jscs.json)??
How can I overload, in my jscs.json, this parameter without change the containt in your jscs-browser.js file ?

Try "requireSpacesInsideParentheses": false instead of "requireSpacesInsideParentheses": null

Oops. I have miss a line in the official documentation... I've got a vision after a good night ^^'
Sorry for your loss time.
If I had understand your plugin, you have do the automatisation in bracket, all the logic come from node-jscs without changes. Is it correct ?
Thank you for your answers !

That's correct. This extensions just runs your code through node-jscs and prints whatever it finds.


[RFC] kernel: Extend busy waiting with mixed mode

If custom busy wait is used then it is possible that it has different
clock source than system clock and time measured will be different
compared to one sourced from system clock due to clock sources
inaccuracy. On the other hand custom busy waiting is used when system
clock frequency is low and cannot handle delays with microseconds
precision.
Adding CONFIG_ARCH_HAS_CUSTOM_MIXED_BUSY_WAIT option which is using
system clock for coarse busy waiting and custom function for
remainder. With this approach, error that could be seen for longer
delays is reduced.
Fixed #24784.
Signed-off-by: Krzysztof Chruscinski<EMAIL_ADDRESS>

@pabigot yes, i see that due to calculation time and alignment of RTC ticks "mixed" method will never give good results for us range. It starts to show better results for delays > 10ms.
@andyross I don't agree that this is nordic specific case. It might be like that now but zephyr is targeting low power devices and it will be applicable to any device that has low frequency system clock and thus different clock source for cpu and system clock. Even if HF clock is XTAL you might have LF clock from RC.
Mixed mode won't serve. What about threshold based one? Custom busy wait is used only for values below configurable threshold.

Mixed mode won't serve. What about threshold based one? Custom busy wait is used only for values below configurable threshold.

Only if you can guarantee that k_busy_wait(x) and k_busy_wait(x+1) have a consistent relationship for all x.  Having a significant discontinuity, or non-monotonic behavior, would be a problem.
While Zephyr does target low-power devices it's a long way from supporting them fully, and it will never be the only target application.
At this time I'd prefer a mix of two solutions to #24784:

Default to precise/accurate clocks for both CPU and system timer, allowing people who care more about power than accuracy to opt in to an alternative;
Accept that the system clock may be different from the CPU clock and that therefore k_busy_wait() may produce a different delay than  k_sleep() for the same requested duration.

That position may change if it's clear that a significant number of cross-vendor boards select unstable clocks by default, but the discussion for #22758 suggests the consensus approach is to default stable.

Only if you can guarantee that k_busy_wait(x) and k_busy_wait(x+1)

that cannot be guaranteed.

Default to precise/accurate clocks for both CPU and system timer, allowing people who care more about power than accuracy to opt in to an alternative;

That is only possible on boards with LF XTAL.

but the discussion for #22758 suggests the consensus approach is to default stable.

I think that there is a different meaning of stable there. Here we are talking about accuracy and HF clock accuracy is not that important except for k_busy_wait().
So it seems that there is no solution that could be accepted by all of us. For test purposes we can use   CLOCK_CONTROL_NRF_K32SRC_SYNTH assuming that k_busy_wait() is used only for short periods (<10 ms range) in the application.

Created alternative which should have clocks aligned for testing: #24972

Only if you can guarantee that k_busy_wait(x) and k_busy_wait(x+1)

that cannot be guaranteed

unless it uses the same clock for all durations, and that clock is stable, I agree.  We can fix the stability part at least where there's a policy to wait for stabilization before proceeding to boot.

I think that there is a different meaning of stable there. Here we are talking about accuracy and HF clock accuracy is not that important except for k_busy_wait().

k_busy_wait() is pretty important, since drivers depend on it to meet datasheet-specified durations.  Those should have some tolerance in them, so 8% maximum absolute error from HFINT might be OK.

So it seems that there is no solution that could be accepted by all of us. For test purposes we can use CLOCK_CONTROL_NRF_K32SRC_SYNTH assuming that k_busy_wait() is used only for short periods (<10 ms range) in the application.

My results checking things with an external 1pps signal on one nrf52840dk_nrf52840 device were:
When HFCLK is on the timer and systick errors are less than 1 ppm.  In
that case synth is the highest accuracy LFCLK source, with XTAL then
RC in decreasing accuracy.

When HFCLK is off the timer and systick errors are the same and are
generally between 3000 and 4000 ppm.  Using the synth clock LFCLK
tracks the HFCLK error; RC reduces to between -30 and -60 ppm (30 ppm
resolution); XTAL between 0 and 30 ppm (longer samples show 25 ppm).

So if what's important is minimizing the difference between elapsed time using k_busy_wait() and k_sleep() then switching to synth as a default would be the best option regardless of whether there's a crystal.


fix: FluentkeyCode in repeated events make program slow

🐛 Bug Report
I've created a custom way to select data into a table (with ctrl and shift modifiers).
I've noticed a performance issue with the OnKeyDown handler.
In my case, the OnKeyDown is repeated too many times as the ctrl key is kept pressed.

💻 Repro or Code Sample
<FluentKeyCode OnKeyDown="@OnKeyDownAsync" OnKeyUp="OnKeyUp" IgnoreModifier="false" tabindex="0"
               Only="[KeyCode.Function3, KeyCode.KeyF, KeyCode.Ctrl, KeyCode.Shift]" PreventDefault="true" StopPropagation="true">

.....

 private void OnKeyDownAsync(FluentKeyCodeEventArgs args)
 {

   Debug.WriteLine("OnKeyDown");
   if (MultipleSelectEnabled | ShiftModifierEnabled) return;
   if (args.Key == KeyCode.Ctrl)
   {
     MultipleSelectEnabled = true;
   }
   else if (args.Key == KeyCode.Shift)
   {
     ShiftModifierEnabled = true;
   }

 }

🤔 Expected Behavior
I would like a new Option to the FluentKeyCode: "StopRepeat" that will check the standard "Repeat" property. if they both are true, the JS will not execute any C# code.

😯 Current Behavior
The code provided, when ctrl key is pressed, the debug output is this:
14:10:57:631	OnKeyDown
14:10:58:129	OnKeyDown
14:10:58:129	OnKeyDown
14:10:58:129	OnKeyDown
14:10:58:129	OnKeyDown
14:10:58:366	OnKeyDown
14:10:58:366	OnKeyDown
14:10:58:366	OnKeyDown
14:10:58:631	OnKeyDown
14:10:58:631	OnKeyDown
14:10:58:631	OnKeyDown
14:10:58:631	OnKeyDown
and so on

💁 Possible Solution
use:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat

🔦 Context

🌍 Your Environment

OS & Device: [e.g. MacOS, iOS, Windows, Linux] on [iPhone 7, PC]
Browser [e.g. Microsoft Edge, Google Chrome, Apple Safari, Mozilla FireFox]
.NET and Fluent UI Blazor library Version [e.g. 8.0.2 and 4.4.1]

This feature will be include in the next Release. See #2908


Is there a way to have bidirectional relationships between entities?

For example:
`class House {
@Fields.object((options, remult) => {
options.serverExpression = async (house) =>
remult.repo(HouseOwner).find({where: { house: { $id: house.id }})
})
owners?: HouseOwner[] = [];
}
class Person {
name: string;
}
class HouseOwner {
@Field(() => Person)
person?: Person;
@Field(() => House)
house?: House;
}
`
When I have a bidirectional relationship like House and HouseOwner I'm getting this error "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory"

It seems that you have a circular loading scenario that is causing the issue.
When you load a house, it tries to load it's HouseOwner, but the HouseOwner has a House field, that tries to load the HouseOwner again etc...
You can prevent that in several ways:

Mark House as lazy in the HouseOwner entity.
In the call to the find method, add load:()=>[] which will instruct the code not to load the referenced entities.
You can also only store the House id on the HouseOwner entity and you wouldn't run into this in the first place.

One more fix, in the code where you load the HouseOwner, you seem to struggle with the id, you can simply say:
remult.repo(HouseOwner).find({where: { house: house }})
})

and it should work.
On a personal note, I don't like serverExpressions that are heavy - as they run always, not only when I want them.
I would use a separate fetch, to load the HouseOnwers - but that's just me

Perfect, it works when I mark it as lazy. Is there a way to mark the HouseOwner list as lazy? or is it better to implement a backend method like you said? Also the serverExpression works always even if I mark that as lazy?

@grrenier, currently lazy doesn't affect server expressions.
You don't necessarily need a backend method for this, you can simply read the HouseOwner array from the front end with another query.


Added LUX icon

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

[x] Filename in the lowercase format
[x] Image format: png
[x] Image size: 256 by 256 px

@giaki3003 I do not see lux in https://github.com/satoshilabs/slips/blob/master/slip-0044.md

@vikmeup Indeed, unfortunately the previous dev chose "1" for this BIP, not really sure why, so we'll be transitioning to 3003 in the next release (as seen in master-candidate). Addind to https://github.com/satoshilabs/slips/blob/master/slip-0044.md in a while too. Let me know if this presents an issue

@giaki3003 let me know once slip 44 is merged, we will merge it here then.

@giaki3003 let me know once slip 44 is merged, we will merge it here then.

Merged


Removed fields from google.golang.org/grpc 1.61

Concretely, the fields: localAddr and remoteAddr have been removed from google.golang.org/grpc/internal/transport/http2Server in some version of GRPC > 1.58.3 and <= 1.61.0.
This would make gRPC instrumentation stop working for services with updated libraries.

It seems already addressed but after updating, our integration tests failed. Let's see if we need to fix the tests or there is a bug.


What’s the reason behind the name change?

What’s the reason behind the name change? Is there functionality that the old plugin couldn’t provide due to its name, or a limitation in that plugin that required moving to a plugin with a new name?
According to the notice on the homebridge-platform-wemo page the process of moving to the new plugin requires a decent amount of effort from the end users:

If you are already using homebridge-platform-wemo you should consider moving to homebridge-wemo. You will need to reconfigure your HomeKit accessories from scratch - including their names, rooms, scenes and automations.

… but there’s no explanation about the reasons that prompted the name change which requires this effort from the end users.
A name change is entirely within your rights as an uncompensated developer and maintainer of this plugin, but that change does lead to a not insignificant amount of work for all the users of this plugin if they want to stay current, so it’d be useful to have some insight into the reasons that led to the change.

#26 is related

Hi,
homebridge-platform-wemo was an unmaintained plugin being held by homebridge looking for a maintainer - I took this on about 10 months ago.
The homebridge-wemo repo was also unmaintained, and this was offered to me a few weeks ago, so I decided to take it.
Of the two repo names, I think homebridge-wemo is cleaner and in-line with other plugins including others that I maintain.
In the future my focus will be on homebridge-wemo so naturally I have recommended users to switch to this plugin, but there is no urgency to switch as homebridge-platform-wemo is not suddenly going to stop working. In fact you don't have to switch at all.


Feature - test coverage on vtl files

Would be great to have coverage such as https://github.com/chucre/serverless-appsync-simulator-coverage

Absolutely, although unfortunately it appears non-trivial to add in as the process with e.g. Jest isn't well documented. If you have some experience doing this please do feel free to add a PR, or share any insights


Move runService to services-shared

Tinylicious depends on runService from services-utils; however, #5663 moved it to server-routerlicious (unexposed, unconsumable by Tinylicious). Then, #5801 moved it to server-routerlicious-base (exposed, many dependencies). In #6053, it became clear that we cannot add routerlicious-base as a dependency of Tinylicious just to get runService.
As discussed with @GaryWilber, this PR moves runService to services-shared which explicitly exists to "[implement] service interfaces that are shared between Routerlicious and Tinylicious." We believe that this should be the final, as-permanent-as-can-be spot for runService.

have you considered moving tinylicious into the serve packages to avoid issues like this?


[Suggestion] Add option for longest-common-prefix based double tab completion

This is a feature that most Unix shells supports, what it does it basically allows you to press TAB to get a list of suggestions then press tab again to insert just the maximal prefix of the options seen.
For example this is a typical flow:

Typical flow
one
two
two-bar
three-baz
three-buz

A flow in the double-tab longest common prefix scheme could like like:
t
t

TAB
t
  - two
  - two-bar
  - three-baz
  - three-buz

h
th

TAB
th
  - three-baz
  - three-qux

Because all entries have the same common prefix the second tab in a row will place the longest-common-prefix in.
TAB
three-

TAB
three-
  - three-baz
  - three-qux

q
three-q

Only a single match left so it's auto completed now.
TAB
three-qux

In ZSH this can be configured through two independent settings:

nomenucomplete which disables TAB from automatically inserting the first item.
noautocomplete which disables autocomplete on the first tab press if there's multiple options and just displays the list of options instead

Whether or not adding both options makes sense in VSCode I'm not sure, but it'd be quite nice to be able to use the same tab-completion flow in both VSCode and in shells.

This is normally a shell-level feature, does it not work when you configure the terminal to use zsh?
"terminal.integrated.shell.linux": "/bin/zsh"

I don’t mean I want the feature in the integrated terminal, that works already.
I am suggesting adding the behaviour to suggestions in the edtor.

What issue is this a duplicate of? I couldn't find one and I would like to track it.


State machine fails when using symbol values

Hi,
Background:
Using Mongoid, Rails 3.0.10, state_machine 1.1.0, status field is Symbol.
Working with a legacy app, I'm implementing a state machine to clean up.
The code is stuffed with many object.status == :foo so I'd like the statuses to remain symbols.
This in mind, I added the following in the state_machine:
state :in_creation, :value => :in_creation
state :in_progress, :value => :in_progress
state :in_review,   :value => :in_review
state :completed,   :value => :completed
state :paused,      :value => :paused
state :canceled,    :value => :canceled

And in console:
pry(#Groups::ClientsController)> @project.can_cancel?
=> true
pry(#Groups::ClientsController)> @project.status
=> :in_creation
pry(#Groups::ClientsController)> @project.cancel
=> false
pry(#Groups::ClientsController)> @project.status
=> "in_creation"
It's annoying because:

I can't go from one status to another
Status is changed from symbol to text after fail

So I commented the lines giving values to the statuses and it works:
pry(#<Groups::ClientsController>)> @project.status
=> "in_creation"
pry(#<Groups::ClientsController>)> @project.cancel
=> true
pry(#<Groups::ClientsController>)> @project.status
=> "canceled"
pry(#<Groups::ClientsController>)> @project.status
=> "canceled"

I deduce there is something wrong with the :value statement. Is it due to Mongoid?
Thanks in advance.
Benjamin

I dare asking because it would determine much of my planning: Do you think you could get rid of this bug before the end of next week?
I'm well conscious your achieved job is already great and I've no deadline to give you :)
I simply need the info to know what path I should follow :)
Thanks in advance for any answer.
Benjamin

Hi Benjamin -
I apologize I've been time-strapped recently.  My gut feeling is that this isn't a problem in state_machine, but instead a problem in Mongoid.  I suggest either digging into what's going on in Mongoid when the value gets written to and read from or implementing a workaround.  I won't be able to debug this myself until next week.
Best,
Aaron

Ok, I'll take a look at this track this week end.
Thanks for your answer :)

Because of urge to release, I finally use a mere workaround:
def status
  self[:status].to_s
end

def status=(value)
  self[:status] = value.to_sym
end

This does the job even if it remains a workaround.

Turns out this was indeed an issue with state_machine causing the field to be stored as a string instead of a symbol.  That issue should now be fixed.
Thanks for raising the issue!

Ok, after some other trials I found out that there is no difference between environments, just the test case was somewhat at the edge: in development and production, the objects didn't have any status.
But when status value is empty, Mongoid can set a default value. For instance, we did:
  field :status,   :type => Symbol, :default => :waiting_assignment

And it let the queries work like a charm.
But when we uncomment the state_machine code, it somewhat interferes with mongoid and the default value it sets.

Actually, now I upgraded from 1.1.0 to 1.1.2, it works fine.
Hope I haven't bothered you!

Hi,
I work with  apneadiving  and even though since the 1.1.1 this particular issue has been resolved and the work around with the setters and getters is no longer required.
There is still a background issue that is causing havoc in our project. The fact that through the state_machine, the values written to the db is of String format rather than Symbol format as expected.
This throws off mongoid queries for embedded documents.
Any idea on this ? Thx.
Alex


feat(lazygit): add gui.border option

Description
Added gui.border option for lazygit.

What's wrong with win.border?

win.border does not propagate to lazyvim / lazygit has it's own border.

https://github.com/folke/snacks.nvim/commit/d2f4f1937e6fa97a48d5839d49f1f3012067bf45#diff-541103904fdcb70bcce288ce0b16084d97a6dc21294b2d6a5bfdc34ff4bbb88bL77 makes this obsolete, thank you!


Document Codebase

I added Javadoc comments to everything. Did you want to more or can I close this issue?


raise SocketDisconnectedError with host and port args

when raise SocketDisconnectedError without host and port , we have no idea which broker has network issue.

Codecov Report

Merging #702 into master will increase coverage by 0.2%.
The diff coverage is 80%.

@@            Coverage Diff            @@
##           master     #702     +/-   ##
=========================================
+ Coverage   83.96%   84.16%   +0.2%
=========================================
  Files          25       25
  Lines        3348     3348
  Branches      532      532
=========================================
+ Hits         2811     2818      +7
+ Misses        390      383      -7
  Partials      147      147

Impacted Files
Coverage Δ

pykafka/connection.py
76.34% <80%> (-1.08%)
:arrow_down:

pykafka/topic.py
76.59% <0%> (-1.07%)
:arrow_down:

pykafka/broker.py
90.9% <0%> (-0.65%)
:arrow_down:

pykafka/balancedconsumer.py
89.08% <0%> (-0.59%)
:arrow_down:

pykafka/rdkafka/producer.py
87.22% <0%> (ø)
:arrow_up:

pykafka/handlers.py
97.76% <0%> (+0.74%)
:arrow_up:

pykafka/managedbalancedconsumer.py
77.77% <0%> (+1.38%)
:arrow_up:

pykafka/simpleconsumer.py
83.33% <0%> (+2.2%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d6bad5...ceaf578. Read the comment docs.

Thanks @zhipcui!


[Witivio] Updating the outdated brand names

Updated brand names like below:
Microsoft Flow -> Microsoft Power Automate
Flow -> Power Automate (only in Descriptions & Summaries)
PowerApps -> Power Apps
LogicApps -> Logic Apps

@NicolasHumann Please approve the changes and let me know if you have any questions


Fix Android strip not being run without Geode CLI

Using the parameter -DGEODE_DISABLE_CLI_CALLS=1 while configuring causes the strip step for the Android binary to get skipped. Since the binary itself changing depending on this argument doesn't appear to be intended behavior, this PR fixes the issue


Merge branch "hotfix/fix-typescript-imports" into main

:tada: This PR is included in version 5.1.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Distributed Tensorflow : Issue while starting/connecting to parameter server

I am trying to run a distributed tensorflow program with one parameter server and one worker over 2 vm each having gpu card but  it gives issues while connecting to parameter server with following 2 issues in the log:
1.tensorflow/core/distributed_runtime/master.cc:268] CreateSession still waiting for response from worker: /job:ps/replica:0/task:0
2.2020-03-20 17:34:11.395256: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
error: error running IJS server: "could not get remote execution state"
System Info :
Tensorflow-gpu = 1.14.0
gpu - Tesla V100-SXM2
Ubuntu 18.04.4
With grpc debug enabled got the following logs:
Using TensorFlow backend.
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From /user//vtensor/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.
WARNING:tensorflow:From /user//vtensor/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
WARNING:tensorflow:From /user//vtensor/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.
WARNING:tensorflow:From /user//vtensor/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:133: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.
WARNING:tensorflow:From /user//vtensor/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:From /user//vtensor/lib/python3.6/site-packages/keras/optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.
WARNING:tensorflow:From /user//vtensor/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3376: The name tf.log is deprecated. Please use tf.math.log instead.
WARNING:tensorflow:From /user//vtensor/lib/python3.6/site-packages/tensorflow/python/ops/nn_impl.py:180: add_dispatch_support..wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
2020-03-20 17:34:00.582262: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-03-20 17:34:00.595624: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2020-03-20 17:34:01.159488: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x43f71d0 executing computations on platform CUDA. Devices:
2020-03-20 17:34:01.159525: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): Tesla V100-SXM2-16GB, Compute Capability 7.0
2020-03-20 17:34:01.190018: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency:<PHONE_NUMBER> Hz
2020-03-20 17:34:01.195769: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x3bd9420 executing computations on platform Host. Devices:
2020-03-20 17:34:01.195833: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): ,
2020-03-20 17:34:01.198050: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: Tesla V100-SXM2-16GB major: 7 minor: 0 memoryClockRate(GHz): 1.53
pciBusID: 0000:0b:00.0
2020-03-20 17:34:01.199864: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2020-03-20 17:34:01.202665: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2020-03-20 17:34:01.204955: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2020-03-20 17:34:01.206197: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2020-03-20 17:34:01.208933: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2020-03-20 17:34:01.211107: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2020-03-20 17:34:01.216280: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2020-03-20 17:34:01.220159: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2020-03-20 17:34:01.220215: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2020-03-20 17:34:01.222970: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-03-20 17:34:01.222996: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187]      0
2020-03-20 17:34:01.223010: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0:   N
2020-03-20 17:34:01.227719: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 13690 MB memory) -> physical GPU (device: 0, name: Tesla V100-SXM2-16GB, pci bus id: 0000:0b:00.0, compute capability: 7.0)
WARNING:tensorflow:From /dev/local/store_keras_graph.py:32: The name tf.train.write_graph is deprecated. Please use tf.io.write_graph instead.
WARNING:tensorflow:From /dev/local/store_keras_graph.py:33: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:17: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:31: The name tf.train.Server is deprecated. Please use tf.distribute.Server instead.
2020-03-20 17:34:11.395256: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
error: error running IJS server: "could not get remote execution state"
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/user//vtensor/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:17: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:31: The name tf.train.Server is deprecated. Please use tf.distribute.Server instead.
2020-03-20 17:34:12.093571: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-03-20 17:34:12.130334: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2020-03-20 17:34:12.362334: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x3b74510 executing computations on platform CUDA. Devices:
2020-03-20 17:34:12.362373: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): Tesla V100-SXM2-16GB, Compute Capability 7.0
2020-03-20 17:34:12.390397: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency:<PHONE_NUMBER> Hz
2020-03-20 17:34:12.395027: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x40bcb60 executing computations on platform Host. Devices:
2020-03-20 17:34:12.395049: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): ,
2020-03-20 17:34:12.396859: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: Tesla V100-SXM2-16GB major: 7 minor: 0 memoryClockRate(GHz): 1.53
pciBusID: 0000:0b:00.0
2020-03-20 17:34:12.398523: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2020-03-20 17:34:12.400933: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2020-03-20 17:34:12.403149: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2020-03-20 17:34:12.404455: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2020-03-20 17:34:12.406953: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2020-03-20 17:34:12.409163: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2020-03-20 17:34:12.413758: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2020-03-20 17:34:12.416923: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2020-03-20 17:34:12.416983: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2020-03-20 17:34:12.419143: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-03-20 17:34:12.419161: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187]      0
2020-03-20 17:34:12.419185: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0:   N
2020-03-20 17:34:12.422384: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:worker/replica:0/task:0/device:GPU:0 with 15023 MB memory) -> physical GPU (device: 0, name: Tesla V100-SXM2-16GB, pci bus id: 0000:0b:00.0, compute capability: 7.0)
D0320 17:34:12.423871920   55784 ev_posix.cc:170]            Using polling engine: poll
D0320 17:34:12.423907616   55784 dns_resolver.cc:325]        Using native dns resolver
I0320 17:34:12.425125694   55784 socket_utils_common_posix.cc:346] Disabling AF_INET6 sockets because ::1 is not available.
I0320 17:34:12.425176554   55784 socket_utils_common_posix.cc:292] Enabling TCP_USER_TIMEOUT with a timeout of 20000 ms
I0320 17:34:12.425247870   55784 tcp_server_posix.cc:308]    Failed to add :: listener, the environment may not support IPv6: {"created":"@1584750852.425163790","description":"Address family not supported by protocol","errno":97,"file":"external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":379,"os_error":"Address family not supported by protocol","syscall":"socket","target_address":"[::]:2225"}
2020-03-20 17:34:12.425340: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:250] Initialize GrpcChannelCache for job ps -> {0 -> lgpbddgx03.gso.aexp.com:2224}
2020-03-20 17:34:12.425355: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:250] Initialize GrpcChannelCache for job worker -> {0 -> localhost:2225}
2020-03-20 17:34:12.432092: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:365] Started server with target: grpc://localhost:2225
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:49: The name tf.train.replica_device_setter is deprecated. Please use tf.compat.v1.train.replica_device_setter instead.
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:52: The name tf.train.import_meta_graph is deprecated. Please use tf.compat.v1.train.import_meta_graph instead.
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:53: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:188: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:70: The name tf.train.create_global_step is deprecated. Please use tf.compat.v1.train.create_global_step instead.
WARNING:tensorflow:From /user//vtensor/lib/python3.6/site-packages/tensorflow/python/ops/math_grad.py:1308: add_dispatch_support..wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:86: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:89: Supervisor.init (from tensorflow.python.training.supervisor) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.MonitoredTrainingSession
WARNING:tensorflow:From /dev/local/tensorflow_backend.py:94: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
D0320 17:34:15.655343415   56157 dns_resolver.cc:275]        Start resolving.
I0320 17:34:15.658418088   56042 tcp_client_posix.cc:332]    CLIENT_CONNECT: ipv4:<IP_ADDRESS>:2224: asynchronously connecting fd 0x154c04009a30
I0320 17:34:15.658539193   56045 tcp_client_posix.cc:150]    CLIENT_CONNECT: ipv4:<IP_ADDRESS>:2224: on_writable: error="No Error"
I0320 17:34:15.658636266   56045 tcp_client_posix.cc:113]    CLIENT_CONNECT: ipv4:<IP_ADDRESS>:2224: on_alarm: error="Cancelled"
I0320 17:34:15.658682435   56045 subchannel.cc:973]          Connect failed: {"created":"@1584750855.658611519","description":"Failed to connect to remote host: Connection refused","errno":111,"file":"external/grpc/src/core/lib/iomgr/tcp_client_posix.cc","file_line":207,"os_error":"Connection refused","syscall":"connect","target_address":"ipv4:<IP_ADDRESS>:2224"}
I0320 17:34:15.658714952   56045 subchannel.cc:897]          Subchannel 0x154c04008290: Retry in 1000 milliseconds
D0320 17:34:15.658725238   56045 dns_resolver.cc:255]        In cooldown from last resolution (from 3 ms ago). Will resolve again in 997 ms
D0320 17:34:15.658734069   56045 dns_resolver.cc:275]        Start resolving.

@alokmp83, Can you provide the simple standalone code to replicate the issue. Thanks!

@alokmp83,Please update for the above comment.

Hi - Sorry for the late due to unforeseen reasons.
I have been running this program through Univa grid engine and it turns out that this error:
error: error running IJS server: "could not get remote execution state"
is being thrown by the grid engine and its not an issue with tensorflow ps and worker grpc connection.
Hence closing this issue.Thanks for the followup.


Generate OSC configs

Some OSC apps like VRCFacetracking rely on the OSC avatar configs, and as such error when you try to use them.

Even then, I'd need to create them in the same folder where VRChat stores them, which is not... What ChilloutVR is supposed to do... :(
Either way, there's face tracking already in place in ChilloutVR, so I don't know why you'd need VRCFaceTracking... You could ask the devs to add a startup argument (e.g. -cvr) to make it read a ChilloutVR-specific folder for config files.

eye tracking shapekeys like eye widen, that's why Im usimg vrcfacetracking

The issue is that I can't just make CVROSC output config files to VRChat's cache folder! It's not good behavior!
I don't know what VRChat does in its black box, doing this could actually cause it to misbehave or even crash, if it tries to load the config of a GUID that matches one from CVR. Who knows? 😕

The best bet would be to collaborate with the VRCFaceTracking team, to implement something that could override the source path for these config files.
I'll take a look into it.

The configs are working for me! The name seems to be set to _PLAYERLOCAL which is not really an issue (for me).
My vrc osc app worked like a charm with the configs, except the minor difference that  vrc uses the avatar ids on the json file names without the avtr_ prefix (which is weird since they use the usr_ prefix on the folder. VRC logic I guess xD
Great work!


When abandoning the mission, he will disconnect

What is your Quests version / build number (do not say "latest")?
4.2.3-b307
Describe the problem and how to replicate it.
/quests quit
When abandoning the mission, he will disconnect
and prompt message
illegal characters in chat
Any console errors to share?
no

If applicable, can you provide an example quest from quests.yml?
custom6:
    name: '§a[每日]§e肌肉鍛鍊'
    npc-giver-id: 12
    redo-delay: 86400
    ask-message: §6[系統] §d為了鍛鍊肌肉,請依照順序§f左鍵黑曜石、右鍵石製按鈕§d各100次
    finish-message: ''
    stages:
      ordered:
        '1':
          damage-block-names:
            - OBSIDIAN
          damage-block-amounts:
            - 100
          damage-block-durability:
            - 0
        '2':
          use-block-names:
            - stone_button
          use-block-amounts:
            - 100
          use-block-durability:
            - 0
    rewards:
      commands:
        - mi give MATERIAL A73 <player>

Continued from #1902
I haven't been able to replicate this with the 4.2.3 release. What is your Minecraft server version?

Continued from #1902
I haven't been able to replicate this with the 4.2.3 release. What is your Minecraft server version?

Paper-216 (MC: 1.18.1)

I found the issue - the § symbol is not allowed in chat. Will update this ticket once I push a solution.

https://ci.codemc.io/job/PikaMug/job/Quests/308/


Lack of root url modification

Some deviant signed up our tenant using Companyname0 for some strange reason .... now anything in SP is referenced as Companyname0.sharepoint.com - we are about to move a ton of services over to SP and the mis-naming is causing a huge nightmare... the ability to change the root domain url is crucial - or at least the option to wipe everything out in SP and start from scratch - I cant even do this without cancelling the entire tenant and starting from scratch (mail is already online in Exchange - so this is not an option).

Yes, that is correct. It is currently not possible to change the SharePoint Online tenant URLs.

@smpltechno Thank you for submitting feedback. We understand that this issue has been resolved.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


CMD+W (Mac) closes the whole app, not just the current request tab

In Postman, pressing CMD+W closes the current tab however in Bruno this key combination closes the whole application.

Makes sense @dcoomber
Cmd+W is kind of the used universally as a key to close the tab (incl chrome and vscode).
A good first issue for anyone in the community to pick up.
We would need to add a hotkey listener here
And call the closeTabs redux action with the current activeTabUid

This functionality is now available in v0.11.0


Add request helper

We'll need a request helper to authorize API calls from our commands. We can probably re-use a lot of the logic that exists already in the login-helper login() method.

PR at #7


integration inside a docker-compose project

Hi,
I'd like to be able to configure consul & the registrator on a per project basis with docker-compose. But the registrator registers services from every other projects.
It would be great if I could tell the registrator to only care about containers with the same com.docker.compose.project label as him. Would that be within the scope of this project? (I'll try to make a PR later)

If you do a PR, please do it via environment variable since that's what
we're going to be changing configuration to instead of argument flags.
On Sat, Jan 9, 2016 at 3:13 PM, Mathieu Rochette<EMAIL_ADDRESS>wrote:

Hi,
I'd like to be able to configure consul & the registrator on a per project
basis with docker-compose. But the registrator registers services from
every other projects.
It would be great if I could tell the registrator to only care about
containers with the same com.docker.compose.project label as him. Would
that be within the scope of this project? (I'll try to make a PR later)
—
Reply to this email directly or view it on GitHub
https://github.com/gliderlabs/registrator/issues/318.

--
Jeff Lindsay
http://progrium.com


fix bugs that may cause program crash, change mkdir to mkdirs (#3249)

Fixes: #CLOUDSTACK-10406
Description

Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):
How Has This Been Tested?

using git-fwd-merge instead


Are tokens/claims sent from Amplify API -> Lambda validated first?

Questions:

Are the JWT's/claims passed from an Amplify GraphQL API to an Amplify-configured lambda with the @function directive validated before the lambda is run?
Is there a way to scope auth access to lambda resolvers?  What is the default access level (it seems to be 'private')?
Is this clarified in the Amplify docs somewhere?

Notes

With a schema like type Query { me: String @function(...)}, the only VTL resolver I see generated is Query.me.res.vtl which does not seem to contain auth code.
Amplify docs discuss the layout of the Event.Identity fields but not whether the fields are previously validated.
Legacy docs have a lambda example where the username is sent to Cognito via the AdminGetUser() command, which seems redundant if the claims are already validated and insufficient if they are not (as Cognito does not receive the full token to verify it).
Testing of this using AppSync's GraphIQL UI confirm that a signed out user attempting to call this lambda via a cloud-deployed api will get a '401 Unauthorized' error.  This suggests to me that the answer to 2) may be 'private'.  If so, is there any way to change that if desired and is this explained somewhere?
If you mock the api using amplify mock, the functions will successfully run as long as the (local) GraphIQL mock-JWT has a username field that matches a valid username in your prod auth pool.  What is going on here? Is the mocked JWT being issued by the prod Cognito pool (that would be a little scary)?  Is the prod userpool not used with the mocked API (I have reason to believe it is).

Thank you!!
Which Category is your question related to?
API, Lambda, Auth
Amplify CLI Version
7.6.5
What AWS Services are you utilizing?
Amplify (under the hood- AppSync, Lambda, Cognito)
Provide additional details e.g. code snippets

Hey @eettaa, we don't pass the JWT token from GraphQL API to Lambda function. Each Lambda function has it's own execution IAM role which determines the access level. Please feel free to reopen the ticket if you have any other questions.

Thanks for the response!! @AnilMaktala
My confusion is this:
The lambda is passed event.identity fields which contain information about the end user's identity (probably taken from the jwt at some point?). Are these fields verified before being passed to the lambda? For example, is the end user's jwt validated (perhaps by cognito?) Before the claims are put into the identity field? Or could I potentially create a bogus JWT, curl it to my appsync API, and have it show up in my lambda?

separately, is there a way in the amplify schema.graphql auth rules to clarify which end users can and cannot call the lambda through the API? It appears that any signed in user can invoke the API endpoints that delegate to lambdas. But what if I only want a group of users to be able to access it (those semantics are supported for model entries in the schema)?

Sorry if these questions already answered in the documentation, I didn't think they were when I looked...

@AnilMaktala I apologize if I'm missing it, but I don't think I actually have permissions to reopen this issue given that I'm not a designated collaborator of amplify.

Hi @AnilMaktala any updates here? I believe the question is still open.
Thank you!
Eric

Hi @eettaa, sorry for the delay.
Question 1: If you are using the Cognito auth to invoke the api, GraphQL operation is triggered only if the JWT token is valid. Otherwise, AppSync would throw an unauthorized error.
Question 2: you can use static groups. Please refer the documentation here let me know if works for you.

Thank you for the response!

Hey @eettaa 👋, We're closing this issue since we have addressed all of your inquiries. However, if you have any further questions and would like to reopen the ticket, please leave a comment here.


Testing with InMemory

The most important thing is how to scope the database to a single test...
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Linq;

namespace ConsoleApp1
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var serviceCollection = new ServiceCollection();
            serviceCollection
                .AddEntityFramework()
                .AddInMemoryDatabase()
                .AddDbContext<SampleContext>(c => c.UseInMemoryDatabase());

            using (var db = serviceCollection.BuildServiceProvider().GetService<SampleContext>())
            {
                db.Blogs.Add(new Blog { Url = "Test" });
                db.SaveChanges();
                Console.WriteLine(db.Blogs.Count());
            }

            using (var db = serviceCollection.BuildServiceProvider().GetService<SampleContext>())
            {
                db.Blogs.Add(new Blog { Url = "Test" });
                db.SaveChanges();
                Console.WriteLine(db.Blogs.Count());
            }
        }
    }

    public class SampleContext : DbContext
    {
        public DbSet<Blog> Blogs { get; set; }
    }

    public class Blog
    {
        public int BlogId { get; set; }
        public string Url { get; set; }
    }
}

Should also cover this point that was mentioned in #105

Keep DbContext's isolated; don't re-use the same context to seed the database and then query.

I'm trying to write a test that uses two DbContext's, sharing the same in-memory DB. The idea is to create the entities using the first context, and pass a clean context to the code that I'm testing. That way I can validate that I'm loading navigation properties correctly, etc, in my EF7 code. The best I could find was to register my DbContext as a transient:
public class TestClass
{
    private readonly ServiceCollection _serviceCollection;
    private readonly DbContextOptions<MyDbContext> _options;

    public TestClass()
    {
        var optionsBuilder = new DbContextOptionsBuilder<MyDbContext>();
        optionsBuilder.UseInMemoryDatabase();
        _options = optionsBuilder.Options;

        var _serviceCollection = new ServiceCollection();
        _serviceCollection
            .AddEntityFramework()
            .AddInMemoryDatabase();

        _serviceCollection.AddTransient<MyDbContext>(provider => new MyDbContext(provider, _options));
    }

    [Fact]
    public Test1()
    {
        IServiceProvider provider = _serviceCollection.BuildServiceProvider();
        using (var context = provider.GetService<MyDbContext>())
        {
            context.Add(new Thing { Id = 1 });
            context.SaveChanges();
        }

        using (var context = provider.GetService<ApplicationDbContext>())
        {
            // test with a new context but same DB
        }
    }
}

It seems to work, but is there a better way to achieve this?

@MikeWasson it's a bit of a "level up" on DI skills... but you can create scopes within a service provider to get new instances of scoped services... but the non-scoped services (such as the InMemory store) are shared between all scopes on the provider.
This actually emulates nicely what happens in ASP.NET - where a new scope is created for each request. So Test1() now approximates some data being inserted on one request and then some other logic happening on a second request that accesses the same database.
public class TestClass
{
    private readonly ServiceCollection _serviceCollection;

    public TestClass()
    {
        _serviceCollection = new ServiceCollection();
        _serviceCollection
            .AddEntityFramework()
            .AddInMemoryDatabase()
            .AddDbContext<SampleContext>(c => c.UseInMemoryDatabase());
    }

    [Fact]
    public Test1()
    {
        IServiceProvider provider = _serviceCollection.BuildServiceProvider();
        using (var scope = provider.GetRequiredService<IServiceScopeFactory>().CreateScope())
        {
            var context = scope.ServiceProvider.GetService<MyDbContext>())
            context.Add(new Thing { Id = 1 });
            context.SaveChanges();
        }

        using (var scope = provider.GetRequiredService<IServiceScopeFactory>().CreateScope())
        {
            var context = scope.ServiceProvider.GetService<MyDbContext>())
            // test with a new context but same DB
        }
    }
}

Page is now available at http://docs.efproject.net/en/latest/miscellaneous/testing.html
@MikeWasson I came up with some patterns to make things a little simpler (though we still have plenty of room for improvement - mostly implementing https://github.com/aspnet/EntityFramework/issues/3253) so you should take a look at the final article.

Awesome Rowan! :) That was exactly what I needed to understand how to scope my contexts :)

@rowanmiller Thanks Rowan. Your doc was helpful !

inheriting from IdentityDbContext throws a bit of spanner in the works with this: (http://docs.efproject.net/en/latest/miscellaneous/testing.html) - it doesnt contain a constructor that takes two arguments

@funzeye this is all changing in the upcoming RC2 and IdentityDbContext will have a constructor that allows you to pass in all this stuff.

cool,
great work guys. EF FTW.

@rowanmiller Hi. I reported this a while ago and since then the named dbcontext can be passed in but -- I find that the context is still shared.
I probably use a weird edge-case, but I am performing a bunch of integration tests in xunit (which work better than I could have ever hoped, with the exception of this problem) that spins up a TestServer with UseInMemoryDatabase for each test class.
The problem is, even with separate test servers, with separate dbcontexts, the underlying in memory database was still shared (each was created with a new Guid for a name)
I also get a "A second operation on this context....." type error that I'll never see in actual production all the time due to apparent context sharing.

@mgallig Please file a new issue on https://github.com/aspnet/EntityFramework including a full code listing or project that will let us reproduce what you are seeing.

@babu12f https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.servicecollection?view=aspnetcore-2.1

Following code works perfectly for me,
// Requires separate DI Service provider to isolate db instance as InMemory database is also shared within
// the class scope since the App Service Factory is configured to per scope instance for dbcontext
var internalServiceProviderForDbContext = new ServiceCollection()
.AddEntityFrameworkInMemoryDatabase()
.BuildServiceProvider();
var options = new DbContextOptionsBuilder()
.UseInternalServiceProvider(internalServiceProviderForDbContext)
.UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString())
.Options;

@logamanig It's generally best to avoid calling UseInternalServiceProvider if you don't really need to.

@logamanig It's generally best to avoid calling UseInternalServiceProvider if you don't really need to.

without calling UseInternalServiceProvider, not able to isolate the InMemoryDatabase instance between test cases. Just a unique database name is not enough to isolate.

See https://github.com/aspnet/EntityFrameworkCore/issues/3253#issuecomment-497724245

Following code works perfectly for me,
// Requires separate DI Service provider to isolate db instance as InMemory database is also shared within
// the class scope since the App Service Factory is configured to per scope instance for dbcontext
var internalServiceProviderForDbContext = new ServiceCollection()
.AddEntityFrameworkInMemoryDatabase()
.BuildServiceProvider();
var options = new DbContextOptionsBuilder()
.UseInternalServiceProvider(internalServiceProviderForDbContext)
.UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString())
.Options;

As pointed out by @ajcvickers , internal service provider is not required. specifying the inMemoryRoot in optionbuilder is the best way to do it.