Heatmap: unexpected behavior

Discussed in https://github.com/ScottPlot/ScottPlot/discussions/2187

Originally posted by dhgigisoave October 20, 2022
HeatMap.txt
Hi
I have two strange effect on a heatmap: I attached the matrix that contains the values send to it.
In line 29 I have a few consecutive values that represent the maximum in the entire serie (94,7).
In the heatmap that values are represented with black pixel (as values under threshold).
I think that the problem is related to colorbar, since if I change the color bar (this is the second strange problem) and I increase the steps, the heatmap plot is wrong because the yellow areas should become green, while if I decrease the steps the plot is correct.
In the first image attached you can see the initial situation, in the second I increased the steps, in the third I descreased it.

Hi,
Any news on this issue?
  I saw in this moment that the graphics that I posted are relative to another data serie. Anyway the problem is there also with those data (in the first yellow bar at the left and in other segments).
Please note that I suspect that the problem comes from the definition of colobar, if you try to reduce the number of color can you see the right color in the map? (the definition of areas are probably correct, but the colors is not)
Luigi

I tried with 4.1.59 and still I see the problem of black pixel, but it seems fixed the problem of reduced color gamma.
Maybe this can help.

Anyway the problem is there also with those data

Hi @dhgigisoave, I think I am not understanding this issue well. You see the problem in my screenshot? Can you indicate with an arrow where the problem is? I am happy to continue working on this, but I want to make sure I understand what the issue is and right now I am somewhat confused because the chart looks good to me 😅
If another dataset helps demonstrate the problem better, that may be useful to share so we can more easily recognize when we have fixed the problem
Thanks for your input!

No, in your screenshot there isn't the problem.
I thought that is related to colorbar, because I observed the other (worst) problem, but with 4.1.59, in my case, the other problem is disappeared, but remains the black pixel, that you don't see. Maybe I do something wrong but i have not idea where it could be: data is which I sent you.
Since the problem of wrong color are fixed, I retry to investigate my code, maybe I can found the source.
In case I reopen the issue with new information.
Thank you
Luigi

Sorry, I'm here again...
I found where are the bugs.
Black pixels: my mistake
Wrong color when I change the size of map classes.
I created a colorbar that has a max value greater of max value in the data set: max data = 94.7, max color bar = 120, size of classes = 20.
IColormap.GetRGB send to me a value that is proportional to max color if max data is equals to max color, but that is not the case.
So I return the last class for the max data, but it is wrong: last class should never be returned.
Thank you
Luigi

No worries! Figuring out how to reliable reproduce issues is sometimes more difficult than solving the issue itself. Thanks for following-up! 🚀
Best,
Scott

Hi,
Maybe I didn't explain well the situation.
In the last message I separate 2 questions, the first was clearly a my mistake, but in the second I really need to manage a colorbar like that, then I expect that if call IColormap.GetRGB (in the example before) with 94, I don't get the max color, but the color proportional at the value.
Thank you
Luigi

Hi @dhgigisoave,

IColormap.GetRGB (in the example before) with 94, I don't get the max color, but the color proportional at the value

If you call GetRGB(94) it treats 94 as a byte (0-255) and returns a color that is near the bottom of the colormap (94/255 = 37%)
If you call GetRGB(0.94) it treats 0.94 as a double (0-1) and returns a color that is near the top of the colormap (94%)
Does this information help solve your problem?

Yes this is clear, maybe I don't understand but if my maximum value is 70 and I define a custom color bar from 20 to 140, in GetRGB I can't get argument = 255 (how happens in my case), but I expected that maximum value as GetRGB argument was about 130.
Where I get wrong?
Luigi

Hi @dhgigisoave, I don't think I understand your remaining question. I also can't execute the code you sent me because it is not complete.
Here is a complete working program which may be helpful.
ScottPlot.Plot plt = new(400, 300);

// create a custom colormap to convert pixel brightness (0-255) to color (r,g,b)
ScottPlot.Drawing.IColormap cmapLogic = new CustomColorMap();
ScottPlot.Drawing.Colormap cmap = new(cmapLogic);

// add a colorbar to the plot using the custom colormap
var cbar = plt.AddColorbar(cmap);
cbar.MinValue= 20;
cbar.MaxValue = 140;

// add a heatmap containing random values from 0 to 70
double[,] data = Random2D(10, 10, min: 0, max: 70);
plt.AddHeatmap(data, cmap);

plt.SaveFig("demo.png");

static double[,] Random2D(int width, int height, double min, double max)
{
    Random rand = new(0);
    double[,] values = new double[height, width];
    for (int i = 0; i < height; i++)
    {
        for (int j = 0; j < width; j++)
        {
            values[i, j] = rand.NextDouble() * (max - min) + min;
        }
    }
    return values;
}

public class CustomColorMap : ScottPlot.Drawing.IColormap
{
    public string Name => "SpecialColormap";

    public (byte r, byte g, byte b) GetRGB(byte value)
    {
        return ((byte)(value / 2), value, (byte)(value / 2));
    }
}

Actually, I think the picture in my last code example is wrong. I'm not sure if the issue is related to your question, but the brightest cell in the heatmap is around 70 and appears as light green, but on the colorbar scale 70 should be dark green. I'll try to create a better code example.

I'm almost out of the time I have to work on this today. I'm struggling to figure-out what I'm doing wrong.
@bclehmann do you have any quick thoughts? 😅 I'm trying to show a heatmap using a color scale intentionally larger than the range of the data. In the example below, I would expect the brightest cell of the heatmap (a value around 250) to be blue, not green.
ScottPlot.Plot plt = new(400, 300);

double[,] data = ScottPlot.DataGen.SampleImageData(); // values are 0-255
var hm = plt.AddHeatmap(data);
hm.ScaleMin = 0;
hm.ScaleMax = 1000; // scale tops at 1000

var cbar = plt.AddColorbar(hm);

plt.SaveFig("demo.png");

I'm getting a little confused here...
https://github.com/ScottPlot/ScottPlot/blob/72169c7293e8d6cee8a0e6a4631f9f0483876d3a/src/ScottPlot4/ScottPlot/Plottable/Heatmap.cs#L141-L144
https://github.com/ScottPlot/ScottPlot/blob/b8150b78ac40e3645028091ac1a3d0959d274cf4/src/ScottPlot4/ScottPlot/Plottable/Colorbar.cs#L49-L54
I'm also not sure when Update() needs to be called to regenerate the heatmap bitmap in all this...

Hi @dhgigisoave, sorry about all the intermediate messages. I think this code addresses your question and resolves this issue.
(sorry for the unnecessary tag Ben!)
ScottPlot.Plot plt = new(400, 300);

// create a custom colormap to convert pixel brightness (0-255) to color (r,g,b)
ScottPlot.Drawing.IColormap cmapLogic = new CustomColorMap();
ScottPlot.Drawing.Colormap cmap = new(cmapLogic);

// add a colorbar to the plot using the custom colormap
var cbar = plt.AddColorbar(cmap);
cbar.MinValue = 20;
cbar.MaxValue = 140;

// add a heatmap containing random values from 0 to 70
double[,] data = Random2D(10, 10, min: 0, max: 70);
var hm = plt.AddHeatmap(data, cmap);

// adjust the heatmap color scale to range 20 to 140
hm.Update(data, min: 20, max: 140);

plt.SaveFig("demo.png");

static double[,] Random2D(int width, int height, double min, double max)
{
    Random rand = new(0);
    double[,] values = new double[height, width];
    for (int i = 0; i < height; i++)
    {
        for (int j = 0; j < width; j++)
        {
            values[i, j] = rand.NextDouble() * (max - min) + min;
        }
    }
    return values;
}

public class CustomColorMap : ScottPlot.Drawing.IColormap
{
    public string Name => "SpecialColormap";

    public (byte r, byte g, byte b) GetRGB(byte value)
    {
        return ((byte)(value / 2), value, (byte)(value / 2));
    }
}

Sorry Scott,
I'm still confused.
Maybe I didn't understand the meaning of method GetRGB. I think that this method is call from ScottPlott one time for every point in the heatmap, and it returns the color that represents the level of intensity of that point.
In input the method accepts an integer number from 0 to 255, that I assumed was proportional to value of point in heatmap, but I don't understand the relation. In your example you apply a "green formula" that I don't understand where it come, and you call the argument "brightness" that in literature has a his own formula from rgb (different of your), but is not uniquely related at inverse.
Also in your example you use a continuous range of color, in my case instead the range is (and must be) discreet.
I searched in documentation and in discussions but I didn't found any clear description.
Sorry again for the very annoying discussion
Luigi

Maybe I didn't understand the meaning of method GetRGB. I think that this method is call from ScottPlott one time for every point in the heatmap, and it returns the color that represents the level of intensity of that point.

Yes, this is exactly what GetRGB does.
I don't believe there's any mathematical or colour-theoretic justification behind the green colourmap, it's just a simple way of defining one. It is effectively drawing a line across the colourspace from (0, 0, 0) to (127, 255, 127). The term brightness is tempting but incorrect here, IColormap.GetRGB takes an intensity as their input, not a brightness. Generally the brightness will be correlated with the intensity because it makes them easier to read, but it's not required and it's not necessarily linear.

Also in your example you use a continuous range of color, in my case instead the range is (and must be) discreet.

This isn't too hard, a discrete colormap can be created by sampling a continuous one. For example, if GetRGBContinuous is defined as it is in Scott's colormap, you can define a GetRGB that breaks it into 5 blocks:
public (byte r, byte g, byte b) GetRGB(byte value)
{
    const int numBlocks = 5; // Change as you see fit
    int blockSize = (int)Math.Ceiling(255 / numBlocks );

    return GetRGBContinuous(value % blockSize);
}

Sorry again for the very annoying discussion

No worries! We are making a lot of progress here and documenting useful things. I am also learning about what parts of the API are confusing and could be improved with better documentation or a simpler API in ScottPlot 5 🚀

Also in your example you use a continuous range of color, in my case instead the range is (and must be) discreet. I searched in documentation and in discussions but I didn't found any clear description.

Does this code example help you reach a solution? It's a single file .NET 6 console app that produces the following output:

using System.Drawing;

ScottPlot.Plot plt = new(400, 300);

// create a custom colormap using a fixed set of colors
Color[] colors = {
    ColorTranslator.FromHtml("#000000"),
    ColorTranslator.FromHtml("#440154"),
    ColorTranslator.FromHtml("#208f8c"),
    ColorTranslator.FromHtml("#fae622"),
    ColorTranslator.FromHtml("#ffffff"),
};
ScottPlot.Drawing.IColormap cmapLogic = new PaletteColormap(colors);
ScottPlot.Drawing.Colormap cmap = new(cmapLogic);

// add a colorbar to the plot using the custom colormap
var cbar = plt.AddColorbar(cmap);
cbar.MinValue = 20;
cbar.MaxValue = 140;

// add a heatmap containing random values from 0 to 70
double[,] data = Random2D(10, 10, min: 0, max: 70);
var hm = plt.AddHeatmap(data, cmap);

// adjust the heatmap color scale to range 20 to 140
hm.Update(data, min: 20, max: 140);

plt.SaveFig("demo.png");

static double[,] Random2D(int width, int height, double min, double max)
{
    Random rand = new(0);
    double[,] values = new double[height, width];
    for (int i = 0; i < height; i++)
    {
        for (int j = 0; j < width; j++)
        {
            values[i, j] = rand.NextDouble() * (max - min) + min;
        }
    }
    return values;
}

public class PaletteColormap : ScottPlot.Drawing.IColormap
{
    public string Name => "SpecialColormap";

    private readonly byte[] RedValues = new byte[256];
    private readonly byte[] GreenValues = new byte[256];
    private readonly byte[] BlueValues = new byte[256];

    public PaletteColormap(Color[] colors)
    {
        for (int i = 0; i < RedValues.Length; i++)
        {
            int colorIndex = colors.Length * i / RedValues.Length;
            RedValues[i] = colors[colorIndex].R;
            GreenValues[i] = colors[colorIndex].G;
            BlueValues[i] = colors[colorIndex].B;
        }
    }

    public (byte r, byte g, byte b) GetRGB(byte value)
    {
        return (RedValues[value], GreenValues[value], BlueValues[value]);
    }
}

I'm already here.
With your last comment, I almost  understood the logic, but I think that is not the best solution (for my application of course).
I attached a sample project extracted from my real situation and derived from your samples, and the heatmap resulting when data_01.json is putting in running folder.
As you could see the ticks are not precisely aligned with color partition because of approximation of fraction parameter and partitioning of colors.
The result is that the space of
color (worst at increase of brightness) are smaller than needed. I tried to offset the gap, but the problem remains even to a lesser extent.
You could see the effect of "horse move" in the higher row where the values are near the bottom of the partition.
It was much easier and much more precise if in GetRGB (or another similar method) had in input the real value of the cell, as the library received it as a parameter in AddHeatmap call (so a double instead of a byte). The implementer will have the freedom of return a color with his own business logic.
Thank you
Luigi

CustomColorBar.zip


animation stuff

Describe your problem here.

how to animate  particular images
Are you modding a build from source or with Lua?
Lua
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
 From what I see, Ruv and Sarvente's indices should be 0004, 0005, 0006, 0007, 0008.  But you should show the xml file still and use addAnimationByIndices

HERE THE XML
THIS THE CODE I USED  addAnimationByIndices('crowdshit','walk','characters_walking',0004,0005,0006,0007 ,15,true)
it does't work everything blank

There are indices in the .xml file. From what I see, Ruv and Sarvente's indices should be 0004, 0005, 0006, 0007, 0008. But you should show the xml file still and use addAnimationByIndices

put the indices in a string like '0004, 0005, 0006, 0007, 0008' or '4,5,6,7,8', also do you have addLuaSprite(crowdshit)?

yes i added the sprite  but still everything blank

put the indices in a string like
'0004,0005,0006,0007,0008'

or
'4,5,6,7,8'

also do you have addLuaSprite(crowdshit)?

yes i added the sprite but still blank

put the indices in a string like
'0004,0005,0006,0007,0008'

or
'4,5,6,7,8'

also do you have addLuaSprite(crowdshit)?

Helo


Remove nil contexts

Causes daemon panic because loggers can’t be found.
Fixes #15724
Signed-off-by: Tonis Tiigi<EMAIL_ADDRESS>

As an immediate patch, LGTM.

LGTM too, but you could just store a context.Background() in a variable and pass it around to save some finger skin.
How didn't the tests catch this?

How didn't the tests catch this?

I'm still not sure what errors cause this, because on the nil it panicked before it could log the error.

@tonistiigi I'm not sure we've put together a context approach for docker engine, but it would be nice if we could use the distribution/context package.
Either way, LGTM.

@tonistiigi Looks like this log message is only hit for a particular error condition.

looks like this has 3 LGTM from dist team so merging

Cherry picked into #15809


支持tx_read_only变量

需求
jdbc客户端，在未配置useLocalSessionState=true的时候，会执行select @@session.tx_read_only，由于当前未支持，会报如下错误
mysql> select @@session.tx_read_only; ERROR 1064 (HY000): Unknown system variable 'tx_read_only'
useLocalSessionState默认是false，参考官方文档
现象
采用的dbeaver客户端连接mysql模式测试

未配置useLocalSessionState(即false)

2022-01-19T09:44:08.748641+08:00	200636 Connect<EMAIL_ADDRESS>on  using TCP/IP 2022-01-19T09:44:08.788644+08:00	200636 Query	/* mysql-connector-java-5.1.44 ( Revision: b3cda4f864902ffdde495b9df93937c3e20009be ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@tx_isolation AS tx_isolation, @@wait_timeout AS wait_timeout 2022-01-19T09:44:08.882841+08:00	200636 Query	SHOW WARNINGS 2022-01-19T09:44:08.942484+08:00	200636 Query	SET NAMES utf8mb4 2022-01-19T09:44:08.982654+08:00	200636 Query	SET character_set_results = NULL 2022-01-19T09:44:09.039479+08:00	200636 Query	SET autocommit=1 2022-01-19T09:44:09.062574+08:00	200636 Query	/* ApplicationName=DBeaver 21.3.1 - SQLEditor <Script.sql> */ SET autocommit=1 2022-01-19T09:44:09.107125+08:00	200636 Query	/* ApplicationName=DBeaver 21.3.1 - SQLEditor <Script.sql> */ select @@session.tx_read_only 2022-01-19T09:44:09.169387+08:00	200636 Query	/* ApplicationName=DBeaver 21.3.1 - SQLEditor <Script.sql> */ select @@session.tx_read_only 2022-01-19T09:44:09.209191+08:00	200636 Query	/* ApplicationName=DBeaver 21.3.1 - SQLEditor <Script.sql> */ use test

配置useLocalSessionState=true

2022-01-19T09:46:29.512215+08:00	200637 Connect<EMAIL_ADDRESS>on  using TCP/IP 2022-01-19T09:46:29.552334+08:00	200637 Query	/* mysql-connector-java-5.1.44 ( Revision: b3cda4f864902ffdde495b9df93937c3e20009be ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@tx_isolation AS tx_isolation, @@wait_timeout AS wait_timeout 2022-01-19T09:46:29.583056+08:00	200637 Query	SHOW WARNINGS 2022-01-19T09:46:29.631904+08:00	200637 Query	SET NAMES utf8mb4 2022-01-19T09:46:29.691760+08:00	200637 Query	SET character_set_results = NULL 2022-01-19T09:46:29.753445+08:00	200637 Query	/* ApplicationName=DBeaver 21.3.1 - Main */ SELECT DATABASE() 2022-01-19T09:46:30.032657+08:00	200638 Connect<EMAIL_ADDRESS>on  using TCP/IP 2022-01-19T09:46:30.072605+08:00	200638 Query	/* mysql-connector-java-5.1.44 ( Revision: b3cda4f864902ffdde495b9df93937c3e20009be ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@tx_isolation AS tx_isolation, @@wait_timeout AS wait_timeout 2022-01-19T09:46:30.133948+08:00	200638 Query	SHOW WARNINGS 2022-01-19T09:46:30.193496+08:00	200638 Query	SET NAMES utf8mb4 2022-01-19T09:46:30.293141+08:00	200638 Query	SET character_set_results = NULL 2022-01-19T09:46:30.334680+08:00	200638 Query	/* ApplicationName=DBeaver 21.3.1 - Metadata */ SELECT DATABASE() 2022-01-19T09:46:30.397745+08:00	200638 Query	/* ApplicationName=DBeaver 21.3.1 - Metadata */ SHOW ENGINES 2022-01-19T09:46:30.457594+08:00	200638 Query	/* ApplicationName=DBeaver 21.3.1 - Metadata */ SHOW CHARSET 2022-01-19T09:46:30.517611+08:00	200638 Query	/* ApplicationName=DBeaver 21.3.1 - Metadata */ SHOW COLLATION 2022-01-19T09:46:30.577719+08:00	200638 Query	/* ApplicationName=DBeaver 21.3.1 - Metadata */ SELECT @@GLOBAL.character_set_server,@@GLOBAL.collation_server 2022-01-19T09:46:30.617745+08:00	200638 Query	/* ApplicationName=DBeaver 21.3.1 - Metadata */ SHOW PLUGINS 2022-01-19T09:46:30.677339+08:00	200638 Query	/* ApplicationName=DBeaver 21.3.1 - Metadata */ SHOW VARIABLES LIKE 'lower_case_table_names' 2022-01-19T09:46:30.725323+08:00	200638 Query	/* ApplicationName=DBeaver 21.3.1 - Metadata */ show databases 2022-01-19T09:46:30.785504+08:00	200638 Query	/* ApplicationName=DBeaver 21.3.1 - Metadata */ SELECT * FROM information_schema.TABLES t WHERE 	t.TABLE_SCHEMA = 'information_schema' 	AND t.TABLE_NAME = 'CHECK_CONSTRAINTS' 2022-01-19T09:46:31.070583+08:00	200639 Connect<EMAIL_ADDRESS>on  using TCP/IP

@clot09 could you do this for StarRocks?


Env Variables in nuxt.config.js

I am accessing some environment variables in my nuxt config for nuxt-auth oauth setup. It at least seems like the environment variables from now aren't available in the config file.
I set them up properly with now.sh and am able to log them from a page file but when I make the oauth call it doesn't appear to be sending along the app id in the url params. I can provide more information on my setup if you need but I'm really just curious about what happens to the next config file with the now builder.
Also I made sure to set up a new oauth app for my now.sh domain. It works fine using local nuxt and my oauth app set to localhost.
nuxt.config.js
auth: {
    redirect: {
      callback: '/callback'
    },
    strategies: {
      github: {
        client_id: process.env.GITHUB_CLIENT_ID,
        client_secret: process.env.GITHUB_CLIENT_SECRET
      }
    }
  }

There are both build.env and env keys within now.json. Because Nuxt bakes environment variables in at build time, you need to make sure they are included in your now.json, e.g.:
  {
    "build": {
      "env": {
        ...
      }
    }
  }

That was exactly my problem. I'm actually insanely impressed with your ability to diagnose problems with very little information. Hopefully this stuff is helpful to others.

Thanks :blush:

I just spent hours trying to fix this until i found your comment. @danielroe
I just opened a PR to merge this into the Now Environment Variables section of their documentation.
https://github.com/zeit/docs/pull/1644 .
Hopefully it gets merged if the need be.

@vickywane I'm glad it was helpful - and am sympathetic!. Were you using now-builder or a Nuxt.js static build?

Just a nuxt.js static build .
I got frustrated from logging out undefined variables :)


Fix Reset-AppxPackage syntax formatting

Description
As described in #3071, the Reset-AppxPackage syntax is incorrectly formatted. This corrects the formatting to match the other articles.

Closes #3071

If there is any feedback, please let me know. Edits by maintainers are allowed.

Docs Build status updates of commit b3bc4fd:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docset/winserver2016-ps/appx/Reset-AppxPackage.md
:white_check_mark:Succeeded
View (WindowsServer2016-ps)

docset/winserver2019-ps/appx/Reset-AppxPackage.md
:white_check_mark:Succeeded
View (WindowsServer2019-ps)

docset/winserver2022-ps/appx/Reset-AppxPackage.md
:white_check_mark:Succeeded
View (WindowsServer2022-ps)

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

We appreciate any feedback that improves the content in the Microsoft docs but we haven't had any response from you so we are going to close this issue.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


[WIP][Proposal] Initial approach

More context here: https://github.com/facebookincubator/create-react-app/issues/401
Given that you created this repo I decided that it would make more sense to make a PR here rather than in the create-react-app repo.
This is a really early implementation of my proposal, please feel more than free to tell me if this is totally wrong :) There is still a lot of clean up that I need to do and add tests to all of it.
It would be great if we could make the core of this plugin agnostic of what the which types of errors it knows how to parse. In my proposal the plugin only knows that it has a set of transformers and a set of formatters. We could modify it so that the user could inject extra transformers and formatters in their Webpack config new FriendlyErrorsWebpackPlugin({ extraTransformers: [...], extraFormatters: [...]).
There are two concepts that I've added.  I'm still not super happy the names or the exact responsibilities of each of them, but I think that something like it could be interesting.

Transformers: (error) => (error)... Given an error it will transform it the "next" error state or add some type of metadata if it matches certain criteria. For example the moduleNotFound transformer will add the appropriate type and specific module name to the error.
Formatters: ([error]) => ([logStatements or chunks])... Given a collection of errors it will return a collection of log statements to print of for those set of errors. For example the moduleNotFound formatter will gather and group all the missing modules.

Again, this is still an early implementation and I'm not super happy with parts of it, but this will also allow us easily unit test each of the transformers and formatter
Imagine if we could make it really easy to add any set of error formatters. That will mean that the community can build formatters for any specific use case, if someone already knows JavaScript but it is their first time exposed to ES6 they could add a something like a es6HelpFormatter that whenever errors like this TypeError: Assignment to constant variable. show up, it will also give them a detail explanation of what const is, along with a link to a blog post or to MDN.

Hi @rogeliog !
Thanks for this PR. It's a great idea and I was planning to do something similar.
It makes the code more modular and it looks very good.
Is it ready to merge ?

@geowarin Not yet, I first wanted to validate the main idea with you. It still needs some clean up and tests. Also, I want to make sure that we have the correct abstractions with the transformers and formatters, before moving forward with them :)

@geowarin I added some tests and fixes some styling stuff. it should be in a better spot now :)

I just came back from holidays and stumbled upon your awesome PR, @rogeliog. Thank you so much!
I want to release this ASAP but we still need to:

Make sure that the plugin works with webpack 1 and webpack 2. I've got a prototype for integration tests with both webpack versions, I'll ask you for a review later today
Add node 4 to the travis build to make sure we have the same compatibility than create-react-app. This might mean some refactoring in the code (I don't think we need a babel build thought)


Webpack loader - if you want to include a link.

Hey mate,
Greate work on this I have created a webpack loader for this so you can selectively include your animations when you use animate.css.
https://github.com/andreimc/animate-css-webpack
Maybe you could include it in the readme ?

Awesome! I'll have to give this a try!

@andreijs could you please send a PR adding it to the read me?


Make the spared IAM account configurable via a command line option

I'd like to be able to spare another username because my name isn't darlek

Current version is not exterminating IAM because it also needs to spare roles with nordic names... but sure!


Wrong -T path

It seems that you missed a path on the last commit.
line 40
-w "${password}" -T "" -T "/Library/LaunchDaemons/name.ridgewell.unlock" -U "/Library/Keychains/System.keychain"
Should be
-w "${password}" -T "" -T "/Library/PrivilegedHelperTools/name.ridgewell.unlock" -U "/Library/Keychains/System.keychain"
right?
regards

Thanks!


emitError with no action

@tungld
in the LSTM code, I see a lot of emitError without actions. That is potentially a problem. In general, if it is due to error from user, we should give a message; and if its an error from the implementation, we can emit a message and then assert.
template <>
LstmState allocAndInitializeStates<ONNXLSTMOp, LstmState>(
    ConversionPatternRewriter &rewriter, Location loc, ONNXLSTMOp *op,
    OperandAdaptor<ONNXLSTMOp> operandAdaptor) {
  LstmState state;

  // Insert allocation and deallocation for the results of this operation.
  if (!isNoneType(op->Y())) {
    auto yMemRefType = convertToMemRefType(op->Y().getType());
    if (hasAllConstantDimensions(yMemRefType))
      state.allH = insertAllocAndDealloc(yMemRefType, loc, rewriter,
          checkInsertDealloc(op->getOperation(), 0));
    else
      emitError(loc, "Unsupported dynamic dimensions.");
  } else {
    state.allH = op->Y();
  }

see the emitError. Either the function can return a LogicalResult, or special value such as nullptr. There errors are then is then caught in the caller context. Or you can use an assert and the program will stop

@AlexandreEichenberger Thanks for pointing it out! I'll fix this issue.

I actually have a PR with fixes for this, converted them into asserts, see #153 . @tungld Feel free to comment if fixes are appropriate. I explained also in a ErrorHandling doc the policy I used to determine when to use assert vs emitError.


Training interface

In order to give more flexibility, we could expose the entire training loop to the user:
from sbi.inference import nre_loss, ratio_estimator_based_potential, MCMCPosterior

net = classifier_nn("mdn")

data_loader = ...
for e in range(epochs):
    optim.zero_grad()
    loss = nre_loss(net, theta, x)
    loss.backward()
    optim.step()

potential = ratio_estimator_based_potential(net, prior, x_o)
posterior = MCMCPosterior(potential, proposal=prior)

This would require two things:

a good way to deal with z-scoring
separating the loss functions from the rest

related to #932


Failed to activate rvm environment

Description
I've been using the Ruby LSP vscode extension for about a year without any issues.
Today I started seeing the error message below when I launch vscode. I'm launching vscode from the terminal with the code . command.
Failed to activate rvm environment: Command failed: /home/onwardmk/.rvm/bin/rvm-auto-ruby -W0 -rjson -e 'STDERR.print({yjit:!!defined?(RubyVM::YJIT),version:RUBY_VERSION,home:Gem.user_dir,default:Gem.default_dir,ruby:RbConfig.ruby}.to_json)' /bin/sh: 1: /home/onwardmk/.rvm/bin/rvm-auto-ruby: not found

Based on the error message, the problem appears to be that it's looking for rvm in my home folder, but rvm is installed in /usr/share/rvm on my machine. I don't see a vscode setting to specify the path.
vscode version: 1.87.2
Ruby LSP version: v0.5.16
rvm version: 1.29.12

I have the same issue +1

Fixed by https://github.com/Shopify/ruby-lsp/pull/1869.


Linechart cannot change the pointColor in version 1.0.2

Hello,
When i try to change the pointColor of a linechart, nothing happens.
When i change the strokeColor, the color does change. Same for the Fillcolor property.
For example:
This works:
 chart.datasets[0].strokeColor = 'rgba(215, 21, 21, 1)';
This doesn't work:
chart.datasets[0].pointColor = 'rgba(215, 21, 21, 1)';
I Also invoke the following method after setting a new color to apply the changes:
 scope.chart.update();
I believe that the update() method is missing functionality to update the pointColor.
Could this functionality possibly be added to the chart library ?
Kind regards

The proper option is pointStrokeColor


add README for Kafka podman-compose files

Signed-off-by: Jonathan Holloway<EMAIL_ADDRESS>Description
Add README for Edge API development using a local or RHOSAK instance of Kafka and KafkaUI.
Fixes # (issue) THEEDGE-2796
Type of change
What is it?

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Documentation update
[ ] Tests update
[ ] Refactor

Checklist:

[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] I run make pre-commit to check fmt/vet/lint/test-no-fdo

Codecov Report
Base: 36.88% // Head: 36.94% // Increases project coverage by +0.05% :tada:

Coverage data is based on head (3bf6cd0) compared to base (7bb3d55).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1601      +/-   ##
==========================================
+ Coverage   36.88%   36.94%   +0.05%
==========================================
  Files          66       66
  Lines        8764     8757       -7
==========================================
+ Hits         3233     3235       +2
+ Misses       5140     5133       -7
+ Partials      391      389       -2

Impacted Files
Coverage Δ

pkg/services/files/uploader.go
14.72% <0.00%> (-0.36%)
:arrow_down:

main.go
0.00% <0.00%> (ø)

pkg/services/images.go
31.28% <0.00%> (ø)

pkg/services/devices.go
49.88% <0.00%> (+0.33%)
:arrow_up:

pkg/routes/thirdpartyrepo.go
34.45% <0.00%> (+0.57%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Added a blurb about creating and using a local dev version of the Ede API container with access and tools for troubleshooting during development.

/lgtm

/lgtm


What exactly is the CmpItemMenu highlight group

I'm trying to manually change the colors but I think there are some highlight groups missing
I run this but it does nothing:
:hi CmpItemMenu guifg=#000000 guibg=#000000
Look at this, the menu should be black, instead It's the default color.

Other highlight groups work fine (CmpItemAbbr, CmpItemAbbrMatchFuzzy, CmpItemKind)
This is my config:
vim.o.termguicolors = true

local cmp = require('cmp')

cmp.setup{
  snippet = {
    expand = function(args)
      require'luasnip'.lsp_expand(args.body)
    end
  },
  formatting = {
    format = lspkind.cmp_format(),
  },
  sources = {
    { name = 'nvim_lsp' },
    { name = 'buffer' },
    { name = 'path' },
    { name = 'luasnip' },
  },
}

Are you sure that the Text field in the screenshot isn't controlled by CmpItemKind rather than CmpItemMenu? I am also confused about what CmpItemMenu controls.


Update GitHub Issue Template

Overview
Does this PR close an existing issue?
No
Summary
Provide a general summary of the issue addressed in the title above
Issue Number(s)
n/a
Screenshots or recordings
Please provide screenshots or recordings if this PR is modifying the visual UI or UX.
Checklist

[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have evaluated if the README.md documentation needs to be updated
[ ] I have evaluated if DocBlock headers needed to be added or updated
[ ] I have verified that lint and tests pass locally with my changes
[ ] If a fork of a dependent package had to be made to address the issue this PR closes:

[ ] I noted in the fork's README.md the reason the fork was created
[ ] I have opened an upstream issue detailing what was deficient about the dependency
[ ] I have opened an upstream PR addressing this deficiency
[ ] I have opened an issue in this repository to track this PR and schedule the removal of the usage of the fork

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

[x] #none#
[ ] #patch#
[ ] #minor#
[ ] #major#

Examples:

NONE

README.md changes
test additions
changes to files that are not used by a consuming application (.travis.yml, .gitignore, etc)

PATCH

backwards-compatible bug fix

nothing about how to use the code has changed
nothing about the outcome of the code has changed (though it likely corrected it)

MINOR

adding functionality in a backwards-compatible manner

nothing about how used to use the code has changed but using it in a new way will do new things
nothing about the outcome of the code has changed without having to first use it in a new way

MAJOR

incompatible API change

using the code how used to will cease working
using the code how used to will have a different outcome

CHANGELOG

Update GitHub Issue Template

👍


Bug: Nil pointer in http loader if endpoint is not reachable

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
If the endpoint to load the checks' configuration is not reachable the sparrow will panic with nil pointer exception.
runtimeCfg will be nill if the endpoint is not reachable even after retry logic.
https://github.com/caas-team/sparrow/blob/c4a6b545c1b04d871c7e366f1604cc3d36bc1729/pkg/config/http.go#L76
Currently, just a warning log will be printed and the func is not returning/handling the error properly.
Expected Behavior
Loader should not panic if it is not able to load the remote checks' config.
An else block to cover the none-err case might be a solution.
Steps To Reproduce
No response
Relevant logs and/or screenshots, environment information, etc.
Using config file: /config/.sparrow.yaml
{"time":"2024-01-23T08:50:09.525650498Z","level":"INFO","source":{"function":"github.com/caas-team/sparrow/cmd.NewCmdRun.run.func1","file":"/home/runner/work/sparrow/sparrow/cmd/run.go","line":82},"msg":"Running sparrow"}
{"time":"2024-01-23T08:50:09.52593781Z","level":"INFO","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/targets.(*gitlabTargetManager).Reconcile","file":"/home/runner/work/sparrow/sparrow/pkg/sparrow/targets/gitlab.go","line":80},"msg":"Starting global gitlabTargetManager reconciler"}
{"time":"2024-01-23T08:50:09.526036566Z","level":"INFO","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow.(*Sparrow).api.func1","file":"/home/runner/work/sparrow/sparrow/pkg/sparrow/api.go","line":81},"msg":"Serving Api","addr":":8080"}
{"time":"2024-01-23T08:50:59.534917331Z","level":"ERROR","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*HttpLoader).GetRuntimeConfig","file":"/home/runner/work/sparrow/sparrow/pkg/config/http.go","line":96},"msg":"Http get request failed","url":"https://gitlab.devops.telekom.de/api/v4/projects/228644/repository/files/config%2Eyaml/raw?ref=main","error":"Get \"https://gitlab.devops.telekom.de/api/v4/projects/228644/repository/files/config%2Eyaml/raw?ref=main\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}
{"time":"2024-01-23T08:50:59.53498963Z","level":"WARN","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*HttpLoader).Run.Retry.func2","file":"/home/runner/work/sparrow/sparrow/internal/helper/retry.go","line":49},"msg":"Effector call failed, retrying in 1s"}
{"time":"2024-01-23T08:51:30.538843352Z","level":"ERROR","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*HttpLoader).GetRuntimeConfig","file":"/home/runner/work/sparrow/sparrow/pkg/config/http.go","line":96},"msg":"Http get request failed","url":"https://gitlab.devops.telekom.de/api/v4/projects/228644/repository/files/config%2Eyaml/raw?ref=main","error":"Get \"https://gitlab.devops.telekom.de/api/v4/projects/228644/repository/files/config%2Eyaml/raw?ref=main\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}
{"time":"2024-01-23T08:51:30.53888887Z","level":"WARN","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*HttpLoader).Run.Retry.func2","file":"/home/runner/work/sparrow/sparrow/internal/helper/retry.go","line":49},"msg":"Effector call failed, retrying in 2s"}
{"time":"2024-01-23T08:51:39.532393218Z","level":"ERROR","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/gitlab.(*Client).fetchFileList","file":"/home/runner/work/sparrow/sparrow/pkg/sparrow/gitlab/gitlab.go","line":222},"msg":"Failed to fetch file list","error":"Get \"https://gitlab.devops.telekom.de/api/v4/projects/237078/repository/tree?ref=main\": dial tcp: lookup gitlab.devops.telekom.de: i/o timeout"}
{"time":"2024-01-23T08:51:39.532471895Z","level":"ERROR","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/gitlab.(*Client).FetchFiles","file":"/home/runner/work/sparrow/sparrow/pkg/sparrow/gitlab/gitlab.go","line":135},"msg":"Failed to fetch files","error":"Get \"https://gitlab.devops.telekom.de/api/v4/projects/237078/repository/tree?ref=main\": dial tcp: lookup gitlab.devops.telekom.de: i/o timeout"}
{"time":"2024-01-23T08:51:39.532491426Z","level":"ERROR","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/targets.(*gitlabTargetManager).refreshTargets","file":"/home/runner/work/sparrow/sparrow/pkg/sparrow/targets/gitlab.go","line":203},"msg":"Failed to update global targets","error":"Get \"https://gitlab.devops.telekom.de/api/v4/projects/237078/repository/tree?ref=main\": dial tcp: lookup gitlab.devops.telekom.de: i/o timeout"}
{"time":"2024-01-23T08:51:39.532511174Z","level":"WARN","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/targets.(*gitlabTargetManager).Reconcile","file":"/home/runner/work/sparrow/sparrow/pkg/sparrow/targets/gitlab.go","line":99},"msg":"Failed to get global targets","error":"Get \"https://gitlab.devops.telekom.de/api/v4/projects/237078/repository/tree?ref=main\": dial tcp: lookup gitlab.devops.telekom.de: i/o timeout"}
{"time":"2024-01-23T08:51:50.561977627Z","level":"ERROR","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*HttpLoader).GetRuntimeConfig","file":"/home/runner/work/sparrow/sparrow/pkg/config/http.go","line":96},"msg":"Http get request failed","url":"https://gitlab.devops.telekom.de/api/v4/projects/228644/repository/files/config%2Eyaml/raw?ref=main","error":"Get \"https://gitlab.devops.telekom.de/api/v4/projects/228644/repository/files/config%2Eyaml/raw?ref=main\": dial tcp: lookup gitlab.devops.telekom.de on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:59453-><IP_ADDRESS>:53: i/o timeout"}
{"time":"2024-01-23T08:51:50.561926507Z","level":"ERROR","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/gitlab.(*Client).PostFile","file":"/home/runner/work/sparrow/sparrow/pkg/sparrow/gitlab/gitlab.go","line":331},"msg":"Failed to post file","error":"Post \"https://gitlab.devops.telekom.de/api/v4/projects/237078/repository/files/sparrow.caas-t01.telekom.de.json\": dial tcp: lookup gitlab.devops.telekom.de on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:59453-><IP_ADDRESS>:53: i/o timeout"}
{"time":"2024-01-23T08:51:50.56204608Z","level":"ERROR","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/targets.(*gitlabTargetManager).updateRegistration","file":"/home/runner/work/sparrow/sparrow/pkg/sparrow/targets/gitlab.go","line":185},"msg":"Failed to register global gitlabTargetManager","error":"Post \"https://gitlab.devops.telekom.de/api/v4/projects/237078/repository/files/sparrow.caas-t01.telekom.de.json\": dial tcp: lookup gitlab.devops.telekom.de on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:59453-><IP_ADDRESS>:53: i/o timeout"}
{"time":"2024-01-23T08:51:50.562066866Z","level":"WARN","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/targets.(*gitlabTargetManager).Reconcile","file":"/home/runner/work/sparrow/sparrow/pkg/sparrow/targets/gitlab.go","line":105},"msg":"Failed to register self as global target","error":"Post \"https://gitlab.devops.telekom.de/api/v4/projects/237078/repository/files/sparrow.caas-t01.telekom.de.json\": dial tcp: lookup gitlab.devops.telekom.de on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:59453-><IP_ADDRESS>:53: i/o timeout"}
{"time":"2024-01-23T08:51:50.562031059Z","level":"WARN","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*HttpLoader).Run.Retry.func2","file":"/home/runner/work/sparrow/sparrow/internal/helper/retry.go","line":49},"msg":"Effector call failed, retrying in 4s"}
{"time":"2024-01-23T08:52:24.569515778Z","level":"ERROR","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*HttpLoader).GetRuntimeConfig","file":"/home/runner/work/sparrow/sparrow/pkg/config/http.go","line":96},"msg":"Http get request failed","url":"https://gitlab.devops.telekom.de/api/v4/projects/228644/repository/files/config%2Eyaml/raw?ref=main","error":"Get \"https://gitlab.devops.telekom.de/api/v4/projects/228644/repository/files/config%2Eyaml/raw?ref=main\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}
{"time":"2024-01-23T08:52:24.569558001Z","level":"WARN","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*HttpLoader).Run","file":"/home/runner/work/sparrow/sparrow/pkg/config/http.go","line":72},"msg":"Could not get remote runtime configuration","error":"Get \"https://gitlab.devops.telekom.de/api/v4/projects/228644/repository/files/config%2Eyaml/raw?ref=main\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}
{"time":"2024-01-23T08:52:24.569574733Z","level":"INFO","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*HttpLoader).Run","file":"/home/runner/work/sparrow/sparrow/pkg/config/http.go","line":75},"msg":"Successfully got remote runtime configuration"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x81c50c]

goroutine 35 [running]:
github.com/caas-team/sparrow/pkg/config.(*HttpLoader).Run(0xc000206b88, {0xb70440?, 0xc000217b00?})
    /home/runner/work/sparrow/sparrow/pkg/config/http.go:76 +0xac
github.com/caas-team/sparrow/pkg/sparrow.(*Sparrow).Run.func1()
    /home/runner/work/sparrow/sparrow/pkg/sparrow/run.go:107 +0x2d
created by github.com/caas-team/sparrow/pkg/sparrow.(*Sparrow).Run in goroutine 1
    /home/runner/work/sparrow/sparrow/pkg/sparrow/run.go:106 +0xfe
Stream closed EOF for caas-sparrow/sparrow-857b77d885-mkkjk (sparrow)

Who can address the issue?
No response
Anything else?
No response

@y-eight Do you think fixing this can be part of #72 because we're already refactoring the runtime config there?
Either we include the fix in a major release (i.e. 0.4.0, so with the mentioned issue) or we include it in 0.3.1.

Could be fixed by #72 but it is a bug that is currently forcing a panic. So we should fix it as soon as possible. For me both is fine, if someone has time for this, we should fix it. I do not see this as an blocking issue (eg in K8s env the pod is just restarting) for now(!).

I think a simple continue / break when the config cannot be grabbed from the remote endpoint should fix this issue.


Feature request: can I update Bevy yet?

Checks if a compatible version of all your bevy-reliant crates have compatible versions for a specified Bevy version, defaulting to latest. If an additional flag is provided, actually goes and edits your cargo.toml.

There are multiple ways to accomplish this, but I think the sparse index protocol may be easiest. If you go to https://index.crates.io/be/vy/bevy, you get a JSON of every single Bevy version and its dependencies. If you do the same for all the dependencies in Cargo.toml, you can find what plugin versions require what Bevy versions.
If you want to get really fancy, you can even lookup ~/.cargo/registry/index/ to see this all locally, without any HTTP requests!

Suggestions for the command name?
Maybe bevy update, although that could be a bit confusing as it doesn't perform the update itself.

bevy ready --upgrade?

bevy ready --upgrade?

What would bevy ready do without the --upgrade flag?

Prints info about if you can upgrade and why, displaying which crates need to be bumped to which versions.

As a quick mockup:
$ bevy ready
bevy = 0.13.1 (latest 0.14.2)
bevy_mod_picking = 0.19.0 (latest 0.20.0 supports 0.14.2)
bevy_asset_loader = 0.20.0 (latest 0.21.0 supports 0.14.0)

--fix sounds a bit weird for an upgrade. My project isn't broken, after all. I'd stick to update, upgrade, modify, or a similar verb.

I almost want to say, bevy bump because that's the word I always think of when changing versions. But I may be in the minority!

Bevy bump is great :D

I love bevy bump, great suggestion!


SQLite does not have case sensitive columns

This solves a weird issue when there is record with metadata key
that is only different in letter cases.
See the test for details.

This would solve #21 and make #22 obsolete.


DeprecationWarning: np.asscalar(a) is deprecated since NumPy v1.16, use a.item() instead

Hi Greg,
color_diff.py uses numpy.asscalar(), could this be changed to using numpy.ndarray.item() to be able using Numpy >= 1.16 without warnings or 1.18.1 without errors?
Thanks in advance, best regards
Jens

Ah, sorry, just saw it's already fixed in the code... is there any release planned soonish?

I'm having the same issue. With Numpy 1.16.5 I'm getting this warning:
DeprecationWarning: np.asscalar(a) is deprecated since NumPy v1.16, use a.item() instead     'a.item() instead', DeprecationWarning, stacklevel=1)

Since the release of numpy 1.23 has officially removed asscalar, I think this thread became relevant again. The issue is fixed already, maybe its time to roll a new release?
A package of mine depends on colormath and builds are no longer passing. I'm going to downgrade numpy requirements, but it would be lovely to see this issue fixed with a minor 3.0.1 release!

I'm having the same issue as @DarLador. I agree with @aleferna12 that it would be awesome not to have to downgrade to a previous numpy version. Thanks in advance!

temporary solution, this worked for my case
import numpy

def patch_asscalar(a):
    return a.item()

setattr(numpy, "asscalar", patch_asscalar)


Couple of redisson tomcat questions regarding SLAVE read

Hey team, good morning, hope everyone is doing alright

If I have a session stickness in my LB, will it save session locally in memory and only query for redis if tomcat changed?
When using read mode as SLAVE, does redisson do anything special to make sure that the session is timely replicated to the slave nodes once it tries to get it?
If session is not found in a slave node, does it try to read from the master node?

Okay, for number 1, I am pretty sure the answer is yes.
For number 2, from reading, looks like there is no way to do it in redis.
Number 3 I am not sure, but from looking at the docs and source code it looks that not, but I might be worng...

does redisson do anything special to make sure that the session is timely replicated to the slave nodes once it tries to get it?

Redisson doesn't wait for sync with slaves. That can be improved.

But how exactly can it be waited? Instead of waiting, can't we add an option to look at the master node instead of the slave ones?

Hey @mrniko, any update on this feature?


Permanent delete of survey instances

Allow for deletion of instances in addition to the current invalidation feature in the survey stats view.

Check boxes and one delete button would be preferred.

Looks awesome. You can push this to the production server!
Chris J. Vargo
University of Alabama
Assistant Professor, Ph.D.
Advertising & Public Relations
[image: Twitter] http://www.twitter.com/chrisjvargo [image: LinkedIn]
http://www.linkedin.com/in/chrisjvargo [image: Google Plus]
https://plus.google.com/105471295838192826025 [image: WordPress]
http://www.chrisjvargo.com/
On Thu, Jul 16, 2015 at 3:46 PM, Scott Bradley<EMAIL_ADDRESS>wrote:

Closed #2 https://github.com/scott2b/surveyor/issues/2 via 1aca511
https://github.com/scott2b/surveyor/commit/1aca511e7a5c365a03ad7d60bd3e54bcbab53348
.
—
Reply to this email directly or view it on GitHub
https://github.com/scott2b/surveyor/issues/2#event-357941821.


name changer

The name changer does not fchange in tab or chat

it should work like this already

@R3nzTheCodeGOD Is it possible to change other people's names?


Fixed indentation of failing Probes

Issue:
The list of failing probes is not a sub-list.
Reason:
Previously Markdown would continue the parent list instead of creating a sub-list.
Fix:
Add a Space to fix indentation
Validation:
Check out the Github preview.

Looks good to me. Before:

After (in GitHub Preview):

Thank you for the PR!


Implement aggregated attestation pool

Motivation

We implemented aggregated attestation pool as a repository and it includes so many redundant attestations in lodestar proposed block
This issue was found in altair-devnet-1

Description
Implement aggregated attestation pool referring to other client's implementation:

Partition aggregated attestations by slot and attestation data
Preaggregate attestation if there is no intersection regarding attestingIndices (or aggregationBits) to maximize profit
Use attestingIndices instead of aggregationBits for better performance
Remove attestations from seen attestations that are included in block chain
Validate all attestations before we include in block
Sort attestations by inclusion distance, then by number of attesters
Prune per slot
api should use it instead of the unaggregated attestation pool
Remove aggregationAndProof repository

Closes #2845
Test
Tested with prater by the api

An aggregateAndProof is valuable during ~2 epochs. If our node restarts are we okay losing that data? We may want to consider persisting the opPool to disk on shutdown via a close() hook or with an abort signal, then restoring on start-up. Maybe we can defer doing that in another PR but keep it in mind during the design of the data structures

An aggregateAndProof is valuable during ~2 epochs. If our node restarts are we okay losing that data? We may want to consider persisting the opPool to disk on shutdown via a close() hook or with an abort signal, then restoring on start-up. Maybe we can defer doing that in another PR but keep it in mind during the design of the data structures

with the current good network condition, a block only contains attestations voting for previous block like in https://www.beaconcha.in/block/1660479#attestations because attestations in pool are all seen by chain
when we restart, it takes > 1 minute to search for peers, then syncing... then Synced, all of attestations in pool would be old and not valuable anymore even if we restart immediately. In addition, the possibility to publish a block right after we restart is so low.

I just changed the strategy to only filter attestations in pool when we produce a block. TODOs:

[ ] Implement getAttestationsForBlock for phase0, this is low priority since we're close to altair. It's mainly for the e2e.
[ ] Test with altair-devnet-1
[x] Performance test shows that it takes 60ms - 80ms to run getAttestationsForBlock()

@tuyennhv I've applied some revisions on top of your branch. Didn't had time to update the tests, please if you accept my changes update those.

Remove the need to get head state on API pool attestations
Apply validateAttestation conditions once per slot instead of once per attestation
Limit the max number of attestations per group
Filter out attestations based on participation without persisting the result in the pool. We may propose blocks in differents forks so this is not something we want to persist.

I'm very curious to know what's the pattern of attestations in the pool, how does participations looks like? i.e. do we have attestations with wide participation that barely overlap each other,

or smaller attestations like the diagram below?

We should run some tests after merging this branch and tune the constants for the behaviour we see fit.

Thanks for the commits.

I'm very curious to know what's the pattern of attestations in the pool, how does participations looks like? i.e. do we have attestations with wide participation that barely overlap each other,

having a look at https://www.beaconcha.in/block/1682189#attestations , I don't see attestations that overlap much each other, however there are some attestations with only 1-2 participations
however, an inspection from prater shows that it's common to have attestations with a lot of overlapped aggregationBits like:
0xdb5c476cfe355b7fffffbedbcadeddaf07
0xdb5c476cfe355b7fffffbedbcadfdd2f07
0xdb5c476cfe355b7fffffbedbcadfddaf07
0xdb5c476cfe357b7fffffbedbcbdfddaf07

Given MAX_ATTESTATION=128 and 64 committees, we should include only 2 of them at most, or perhaps only the best one (similar to what I see on mainnet)


Migrate away from Phantom based rendering to Puppeteer

Chrome's Puppeteer project finally accepts the full parameters we need to support headers and footers in pdfs. This means we should be able to make the move over to puppeteer at last.
This will require creating a shim for Puppeteer and ensuring we can accept all the current parameters without breaking the API too much.
This should also fix many of the rendering issues we've seen but not had control over. We still won't have much control over them, but Chrome is much more reliable with it's PDF rendering.
Issues this should address:
#38, #36, and potentially may open the door for #12 and #31.

I've done a bit of quick and dirty prototyping for this on the puppeteer branch which shows this would work. We'd need a full Puppeteer shim though which would act as the html->pdf converter.
The work for this shouldn't be too big really, the only hard bit will be keeping the current API but even that should be fairly easy (mostly just setting up some sane defaults).
If anyone wants to jump in that would be great, I'll try and find time to get to this soon but my time is quite sparse at the moment.


fix: timestamp config dynamicImport

Description
SvelteKit is failing after #13269, as config.build.ssr is mutated then the object is cached by Node. This PR makes sure the dynamic import config module is always different by adding a timestamp.

What is the purpose of this pull request?

[x] Bug fix
[ ] New Feature
[ ] Documentation update
[ ] Other

/ecosystem-ci run sveltekit


profile page upgrade

added a lot more information on the me and profile pages. now displays mutual friends

no build errors, thanks for this add!


Disable Gradle's configuration cache by default

There are issues that don't have workarounds at this stage (see #4669). Check again when Gradle 7.5 released.

Thanks for doing this. On top of this, running ./gradlew publishToMavenLocal was broken on main and fixing it was non trivial.

I tested that task and confirmed it was fixed in the other PR, though it required Gradle 7.5 snapshot.
I believe Gradle intends to stabilise configuration cache in 7.5 so I'm hopeful these issues will be fully resolved and we can leave it on when it's out.


Replace DatePartitionedDailyAvroSource with configurable partitioning

This PR is a continuation of PR https://github.com/linkedin/gobblin/pull/1196 .
Currently the DatePartitionedDailyAvroSource can only read daily partitioned data.
This PR extends this functionality by introducing DatePartitionedAvroFileSource in which the partitioning is configurable by the properties as follows:

date.partitioned.source.partition.prefix
date.partitioned.source.partition.suffix
date.partitioned.source.partition.pattern
date.partitioned.source.partition.granularity

This is the reader equivalent of the time-based writer and partitioner, found in TimeBasedWriterPartitioner and TimePartitionedDataPublisher.
With this add-on new data sets can be read using different temporal granularity, not just as daily partitioned data.

Hi @zliu41, @sahilTakiar, could you please take a look?

@pcadabam can you help review? Right now the biggest concern that I have is that we cannot change the name of the source class. This will break any jobs that use that source already.
At a high level, I see two avenues:

Keep the name with the new extended functionality (the name will be misleading)
Add a new class DatePartitionedAvroFileSource and have DatePartitionedDailyAvroSource be a specialization.

I haven't looked deeply in the code but I am leaning toward the second option.

@lbendig I agree with @chavdar that we should not rename the source class DatePartitionedDailyAvroSource . I would suggest the following,

Create a new class called DatePartitionedAvroFileSource  with all the changes you have.
Make the current class DatePartitionedDailyAvroSource extend DatePartitionedAvroFileSource.
In DatePartitionedDailyAvroSource override the init(state) , modify the state to set DATE_PARTITIONED_SOURCE_PARTITION_PATTERN=yyyy/MM/dd and then call super.init(state). The rest should work automatically. If people choose to use the class DatePartitionedDailyAvroSource they do not need to set the pattern.

Hi @chavdar and @pcadabam, thanks for your inputs. If renaming is an issue, I'll go with the option you described.

@lbendig is that PR still relevant?

Hi @chavdar @pcadabam, thanks for the review, I addressed your comments. Also added a sample job.

Hi @pcadabam, can you please take a look at the changes?

Hi @pcadabam, please let me know if you need any more changes in this PR.

Thanks @chavdar and @ibuenros !


rain per h/d/w and Month provide same values

Context
I am using MQTTCustom Sketch on ESP32 + CC1101 and I am super happy about your sketch, thanks a lot!
Am I missing something to have these values updated?
Describe the bug
MQTT data that is being sent is showing same date for rain_h, rain_d, rain_w and rain_m and does not seem to reset
Am I missing something?
{
"id": 339744019,
"ch": 0,
"battery_ok": 1,
"temp_c": 8.6,
"humidity": 92,
"wind_gust": 5.6,
"wind_avg": 4.9,
"wind_dir": 248,
"uv": 0,
"rain": 128,
"rain_h": 35.6,
"rain_d": 35.6,
"rain_w": 35.6,
"rain_m": 35.6
}
To Reproduce
Each time I get MQTT data (every 5min) I recieve the same values for all 4 rain values
Expected behavior
I would expect h to reset every Hour, D every day and so on.
Debug Log
{
"id": 339744019,
"ch": 0,
"battery_ok": 1,
"temp_c": 8.6,
"humidity": 92,
"wind_gust": 5.6,
"wind_avg": 4.9,
"wind_dir": 248,
"uv": 0,
"rain": 128,
"rain_h": 35.6,
"rain_d": 35.6,
"rain_w": 35.6,
"rain_m": 35.6
}
Embedded Device (please complete the following information):

Arduino IDE Version: 2.2.0
ESP32/ESP8266 Board Support Package Version: [e.g. ESP32 2.0.7]
Library Version 1.9
MQTT CUstom Sketch with
#define USE_WIFI              // use non-secure WIFI

Your Board: ESP32 Module
Selected Board in the Arduino IDE: [brand/model/version]
Your Radio Transceiver Module CC1101
Pinning/Wiring

Additional context
Add any other context about the problem here.

Hi,
Thanks for the detailed report! I'm currently fixing this: https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/103
See also https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/88#issuecomment-1792295535
Regards
Matthias

Oh thanks!
I will try to move the #ifdef USE_SECUREWIFI before the NTP code to see if it fixes the issue

The fix should be in the main branch in a few minutes...

Great

18:53:24.373 -> [ 10196][I][BresserWeatherSensorMQTTCustom1.9.ino:390] mqtt_setup(): Current time: Fri Nov  3 17:53:23 2023
18:53:24.373 ->
18:53:24.373 -> Checking wifi...

Ready for testing...

Seems to change something but not yet what I was expecting.
Hourly values seem to reset correctly but _d, _w and _m seem to be resetting too soon.
See MQTT data showing a change compared to pre mod :
{"id":339744019,"ch":0,"battery_ok":1,"temp_c":8.6,"humidity":96,"wind_gust":2.8,"wind_avg":2.5,"wind_dir":248.0,"uv":0.0,"rain":140.0,"rain_h":1.2,"rain_d":2.4,"rain_w":2.4,"rain_m":2.4}
And enclosed Graph (last 15 hours) which shows Hourly resetting regularly, Day resetting twice and Week and Month identicall and also having reset during the 15h window

Could you please provide a log file with 'debug' set?

With DEBUG_CIRCULAR_BUFFER set?

Yes I am uploading a new version with Debug set

10:59:11.338 -> [ 11418][D][WeatherSensor.cpp:118] begin(): success! 10:59:11.338 -> [ 11419][D][WeatherSensor.cpp:153] begin(): [CC1101] Setup complete - awaiting incoming messages... 10:59:17.419 -> [ 17515][D][WeatherSensor.cpp:242] getMessage(): [CC1101] R [D4] RSSI: -63.5 10:59:17.419 -> [ 17515][D][WeatherSensor.cpp:947] decodeBresser7In1Payload(): Data sanity check failed 10:59:17.494 -> [ 17519][D][WeatherSensor.cpp:960] decodeBresser7In1Payload(): Digest check failed - [3902] vs [EFC7] (D6C5) 10:59:17.494 -> [ 17528][D][WeatherSensor.cpp:394] findSlot(): sensor[0]: v=0 id=0x00000000 t=0 c=0 10:59:17.494 -> [ 17535][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=1  Hum=1  Wind=1  Rain=0  UV=1 10:59:29.419 -> [ 29517][D][WeatherSensor.cpp:242] getMessage(): [CC1101] R [D4] RSSI: -61.0 10:59:29.419 -> [ 29517][D][WeatherSensor.cpp:947] decodeBresser7In1Payload(): Data sanity check failed 10:59:29.419 -> [ 29520][D][WeatherSensor.cpp:960] decodeBresser7In1Payload(): Digest check failed - [D8BF] vs [894C] (51F3) 10:59:29.494 -> [ 29530][D][WeatherSensor.cpp:394] findSlot(): sensor[0]: v=1 id=0x14401513 t=1 c=0 10:59:29.494 -> [ 29537][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=0  Hum=0  Wind=1  Rain=1  UV=0 10:59:29.494 -> [  0 ]	[  1 ]	[  2 ]	[  3 ]	[  4 ]	[  5 ]	[  6 ]	[  7 ]	[  8 ]	[  9 ]	[ 10 ]	 10:59:29.512 ->  35940	     0	     0	     0	     0	     0	     0	     0	     0	     0	     0	 10:59:29.512 ->  140.4	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	 10:59:29.512 ->   T	   	   	   	   	   	   	   	   	   	   	 10:59:29.512 ->   H	   	   	   	   	   	   	   	   	   	   	 10:59:29.512 ->  10:59:29.512 -> [ 29577][I][BresserWeatherSensorMQTTCustom1.9.ino:606] publishWeatherdata(): Ext/Bresser5in1/data: {"id":339744019,"ch":0,"battery_ok":1,"temp_c":9.1,"humidity":95,"wind_gust":2.2,"wind_avg":1.9,"wind_dir":202.0,"uv":0.0,"rain":140.4,"rain_h":0.0,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0} 10:59:29.523 ->  10:59:29.523 -> [ 29604][I][BresserWeatherSensorMQTTCustom1.9.ino:622] publishWeatherdata(): Ext/extra: {"wind_dir_txt":"SSW","wind_gust_bft":2,"wind_avg_bft":2,"dewpoint_c":8.3,"perceived_temp_c":8.2} 10:59:29.523 ->  10:59:29.523 -> [ 29617][D][BresserWeatherSensorMQTTCustom1.9.ino:770] loop(): Data forwarding completed. 10:59:29.553 -> [ 29625][I][BresserWeatherSensorMQTTCustom1.9.ino:772] loop(): Sleeping for 300000 ms 10:59:29.553 ->  10:59:29.553 -> [ 29632][I][BresserWeatherSensorMQTTCustom1.9.ino:773] loop(): Ext/status: offline 10:59:29.553 ->

20231104 - Bresser5in1 Log1.txt

After wakeup 5min later :
11:07:41.522 -> [ 25978][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=1  Hum=1  Wind=1  Rain=0  UV=1
11:07:41.522 -> [  0 ]	[  1 ]	[  2 ]	[  3 ]	[  4 ]	[  5 ]	[  6 ]	[  7 ]	[  8 ]	[  9 ]	[ 10 ]
11:07:41.522 ->  36120	 36120	     0	     0	     0	     0	     0	     0	     0	     0	     0
11:07:41.522 ->  140.4	 140.4	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0
11:07:41.522 ->   T
11:07:41.523 ->    	  H
11:07:41.523 ->
11:07:41.523 -> [ 26018][I][BresserWeatherSensorMQTTCustom1.9.ino:606] publishWeatherdata(): Ext/Bresser5in1/data: {"id":339744019,"ch":0,"battery_ok":1,"temp_c":9.3,"humidity":94,"wind_gust":2.5,"wind_avg":2.3,"wind_dir":202.0,"uv":0.0,"rain":140.4,"rain_h":0.0,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}

And 5min later :
11:13:41.516 -> [ 61088][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=1  Hum=1  Wind=1  Rain=0  UV=1
11:13:41.519 -> [  0 ]	[  1 ]	[  2 ]	[  3 ]	[  4 ]	[  5 ]	[  6 ]	[  7 ]	[  8 ]	[  9 ]	[ 10 ]
11:13:41.519 ->  36120	 36120	 36420	     0	     0	     0	     0	     0	     0	     0	     0
11:13:41.519 ->  140.4	 140.4	 140.4	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0
11:13:41.519 ->   T
11:13:41.519 ->    	   	  H
11:13:41.519 ->
11:13:41.519 -> [ 61128][I][BresserWeatherSensorMQTTCustom1.9.ino:606] publishWeatherdata(): Ext/Bresser5in1/data: {"id":339744019,"ch":0,"battery_ok":1,"temp_c":9.4,"humidity":94,"wind_gust":0.9,"wind_avg":0.9,"wind_dir":158.0,"uv":0.0,"rain":140.4,"rain_h":0.0,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}
11:13:41.528 ->

And 5min later :
11:19:17.465 -> [ 36898][D][WeatherSensor.cpp:394] findSlot(): sensor[0]: v=1 id=0x14401513 t=1 c=0
11:19:17.465 -> [ 36905][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=1  Hum=1  Wind=1  Rain=0  UV=1
11:19:17.495 -> [  0 ]	[  1 ]	[  2 ]	[  3 ]	[  4 ]	[  5 ]	[  6 ]	[  7 ]	[  8 ]	[  9 ]	[ 10 ]
11:19:17.495 ->  36120	 36120	 36420	 36720	     0	     0	     0	     0	     0	     0	     0
11:19:17.495 ->  140.4	 140.4	 140.4	 140.4	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0
11:19:17.495 ->   T
11:19:17.495 ->    	   	   	  H
11:19:17.495 ->
11:19:17.495 -> [ 36945][I][BresserWeatherSensorMQTTCustom1.9.ino:606] publishWeatherdata(): Ext/Bresser5in1/data: {"id":339744019,"ch":0,"battery_ok":1,"temp_c":9.5,"humidity":94,"wind_gust":1.6,"wind_avg":1.4,"wind_dir":202.0,"uv":0.0,"rain":140.4,"rain_h":0.0,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}

11:24:41.487 -> [ 25039][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=0  Hum=0  Wind=1  Rain=1  UV=0 11:24:41.487 -> [  0 ]	[  1 ]	[  2 ]	[  3 ]	[  4 ]	[  5 ]	[  6 ]	[  7 ]	[  8 ]	[  9 ]	[ 10 ]	 11:24:41.487 ->  36120	 36120	 36420	 36720	 37080	     0	     0	     0	     0	     0	     0	 11:24:41.487 ->  140.4	 140.4	 140.4	 140.4	 140.4	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	 11:24:41.518 ->   T	   	   	   	   	   	   	   	   	   	   	 11:24:41.518 ->    	   	   	   	  H	   	   	   	   	   	   	 11:24:41.518 ->  11:24:41.518 -> [ 25079][I][BresserWeatherSensorMQTTCustom1.9.ino:606] publishWeatherdata(): Ext/Bresser5in1/data: {"id":339744019,"ch":0,"battery_ok":1,"temp_c":9.5,"humidity":94,"wind_gust":2.6,"wind_avg":2.3,"wind_dir":135.0,"uv":0.0,"rain":140.4,"rain_h":0.0,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0} 1

Hi,
what I actually need is the information which time and date is set after each restart. Next it is important to know the rain values, of course.

Tail is still on i=0 and Head is moving to the end of the buffer (not sure you can see it well in the log.)

That's as expected. It is implemented as a ring buffer/FIFO.

BTW: If your cycle time is 5 minutes, you have to set RAINGAUGE_BUF_SIZE to 13 (60 minutes / 5 minutes) plus one extra entry.

OK I'll change the BUF_SIZE
Here the latest Log which shows NTP seems to work correctly
20231104 - Bresser5in1 Log2.txt

I also added DAYLIGHT Saving (as we still have it in FR) and thus now print GMT and Local time

20231104 - Bresser5in1 Log3.txt

Will let it run for a while

Added some additionnal traces to look into nvData.

[  8128][I][BresserWeatherSensorMQTTCustom1.9.ino:391] mqtt_setup(): Current GMT time: Sat Nov  4 12:43:02 2023
[  8133][I][BresserWeatherSensorMQTTCustom1.9.ino:393] mqtt_setup(): Current Local time: Sat Nov  4 13:43:02 2023
Checking wifi...
MQTT connecting... ..[ 12205][I][BresserWeatherSensorMQTTCustom1.9.ino:447] mqtt_connect():
connected!
[ 12213][I][BresserWeatherSensorMQTTCustom1.9.ino:449] mqtt_connect(): Ext/status: online
[ 12214][D][WeatherSensor.cpp:105] begin(): [CC1101] Initializing ...
[ 12383][D][WeatherSensor.cpp:118] begin(): success!
[ 12384][D][WeatherSensor.cpp:153] begin(): [CC1101] Setup complete - awaiting incoming messages...
[ 22051][D][WeatherSensor.cpp:242] getMessage(): [CC1101] R [D4] RSSI: -69.0
[ 22051][D][WeatherSensor.cpp:947] decodeBresser7In1Payload(): Data sanity check failed
[ 22055][D][WeatherSensor.cpp:960] decodeBresser7In1Payload(): Digest check failed - [C4EE] vs [8F57] (4BB9)
[ 22064][D][WeatherSensor.cpp:394] findSlot(): sensor[0]: v=0 id=0x00000000 t=0 c=0
[ 22071][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=1  Hum=1  Wind=1  Rain=0  UV=1
[ 34053][D][WeatherSensor.cpp:242] getMessage(): [CC1101] R [D4] RSSI: -68.5
[ 34053][D][WeatherSensor.cpp:947] decodeBresser7In1Payload(): Data sanity check failed
[ 34056][D][WeatherSensor.cpp:960] decodeBresser7In1Payload(): Digest check failed - [D873] vs [328A] (EAF9)
[ 34066][D][WeatherSensor.cpp:394] findSlot(): sensor[0]: v=1 id=0x14401513 t=1 c=0
[ 34073][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=0  Hum=0  Wind=1  Rain=1  UV=0
[  0 ]  [  1 ]  [  2 ]  [  3 ]  [  4 ]  [  5 ]  [  6 ]  [  7 ]  [  8 ]  [  9 ]  [ 10 ]  [ 11 ]  [ 12 ]
45780       0       0       0       0       0       0       0       0       0       0       0       0
140.4     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0
T
H
nvData.tsDayBegin :    255
nvData.rainDayBegin :    0.0
nvData.tsWeekBegin :    255
nvData.wdayPrev :      6
nvData.rainWeekBegin :    0.0
nvData.tsMonthBegin :    255
nvData.rainMonthBegin :    0.0
nvData.startupPrev :      0
nvData.rainStartup :    0.0
nvData.rainPrev :  140.4
nvData.rainOvf :  140.4
[ 34147][I][BresserWeatherSensorMQTTCustom1.9.ino:609] publishWeatherdata(): Ext/Bresser5in1/data: {"id":339744019,"ch":0,"battery_ok":1,"temp_c":12.7,"humidity":85,"wind_gust":3.0,"wind_avg":2.9,"wind_dir":202.0,"uv":0.0,"rain":140.4,"rain_h":0.0,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}

20231104 - Bresser5in1 Log5.txt

Hi, what I actually need is the information which time and date is set after each restart. Next it is important to know the rain values, of course. First the time read from the RTC, second the time set from NTP (if possible).

How can I print RTC time?

printDateTime();

Do I need to add an additional library?

nvData.tsDayBegin :    255
nvData.rainDayBegin :    0.0
nvData.tsWeekBegin :    255
nvData.wdayPrev :      6
nvData.rainWeekBegin :    0.0
nvData.tsMonthBegin :    255
nvData.rainMonthBegin :    0.0
nvData.startupPrev :      0
nvData.rainStartup :    0.0
nvData.rainPrev :  140.4
nvData.rainOvf :  140.4

A value of 255 in the structure members shows that the data has just been initialized, either after a HW reset, power-on reset, spurious reset (glitch, power failure) or by calling RainGauge::reset().

Do I need to add an additional library?

No, you just have to #include <time.h>.
See https://github.com/matthias-bs/BresserWeatherSensorReceiver/blob/main/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino

the 255 is replaced by a value that seems correct after reset :
[  5077][I][BresserWeatherSensorMQTTCustom1.9.ino:391] mqtt_setup(): Current GMT time: Sat Nov  4 13:26:22 2023
[  5087][I][BresserWeatherSensorMQTTCustom1.9.ino:393] mqtt_setup(): Current Local time: Sat Nov  4 14:26:22 2023
Checking wifi...
MQTT connecting... ..[  9179][I][BresserWeatherSensorMQTTCustom1.9.ino:447] mqtt_connect():
connected!
[  9188][I][BresserWeatherSensorMQTTCustom1.9.ino:449] mqtt_connect(): Ext/status: online
[  9189][D][WeatherSensor.cpp:105] begin(): [CC1101] Initializing ...
[  9358][D][WeatherSensor.cpp:118] begin(): success!
[  9359][D][WeatherSensor.cpp:153] begin(): [CC1101] Setup complete - awaiting incoming messages...
[ 13209][D][WeatherSensor.cpp:242] getMessage(): [CC1101] R [D4] RSSI: -62.5
[ 13209][D][WeatherSensor.cpp:947] decodeBresser7In1Payload(): Data sanity check failed
[ 13213][D][WeatherSensor.cpp:960] decodeBresser7In1Payload(): Digest check failed - [DE19] vs [F249] (2C50)
[ 13222][D][WeatherSensor.cpp:394] findSlot(): sensor[0]: v=0 id=0x00000000 t=0 c=0
[ 13229][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=1  Hum=1  Wind=1  Rain=0  UV=1
[ 25211][D][WeatherSensor.cpp:242] getMessage(): [CC1101] R [D4] RSSI: -62.5
[ 25211][D][WeatherSensor.cpp:947] decodeBresser7In1Payload(): Data sanity check failed
[ 25214][D][WeatherSensor.cpp:960] decodeBresser7In1Payload(): Digest check failed - [279C] vs [2406] (039A)
[ 25224][D][WeatherSensor.cpp:394] findSlot(): sensor[0]: v=1 id=0x14401513 t=1 c=0
[ 25231][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=0  Hum=0  Wind=1  Rain=1  UV=0
[  0 ]  [  1 ]  [  2 ]  [  3 ]  [  4 ]  [  5 ]  [  6 ]  [  7 ]  [  8 ]  [  9 ]  [ 10 ]  [ 11 ]  [ 12 ]
45780   45780   46080   46380   46740   47040   47400   47700   48000       0       0       0       0
140.4   140.4   140.4   140.4   140.4   140.4   140.4   140.4   140.4     0.0     0.0     0.0     0.0
T
H
nvData.tsDayBegin :      6
nvData.rainDayBegin :  140.4
nvData.tsWeekBegin :      6
nvData.wdayPrev :      6
nvData.rainWeekBegin :  140.4
nvData.tsMonthBegin :     10
nvData.rainMonthBegin :  140.4
nvData.startupPrev :      0
nvData.rainStartup :    0.0
nvData.rainPrev :  140.4
nvData.rainOvf :  140.4
[ 25305][I][BresserWeatherSensorMQTTCustom1.9.ino:609] publishWeatherdata(): Ext/Bresser5in1/data: {"id":339744019,"ch":0,"battery_ok":1,"temp_c":12.8,"humidity":89,"wind_gust":1.0,"wind_avg":1.0,"wind_dir":292.0,"uv":0.0,"rain":140.4,"rain_h":0.0,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}

OK added code from https://github.com/matthias-bs/BresserWeatherSensorReceiver/blob/main/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino

nvData.tsDayBegin : 6 // start day of week (for daily counter)
nvData.rainDayBegin : 140.4
nvData.tsWeekBegin : 6 // start day of week (for weekly counter)
nvData.wdayPrev : 6 // day of week at previous update
nvData.rainWeekBegin : 140.4 // rain gauge value at begin of week or start, respectively
nvData.tsMonthBegin : 10 // month  (for monthly counter, actual month-1 as defined by struct tm)
nvData.rainMonthBegin : 140.4 // rain gauge value at begin of month or start, respectively
nvData.startupPrev : 0 // previous startup flag value
nvData.rainStartup : 0.0 // last rain value before rising edge of startup flag
nvData.rainPrev : 140.4 // previous rain gauge value (to calculate difference)
nvData.rainOvf : 140.4 // this is odd - should be number of rain gauge overflows. Maybe a glitch in your print statement?

I will check last printf

BresserWeatherSensorMQTT.ino, BresserWeatherSensorMQTTCustom.ino and BresserWeatherSensorMQTTWifiMgr.ino should all provide the same changes I made yesterday.

Corrected the bug on the printf :
14:42:52.147 -> [  5134][I][BresserWeatherSensorMQTTCustom1.9.ino:408] mqtt_setup(): Setting time using SNTP
14:42:52.615 -> .[  5638][I][BresserWeatherSensorMQTTCustom1.9.ino:423] mqtt_setup():
14:42:52.646 -> done!
14:42:52.646 -> [  5638][I][BresserWeatherSensorMQTTCustom1.9.ino:428] mqtt_setup(): Current time (GMT): Sat Nov  4 13:42:51 2023
14:42:52.646 ->
14:42:52.646 -> [  5643][I][BresserWeatherSensorMQTTCustom1.9.ino:430] mqtt_setup(): Current time (Local): Sat Nov  4 14:42:51 2023
14:42:52.646 ->
14:42:52.646 -> [  5653][I][BresserWeatherSensorMQTTCustom1.9.ino:431] mqtt_setup(): RTC time:
14:42:52.646 -> [  5660][I][BresserWeatherSensorMQTTCustom1.9.ino:366] printDateTime(): 2023-11-04 14:42:51
14:42:52.679 -> Checking wifi...
14:42:52.679 -> MQTT connecting... ..[  9734][I][BresserWeatherSensorMQTTCustom1.9.ino:486] mqtt_connect():
14:42:56.751 -> connected!
14:42:56.751 -> [  9747][I][BresserWeatherSensorMQTTCustom1.9.ino:488] mqtt_connect(): Ext/status: online
14:42:56.751 ->
14:42:56.751 -> [  9748][D][WeatherSensor.cpp:105] begin(): [CC1101] Initializing ...
14:42:56.922 -> [  9917][D][WeatherSensor.cpp:118] begin(): success!
14:42:56.922 -> [  9919][D][WeatherSensor.cpp:153] begin(): [CC1101] Setup complete - awaiting incoming messages...
14:43:06.055 -> [ 19061][D][WeatherSensor.cpp:242] getMessage(): [CC1101] R [D4] RSSI: -60.0
14:43:06.055 -> [ 19061][D][WeatherSensor.cpp:947] decodeBresser7In1Payload(): Data sanity check failed
14:43:06.055 -> [ 19065][D][WeatherSensor.cpp:960] decodeBresser7In1Payload(): Digest check failed - [53B3] vs [15CB] (4678)
14:43:06.055 -> [ 19074][D][WeatherSensor.cpp:394] findSlot(): sensor[0]: v=0 id=0x00000000 t=0 c=0
14:43:06.090 -> [ 19081][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=0  Hum=0  Wind=1  Rain=1  UV=0
14:43:18.062 -> [ 31063][D][WeatherSensor.cpp:242] getMessage(): [CC1101] R [D4] RSSI: -60.0
14:43:18.062 -> [ 31063][D][WeatherSensor.cpp:947] decodeBresser7In1Payload(): Data sanity check failed
14:43:18.062 -> [ 31066][D][WeatherSensor.cpp:960] decodeBresser7In1Payload(): Digest check failed - [F388] vs [DD9B] (2E13)
14:43:18.062 -> [ 31076][D][WeatherSensor.cpp:394] findSlot(): sensor[0]: v=1 id=0x14401513 t=1 c=0
14:43:18.096 -> [ 31083][D][WeatherSensor.cpp:893] decodeBresser6In1Payload(): Flags: Temp=1  Hum=1  Wind=1  Rain=0  UV=1
14:43:18.096 -> [  0 ]	[  1 ]	[  2 ]	[  3 ]	[  4 ]	[  5 ]	[  6 ]	[  7 ]	[  8 ]	[  9 ]	[ 10 ]	[ 11 ]	[ 12 ]
14:43:18.096 ->      0	     0	     0	     0	     0	     0	     0	     0	     0	     0	     0	     0	     0

14:43:18.096 -> [  0 ]	[  1 ]	[  2 ]	[  3 ]	[  4 ]	[  5 ]	[  6 ]	[  7 ]	[  8 ]	[  9 ]	[ 10 ]	[ 11 ]	[ 12 ]
14:43:18.096 ->      0	     0	     0	     0	     0	     0	     0	     0	     0	     0	     0	     0	     0
14:43:18.096 ->  140.8	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0	   0.0
14:43:18.126 ->   T
14:43:18.126 ->   H
14:43:18.126 ->
14:43:18.126 -> nvData.tsDayBegin :    255
14:43:18.126 -> nvData.rainDayBegin :    0.0
14:43:18.126 -> nvData.tsWeekBegin :    255
14:43:18.126 -> nvData.wdayPrev :      4
14:43:18.126 -> nvData.rainWeekBegin :    0.0
14:43:18.126 -> nvData.tsMonthBegin :    255
14:43:18.126 -> nvData.rainMonthBegin :    0.0
14:43:18.126 -> nvData.startupPrev :      0
14:43:18.158 -> nvData.rainStartup :    0.0
14:43:18.158 -> nvData.rainPrev :  140.8
14:43:18.158 -> nvData.rainOvf :      0
14:43:18.158 -> [ 31157][I][BresserWeatherSensorMQTTCustom1.9.ino:648] publishWeatherdata(): Ext/Bresser5in1/data: {"id":339744019,"ch":0,"battery_ok":1,"temp_c":12.7,"humidity":92,"wind_gust":2.4,"wind_avg":2.2,"wind_dir":315.0,"uv":0.0,"rain":140.8,"rain_h":0.0,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}
14:43:18.190 ->

If the struct falls back to the initial values without power-on or HW reset (or explicit invocation of the reset function), you have a problem with your RTC RAM.

It's raining at your place... ;-)

Yes it is :-) I have now taken all the changes you made and will log for a day.

Issue seems to be solved as rain_h is being updated and rain_d reset at midnight GMT while rain_w and rain_m are still increasing.
[ 25159][I][BresserWeatherSensorMQTTCustom1.9.ino:538] publishWeatherdata(): Current time (GMT): Sun Nov  5 07:01:08 2023
[  0 ]  [  1 ]  [  2 ]  [  3 ]  [  4 ]  [  5 ]  [  6 ]  [  7 ]  [  8 ]  [  9 ]  [ 10 ]  [ 11 ]  [ 12 ]
22980   23280   23640   23940   24240   24600   24900   21000   21360   21660   22020   22320   22620
146.4   146.4   146.4   146.4   146.4   146.4   146.4   146.4   146.4   146.4   146.4   146.4   146.4
T
H
nvData.tsDayBegin :      0
nvData.rainDayBegin :  146.0
nvData.tsWeekBegin :      6
nvData.wdayPrev :      0
nvData.rainWeekBegin :  141.6
nvData.tsMonthBegin :     10
nvData.rainMonthBegin :  141.6
nvData.startupPrev :      0
nvData.rainStartup :    0.0
nvData.rainPrev :  146.4
nvData.rainOvf :      0
[ 25233][I][BresserWeatherSensorMQTTCustom1.9.ino:653] publishWeatherdata(): Ext/Bresser5in1/data: {"id":339744019,"ch":0,"battery_ok":1,"temp_c":12.3,"humidity":67,"wind_gust":8.2,"wind_avg":7.4,"wind_dir":202.0,"uv":0.0,"rain":146.4,"rain_h":0.0,"rain_d":0.4,"rain_w":4.8,"rain_m":4.8}

Reset should actually occur at midnight local time (not GMT).

Fixed in Release v0.19.4


[FLINK-18125][Azure] Skip e2e execution on docs-only-PRs

What is the purpose of the change
Running an entire 4 hour E2E build for a documentation pull request is quite a resource waste.

We are still running E2E tests on regular master and release-* pushes, because these builds are monitored for build instabilities.
Brief change log

add a new script
modify e2e job definition

Verifying this change
Here's a CI run that is based on a branch that looks like a docs PR: https://dev.azure.com/rmetzger/Flink/_build/results?buildId=8187&view=logs&j=1f3ed471-1849-5d3c-a34c-19792af4ad16

I updated the logic according to your comments. I tested the change again in my private GitHub / Azure account.

Thanks a lot for your review. Merging.


Callback?

Hello Julienh,
question: does the library support callback for each button once event is done?
does FB come with share/feed or only like?
what about including reddit and Y-Combinator?

You can configure the facebook action in order to change the way the button works.
The idea of your callback can be interesting but what would you really want to do with it ?
Reddit is completely in my plans, but what about Y-Combinator, is there some kind of widget or do you talk about Hacker News ?

hacker news


Vickel: Watch 1-808-977-9088

Vickel requests the watch of the watch_number 1-808-977-9088. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

Approved by Jeff Schaller in Charcoal HQ


Staging campaign confirmation page does not appear

Reporting back on a campaign on staging redirects you to the campaign action page (not the campaign confirmation page).   I've confirmed the reportback was actually created.
@angaither Potential bug in #4039 ?

this is Fixed with #4050


[Question]How did you undock the TabView?

Abstract
I can't force Corner Radius for TabViewItem.
What code did you use to undock the TabViewItem?
Please help me......
Screenshots
I am currently creating an app with multi-tabs enabled:

I imported these files(thx for those resources) but it didn't happen:

TabViewItem_shared.xaml
TabView_themeresources.xaml

https://github.com/microsoft/microsoft-ui-xaml/issues/3084
I read this but I cant find solution to this problem.

@duke7553 do you remember what you had to change for this to work?

@onein528 You should be able to use those resources by referencing them like this under your control's resources:
<ResourceDictionary>
     <ResourceDictionary.MergedDictionaries>
         <ResourceDictionary Source="/YourFolderName/TabView_themeresources.xaml" />
         <ResourceDictionary Source="/YourFolderName/TabViewItem_shared.xaml" />
     </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

@onein528 Closing this since it's not directly related to the development of Files.

I will see PR of tab view updating...

Finally, I did!!! Thank you two!!

@onein528 what are you working on?

I am working on GitHub deskto UWP client and am developing to learn C # and MVVM patterns(so this is very bad:).
In the future, I want to make the frame transition when I enter the URL of GitHub.
I'm sorry that the UI of Files is similar.

I'm sorry that the UI of Files is similar(just learning ;) ).

@onein528 having a familiar UI between apps is great and I consider the fact you choose Files a compliment. Do you have a GitHub repository where I can follow the progress?

The quality of the code is terribly bad, but thank you for starring my repo😭

@yaichenbaum I invited you to FluentHub. If you can follow the progress :)


Option to choose if chip is before/after content

Right now, the chip is placed after the content. It'd be ideal if there was a setting to choose to place it before.
This is probably also somehow achievable with CSS, but a simple solution through an option would be great.

I am not sure when I will be able to tackle this.
Please raise a PR. I will review & merge.
Thanks!


hotfix to throw http 404 error for api calls other than init for new users

This resolves an issue caught during QA of ticket #2045 where we got 404 httperror for hitting init api call for new users. This will filter the init api call to not throw 404 error on user not found.

if this is a bugfix for release/6.0, it should be based from that

if this is a bugfix for release/6.0, it should be based from that

No, this was an enhancement kind of ticket, which was intended for proper errors codes from api's. This was intended to go into dev.


TypedCodeGenerator temp fix for crash when printing Closure Library

Temporary fix and demonstrative unit test for TypedCodeGenerator.getFunctionAnnotation() Preconditions failure in NodeUtil.getFunctionParameters(fnNode) when code printing e.g.
goog.removeHashCode = goog.removeUid;

from base.js in Closure Library.
See 4 examples in code below.
I suspect there is some other proper fix that may be apparent to whoever introduced this problem, but this highlights the problem and works around it by printing without type annotations for these cases. I appreciate this PR probably won't be accepted in full but may be in part, so I've submitted as a PR rather than an issue.
This used to work in around June-September 2015 and was noticed to fail in Jan 2016.

@supersteves Can you look at my PR and see if the output in the test cases make sense? Can you elaborate on how they "used to work"?

Sorry @Dominator008 I'm travelling and can't look at this now.
However by "used to work" I meant simply "didn't previously crash", I very much doubt I ever looked in detail at the printed output of that part of the Closure Library.
You see, I have a tool I wrote that prints the entire compilation inputs and equivalent outputs, in a form that allows you to visually dir-diff in the excellent Beyond Compare 4 and see the effect of advanced compilation (with typed code printed to add useful information). Hence the crash. (I mostly use this tool to look at specific problem cases, or to spot check obfuscation / idle curiousity.)

@supersteves You might want to check out the --preserve_type_annotations flag which is better tested and used more often internally at Google. See https://github.com/google/closure-compiler/pull/1490#issuecomment-180180095.

Thanks for the tip, @Dominator008

@supersteves FYI, my PR was rolled back for now because of internal breakage. :(
https://github.com/google/closure-compiler/commit/101e0a43ccd3aad5a7b00848ecbbe31a35f5990b

@Dominator008 No worries, I have a throwaway branch in my fork which works around it, also I have yet to try the alternative code printer suggestion.

@Dominator008 I revisited this and found that as expected the error was still happening due to the rollback, but have now adapted my admittedly fairly obscure use case so that it tolerates internal compiler errors:

tries using the TypedCodeGenerator (which produces a more accurate view of the compiler's awareness of types, or so I think I've seen)
falls back to CodeGenerator with options.preserveTypeAnnotations=true
falls back to CodeGenerator without types at all.

So I am unobstructructed.
However just so you are aware, there are 12 crashes in TypedCodeGenerator when printing the Closure Library (output is from my own process):
Internal compiler error with TypedCodeGenerator for goog/base.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/string/string.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/math/math.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/dom/dom.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/reflect/reflect.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/events/listener.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/async/delay.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/style/transition.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/fx/dom.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/base.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/base.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types
Internal compiler error with TypedCodeGenerator for goog/base.js: java.lang.IllegalArgumentException, falling back to CodeGenerator with preserve types

And there are are 11 crashes in TypedCodeGenerator in my own codebase. One of which ("DomUi", for my own reference) also crashes CodeGenerator:
UnsupportedOperationException: EMPTY is not a string node

I appreciate some/all of these may have been addressed by your change, so please let me know when the fix is back, and I'll re-test and file anything outstanding with more information.
Also incidentally this PR was also submitted to give you a unit test which exposed the problem - in case you want to include it and haven't already. It might also be effective to use the Closure Library itself as an integration test although this may be impractical.

@supersteves Thanks for the thorough report. Yes my PR included your unit test and I think they should address those crashes.
Could you give more detail on the code that crashed CodeGenerator?

It'll take quite a bit of work to get a reproducible case since this is closed source and I don't know where in my DomUi file it is occurring. So I'll wait until your PR is re-rolled before looking at this again.

@supersteves Ok thanks!

TypedCodeGenerator
I appreciate this may already be fixed in the rolled back change. Anyhow...
My code:
            options.setPrettyPrint(true);
            options.setPreserveTypeAnnotations(false);
            resultCode = new CodePrinter.Builder(n)
                .setOutputTypes(true) // adds derived types for functions and constructors
                .setTypeRegistry(compiler.getTypeIRegistry()) // not sure if this is needed now
                .setCompilerOptions(options)
                .setPrettyPrint(true)
                .setSourceMap(sourceMap)
                .build();

Error printing Closure Library (e.g. this is for "goog/async/delay.js"):
java.lang.IllegalArgumentException
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108)
	at com.google.javascript.jscomp.NodeUtil.getFunctionParameters(NodeUtil.java:3561)
	at com.google.javascript.jscomp.TypedCodeGenerator.getFunctionAnnotation(TypedCodeGenerator.java:121)
	at com.google.javascript.jscomp.TypedCodeGenerator.getTypeAnnotation(TypedCodeGenerator.java:77)
	at com.google.javascript.jscomp.TypedCodeGenerator.add(TypedCodeGenerator.java:56)
	at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:592)
	at com.google.javascript.jscomp.TypedCodeGenerator.add(TypedCodeGenerator.java:63)
	at com.google.javascript.jscomp.CodeGenerator.addFunction(CodeGenerator.java:1252)
	at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:344)
	at com.google.javascript.jscomp.TypedCodeGenerator.add(TypedCodeGenerator.java:63)
	at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:592)
	at com.google.javascript.jscomp.TypedCodeGenerator.add(TypedCodeGenerator.java:63)
	at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:92)
	at com.google.javascript.jscomp.CodePrinter.toSource(CodePrinter.java:715)
	at com.google.javascript.jscomp.CodePrinter.access$0(CodePrinter.java:691)
	at com.google.javascript.jscomp.CodePrinter$Builder.build(CodePrinter.java:667)

CodeGenerator
This is the latter rarer case in my closed-source code; the same file "DomUi" also fails as above in TypedCodeGenerator, but here's the crash in CodeGenerator.
My code:
                options.setPrettyPrint(true);
                options.setPreserveTypeAnnotations(true); // instead of commented-out lines below
                resultCode = new CodePrinter.Builder(n)
                    .setCompilerOptions(options)
                    .setPrettyPrint(true)
                    .setSourceMap(sourceMap)
                    .build();

Error printing my code:
java.lang.UnsupportedOperationException: EMPTY is not a string node
	at com.google.javascript.rhino.Node.getString(Node.java:1011)
	at com.google.javascript.jscomp.JSDocInfoPrinter.appendTypeNode(JSDocInfoPrinter.java:247)
	at com.google.javascript.jscomp.JSDocInfoPrinter.appendTypeNode(JSDocInfoPrinter.java:201)
	at com.google.javascript.jscomp.JSDocInfoPrinter.print(JSDocInfoPrinter.java:101)
	at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:101)
	at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:871)
	at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:592)
	at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:92)
	at com.google.javascript.jscomp.CodePrinter.toSource(CodePrinter.java:715)
	at com.google.javascript.jscomp.CodePrinter.access$0(CodePrinter.java:691)
	at com.google.javascript.jscomp.CodePrinter$Builder.build(CodePrinter.java:667)

However DomUi is a large file and is closed source, so I can't give you any more without spending quite a lot more time debugging the compiler. Unless you have some pointers as to what to look for so I can create a debugger URL.
This was from compiler rev 90707a64d4829d97e77ff086dd065eb62511c31d.