Fix ZHA force polled entities.

Description:
Fix "force_polled" ZHA entities.
Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.

Ha, this is a nice PR#

can merge when everything passes

Ha, this is a nice PR#

Go play powerball

Not sure where to post this, but my ZHA devices were reporting better in 90.0 than in 90.1. can someone explain why that would have been? I'd like my devices to respond how they did in 90.0.

@tbrock47 Can you describe exactly the behaviors you are seeing and with what devices?

I'm running a raspberry pi with that nortek security and control stick that
everyone else uses.
I have about six sengled bulbs. In version 90.0 when zha would start
failing the zha device would start reporting unavailable. With 90.1 they
just report online even though they can't be reached.
I'm sorry I don't recall exactly what the log entry was when they start
stating that they can't be contacted anymore.
Reason being is I had an automation built that would restart home assistant
when all of my zha devices become unavailable which now doesn't work
because everything stays set as online.
I'm a git newbie so my apologies if there was a more appropriate way to
report my issues.
On Sun, Mar 24, 2019, 7:30 PM Robbie Trencheny<EMAIL_ADDRESS>wrote:

@tbrock47 https://github.com/tbrock47 Can you describe exactly the
behaviors you are seeing and with what devices?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/pull/22222#issuecomment-476025014,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmG8cBw4xdUxk7DNZJD3AnvVY2KlVdHTks5vaCbNgaJpZM4cAD9M
.

@tbrock47 This was the right place.
@dmulcahey pulling you in on this, especially interesting since you have Sengled bulbs too and haven't experienced these issues...

Some more details which would probably be helpful...

key
value

arch
armv7l

dev
false

docker
false

hassio
false

os_name
Linux

python_version
3.5.3

timezone
America/Denver

version
0.90.1

virtualenv
true

All the problem bulbs are Sengled E11-G13.
I have a few zwave devices that work flawlessly.
This is the automation I spoke of that executes a restart when no ZHA devices report online anymore. But as I said, now that their state no longer changes from online, the automation never fires.
alias: Home Assistant ZHA Failure Restart
initial_state: "on"
trigger:
  platform: event
  event_type: state_changed
condition:
  - condition: template
    value_template: "{{ trigger.event.data.new_state.domain == 'zha' }}"
  - condition: template
    value_template: >
      {% set ns = namespace(found=false) %}
      {%- for entity in states.zha -%}
      {% if entity.state == 'online' %}
      {%- set ns.found = true -%}
      {% endif %}
      {%- endfor -%}
      {{ not ns.found }}
action:
  - service: notify.notify
    data_template:
      message: "ZHA Failure Detected. Home Assistant Restarting."
  - service: homeassistant.restart

@robbiet480 we want issues reported in the issue tracker. Not in merged PRs.
@ tbrock47 Please open a new issue and copy the very good description already posted here. Make sure to fill out the issue template completely. And link to this PR. Thanks!

@MartinHjelmare you're right, thought this was the issue :(
@tbrock47 Let us know when that new issue is opened, thanks!

@tbrock47 Thank you for a good description of the problem. Let me know when you open the issue, but from the description the problem sounds very similar to https://github.com/zigpy/bellows/issues/124 issue. We'll need bellows, zigpy, homeassistant.components.zha and homeassistant.core debug logs to confirm.


Integer/String ambiguity

library version: 0.1.0
I'm using this library to parse libraryfolders.vdf, whose format looks something like
"libraryfolders"
{
        "contentstatsid"                "12345678"
        "1"
        {
                "path"          "/home/user/Downloads/SteamLibrary"
                "label"         ""
                "mounted"               "1"
                "contentid"             "123456789"
        }
        "2"
        {
                "path"          "/home/user/Downloads/SteamLibrary2"
                "label"         ""
                "mounted"               "1"
                "contentid"             "1234567890"
        }
       // Possibly more library folders
}

I would like to use a data structure like
#[derive(Debug, Clone, Deserialize)]
struct libraryfolders(inner);
#[derive(Debug, Clone, Deserialize)]
struct inner {
    contentstatsid: u64,
    #[serde(flatten)]
    unnamed: HashMap<u64, LibraryInfo>,
}
#[derive(Debug, Clone, Deserialize)]
struct LibraryInfo {
    path: String,
    label: String,
    mounted: bool,
    contentid: u64,
}

But in deserialization, I get Err value: Message("invalid type: string \"1\", expected u64"). Changing the key in the 'unnamed' HashMap from u64 to String sidesteps the problem for me (I don't actually care about the keys) but it seems like "1" is both a valid String and u64 (and bool in .vdf). Additionally, if I wanted to interpret LibraryInfo's contentid as a String, changing my data structure to do so gives Err value: Message("invalid type: integer 123456789, expected a string").
I'm not familiar with serde's interface, but it would be nice if ambiguous string/integer types could be interpreted as either.
Newer versions don't fix the problem. When using this library's master branch at the time of writing this issue, more issues crop up, requiring me to use
#[derive(Debug, Clone, Deserialize)]
struct libraryfolders(inner);
#[derive(Debug, Clone, Deserialize)]
struct inner {
    contentstatsid: u64,
    #[serde(flatten)]
    unnamed: HashMap<String, LibraryInfo>,
}
#[derive(Debug, Clone, Deserialize)]
struct LibraryInfo {
    path: String,
    label: String,
    mounted: String,
    contentid: String,
}

(contentid must be string now, and mounted must also be string)

Thanks for all the information for the issue. I'll take a look at this now

So this usage of #[serde(flatten)] falls back to deserializing types as Any which is the root of the issue since VDF doesn't have a solid way of indicating types so the current published version guesses based off matching the structure of the string (which is very error-prone). The current main instead just deserializes everything to Strings instead which is why you ran into issues there. I was able to get things to work by changing the hashmap key to strings, although I'm not sure why it doesn't get inferred as a u64 (something for me to look into more. It's not something I can reproduce in serde_json since keys have to be strings, so I'll keep poking around). This is my working version
[package]
name = "vdf_test"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
keyvalues-serde = "0.1.0"
# keyvalues-serde = { version = "0.1.0", path = "/home/wintermute/Programming/Repos/vdf-rs/keyvalues-serde" }
serde = { version = "1.0.128", features = ["derive"] }

use keyvalues_serde::from_str;
use serde::Deserialize;

use std::collections::HashMap;

const VDF_TEXT: &str = r#"
"libraryfolders"
{
        "contentstatsid"                "12345678"
        "1"
        {
                "path"          "/home/user/Downloads/SteamLibrary"
                "label"         ""
                "mounted"               "1"
                "contentid"             "123456789"
        }
        "2"
        {
                "path"          "/home/user/Downloads/SteamLibrary2"
                "label"         ""
                "mounted"               "1"
                "contentid"             "1234567890"
        }
       // Possibly more library folders
}
"#;

#[derive(Debug, Clone, Deserialize)]
struct LibraryFolders {
    contentstatsid: u64,
    #[serde(flatten)]
    unnamed: HashMap<String, LibraryInfo>,
}

#[derive(Debug, Clone, Deserialize)]
struct LibraryInfo {
    path: String,
    label: String,
    mounted: bool,
    contentid: u64,
}

fn main() {
    let library_folders: LibraryFolders = from_str(VDF_TEXT).unwrap();
    println!("{:#?}", library_folders);
}

Outputs
LibraryFolders {
    contentstatsid: 12345678,
    unnamed: {
        "2": LibraryInfo {
            path: "/home/user/Downloads/SteamLibrary2",
            label: "",
            mounted: true,
            contentid:<PHONE_NUMBER>,
        },
        "1": LibraryInfo {
            path: "/home/user/Downloads/SteamLibrary",
            label: "",
            mounted: true,
            contentid: 123456789,
        },
    },
}

I've been very iffy on how to deserialize to Any just because of how many problems can come from trying to guess just based on the contents instead of having well established types.
I think I have some ideas on how to handle this example well. The structure isn't too well suited for Rust structures since I think something like
struct LibraryFolders {
    contentstatid: u64,
    libraries: Vec<LibraryInfo>,
}

// `LibraryInfo` being the same

would work better. I'll try to work things out and get an example posted later today, but I may be a bit busy since I'm starting my new job tomorrow.
Also if the code for all this is opensource somewhere then I'll make sure to check and make changes whenever I publish a release with breaking changes since this project is pretty young and could be prone to changes later.

So you can avoid Any hell by using a somewhat ugly mix of the parser and serde libraries like so (Note that this assumes that the key for the LibraryInfo structs is an incrementing index starting at 1)
use keyvalues_parser::Vdf;
use keyvalues_serde::{from_str, Error as KeyValuesSerdeError, Result as KeyValuesSerdeResult};
use serde::Deserialize;

use std::str::FromStr;

const VDF_TEXT: &str = r#"
"libraryfolders"
{
        "contentstatsid"                "12345678"
        "1"
        {
                "path"          "/home/user/Downloads/SteamLibrary"
                "label"         ""
                "mounted"               "1"
                "contentid"             "123456789"
        }
        "2"
        {
                "path"          "/home/user/Downloads/SteamLibrary2"
                "label"         ""
                "mounted"               "1"
                "contentid"             "1234567890"
        }
       // Possibly more library folders
}
"#;

#[derive(Debug, Clone)]
struct LibraryFolders {
    contentstatsid: u64,
    libraries: Vec<LibraryInfo>,
}

impl FromStr for LibraryFolders {
    type Err = KeyValuesSerdeError;

    fn from_str(s: &str) -> KeyValuesSerdeResult<Self> {
        let Vdf { key, value } = Vdf::parse(s)?;
        assert_eq!(key, "libraryfolders");
        let mut obj = value.unwrap_obj();

        let contentstatsid = obj
            .remove("contentstatsid")
            .unwrap()
            .pop()
            .unwrap()
            .unwrap_str()
            .parse()
            .unwrap();

        let mut libraries = Vec::with_capacity(obj.len());
        let mut index = 1;
        while !obj.is_empty() {
            let (key, mut values) = obj.remove_entry(index.to_string().as_str()).unwrap();

            let value = values.pop().unwrap();
            let library_info_vdf = Vdf { key, value };
            let library_info: LibraryInfo = from_str(&library_info_vdf.to_string())?;

            libraries.push(library_info);

            index += 1;
        }

        Ok(Self {
            contentstatsid,
            libraries,
        })
    }
}

#[derive(Debug, Clone, Deserialize)]
struct LibraryInfo {
    path: String,
    label: String,
    mounted: bool,
    contentid: u64,
}

fn main() {
    let library_folders: LibraryFolders = VDF_TEXT.parse().unwrap();
    println!("{:#?}", library_folders);
}

which outputs
LibraryFolders {
    contentstatsid: 12345678,
    libraries: [
        LibraryInfo {
            path: "/home/user/Downloads/SteamLibrary",
            label: "",
            mounted: true,
            contentid: 123456789,
        },
        LibraryInfo {
            path: "/home/user/Downloads/SteamLibrary2",
            label: "",
            mounted: true,
            contentid:<PHONE_NUMBER>,
        },
    ],
}

This does still leave quite a few things to be desired. I think that the following would help to reduce the pain quite a bit

A from_vdf() function to deserialize directly from a Vdf allows for avoiding having to turn a Vdf back to a &str to deserialize
A .vdfs() method on Obj that iterates over the internal key-value pairs means that you no longer need to create them manually
Re-export keyvalues-parser in keyvalues-serde just for convience
Some sort of gjson like querying system would greatly reduce the pain of unwraps where something like obj.remove("contentstatsid").unwrap().pop().unwrap().unwrap_str() could be obj.query_str("contentstatsid[0]")?

1, 2, and 3 should be pretty easy to implement while 4 would take considerably more work. Working with the parser can be pretty rough due to VDF only having strings and objects as types where using the serde library can help to hide this pain.
I also think that this issue shows that it's worth adding that #[serde(flatten)] over a map type will involve dealing with Any which is very undesirable with VDF since there aren't really well defined types as you already mentioned
I hope that helps you out. I'll work on getting 1, 2, and 3 done when I can. Let me know if you have any strong opinions about any of the things mentioned

I think I have some ideas on how to handle this example well. The structure isn't too well suited for Rust structures since I think something like
struct LibraryFolders {
    contentstatid: u64,
   libraries: Vec<LibraryInfo>,
}

would work better. I'll try to work things out and get an example posted later today, but I may be a bit busy since I'm starting my new job tomorrow.

I agree that would be a nice syntax for this use case. It looks to me like maps with incrementing keys starting at 1 is a moderately common pattern in vdf, so using it should be made ergonomic. But it would make more sense to me if that struct serialized to:
"libraryfolders"
{
        "contentstatsid"                "12345678"
        "libraries"
        {
                "1"
                {
                        "path"          "/home/user/Downloads/SteamLibrary"
                        "label"         ""
                        "mounted"               "1"
                        "contentid"             "123456789"
                }
                "2"
                {
                        "path"          "/home/user/Downloads/SteamLibrary2"
                        "label"         ""
                        "mounted"               "1"
                        "contentid"             "1234567890"
                }
               // Possibly more library folders
        }
}

It seems like the point of #[serde(flatten)] is to deal with this type of situation. I haven't interacted with serde's data model, so I don't really know what I'm I'm talking about. I suspect there might be another option we're not thinking of. Maybe some serde wizards would know what to do.

Also if the code for all this is opensource somewhere then I'll make sure to check and make changes whenever I publish a release with breaking changes since this project is pretty young and could be prone to changes later.

It's currently in a folder with an open source license in it, but I haven't put it on the internet anywhere. I may not ever upload the specific bit of code that caused this issue, as I learned about steamlocate today, which already does 80% of what I want.

1,2,3,4

I'm not exactly sure what you mean by 1, but If you mean it takes a std::fs::File as input instead of a string, most serde libraries I've seen call this method from_reader and it is generic over R:Read. 4 I feel like can be dealt with by making good use of ? to propagate errors.
also congrats on the new job

Alright so I think I did get sidetracked from the original issue. I do agree that my above snippets don't handle serialization well, so it's definitely something I'll have to give more thought to.
I do think that the original issue of the HashMaps keys needing to be Strings when flattened in a struct is from serde itself. It makes sense intuitively that serde is expecting strings for struct fields which ends up taking precedence over the type for the HashMaps key. I was able to recreate this behavior in serde_yaml since it allows for the keys to be u64 as well and came up with the following that fails with the same error you originally mentioned
use serde::Deserialize;

use std::collections::HashMap;

#[derive(Debug, Deserialize)]
struct Foo {
    #[serde(flatten)]
    unnamed: HashMap<u64, String>,
}

const YAML_TEXT: &str = r#"
1: "One"
2: "Two"
"#;

fn main() {
    let foo: Foo = serde_yaml::from_str(YAML_TEXT).unwrap();
    println!("{:#?}", foo);
}

while the following works as expected
use std::collections::HashMap;

const YAML_TEXT: &str = r#"
1: "One"
2: "Two"
"#;

fn main() {
    let foo: HashMap<u64, String> = serde_yaml::from_str(YAML_TEXT).unwrap();
    println!("{:#?}", foo);
}

I don't see any difference for why a struct with a single flattened  HashMap should be treated differently than just the HashMap itself which is where I'm drawing my conclusion about the type expected for a field is interfering with the type of the hashmap's key
I'll poke around the documentation and see if this is expected behavior or an actual bug, but I hope that covers your original issue

Also I'm glad that you found steamlocate. I'm actually planning on trying to include this parser in that crate if the author is receptive since the parser that is currently used has some known issues and doesn't seem to be maintained (or at least my hasn't been touched in the half year that I filed it which is why I started this project to begin with)

I've had this in the back of my mind, and I've found that the original issue of trying to flatten a HashMap with integer keys is an issue with serde itself (https://github.com/serde-rs/serde/issues/1183). I'll be closing this as it's not an issue with this particular library, but I appreciate you raising the initial issue since hearing your feedback has led to other improvements with the library!


Colab integration

Ideally, all the documentation pages based off of Jupyter notebooks should have a button to launch them in Colab.
For example, fastai's documentation has such a button:

First step would be a tutorial on how to set up Colab with Julia and install the dependencies.
See this Discourse post that shows how to get Julia running on Colab.

Hi,  I want to take this up.

Cool! Here's what I think needs to be done.

Conversion of regular Julia .ipynb notebooks to Colab notebooks
This consists of

Adding cells with instructions and shell script that installs Julia, packages and the Julia kernel (see the Colab template for an example)
Updating the metadata of notebook with kernel name and accelerator info so that GPU is used by default

This functionality may be best created as a separate repository (Colab.jl?) that does this conversion; that way the functionality will be easier to reuse but also maintain when the specifics of running Julia on Colab change

Integration with the documentation system (Pollen.jl)
During documentation build, the following needs to happen for every source notebook file

create a Colab version of the notebook using the above conversion functionality
generate a Colab link that will auto-open the Colab version that is built to the GitHub Pages branch during doc build
insert the link with a badge into the documentation html output

Since Pollen.jl is still undocumented, I could take care of this step once the first is done

Let me know if you need any other pointers 👍

Hey, I'm interested in doing this. Can I try to do this?

Sure! Let me know if you need any other pointers aside from the above

I could come up with this. But is there any way to speed up the initialization process (The time taken to run the first cell). Running this for every time a notebook that has been opened is kind of inefficient? Or is there a workaround?

One though I've had is using PackageCompiler.jl to create a sysimage once that is then saved somewhere and loaded into the Colab session which would allow reducing installation time significantly and almost completely removing compilation overhead.
However, there are a lot of problems that need to be dealt with, and I'm not sure it's worth the effort:

the sysimage needs to be built on Colab since it needs to be compiled for that hardware and software
it needs to be manually rebuilt on every update since Colab doesn't allow automation
the sysimage file needs to be stored somewhere and served (these are easily > 100MB)
I'm not sure if the randomly different GPU hardware you get on Colab would mess with the sysimage.

Ok then. I'll add the Launch Colab button to all document pages that are based off a notebook.

Cool! Here's what I think needs to be done.

Conversion of regular Julia .ipynb notebooks to Colab notebooks
This consists of

Adding cells with instructions and shell script that installs Julia, packages and the Julia kernel (see the Colab template for an example)
Updating the metadata of notebook with kernel name and accelerator info so that GPU is used by default

This functionality may be best created as a separate repository (Colab.jl?) that does this conversion; that way the functionality will be easier to reuse but also maintain when the specifics of running Julia on Colab change

Integration with the documentation system (Pollen.jl)
During documentation build, the following needs to happen for every source notebook file

create a Colab version of the notebook using the above conversion functionality
generate a Colab link that will auto-open the Colab version that is built to the GitHub Pages branch during doc build
insert the link with a badge into the documentation html output

Since Pollen.jl is still undocumented, I could take care of this step once the first is done

Let me know if you need any other pointers +1

Sure! I started working on the first one.
Is it possible to update the metadata of a notebook file and add the extra Julia installation to the start of the notebook as soon as the user clicks on Launch Colab?
Or is it better to manually add this information to all notebook files and store them in a separate repo (Colab.jl) and we can link the corresponding notebook from Colab.jl as soon as a user clicks Launch Colab in FastAI documentation page.

Ok then. I'll add the Launch Colab button to all document pages that are based off a notebook.

Cool! Here's what I think needs to be done.

Conversion of regular Julia .ipynb notebooks to Colab notebooks
This consists of

Adding cells with instructions and shell script that installs Julia, packages and the Julia kernel (see the Colab template for an example)
Updating the metadata of notebook with kernel name and accelerator info so that GPU is used by default

This functionality may be best created as a separate repository (Colab.jl?) that does this conversion; that way the functionality will be easier to reuse but also maintain when the specifics of running Julia on Colab change

Integration with the documentation system (Pollen.jl)
During documentation build, the following needs to happen for every source notebook file

create a Colab version of the notebook using the above conversion functionality
generate a Colab link that will auto-open the Colab version that is built to the GitHub Pages branch during doc build
insert the link with a badge into the documentation html output

Since Pollen.jl is still undocumented, I could take care of this step once the first is done

Let me know if you need any other pointers +1

Sure! I started working on the first one. Is it possible to update the metadata of a notebook file and add the extra Julia installation to the start of the notebook as soon as the user clicks on Launch Colab? Or is it better to manually add this information to all notebook files and store them in a separate repo (Colab.jl) and we can link the corresponding notebook from Colab.jl as soon as a user clicks Launch Colab in FastAI documentation page.

😬😬 Please tell me if I'm getting this completely wrong.

First part is writing a program that converts a regular Julia notebook to one that can be run on Colab, i.e. has the setup cells and metadata to select the GPU. Should be independent of the buttons.
This code should probably live in a separate repo, but the notebook files themselves will be built during the documentation building step in FastAI.jl's CI and stored on the gh-pages branch.

First part is writing a program that converts a regular Julia notebook to one that can be run on Colab, i.e. has the setup cells and metadata to select the GPU. Should be independent of the buttons.

I'll first try writing that conversion script.  Thanks 👍

First part is writing a program that converts a regular Julia notebook to one that can be run on Colab, i.e. has the setup cells and metadata to select the GPU. Should be independent of the buttons.

I'll first try writing that conversion script. Thanks +1

Hey, I made a repo that contains the code for converting a normal ipynb notebook to the one that can run on Colab.
https://github.com/Chandu-4444/Colab.jl
This is a sample one, there are few improvements to be made (Specifying the output file location etc).
Please look at the repo and let me know the next step.

This code should probably live in a separate repo, but the notebook files themselves will be built during the documentation building step in FastAI.jl's CI and stored on the gh-pages branch.

I have an idea to do this. Is it ok if the configuration cells were hidden from getting displayed on the docs website and reveal when people click view on colab on colab page?

Sorry for letting this fall through the cracks!

Hey, I made a repo that contains the code for converting a normal ipynb notebook to the one that can run on Colab.
https://github.com/Chandu-4444/Colab.jl
This is a sample one, there are few improvements to be made (Specifying the output file location etc).

Thanks for starting on this

I have an idea to do this. Is it ok if the configuration cells were hidden from getting displayed on the docs website and reveal when people click view on colab on colab page?

They should be added to the notebook, and the documentation system will take care of hiding the setup cells as well as the "Open in Colab" button

They should be added to the notebook, and the documentation system will take care of hiding the setup cells as well as the "Open in Colab" button
So, shall I replace all the current notebooks with the notebooks containing the config cells that can run on Colab?

Colab.jl is now a registered Julia package. I think this can now be integrated into docs?

Hey, sorry for letting this sit again, integrating it into the docs is bottlenecked on my time making an integration with Pollen.jl right now. In any case, thanks for getting this running! I'll open an issue on the repo to propose some changes when I get around to it


Cannot get google_maps example to work

git clone the plugins repo
open packages/google_maps_flutter/example in editor
create a new maps API key
add key in AndroidManifest.xml
run app

=> map appears with no content in it
It was working a few days ago, but doesn't seem to work anymore

cc @gerryhigh

cc @mravn-google did anything change?

Recent changes include removing use of the new keyword. It works fine for me when using the CLI tools. Using Android Studio, there does seems to be a problem:
05-10 22:05:11.385 28645-28671/io.flutter.plugins.googlemapsexample E/flutter: [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
    NoSuchMethodError: Attempted to use type 'MapUiPage' as a function. Since types do not define a method 'call', this is not possible. Did you intend to call the MapUiPage constructor and forget the 'new' operator?
    Receiver: MapUiPage
    Tried calling: MapUiPage()
    #0      Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
    #1      _allPages (file:///Users/mravn/github/plugins/packages/google_maps_flutter/example/lib/main.dart:14)
    #2      _allPages (file:///Users/mravn/github/plugins/packages/google_maps_flutter/example/lib/main.dart:13)
    #3      main (file:///Users/mravn/github/plugins/packages/google_maps_flutter/example/lib/main.dart:48)
    #4      _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:279)
    #5      _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165) 0

I get a blank screen, the whole app is gone, not just the map.

Testing was on macOS, running from the terminal. It works for me against the iOS Simulator, but not against the Android emulator.
Log output:
$ flutter run -d And
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                       0.9s
Resolving dependencies...                                    1.0s
Running 'gradlew assembleDebug'...                           3.2s
Built build/app/outputs/apk/debug/app-debug.apk.
I/FlutterActivityDelegate( 6450): onResume setting current activity to this
D/        ( 6450): HostConnection::get() New Host Connection established 0xde698740, tid 6468
D/EGL_emulation( 6450): eglMakeCurrent: 0xdcf404a0: ver 3 0 (tinfo 0xde6832a0)
Syncing files to device Android SDK built for x86...         2.2s

🔥  To hot reload your app on the fly, press "r". To restart the app entirely, press "R".
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://<IP_ADDRESS>:8105/
For a more detailed help message, press "h". To quit, press "q".
I/zzbz    ( 6450): Making Creator dynamically
W/zygote  ( 6450): Unsupported class loader
W/zygote  ( 6450): Skipping duplicate class check due to unsupported classloader
I/DynamiteModule( 6450): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:219
I/DynamiteModule( 6450): Selected remote version of com.google.android.gms.maps_dynamite, version >= 219
W/zygote  ( 6450): Unsupported class loader
W/zygote  ( 6450): Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API( 6450): Google Play services client version: 11910000
I/Google Maps Android API( 6450): Google Play services package version: 12521024
I/zygote  ( 6450): Do partial code cache collection, code=29KB, data=22KB
I/zygote  ( 6450): After code cache collection, code=29KB, data=22KB
I/zygote  ( 6450): Increasing code cache capacity to 128KB
D/        ( 6450): HostConnection::get() New Host Connection established 0xc58fcd40, tid 6517
D/EGL_emulation( 6450): eglCreateContext: 0xbfb3c800: maj 1 min 0 rcv 1
D/EGL_emulation( 6450): eglMakeCurrent: 0xbfb3c800: ver 1 0 (tinfo 0xba17f170)
D/EGL_emulation( 6450): eglMakeCurrent: 0xbfb3c800: ver 1 0 (tinfo 0xba17f170)
W/DynamiteModule( 6450): Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule( 6450): Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:4
I/DynamiteModule( 6450): Selected remote version of com.google.android.gms.googlecertificates, version >= 4
W/zygote  ( 6450): Unsupported class loader
W/zygote  ( 6450): Skipping duplicate class check due to unsupported classloader

OK, I can repro the missing map on Android Emulator. As the map view is an overlay, this is most likely not Flutter related. Maybe the emulator has an outdated version of Google Play services. Will investigate.

With an API level 27 Pixel emulator, the map appears just fine.

It's also working for me after upgrading to API level 27. @gerryhigh can you try the same?

Yes, I can confirm that it works after updating my emulator to API level 27 it works. I'm still doing other testing to get it working in my app. So far I've seen some bugs but not enough to determine what is causing it. Anyhow, this issue seems to be working now. I have not tested this on a device running a pre API 27 version. Thanks

Thanks. If you find concrete issues, please file new bugs!

I will be working with it today. As far as the errors, I saw some errors thrown in the console that could have been memory related. I'll keep testing.
e.g. ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
I/flutter (17911): The following assertion was thrown while dispatching notifications for GoogleMapController:
I/flutter (17911): setState() called after dispose(): MapUiBodyState#be1d9(lifecycle state: defunct, not mounted)
I/flutter (17911): This error happens if you call setState() on a State object for a widget that no longer appears in
When the exception was thrown, this was the stack:
I/flutter (17911): #0      State.setState. (package:flutter/src/widgets/framework.dart:1090:9)
I/flutter (17911): #1      State.setState (package:flutter/src/widgets/framework.dart:1116:6)
I/flutter (17911): #2      MapUiBodyState.initState. (file:///C:/projects/flutterdev/plugins-master/packages/google_maps_flutter/example/lib/map_ui.dart:57:7)
I/flutter (17911): #3      ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:161:21)
I/flutter (17911): #4      GoogleMapController._handleMethodCall (file:///C:/projects/flutterdev/plugins-master/packages/google_maps_flutter/lib/src/controller.dart:94:9)
I/flutter (17911): #5      GoogleMapController.init. (file:///C:/projects/flutterdev/plugins-master/packages/google_maps_flutter/lib/src/controller.dart:78:20)
I/flutter (17911): #6      MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:326:55)
I/flutter (17911):
I/flutter (17911): #7      MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:299:54)
I/flutter (17911): #8      BinaryMessages.handlePlatformMessage (package:flutter/src/services/platform_messages.dart:67:33)
I/flutter (17911):
I/flutter (17911): #9      _invoke3 (dart:ui/hooks.dart:162:13)
I/flutter (17911): #10     _dispatchPlatformMessage (dart:ui/hooks.dart:75:5)
I/flutter (17911):
I/flutter (17911): The GoogleMapController sending notification was:
I/flutter (17911):   Instance of 'GoogleMapController'
etc.
Another exception was thrown: setState() called after dispose(): MapUiBodyState#be1d9(lifecycle state: defunct, not mounted)

Got it. For things you can repro, new bugs (with description, repro steps, steps, etc.) much appreciated!

@gerryhigh The error reported above should be fixed by https://github.com/flutter/plugins/pull/576. It is an error in the example app, not with the google_maps_flutter plugin itself. This kind of error happens when some kind of listener added in State.initState is not removed in State.dispose, and then fires after the State object is no longer mounted, cf. the discussion in https://docs.flutter.io/flutter/widgets/State/initState.html.

I have the same issue - both on iOS and Android emulators. The example app for Google Maps seems do to everything - except display map images. When I click and drag in the area where the map should be it it tells me the map is moving and changes the coordinates. There are no error messages. There are simply no images except for the Google logo bottom left corner (which changes to the more anti-aliased version when I change the MapType to Satellite)


fix: variants.available not supported anymore

This is to fix the removed support of "variants.available" from the GraphQL query of Shopify Storefront API
Related Issue
https://github.com/vuestorefront/vue-storefront/issues/6600
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

Can you please update price & compareAtPrice fields too with below,
compareAtPriceV2{
amount
currencyCode
}
priceV2{
amount
currencyCode
}
Note: Same changes you need to handle in /composables/src/helpers/internals/enhanceProduct.ts
Same with:
/composables/src/helpers/internals/enhanceProductVariation.ts


WIP Contract details and contract list

Coverage decreased (-0.01%) to 91.686% when pulling b0a0a973fcab381e83536ed36f562d400e616f50 on dev-2238-get-contract-details into 4f445c567950c443dfbc9cc875bfd8743c1a8be7 on contracts#2176.


Feature request - configurable retries for client timeouts to stabilise loading via a load balancer

Feature description
TLDR - currently when loading from Spark to Elastic via load balancer, a single timeout can cause the entire Spark task to fail without retries.
On several occasions I've had have to work with architectures where a lot of data is loaded from Spark into Elastic, with all traffic routed through a single load balancer before being forwarded to the various Elastic cluster nodes (usually round robin'd).
This isn't an architecture I'd recommend for various reasons, but organisations sometimes favour it because it allows them to centralise security/audit at the load balancer - and achieve a lot of stuff "for free" with something like istio if they are using kubernetes.
With this architecture, the load config looks like this:
es.nodes = <load balancer>
es.nodes.discovery = false
es.nodes.wan.only = true

One thing I often see when loading Spark with this architecture is that the logic in NetworkClient.java for handling timeouts and other exceptions can cause instability. The logic appears to me to have two failure scenarios:

HTTP response received but, but the elastic response indicates that some or all of the docs weren't indexed. Only the un-indexed docs are retried, based on es.batch.write.retry.count
Exception case - usually this occurs when the HTTP response is not received before the configured es.http.timeout -> try next available node (or if none are left re-throw the timeout as an "all nodes failed" exception)

The issue appears to be that the NetworkClient is only aware of a single node, the load balancer. In case 2 when an exception occurs - the entire Spark task fails like this:
Caused by: org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException: Connection error (check network and/or proxy settings)- all nodes failed; tried [[<load-balancer>]]
This is because there is no "next node" for it to retry the timed out request on.
The Spark task can and will be restarted up until spark.task.maxFailures is hit, but this restart results in any data already loaded within the task being reloaded (something that does not happen in failure scenario 1). This can have a big impact especially when Spark tasks are quite large, and also causes unnecessary deletes by overwriting existing documents. These deletes need to be expunged later.
I was wondering if it might be worth adding some configurable number of retries for exception case as well as the "incomplete response" case? I'd be happy to raise a PR for this, but wanted to get an opinion first and make sure I'm on the right track! I suppose this might look something like:

<cycle through available nodes one by one - if you reach the end of the list go back to the start N times>

where N is the new configuration setting.

Your proposal sounds reasonable to me (acknowledging like you said that putting a load balancer there in the first place is probably not ideal). As a workaround, can you give the load balancer several aliases, and then put all of those into es.nodes? I haven't tried that so I don't know for sure that it would work.

Your proposal sounds reasonable to me (acknowledging like you said that putting a load balancer there in the first place is probably not ideal). As a workaround, can you give the load balancer several aliases, and then put all of those into es.nodes? I haven't tried that so I don't know for sure that it would work.

Yes this is actually one thing that we've tried and it did work relatively well as a workaround!

This is something that could be useful to me as well. I run long-running (weeks/months) Spark Streaming jobs, which is difficult to maintain if we need to upgrade ES along the way. I currently set:
es.nodes = my-elastic.abc.com
es.nodes.resolve.hostname = true
es.nodes.wan.only = false

When we need to roll out new ES Servers as part of an upgrade, ESHadoop isn't happy about IPs that it previously discovered suddenly disappearing, nor does it know about new IPs added to the cluster. It throws EsHadoopNoNodesLeftException as the old IPs disappear, which makes sense. But it would be nice if we could set a retry as OP suggested. Or it would also be nice if the connector tried to re-init after losing a configurable percentage of server IPs. In other words, re-discover nodes after losing 50% of its nodes' IPs.


Teradata Connection Error

I am getting an error while connecting Teradata to SQLAlchemy URI
NoSuchModuleError: Cant load plugin: sqlalchemy.dialects:teradata.pyodbc
Can you tell me how to resolve this issue?

I hope in the meantime you have found out how to Install the missing packages. Still not a caravel issue, closing.


Feature request: Highlight source registers in different colors of the selected instruction.

Something like this:

Where the last mov is selected.

I'll look into it.


Enable render blade on index.md files

This will enable render blade inside the index.md files. Can be very useful to create for example role based menus.

Thanks, can you provide unit tests?


Start storing the MS Token's expires_at

This should fix the issues with tokens not refreshing properly.
Signed-off-by: Alexandra Isabel Galderisi<EMAIL_ADDRESS>

Going to close this for now as some additional fixes may be needed


Updated tests in material/bottom_navigation_bar_test.dart

Description
In this PR, I have updated the tests in packages/flutter/test/material/bottom_navigation_bar_test.dart file and changed the title field to label field in test/cupertino/tab_scaffold_test.dart, test/cupertino/bottom_tab_bar_test.dart, test/cupertino/scaffold_test.dart, test/cupertino/nav_bar_transition_test.dart and test/cupertino/material/tab_scaffold_test.dart in flutter directory.
Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I signed the CLA.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I updated/added relevant documentation (doc comments with ///).
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.

[x] No, no existing tests failed, so this is not a breaking change.

Merge conflicts are resolved now.

Hey @HansMuller , I have updated some more tests in this PR.

I have reverted the changes in those files.


FIX: No JSON object could be decoded (line 123) [chalice==0.7.0]

I was getting Traceback (most recent call last):
File "/var/task/chalice/app.py", line 316, in _get_view_function_response
response = self._invoke_view_function(view_function, function_args)
File "/var/task/chalice/app.py", line 344, in _invoke_view_function
response = view_function(*function_args)
File "/var/task/app.py", line 138, in getData
obj = app.current_request.json_body
File "/var/task/chalice/app.py", line 123, in json_body
self._json_body = json.loads(self.raw_body)
File "/usr/lib64/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
So I guessed it's better not to json.loads() a NoneType.

Codecov Report

Merging #292 into master will not change coverage.
The diff coverage is 66.66%.

@@           Coverage Diff           @@
##           master     #292   +/-   ##
=======================================
  Coverage   87.17%   87.17%
=======================================
  Files          19       19
  Lines        1778     1778
  Branches      207      207
=======================================
  Hits         1550     1550
  Misses        176      176
  Partials       52       52

Impacted Files
Coverage Δ

chalice/app.py
95.14% <66.66%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

Wait... Don't merge it yet if you think to....
The issue is that I enabled the binary support and now my data comes in base64...
So it can't be json.loads()ed straight forwardly.
Eventually, I parse the raw_body myself instead of using json_body
def decompress(data, qs=False):
if data:
	if data[:1] == '{':
		return parse_qs(data) if qs else loads(data)

	return parse_qs(base64.b64decode(data)) if qs else loads(base64.b64decode(data))

return {}


Fix value = 0 issue

Fixes #108

Gentle reminder about the PR.
Thanks

Thank you for merging this, Could you kindly push the new version to https://grafana.com/grafana/plugins/yesoreyeram-boomtable-panel it is still showing 1.3.0.
Thank you very much.


Initial GCA implementation

Pull request check list

[X] Proper tests/regressions included?
[ ] Documentation updated?

Affected functionality
Initial Galadriel CA boilerplate and Signing functionality for JWT tokens and X.509 certificates.
Description of change
Adds the Galadriel CA component, with two endpoints: one on listening on UDS, the other listening on TCP using TLS, with a certificate generated and kept in memory, and rotated every hour.
The GCA needs to be configured with a root_cert.pem and root_key.pem. This Root CA is used for signing the X.509 and JWT tokens.
The GCA exposes a /jwt API on TCP, requiring a JWT token on the Bearer, and returning a new JWT token, if the token presented is valid.
The GCA uses the new interface ca.ServerCA to sign certificates and JWT tokens. This same interface will be used by Galadriel Server to implement the same mechanisms for TLS and for providing the Haversters with new JWT tokens.
Adds some functionality to load, parse, and create X.509 certificates and RSA keys.
Which issue this pull requests fixes

The biggest concern that I have here is that you are committing certificates, even if they are for testing purposes, they tend to expire and cause the unit test to fail. I know that this can take time depending on the certificate's valid time, but I would say to generate new ones in each unit test run or document the process for generating these certificates since they can use specific configurations or not, depending on the case.
Let me know WDYT.

Yeah, I agree. I removed the certificate files for the tests of the CA and Endpoints, they are now generated ad-hoc in memory. The only ones that are left are used for testing the "load certs and keys from disk" methods.

I'll leave one question, though:
I've noticed you're using go-jose instead of go-jwt. Doing some research, seems like go-jwt is way more popular, but it's older and is decreasing in activity, while go-jose looks like it has been actively worked on. Is this, at least, partially, the reasoning to chose from either one? Would like to hear your thoughts on this

I chose go-jose because it provides the generation of JWKs, but after putting a little more thought into it, I don't think we're going to need that capability, because GCA is not going to distribute JWT Public Key Sets like SPIRE does. Having said that, I think it's better to use go-jwt, its API is higher level than go-jose, and, as you said, it's more popular.
I'm migrating togo-jwt.

I removed the JWT API handler from this PR, since I'll add it as part of a more specific issue.
I left the common methods and interfaces for working with JWT tokens.

Closing as this is no longer a priority.


feat: serve specified directory

Serves specified directory, defaults to cwd

You already can do that by running serve path/to/directory 🤔

I've tried that and it failed in combination with --single.

Maybe I misunderstood single, but I thought it might be there for serving a single index.html and some static resources (like images or js or css)

Shouldn't we rather fix the current method for specifying folder to work with --single - than add a new option for something that existed 🤔

Seems like this https://github.com/zeit/serve/blob/master/lib/index.js#L23 is just too naive - afaik the path to directory should be last argument...

So lets abandon this.


[BEAM-1340] Move TestDataflowRunner into dataflow package

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

[ ] Make sure the PR title is formatted like:
[BEAM-<Jira issue #>] Description of pull request
[ ] Make sure tests pass via mvn clean verify.
[ ] Replace <Jira issue #> in the title with the actual Jira issue
number, if there is one.
[ ] If this contribution is large, please file an Apache
Individual Contributor License Agreement.

R: @davorbonaci
I believe the cost/benefit of this change make it worth consideration for including in the first stable release.
There are two parts to this PR:

Register the TestDataflowRunner so that we don't have to fully qualify it on the command line. This simplifies our poms and every testers life. This is backwards compatible and makes configurations more robust. Note that every other runner has their test runner registered.

Move the runners.dataflow.testing package to the runners.dataflow package. This will allow the test runner to use package-private things, such as transport helpers, etc, etc, (the list will only grow).

After the registrar change is in place, the second one is backwards compatible except for programmatic uses, which would mean a user hardcoded the runner in their Java code. So, while it is backwards incompatible in a technical sense, the actual negative impact is ~zero.

Coverage remained the same at 70.56% when pulling 204a5254dfb0e36e348d64f13c8ea0fa325b6575 on kennknowles:DataflowRunner-testing into 019d3002b0e2a7db9c5c2e84a0a95fad60f16422 on apache:master.

Coverage increased (+0.01%) to 70.57% when pulling b46e7b9bb113a5b1b75c7aca9de8cbabdd75ff6f on kennknowles:DataflowRunner-testing into 019d3002b0e2a7db9c5c2e84a0a95fad60f16422 on apache:master.


Responsive fluid tables

Hi,
I'm building an application with Twitter Bootstrap one of the reasons because I need it to be responsive and readable with hand-held devices.
The responsive layout works like a charm, but tables not so much, they have a fixed min width where they can't go any thiner, I get that, but it would be so cool if the tables would be responsive, meaning when they can't go any thinner they change their layout to show the information somehow to fit the screen.
I don't know how would you achieve this, maybe changing the scale (or zoom) on the table so it go smaller, since on a hand-held you can zoom in with a pinch.
Is there an easy solution to solve this?
Thanks!

There is an option that came up a few months ago for such a thing, but we won't be integrating anything too crazy in the tables front. Too messy and not enough time for us to invest into it.

Can you point me to that option?


Do not use System.console() as it may return null

@goneall My contributions are done under the terms of the Apache License, version 2.0.

Changes merged to git.spdx.org, should be mirrored soon.  Good catches - thanks for the fixes.


Docker: drop Windows 1709, add 1809

1809 is a long term release and should be added. 1709 is no longer supported by MS.

Closed in b8493863c588f409071e6c6577bf73deae3f6e96


Console kan niet uitvoeren bericht.

When I execute /staff or /jenseplens at the console, it executes the command but also says it couldn't execute.

Fixed it.

Thx!


Unexpected number for -local_port

Dear sir/madam,
Just to be clear, I have very little knowledge on the subject. Here is a question.
I am trying to use this tool and I get the following error.
The command line and the result:

What is the problem?

please run node proxy-login-automator.js ........... because .js by default will be run by another system program.

Thank you so much for the response.


Replaced jekyll-minifier that uses uglifier by terser

Hopefully fixes #2548.

@CheariX can you test if this change fixes your issue with ES6?

Note that jekyll-minifier also minized HTML, CSS and JSON. Your solution no longer does this.

@JoJoDeveloping you are right, so we can't get rid of jekyll-minifier just yet.
I made a PR for jekyll-terser with my code, but you are right. I wll send a PR for jekyll-minifier.

I made a PR for both jekyll-minifier and jekyll-terser. If the second one is accepted, we can drop the plugin I created and use jekyll-terser instead. If the first one is accepted, we can drop both my plugin and jekyll-terser and use only jekyll-minifier.

Thank you @george-gca for taking care of this issue!
When I wrote it initially, I was not aware that al-folio does not use uglifier directly but via jekyll-minifier. Therefore, changing from uglifier to terser is more complex than expected.
I hope that your upstream PRs get merged soon.
Anyways, I tested this PR and it worked flawlessly on my site. I vote for merging this PR into main.
Using this PR, I can finally deploy my website again 😀

I was about to ask you this, so the minified js is looking right. Is this also true for the css and html files? And what about when jekyll env is production?

CSS looks minimized to me too. However, it looks identically to what we had before.
HTML looks different to the minimized code that we had before. Before, we got only a single line. Now, it seems that at least JavaScript inside <script> is not minimized. The HTML itself, however, looks like it was minimized.
Currently, JavaScript file are also minimized in non-production environments. I added a code suggestion to "fix" this. HTML/CSS is not touched by terser, since it only touches JavaScript files

I thought about adding minification only on production environments, but decided not to since using it on develop environments helped me get it right. Maybe it is a good idea to add a new param somehow to let the user specify if it should run only on production or not, and by default do this.

I quickly checked where we currently use embedded JavaScript. There are only a very few places (disqus.liquid, mathjax.liquid, misc.liquid, progressBar.liquid, pseudecode.liquid). I'm not sure why these files use embedded JavaScript instead of using *.js files but they could be easily refactored if this is desired. Actually, best practices is also to avoid embedded JavaScript (e.g., deployment of Content-Security Policy is easier, but we don't use it anyway at the moment)

Thanks for the lookup. I think I will handle these guys next in this PR. I will only push it forward when the minification is as close as possible to the one with uglifier.

using it on develop environments helped me get it right.

For me, minifying takes quite a long time, on the order of several tens of seconds in addition to the rest. It makes the build much slower, and therefore I'm happy I don't have to deal with it when developing/prototyping. So please leave the option to have it production-only (or invest the effort into making it real fast 🙃).

Another possibility is to migrate the solution to npm-based like already done with PurgeCSS. In this case I would use html-minifier-terser. What are your considerations about this approach?

using it on develop environments helped me get it right.

For me, minifying takes quite a long time, on the order of several tens of seconds in addition to the rest. It makes the build much slower, and therefore I'm happy I don't have to deal with it when developing/prototyping. So please leave the option to have it production-only (or invest the effort into making it real fast 🙃).

I'd second this. Minifying takes some time, so I would like to skip this step in development. Also, I find the non-minified code quite nice for feature development.

Another possibility is to migrate the solution to npm-based like already done with PurgeCSS. In this case I would use html-minifier-terser. What are your considerations about this approach?

I also thought about alternatives to jekyll-minifier. html-minifier-terser seems to be the logical solution for this. However, I have no strong opinion about that. At least, it would compress embedded JavaScript (which I think we don't need; we can remove it).

Perhaps we should do performance testing between the various alternatives?

Tbh I am not really concerned about performance here, since this will only run on production environment. I am worried about maintainability, both of our code and the ones we are depending on.
For instance, jekyll-minifier last code update was 4 years ago, and it uses under the hood 4 packages: uglifier for js (last updated 4 years ago, though UglifyJS is heavily maintained), CSSminify (last updated 4 years ago), Htmlcompressor (last updated 7 years ago), and JSON::Minify (last updated 8 years ago). I am not saying that all these should be continuously updated (since JSON, for instance, is a well-defined standard), but looking at code that haven't seem an update in a while gives a certain insecurity.
Meanwhile html-minifier-terser was updated last year. Maybe it is a good moment to migrate to other solution for code minification.

Not stale.

Update: my PR for jekyll-terser just got accepted. Maybe now I can take a look at this PR again.

I quickly checked where we currently use embedded JavaScript. There are only a very few places (disqus.liquid, mathjax.liquid, misc.liquid, progressBar.liquid, pseudecode.liquid). I'm not sure why these files use embedded JavaScript instead of using *.js files but they could be easily refactored if this is desired. Actually, best practices is also to avoid embedded JavaScript (e.g., deployment of Content-Security Policy is easier, but we don't use it anyway at the moment)

@CheariX I tried to do a major refactoring to remove as much as possible inline js code. Please test if the current solution is working fine. Also can you give it a try @JoJoDeveloping?

Thank you @george-gca for this amazing work.
I've tested it with my personal page.
It seems to work as expected. HTML and JS are minified. No errors to compression.
However, I found the following bug during the Install and Build action:

Imagemagick: Command returned pid 2651 exit 127 with error sh: 1: convert: not found

The effect is that many preview images (e.g. 480p) are not generated. I can see this on my publication images.
I'm unsure if this is related to this particular PR or to anything else. I didn't merge upstream on my site for a while (since 2024-10-25). I think the netlify preview of this PR does not have these issues.

It is unrelated, and it has been fixed on https://github.com/alshedivat/al-folio/commit/ec7d7c34e8f1a7ef4da2ea37454f470b8b37094b. I just haven't merged it with main yet.

Perfect. Good to know that this one is fixed. Then, this PR looks good to me.

I made a PR for both jekyll-minifier and jekyll-terser. If the second one is accepted, we can drop the plugin I created and use jekyll-terser instead. If the first one is accepted, we can drop both my plugin and jekyll-terser and use only jekyll-minifier.

The jekyll-minifier upgrade would be significantly better. Because jekyll-terser borrows some architecture which assumes 10-year-old Jekyll internals that have a massive limitation: assets from gems like jekyll plugins are mishandled.

Can you elaborate a little bit more @sim642? Which plugins misbehave?


remy: init at df2c1ae

Description of changes
Add https://github.com/bordaigorl/remy, a pyqt5-based management application for remarkable tablets.
Todos:

[ ] package https://pypi.org/project/simplification/

Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

@phaer are you still interested in merging this?

Sorry no, my remarkable broke. :( feel free to reopen :)


[V5.2.5] form state not update when initialValues change

const mapStateToProps = createStructuredSelector({
  initialValues: selectInitialValues(),
});

function mapDispatchToProps(dispatch) {
  return {
    onChangeCategoryName: (name) => dispatch(changeCategoryName(name)),
    onChangeCategoryDescription: (des) => dispatch(changeCategoryDescription(des)),
    onDoAddCategory: () => dispatch(addCategory()),
    dispatch,
  };
}

export default compose(
  connect(mapStateToProps, mapDispatchToProps),
  reduxForm({
    form: 'initializing',
    fields,
    validate,
    overwriteOnInitialValuesChange: true,
    getFormState: (state, reduxMountPoint) => state.get(reduxMountPoint).toJS(),
  }))(AddCategoryPage);

this is my form.
i'm using saga to upload an image, then update image link into initialValues in reducer
the selectInitialValues selector will  load initialValues data from reducer
but my form data doesn't change although I saw redux-form/INITIALIZE action in actions list of redux-dev-tool
if i make & dispach same action manualy by redux-dev-tool, my form data got changed data from initialValues.
How can i make it work automatic update form data after i got result from upload function
P/s: i try to dispach redux-form/INITIALIZE by saga after received uploading result but it still not work!
Please help! Thanks!

My bad! my selector return a Map instead of an object.


add Audio Speech Sentiment dataset

Add Audio Speech Sentiment dataset.
Dataset: https://www.kaggle.com/datasets/imsparsh/audio-speech-sentiment

"Audio-Speech-Sentiment": {
    "Year": 2021,
    "Content": "Audio Speech Sentiment Dataset",
    "Emotions": "4 emotions provides audio recordings of spoken sentences for anger, happiness, sadness, and neutral emotions.",
    "Format": "Audio",
    "Size": "1.1 GB",
    "Language": "English",
    "Paper": null,
    "Access": "Open",
    "License": "CC0: Public Domain",
    "Dataset-link": "https://www.kaggle.com/imsparsh/audio-speech-sentiment-analysis",
    "Paper-link": null,
    "License-link": "https://creativecommons.org/publicdomain/zero/1.0/"
}


Doesn't refresh changed manifest.json files

Love this extension, saves so much time.
Have noticed (for a few years now actually) that the extension only reloads the content scripts which are already loaded. This is great if I change a JS/CSS file, but not when I add a new file to the manifest.json. In that case I have to go to the extensions page itself and reload manually.
Is this a limitation of Chrome's API or could this be added in a future version?

When I built the extensions, it certainly was a Chrome limitation.
Not sure if the situation has changed since then...

It's probably worth documenting in the README if it is still the case.

Docs updated with the help of @studgeek. Thank you!


Limit Weaver read/write generation to types marked with [Serializable]

Problem
Now that weaver and create read/write for types in other assemblies a lot more types can be passed into Mirror functions (as long as they have default constructor), this may lead to unwanted behaviour in some places where a lot more is Serialized than expected because of nested objects.
Solution
I think it would be a good idea to only create read/write for types marked with [Serializable].
It should be easy for users to understand because unity already requires [Serializable] in order to serialize objects used by MonoBehaviour/ScriptableObject.
Downside
The only downside would be breaking existing Mirror functions (rpc/cmd/message) that use types not marked with [Serializable]. For types directly used in mirror functions we will be able to give a useful error telling the user to add [Serializable] to their type.

can you give an example of a type that is common to have this problem?
UNET's original requirement was: 'only simple types and structs of simple types'. perhaps we should've sticked with that one :)

This is a no from me.  Breaking every existing project and forcing users to explicitly decorate everything used in Cmd's,, Rpc's, Messages, etc. is not the least bit user friendly.

I am not a fan either.   To the contrary,  I would like to reduce the amount of annotations and special interfaces people have to use to send a message.
To me,  the ideal would be:
public struct MyData
{
    public int id;
    public string Name
}

connection.RegisterHandler<MyData>(msg => { /* do something with it */ });

Ideally we would not require any annotation or interface,  it would just work.

This already works today:
    public struct MyData
    {
        public int id;
        public string Name;
    }

    void Update()
    {
        if (Input.GetKeyUp(KeyCode.G))
            CmdDoSomething(new MyData { id = 42, Name = "George" });
    }

    [Command]
    public void CmdDoSomething(MyData data)
    {
        Debug.Log($"{data.id} {data.Name}");
    }

I've been thinking [Serializable] must exist for a reason, otherwise types in c# would be marked as Serializable by default.
I've done some research and this is what I have found so far

I would assume that classes are not serializable by default because there's no guarantee that a dump of the object's state to a stream using Reflection even makes sense. What if your object holds an open connection to a database or communication port? Whenever a new object was constructed by deserializing an instance of the previous object, you would end up with a useless object.
Plus, you have to consider that whenever a class is serializable, the runtime insists that all of its member variables be serializable as well, unless they are explicitly marked otherwise. It's much easier to make serializability an opt in functionality for developers, rather than forcing them to opt out certain members.
And finally, you might have certain fields in your class that contain private or sensitive information. Having to explicitly mark classes as serializable ensures that you don't accidentally expose the details of something (whether it be the data or your implementation) to the world that you didn't mean to be public.

Perhaps we can Serializable all structs by default but require classes to be marked with [Serializable].
Structs seem to be safer to Serialize, for example they can not be recursive.

Maybe approaching this in a less abstract way and use examples of what we expect the behaviour to be.
Here are 4 examples, what should expected behaviour be?
Should there be weaver error?
What is send over network?
Example 1 - Someone creates AnimationClip  at runtime and wants to send it over network
public void RpcSendClip(AnimationClip clip)

Example 2 - Someone is trying to debug a client, and want to send Exception back to a server
public void RpcSendExeption(ArgumentException exception)

Example 3 - Someone is using a Recursive data
public void RpcSendRecursive(SomeData recursive) { }

// some data that points to a Recursive data type
public struct SomeData
{
    public int nodeId;
    public Node node;
}
public class Node
{
    public int id;
    public Node parent;
    public Node[] children;
}

Example 4 - Some using NetworkWriter but doesn't know they need to call ToArray
public void RpcSendWriter(NetworkWriter writer)

Currently all 4 of these examples work in hard to predict ways which makes it extremely hard to debug, even with help from the Mirror discord.
My proposal is to use [Serializable] for type (maybe just classes). If the user tries to send a type not marked with [Serializable] then it would give a helpful error

{type} is not Serializable. Add the [System.Serializable] or create a custom writer.

With this, for examples 1, 2 and 3 the user would simply create a custom writer for their use case. and for example 4 they notice they are doing something wrong.

@James-Frowen it makes sense when doing it from scratch.
but @MrGadget1024 has a good point. this would break basically every project.
and while serializing everything by default isn't the most logical way to do things, it is the easy way (see his example).
[NonSerialized] isn't much prettier either though..

[NonSerialized] isn't much prettier either though..

This is a feature that someone requested https://github.com/vis2k/Mirror/issues/1229
I think adding [NonSerialized] Is really useful, and it's goal isnt to be pretty, its goal is to tell mirror to not serialize the field.

this would break basically every project.

We could only make [Serializable] a requirement for classes, as struct are easier for us to deal with.
This is also the kind of breaking change we can write an updater for. for example, every type that is used in a rpc/cmd/etc we automatically add [Serializable].
and if it does break having a useful error, will allow users to know what went wrong and quickly fix it

{type} is not Serializable. Add the [System.Serializable] or create a custom writer.


Clean up test infrastructure

See #41880 for history.

In the list of checks I do not see "web_tests". Are we failing to run web tests or am I looking in the wrong place? :thinking:

Having said that web tests do show up in my PRs, so :man_shrugging: Feel free to disregard if working as intended.

This commit broke the triple head bot.
The first error is at https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8899179279474044576/+/steps/flutter_test_tests/0/stdout


[WIP] Join container to pods based on name with k8s1.1

Fixes #1558

Right this approach won't work as connects to pseudo nodes get dropped.  Back to drawing board.


[FLOC-3387] Managed acceptance for existent nodes

Hacky fix that may or may not work as well as I expect (I keep getting unclean reactor errors that I don't know if they are caused by my code or not).
Open to suggestions. This code may very well had been in design review instead of code review...

I've just done a quick pass for style. Will do another, deeper pass now.

So the basic idea is that if it's a managed run, we restart the nodes (when we're on Ubuntu), rather than just starting them?
That seems like a reasonable step forward.
As noted in my inline comment, I wonder whether we should always restart. You probably know better than I do whether that's a good idea. Happy to talk about it in some other forum if you'd like.
Please make the suggested (mostly stylistic) changes. If you think we should always restart, please make that change too.
The build errors you're seeing are almost certainly not due to the changes in this branch, except for the "lint" failures, which should be fixed after you address all the review comments. The "acceptance" failures  are known flaky.

Forgot a couple of things:

Thanks for doing this! It's important that our tools are reliable.
Please resubmit for review when you're done, assigning to me


Optimistic insertions without client generated key?

I really like this lib and I'm thinking of using it as it can save me a lot of redundancy. One thing that stops me now is the whole client-generated-key thing. In my current app, the keys are generated on the backend. I believe this is the right place for generating the keys. I determine whether I should modify a record or create a new one by using PUT and POST respectively. I do not display the keys in the UI at all.
Can a configuration option be added to the lib that would allow the operation without client generated key? I can think of two ways of doing it:
a. don't do optimistic addition
b. do a fetch asynchronously in SUCCESS action and cleanup in FAILURE action to keep the state in sync with the backend.

Hi @dmt0
Optimistic addition (createStart) is optional. You can ignore this to avoid dealing with client generated ids. See more here:
https://github.com/Versent/redux-crud#about-optimistic-changes
re b this sounds like what createError does. But it needs the client generated id to find the record in the collection.
If you know of a more elegant way of handling optimistic creation I would love to know. I tried different things but client generated ids was the only thing that worked well with the flux pattern.

Hi @sporto
Perhaps when the key is generated on the backend there is simply no elegant way. All I can think of is pulling the whole collection on both SUCCESS and ERROR. On SUCCESS - just to get the ID, on ERROR - to clean up the optimistic insertion. Yes it's ugly and it does create network overhead, and that's why I suggested to make it an option and not the default behaviour.
Actually, in my case, the ID is generated based on a certain rule and on some other data that has to stay on the backend and generating it on the front-end is simply not an option. Hence my enquiry.

@dmt0 maybe this is not clear in the readme: the creation of a client generate ids is just temporary, it is just there so it can match the record when it comes back from the server. After the record comes backs this client generated id is thrown away and the server generated id is used instead. So you can have both things: optimistic creation and server generated ids, this is what we have.
I will try to make this clearer

@sporto
If that's the case, it's all great than. Thanks for the clarification! Do we need that generated ID at all though? You POST an object without ID to the back-end, you get back the response with the generated ID. Match it against one without ID, done.

@dmt0 what you are suggesting might work if response times were extremely fast and the user waits for each thing to finish before doing something else.
But with the async workflow of ajax and flux this is hardly the case, there is a good chance of having more than one new record in transit in a collection, so the generated ids are necessary.


Refactor encode_block functions into a struct

This is the first step in a larger refactor which aims to make the
encoding process follow along with the AV1 spec, making it easier to add
new functionality. The next step will be to break out portions of the
encode methods into their own methods, labeled according to the AV1
spec.

Coverage increased (+0.05%) to 82.417% when pulling 1a71d93d21594a822ac3bfc6e131261ea08e9f57 on shssoichiro:encoder-refactor into 7debdde37911f68824208e27b51d28ae5c7c48de on xiph:master.

SGTM from a design perspective, since it avoids passing mostly the same set of parameters twice, but I don't think that following the AV1 spec closely is a design goal for rav1e. Maybe @tdaede can chime in on that.

Correct, if there are places it makes sense to follow the spec or easier to read then do so (especially in context.rs) But the encode process is not normative so we will almost certainly diverge. There is an obvious case for separating encode_block_a/b farther though - that's to replace portions of them with faster approximations when doing the RDO steps.
Moving everything into a struct is nice for dropping the huge argument list, but I'm a little bit concerned about hiding what state functions can mutate. It's not really an issue here because it's only done for encode_block_a/encode_block_b which take almost the same parameters, but it's worth keeping an eye on.
I'll take a more detailed pass through the patch before r+ing

I wouldn't do that now, @rom1v takes priority and I'd rather avoid yet another large R+W structure if we could avoid it.

It looks like there might be some issues with this. I'll at least hold on this until @rom1v is finished with his tiling changes, and then see if there's a way to make this work well.

@shssoichiro Thank you :)

Do you still want to work on this, or drop it for now? (I had started working on something similar to struct-ify some of the many args patched, and then remembered this pr)

@tdaede This is no doubt quite out of date, it's probably worth it to scrap this PR and continue with what you were working on.


Feature Request: Dropdown Drawer for Custom Behaviours

I'm searching for an easy way to create a Behaviour MenuItem with data selectable from a specific set of choices (eg. selecting and Item from a List/Dictionary). You already use this kind of drawer for Selecting Tags in the Enable/Disable Objects by Tag Behaviour but this does not seem to be customizable to use with Lists or other values. I've seen the enumdrawer, but I need values to be adjustable at execution time.
Is there already a way to do this? Otherwise this would be a feature request.

Hi, unfortunately the only way to do that at the moment is to write your own drawer. I'll make a ticket for it. What's the use case?

lots :).
The current one ins selecting from a list of scenes to load additive which are stored in a scriptable object.

Tracking internally with MP-2023

Drawer and a implementation of it (Open Scene Behavior) will be available with the next release :-)


Add flag to specify package version to install

The current install command only installs the latest package version.
Use a --version option to install the provided version.

✅  Released under 0.4.0


S3 - Return appropriate error when provided with invalid multipart ID

Fixes #3593
Verified test against AWS

Codecov Report

Merging #4040 (1e4c4a2) into master (759974d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4040   +/-   ##
=======================================
  Coverage   94.97%   94.97%
=======================================
  Files         465      465
  Lines       50431    50431
=======================================
+ Hits        47897    47898    +1
+ Misses       2534     2533    -1

Flag
Coverage Δ

servertests
55.87% <0.00%> (ø)

unittests
94.85% <100.00%> (+<0.01%)
:arrow_up:

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

Impacted Files
Coverage Δ

moto/s3/models.py
95.83% <100.00%> (+0.10%)
:arrow_up:

Continue to review full report at Codecov.

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


Add test for fs.open when flag in invalid

I noticed that there is no test to check that an error is thrown when the flag in invalid for fs.open.
A test can be added for this case.
I would like to be assigned to this issue.

Go for it @Mera-Gangapersaud


fix(as-3039): populate user selected/entered data during page navigation

This fix populates the values that the CO selected / Entered in the Review Questionnaire page whenever they navigated back to this page

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

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

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

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

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

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

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

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


Canvas not loading with amazaon s3 bucket url

I'm getting this Error.
Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
Please help me.

I had the same error, I got around it by having my server be a proxy to the images

@sankar-nyros this happens because of security violation. Read this: https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image


Update helm chart to use 1.11.1 as well

Commit https://github.com/weaveworks/flux/commit/ba3e794a59e588eaaafa7bee07c8a0fb322e166e updated the flux/deploy static yaml files, but not the helm template.
This PR adjusts the helm chart's value.yaml file to also use tag 1.11.1.

@stefanprodan Thanks for the review - done.


Layers pad does not always update when an update is made

Description
Some actions do not immediately get represented in the miniature preview of the affected layer in the layers pad.
To Reproduce

Create a new image.
Select all pixels. Press Delete.
The layer is now entirely translucent, but in the layers pad, it still shows up as opaque white.
Select the pencil tool, pick a colour, and draw on the layer. It continues to appear opaque in the layers pad.
Add a new layer (e.g. with the first toolbar button beneath the layers pad). Now the preview updates to show what is actually in the background layer.
Select the paintbrush tool and draw on layer 2. Its preview does not update.
Select the background layer in the layer pad. Now layer 2's preview updates.

Version
Operating system: Ubuntu 24.04
Pinta: 2.2 built from 1388aff91ebb35f53717d2a3a7b3ffc9c82b3803

It looks like the HandleHistoryChanged() method is getting called, so probably the ItemsChanged() calls isn't quite correct, or isn't sufficient to actually cause a redraw immediately


Adds c# comments for the two TimeSpan values

This will match the java code comments.
Fixes #5137

@motowilliams : Thanks for your contribution to the Azure documentation! The author, @vturecek, has been notified to review your proposed change.


ECS agent is outdated

The ECS agent in the pre-built ami (at least the one in eu-west-1, ami-c41f3bb7) is 1.13.1, but the current version is 1.14.3. I'm not familiar enough with packer to roll my own new image, so I was wondering if you could please build a set of new amis  (and update https://github.com/segmentio/stack/blob/master/defaults/main.tf#L25 accordingly).

#139 fixes the problem, and the latest agent will be picked up by the host instances when restarted.
Unfortunately, docker-engine/docker-engine will not, and the instances will still require to be restarted manually.


⚠ Samsung has degraded performance

In 6a52905, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2522 ms

Resolved: Samsung performance has improved in 6b76f6a.