Add tado water heater

Breaking Change:
Tado hot water zones with temperature control previously created an climate entity, e.g. climate.hot_water, these will be replaced by a water_heater.hot_water entity instead.
Hot water zones without temperature control did not have a climate zone, so change is not breaking for them.
Description:
Support for tado water heater zones.
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#10642
Example entry for configuration.yaml (if applicable):
tado:
  username: !secret tado_username
  password: !secret tado_password

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.
[x] I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[x] The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
[x] New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
[x] Untested files have been added to .coveragerc.

I've tried your PR, but I get a 422 Error when I change the temperature. The configured value is returned fine.
2019-11-29 15:31:32 INFO (SyncWorker_1) [custom_components.tado.water_heater] Switching mytado.com to True mode for zone Hot Water
2019-11-29 15:31:32 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140231243094352] HTTP Error 422:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1236, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1261, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    self._platforms.values(), func, call, service_name, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 348, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 372, in _handle_service_platform_call
    await func(entity, data)
  File "/usr/src/homeassistant/homeassistant/components/water_heater/__init__.py", line 311, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/water_heater/__init__.py", line 243, in async_set_temperature
    ft.partial(self.set_temperature, **kwargs)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tado/water_heater.py", line 163, in set_temperature
    self._control_heater()
  File "/config/custom_components/tado/water_heater.py", line 229, in _control_heater
    device_type="HOT_WATER",
  File "/config/custom_components/tado/__init__.py", line 139, in set_zone_overlay
    zone_id, overlay_mode, temperature, duration, device_type, "ON", mode
  File "/usr/local/lib/python3.7/site-packages/PyTado/interface.py", line 287, in setZoneOverlay
    data = self._apiCall(cmd, "PUT", post_data)
  File "/usr/local/lib/python3.7/site-packages/PyTado/interface.py", line 81, in _apiCall
    response = self.opener.open(req)
  File "/usr/local/lib/python3.7/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/local/lib/python3.7/urllib/request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/lib/python3.7/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.7/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 422:

@andersonshatch there is still quote some stuff missing when comparing with the climate platform (unit, step, operation mode). I've merged PR #29191 since it fixed it when you have temperature control.
In the end, I would like to move the water heater to the water_heater component.

I'm working something out for tado to use the dispatcher for updates, since the current way is quite messy. I will be modifying your water_heater to work with this.  Please hold for a few days. :)

Now that my tado rework branch has been merged, I've created https://github.com/home-assistant/home-assistant/pull/30095 with code that works fine for my temperature controllable water_heater.
Could you check this out if it also works for you?

It does! 👍

Yes work for me also, one step closer to full automation. Only need to be able to set the home and away modus through HA and i am a happy man :) Thanks!


ability to disable vertical alignment for condition symbol

I've noticed that when multiple elements are aligned the upper condition element is aligning to the left of the bottom right hand element. For example, I have this configuration

You can reproduce with
st=>start: Start
current=>operation: program = current program
last=>operation: program = last program
op11=>operation: somethin
op1=>operation: Get current program
op2=>end: startover = ad after program start
op3=>end: startover = ad after SharpStart
op4=>end: startover = ad after last program end
fail=>end: startover = EPG program start
cond1=>condition: program exists ?
cond2=>condition: SharpStart after
program start ?
cond3=>condition: Ad existing after
program start ?
cond4=>condition: SharpStart
before program ?
cond5=>condition: Ad after previous
SharpStart ?
cond6=>condition: Ad after
last program ?

st->op1->cond1
cond1(yes)->current
current->cond2

cond1(no)->cond6
cond6(no)->last
cond6(yes)->op4
last->cond2
cond2(yes)->cond3
cond2(no)->cond4
cond3(no)->cond4
cond3(yes)->op2
cond4(no)->fail
cond4(yes,right)->cond5
cond5(yes,right)->op3
cond5(no)->fail

I've forked and modified the library to add ability to put parameters for symbol declaration such as
element(param1=value1,param2=value2)=>start: Start

This is done using
var symbol = {
  key: parts[0].replace(/\(.*\)/, ''),
  symbolType: parts[1],
  params: {},
  text: null,
  link: null,
  target: null,
  lineStyle: {},
  flowstate: null
};

//parse parameters
var params = parts[0].match(/\((.*)\)/);
if (params && params.length > 1){
  var entries = params[1].split(',');
  for(var i = 0; i < entries.length; i++) {
    var entry = entries[0].split('=');
    if (entry.length == 2){
      symbol.params[entry[0]] = entry[1];
    }
  }
}

In flowchart.symbol.condition I identified the code responsible for identifying if an element is under this one : here
After applying the new configuration which indicates not to vertical align the next element
cond1(align-next=no)=>condition: program exists ?
cond6(align-next=no)=>condition: Ad after

It gives

What do you think about this ?

Nice work... as soon I get my hands back to my macbook I will look at your PRs...
PS. I did not check... did you describe it a bit in the readme?

@bertrandmartel ok, as soon you describe the new functionalities in the readme and in the gh-page with an example (https://github.com/adrai/flowchart.js/blob/gh-pages/index.html) or at least a proposal... ;-) I will merge the PRs
Well done! 👍

I've added in the readme
'cond=>condition: Yes \n' + // use cond(align-next=no) to disable vertical align of symbols below

I've updated gh-pages locsize demo with more aligned conditions. Is that ok or you prefer to setup a new demo ?

@adrai Also do you want me to commit the release folder ?

It's ok, I will do the rest... 😉

I came across this PR and the issue it solves today by chance through a post on StackOverflow. I'm just curious, why not make this the default for diagrams created with flowchart.js? It seems to me that flowcharts look a lot better when parallel items are not scattered all over the place but kept in one column.


set fill value to max of full dataset + 1

Hello, I'm somewhat new to this repo 👋 .
It looks like if the global max is in not in the current cross_validation split,  using X[train_indices] would lead to different fill values in different CV splits. My impression is that this is undesired, but correct me if I am wrong.
Similarly, all_nan_columns should be the same across all CV splits, I think?

Hi there,
I believe the idea was that if NaNs occur for a feature in the validation set but not the train set, we can still train on the train set with that feature (in particular for .refit). However, this might through errors when trying to validate so I also think this is cleaner.


Option to include the ability to use percentage of tile set and ability to use 2 or more tiles on single grid element

Hi . This could accomplish great things, primarily being the ability to not use redundant tile images, so game size would be less, and game would be quicker to load as well !!
For instance, now I have few different types of end wall elements in the tile set based on different things, like snow, trees on the end wall etc, but if such a function exists, then I could have only 1 tile for the end wall element, say only 20 percent from the far right, then combine with any of my other 80 percent from the far left wall tiles to make an end wall, among other things like practically reducing the count of tiles in my tile set from 150 or so to 50 or so or even less

ok but wouldn't that cause more heat ? as 2 different tileset nodes and 2 different images, even if transparent, it will still load the image first. im sorry if this is a stupid question as I am still learning, but thats what I understand . But I will use your solution for now.

ok but wouldn't that cause more heat ? as 2 different tileset nodes and 2 different images, even if transparent,

Could be the same image. You shouldn't worry about performance, unless it's already a problem.
I might have misunderstood what you want. What I understood is that you want to create layers of tiles so you can make compositions of them instead of making a big image with all variations. If that's the case then my proposed solution should be enough. Performance should be about the same and you have way more flexibility: you can do as many layers as you want and you can cut the layers in any shape you want.

OK . thanks for the solution, it looks good enough for now. I am not sure I understand you 100%, but I do at least 90 percent and your solution should solve my issue I think. What I get from what you are saying, that on every particular tile space on the main level scene, I can use two and even more tiles and combine them to make the effect I want. ?? Cool . sounds like it I think .

CC @MarianoGnu

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.
The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.
If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!


[DOC] Documentation and user tools --help should clarify what type of cluster is used with --cluster option

Report incorrect documentation
Our user docs and the spark_rapids profiling/qualification --help should explicitly state what type of cluster (--cluster option) is expected - cpu or gpu.  Some of our docs to mention it but not in all places and the main one for me is the --help option.
it was confusing to me when I was running qualification which type it was expected as far as this is the type of gpu cluster I want to to target, vs this is what cpu cluster I ran this app on.
### Tasks
- [x] Update in spark_rapids qualification --help for cluster argument
- [x] Update in documentation.

MR to update this in documentation is merged. Closing this issue.


Updated ColorInputWidget to have both editable hex field and color selector

Hi @marteinn, I've made a small update to your wagtail color panel to allow color values to be entered manually, as well as the using the color input selector. If the text input changes, the color should also change and vice versa.
Hope you like it :)

Thanks for the PR @marts, this a great addition to the library!
I think you have done a fine job, it's a simple and clear solution (also thanks for cleaning up some of my commented code). I've merged this with a slight change where I expand the input field on mobile devices, I also changed the classes to follow a BEM pattern. (You can see my changes here: https://github.com/marteinn/wagtail-color-panel/commit/7c3182ea41d4241cd980cd15ce5de4ee9a219a41)

Thanks for the PR @marts, this a great addition to the library!
I think you have done a fine job, it's a simple and clear solution (also thanks for cleaning up some of my commented code). I've merged this with a slight change where I expand the input field on mobile devices, I also changed the classes to follow a BEM pattern. (You can see my changes here: https://github.com/marteinn/wagtail-color-panel/commit/7c3182ea41d4241cd980cd15ce5de4ee9a219a41)

Also many thanks for the attached screenshot in the PR, it makes my life so much easier :)

Also many thanks for the attached screenshot in the PR, it makes my life so much easier :)

FYI: I've just released 1.2.0 with this PR included.

FYI: I've just released 1.2.0 with this PR included.

Excellent, thanks for this. I'm planning on using it for a plotly based wagtail chart package I'm building.

Excellent, thanks for this. I'm planning on using it for a plotly based wagtail chart package I'm building.

@marts Sounds interesting! Please let me know when you have something to show :)

@marts Sounds interesting! Please let me know when you have something to show :)

Hi @marteinn, just to let you know I've pushed my first installment of wagtail-plotly that uses your color picker. Still very much work in progress ... https://github.com/cursive-works/wagtail-plotly

Hi @marteinn, just to let you know I've pushed my first installment of wagtail-plotly that uses your color picker. Still very much work in progress ... https://github.com/cursive-works/wagtail-plotly

@marts Awesome, looks promising!

@marts Awesome, looks promising!


[XWALK-3542] Update docs for multiuser support

Change the app and developer usernames to normaluser.
The documents shall be revised in unity style.

@ibelem @yugang please take a look at this change.

@zqzhang Suggest adding a line to explain "normaluser".

Thanks, @ibelem.
@yugang says it is better use tester rather than normaluser. I will submit another PR.


Query a node which is an array itself

Hi there,
Is there a way to query a node which is an array? What I want is return this node of "-KO8cSA1a6Tl21vHJao5" when today is Monday or Tuesday.
"data" : {
"-KO8cSA1a6Tl21vHJao5" : {
"repeatDays" : [ "Mon", "Tue" ],
"updatedOn" : "Mon Aug 01 2016 22:06:12 GMT-0700 (PDT)"
}
}
I also tried to save the value as a string instead of string[], but can't get the result either.
Could anyone help me with this?
Thanks a lot!

You mean, you want to get the nodes that has a repeatDays of Mon && Tue ?

yes

Yes, If today is Mon or Tue, I want to get the node.

You can refer to this issue #396

I'm using the filter.
The filter is working only if the value is string, not working if the value is an array or a string of "Mon,Tue".
As my today's variable could only be "Mon" or "Tue", but my RepeatDays in database could be up to 7 days.
If there is a comparison of Contains or something alike, that might work.

I'm using the filter.
The filter is working only if the value in firebase is a string. But not working if the value is an array, nor as a string like "Mon,Tue".
As my today's variable could only be "Mon" or "Tue", but my RepeatDays in database could be up to 7 days.
If there is a comparison of Contains or something alike, that might work.

This should work if you store repeatDays as a string 'Mon,Tue':
import { ReplaySubject } from 'rxjs/ReplaySubject';

const equalTo$ = new ReplaySubject(1);

const query$ = af.database.list('/data', {query: {
  orderByChild: 'repeatDays',
  equalTo: equalTo$
}});

equalTo$.next('Mon,Tue');

query$.subscribe(data => console.log(data)); //=> [{repeatDays : 'Mon,Tue' ... }]

Thank you r-park for your reply. Sorry that I didn't really get it.
I've updated the data saved in Firebase as 'Mon,Tue'. And also added { ReplaySubject }. The 'Mon,Tue' is the data saved in database, I don't know how to set it to equalTo$.
Here is my code, would you mind to take a look and add the logic there? I tried but didn't work. The data is under the uid node, I don't know how to add the logic.
getUserTodayPrayers() {
var prayers: FirebaseListObservable;
var todayDayName = (new Date()).toDateString().split(" ")[0];
this.af.auth.subscribe(auth => {
  prayers = this.af.database.list(`users/${auth.uid}/prayers`,{
      query: {
        orderByChild: 'repeatDays',
        equalTo: todayDayName
      }
    }
  );
});

return prayers;

}
Thanks a lot!

Sorry to bother again, but the issue is still not solved. I did try the code above, but it's not working.
The scenario is this:
KeyValue pair saved in database is this: { repeatDays:  'Mon, Tue' }
And today's day name is:  'Mon'
The result I'm expecting is, I'll be able to get the data node with the key value pair as above. Today's day name is only partial of the data saved in database.
The answer I got above can only get me the data node when the value are exactly same. I need to get the value when it's partially there.


Is there a way to read lines from a shapefile?

Is there a way to read lines from a shapefile and use them as the subject?

Hi, pyclipper is only a wrapper for Angus Johnson's implementation of the Vatti's polygon clipping algorithm. How does your data look like? You need to have the points of the polygons available in the form of a python tuple, list or numpy array.

I have a polygon shapefile that represents the boundary of the city.

If you are able to extract the polygons from your file, it works (even with numpy arrays). However, this library does not support reading shapefiles, you will have to do this manually.
Please refer to the section how to use, it gives a good idea what this library does: https://github.com/fonttools/pyclipper#how-to-use


Source maps for honeybadger

https://docs.honeybadger.io/lib/javascript/guides/using-source-maps.html
That way we don't see "dist/index.js:300" as the source when there is a crash. We can see the actual code to know what is wrong.

I am not sure if (1) I can do this or (2) I need to.
I just now enabled inline source maps for babel. That could help. Also, the sourcemaps API for honeybadger assumes that you're building a web application since it requires you send a URL that points to the minified file.


This PR goes after https://github.com/0xPolygon/cdk/pull/4

I'm also running the nightly workflow against your branch to check everything works.
https://github.com/0xPolygon/kurtosis-cdk/actions/runs/10202819341

Applied feedback @leovct


Unclear order of 'vatu'

The description of 'vatu' says “For Indic script implementations that use the Vattu Variants feature, the application is expected to process this feature and certain other features in an appropriate order to obtain the correct set of basic forms: nukt, akhn, rphf, rkrf, pref, blwf, half, pstf, cjct.” That list does not include 'vatu', so the appropriate order is unclear.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: dd547c7a-0679-c1f5-9bd8-6e0249218aca
Version Independent ID: 38e91354-2503-9b0c-c0da-a0cd808e1e35
Content: Registered features, u-z - Typography
Content Source: typographydocs/opentype/spec/features_uz.md
Product: windows
GitHub Login: @PeterCon
Microsoft Alias: PeterCon

It would stretch the scope of the feature tag registry entries to specify in any greater detail an appropriate algorithm for shaping Indic text.
The wording is a bit odd, however, and will be revised in the next version.


wpa_supplicant starts before wlan interface is ready

Everytime after boot, wpa_supplicant doesn't work. The logs give the following hint:
-- Reboot --
Feb 19 10:23:22 c-cube systemd[1]: Started WPA Supplicant.
Feb 19 10:23:22 c-cube wpa_supplicant[409]: Successfully initialized wpa_supplicant
Feb 19 10:23:22 c-cube wpa_supplicant[409]: Could not read interface wlp2s0 flags: No such device
Feb 19 10:23:22 c-cube wpa_supplicant[409]: nl80211: Driver does not support authentication/association or connect commands
Feb 19 10:23:22 c-cube wpa_supplicant[409]: nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
Feb 19 10:23:22 c-cube wpa_supplicant[409]: Could not read interface wlp2s0 flags: No such device
Feb 19 10:23:22 c-cube wpa_supplicant[409]: Could not read interface wlp2s0 flags: No such device
Feb 19 10:23:22 c-cube wpa_supplicant[409]: WEXT: Could not set interface 'wlp2s0' UP
Feb 19 10:23:22 c-cube wpa_supplicant[409]: wlp2s0: Failed to initialize driver interface
Feb 19 10:23:22 c-cube systemd[1]: wpa_supplicant.service: Main process exited, code=exited, status=255/n/a
Feb 19 10:23:22 c-cube systemd[1]: wpa_supplicant.service: Unit entered failed state.
Feb 19 10:23:22 c-cube systemd[1]: wpa_supplicant.service: Failed with result 'exit-code'.

It works fine after running systemctl restart wpa_supplicant once the system is booted, though. Any ideas on how to fix this?

/cc @goblin Maintainer of wpa_supplicant nixos module

What versions are you running?
I always have a group of these:
Feb 19 22:34:39 nixus systemd[1]: Reached target All Network Interfaces.
Feb 19 22:34:39 nixus systemd[1]: Starting Networking Setup...
Feb 19 22:34:39 nixus systemd[1]: Starting DHCP Client...
Feb 19 22:34:39 nixus wpa_supplicant[642]: Successfully initialized wpa_supplicant

However, I am running latest unstable (nixpkgs-16.03pre76763.be0abb3). Have never had issues in the last few months.

@bennofs hm, I might have had problems with that in the past, but I'm definitely NOT a maintainer of any nixos module

@goblin You should remove this then: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/wpa_supplicant.nix#L160

Think you mean me, will have a look later today.

(amusing that a username mixup somehow ended up with another similarly named user who had experience with NixOS)

Should be fixed on master.

Thanks, I can confirm that the issue is fixed on master.

@globin looks like it's broken again on nixos-unstable, even with the changes from that commit.
~/nixos (master↑) sudo systemctl show wpa_supplicant | grep network
WantedBy=network.target
Before=shutdown.target network.target
After=sysinit.target network-interfaces.target systemd-journald.socket system.slice basic.target

@bennofs Can you look through your journalctl ? I just had something odd happening, where wpa_supplicant seemed unaware of the interface rename:
Mar 10 01:31:37 nixus wpa_supplicant[644]: Could not read interface wlan0 flags: No such device
Mar 10 01:31:37 nixus wpa_supplicant[644]: nl80211: Driver does not support authentication/association or connect commands
Mar 10 01:31:37 nixus wpa_supplicant[644]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Mar 10 01:31:37 nixus wpa_supplicant[644]: Could not read interface wlan0 flags: No such device
Mar 10 01:31:37 nixus wpa_supplicant[644]: Could not read interface wlan0 flags: No such device
Mar 10 01:31:37 nixus wpa_supplicant[644]: WEXT: Could not set interface 'wlan0' UP
Mar 10 01:31:37 nixus wpa_supplicant[644]: wlan0: Failed to initialize driver interface

I wonder if this is what happened to you.

No I'm still getting:
-- Reboot --
Mar 09 15:35:13 c-cube systemd[1]: Started WPA Supplicant.
Mar 09 15:35:13 c-cube wpa_supplicant[705]: Successfully initialized wpa_supplicant
Mar 09 15:35:13 c-cube wpa_supplicant[705]: Could not read interface wlp2s0 flags: No such device
Mar 09 15:35:13 c-cube wpa_supplicant[705]: nl80211: Driver does not support authentication/association or connect commands
Mar 09 15:35:13 c-cube wpa_supplicant[705]: nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
Mar 09 15:35:13 c-cube wpa_supplicant[705]: Could not read interface wlp2s0 flags: No such device
Mar 09 15:35:13 c-cube wpa_supplicant[705]: Could not read interface wlp2s0 flags: No such device
Mar 09 15:35:13 c-cube wpa_supplicant[705]: WEXT: Could not set interface 'wlp2s0' UP
Mar 09 15:35:13 c-cube wpa_supplicant[705]: wlp2s0: Failed to initialize driver interface
Mar 09 15:35:13 c-cube systemd[1]: wpa_supplicant.service: Main process exited, code=exited, status=255/n/a
Mar 09 15:35:13 c-cube systemd[1]: wpa_supplicant.service: Unit entered failed state.
Mar 09 15:35:13 c-cube systemd[1]: wpa_supplicant.service: Failed with result 'exit-code'.
Mar 09 15:35:49 c-cube systemd[1]: Stopped WPA Supplicant.
Mar 09 15:35:49 c-cube systemd[1]: Started WPA Supplicant.
Mar 09 15:35:49 c-cube wpa_supplicant[1658]: Successfully initialized wpa_supplicant

Odd, mine worked fine after a reboot

Fixed in 519673e.


After changing context lines to 0, increasing the context lines have no effect in search editor

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version:

$ code --version
1.63.2
899d46d82c4c95423fb7e10e68eba52050e30ba3
x64

OS Version:

$ uname -a
Darwin My-MacBook-Pro.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64

Steps to Reproduce:

Go to search tab. Click "Open new search editor"
Search some text.
Increase context lines to 2. It takes effect.
Decrease context lines to 0. It take effect.
Increase context lines to 2. It doesn't take effect.

I can see this too (in Insiders).  It is as if decrease the context lines value to 0 toggles off the context lines for some reason.

When the context line number decrease to zero, toggle button is unchecked. However if you increase the number again, the toggle button is not checked automatically which result in this issue.


TypeError: Cannot read property 'split' of undefined(…)

I am importing pug templates to use on the client and using pugify to and es2015 to compile. Starting yesterday I started getting the following error in the browser console:
Uncaught TypeError: Cannot read property 'split' of undefined(…)        core.js:23

I am honestly unsure what this has to do with pugify but it only happens when I try and use the transform.  I thought it had something to do with another package but isolated the issue to pugify by writing a new app that only writes a pug template to an HTML id.
Any help is appreciated as this seriously breaks my application.

This was a problem with browserify not pugify


Frontend as git submodule

In this PR, I made the frontend a Git submodule.
Git submodule - connecting one Git repository to another
About git submodules
To install the update you must delete the frontend folder, download the changes and run make install
I also added a command to the make that will update the submodule to the latest version. If you made changes to the frontend, you should run make update_frontend_submodule

Ah the famous git submodule never ending hole...
I think it's better to leave it segregated.
API is the main citizen here :)

Okay.


input styling

just curious, how come all inputs aren't styled? (at least for dark mode idk) i noticed that only [type = submit] is styled, so some things (eg: search bar) look out of place. is this on purpose? just wondering :-)

@mmattbtw There are definitely more than a few bugs. Feel free to throw up a PR!


NCA reports syntax error when NetworkPolicies have a status field (k8s v1.24 and later)

Starting from version 1.24, K8s NetworkPolicies have a status field. See here.
Not sure if NCA should look into this field (warn about failing netpols?), but at the very least, NCA should not report a syntax error.

Fixed


Troubles trying to make it work

I simply tried using the sample code on the readme (replacing urls of course), but I just get the following error:
apiRoot.$request is not a function
Any help would be appreciated. :-/

Could you console.log the apiRoot?

Wow, fast answer, was expecting to wait for hours :-)
Sure, looks like I get the common stuff from $http:
Object {}     catch: function (a)     error: function (a)     finally: function (a)     success: function (a)     then: function (b,f,h)     __proto__: Object

Which version are you on? v2.0.0-alpha.4?

I edited my last post with the ctrl code.
And I simply took the angular-hal.min.js from the git repo.

Ah, I see the error in my README.
Try this:
$http({url: 'http://localhost:8080/api-1.0/'})
  .then(function(apiRoot) {
    $rootScope.apiRoot = apiRoot;
  });

$rootScope.$watch('apiRoot', function(apiRoot){
    if (apiRoot != undefined) {
        $rootScope.dashboards = apiRoot.$request().$get('foo');
    }
});

Yeah, I spotted that too, and tried to assign in then, without really real success :(
{
	"data": {
		"_links": {
			"widgets": {
				"href": "http://localhost:8080/api-1.0/widgets{?page,size,sort}",
				"templated": true
			},
			"dashboards": {
				"href": "http://localhost:8080/api-1.0/dashboards{?page,size,sort}",
				"templated": true
			},
			"profile": {
				"href": "http://localhost:8080/api-1.0/profile"
			}
		}
	},
	"status": 200,
	"config": {
		"method": "GET",
		"transformRequest": [
			null
		],
		"transformResponse": [
			null
		],
		"url": "http://localhost:8080/api-1.0/",
		"headers": {
			"Accept": "application/hal+json, application/json, text/plain, */*"
		}
	},
	"statusText": "OK"
}

What Content-Type does your server send with the answer?

Content-Type:application/hal+json;charset=UTF-8

Looks like $http has been kept untouched.

I think I've implemented this line wrong:
https://github.com/LuvDaSun/angular-hal/blob/master/src/http-interception/resource-http-interceptor.factory.js#L52

WELL SPOTTED !
Something like this would be better ?
if (response.headers('Content-Type').indexOf(CONTENT_TYPE) > -1) { ... }

I think it would be good to integrate a library like this one:
https://www.npmjs.com/package/content-type

Not a bad idea indeed, since it's a pretty lightweight library.

Would you be interested to make a pull request for that?

You mean, to add the library and refactor angular-hal to work with it ?

Yes, exactly. And maybe also write a test for it.

Ok why not, you have to know that it will be my first time contributing, but I'm really glad to ! :-)

So, I've created a simple module + factory, but actually I'm just wondering 2 things:

No node modules folder, could you describe me how you would install the content-type lib ?
 If so, how do you proceed ?
Still not really used to testing. If you do some, I would appreciate, so that I can check what you did !

I quite simply "duplicated" url-generator module & factory to create that, so, no-brain. I wouldn't be surprised if you tell me it's total bull**** :p
As I said, first time contributing, not used to all this stuff, and I'm really happy to be able to learn & contribute :)


Remove htmx functionality

🗣 Description
HTMX is no longer needed.
💭 Motivation and context
No longer in use and presents potential vulnerabilities.
-->
✅ Pre-approval checklist

[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[x] All future TODOs are captured in issues, which are referenced
in code comments.
[x] All relevant type-of-change labels have been added.
[x] I have read the CONTRIBUTING document.
[x] These code changes follow cisagov code standards.
[x] All relevant repo and/or project documentation has been updated
to reflect the changes in this PR.
[x] Tests have been added and/or modified to cover the changes in this PR.
[x] All new and existing tests pass.

coverage: 26.288%. remained the same when pulling 35247cc04ff498f2960db6282297987803b5d4cc on AL-fix-htmlx-vuln into 14755187fbf5fb4af7c447c5cdd8b6cfdd4de576 on develop.

@dav3r This is ready for review.


View MP Formula Data

Definition of Ready

[x] Does this meet the INVEST criteria?
[x] Does this have a clearly defined user?
[x] Does this have an estimate?
[x] Does this have acceptance criteria?
[x] Does this have sufficient context (wireframes, business rules, etc.)?
[x] Is this traceable to a feature, epic, or PI?

User Story
As an ECMPS user, I want to view production MP Formula data so that I can look at real-time data.
Acceptance Criteria
Given a user selects Formula from the Sections dropdown
When the MP Formula data is displayed
Then the data is displayed in a single table (see list below for columns and order)
Formula ID
Parameter
Formula Code
Formula
Start Date
Start Time
End Date
End Time
Given a user is viewing MP Formula data
When the data is displayed in a table
Then the default sort order is alphanumeric descending by the contents in the 1st column
And the user will have the option to sort the columns in ascending or descending alphanumeric order

[x] The fields and their order specified

Pagination?

[ ] Yes
[x] No

Filter by keyword?

[ ] Yes
[x] No

Columns are sortable?

[x] Yes
[ ] No

Nested rows, expandable?

[ ] Yes
[x] No

Reporting Instructions (Page 62): https://ecmps.camdsupport.com/documents/ECMPS Monitoring Plan Reporting Instructions 2021 Q2.pdf
Testing
Test Case: TC390
Tester: @mosesdeeCVP
Definition of Done

[x] Have all Acceptance Criteria been agreed to and validated by the scrum team?
[x] Has the code been unit tested and peer reviewed?
[x] Have the functional tests been executed?
[x] Have all defects been reviewed and dispositioned, resolved, or deferred?
[x] Has the user story been accepted by the Product Owner?
[x] Is the user story ready to be deployed to the test/staging environments?

Test Passed


Visual studio will not run a project generated by the avalonia plugin

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Make a project using any avalonia template
Click run

Expected behavior
Program should run just fine
Screenshots

Desktop (please complete the following information):
Edition	Windows 10 Pro
Version	22H2
Installed on	7/6/2023
OS build	19045.2006
Experience	Windows Feature Experience Pack 120.2212.4180.0

dotnet 7 latest visual studio install

Additional context
None

it seems if i make Avalonia.Desktop my startup project it will work fine, perhaps this should be the default when clicking run?

it seems if i make Avalonia.Desktop my startup project it will work fine, perhaps this should be the default when clicking run?

Don't know if that is possible at all. Afaik it's controlled by your IDE. For example I guess VS always uses the first project found, unless it was changed by the user settings. @Takoooooo any idea on this ?
For now, let me move this thread under ideas section as it is not an Avalonia bug.


Blog post translation in Ukrainian

Translation of the recent blog post in Ukrainian along with minor localization improvements.

/area localization

/remove-language en

/approve

Hello folks
Thank you for your work on this PR.
Since this localisation is live with two reviewers and two approvers, I'd like to remind everyone involved that we recommend having an /approve and a /lgtm from separate people, if it is not a minor edit. Please could you ensure that future PRs follow this since there could be changes introduced unknowingly that break the website?
cc: @natalisucks @reylejano @seokho-son @a-mccarthy

we recommend having an /approve and a /lgtm from separate people, if it is not a minor edit

Just to be clear: that policy applies to any change that will publish to the live site if merged. It's not applicable to all PRs, but it does cover a huge portion of them.


Maintaining Plugin list

Its very useful to keep track of existing plugins may be in an xml. It can be used by gRPC too to load them.
Currently plugins.conf only holds name of the plugin. I think its more meaningful if it has brief description of each of them as below:
<plugin name="action" filename="libaction.so">
    <desc> Enables enables simple actions for a drone such as arming, taking off, and landing. </desc>
</plugin>
<plugin name="mission" filename="libmission.so">
    <desc> Enables waypoint missions with upload, download, etc capabilities </desc>
</plugin>
<plugin name="follow_me" filename="libfollow_me.so">
    <desc> Enables vehicle tracking of a specified target (typically a ground station carried by a user) </desc>
</plugin>
...

This list also serves as a technical advertisement of all supported features at once!

I believe that the DroneCore-Proto repo is now doing that, and I don't feel like we need to keep this as an open issue.


WdBrowser - Unexpected error on items with many instances

When searching for Q13442814 the following error occurs
'WikiDataBrowser' object has no attribute 'propertySelection'

Traceback (most recent call last):
  File "wd/wdbrowser.py", line 670, in selectItem
    await self.trulyTabularAnalysis(self.tt)
  File "wd/wdbrowser.py", line 480, in trulyTabularAnalysis
    if self.propertySelection is None:
AttributeError: 'WikiDataBrowser' object has no attribute 'propertySelection'

The issue emerges from this section:
https://github.com/WolfgangFahl/pyOnlineSpreadSheetEditing/blob/e265a6358cb29c1d2a038a2dfabd5086e0ad424f/wd/wdbrowser.py#L667-L672
The methods have all their own exception handling and also define properties for the following methods to use.
Thus, side effects occur of the case that expected properties are not defined.
await self.getCountQuery(self.tt),  #defines: ttcount
await self.getMostFrequentlyUsedProperties(self.tt),  #uses: ttcount | defines: ttquery,propertyQueryDisplay
await self.getPropertiesTable(self.tt, self.ttquery), #uses: ttquery  | defines: propertyList, propertySelection, ttTable
await self.trulyTabularAnalysis(self.tt) #uses: propertySelection

Resolved these side effects by removing the global exception handling within the methods and instead use more specific Exception handling such as:
try:
    self.propertyList=tt.sparql.queryAsListOfDicts(ttquery.query)
except EndPointInternalError as ex:
    if self.isTimeoutException(ex):
        raise Exception("Query timeout of the property table query")

With these fixes for the search Q13442814 we now get:

with wikidata:  Query timeout of the property table query
with qlever: QueryBadFormed [...] Tried to allocate 14029MB, but only 11362MB  were available. Clear the cache or allow more memory for QLever during startup

Thus, the Exception for items with many instances is not resolved but now the error messages indicate that the issue depends on the endpoints

The dependency and and possible side effects still need further investigation
e.g.
https://github.com/WolfgangFahl/pyOnlineSpreadSheetEditing/blob/8a19ba34c24cbeef7dcd04bfd07c46a0406244a8/wd/wdbrowser.py#L633-L637

this might be a motivation to work on our own endpoint especially since the Wikidata Workshop paper has been accepted.


RenderDoc causes application crash when using indexed geometry

I'm trying to use indexed geometry in my project but the screen is black. I tried to run it through RenderDoc to figure out the issue but the application crashes immediately when running through renderdoc. The last issue I filed only effected the 32bit path so this maybe the same. I'm seeing the following messages from the validation layers that don't appear when running outside of RenderDoc.
[]: DebugReport(Error): SPIR-V module not valid: OpStore Pointer  '62's type does not match Object  '63's type. 0
[]: DebugReport(Warn): Additional bits in Dest accessMask 0x5000 [VK_ACCESS_TRANSFER_WRITE_BIT | VK_ACCESS_HOST_WRITE_BIT] are specified when layout is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL. 0
[]: DebugReport(Warn): Additional bits in Source accessMask 0x5000 [VK_ACCESS_TRANSFER_WRITE_BIT | VK_ACCESS_HOST_WRITE_B
[]: DebugReport(Warn): vkGetSwapchainInfoKHR(0xa3, VK_SWAP_CHAIN_INFO_TYPE_PERSISTENT_IMAGES_KHR) returned mismatching data 27
[]: DebugReport(Error): Invalid Semaphore Object 0xddaa660000000d6 5
source: https://github.com/disks86/VK9
using RenderDoc v0.29
CPU: Intel i7
GPU: NVIDIA GeForce GTX 760

Can you try a recent nightly build? I wonder if this is fixed by 400c596894344066647f1cd5af9fc967013711ac. At the least you should update to the latest stable build, v0.29 is 6 months old by now.

I just tried the 11/22 nightly build. The messages are gone from the log but the application still crashes when run through RenderDoc. I did notice a new message however it's from a routine that shouldn't be called and doesn't show up when run stand-alone so I'm wondering if there is some memory corruption.

If you mean a routine on your side, is it perhaps to do with the minimal D3D9 support added to RenderDoc since v0.31? It doesn't do much but render an overlay at the moment, but it will end up hooked in between the application and your D3D9.dll shim, and maybe it calls some functions that your test program doesn't.

Yes, the method being called is related to swap chains which aren't fully supported. I'll look into the level of effort for implementing the method but if it's hooking D3d9 and Vulkan what will the output look like?

To be honest I don't know exactly, but I'd guess nothing good. Chances are it would be a toss-up which API actually gets captured.
I guess the best option would be rather than launching through renderdoc as normal, you load the dll manually after D3D9 has been initialised (so it isn't hooked). That way it should only hook Vulkan.
Or make a test harness where the application fetches the D3D9 functions from a VK9.dll instead of a 'fake' D3D9.dll, and use that while capturing.

I get (No API detected) if I start the sample application and then try to attach RenderDoc, presumably for the same reason it can't attach after the API has been initialized. Is there a way to turn off D3d9 support?

Yes you can't attach to any API after it's been initialised. What I meant was you could manually load it at the right time by loading the dll after D3D9 has been initialised but before you call vkCreateInstance. That should do the trick, as long as D3D9 isn't initialised multiple times or something and renderdoc sticks around. Or equivalently just set the ENABLE_VULKAN_RENDERDOC_CAPTURE=1 environment variable which will effectively do that for you.
The only way to turn of D3D9 support is to compile it out locally - either unload the d3d9 project, or #if 0 the code in d3d9_hooks.cpp, or something like that.

The d3d9 instance is what starts the vulkan instance but I was able to work around this with the In-application API. I load the renderdoc.dll if it's available and grab a pointer to the API immediately after I setup my logging and I use "Attach to a Running Instance" from the UI.


Upgrade macOS builds to Sonoma (14) and switch to arm64

Closes #287.

This change is

It's a thing of beauty :slightly_smiling_face:


Fix silent output bug

On some occasions I've found that Musician stops playing any notes.
As _breathDuration in Musician is not initialised at construction time, if the breath duration is not subsequently set with setBreath(), the duration may be some arbitrarily large number (whatever is in the uninitialised memory). In TimeBase::refresh(), we then subtract that large duration from every note, resulting in the note stopping (noSound()) almost as soon as it has started playing.
This PR ensures that _breathDuration is initialised to zero and, per best practice, also initialises all other variables in Musician and TimeBase to sensible defaults (in the case of TimeBase by calling its constructor in the initialiser list of Musician).
For tidiness, the unused member _value in HardwareBase is also removed, as are the unused members in Musician (these aren't needed, as the identically named private members in TimeBase are the ones that are actually used).

Thank you! Again, I will test those changes before merging them.
Maybe it is a good time for me to create an "Custom Musician" that would work with callack functions, like
musician.setOnNoteStartedCallback(function)
musician.setOnNoteStoppedCallback(function)
Those callback functions would have all the info needed from the current note and timing stuff.
Do you think it could be useful?

Maybe it is a good time for me to create an "Custom Musician" that would work with callack functions, like musician.setOnNoteStartedCallback(function) musician.setOnNoteStoppedCallback(function) Those callback functions would have all the info needed from the current note and timing stuff. Do you think it could be useful?

I don't know. I probably wouldn't have any use for it, as I'm using short melodies as alarms or notification sounds, so I'm happy just to set something playing and forget about it, and not worry about when each note is playing. Maybe there is another use case where those callbacks could be needed, though.


feat: Backport API changes to 4.10

What this PR does / why we need it: Backports the following PRs to enable v4.10 control planes to work with newer API fields:

https://github.com/openshift/hypershift/pull/1429
https://github.com/openshift/hypershift/pull/1463
https://github.com/openshift/hypershift/pull/1533
https://github.com/openshift/hypershift/pull/1631

This will enable 4.10 control planes to work without needing the conversion webhook.
Checklist

[x] Subject and description added to both, commit and PR.
[ ] Relevant issues have been referenced.
[ ] This change includes docs.
[ ] This change includes unit tests.

/retest

/approve
/area hypershift-operator


Use new types library.

No more Riak DT!

The structure for deltas has changed, so anywhere where "{delta, ..." is used, is going to be problematic.
ChristophersMBP:lasp cmeiklejohn$ grep -r "{delta, " src test
src/lasp_advertisement_counter.erl:                                      {ok, {_, _, _, Counter1}} = lasp:bind(Ad, {delta, Delta}),
src/lasp_advertisement_counter.erl:            {ok, {delta, Delta}} = lasp_type:update(CounterType, increment, Id, MergedCounter),
src/lasp_core.erl:-spec read_delta(id(), value(), store()) -> {ok, {delta, var()}}.
src/lasp_core.erl:            WDT = lists:append(Object#dv.waiting_delta_threads, [{delta, Self}]),
src/lasp_core.erl:bind(Id, {delta, Value}, MetadataFun, Store) ->
src/lasp_core.erl:                                                 {ok, {delta, {Id, Type, Metadata, Value}}}),
src/lasp_core.erl:                        {NewObject, {ok, {Id, Type, Metadata, {delta, Merged}}}};
src/lasp_core.erl:                        {Object, {ok, {Id, Type, Metadata, {delta, Merged}}}}
src/lasp_core.erl:             ({delta, {_, T, _, V}}) ->
src/lasp_core.erl:                  {ok, _} = BindFun(AccId, {delta, AccValue}, Store)
src/lasp_core.erl:reply_to_all([{delta, From}|T], StillWaiting, {ok, {delta, Value}}=Result) ->
src/lasp_core.erl:            gen_server:reply({Address, Ref}, {ok, {delta, Value}});
src/lasp_core.erl:                               {ok, undefined, {delta, Value}});
src/lasp_core.erl:            gen_server:reply({Address, Ref}, {ok, {delta, Value}});
src/lasp_plumtree_broadcast_distribution_backend.erl:                              {delta, MergedState} ->
src/lasp_plumtree_broadcast_distribution_backend.erl:                              {delta, MergedState} ->
src/lasp_plumtree_broadcast_distribution_backend.erl:    {delta, Deltas}.
src/lasp_process.erl:                    {delta, {_, _, _, V}} ->
src/lasp_process.erl:                        {delta, V}

I ported ad84eeb95e7bd884e111201963b2134b37db584b over, but I'm not convinced this is correct behavior.  Aren't we supposed to broadcast the delta immediately?  @vitorenesduarte @junghunyoo

@cmeiklejohn In the delta paper you don't broadcast immediately. You gossip delta-groups from time to time.

@vitorenesduarte OK, so that means 8f4c51b should be better, right?

@cmeiklejohn Yes,it makes sense.
I just ported that to the other branch,

What branch?

types_2.
Today I have classes, but tomorrow I'll try to finish those changes.

What are the differences between types_2 and this branch?

types_2 is a fork of this one, but I'm changing delta_mode to mode and the possible values instead of true and false are state_based, delta_based, pure_op_based.
Makes sense?

Sounds good.  What about the delta related functions that are broken in
types?
On Thu, May 19, 2016 at 2:22 PM Vitor Enes Duarte<EMAIL_ADDRESS>wrote:

types_2 is a fork of this one, but I'm changing delta_mode to mode
and the possible values instead of true and false are state_based,
delta_based, pure_op_based.
Makes sense?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/lasp-lang/lasp/pull/104#issuecomment-220308306

Still broken.
I'll try to solve it tomorrow (still figuring out the flow of things in Lasp).

Sounds good.  I think we can remove a lot of it.  Ping me on slack later and we can chat about it.


Moved documentation pages lead to 404s

Often when searching for Cilium documentation, you often find links for pages that have since been move, leading to hitting the 404 page with no clear indication on where to look.
When page moves occur, we should try to redirect to something relevant, if not an index page.
Example:

First documentation link when searching "cilium service mesh" is: https://docs.cilium.io/en/v1.12/network/servicemesh/index/

Hello @tommyp1ckles , I would like to pick this up
could you please suggest few resources to get me started with this or any other information

@measutosh Cilium uses readthedocs to configure these. If it's possible to configure this in a readthedocs configuration file in the repository, then we would be open to accepting PRs to add that configuration. I don't know if that's the case. Otherwise this may require someone from the project with advanced privileges to go through and configure it.

I've encountered this as well. It's quite unfortunate, because Google tends to link to older versions for some reason.
A couple of cases I ran into:

https://docs.cilium.io/en/v1.10/gettingstarted/egress-gateway/ should point to https://docs.cilium.io/en/v1.13/network/egress-gateway/
https://docs.cilium.io/en/v1.9/gettingstarted/kubeproxy-free/ should point to https://docs.cilium.io/en/v1.13/network/kubernetes/kubeproxy-free/

It's possible to do page redirects with ReadTheDocs: https://docs.readthedocs.io/en/stable/user-defined-redirects.html#id2
The tricky part here is that we would need to do the redirect starting from the first version where the page was moved onwards, but not for the versions before.

Oh, apparently readthedocs doesn't support setting redirects in config files and rather requires someone doing it manually through the web console, or alternatively using an API. See https://github.com/readthedocs/readthedocs.org/issues/2904 for more information.

The alternative mentioned in that issue I linked is to use GitHub Actions to sync the redirects. There's a template here: https://github.com/nextstrain/.github/blob/master/workflow-templates/sync-rtd-redirects.yaml, with instructions for creating the first redirects.yaml with the contents of the current redirects configured through the web console.


2.0.0: Raphael.fn, Functions grouped into namespace - bad context

I've just tried to upgrade library version in my own project, which extends Raphael basic functionality alot. Since there are many functions grouped into namespaces, no one of them works due to invalid context (namespace they defined in, not Paper).
There were no problems with version 1.5.2

I also got a similar problem. I've upgrade raphael2.0 in my project, which also includes mootools. Then I found problems occured,  "object does not support addEvents method" .But no problems with version 1.5.2.

Same issue here.
Also kills raphael.draggable.js ;(

Use this fix-method within any paper object you created:

Raphael.fn.fixNS = function(){
    var r = this;
    for (var ns_name in Raphael.fn) {
        var ns = Raphael.fn[ns_name];
        if (typeof ns == 'object') for (var fn in ns) {
            var f = ns[fn];
            ns[fn] = function(){ return f.apply(r, arguments); }
        }
    }
}

Just call it once after constructing "paper":

var paper = Raphael(0, 0, 300, 300);
paper.fixNS();

I hope Dmitry will fix broken context finally.


Verify checksum

The server does not verify that a checksum from the client for a record matches the record. We should compare with one generated on the server and error if they don't match.

We'll want to start enabling kafka based error codes. Like: CORRUPT_MESSAGE 2: This message has failed its CRC checksum, exceeds the valid size, or is otherwise corrupt.

Done, but will still need to handle error codes properly, but that should be another issue.


Droidmarking: resilient software watermarking for impeding android application repackaging

Paper link: http://dl.acm.org/citation.cfm?id=2642977

They used publicly available android apps for their evaluation from

F-Droid, Free and Open Source Software Apps for Android, 2014. https://f-droid.org/.


Add more default Prometheus histogram buckets for non-latency timer metrics like history_size

What changed?
Add more default Prometheus histogram buckets for non-latency timer metrics like history_size

Why?
The default buckets from tally won't work for Cadence's non-latency metrics
See more: https://github.com/uber/cadence/issues/4006

How did you test it?
Local test
# HELP history_count history_count histogram
# TYPE history_count histogram
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="5e-09"} 8
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="1e-08"} 20
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="5.0000000000000004e-08"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="1.0000000000000001e-07"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="1.0000000000000002e-06"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="1.0000000000000003e-05"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="5.000000000000001e-05"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.00020000000000000004"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.001"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.002"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.005"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.01"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.02"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.05"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.1"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.2"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="0.5"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="1"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="2"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="5"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="10"} 24
history_count_bucket{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count",le="+Inf"} 24
history_count_sum{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count"} 1.68e-07
history_count_count{cadence_service="cadence_history",domain="all",operation="ExecutionStats",stats_type="count"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="5e-09"} 8
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="1e-08"} 20
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="5.0000000000000004e-08"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="1.0000000000000001e-07"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="1.0000000000000002e-06"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="1.0000000000000003e-05"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="5.000000000000001e-05"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.00020000000000000004"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.001"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.002"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.005"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.01"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.02"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.05"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.1"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.2"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="0.5"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="1"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="2"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="5"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="10"} 24
history_count_bucket{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count",le="+Inf"} 24
history_count_sum{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count"} 1.68e-07
history_count_count{cadence_service="cadence_history",domain="samples_domain",operation="ExecutionStats",stats_type="count"} 24

Potential risks
No.

history_count_bucket{..., le="5.0000000000000004e-08"} 24

bleh.  is there a non-terrible way to improve that output?

history_count_bucket{..., le="5.0000000000000004e-08"} 24

bleh. is there a non-terrible way to improve that output?
it might just be due to division not producing an ideal value, i.e. there's a value that's closer to 5.0e-08.

My best guess is same. It doesn't seem to be an issue when I used it in Prometheus/Grafana.
There is a way to improve. The current output is not only terrible/silly, but also in-efficient. NanoSecond granularity is useless for latency metrics in Cadence. The minimum latency to Cassandra could be a few microseconds. Because of those additional buckets, all the latency metrics will be recorded and output in NanoSecond as well.
To improve this, we can change all the non-latency timer metrics to emit values with 1000 times of the current. That way we can remove the 4 buckets  under microSecond:
 		{Upper: 5 * OneOrNanoSecond},
		{Upper: 10 * OneOrNanoSecond},
		{Upper: 50 * OneOrNanoSecond},
		{Upper: 100 * OneOrNanoSecond},

However, this is a backward-incompatible change. All dashboards of non-latency timer metrics will need to divided by 1000 to get the correct values as before.
Although it's a breaking change, this should only impact Uber's Cadence clusters(because non-latency timer metrics are already broken for the community if they don't change the Prometheus timer type to Summary).
So if I would suggest Uber Cadence to make this change. M3QL supports this easily but just need to change all the dashboards and monitor for non-latency timer metrics.
cc @meiliang86 LMK what you think :D


Prepare ast for conversion to JSON

Remove variable related code since we are using EEx
Always return a list of modifiers (instead of the inner tuple for singletons)
Return annotations as a map instead of keyword list

Depends on https://github.com/liveview-native/live_view_native_stylesheet/pull/87

I think this PR is now invalidated by https://github.com/liveview-native/live_view_native_stylesheet/pull/89. It will handle the proper encoding of the AST. The internal representation does't need to change.
@NduatiK close?


Need clarification about closurization of local and top level functions.

All of the discussion in the language spec about closurization refers specifically to closurizing instance methods.  However, it appears that static methods, top level functions, and local functions are also allowed to be closurized, as illustrated by the test below, which passes on the VM, dart2js, and DDC:
import 'package:expect/expect.dart';
int f(int i) => i + 1;
class C {
  static int f(int i) => i + 2;
  int g(int i) => i + 3;
}
main() {
  int h(int i) => i + 4;
  int Function(int) func;
  func = f;
  Expect.equals(func(10), 11);
  func = C.f;
  Expect.equals(func(10), 12);
  func = new C().g;
  Expect.equals(func(10), 13);
  func = h;
  Expect.equals(func(10), 14);
}

In particular, the closurization of local functions seems to contradict the commentary text that says:

Closures derived from members via closurization are colloquially known as tear-offs.

The question arose in the code review of https://dart-review.googlesource.com/c/sdk/+/29744, which adds the ability for the front end to implicitly instantiate generic parameters when performing closurization of a method/function, e.g.:
import 'package:expect/expect.dart';
T f<T extends num>(T i) => i + 1;
class C {
  static T f<T extends num>(T i) => i + 2;
  T g<T extends num>(T i) => i + 3;
}
main() {
  T h<T extends num>(T i) => i + 4;
  int Function(int) func;
  func = f;
  Expect.equals(func(10), 11);
  func = C.f;
  Expect.equals(func(10), 12);
  func = new C().g;
  Expect.equals(func(10), 13);
  func = h;
  Expect.equals(func(10), 14);
}

It would be helpful to have clarification on the following questions:

Is it intended that closurization be possible with instance methods, static methods, top level functions, and local functions?  Or should some of the code in the first example lead to an error?
Is it intended that implicit instantiation of closurizations be possible with instance methods, static methods, top level functions, and local functions?  Or should some of the code in the second example lead to an error?
Is "tear-off" synonymous with "closurization" or does "tear-off" only refer to cases where a class member has been closurized?

CC: @leafpetersen @lrhn @kmillikin

The short answer is that my understanding is that yes, that test should pass.
For all of the syntactic constructs that you mention there, an escaping occurrence is allowed (but not required) to produce a value which has a different identity from the original thing, but is required to be equal to the original thing.  Tearoff is an odd name for it when it's not a method, and I wouldn't usually expect the non instance method uses to produce a new value at that site, but the spec allows it, as best I understand it.
All of those places are also the places where we intend to allow inference to fill in a partial instantiation.  The reasoning is that partial instantiation also changes the identity, and so limiting it to "closurization" sites avoids surprising users with an unexpected and syntactically invisible change in identity (or at least, not more unexpected and syntactically invisible than it already was).
At least, that's my understanding of it, from discussions with various folks, and I believe that's the intent of the spec.

I agree that the test should pass.
The specification says, about the identifier expression e denoting a declaration d:

• If d is a static method, top-level function or local function then e evaluates to the function defined by d.

And about getter access:

If method lookup succeeds then i evaluates to the closurization of method f on object o
(16.18.7)

A static function declaration (class-scoped or top-level) always has the same run-time-scope, so no matter how many times you closurize it, the resulting function will do the same thing. For that reason, we treat static methods as compile-time constants and canonicalize their function values. The spec is explict about that - you get identical function values when you refer to a static function multiple times.
I'm don't remember where the spec says what the equality is of the function values of local function declarations (or if it says anything at all). A quick check suggests that implementations, at least VM and dart2js, also canonicalizes the function values of local function declarations per run-time scope.
That is:
main() {
  foo() {}
  print(identical(foo, foo)); // prints "true".
}

Instance methods don't live in a run-time scope, but they do close over this, so they are equivalent (==) if it's the same method torn from the same object. We could go for identity here too, but that would require caching per instance, so we don't. (Static functions only requires one cache cell per function, and it's statically detectable whether it's necessary, and for local functions, it's very locally  detectable whether the function value is used or not).
I also agree that instantiating a generic function should work the same no matter where the generic function comes from, as long as you refer to a function declaration. We do not expect the following to work:
T Function<T>(T) id = <T>(T x) => x;
int Function(int) add0 = id;

Here the assignment of a generic function to an instantiated type isn't referencing a function declaration, just a variable holding a function value.

I don't agree that the existing spec is actually clear about this.  It defines functions as various bits of syntax:

Functions include function declarations (9.1), methods (10.1, 10.7), getters (10.2), setters (10.3), constructors (10.6) and function literals (16.10).

Then the spec refers to functions as if they were objects in ways that don't make sense at all if we interpret them as syntax.  I have always read these latter references to mean some kind of value that represents a syntactic function in a context.  There is wiggle room in what that value is.
None of the implementations are really canonicalizing anything.  They're just treating the local function declaration as if it were:
main() {
  final foo = () {};
  print(identical(foo, foo));
}

With different scope rules for the right-hand side of the variable declaration so that foo is in scope there.  I mean, this is canonicalized in a sense, but not by creating a tear-off at the first occurrence of foo and remembering it to make sure to use it again.  Nothing at all happens at the uses of foo except a variable reference.
Inspecting the code of dart2js, DDC, and the VM shows that they currently handle local functions uniformly with function-valued local variables.

cc @rakudrama
Stephen feels that it would be easier to implement this if we didn't allow partial instantiations of .call, so that not all functions need to support partial instantiation.
I'm fine with this restriction, we can always relax it later if desired.

For context DDC supports partial instantiation of any generic function typed thing.  We (the language team) agreed to restrict this to places where there was already an implicit change in identity (or at least, where an implicit change in identity was already allowed). My understanding (possibly incorrect) was that the places where an implicit change in identity is allowed by the spec are:

closurization of methods
escaping occurrences of top level functions
escaping occurrences of static methods
escaping occurrences of method local functions

Is the disagreement about which of the above already (in Dart 1.0) admit (but not require) a change in identity?
I'm happy to drop local functions from the list of allowed partial instantiations, I don't think it's very useful.  Eliminating any of the others would be fairly unfortunate.
In general, it's quite convenient to be able to use polymorphic functions monomorphically.

I'm not sure what "partial instantiation of .call" means here.
Is it:
class Id {
   T call<T>(T x) => x;
}
main() {
  var idder = new Id();
  int Function(int) intId = idder;  // and not: `= idder.call`
}

If we say that callable objects are not functions, but assignment to a function type is equivalent to a tear-off of the call method, then it should be equivalent to  = idder.call, and that is a tear-off.
Or is the problem with the implicit call method on function values, so you can do:
T Function<T>(T) id = <T>(T x) => x;
int Function(int) intId = id.call;

That allows partial instantiation of any function, not just function declarations.
Whatever we do, we should be consistent.
If we allow other instance methods to be instantiated at tear-off, then we should allow it for the instance method named call too.
If we say that function values have a call method, then it should work for that too.
My personal preference is to make call an operator, so we don't get into these silly problems to begin with, but barring that, maybe say that function values do not have a call method. Functions values is a thing in their own, and the spec will tell you how to invoke them, not say that method invocation is the only kind of invocation, and every other invocation is an implicit invocation of a (possibly synthetic) call method.

closurization of methods
escaping occurrences of top level functions
escaping occurrences of static methods
escaping occurrences of method local functions

Is the disagreement about which of the above already (in Dart 1.0) admit (but not require) a change in identity?

"Change in identity" is not how I would phrase it.
Instance methods do not have identity separate from the object they are on. They only gain identity when being torn off. We chose not to canonicalize them, just ensure equality if you tear the same method of the same object twice.
Top-level function and static functions do not "change identity" because for each, there is only one object representing them. You can say that it's a place where you go from function declaration to function value. We do canonicalize - the same static/top-level function declaration referred to twice gives the same object, so there is no difference in identity. (The specification actually doesn't say that, it's just something we "knew").
Local functions are treated like top-level functions, except it's a different function declaration each time its surrounding scope is entered (since that changes the variables it closes over). This is not specified anywhere, but we probably want to keep it that way.
So, all of these are situations where a function declaration is referred to and it creates a function value. The value-identity of these values is not really important, it's the declaration-to-value, or name-to-value, transition that is common to them, and why we want those places as generic partial instantiation points. It's something you do to a name. The alternative is to do it to a value, and then it should work on all generic function values.

Or is the problem with the implicit call method on function values, so you can do:

yes, I believe this is what @rakudrama was concerned about: every function value needs to be support partial instantiation.

My personal preference is to make call an operator, so we don't get into these silly problems to begin with, but barring that, maybe say that function values do not have a call method.

I'd be very happy to get rid of call methods on functions, but suspect that we don't have budget for this.  There's some code somewhere that uses .call on a dynamic thing which includes function objects.

"Change in identity" is not how I would phrase it.

It may not be how you'd phrase it, but I think it's how you just described it.  @floitschG was the one who initially proposed this restriction, so you could ask him for his perspective, but based on your description above, I believe that the following captures the spec requirements:
class A {
  void method() {}
}
void global() {};
void test() {
  void local() {}
  var a = new A();
  // Either answer is spec compliant
  assert(identical(global, global) || !identical(global, global));
  assert(identical(local, local) || !identical(local, local));
  assert(identical(a.method, a.method) || !identical(a.method, a.method));
  var closure = () {};
  // Must be identical
  assert(identical(closure, closure));
}

The motivation that was presented to me for restricting partial instantiations to the first set of cases (plus static methods, I didn't put them in there) was that the spec already didn't specify identity for those cases.

I don't like an operational semantics that cares about declarations because declarations are not first class.
This code:
test() {
  T id<T>(T x) => x;
  return () {
    int Function(int) f = id;
    String Function(String) g = id;
    // ...
  };
}

looks like the nested function has a free variable of type T Function<T>(T) and a programmer would (reasonably) expect that they could define a helper function like:
help(T id<T>(T)) {
  int Function(int) f = id;
  String Function(String) g = id;
  // ...
}

test() {
  T id<T>(T x) => x;
  return help(id);
}

but that doesn't seem to work.

I don't like an operational semantics that cares about declarations because declarations are not first class.

I don't particularly care for it either (hence the initial DDC implementation not making this restriction :), but Dart 1.0 already seemed to care:
void foo() {}
void main() {
  // My understanding is that either answer is Dart 1.0 spec compliant
  assert(identical(foo, foo) || !identical(foo, foo));
  var f = foo;
  // This identity must hold
  assert(identical(f, f));
}

So I believe the argument was that making this restriction would make the change in identity less surprising moving from Dart 1.0 to 2.0.

void foo() {}
void main() {
  // My understanding is that either answer is Dart 1.0 spec compliant
  assert(identical(foo, foo) || !identical(foo, foo));
}

It was decided at some point that identical(foo, foo) must be true. The foo is a compile-time constant, and even if the specification did not (and does not) say that it's canonicalized, we did decide that it is (and we should make sure the Dart 2 spec says so too).

It was decided at some point that identical(foo, foo) must be true.

Ah, well then, I don't have anything else.  :)
Is the following then what is intended, or should local functions also move down to the "must be identical" category?
class A {
  void method() {}
  static void staticMethod() {}
}
void global() {};
void test() {
  void local() {}
  var a = new A();
  // Either answer is spec compliant
  assert(identical(local, local) || !identical(local, local));
  assert(identical(a.method, a.method) || !identical(a.method, a.method));
  var closure = () {};
  // Must be identical
  assert(identical(A.staticMethod, A.staticMethod)); // ??
  assert(identical(global, global));
  assert(identical(closure, closure));
}

The guiding principle was to canonicalize where possible, but never in a way that would require unlimited caching when there is no local way to detect whether it's necessary.
That means that dereferencing static functions (top-level or class-level static) should always give the same result. That requires at most one value cache per source location.
We specifically did not require instance methods to give identical values for separate tear-offs. That would require a cache entry per instance, which is theoretically unbounded.
The closure above is trivial, it's a value stored in a variable. All values are identical to themselves.
That leaves just the local function, which I don't think we considered at the time.
I would say that we should make dereferencing a local function return identical values every time it's done (per instance of the scope that the function is declared in). It seems like it would require unbounded caching again, but it's statically detectable whether the function is ever accessed as a value (more than once), and it's possible to do a local rewrite of the function into:
void foo() { ... }
var $foo = foo;

or
var foo = () { ... };  // if not a recursive function, otherwise separate decl and assignment.

and make all value-accesses to foo use $foo instead. That's the code I would write anyway, if the language doesn't promise canonicalization, I'll have to start writing the code when I dereference a function more than once (and I already did because we haven't promised it).
So, to help users, all value-accesses to function declarations should "canonicalize", tear-offs of instance methods should create == function values, and closure expressions generate a completely new function every time (because a function expression is only evaluated once in the scope it's in).

cc @crelier @sjindel-google

I've created a dartLangSpec.tex CL for clarifying that tear-offs are supported for all kinds of functions, not just instance methods. This should not be controversial, and implementations have been doing this "forever" anyway. There was even an old comment in dartLangSpec.tex whose wording does not make sense without this feature, so obviously that has been intended to work all the time.
The generic part is more controversial. Samir told me that generic function instantiation (where type arguments are passed and the result is a non-generic function that will still accept all the value arguments) cannot readily be supported for all kinds of functions. In particular, the VM approach will work just fine for generic function instantiation on instance methods, and it may work on global and static functions, but it does not work well on local functions.
We may wish to push on and simply say "this must work, but it's not yet implemented", or we may decide that Dart simply does not support all cases. That discussion can go to the comment track of an upcoming CL where I'm adding a new feature spec on generic function instantiation.

Thanks for the update. Please keep us posted on the progress of the upcoming CL.
Let's remember that the source-to-source translation will also be non-modular in the sense that it will require copying the default values from the callee into the wrapper function.

This should not be controversial, and implementations have been doing this "forever" anyway.

It is somewhat controversial, because as I said above a few times, implementations have not been doing this at all.  None of them.
What all the implementations have implemented: local function declarations introduce a binding from the name to a function value.  Evaluating an identifier in a scope where it is the name of a local function works exactly the same as evaluating an identifier in a scope where it is the name of a local variable.  It's just looked up in some environment.
Your CL introduces the idea of closurization of a declaration.  This is new (before we only had closurization of methods) and is not currently done in any implementation.  If we want to go down this path (I hope we don't) we have to define closurization of a declaration.  We'll need some new machinery for this because we can't just say it's as if the programmer wrote a function expression.
(Specifically, I don't think you can say that the closurization of the function declaration f() {} is equivalent to () => f() because the evaluation of the call to f in there is defined to evaluate f which is now defined to closurize the declaration of f which is equivalent to () => f()....)

implementations have not been doing this at all. None of them.

I was referring to the ability to evaluate a reference to a global/static/local function and obtain a function object which could subsequently be passed around (assigned to variables, etc) and invoked, e.g.,
import 'package:expect/expect.dart';
int f(int i) => i + 1;
class C {
  static int f(int i) => i + 2;
}
main() {
  int h(int i) => i + 4;
  int Function(int) func;
  func = f;
  Expect.equals(func(10), 11);
  func = C.f;
  Expect.equals(func(10), 12);
  func = h;
  Expect.equals(func(10), 14);
}

Do we have an implementation that does not support this? I thought you already verified that it works everywhere.

What all the implementations have implemented: local function
declarations introduce a binding from the name to a function value

OK, so let's consider locals in particular.
It sounds like void f() => print('x'); would be specified to work like void Function() f = () => print('x');. But I would consider that to be a perfectly legitimate implementation choice. With this implementation, evaluation of f would amount to a local variable read operation, and that variable holds the value which is obtained from evaluation of a function literal, and that evaluation amounts to a closurization (of an inline declaration, which is the function literal itself). So it's a matter of allowing implementations to pre-compute and cache the closurization, it doesn't magically remove the need for a closurization of a declaration in the first place. Also, I don't see how that would conflict with the spec (including the CL).
So the semantics you describe is a perfectly legitimate way to implement the spec (relative to what I intended to specify — if the spec actually says something else then I'd need to fix it).
However, an implementation could also do "lambda lifting" on local functions to make them global, and then pass more arguments at call sites (maybe some variables in the environment aren't used anyway, or maybe we could use some kind of block move to set up a bunch of arguments to that lambda-lifted function more quickly than regular argument passing), and then we might get better performance by not having a heap representation at all for local functions that aren't used as first class values.
So I'd say that it is not an obviously good idea to specify local functions in terms of the expansion to a local variable, because that would (probably) preclude some optimizations.
For other functions than local ones, we'd need to specify a similar operation, for instance:
// Surface level declarations can declare functions.
void foo(int i) => print(i);

// Semantically, we would say that this declaration is just sugar for the
// following variable declaration, such that the function object is always
// available.
const void Function(int) foo = (int i) => print(i);

We would have to require the value to be const in order to support the same constant expressions as today, so we would need to introduce function literals as const values (which has been discussed many times, but never landed).
We might need to resolve some conflicts between the constness and the need to create cycles (for mutually recursive functions), too.
In any case, we have then again reduced one kind of function declaration to a variable and a function literal, so we still need to specify closurization of at least one kind of declaration, namely function literals.
I suspect that we might still get some problems if we insist that every function declaration (except instance methods) is just sugar for a variable and a function literal. In particular, we would rely on type inference which gives preference to the type-from-context in order to give those function literals the declared return type at all, and this means that we cannot really say anything about it in today's language specification (and it seems overly complex to re-establish the return type like that, if we could easily specify a sufficiently precise semantics for closurization of all kinds of function declarations).

I've created a proposal for a new feature specification about the generic parts of the topics of this issue, complementing the CL about tear-offs which updates dartLangSpec.tex to support the non-generic parts.
I'm currently adding a missing part to the feature specification: It needs to say that generic function instantiation is supported for instance methods.

Note that I've modified the feature spec of generic function instantiation to specify that local functions are supported as well. Some reasons for that change are given in a comment on patch set 15.


JUL - Logging should be zero-conf for most users.

JUL java.util.logging should be zero configuration for most users.
Work on all platforms: GAE Std 7 / GAE Std 8 / Flex / GKE / GCE / Dataproc / Dataflow without modification.
See #1130 for fluentd support as well. (in GAE Flex env)

I've asked @jabubake to help you with this.

Also it doesn't buffer in most cases; work in a fluentd environment; etc.

@lesv Can you edit the title to be in command form instead of problem-description form?

I can't quite tell from the description what needs to be done.

FYI, @meltsufin and team have worked on JUL support for App Engine Flex.
https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-logging/src/main/java/com/google/cloud/logging/GaeFlexLoggingEnhancer.java

Fluentd support needs to be better understood and scoped,  JUL is now auto-configured on GCE, GKE, Flex, Standard. Will be tracked separately in #1130


Brightness Up + Down Don't work In Yosemite

Currently using a Das Keyboard 4 in Yosemite with Karabiner 10.5.0.  I can't seem to get the F1 & F2 (or any key for that matter) to map to Brightness Up and Down.
What's interesting is, out of the box, Scroll Lock and Pause/Break map to Brightness Up/Down respectively.  When using the EventViewer, these keypresses don't show any events out of the box.
However, if I map Pause/Break to eject or power, the mapping seems to be correct.  They still don't show in the Event Viewer though.

After finding your debug documentation I realized why the brightness up/down didn't show up in the EventViewer.  Debugging I found that the hex codes were 0x006b and 0x0071.  A simple mapping in private.xml worked.
For anyone who may have this exact issue, here's the following.
<?xml version="1.0"?>
<root>
  <list>

    <item>
      <name>Remap Brightness Keys</name>
      <appendix>Darker, Brighter</appendix>
      <identifier>remap.brightnesskeys</identifier>
      <autogen>--KeyToKey-- KeyCode::F1, KeyCode::RawValue::0x006b</autogen>
      <autogen>--KeyToKey-- KeyCode::F2, KeyCode::RawValue::0x0071</autogen>
    </item>

  </list>
</root>

@RichardD012 thx!! it's work for me!!

Just a followup, this XML (with the ModifierFlag) works better for me since it allows me to use my remapped Fn key to get actual F1 and F2 events. Thanks for the original XML!
<?xml version="1.0"?>
<root>
  <list>
    <item>
      <name>Remap Brightness Keys</name>
      <appendix>Darker, Brighter</appendix>
      <identifier>remap.brightnesskeys</identifier>
      <autogen>--KeyToKey-- KeyCode::F1, ModifierFlag::NONE, KeyCode::RawValue::0x006b</autogen>
      <autogen>--KeyToKey-- KeyCode::F2, ModifierFlag::NONE, KeyCode::RawValue::0x0071</autogen>
    </item>
  </list>
</root>


refact: io.mount => runtime.mount

Signed-off-by: Keming<EMAIL_ADDRESS>
related to https://github.com/tensorchord/envd/pull/861

/approve /lgtm


connected with a real drone problem

hi
I set up a mavsdk environment on the server and tested it using jmavsim. Everything work fine
But when I connected the real drone to Mavsdk, Some functions can be used normally, such as
System drone = new System ( "<IP_ADDRESS>" , 50041 ) ;
drone.getTelemetry().getFlightMode().subscribe(flightMode -> logger.info("Flight mode: " + flightMode));
It can return the flightmode data correctly, but most functions such as
drone.getAction ( ).arm ( ) or
drone.getTelemetry ( ).getBattery ( )
do not provide any feedback. The server will output content similar to the following:
[09:49:05|Info ] MAVSDK version: v2.11.0 (mavsdk_impl.cpp:26)
[09:49:05|Info ] Waiting to discover system on udp://:14552... (connection_initiator.h:20)
[09:50:20|Info ] New system on: <IP_ADDRESS>:48334 (with system ID: 1) (udp_connection.cpp:199)
[09:50:20|Debug] New system ID: 1 Comp ID: 1 (mavsdk_impl.cpp:720)
[09:50:20|Debug] Component Autopilot (1) added. (system_impl.cpp:366)
[09:50:20|Warn ] Vehicle type changed (new type: 2, old type: 0) (system_impl.cpp:217)
[09:50:20|Debug] Discovered 1 component(s) (system_impl.cpp:509)
[09:50:20|Info ] System discovered (connection_initiator.h:62)
[09:50:20|Info ] Server started (grpc_server.cpp:169)
[09:50:20|Info ] Server set to listen on <IP_ADDRESS>:50042 (grpc_server.cpp:170)
[09:50:21|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:50:21|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)
[09:50:22|Debug] MAVLink: info: u-blox 1 HW: 00080000 SW: EXT CORE 3.01 (107900) (system_impl.cpp:243)
[09:50:51|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:50:51|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)
[09:51:17|Warn ] sending again after 0.502024 s, retries to do: 3 (512). (mavlink_command_sender.cpp:320)
[09:51:17|Warn ] Request was for msg ID: 242 (mavlink_command_sender.cpp:326)
[09:51:18|Warn ] sending again, retries to do: 5 (mavlink_parameter_client.cpp:1057)
[09:51:21|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:51:21|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)
[09:51:51|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:51:51|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)
[09:52:13|Warn ] sending again after 0.501734 s, retries to do: 3 (512). (mavlink_command_sender.cpp:320)
[09:52:13|Warn ] Request was for msg ID: 242 (mavlink_command_sender.cpp:326)
[09:52:21|Warn ] sending again after 0.51101 s, retries to do: 3 (512). (mavlink_command_sender.cpp:320)
[09:52:21|Warn ] Request was for msg ID: 242 (mavlink_command_sender.cpp:326)
[09:52:21|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:52:21|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)
[09:52:50|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:52:50|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)
[09:53:20|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:53:20|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)
[09:53:50|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:53:50|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)
[09:54:20|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:54:20|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)
May I ask where the problem occurred? and how to fix it.

[09:50:21|Debug] MAVLink: critical: PreArm: Throttle below Failsafe (system_impl.cpp:243)
[09:50:21|Debug] MAVLink: critical: PreArm: Hardware safety switch (system_impl.cpp:243)

This suggests that the arm command reaches the autopilot, and the autopilot refuses to arm (because of the throttle). Are you sure that MAVSDK doesn't return an error there? How do you actually call it (drone.getAction().arm() won't call it, you have to subscribe at some point).
For the telemetry, are you sure that your drone is sending those updates? E.g. does QGC receive them?

Duplicate of https://github.com/mavlink/MAVSDK-Java/issues/174


Fix bug when using frost-text with type=number

This project uses semver, please check the scope of this pr:

[x] #patch# - backwards-compatible bug fix
[ ] #minor# - adding functionality in a backwards-compatible manner
[ ] #major# - incompatible API change

CHANGELOG

Fixed bug when trying to use frost-text with type="number". The error that was occurring was:
Uncaught DOMException: Failed to set the 'selectionDirection' property on 'HTMLInputElement': The input element's type ('number') does not support selection.

Changes Unknown when pulling 2ab510a6790907aacfb7e8a8b7c616410819d0fe on sandersky:master into ** on ciena-frost:master**.

Changes Unknown when pulling 2ab510a6790907aacfb7e8a8b7c616410819d0fe on sandersky:master into ** on ciena-frost:master**.

Approved


MT.1032: Limited number of Global Admins are assigned. Detecting deleted GA accounts

Running Maester against one of my tenants, it fails MT.1032, stating that there are too many GA accounts assigned. 2 of the accounts listed do not exist, and haven't done for at least 12 months.
Troubleshooting steps attempted so far:
Running (Test-MtPimAlertsExists -AlertId "TooManyGlobalAdminsAssignedToTenantAlert").additionalData and finding the userID, then running Get-MgUser -UserId $userIdFromAdditionalData confirms that the user doesn't exist.
Going to cmd.ms/enpim > Microsoft Entra Roles > Alerts confirms that the alert is currently shown as not active.
Running Test-MtPimAlertsExists -AlertId "TooManyGlobalAdminsAssignedToTenantAlert" shows numberOfAffectedItems: 6, but checking global admin eligible & active assignments reveals only 4.
Disabled the alert in PIM, waiting 60 mins, re-enabled alert, ran Clear-MtGraphCache, re-ran Maester, test fails.
Not really sure what else to test, but happy to try and assist if I can.

Thanks for the feedback, @apuleston . Would it be possible for you to share the full results of Test-MtPimAlertsExists -AlertId "TooManyGlobalAdminsAssignedToTenantAlert") after the PIM test has been re-enabled?

No problem at all:
id                    : TooManyGlobalAdminsAssignedToTenantAlert
resourceId            : <redacted>
alertName             : There are too many global administrators
alertDescription      : The percentage of global administrators is high, relative to other privileged roles. It is recommended to use least privileged roles,
                        with just enough privileges to perform the required tasks.
numberOfAffectedItems : 6
lastModifiedDateTime  : 9/4/2023 10:34:25 AM
lastScannedDateTime   : 5/2/2024 9:14:52 PM
severityLevel         : Low
alertType             : Vulnerability
securityImpact        : Global administrator is the highest privileged role. If a Global Administrator is compromised, the attacker gains access to all of their
                        permissions, which puts your whole system at risk.
mitigationSteps       : ·Review the users in the list and remove any that do not absolutely need the Global Administrator role.
                        ·Assign lower privileged roles to these users instead.
howToPrevent          : Assign users the least privileged role they need.
isDisabled            : False
isActive              : False
isResolvable          : True
isConfigurable        : True
status                : Inactive
additionalData<EMAIL_ADDRESS>@{item=System.Object[]}, @{item=System.Object[]}, @{item=System.Object[]}…}
settings              : {@{key=ThresholdNumberOfGlobalAdmin; value=3}, @{key=ThresholdPercentageOfGlobalAdminsOutOfRoles; value=10}}

I expect my understanding of the test logic is wrong here, but would this be addressed by changing the test to check if the alert is active?
What that doesn't answer for me is why the maester report, and the PIM alert shows 2 accounts that are long gone.

This is popping up in my report as well but in my case the accounts exist but are no longer assigned Global Admin (a couple I would be surprised if they were ever global admin).

@sofbkeller : The issue should be fixed with the latest release. Do you can confirm that previous (deactivated) PIM alerts are not shown anymore?


Call return error

Codecov Report

Merging #88 into master will increase coverage by 0.41%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master      #88      +/-   ##
==========================================
+ Coverage   98.44%   98.86%   +0.41%
==========================================
  Files          13       13
  Lines         708      703       -5
  Branches      172      171       -1
==========================================
- Hits          697      695       -2
+ Misses         11        8       -3

Impacted Files
Coverage Δ

src/extend/accounts.ts
100% <100%> (ø)
:arrow_up:

src/provider/rpc-methods.ts
99.29% <80%> (+2.05%)
: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 a195824...0c03fef. Read the comment docs.