Deploying DNXCore5 project to a Linux VM

Hi there,
I thought I had resolved this in a previous issue that I had open in the past but am still having issues.  I have a DNX Core 5 project, I'm using the publish feature of Visual Studio to deploy it to the file system.  I then zip that up and copy it to my VM.
In the zip is a bash script called "kestrel" this has an issue in the last line where it attempts to use the Windows binaries for the runtime, so I modify the line slightly so that it just calls
dnx --appbase "$DNX_APPBASE" "Microsoft.Framework.ApplicationHost kestrel "$@"

This still doesn't work and results in the following error,
The current runtime target framework is not compatible with "MyProject"
Current runtime Target Framework: 'DNX,Version=v4.5.1 (dnx451)'
Now I'm pretty sure I'm only targeting DNXCore5 but several obvious questions here,

Why does the bash script reference windows binaries in it?  Surely that's meant for Linux?
Why does Visual Studio always build the x86 version even when I tell it I want x64?  I thought that might have been the issue and have just built an x86 server to discover it isn't.
Why is it telling me I'm targeting dnx451 when that framework has been explicitly removed from both of my projects, they only target dnxcore5.

Any help with this would be greatly appreciated, I've tried stackexchange too and the official asp.net 5 forum but am not getting much luck with help and my project is pretty blocked now.  I was hoping to be able to demo this being deployed to Linux but really need assistance for this last bit.
I even removed Newtonsoft.JSON from my project thinking it might have been that but it wasn't, so I have very few dependencies now.  One of them is mine, the rest are Microsofts.
My project,json documents are as follows, according to the error this is what's wrong but I can't for the life of me work out what exactly?
My Web App
{
  "webroot": "wwwroot",
  "version": "1.0.0-*",

  "dependencies": {
	"Microsoft.Framework.ConfigurationModel": "1.0.0-beta5",
	"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta5",
	"Microsoft.AspNet.Mvc": "6.0.0-beta5",
	"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta5",
	"Microsoft.AspNet.StaticFiles": "1.0.0-beta5",
	"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta5",
	"Microsoft.Framework.Configuration.Json": "1.0.0-beta5",
	"Microsoft.Framework.Logging": "1.0.0-beta5",
	"Microsoft.Framework.Logging.Console": "1.0.0-beta5",
	"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta5",
	"Microsoft.AspNet.Mvc.WebApiCompatShim": "6.0.0-beta5",
	"System.Security.Cryptography.DeriveBytes": "4.0.0-beta-23019",
	"MyLib": "1.0.0-*",
	"Kestrel": "1.0.0-beta5"
  },

  "commands": {
	"kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5000"
  },

  "frameworks": {
	"dnxcore5": {
	  "dependencies": {
		"System.Runtime.Serialization.Json": "4.0.0-beta-23109",
		"System.Runtime.Extensions": "4.0.10-beta-23019",
		"System.Collections": "4.0.10-beta-23019",
		"System.Runtime": "4.0.20-beta-23019",
		"Microsoft.CSharp": "4.0.0-beta-23019",
		"System.Private.Networking": "4.0.0-beta-23109",
		"System.Net.Security": "4.0.0-beta-23109"
	  }
	}
  },

  "exclude": [
	"wwwroot",
	"node_modules",
	"bower_components"
  ],
  "publishExclude": [
	"node_modules",
	"bower_components",
	"**.xproj",
	"**.user",
	"**.vspscc"
  ],
  "scripts": {
	"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
  }
}

My Lib
{
  "version": "1.0.0-*",
  "description": "Description goes here...",
  "authors": [ "Joe Bloggs" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "dependencies": {
  },

  "frameworks": {
	"dnxcore5": {
	  "dependencies": {
		"System.Collections": "4.0.10-beta-23019",
		"System.Runtime": "4.0.20-beta-23019",
		"Microsoft.CSharp": "4.0.0-beta-23019"
	  }
	}
  }
}

Nick.

also
kestrel script created by publish process was
#!/bin/bash

SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

export SET DNX_APPBASE="$DIR/approot/src/MyProject"

exec "$DIR/approot/runtimes/dnx-coreclr-win-x<IP_ADDRESS>-beta5/bin/dnx" --appbase "$DNX_APPBASE" Microsoft.Framework.ApplicationHost kestrel "$@"

Changed to
!/bin/bash

SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

export SET DNX_APPBASE="$DIR/approot/src/MyProject"

dnx --appbase "$DNX_APPBASE" Microsoft.Framework.ApplicationHost kestrel "$@"

On your Linux machine I'm assuming you have the mono dnx runtime installed and set as active dnx, so when you run the bash script it is going to be using mono which is dnx451.
In beta7 we now have a way of installing other operating systems dnx's and then you can publish with --runtime set to the specific dnx you want.

Hi Brennan,
Would you recommend I update from beta 5 to the latest? Also is there any chance you could outline the steps I need to perform to get it from visual studio, into Linux as dnxcore? I'm desperate to get something working and would really appreciate the help / advice.
-----Original Message-----
From: "BrennanConroy"<EMAIL_ADDRESS>Sent: 28/08/2015 22:28
To: "aspnet/Home"<EMAIL_ADDRESS>Cc: "Nick Pateman"<EMAIL_ADDRESS>Subject: Re: [Home] Deploying DNXCore5 project to a Linux VM (#863)
On your Linux machine I'm assuming you have the mono dnx runtime installed and set as active dnx, so when you run the bash script it is going to be using mono which is dnx451.
In beta7 we now have a way of installing other operating systems dnx's and then you can publish with --runtime set to the specific dnx you want.
—
Reply to this email directly or view it on GitHub.

If you want to host with dnxcore50 on a non-windows OS then you will need to use beta7 or later. I don't know if VS supports publishing with a non-windows runtime yet. I would just run publish from the command line.
Go to folder with project.json
Restore packages
dnu publish --runtime <path to dnx folder> --out <folder to publish to>

that's i'll try but have literally just updated to beta 5 as i was told i would need that lol  I'm not expecting going up to 7 to be easy as going to 5 wasn't.

Good luck! :)

Sorry for posting back in here again, but it's just a quick question (i hope), regarding actually locating the beta 7 install, i'm using dnvm and typing,

PS C:\WINDOWS\system32> dnvm install 1.0.0-beta7 -u
There are no runtimes matching the name dnx-clr-win-x86 on feed https://www.myget.org/F/aspnetvnext/api/v2.
At C:\Users\nickp.dnx\bin\dnvm.ps1:563 char:9

    throw "There are no runtimes matching the name $RuntimeId on  ...

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : OperationStopped: (There are no ru...etvnext/api/v2.:String) [], RuntimeException
FullyQualifiedErrorId : There are no runtimes matching the name dnx-clr-win-x86 on feed https://www.myget.org/F/
aspnetvnext/api/v2.

my dnvm version is beta8, would that need to be beta7 maybe?

Beta7 dnx should be released sometime today on NuGet.org

Oh okay... so how have people been testing with it?  Sorry I'm confused (not difficult), is there some kind of place where you can get information of published frameworks etc?  Half the time dnvm won't find packages for me if I omit a build number on the end, so seeing a list of ones I can use would be really helpful.

We publish release bits to NuGet, see http://www.nuget.org/packages/dnx-clr-win-x64/1.0.0-beta6 these are the ones with no build number at the end
We have the dev feed for unstable bits, see https://www.myget.org/gallery/aspnetvnext this is where the build numbers are
Getting a list of builds is tricky but there is some way with fiddler and reading the json from MyGet

Thanks for the info :) I'm giving beta 7 a shot now.


Fix remove function for ControllableQueue

Cherry-picked to branch 2.0.
There is a bug in ControllableQueue.remove where it is trying to
remove the item from priority queue which holds a list of wrappers. This
change fixed it by comparing the value of the wrapper to the item
instead.
pr-link: Alluxio/alluxio#9201
change-id: cid-059e1abff26cafd64a76c786e20a7baf8f7d4258

@gpang PTAL.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/4072/
Test PASSed.

alluxio-bot, merge this please


drag-motion signal handler return value should be bool, not Inhibit

WidgetExt::connect_drag_motion accepts a function returning Inhibit, because the drag-motion signal handler returns a boolean. It was probably assumed that this signal's boolean returned value is used to inhibit signal propagation, like most other boolean-returning signals. However, this is not the case.
From the documentation for the D binding (which puts it more clearly than any other documentation I was able to find):

The ::drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling gdk_drag_status().

I can confirm that, with the current state of gtk-rs, returning Inhibit(true) results in drag acceptance, and Inhibit(false) results in drag rejection.

The same thing also applies to the drag-drop signal. true → "the drop is succeeding", false → "the drop is failing".

The same probably also applies to GTK4 in one way or another (CC @bilelmoussaoui).
@SolraBizna, do you want to submit a PR for changing this to a bool?

The same probably also applies to GTK4 in one way or another (CC @bilelmoussaoui).

There are probably some functions where it's needed for GTK 4, but not those as they were removed/replaced

As @sdroege suggested, I've made a PR that would resolve this issue. Hopefully it's adequate. I wasn't able to test it, but the changes are pretty trivial and everything does build.


incompatibility with campaignmonitor/createsend

They are creating their own verifiedhttpsconnection, we would need to patch that as well.
https://github.com/campaignmonitor/createsend-python/blob/master/createsend/utils.py
Example traceback:
File "/Users/djgoku/development/virtualenv/please_work/lib/python2.7/site-packages/createsend/client.py", line 33, in campaigns
    response = self._get(self.uri_for("campaigns"))
  File "/Users/djgoku/development/virtualenv/please_work/lib/python2.7/site-packages/createsend/createsend.py", line 192, in _get
    return self.make_request(path=path, method="GET", params=params, username=username, password=password)
  File "/Users/djgoku/development/virtualenv/please_work/lib/python2.7/site-packages/createsend/createsend.py", line 159, in make_request
    c = VerifiedHTTPSConnection(parsed_base_uri.netloc)
  File "/Users/djgoku/lib/python2.7/httplib.py", line 1164, in __init__
    source_address)
TypeError: unbound method __init__() must be called with VCRHTTPConnection instance as first argument (got VerifiedHTTPSConnection instance instead)

seems like this could be dealt with in much the same way as
https://github.com/kevin1024/vcrpy/issues/129

A lot of changes have happened to VCRpy since this ticket was opened. As this ticket has become stale, would you mind closing it if it is no longer needed / relevant?
If I haven't heard anything in a week I'll mark it as closed as we have a lot of old tickets that need to be groomed to make it easier to see what is still relevant.
However if it is still needed, please feel free to re-open or create a new ticket.
Thanks! 🙏


Review process for updating CHANGELOG with contributor details

What
Agreed in retro on 08/09/21 to review the process we have for updating the CHANGELOG with a contributor's details ahead of a release.
Why
To ensure we can thank all contributors at point of release.
Who needs to know about this
Developers, Technical Writer
Done when

[ ] Evaluate whether current process still works
[ ] Agree changes (if needed)
[ ] Update documentation as required

@EoinShaughnessy I think the main question is whether we are forgetting to credit people or not.

The format by which we credit contributors could use some locking down too. Annoyingly, it seems like GitHub prefers different formats in different places.
In Markdown, like the changelog file, the best method seems to be using a normal Markdown link: e.g. [querkmachine](https://github.com/querkmachine).
In release notes, GitHub would seem to prefer using the @-username functionality (e.g. @querkmachine). Adding the username in this fashion adds a dedicated contributors section in the GitHub interface.

The Markdown-formatted link will still work in release notes, but doesn't generate the contributors section. @-username links don't work in Markdown.


bug: Action Sheet cancel button background not showing in Ionic Dark Mode in iOS

Bug Report
Ionic version:

[x] 5.x
Current behavior:

The background of the cancel button of the Action Sheet Controller is not visible when using Dark Mode in iOS but is visible when using normal mode.
Expected behavior:

The background of the cancel button should the same as the other action sheet buttons.
Steps to reproduce:

Nothing much, I created a new Ionic App, and then copied this code into home.component.ts:
@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {

  constructor(private actionSheetController: ActionSheetController) {}
  async showActionSheet() {
    const actionSheet = await this.actionSheetController.create({
      header: 'Albums',
      buttons: [{
        text: 'Delete',
        role: 'destructive',
        icon: 'trash',
        handler: () => {
          console.log('Delete clicked');
        }
      }, {
        text: 'Share',
        icon: 'share',
        handler: () => {
          console.log('Share clicked');
        }
      }, {
        text: 'Play (open modal)',
        icon: 'scan-outline',
        handler: () => {
          console.log('Play clicked');
        }
      }, {
        text: 'Favorite',
        icon: 'heart',
        handler: () => {
          console.log('Favorite clicked');
        }
      }, {
        text: 'Cancel',
        icon: 'close',
        role: 'cancel',
        handler: () => {
          console.log('Cancel clicked');
        }
      }]
    });
    await actionSheet.present();
  }
}

Related code:

Here's my GitHub repository for the project :
https://github.com/canserkanuren/ionic-action-sheet
Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 6.6.0 (/Users/canserkanuren/.nvm/versions/node/v12.13.1/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.7
   @angular-devkit/build-angular : 0.803.26
   @angular-devkit/schematics    : 8.3.26
   @angular/cli                  : 8.3.26
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 2.0.1
   @capacitor/core : 2.0.1

Utility:

   cordova-res (update available: 0.12.1) : 0.11.0
   native-run (update available: 1.0.0)   : 0.3.0

System:

   NodeJS : v12.13.1 (/Users/canserkanuren/.nvm/versions/node/v12.13.1/bin/node)
   npm    : 6.14.2
   OS     : macOS Catalina

Here's a few screenshots for the normal mode and Dark mode :

Thanks for the issue. Can you try the following dev build and let me know if it resolves the issue?
npm i<EMAIL_ADDRESS>

It seems like it's working!
Thank you!!

Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic/pull/21084, and a fix will be available in an upcoming release of Ionic Framework.


Docker Compose examples?

Hello,
would it be possible please to get examples of running Roon in Docker using docker compose?
It would be great to get examples for the three Options you have put in the docker run examples, and especially where we put the "additional functionality" USB/ALSA devices in the docker compose format.
Thank you very much.

Thanks for the suggestion! I'm afraid I won't have time to create this example for a while. docker-compose is a more advanced tool than the audience I target with this repo. Typically the Dockerfile is pretty straightforward to migrate to docker-compose. Good luck!

Thanks for the suggestion! I'm afraid I won't have time to create this example for a while. docker-compose is a more advanced tool than the audience I target with this repo. Typically the Dockerfile is pretty straightforward to migrate to docker-compose. Good luck!

As you said, it's fairly easy to convert. Here's an example bridge networking one you might use. Compose uses bridge by default.
version: '3'
services:
  roon:
    container_name: roon
    image: elgeeko/roon-server
    restart: unless-stopped
    environment:
      - TZ=${TZ}
    ports:
      - "9003:9003/udp"
      - "9100-9200:9100-9200/tcp"
      - "9001-9002:9001-9002/tcp"
      - "9330-9339:9330-9339/tcp"
      - "30000-30010:30000-30010/tcp"
      - "49863:49863/tcp"
      - "52667:52667/tcp"
      - "52709:52709/tcp"
      - "63098-63100:63098-63100/tcp"
    volumes:
      - roon-server-data:/opt/RoonServer
      - roon-server-cache:/var/roon
      - [path to your music locally]:/music:ro
      - /run/udev:/run/udev:ro
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    device:
      - /dev/bus/usb
      - /dev/snd

volumes:
  roon-server-data:
    name: roon-server-data
  roon-server-cache:
    name: roon-server-cache

Cool, thanks for giving me a head start on this. I personally deploy via Ansible so Docker Compose isn't part of my flow. Perhaps I can build off of this to get a compose file that replicates the Ansible scripts (including the functionality you shared here), or alternately perhaps my Ansible scripts can migrate to use Docker Compose. I would push it as "here be dragons" since I won't maintain it with the same frequency, but if the community contributes back it would be a value-add since I know a lot use compose. Not sure which is the best direction.

Thanks a lot @begna112 ! Sincerely appreciated.
Hey @elgeeko1, could you share an Ansible playbook for deploying Roon? I'd switch over to Ansible if I could use it practically with Roon. Thanks a lot!

@umbongodrink in the README page for this repo, there is a link to a separate repo with Ansible scripts to deploy a Roon docker image.

@umbongodrink I added a working docker-compose file.

Yeah might be best to comment out either host mode or ports and add a comment for each.
I'll be honest, I hadn't even heard of these cap-add options. Are they necessary for DAC pass thru? I only intended to use network option for my setup.

Good point -- I'll comment out the ports section with a comment on which network mode would use it.
I didn't dive deep into the cap-add options. SYSADMIN I believe was either samba allowing to access the host filesystem, or to access onboard sound card. DAC_READ_SEARCH I believe was to allow Roon Server to discover new DACs without restarting the container.

@elgeeko1 The Docker-compose file you added is a really bad one for a not experienced user. I don‘t need to open port running in host mode. Nor I need to use cap-add running the container unsecured in privileged mode.

Agreed. I'll update accordingly (moving more advanced capabilities to the comments).

Simplified docker-compose file, feedback welcome:
https://github.com/elgeeko1/roon-server-docker/pull/8


New version: Terming v0.2.6

Registering package: Terming
Repository: https://github.com/foldfelis/Terming.jl
Created by: @foldfelis
Version: v0.2.6
Commit: 9e67590c24f0315e5244bf37274323b139ec4103
Reviewed by: @foldfelis
Reference: https://github.com/foldfelis/Terming.jl/commit/9e67590c24f0315e5244bf37274323b139ec4103#commitcomment-50234262

@foldfelis all comments must have [noblock] for automerge to work.  You have two options:

edit all of your comments without [noblock] to add [noblock]
delete all of your comments without [noblock]

In both cases you can unblock the situation alone.  Adding a new message with [noblock] doesn't unblock anything

Thank you.


Definition of ResponseValue

Need to find out how ResponseValue is implemented in this repository

/pilot search the code for ResponseValue

/pilot search the code for ResponseValue and find out how it works

/pilot search the code for ResponseValue and find out how it works

/pilot search the code for ResponseValue and find out how it works


FIX: Escape asterisk for Windows only when tag_prefix is empty

Fixes #273.
@DancingQuanta @mhkline @jenshnielsen Can you test to ensure this covers both uses cases? Unfortunately we haven't gotten CI tests working on Windows, so I can't test, myself.

If the tag_prefix is an empty string, I think you could just omit the --match argument altogether.  This would avoid having to guess whether to escape the asterisk or not.

Closing in favor of #283.


Bugfixes imports

Changes list:

Added setup.py;
Transformed project to python package.

Resolved #26
Resolved #27
Resolved #28

This pull request is now managed with CodeReviewHub. Refresh.


updated the index.html file with your good-looking selfie image on top

Looks great but it looks like there is a merge conflict because I merged some other pull requests before this :)


theme-obsidian2: 2.11 -> 2.12

Motivation for this change
Update to version 2.12.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 87529 1

1 package built:
- theme-obsidian2


spike: investigate best code practices and tests from other subnets

Summary for Implementing Tests for Our Subnet
Overview
We are enhancing our testing strategy to include tests that require the miner/validator to be running on the testnet. These tests will interact with the various endpoints of the nodes to ensure comprehensive coverage and reliability of our subnet.
Current Testing Strategy
Our current tests, as seen in the tests folder, primarily focus on mocking various components and verifying their behavior in isolation. For example:
Mock Subtensor Tests: Validate the behavior of MockSubtensor and its interactions with neurons.
@pytest.mark.parametrize("netuid", [1, 2, 3])
@pytest.mark.parametrize("n", [2, 4, 8, 16, 32, 64])
@pytest.mark.parametrize("wallet", [bt.MockWallet(), None])
def test_mock_subtensor(netuid, n, wallet):
    subtensor = MockSubtensor(netuid=netuid, n=n, wallet=wallet)
    neurons = subtensor.neurons(netuid=netuid)
    # Check netuid
    assert subtensor.subnet_exists(netuid)
    # Check network
    assert subtensor.network == "mock"
    assert subtensor.chain_endpoint == "mock_endpoint"
    # Check number of neurons
    assert len(neurons) == (n + 1 if wallet is not None else n)
    # Check wallet
    if wallet is not None:
        assert subtensor.is_hotkey_registered(
            netuid=netuid, hotkey_ss58=wallet.hotkey.ss58_address
        )

    for neuron in neurons:
        assert isinstance(neuron, bt.NeuronInfo)
        assert subtensor.is_hotkey_registered(netuid=netuid, hotkey_ss58=neuron.hotkey)

Mock Metagraph Tests: Check the properties and interactions of MockMetagraph.
@pytest.mark.parametrize("n", [16, 32, 64])
def test_mock_metagraph(n):
    mock_subtensor = MockSubtensor(netuid=1, n=n)
    mock_metagraph = MockMetagraph(subtensor=mock_subtensor)
    # Check axons
    axons = mock_metagraph.axons
    assert len(axons) == n
    # Check ip and port
    for axon in axons:
        assert isinstance(axon, bt.AxonInfo)
        assert axon.ip == mock_metagraph.default_ip
        assert axon.port == mock_metagraph.default_port
        ```

### Mock Dendrite Timings: Ensure that MockDendrite respects timing constraints and handles timeouts correctly.
```python
@pytest.mark.parametrize("timeout", [0.1, 0.2])
@pytest.mark.parametrize("min_time", [0, 0.05, 0.1])
@pytest.mark.parametrize("max_time", [0.1, 0.15, 0.2])
@pytest.mark.parametrize("n", [4, 16, 64])
def test_mock_dendrite_timings(timeout, min_time, max_time, n):
    mock_wallet = None
    mock_dendrite = MockDendrite(mock_wallet)
    mock_dendrite.min_time = min_time
    mock_dendrite.max_time = max_time
    mock_subtensor = MockSubtensor(netuid=1, n=n)
    mock_metagraph = MockMetagraph(subtensor=mock_subtensor)
    axons = mock_metagraph.axons

    async def run():
        return await mock_dendrite(
            axons,
            synapse=PromptingSynapse(
                roles=["user"], messages=["What is the capital of France?"]
            ),
            timeout=timeout,
        )

    responses = asyncio.run(run())
    for synapse in responses:
        assert hasattr(synapse, "dendrite") and isinstance(
            synapse.dendrite, bt.TerminalInfo
        )

        dendrite = synapse.dendrite
        # check synapse.dendrite has (process_time, status_code, status_message)
        for field in ("process_time", "status_code", "status_message"):
            assert hasattr(dendrite, field) and getattr(dendrite, field) is not None

        # check that the dendrite take between min_time and max_time
        assert min_time <= dendrite.process_time
        assert dendrite.process_time <= max_time + 0.1
        # check that responses which take longer than timeout have 408 status code
        if dendrite.process_time >= timeout + 0.1:
            assert dendrite.status_code == 408
            assert dendrite.status_message == "Timeout"
            assert synapse.dummy_output == synapse.dummy_input
        # check that responses which take less than timeout have 200 status code
        elif dendrite.process_time < timeout:
            assert dendrite.status_code == 200
            assert dendrite.status_message == "OK"
            # check that outputs are not empty for successful responses
            assert synapse.dummy_output == synapse.dummy_input * 2
        # dont check for responses which take between timeout and max_time because they are not guaranteed to have a status code of 200 or 408

New Testing Strategy
To ensure our subnet's robustness, we will introduce tests that require the miner/validator to be running on the testnet. These tests will:
1. Hit Different Endpoints: Interact with various endpoints of the nodes to verify their responses and behavior under real network conditions.
2. Validate Network Interactions: Ensure that the nodes correctly handle requests, process transactions, and maintain network integrity.
3. Performance and Reliability: Measure the performance and reliability of the nodes under different scenarios, including stress tests and edge cases.
Implementation Plan
1. Setup Testnet Environment: Ensure that the testnet environment is properly configured and that the miner/validator nodes are running.
2. Write Integration Tests: Develop tests that interact with the testnet endpoints. These tests will be more comprehensive and cover scenarios that are not possible with mocked components.
3. Automate Test Execution: Integrate these tests into our CI/CD pipeline to ensure they are run automatically and consistently.
Example Test
Here is a conceptual example of how a test might look:
import requests

def test_node_endpoint():
    response = requests.get("http://testnet-node-endpoint/api/status")
    assert response.status_code == 200
    assert response.json()["status"] == "running"

This test checks the status endpoint of a node running on the testnet, ensuring it is up and running.
Conclusion
By incorporating tests that interact with the testnet, we will achieve a higher level of confidence in the reliability and performance of our subnet. This approach will help us identify and address issues that may not be apparent in isolated, mocked tests.

@Luka-Loncar / @hide-on-bush-x what's the result of the spike?

We agreed on Friday that @hide-on-bush-x will add the description.

@mudler @Luka-Loncar updated!


Test conditions on permissions

Part of the new permission system allows for conditional checks to be done against the 'subject' or 'user' to provide more granular permissions that can be to logically granted based on subject or user attributes.
For example a Permission of:
{action: "delete", subject:"FormRecord", condition: {published: false}}

indicates that it provides the ability to delete a FormRecord only if the published attribute on the FormRecord is set to 'false'.
Attributes of a Permission:
interface RawRule {
  action: string | string[]
  subject?: string | string[]
  /** an array of fields to which user has (or not) access */
  fields?: string[]
  /** an object of conditions which restricts the rule scope */
  conditions?: any
  /** indicates whether rule allows or forbids something */
  inverted?: boolean
  /** message which explains why rule is forbidden */
  reason?: string
}

The inverted can be thought of as a 'cannot'.  So the same preivous permission could be written like:
{action: "delete", subject:"FormRecord", condition: {published: true}, inverted: true}

Acceptance Criteria

[ ] Conditions listed in Permissions are adhered to and correctly evaluate

Closing because the tests have been done as part of https://github.com/cds-snc/platform-forms-client/pull/1135


New-CsTeamsFeedbackPolicy not documented

Please extend the SfBO PowerShell documentation by adding the Cmdlets around Teams feedback policies as described here: https://docs.microsoft.com/en-us/microsoftteams/manage-feedback-policies-in-teams

@officedocsbot assign @yogkumgit

Hello @arifC  thanks for noticing and reporting, created a PR including the missing article.

PR has been merged, we can close this now @yogkumgit

@get-itips  Thank you very much for the contribution and updating the documentation with PR. @arifC Hope this update is helpful for you. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


Create an intro

Add an intro about yourself: who are you, what is your strength, why are you here.

Faster!

Done


DiscordSRV fix

This would close #5.
Spigot: Basically made the EventPriority for the AsyncPlayerChatEvent highest so it'll send UwUified messages to DiscordSRV.
Paper: This was a bit more complicated. Basically on enable we check if DiscordSRV is loaded, and if so, we'll check for which chat event they're using (it's in their config).

All works as intended on both Spigot and Paper.

I made issue on paper repo.
https://github.com/PaperMC/Paper/issues/8308

paper listener don't work

Once this works ima rewrite spigot.Uwuify

All works as intended.

Unless you have any objections I'll merge it!


ci(renovate): add a version to PR title so that auto-merges work

:tada: This PR is included in version 2.2.8 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


.Net: Add Ollama Connector

Motivation and Context
This PR brings support for Ollama Connector, this Connector uses the OllamaSharp library client to allow usage of native Ollama Endpoints.

Thank you. I think we are many who have been waiting for this.


how to apply the history changes

am not sure if its possible but is there anyway where you can open the history file and apply the changes like git ?

I'm not sure what you want...
For complete replace
There is the item menu "Restore" to replace current file with the history version.
see menu in tree
or Partial
Compare history and current version. You can copy lines from history to current version in diff editor.

many thanx for the img as eveytime i use restore i was getting an error, so now i actually know how to use it. "maybe remove it from the command panel ?"
but i was talking about the diff tool, is there a way to show the same panel vscode git use above each diff block where u chose to either merge or ignore ?

Sorry, but diff tool is a vscode feature. Contact vscode team if you want some improvement.

If you get an error when you restore, please give me some details to fix this issue

as the restore command is available in the command panel, so using it without having an opened diff view will give an error.
if there is away to only enable it when the diff view is visible it would be very helpful

The command restore is only for the popupmenu in the tree. So, I'll remove it from command panel.
I'll perhaps implement something else when a history file is open or in the diff view, I agree it could be helpful.

@zabel-xyz Thank you for this great tool. As a user, coming from Webstorm, where there was built in local history, this tool feels like home. Thank you for allowing users to save outside the workspace (awesome) and also allowing users to configure options vs being too opinionated about it - been surprised that many vs code extensions do not allow you to configure.
One tip - hopefully helps others - my diff was not working in VS code until I added the setting below to settings.json
"diffEditor.renderSideBySide": true

Thank you for your fix, but I have this isssue in progress and already fix this but not published yet.
Dont't close issues if it is in progress, thank you.


Update razorsql to 7.3.6

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] The commit message includes the cask’s name and version.

Additionally, if updating a cask:

[ ] sha256 changed but version stayed the same (what is this?).
I’m providing public confirmation below.

Merged as ad8573d71f34bd518e9b54417d2f0be4a3b8c7dc.


Misc App Todos

Use Case
Miscellaneous features that were discussed for the app
Tasks

[ ] Keep a list of recorded EKGs in the app even after it closes
[ ] Upload EKGs even when app is not running
[ ] Confirmation of the consent document emailed to the participant? Is a PDF Export possible or some sort of receipt?

Additional Task:

[ ] Verify Symptom upload, added after EKG is recorded

#42 Adds an option to get a copy of the consent document in the consent step (export button).
The rest of the elements here are on the TODO list for #42


[as2_user_interfaces] add as2_viz package

Basic Info

Info
Please fill out this column

Issue(s) this addresses
#600

ROS2 version tested on
Humble

Aerial platform tested on
Gazebo

Description of contribution in a few bullet points

Added as2_viz package to visualize models

Let's archive the original repo after merging this @RPS98


Improve iconId calculation to handle new semantic types

An identifier is extracted from the semantic tag of the concept's first active FSN (language code can not be taken into account as it is not stored on preferred descriptions).
If an icon with the concept's semantic tag identifier exists, it will be used as the concept's iconId
Otherwise, a BFS search visits all direct and indirect ancestor concepts, and checks whether an icon exists for the visited concept ID. Only the "closest" of such concepts are taken into account, unless an ancestor is reachable by different IS A routes.
If multiple IDs remain to pick from, the smallest SCTID wins, using String comparison semantics, otherwise the only result is used, or if no appropriate ID could be found, the identifier of Snomed CT Concept.

Current semantic tag identifiers that will be used as iconIDs:

clinical_drug
disorder
medicinal_product_form
medicinal_product
product


'diarydek : tag' should not store anything

It should see that there is no entry.

commit 4b7d9fe8116c973f247cb160a41585cee7ef41ed
Author: dankelley<EMAIL_ADDRESS>Date:   Fri Jul 5 08:12:07 2024 -0300
report error for blank entry (close issue 10)


Fixed example in documentation: Concat database function

Fixed example in documentation:

Use TextField instead of CharField as it's stated above it should be,
Readjusted indentation to make clearer the output_field is argument to Concat() and not annotate()
Use [] instead of () in Values to make it a bit easier to read with less brackets all over the place

Thanks for the patch. Here are my thoughts on each point you raised:

"If you want to concatenate a" -- as far as I understand that sentence isn't meant to have any relation to the example.
Looks useful.
I don't think the change is necessary, after all brackets in strings appear in a different color, but as is the # Get the display name as "name (goes_by)" comment would also have to be updated.

That sentence from the docs you mention goes on and states This is also required when concatenating a Value as in the example below. And then the actual example below does not use a TextField. To me, this looks contradictory and confusing .
Should i put back the () instead of []?

I think "This is also" could instead say "Specifying an output_field is also". Does that clarify it for you?
Yes, I think the parentheses are fine to leave as is.


AWS HTTP error: cURL error 60: SSL certificate problem

I got below error:
Error executing "ListObjects" on "https://s3-us-west-2.amazonaws.com/datsan?prefix=manual&encoding-type=url"; AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
My composer.
"aws/aws-sdk-php": "^3.20",
"aws/aws-php-sns-message-validator": "^1.1",
"doctrine/cache": "^1.6",
"fedemotta/yii2-aws-sdk": "*"
Thanks!

I solved this problem by adding cacert.pem into php.ini


chore(content-block): fixed width of card group on md viewport

Related Ticket(s)
[ContentBlock components] Storybooks QA #5533
Item 5 only:

At md break point, the cards are on 2 columns instead of 4:

Description
{{Add a human-readable description / detail summary of what the PR is changing and any details around how and why}}
{{If applicable, include a screenshot indicating an example or examples of what the PR is changing in the application}}
Changelog
New

{{new thing}}

Changed

{{changed thing}}

Removed

{{removed thing}}

Please make sure #5533 is not closed. This PR fixes one item from the issue but the rest still remains. Thanks!


fix:Black background when exporting to PDF

fix https://github.com/slidevjs/slidev/issues/1207
https://github.com/slidevjs/slidev/issues/1207 is caused by stacking context

Thanks for your contribution!
I think the style should be like this (not 100% sure):
<style lang="postcss">
#print-content {
  @apply bg-main;
}

.print-slide-container {
  @apply relative overflow-hidden break-after-page translate-0;  // <--- Add `translate-0` to here
}
</style>

Done, Appreciate your input


Created Boilerplate for graphql and mongoose - Jorge develop

Connected app with database hosted on MongoDB Atlas account
express app is running and some environment variables are already working


Allow passing a Websocket API compatible object to Horizon

We should allow the user to provide their own WebSocket implementation to Horizon. This will allow different transports, as long as they are websocket compatible.
Since we're going to move to RxJS's version of websocketsubject (#276) this issue is blocking on that one.

This seems like a very good idea, for the client side, and possibly also the server side if possible. Immediate use could be in testing client side situations such as errors and reconnections, as mocking the implementation with special error cases would be simpler than building a proxy server that would break the actual websocket connections in reliable ways.
For a baseline implementation, one needs to be able to set handlers as .onerror, .onopen, .onmessage and .onclose, to read .readyState with states 0,1,2,3 (and perhaps read constants CONNECTING = 0, OPEN = 1, CLOSING = 2, CLOSED = 3), and call .send and .close. A bit tricky is to provide correct error and close events (with code, wasClean, reason), but the tests could document the actually depended on interface. A similar approach was taken in RxJS websocket tests: see mock and tests.

I drafted a quick client side mock with some comments here:
https://gist.github.com/plievone/4ee0987839f1b470a39871f62190c7be

I'm working on #276 at the moment since it'll fix some other bugs in our websocket implementation (probably #595 for example), so this may overlap with this issue too.
How is the mock intended to be used?

That gist is just a barebones websocket mock (but proxying to real websocket, so not really a mock, more like a "Websocket API compatible constructor"), and one can use it in place of ordinary websocket (new MockWebSocket(path) etc). It could be passed to those RxJS websocket subjects to be used as a websocket constructor, and tweaked to conform to the actually depended on websocket interface. From Horizon's point of view the main question is how to handle close codes with transports that don't provide them.
Earlier this year I looked into RxJS5 WebSocketSubject and earlier WebSocket observable, which was the base for HorizonSocket, but despite them being from the same author, it looked like they had quite a different way of wiring things up, which different semantics for closing etc. There's also a curious comment about "a proper Operator/Subscriber implementation [eliminating] closures", perhaps we could make it happen somehow?

I saw that comment too, I think it could probably become an operator, it seems I implemented basically the same thing on top of it (we multiplex by the request_id)

This is going to be fixed by #276

Fixed in #619


Detail cleanup

New point API tests for detail query with new JSON and csv export methods; refactoring of 'detail' API into helper functions

Nice, I see where this is going for enabling all the /detail filtering for point-in-shape aggregations. And hooray for more test coverage!


ATA, AT0..AT8

The Antartic territory codes and parent territory codes do not quite reflect what the C library does.
Perhaps they should be removed altogether.

Removed in 2.0.0.


Documentation: Add in-repo docs

Our documentation hasn't been great in the repo, and we need to do better.
Here are a few items that we should include:

Troubleshooting tips (move out of private wiki)
Detailed command-line documentation, especially around cloning.
FAQ, including "how does microsoft/scalar fit in with microsoft/vfsforgit?"
Repo maintenance steps, such as cutting a new release.

Some of this information already exists in private wikis or One Notes. We should make as much public as possible.

As @jeffhostetler mentioned, we should make a point for why there is no Mac version. The FAQ is a good place for this, next to the discussion of how Scalar relates to VFS for Git.


Was working fine, now when I run (from script or command line) it, nothing happens...

Didn't modify the script at all, was running it on a particular query for a while and now it won't work at all. I tried re-cloning and running from command line and from within another script on Jupyter but all it does is return ''' Searching... \n Done. Output file generated "output_got.csv". ''' for the former and nothing for the latter...
Any ideas as to what happened? I visited Twitter and I don't seem to be blocked or anything.

Can you share your query? Some guys reported the same problem as ISP issues about the got search.

sure thing:
python Exporter.py --querysearch "bitcoin" --since 2016-12-30 --until 2017-02-29 --maxtweets 10000000

Hi @zacheberhart, I tried your query and it really didn't return anything, but I found out that it has a wrong until date, if you take a look the date is invalid, there is no 2017-02-29 in the calendar haha, try with another date, here it worked great after I put some valid value.


Debug Terminal: Echo Off control

A UI feature needs to be added to allow the user to set or clear the Echo Off feature.  This is preferably accessible from the main screen (near the Debug Terminal, in the vicinity of the Tx/Rx indicators).
This relates to Issue #184.

Verified enhanced.


Icon matching functions don't consider spot_6

        WHERE
            a.owner = {player_id} AND
            a.location = 'board' AND
            a.position = b.position AND
            (a.spot_1 = {icon} OR a.spot_2 = {icon} OR a.spot_3 = {icon} OR a.spot_4 = {icon})

Oh this explains https://en.boardgamearena.com/bug?id=88035. Nice find!

I'm just going to fix this in our ongoing alpha and it will eventually get deployed to production (probably at the end of the year, but this hasn't been causing very many issues in production it seems).


Export all playlists into one excel file

Hello,
Is there a way when exporting all playlists to export into one large file?
I have over 300 plus playlists and to do this manually takes way too much time.
Hoping someone could guide me on if this is possible.
Thanks

If you "Export All", then they should all end up in a zip file. Yeah, with that many playlists, it will spin for a good long time before the download starts. But unfortunately due to Spotify's rate limits, that's just a something we have to deal with.
Once it's down, it is possible to iterate through and concatenate all the .csvs programmatically using the language of your choice. I'd do it with Python and pandas myself.

Ok thank you. How difficult would it be for there to be another column in the excel (CSV file) that included the name of the playlist?

Not hard, but you'd be duplicating that information across every single row of the table. It's not something I'd consider adding to this web app, but you can do it in post-processing.


ContactPicker: closes parent sheet when ContactPicker is closed

removing line 58 fixes it,
viewModel.dummy.dismiss(animated: true)

but I believe it was there for some reason. I'm new to Swift so I need some help in making a PR for that.

I also see this issue... However, once I added in logic to validate Permissions (and stop crashing when they are denied), I no longer get the ContactPicker presented...
                                    HStack {
                                        Button(action: {
                                            saveRecipient()
                                            self.presentationMode.wrappedValue.dismiss()
                                        }, label: {
                                            Image(systemName: "square.and.arrow.down")
                                                .font(.largeTitle)
                                                .foregroundColor(.green)
                                        })
                                        Button(action: {
                                            let contactsPermsissions = checkContactsPermissions()
                                            if contactsPermsissions == true {
                                                self.showPicker.toggle()
                                            }
                                        }, label: {
                                            Image(systemName: "magnifyingglass")
                                                .font(.largeTitle)
                                                .foregroundColor(.green)
                                        })
                                        Button(action: {
                                            self.presentationMode.wrappedValue.dismiss()
                                        }, label: {
                                            Image(systemName: "chevron.down.circle.fill")
                                                .font(.largeTitle)
                                                .foregroundColor(.green)

                                        })
                                    }
            )

            ContactPicker(showPicker: $showPicker, onSelectContact: {contact in
                firstName = contact.givenName
                lastName = contact.familyName
                if contact.postalAddresses.count > 0 {
                    if let addressString = (((contact.postalAddresses[0] as AnyObject).value(forKey: "labelValuePair") as AnyObject).value(forKey: "value")) as? CNPostalAddress {
                        let mailAddress = CNPostalAddressFormatter.string(from:addressString, style: .mailingAddress)
                        addressLine1 = "\(addressString.street)"
                        addressLine2 = ""
                        city = "\(addressString.city)"
                        state = "\(addressString.state)"
                        zip = "\(addressString.postalCode)"
                        country = "\(addressString.country)"
                        print(mailAddress)
                    }
                    saveRecipient()
                }
            },  onCancel: nil)```

Anything obvious....

I also see this issue... However, once I added in logic to validate Permissions (and stop crashing when they are denied), I no longer get the ContactPicker presented...
                                    HStack {
                                        Button(action: {
                                            saveRecipient()
                                            self.presentationMode.wrappedValue.dismiss()
                                        }, label: {
                                            Image(systemName: "square.and.arrow.down")
                                                .font(.largeTitle)
                                                .foregroundColor(.green)
                                        })
                                        Button(action: {
                                            let contactsPermsissions = checkContactsPermissions()
                                            if contactsPermsissions == true {
                                                self.showPicker.toggle()
                                            }
                                        }, label: {
                                            Image(systemName: "magnifyingglass")
                                                .font(.largeTitle)
                                                .foregroundColor(.green)
                                        })
                                        Button(action: {
                                            self.presentationMode.wrappedValue.dismiss()
                                        }, label: {
                                            Image(systemName: "chevron.down.circle.fill")
                                                .font(.largeTitle)
                                                .foregroundColor(.green)

                                        })
                                    }
            )

            ContactPicker(showPicker: $showPicker, onSelectContact: {contact in
                firstName = contact.givenName
                lastName = contact.familyName
                if contact.postalAddresses.count > 0 {
                    if let addressString = (((contact.postalAddresses[0] as AnyObject).value(forKey: "labelValuePair") as AnyObject).value(forKey: "value")) as? CNPostalAddress {
                        let mailAddress = CNPostalAddressFormatter.string(from:addressString, style: .mailingAddress)
                        addressLine1 = "\(addressString.street)"
                        addressLine2 = ""
                        city = "\(addressString.city)"
                        state = "\(addressString.state)"
                        zip = "\(addressString.postalCode)"
                        country = "\(addressString.country)"
                        print(mailAddress)
                    }
                    saveRecipient()
                }
            },  onCancel: nil)```

Anything obvious....


Add functionality to Cake.GitHub?

I don't know if you are aware of the Cake.GitHub addin? It's an addin for integration with GitHub using Octokit. Currently it supports updating status of a build.
Having different addins for GitHub integration, which all use Octokit, could lead to issues for users when they use multiple of these addins, and the addins use different incompatible versions of Octokit.
What do you think about providing your functionality to the Cake.GitHub addin?
/cc @GeertvanHorrik I assume this would be OK for you?

The functionality added by this addin have been merged into the Cake.GitHub addin via https://github.com/cake-contrib/Cake.GitHub/pull/7 but no new release of the Cake.GitHub NuGet package has been published to nuget.org. I reached out to @GeertvanHorrik via email to discuss next steps.


Revendor testify/require

Seems to work locally, let's see if CI passes. govendor command did not let go of the mock and http packages but I cleaned stuff up manually and it seems to work. Thanks a lot!


Adding support for getting env config through client env

Make IMS environment configurable from config in standalone navigation
This is needed to load correct environment script of ims and unav

Resolves: MWPW-157474
Test URLs:

Before: https://main--milo--adobecom.hlx.page/?martech=off
After: https://ims-env--milo--adobecom.hlx.page/?martech=off

QA

https://adobecom.github.io/nav-consumer/navigation.html?navbranch=ims-env

Validation done for the PR to check  IMS environment configurable from config in standalone navigation
https://adobecom.github.io/nav-consumer/navigation.html?navbranch=ims-env&authoringpath=/federal/dev/gnavtest/locgnav

parameter check:
https://adobecom.github.io/nav-consumer/navigation.html?env=stage&theme=dark&navbranch=ims-env&authoringpath=/federal/dev/gnavtest/locgnav&unav=help,appswitcher,profile,notifications&imsclientid=adobedotcom-cc&showUnavSectionDivider=true&searchEnabled=on


RuntimeError: No available devices

Hi, i'm trying to run and test your repository, but every time I launch this python3 demo.py -i path/to/video.mp4 , I get the following error:
Pose detection blob file : depthai_blazepose/models/pose_detection_sh4.blob
Landmarks using blob file : depthai_blazepose/models/pose_landmark_full_sh4.blob
Video FPS: 30
Original frame size: 852x480
Padding on height : 186
Frame working size: 852x480
2254 anchors have been created
Creating pipeline...
Creating Pose Detection Neural Network...
Creating Landmark Neural Network...
Pipeline created.
Traceback (most recent call last):
File "demo.py", line 46, in
pose = BlazeposeDepthai(input_src=args.input,
File "depthai_blazepose/BlazeposeDepthai.py", line 175, in init
self.device = dai.Device(self.create_pipeline())
RuntimeError: No available devices
Can you explain me why this error appear?
Thank you,
Bests

Which OAK device are you using ?

Does it only with when an OAK device is connected?

@tristanle22 This repo works only with an OAK device connected.

I see, thks!

I have the same problem, how can I solve this, where can i get the OAK device ?

you'd have to buy an OAK device. Luxonis is the manufacturer: https://www.luxonis.com/


feat(graphql-connection-transformer): allow null key-based connections

feat(graphql-connection-transformer): allow null key-based connections
Issue #, if available: #5152 #5129 #3275
Description of changes:
Allow connections to @key defined indexes to include nullable connection attributes.
Legacy @connection directive allowed use of nullable fields. When @connection with @key was added, code was put in place to prevent using a nullable scalar as a connection key. I traced the origin of this code and could find no justification for it and removed the check.
Further, when a request is made using attributes which are null, DynamoDB can return errors due to wrong types being provided in key condition values. There is no reason to make a request to DynamoDB when the pk is empty, or a specified field is null. Code is added to early return a null value or an empty list of items.
This PR also fixes an issue found when making a query with an Int type sort field whose value is null. Previously the NONE_INT_VALUE was wrapped in quotes, making it a string. This caused a DynamoDB mismatched type error.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Is there anything blocking review of this pull request?

It'd be lovely to see this working.

@RossWilliams Thank you for the PR. This change does not support the case for composite sort key. If you look at the schema below [snip]

This cause the requestTemplate to throw error. To fix this we could add an default value for fields that are NULL in the transformer and assign it.

@yuth I've failed to replicate or understand the problem you mentioned. Your example includes a missing pk for a connection. The resolver template does not throw an error and correctly returns early with an empty result, as there are no valid connected items.
I've added a commit with tests to match your above described schema. In the test the mutation and subsequent request templates do not throw errors. I also show when a sort key is missing from a composite sort key, and that an item is returned in a mutation when all keys are provided.
Can you try explaining the issue you found in more detail? Which request template do you see throwing an error? Maybe there is a misunderstanding of the expected behaviour? Did you mean to set a null composite sort key value, although this is also handled by the PR?

Any updates on this? I am forced to make some of my fields non-nullable.

@xitanggg  Sorry I’ve been busy. This weekend I’ll rebase this branch to main and see if that gets it a response

Thanks a lot Ross. Would love it see it work, but no worries. It is not an urgent issue, so take your time.

Any progress on this?

@RossWilliams @yuth any progress here? A lot of us are waiting on this functionality.

@RossWilliams @yuth any progress here? A lot of us are waiting on this functionality.

Also waiting for this functionality, has the test case @yuth mentioned been solved? Can i help maybe? (first time contributor)

Also waiting for this functionality, has the test case @yuth mentioned been solved? Can i help maybe? (first time contributor)

Thanks for the approval. Can you share when will this likely be merged and released?
We are currently developing a feature where we are forced to fill a random value to make the connection key field non-nullable. This workaround works but is not perfect because the random value would unnecessarily trigger a connection query whereas the null key wouldn't normally. Would love to know if we might be able to ditch the workaround before rolling this feature to production. Thanks.

Thanks for the approval. Can you share when will this likely be merged and released?
We are currently developing a feature where we are forced to fill a random value to make the connection key field non-nullable. This workaround works but is not perfect because the random value would unnecessarily trigger a connection query whereas the null key wouldn't normally. Would love to know if we might be able to ditch the workaround before rolling this feature to production. Thanks.

@RossWilliams I am excited about this as this fixes #5468 Could you please let me know how I can pull this in my local environment? Also, when will this be released? Thanks in advance

@RossWilliams I am excited about this as this fixes #5468 Could you please let me know how I can pull this in my local environment? Also, when will this be released? Thanks in advance

@arkllc I’m not involved in releases.
You can download the main branch, run ‘yarn dev-build && yarn dev-link’ and your global amplify command will be linked to the main  branch.

@arkllc I’m not involved in releases.
You can download the main branch, run ‘yarn dev-build && yarn dev-link’ and your global amplify command will be linked to the main  branch.

hi guys, I have upgrade to 4.43.0 but i am not sure whether this fix is included or not. I can not find anything related to this fix in the latest release note.
BUT I can successfully generate new graphql file using amplify codegen and amplify api push with null GSI field.
is this release reliable or got published accidentally?

hi guys, I have upgrade to 4.43.0 but i am not sure whether this fix is included or not. I can not find anything related to this fix in the latest release note.
BUT I can successfully generate new graphql file using amplify codegen and amplify api push with null GSI field.
is this release reliable or got published accidentally?

It is part of 4.42.0 release. https://github.com/aws-amplify/amplify-cli/compare/v4.41.1...v4.42.0

hi all -- i'm on 4.43.0 and still facing this issue. any ideas what could be going on if this has been merged in?

For anyone running into this issue (on v4.43.0), here's a workaround (pretty hackey but will suffice for now):
replace all of your API.graphql with the following helper:
const graphqlAPI = async (
   options,
   additionalHeaders?: {
      [key: string]: string;
   }
): Promise<any> => {
   try {
      return await API.graphql(options, additionalHeaders);
   } catch (err) {
      const realErrors = err.errors.filter(
         (e) => !e.message.startsWith('Cannot return null for non-nullable')
      );
      if (realErrors.length > 0) {
         console.log(`THROWING GRAPHQL ERROR`);
         throw err;
      } else {
         const realDataResult = { data: err.data };
         return realDataResult;
      }
   }
};

hi all -- i'm on 4.43.0 and still facing this issue. any ideas what could be going on if this has been merged in?

I don't have any issue with null based connection anymore, it works great in end. Thanks again for the merge.
The purpose of this merge is to let you use @connection with a nullable field (i.e. field without !). Say I have a User type and a School type, some users go to schools would have a schoolID field while others don't go to school wouldn't. Previously, the following schema wouldn't be possible, because schoolID is used in @connection and therefore can't be nullable. And it would have to be non-nullable with ! and developers therefore are forced to assign some schoolID to some users even though they don't go to school (buggy). Now the merge resolves it.
User @model {
   id: String!
   schoolID: String  #Previously, it must be non-nullable using `String!`
   connectSchool: School @connection(fields: ["schoolID"])
}

From your code, it seems that you are trying to ignore the graphQL Cannot return null for non-nullable error.
In graphQL, if you make a field non-nullable by using !, it means you intentionally require data for a certain field, the missing of which would throw an error (it is a feature built in graphQL, because it can be an use case of guaranteeing the retrieval of important data, because partial data can be lost in transmission, and you might want to treat partial loss as error).
If after all, some data fields are not required, you can simply make it nullable by removing the ! in your schema.

@RossWilliams  Is this fix supposed to fix https://github.com/aws-amplify/amplify-cli/issues/5468 too? If yes, I am on 4.50.0 but somehow I still am not able to create data with null secondary keys. appreciate it in advance, if you could please help clarify


can't build with cmake

With CMake>=3.20, I get the error
CMake Error at build/_deps/cmakepp_lang-src/cmake/cmakepp_lang/object/call.cmake:75 (message):
  No suitable overload of set_config_option(cmaizeproject, desc*)
Call Stack (most recent call first):
  build/_deps/cmakepp_lang-src/cmake/cmakepp_lang/object/call.cmake:124 (_cpp_object_call_guts)
  build/_deps/cmakepp_lang-src/cmake/cmakepp_lang/object/object.cmake:56 (_cpp_object_call)
  build/cmakepp/classes/CMaizeProject.cmake:43 (_cpp_object)
  build/_deps/cmaize-src/cmake/cmaize/user_api/cmaize_option.cmake:62 (CMaizeProject)
  build/_deps/cmaize-src/cmake/cmaize/user_api/cmaize_option.cmake:146 (cmaize_option)
  CMakeLists.txt:38 (cmaize_option_list)

Have you seen this happen before? I'm not getting any errors with CMake 3.19, only with >=3.20.
It also happens when I try to build SimDE and PluginPlay. Definitely something to do with CMaize.

I've not seen this before and I exclusively build with CMake > 3.20 (currently using 3.27 on this box). You mentioned you see this same error when you try to build PluginPlay? If so, I'm going to recommend we try to debug this issue in the context of building PluginPlay since it has less dependencies and builds quicker than either ChemCache or SimDE. To help with debugging it would also be great if you could post your toolchain file and the CMake command you use for configuring.

Yes, it also happens with PluginPlay. I did a little experiment:
cmake -H. -B./build -DCMAKE_TOOLCHAIN_FILE:PATH=$HOME/toolchain/empty.cmake
where $HOME/toolchain/empty.cmake is an empty file.
With this build command, PluginPlay will produce the above error unless I add set(BUILD_TESTING OFF) or set(BUILD_TESTING ON) to the toolchain file. I guess doing so populates cmaize_option_list so it's no longer empty.

@chillenb Thanks for the additional information, that was really helpful. https://github.com/CMakePP/CMaize/pull/156 should have fixed this issue. Can you confirm?

Yes, it works for me now with a totally empty toolchain file! Thanks for fixing it so quickly.


issue iwth health_check and port_name var

When using this module with health_check, we have to pass in the port_name variable in the health_check object but that clashes with the code in main.tf on line 75 and 95.
The issue is resolved if we set "provider = google-beta" for the resources resource "google_compute_health_check" "tcp" & resource "google_compute_health_check" "http"
Error: Unsupported argument
on .terraform/modules/gce-ilb/terraform-google-lb-internal-2.1.0/main.tf line 75, in resource "google_compute_health_check" "tcp":
75:     port_name    = var.health_check["port_name"]
An argument named "port_name" is not expected here.
Error: Unsupported argument
on .terraform/modules/gce-ilb/terraform-google-lb-internal-2.1.0/main.tf line 95, in resource "google_compute_health_check" "http":
95:     port_name    = var.health_check["port_name"]
An argument named "port_name" is not expected here.

What version of the Google provider are you using?

provider "google" {
version = "~> 2.10.0"
}

Please try upgrading to a newer provider version (ex. 3.20), as I believe that should fix the version.


Doesn't work when function has multi line arguments

function foo(
    a,
    b,
    c
) {}

Thanks for your reports! Actually, I created this extension just for my personal use and I don't use these as my code styles. But anyway, I'll work for it!


Description not used as Example Value message

According to the API spec here, the description of the options should be used as the message in the Example Value, but it isn't.
For example in the demo project:
https://github.com/nanogiants/nestjs-swagger-api-exception-decorator/blob/d2dcb1da450617f424152526b17f3674cb475ccf/demo/src/app.controller.ts#L148-L157
should generate an example value like this:
{
    "statusCode": 400,
    "message": "Required attributes were missing",
    "error": "Bad Request"
}

but it generates this:
{
    "statusCode": 400,
    "message": "Bad Request",
    "error": "Bad Request"
}

You have to use templated exceptions for this. Refer to section https://nanogiants.github.io/nestjs-swagger-api-exception-decorator/gettingstarted/usage/templated and the following code:
import {
  BadRequestException,
  Controller,
  Get,
} from '@nestjs/common';
import { AppService } from './app.service';

import { ApiException } from '@nanogiants/nestjs-swagger-api-exception-decorator';
import { ApiOperation } from '@nestjs/swagger';
import { HttpException } from '@nestjs/common';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @ApiOperation({ summary: 'Changes the users password' })
  @ApiException<HttpException>(() => BadRequestException, {
    template: {
      message: 'Required attributes were missing',
    }
  })
  @Get()
  getHello(): string {
    return this.appService.getHello();
  }
}

Please reopen ticket if the issue still persists. Thanks!

I am sorry, my initial issue description was not clear enough:
The issue is that the $description is not working.
According to the documentation linked in the issue the following code
import {
  BadRequestException,
  Controller,
  Get,
} from '@nestjs/common';
import { AppService } from './app.service';

import { ApiException } from '@nanogiants/nestjs-swagger-api-exception-decorator';
import { ApiOperation } from '@nestjs/swagger';
import { HttpException } from '@nestjs/common';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @ApiOperation({ summary: 'Changes the users password' })
  @ApiException<HttpException>(() => BadRequestException, {
    description: 'Required attributes were missing',
    template: {
      message: '$description',
    }
  })
  @Get()
  getHello(): string {
    return this.appService.getHello();
  }
}

should result into the same example value as your's:
{
    "message": "Required attributes were missing",
}

But it results into

Or did I missunderstood this part (Maybe I am thinking of the wrong Options?)

You can use the template property to set example values in your swagger documentation. We parse the type of exception and therefore know what status code, description and error should be displayed as example value. But we wanted to provide a way to override them as well. Basically you have three things you can do and I will illustrate that with the message property. But this will work for statusCode and error property as well:
1. Omit message property
{
  template: {
  }
}

No example value for message will be displayed
2. Add message property with custom string
{
  template: {
    message: "Custom string"
  }
}

Example value for message will be "Custom string"
3. Add message property with value $description
{
  template: {
    message: "$description"
  }
}

Example value for message will be the default message of the passed exception.
So in your case if you want to specify a custom message, use option 2 and set a custom string to template.message. The description you set in the Options property is only used for the description of the example (not the example itself). See screenshot below. In this case I chose option 3 and provided the default message of the passed exception, which is an UnauthorizedException

Hope this helps. If so I will updated the documentation accordingly.

Now I understand, thank you very much.
Looks like I did misunderstand the documentation.


chore: grammar error on package settings

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


DNG file format not supported?

Attempting to open a DNG file in MediaInfo GUI 20.09 x64 on Windows 10 Version 10.0.19042.630 results in the following error:

If I am not mistaken, it should at least say "format not supported", not error out like this?
Also, opening the same DNG file via MediaInfoOnline kind of works:

But the image is misdetected as being TIFF (which I assure you it is not), the resolution is wrong (should be 4032 x 3024) and it lacks all other EXIF data so my guess is that it is probably detecting and decoding thumbnail only.
Is DNG supported at all and if not, why not?

We currently don't support DNG.
DNG is more or less an extension to TIFF, so it is not surprising that it is detected as TIFF (complain the spec authors for having non DNG readers peeking the thumbnail data :) ).
Please provide the file, the DNG files we have don't have this crash and we want to avoid crashes as much as possible.

it lacks all other EXIF data

EXIF is currently not supported. It may be a big task due to lot of proprietary implementations... (not sure if we would like to implement our own lib or if we would tale an external lib, less costly but less control). But Maybe we'll integrate more or less soon a basic version.

Is DNG supported at all and if not, why not?

No sponsor for it.

Here is the file you requested:
IMG_0793.zip

Crash fixed (https://github.com/MediaArea/MediaInfoLib/pull/1335).
I renamed the issue ticket in order to focus on the crash, for DNG support please open a dedicated ticket.
For EXIF, there is a couple of libraries with a compatible license, I am not sure yet if I use one of them or a "not invented here" internal parser, the biggest difficulty is to handle proprietary items (and there are tons of them). But sure at some point I should implement at least a basic parser especially because more and more users are on Android and want to see the GPS/date of the pictures.

That was quick.
As for EXIF, bear in mind that people use this tool on PC and that showing more info for images would be great.
In addition to GPS data you mentioned, color temperature, ISO speed, exposure time, focal length, etc, as well as some JPEG specific details such as chroma subsampling, colorspace, baseline vs progressive, ICC profile (if embedded), and approximate quality it was saved with would be useful.


Failed to generate SSPI context. when trying to launch DBADash.exe on a fileshare on a server joined to a different domain

v2.13.3
Setup DBADash on a server using a local user
DBADash,exe runs ok if launched on the server as the local user
Setup a file share on the server and grant the local user access
Connect to file share using a computer joined to a different domain but specify user credentials for the local user on the server.
Launch DBADash.exe
Error shown
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
Microsoft.Data.SqlClient.SqlException (0x80131904): Failed to generate SSPI context.
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)    at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)    at Microsoft.Data.SqlClient.TdsParser.SSPIError(String error, String procedure)    at Microsoft.Data.SqlClient.TdsParser.SNISSPIData(Byte[] receivedBuff, UInt32 receivedLength, Byte[]& sendBuff, UInt32& sendLength)    at Microsoft.Data.SqlClient.TdsParser.SSPIData(Byte[] receivedBuff, UInt32 receivedLength, Byte[]& sendBuff, UInt32& sendLength)    at Microsoft.Data.SqlClient.TdsParser.TdsLogin(SqlLogin rec, FeatureExtension requestedFeatures, SessionData recoverySessionData, FederatedAuthenticationFeatureExtensionData fedAuthFeatureExtensionData)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds.Login(ServerInfo server, TimeoutTimer timeout, String newPassword, SecureString newSecurePassword)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool)    at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)    at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)    at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)    at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)    at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)    at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)    at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)    at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry, SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open()
at DBADash.DBValidations.GetDBVersion(String connectionString) in D:\a\dba-dash\dba-dash\DBADash\Upgrade\DBValidations.cs:line 76
at DBADashGUI.Main.checkVersion() in D:\a\dba-dash\dba-dash\DBADashGUI\Main.cs:line 103
at DBADashGUI.Main.Main_Load(Object sender, EventArgs e) in D:\a\dba-dash\dba-dash\DBADashGUI\Main.cs:line 93
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
ClientConnectionId:a586e7d3-8ba8-41f4-9a0f-0d63a26a08b1

If you are connecting from a different domain you might need a trust relationship between the domains to allow Windows authentication to work.  SQL authentication would work but be aware that this requires storing the password in the config file.  Another option might be to use RDP and run DBA Dash from a server in the same domain where Windows authentication will work.
If you want to grant permissions to run the GUI app for an end-user - use the "App" role in the DBADashDB database to grant the required permissions.


Get error while install osm on new k3s

Bug description:
Affected area (please mark with X where applicable):

Install                    [*]
SMI Traffic Access Policy  [ ]
SMI Traffic Specs Policy   [ ]
SMI Traffic Split Policy   [ ]
Permissive Traffic Policy  [ ]
Ingress                    [ ]
Egress                     [ ]
Sidecar Control Plane      [ ]
CLI Tool                   [ ]
Metrics                    [ ]
Certificate Management     [ ]
Sidecar Injection          [ ]
Logging                    [ ]
Debugging                  [ ]
Tests                      [ ]
Demo                       [ ]
CI System                  [ ]

Expected behavior:
Follow installation guide, https://osm-edge-docs.flomesh.io/docs/getting_started/setup_osm/#在-kubernetes-上安装-osm-edge , osm should be installed.
Steps to reproduce the bug (as precisely as possible):

install a fresh new ubuntu2.
install k3s by 'curl -sfL https://get.k3s.io | sh -'
install osm follow this guide :  https://osm-edge-docs.flomesh.io/docs/getting_started/setup_osm/#在-kubernetes-上安装-osm-edge

How was OSM installed?**:
Anything else we need to know?:
Error message : Error: unable to list meshes within the cluster: Could not list deployments Get "http://localhost:8080/apis/apps/v1/deployments?labelSelector=app%3Dosm-controller": dial tcp <IP_ADDRESS>:8080: connect: connection refused
Bug report archive:

Environment:

OSM version (use osm version): ubuntu21, arm64 verison

Kubernetes version (use kubectl version): k3s latest, Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.8+k3s1", GitCommit:"53f2d4e7d80c09a7db1858e3f4e7ddfa13256c45", GitTreeState:"clean", BuildDate:"2022-06-27T21:49:50Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/arm64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.8+k3s1", GitCommit:"53f2d4e7d80c09a7db1858e3f4e7ddfa13256c45", GitTreeState:"clean", BuildDate:"2022-06-27T21:49:50Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/arm64"}

Size of cluster (number of worker nodes in the cluster):1

Others:

This issue comes with lack of .kube/config file, thus osm command invokes http://localhost:8080 as Kubernetes API service endpoint.
Particularly in K3s, the context stores in /etc/rancher/k3s/k3s.yaml rather than .kube/config. So the solution to this issue is to copy that file into your home directory, like this:
$ cp /etc/rancher/k3s/k3s.yaml  ~/.kube/config

Note:  If you already have a .kube/config in your home directory, please refer to the following Kubernetes official link to add a new cluster config. configure-access-multiple-clusters

It works : $ cp /etc/rancher/k3s/k3s.yaml  ~/.kube/config


Updated example code in top-level README.md to address Issue #465

Added "load" to the import statement and removed "hummingbird.ml" from the "load" in the last statement.

Codecov Report

Merging #467 (b634a4e) into main (c70bb00) will decrease coverage by 6.23%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #467      +/-   ##
==========================================
- Coverage   90.99%   84.76%   -6.24%
==========================================
  Files          75       75
  Lines        4121     4121
  Branches      783      783
==========================================
- Hits         3750     3493     -257
- Misses        203      455     +252
- Partials      168      173       +5

Flag
Coverage Δ

unittests
84.76% <ø> (-6.17%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...ummingbird/ml/containers/sklearn/tvm_containers.py
17.18% <0.00%> (-81.25%)
:arrow_down:

...mmingbird/ml/operator_converters/sparkml/linear.py
42.85% <0.00%> (-57.15%)
:arrow_down:

...bird/ml/operator_converters/sparkml/discretizer.py
52.94% <0.00%> (-35.30%)
:arrow_down:

.../ml/operator_converters/_linear_implementations.py
75.00% <0.00%> (-22.73%)
:arrow_down:

...ird/ml/operator_converters/onnx/one_hot_encoder.py
62.50% <0.00%> (-18.75%)
:arrow_down:

hummingbird/ml/_topology.py
67.38% <0.00%> (-17.60%)
:arrow_down:

hummingbird/ml/convert.py
66.82% <0.00%> (-16.83%)
:arrow_down:

hummingbird/ml/containers/_input_containers.py
87.50% <0.00%> (-12.50%)
:arrow_down:

...ml/operator_converters/sparkml/vector_assembler.py
90.00% <0.00%> (-10.00%)
:arrow_down:

...perator_converters/_discretizer_implementations.py
90.32% <0.00%> (-9.68%)
:arrow_down:

... and 5 more

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 c70bb00...b634a4e. Read the comment docs.


Create a live system for evaluation purposes

Because GamerOS requires a dedicated system, it is difficult for people to try it out. Enable users to try out GamerOS by creating a live system that can easily be installed to a USB drive.
Furthermore, the system should automatically mount other disks on the system and search out other Steam libraries and automatically add them to the Steam library (if possible) or link to an existing Steam folder.
Question: what to do if there are more than one Steam folders found? Perhaps link to the one that is the largest or has the most games installed?

I might be possible to just mount a temporary filesystem as /home. What would the idea behind the live system be? Would it be a usb image with a bootloader? Does it need to have persistent data? Would DVD support be desirable?

I was thinking it could try to find an existing Steam directory on any attached disks and try to use the games there. If none are found, it could use whatever space is on the usb device. Bonus points if we can also get this to work with Windows Steam libraries, but that would pose some problems for games with native Linux versions.
Persistent data is probably not necessary but would be nice.
DVD support is probably unnecessary.

I think it should only try to find Steam libraries at default locations, and beyond that, let the user specify library locations. Allow the use of multiple libraries, much like how Steam already handles it.

After thinking about this again, I am not sure if it is a good idea to use existing Steam game libraries. GamerOS automatically applies tweaks to games and modifies Steam settings. When a user decides to go back to their library with their original OS, GamerOS might have messed up the user's custom game configurations.

Would it be possible to mount the extra drives as Read-Only and put an OverlayFS on top of it, so that it can make temporary changes?

This will probably never happen.


[WIP][Reflection] Update some expected exception properties in GetTypeTests unit tests due to difference between Mono and CoreFX/NetFX

Please do no merge. I need an additional check on the latest mono master.


Integrate alternative weather APIs

We already have the base openweather api that is fully free but requires an API key.
We could add:

OpenWeather One Call provides 1000 free daily API calls - https://openweathermap.org/price (to investigate if they have a usage endpoint to track that we remain under this). Data is updated every 10 minutes, so this would practically only require 6*24 = 144 calls per day / connected device.
Some other provider that doesn't require an API key. E.g. weather.gov for the US (potential project for someone living there)

Would require:

[] Handling a weather source parameter
[] Implementing parsers for new weather sources
[] Updating the settings interface and docs

See also: #9

Potential options:

https://open-meteo.com/en/docs#latitude=50.8505&longitude=4.3488&current=temperature_2m&daily=weather_code,sunshine_duration&timezone=auto - could solve #9 as well
wttr.in
OpenWeatherMap One Call api (1000/calls per day free, requires an API key)


[WFLY-9300] Add test for ejb security propagation using PLAIN

Issue: https://issues.jboss.org/browse/JBEAP-13004
Upstream issue: https://issues.jboss.org/browse/WFLY-9300
Note: I've just rebased the original proposal by @bmaxwell, run the full testsuite and found no issue with the changes. If there any issue with the actual implementation, I'll take a look but do mention Brad so he gets notified about it.

@rpelisse adding 'fixme', the tests fail

@kabir FYI, I had to @Ignore one of the test that causes some failure. I will look into this, see if I can make it work properly, but I don't to delay the all changes set being merged just for that. If and when this will get merged, I'll create a new issue (and assign it) to me, to keep track of this disabled test (unless I fixed before then, of course).

@mchoma please look into this too ... well once the PR is updated and tests are enabled

Could there be some high level description of what is beiing tested by this. I am not sure if it is not duplication to tests based on AbstractSecurityContextPropagationTestBase, basically testing [2]
[2] https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.1/html/how_to_configure_server_security/securing_users_of_the_server_and_its_management_interfaces#identity_propagation_and_forwarding_with_elytron

@mchoma I'm not the author of the original tests, but I don't think duplication is an issue here. If the tests are duplicated from Elytron, they at least allow to prove that the integration with Elytron works. Also, if Wildfly changes provider (later on the future, obviously) the test will be there to ensure that the behavior is still as expected. (That being I'm said I'm no expert of the topic here).
For the record, I'm working on making the test passes. Once I've fixed it, I'll update th PR accordingly.

@bmaxwell, please see my question ^^
AbstractSecurityContextPropagationTestBase is located in WF testsuite, so I think we need to answer duplication question first.
Anyway we need some sort of high level description what is test actually testing.

@bmaxwell I remember these tests get in "last minute" before 7.1.0.GA - looking on dates it was Oct 27, 2017 so that mean after you PR which was created  Sep 5, 2017. So everything what you say is true.
Looking into TeamCity of this PR these tests are currently running - https://ci.wildfly.org/viewLog.html?buildTypeId=WFPR&buildId=117795&tab=testsInfo&pager.currentPage=1
So now questoion is do these tests test something new compared to  tests in org.wildfly.test.manual.elytron.seccontext ?

So now questoion is do these tests test something new compared to tests in org.wildfly.test.manual.elytron.seccontext ?

This is is clearly the difficult part to assess. I have a gut feeling that this PR brings a lot of duplication, indeed, with the tests you pointed out, but I don't know how to make the demonstration of it...

OK, I've tried to look a bit more in depth into the tests provided by @bmaxwell  and compare them to one mentioned by @mchoma. To make it short, I would just say I think they is indeed some overlap but also that the one from @mchoma are a bit more high level. @bmaxwell had to create a series of technical object (EJBRequest, Results...) but the tests from @mchoma seems to have done a better jobs at abstracting those things away (IMHO).
As for the scenario tested, it is difficult for me to assert how much the new tests from @bmaxwell will bring, but if they did bring more coverage, for sure, they would need to be refactor to be integrated into the tests pointed out by @mchoma.
So to move forward, I'm going to close this pull request and the associated issue as "won't do / already done". @bmaxwell if you feel the current coverage is not enough and want to add some tests, please let me know, I'll try to help you doing so.


Support Numpy Duck Arrays

Tangent provides source-to-source automatic differentiation of functions containing Numpy syntax
In [1]: import numpy as np

In [2]: def f(x):
   ...:     return np.sum(np.exp(x)) + 1

In [3]: x = np.arange(5)
In [4]: f(x)
Out[4]: 86.7910248837216

In [5]: import tangent
In [6]: df = tangent.grad(f)
In [7]: df(x)
Out[7]: array([ 1.        ,  2.71828183,  7.3890561 , 20.08553692, 54.59815003])

It currently has a pluggable mechanism to support both numpy arrays and tensorflow arrays explicitly.  However, it would be nice if it also supported other numpy-like arrays using duck typing.  Currently this appears not to be the case.
In [8]: import dask.array as da
In [9]: x = da.arange(5, chunks=(2,))
In [10]: f(x)
Out[10]: dask.array<add, shape=(), dtype=float64, chunksize=()>

In [11]: _.compute()
Out[11]: 86.7910248837216

In [12]: df(x)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-12-31ac6e885892> in <module>()
----> 1 df(x)

/tmp/tmp3sxcen8j/tangent_b64e.py in dfdx(x, b_return)
      3     np_sum_np_exp_x = np.sum(np_exp_x)
      4     _return = np_sum_np_exp_x + 1
----> 5     assert tangent.shapes_match(_return, b_return
      6         ), 'Shape mismatch between return value (%s) and seed derivative (%s)' % (
      7         numpy.shape(_return), numpy.shape(b_return))

~/workspace/tangent/tangent/utils.py in shapes_match(a, b)
    627     return match
    628   else:
--> 629     shape_checker = shape_checkers[(type(a), type(b))]
    630     return shape_checker(a, b)
    631

KeyError: (<class 'dask.array.core.Array'>, <class 'float'>)

It would be convenient if tangent could be used for other objects that "quack like a numpy.ndarray" for which there are a few today (numpy, sparse, dask.array, cupy).
cc @njsmith @shoyer @ericmjl @hameerabbasi

I haven't tried it, but this should be doable by registering the existing numpy handler with the respective types. If they are ndarray-like, this should be sufficient.
For example, modifying https://github.com/google/tangent/blob/master/tangent/utils.py#L633 to include dask.array would be one step:
register_all_shape_checker(
    array_shapes_match, (numpy.ndarray, Number, float, int, numpy.float32,
                         numpy.float64, numpy.int32, numpy.int64, dask.array),
    ignore_existing=True)

Something similar would need to be done for register_add_grad, register_init_grad, register_unbroadcast, register_unreduce. https://github.com/google/tangent/blob/master/tangent/tf_extensions.py could be used for guidance because it has all the configuration calls specifically required for tensorflow arrays.

Would it be possible to (for example) do some metaprogramming and detect __array_ufunc__ in a class? I certainly remember seeing something like this in the code of the future module.

Yeah, so many projects have plugin mechanisms like this.  This results in an n by m interaction matrix.  There is an effort underway to instead have projects respect protocols rather than do explicit type checks.  That way if a new ndarray project comes online (as they seem to be doing today) it doesn't need to register itself with every downstream computational library.
I might suggest that you do a check like the following:
def is_numpy_like(x):
    return hasattr(x, 'shape') and hasattr(x, 'dtype') and hasattr(x, '__array_ufunc__')

Though this check will likely evolve in the future (and hopefully be upstreamed into numpy).

I might be wrong here, but this project seems like it relies heavily on type checks. I'll see if I can check the code of the future module and do some metaprogramming and put that check into a metaclass.

For well known types like ndarray, we can add direct checks. Have a look for instance at shapes_match in util.py. It has special handling for list/dict/tuple. One can imagine inserting another branch that calls is_numpy_like.
The interaction matrix was designed as a more generic mechanism for cases when such a protocol does not exist. It's used for example with tensorflow arrays which are not array-like. It has constant access time and is cleaner than the alternative - calling is_foo in a loop.

The interaction matrix was designed as a more generic mechanism for cases when such a protocol does not exist

Yes, and I think that this is the correct choice for these sorts of situations.  My hope is that all numpy-like arrays can be a single row in this matrix.
To be clear, when I'm talking about a matrix of interactions I'm not talking about a matrix like what is in tangent with axes of ndarray-container and operation, I'm talking about a higher level matrix that has axes projects-that-implement-ndarray-containers and projects-that-consume-ndarray-containers.  In that matrix tangent is one column.