Deserialization of abci::Event fails

Deserialization of abci::Event fails
If you look at https://github.com/cometbft/cometbft/blob/main/api/cometbft/abci/v1/types.pb.go#L3012C82-L3012C91 you'll notice omitempty for Type. Trying to find previous similar issues it looks like the same as explained by @ebuchman in https://github.com/informalsystems/tendermint-rs/issues/197
Block 12791634 for DYDX has the following block_results:
    "finalize_block_events": [
      {
        "attributes": [
          {
            "key": "",
            "value": "\n0/dydxprotocol.clob.MsgProposedOperationsResponse",
            "index": false
          }
        ]
      }
    ]

It therefor doesn't have any type, deserialization fails.

Probably Event's serialize impls should run through the proto type (using Serde's try_from/into attributes) and the proto type should have a ProtoJSON compatible Serde impl via pbjson_build.

Example of how this works for a random Penumbra data structure: the CompactBlock rust type serializes through the proto type:
https://github.com/penumbra-zone/penumbra/blob/main/crates/core/component/compact-block/src/compact_block.rs#L20-L21
The corresponding proto type has a generated Serde impl that handles this correctly:
https://github.com/penumbra-zone/penumbra/blob/main/crates/proto/src/gen/penumbra.core.component.compact_block.v1.serde.rs
That code is generated using pbjson_build:
https://github.com/penumbra-zone/penumbra/blob/main/tools/proto-compiler/src/main.rs#L135-L147
There's a bit more machinery here but the upshot is that this fixes the problem in every case. (In Penumbra, we never derive Serde formats from the Rust representation, all our data formats are specified only in protos, with no custom "shaping" of the format, to avoid these kinds of inconsistencies).

The proto file at https://github.com/cometbft/cometbft/blob/main/proto/cometbft/abci/v1/types.proto#L467 shows the type field isn't optional, the generated Rust struct from the proto file wouldn't be optional either and same bug would occur. You'd need to add the same fix serde(default) for this specific field when generating the Rust struct from the proto file.
The fix would be for the Go implementation to not have omitempty.

The proto file at https://github.com/cometbft/cometbft/blob/main/proto/cometbft/abci/v1/types.proto#L467 shows the type field isn't optional

No, it doesn't, it says
string                  type       = 1;

All proto3 fields are optional. A message without a field 1 (in binary protobuf encoding) or a type field (in ProtoJSON) is decoded with type = "" since the empty string is the default value for the Protobuf string scalar type. Additionally, a value of an Event message where type = "" should be encoded without the type field.

Ah nice, wasn't aware all fields were optional. I agree as much as possible should be automated from proto files when possible, my internal code uses default Serde Serialize I definitely need to move to pbjson as well for it.

I agree with @hdevalence that we should eventually move all serialization to ProtoJSON, but that's a much larger piece of work that I would rather do all at once in a dedicated PR (and perhaps only do in the upcoming cometbft-rs library. So for now, let's go with the default annotation.


Log In and Register

why won't it log in and register

Unable to connect the project with firebase.


Updated French and Esperanto translations

This pull request updates the French and Esperanto translations.
Kudos to François Delahaie-Gaspalon for corrections in the French tutorial.

I'll include it, thanks!


Long VC sessions cause renderer to crash

Aknowledgements

[X] I have checked that there's no other issue describing the same or
similar problem that I currently have, regardless if it has been
closed or open.

[X] I can confirm that this is not an issue with the Discord website,
but it is a problem specific to the WebCord itself. I have tested
if this bug occurs on Chromium/Chrome or any other Chromium-based
browser that uses unpatched/upstream Chromium engine.

[ ] I have tried running the build from the master branch and it does
not have any fixes implemented according to my issue.

[ ] My issue describes one of the unstable and/or not fully implemented
features.

[ ] I have found a workaround to mitigate or temporarily fix this issue
in affected releases (please write it in Additional context section
below).

Operating System / Platform
🐧 Linux
Operating system architecture
x64 (64-bit Intel/AMD)
Electron version
21.0.1
Application version
3.8.6
Bug description
After spending around an hour in a voice channel, WebCord's webview/renderer goes blank and the program locks up (except the system tray bar menu.)

I tried tweaking the settings in various ways but still got the same results, always forcing me to restart the app.
I also don't see any odd output from the program, even with the verbose runtime flag.
I'm using Arch + i3wm with WebCord AppImage (I also tried out webcord-bin AUR package, although I know it's not official.)
Screenshot

Additional context
Notice: This issue was automatically generated by WebCord.

Yeah, the bug is kinda weird – it seems to be associated with replacing the console.error or console.warn through. I believe I've fixed this with c1ba49c, you're free to confirm this by testing the artifacts of the builds (or AUR, via webcord-git package).

I've tried out the latest version and it still does the same thing but now it just hangs up.

Ok, it seems that there's then a different cause of this issue…
As you're on i3wm you're on Wayland, right?
Also, are there any errors in the DevTools or standard output (i.e. when running from the terminal)?

Ok, it seems that there's then a different cause of this issue…
As you're on i3wm you're on Wayland, right?
Also, are there any errors in the DevTools or standard output (i.e. when running from the terminal)?

Nope, I'm running Xorg on a hybrid Mesa/NVIDIA system.
Here's the non-verbose log:
Gtk-Message: 07:20:26.620: Failed to load module "colorreload-gtk-module"
[WebSocket] Listening at port 6463.
[835386:1006/072027.927601:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is desktop, ANGLE is
[UPDATE] Application is up-to-date!
[835386:1006/080335.804019:ERROR:gles2_cmd_decoder.cc(18528)] [.RendererMainThread-0x376800351500]GL ERROR :GL_INVALID_OPERATION : DoBeginSharedImageAccessCHROMIUM: bound texture is not a shared image
[835386:1006/080335.832581:ERROR:gles2_cmd_decoder.cc(18556)] [.RendererMainThread-0x376800351500]GL ERROR :GL_INVALID_OPERATION : DoEndSharedImageAccessCHROMIUM: bound texture is not a shared image
[835386:1006/231841.314072:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[835386:1006/232503.218455:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[835386:1006/234102.847030:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
[835401:1007/122604.157227:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -101

And that's it, it still hangs the same way.
Since I'm a new user, I don't know whether it was introduced in recent commits or has been happening even before.

I'm running X11 on a hybrid Mesa/NVIDIA system

That's usefull to know, since I also own NVIDIA hardware and am on X11 desktop. I'm on Arch as well.
Also, what hybrid Mesa/NVIDIA does mean, I don't think you can use NVDIA drivers alongside Nouveau, do you have both integrated / on-board GPU and dedicated GPU card within your computer? If that's the case, you might want to check which card Chromium declares as active by using --gpu-info flag (either basic or complete parameter should give you the detailed information enough about your GPU vendor and model IDs, which you probably don't want to share on the internet if you want to keep the data about your hardware for yourself for any reason).

Ok, now here's what I understand from logs:

Gtk-Message: 07:20:26.620: Failed to load module "colorreload-gtk-module".

This one message makes me to think you did a lot of tweaks to the GTK itself, which I don't know how could affect Electron apps (it's probably fine).

[835386:1006/072027.927601:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is desktop, ANGLE is

I see you're using experimental optimizations. Have you tried turning them off?
As of NVidia you might also need the community-made VA-API driver for propertiary drivers (I use this myself) if you want the hardware acceleration (and probably Chromium; maybe it could crash, but from my tests in the past it shouldn't).

The info you gave me suggests me this is likely a Chromium engine error. The errors below [UPDATE] Application is up-to-date! seem to be an OpenGL errors, which suggest me this is somewhat an issue with the OpenGL rendering in Chromium or maybe a bug in the driver, in which case you might get better results with ANGLE than native GL implementation.

I'm running X11 on a hybrid Mesa/NVIDIA system

That's usefull to know, since I also own NVIDIA hardware and am on X11 desktop. I'm on Arch as well.
Also, what hybrid Mesa/NVIDIA does mean, I don't think you can use NVDIA drivers alongside Nouveau, do you have both integrated / on-board GPU and dedicated GPU card within your computer? If that's the case, you might want to check which card Chromium declares as active by using --gpu-info flag (either basic or complete parameter should give you the detailed information enough about your GPU vendor and model IDs, which you probably don't want to share on the internet if you want to keep the data about your hardware for yourself for any reason).

I can indeed use NVIDIA drivers alongside Nouveau because of Optimus-Manager. (I just switch between them depending on the use-case)
I'm using integrated GPU for apps like WebCord and I've tried running it on a dedicated GPU which was still giving me the same kind of results. So it's not really an issue.

Ok, now here's what I understand from logs:

Gtk-Message: 07:20:26.620: Failed to load module "colorreload-gtk-module".

This one message makes me to think you did a lot of tweaks to the GTK itself, which I don't know how could affect Electron apps (it's probably fine).

Yeah, it does not affect it in any way.

[835386:1006/072027.927601:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is desktop, ANGLE is

I see you're using experimental optimizations. Have you tried turning them off?

Yes, I've tried out different settings, as I've said above.

As of NVidia you might also need the community-made VA-API driver for propertiary drivers (I use this myself) if you want the hardware acceleration (and probably Chromium; maybe it could crash, but from my tests in the past it shouldn't).

I'm actually using libva-mesa/intel-driver instead.

The info you gave me suggests me this is likely a Chromium engine error. The errors below [UPDATE] Application is up-to-date! seem to be an OpenGL errors, which suggest me this is somewhat an issue with the OpenGL rendering in Chromium or maybe a bug in the driver, in which case you might get better results with ANGLE than native GL implementation.

Yeah, I could just run it without any extra tweaks using my integrated GPU and it wouldn't complain about anything, yet still crash after a while:
Gtk-Message: 11:48:57.591: Failed to load module "colorreload-gtk-module"
[WebSocket] Listening at port 6463.
[UPDATE] Application is up-to-date!

I'll clone your repository in my spare time and try to find out what's causing this crash. Since it's voice-chat related, something tells me that it might be the fact that I'm using Pipewire and it used to cause some apps (like Ardour) to crash in the past.

I experience the same issue on Arch + Gnome Wayland. I wanted to add that this also happens on chromium (106.0.5249.91) with the discord website. The only difference is that Chromium doesn't out right freeze, it just displays the "Oh no! The Tab crashed" page.  So this might not be necessarily your bug.

I experience the same issue on Arch + Gnome Wayland on AMD. I wanted to add that this also happens on chromium (106.0.5249.91) with the discord website. The only difference is that Chromium doesn't out right freeze, it just displays the "Oh no! The Tab crashed" page. So this might not be necessarily your bug.

Thank you for sharing with that!
If it is reproducible in Chromium, it is very likely it is reproducible in Electron as well. In most cases the crashes and rendering issues are bugs within Chromium or Electron, not caused by anything on my side. I think I'll just add more appropriate labels to this issue…

Also, I've tested VC under Electron 20.0.3 and I couldn't reproduce this issue there (and I'm not sure about newer Electron versions in 21.x.y branch; there was a Chromium update so that could fix something on that). So, if it still doesn't work for you, you can just rebuild/repackage WebCord under the older Electron version (probably 20.x.y).

Yeah, running it under an older Electron version seems like a viable workaround, I feel dumb for not checking it out earlier.
Hopefully this will get fixed soon.

I'm having this issue too (on the flatpack) on two seperate devices. One is running gnome wayland, and the other is KDE X11. They also are totally different hardware (amd vs intel gpus, pc vs laptop, ect), so I don't think its a hardware or local software issue. After being in a vc for around an hour the whole app will freeze (audio will also stop), I have to fully close webcord (in tray), and restart it.

Yes i also have this issue

Archlinux
KDE
Intel Notebook i5-5300U (Thinkpad t450s)

Deleted all data and installed through flatpak.
Exactly like described by DEFCON001, it freezes after a while.
Webcord options:

[x] Hide menu bar
[ ] Disable hiding window to system tray functionality
[x] flash taskbar button on new message
[x] Hide window to tray with close button
[ ] Allow for translucent window background
[x] Block fingerprinting api.js script
[x] Block known telemetry endpoints
[ ] Block typing indicator

Permissions:

[x] Mic
[ ] Background sync
[x] Desktop capture
[x] Fullscreen
[ ] Notifications
[x] camera
[x] use built-in content security policy

thrd party websites:

[x] all checked

discord instance:

[x] Discord

_

[ ] Dev mode
[x] Cross-origin redirection behavior
[ ] Access to javascript apis (webgl support)
[ ] middle click scrolling

Same here, using flatpak version in Arch. This has been happening for quite a few versions now, and forces me to use the Web version in Firefox whenever I want to join a call

I'll be probably updating to Electron 22 with never Chromium, so there's a chance that will fix it. On X11 I also couldn't reproduce this the last time I've been in VC, but I'm not frequently joining VC so I can't tell if it is still there or not.

I have my doubts that this will fix it. I just had a crash with the latest Chromium (108) and the discord website...

Maybe someone could gather full Electron/Chromium logs just to see what's crashing? You can do this with --enable-loggingand--log-file` flags.
As of the crashes, for some time I'm also experiencing GPU process crashes. This is known issue on Electron/Chromium side and I can't do much about it outside of waiting for Electron to fix it. There's a chance downgrading Electron would help there as well.

Maybe someone could gather full Electron/Chromium logs just to see what's crashing? You can do this with --enable-logging and --log-file flags.
As of the crashes, for some time I'm also experiencing GPU process crashes. This is known issue on Electron/Chromium side and I can't do much about it outside of waiting for Electron to fix it. There's a chance downgrading Electron would help there as well.

I have a long vc tomorrow so I'll run it with those flags and send the logs through if it freezes up. I assume it will save the logs to the directory where the command is run, if not where?

I have a long vc tomorrow so I'll run it with those flags and send the logs through if it freezes up. I assume it will save the logs to the directory where the command is run, if not where?

You probably want to provide it into the --log-file param value (e.g. --log-file=./electron_logs.txt), forgot to mention that.

Hey! Same issue for me. I'm running:

Devuan (Debian) Unstable
Cinnamon
Nvidia on X11

I will try to investigate this further tomorrow.

To be specific, I'm running:

Arch
Sway (Wayland)
AMD 6700 with mesa 22.2.3

So I don't think this is a distro, X11/Wayland or GPU issue. Most likely a general Electron issue in Linux

Well it sound that's a Chromium engine bug and I can't do much about it. And given 20.x.y was confirmed to work just fine, but it will be probably deprecated as soon as Electron 23 will be deprecated, it sounds like we'll have to live with this issue unless Chromium won't fix it before Electron 23 will be released.

Wonder what's going to happen quicker:

Chromium/Discord team fixes this issue (Did anyone report this to their bug trackers? I did contact Discord but they straight up told me that they don't want to deal with anything that is even remotely related to Linux, welp)
webkit2gtk's WebRTC features get adapted widely for Tauri to work properly across all distributions, so we get to develop Tauri-based WebCord alternative.

Place your bets!

Wonder what's going to happen quicker:
* Chromium/Discord team fixes this issue (Did anyone report this to their bug trackers? I did contact Discord but they straight up told me that they don't want to deal with anything that is even remotely related to Linux, welp)

* [webkit2gtk's WebRTC features](https://github.com/tauri-apps/tauri/issues/3961) get adapted widely for Tauri to work properly across all distributions, so we get to develop Tauri-based WebCord alternative.

Place your bets!

For plans of the alternative clients support, I thought of developing a bridge for web apps, maybe not just for WebCord by itself. The goal for it would be to make switching frameworks as easy as just installing one of them, so I guess that would be usefull not only for WebCord. Of course, it would probably be very limited, maybe I'll ask some other Electron devs I know in hope I'll work on it in a group.
For now there's much more reasons than lack of WebRTC that makes me not to switch to Tauri or any other framework at the time. Not only I'm not familiar with their security model (e.g. is it safe to run untrusted remote content? how they sandbox processes to keep everything secure and to not escalate dangerous permissions to the remote scripts?) but also I have no clue about their API support. And Rust framework based on WebKit probably changes nothing in terms of WebKit engine security, at least I don't think it will magically prevent buffer overflows, sandbox escapes, RCEs and all stuff like that if it is present in the WebKit code itself. So yeah, another concerns about another frameworks would be actually a security ones, given Chromium has rather successful security policy – there's a lot more vulnerabilities found in Chromium than in many other browsers, mostly likely to not having more vulnerabilities introduced, but actually keeping larger attention of vulnerability researchers, thanks to their vulnerability rewards program.
I don't want to repeat myself, a full list was under associated discussion about Tauri.

FWIW, in my testing I had to go all the way back to version 3.6.0 of Webcord (appimage version) before the app would stop randomly freezing during voice calls, so I believe that Electron 20.x.y is affected by this as well.

I'm not having this issue at all if I just use the Chromium flatpak to run the Discord site, so maybe this issue needs more attention.

I'm not having this issue at all if I just use the Chromium flatpak to run the Discord site, so maybe this issue needs more attention.

Have you made sure you were using the exactly the same Chromium version as an Electron, like 22.0.0 (i.e. compared patch version)?
Maybe there was a report made to Chromium or they fixed it on their own?
But if it is reproducible in the older versions, but newer are fixed, there's a high probability that these fixes might land to Electron once there will be a Chromium version bump (on 22.x.y).

Oh, that is a good point! I'm on whatever the latest version of Chromium is, I think 108.x.y or something like that. I'll have a look at the Electron versions available and their issues and see if there is anything of note there.

This could be the bug we're talking about on the Electron bug list: https://github.com/electron/electron/issues/36559

Can we reset the renderer if a crash is detected in the mean time?

This seems to have been an issue already for some time; Still, it started occurring for me like... the day before yesterday? Has anything changed regarding this?

Can we reset the renderer if a crash is detected in the mean time?

I read Electron docs again and seems like renderer-process-gone is the right event to look for the crashes and webContents.reload() will work to recover from these crashes. But I might fix this after / while refactoring code, I dunno what to do with WebCord v4 for now, definitely it won't be used right now for new features implementations. The goal for me now is to analyze entire WebCord's codebase, put as much of it outside of the main window's scope and implement as much of the stuff as it is possible within separate modules to make it easier to browse the code. I might also finally put some stuff outside of WebCord, as separate NPM modules that everyone could use with their own software.

I am using Chromium 110/Electron 23 for some time now and have yet to encounter a crash. Sooooo upgrading Webcord to Electron 23 should propably fix this issue (I am already using it with E23 right now)

I am using Chromium 110/Electron 23 for some time now and have yet to encounter a crash. Sooooo upgrading Webcord to Electron 23 should propably fix this issue (I am already using it with E23 right now)

I would also like to try this, but I never was able to wrap my head around building WebCord on my own. Any pointers?

Can confirm electron23 fixes the issue. Haven't encountered a crash after several hours.

@zimsneexh
For any users looking at a quick fix you can run the app.asar with electron raw to get access to this quick.
Gentoo has from source electron 23 available under pf4public overlay.

Confirmed, upgrade your electron to 23, issue fixed.
If you use your package manager to obtain electron 23 and then run the app.asar under it, everything runs perfect for hours.

Confirmed, upgrade your electron to 23, issue fixed.
If you use your package manager to obtain electron 23 and then run the app.asar under it, everything runs perfect for hours.

Is there any reason to why WebCord hasn't been updated to use Electron 23 yet?

Confirmed, upgrade your electron to 23, issue fixed.
If you use your package manager to obtain electron 23 and then run the app.asar under it, everything runs perfect for hours.

Is there any reason to why WebCord hasn't been updated to use Electron 23 yet?

Development is frozen for a while, I don't have much free time to invest for it + I still want to avoid working on v4 and mostly focus on v5 development.

Closing since this issue is greatly outdated, WebCord now both includes the protections for renderer crashes, tries to recover from them and definitely was updated to version >=23.x.y


GetVariantAsync always returns null

When I use IsEnabledAsync(), it works as expected.
If the flag is enabled, IsEnabledAsync returns true.
If the flag is disabled, IsEnabledAsync returns false.
But I cannot get GetVariantAsync() to return a non-null value, no matter what I do.
Below is my config, code, expected output, and actual output.
Feature flag FLAG_X config,
{
	"id": "FLAG_X",
	"description": "",
	"enabled": true,
	"variants": [
		{
			"name": "A",
			"configuration_value": "A"
		},
		{
			"name": "B",
			"configuration_value": "B"
		},
		{
			"name": "C",
			"configuration_value": "C"
		}
	],
	"allocation": {
		"percentile": [
			{
				"variant": "A",
				"from": 0,
				"to": 30
			},
			{
				"variant": "B",
				"from": 30,
				"to": 60
			},
			{
				"variant": "C",
				"from": 60,
				"to": 100
			}
		],
		"default_when_enabled": "A",
		"default_when_disabled": "A"
	},
	"telemetry": {
		"enabled": true
	}
}

Feature Flag FLAG_Y config,
{
	"id": "FLAG_Y",
	"description": "",
	"enabled": true,
	"conditions": {
		"client_filters": []
	}
}

Feature Flag FLAG_Z config,
{
	"id": "FLAG_Z",
	"description": "",
	"enabled": true,
	"variants": [
		{
			"name": "Off",
			"configuration_value": false
		},
		{
			"name": "On",
			"configuration_value": true
		}
	],
	"allocation": {
		"percentile": [
			{
				"variant": "Off",
				"from": 0,
				"to": 50
			},
			{
				"variant": "On",
				"from": 50,
				"to": 100
			}
		],
		"default_when_enabled": "Off",
		"default_when_disabled": "Off"
	},
	"telemetry": {
		"enabled": false
	}
}

C# code,

    var builder = WebApplication.CreateBuilder(args);
    var configuration = builder.Configuration
        .AddAzureAppConfiguration(options =>
        {
            options
                .Connect("SOME CONNECTION STRING")
                .UseFeatureFlags();
            builder.Services.AddSingleton(options.GetRefresher());
        })
        .Build();

    IFeatureDefinitionProvider featureDefinitionProvider = new ConfigurationFeatureDefinitionProvider(configuration);

    IVariantFeatureManager featureManager = new FeatureManager(
        featureDefinitionProvider,
        new FeatureManagementOptions());

//...

    var t = new Task(async () =>
    {
        await foreach (var n in featureManager.GetFeatureNamesAsync())
        {
            Log.Information($"n: {n}");
            var variant = await featureManager.GetVariantAsync(n);
            var variant2 = await featureManager.GetVariantAsync(n, new TargetingContext()
            {
                UserId = "TestId",
                Groups = new string[] { },
            });
            var enabled = await featureManager.IsEnabledAsync(n);
            Log.Information($"{n} variant is null: {variant == null}");
            Log.Information($"{n} variant2 is null: {variant2 == null}");
            Log.Information($"{n} enabled: {enabled}");
        }
    });
    t.Start();

Expected output,
[01:26:10 INF] n: FLAG_X
[01:26:10 INF] FLAG_X variant is null: False
[01:26:10 INF] FLAG_X variant2 is null: False
[01:26:10 INF] FLAG_X enabled: True
[01:26:10 INF] n: FLAG_Y
[01:26:10 INF] FLAG_Y variant is null: True
[01:26:10 INF] FLAG_Y variant2 is null: True
[01:26:10 INF] FLAG_Y enabled: True
[01:26:10 INF] n: FLAG_Z
[01:26:10 INF] FLAG_Z variant is null: False
[01:26:10 INF] FLAG_Z variant2 is null: False
[01:26:10 INF] FLAG_Z enabled: True

Actual output,
[01:26:10 INF] n: FLAG_X
[01:26:10 INF] FLAG_X variant is null: True
[01:26:10 INF] FLAG_X variant2 is null: True
[01:26:10 INF] FLAG_X enabled: True
[01:26:10 INF] n: FLAG_Y
[01:26:10 INF] FLAG_Y variant is null: True
[01:26:10 INF] FLAG_Y variant2 is null: True
[01:26:10 INF] FLAG_Y enabled: True
[01:26:10 INF] n: FLAG_Z
[01:26:10 INF] FLAG_Z variant is null: True
[01:26:10 INF] FLAG_Z variant2 is null: True
[01:26:10 INF] FLAG_Z enabled: True

Hi, @AnyhowStep Which version of feature management package you are using?
I got the expected output on my side. I tried both DI and non-DI usages.
My code:
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.FeatureManagement;
using Microsoft.FeatureManagement.FeatureFilters;

//
// Setup configuration
IConfiguration configuration = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json")
    .Build();

//
// DI usage
IServiceCollection services = new ServiceCollection();

services.AddSingleton(configuration)
        .AddFeatureManagement();

//
// Get the feature manager from application services
using (ServiceProvider serviceProvider = services.BuildServiceProvider())
{
    IVariantFeatureManager featureManager = serviceProvider.GetRequiredService<IVariantFeatureManager>();

    await foreach (var n in featureManager.GetFeatureNamesAsync())
    {
        Console.WriteLine($"n: {n}");
        var variant = await featureManager.GetVariantAsync(n);
        var variant2 = await featureManager.GetVariantAsync(n, new TargetingContext()
        {
            UserId = "TestId",
            Groups = new string[] { },
        });
        var enabled = await featureManager.IsEnabledAsync(n);
        Console.WriteLine($"{n} GetVariant is null: {variant == null}");
        Console.WriteLine($"{n} GetVariant with context is null: {variant2 == null}");
        Console.WriteLine($"{n} enabled: {enabled}");
    }
}

//
// Non-DI usage
var featureDefinitionProvider = new ConfigurationFeatureDefinitionProvider(configuration);

IVariantFeatureManager featureManager2 = new FeatureManager(
    featureDefinitionProvider,
    new FeatureManagementOptions());

await foreach (var n in featureManager2.GetFeatureNamesAsync())
{
    Console.WriteLine($"n: {n}");
    var variant = await featureManager2.GetVariantAsync(n);
    var variant2 = await featureManager2.GetVariantAsync(n, new TargetingContext()
    {
        UserId = "TestId",
        Groups = new string[] { },
    });
    var enabled = await featureManager2.IsEnabledAsync(n);
    Console.WriteLine($"{n} GetVariant is null: {variant == null}");
    Console.WriteLine($"{n} GetVariant with context is null: {variant2 == null}");
    Console.WriteLine($"{n} enabled: {enabled}");
}

Feature flag in appsettings,json:
{
  "feature_management": {
    "feature_flags": [
      {
        "id": "FLAG_X",
        "description": "",
        "enabled": true,
        "variants": [
          {
            "name": "A",
            "configuration_value": "A"
          },
          {
            "name": "B",
            "configuration_value": "B"
          },
          {
            "name": "C",
            "configuration_value": "C"
          }
        ],
        "allocation": {
          "percentile": [
            {
              "variant": "A",
              "from": 0,
              "to": 30
            },
            {
              "variant": "B",
              "from": 30,
              "to": 60
            },
            {
              "variant": "C",
              "from": 60,
              "to": 100
            }
          ],
          "default_when_enabled": "A",
          "default_when_disabled": "A"
        },
        "telemetry": {
          "enabled": true
        }
      },
      {
        "id": "FLAG_Y",
        "description": "",
        "enabled": true,
        "conditions": {
          "client_filters": []
        }
      },
      {
        "id": "FLAG_Z",
        "description": "",
        "enabled": true,
        "variants": [
          {
            "name": "Off",
            "configuration_value": false
          },
          {
            "name": "On",
            "configuration_value": true
          }
        ],
        "allocation": {
          "percentile": [
            {
              "variant": "Off",
              "from": 0,
              "to": 50
            },
            {
              "variant": "On",
              "from": 50,
              "to": 100
            }
          ],
          "default_when_enabled": "Off",
          "default_when_disabled": "Off"
        },
        "telemetry": {
          "enabled": false
        }
      }
    ]
  }
}

My output:

Could you provide more information so that I can debug for you? Maybe you can put your code in a public github repo, so that I can download it and run it?

I'm not using appsettings.json.
It seems like loading variants from appsettings.json works.
But my current need is using Microsoft.Extensions.Configuration() and AddAzureAppConfiguration().
The use-case is trying to load feature flag variants from an Azure App Configuration resource.
Could you check if that works for you?

Hi, @AnyhowStep Sorry for the inconvenience. I think the reason of your issue is that you are using the latest preview version of our configuration provider pacakge
At first, I used 7.3.0 and then I get the same output as yours. Then, I switched to 8.0.0-preview.3 and I got the expected result.
Could you try to upgrade the configuration provider pacakge and see whether this issuse still exists?

Which version of feature management package you are using?

Sorry I never answered.
But, yes, I was on 7.3.0 of Microsoft.Extensions.Configuration.AzureAppConfiguration, and 4.0.0-preview4 of Microsoft.FeatureManagement.
And after updating to 8.0.0-preview.3, it works as expected.
Thank you for solving this so quickly! =)


Create 2390-removing-stars-from-a-string.java

File(s) Modified: 2390. Removing Stars From a String
Language(s) Used: Java
Submission URL:  https://leetcode.com/problems/removing-stars-from-a-string/submissions/970905577/

Important
Please make sure the file name is lowercase and a duplicate file does not already exist before merging.

This solution is the same as the existing solution


Update broken link in readme

http://xtnodes.com/ is good for non-technical users, also https://bitcoinxt.software/ is showing a 404

It will stop showing a 404 soon.


Teach Enlistment.GetNewGVFSLogFileName to take FileSystem parameter

This will enable the Enlistment.GetNewGVFSLogFileName method to interact with
the file system through the file system abstraction layer, enabling us to unit
test this method and methods that call this method.
With this change, the GitHubUpgrader tests should no longer create actual directories when running the unit tests.

One suggestion. Using new PhysicalFileSystem() in the GetNewLogFileName method will make this change much smaller.

I like the idea of reducing the impact on call sites. I tweaked the method to optionally take in a PhysicalFileSystem, but not require it.


Help getting pulling stats from exporter.

Running a kubernetes cluster and I am able to curl http://nvidia-gpu-exporter-1705447598.dev:9835/metrics and get data from all my nodes. I am struggling with how to get that data into grafana. I tried going to grafana and adding a new Permetheus connection, but I am not able to see any metrics.

Since it's a Kubernetes cluster, I can recommend looking into the kube-prometheus-stack helm chart. Setting it up and configuring is not trivial, but at the end you'll have everything you need.

Added the following to flow-grafana-agent config map at it works! Thanks.
	discovery.kubernetes \"nvidiaExporterPods\" {
	  selectors {
	    label = \"app.kubernetes.io/name=nvidia-gpu-exporter\"
	    role = \"pod\"
	  }
	  role = \"pod\"
	}

	prometheus.scrape \"nvidiaExporterScrape\" {
	  forward_to = [
	    prometheus.remote_write.mimir.receiver,
	  ]
	  targets = discovery.kubernetes.nvidiaExporterPods.targets
	  metrics_path = \"/metrics\"
	  scrape_interval = \"10s\"
	}

Added the following to flow-grafana-agent config map at it works! Thanks.
	discovery.kubernetes \"nvidiaExporterPods\" {
	  selectors {
	    label = \"app.kubernetes.io/name=nvidia-gpu-exporter\"
	    role = \"pod\"
	  }
	  role = \"pod\"
	}

	prometheus.scrape \"nvidiaExporterScrape\" {
	  forward_to = [
	    prometheus.remote_write.mimir.receiver,
	  ]
	  targets = discovery.kubernetes.nvidiaExporterPods.targets
	  metrics_path = \"/metrics\"
	  scrape_interval = \"10s\"
	}


Diameter of Binary Tree #3682

Have you read the Contributing Guidelines on Pull Requests?
Yes
Description
A binary tree is a tree-type non-linear data structure with a maximum of two children for each parent.
The diameter of a tree is the number of nodes on the longest path between two end nodes.
Checklist

[x] I've read the contribution guidelines.
[x] I've checked the issue list before deciding what to submit.
[x] I've edited the README.md and link to my code.

Related Issues or Pull Requests
This PR is made under issue #3682. Kindly review it.

Kindly review my PR @HarshCasper @anushkrishnav


[Bug] UX : On creating a space the suggestion are displayed to user and it becomes a little annoying

Steps to reproduce:

Add a JS function
Click on the code section
Click on space
and observe suggestions appear

Observation:
It is observed that the suggestion are displayed to user when he wants to create a simple space this would become very annoying to user
Expectation:
the suggestion must be displayed to the user when the slash is typed

This is duplicate of https://github.com/appsmithorg/appsmith/issues/6243


contributing.md file added

contributing file added

I think now it's fine. please check it.

I think now it's fine. please check it.

@all-contributors please add @luckykumarirai for doc

@all-contributors please add @luckykumarirai for doc

@all-contributors please add @luckykumarirai for doc

@all-contributors please add @luckykumarirai for doc


Error when creating new release: version number validation

When attempting to create a new themes release (version 4.0.0), an error occurs after submitting the form in Create Release dialog. The error message states: The new release should be bigger than previous version which is 3.0.2
Screenshot: Create Release form

Screenshot: Floristyle version in metadata (in the flex file)

I've forwarded this issue to Ali as he knows best why this probably goes wrong

Hi it should be fixed could you try again and let us know
Thank you for your collaboration


docs: Add doc ippool-affinity-pod.md

Signed-off-by: iiiceoo<EMAIL_ADDRESS>

@Michelle951 Please give some suggestions for modification. Thank you!


work around non-deterministic sorts in Masterminds/semver

Fixes #313
There are upstream fixes opened related to this as well, but it's unclear how long it will be before we can take advantage of those fixes here.
This PR cribs code from Argo CD Image Updater and Masterminds/semver and makes minimal modifications to correct the root issue.

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@1e0d664). Click here to learn what that means.
The diff coverage is n/a.

:exclamation: Current head 1b0d1d1 differs from pull request most recent head 437b59e. Consider uploading reports for the commit 437b59e to get more accurate results

@@           Coverage Diff           @@
##             main     #335   +/-   ##
=======================================
  Coverage        ?   52.66%
=======================================
  Files           ?       40
  Lines           ?     3731
  Branches        ?        0
=======================================
  Hits            ?     1965
  Misses          ?     1690
  Partials        ?       76


{"detail":"Failed to parse request body as JSON: EOF","status":400}

{"input":{"img":"data:image/jpeg;base64,/9j/4A....","scale":4,"version":"v1.4"},"is_training":false,"version":"6129309904ce4debfde78de5c209bce0022af40e197e132f08be8ccce3050393"}

@hktalent It looks like Replicate's API is rejecting the request because the base64-encoded image data URI is malformed or (more likely) too large. Consider uploading your image to a URL and passing that instead.

@mattt Okay, I understand. Can you give me an example of replicating a temporary image? Thank you so much

@hktalent You can find plenty of examples for uploading files to AWS S3 /  Cloudflare R2, services like upload.io, or to your own server using SFTP. It all depends on your particular requirements.


Formatting issues with the dev branch

@lucakato Documenting here what we've emailed about.
Ogemaw template issue
This issue might be because the template has been updated but Ogemaw's template hasn't?

Generated using
updated_ACFR_Ogemaw_template.xlsx a
Clayton issues
Header/subheader rows don't show up or get color-coded correctly
Dev branch Clayton:

Expected (output using code on main branch):

@kwheelan I've addressed this, merged to dev. perhaps a double check may be good tho.

@lucakato Looks good!


Resource not found: turtlebot3_description_reduced_mesh

Resource not found: turtlebot3_description_reduced_mesh
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/robomaker/workspace/helloworld-robot-app/hello_world_robot/share
ROS path [2]=/opt/ros/melodic/share
The traceback for the exception was written to the log file
when I run the docker image this is the feedback I get

Update Dockerfile by adding "--include-eol-distros" to "rosdep update", regarding missing turtlebot3 issue.


Task: Fix OPA versus spatial joins

When assembling the dataset, only gun crimes, neighborhoods, rcos, and tree canopy cover need to be spatially joined. Everything else can be joined on opa_id.

L&I needs to be spatially joined also, yeah?


New version killed app

After I updated to 2.8.1 whenever I swipe to the next page of a gallery it pulls me out of the gallery

I tried on Android 16, 29 and 30 but I couldn't reproduce. Which android version do you have? Also do you have some particular setting enabled?

I've got android 10 and I don't have any setting that would mess with that type of thing. I've only really changed 2 settings, I set a pin and hid content from multitasking

I just checked the app again and it seems like it managed to fix itself. I've done nothing to fix it but it works fine now


Publish 8.1-20230322000730+0000

Publish 8.1-20230322000730+0000

@bot-gradle test and merge

Your PR is queued. See the queue page for details.

I've triggered a build for you.


Refactor to allow for multiple plugins in the repo

Description of changes:
Refactors the repository so that we can have multiple plugins under this repo.
This is in advance of adding a new "smithy-base-plugin" convention plugin that will handle the set up of the source sets/configurations/base tasks needed by all smithy gradle use cases.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This is in advance of adding a new "smithy-base-plugin" convention plugin that will handle the set up of the source sets/configurations/base tasks needed by all smithy gradle use cases.

I would expect smithy-base-plugin to be the name of the capability plugin, not the convention plugin. See:
https://docs.gradle.org/nightly/userguide/designing_gradle_plugins.html#capabilities-vs-conventions


using pandas.api.types.isnumber to check args, rather than type inspe…

…ction

Codecov Report

Merging #136 (354c99a) into master (017605e) will decrease coverage by 0.21%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
- Coverage   95.99%   95.78%   -0.22%
==========================================
  Files          34       34
  Lines        1998     1920      -78
==========================================
- Hits         1918     1839      -79
- Misses         80       81       +1

Impacted Files
Coverage Δ

staircase/core/layering.py
98.01% <100.00%> (ø)

staircase/__init__.py
91.30% <0.00%> (-4.35%)
:arrow_down:

staircase/core/slicing.py
92.40% <0.00%> (-0.62%)
:arrow_down:

staircase/core/arrays/__init__.py
97.22% <0.00%> (-0.56%)
:arrow_down:

staircase/core/arrays/extension.py
95.09% <0.00%> (-0.47%)
:arrow_down:

staircase/core/stats/distribution.py
93.67% <0.00%> (-0.38%)
:arrow_down:

staircase/core/stairs.py
95.12% <0.00%> (-0.27%)
:arrow_down:

staircase/core/ops/logical.py
92.00% <0.00%> (-0.21%)
:arrow_down:

staircase/core/ops/arithmetic.py
94.73% <0.00%> (-0.20%)
:arrow_down:

staircase/core/ops/common.py
90.19% <0.00%> (-0.19%)
:arrow_down:

... and 5 more

Continue to review full report at Codecov.

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


Full login/signup functionality

Implement Firebase Auth in the same way as supported on the old Dante Android App. Users should be able to login with Google, Email and anonymously. Furthermore, anonymous users should be able to upgrade to an email account later on.
One special requirement is to use the Google Sign-In dependency for Google signup, as these credentials are later on required to access the Google Drive backups

[x] Login with Google
[x] Login anonymously
[x] Login with Email
[x] Upgrade from anonymous user to email user

@shockbytes This looks like a fun ticket that I'd like to take on.
If I might make a suggestion, it might be worth splitting this into 2 tickets instead.
1st Ticket

Login with Google
Login anonymously
Login with Email
2nd Ticket
Upgrade from anonymous user to email user
What do you think?

Absolutely, we can also split it further, as Email login is itself quite a topic.
 Maybe we do a ticket for each form of login then?

Also I've never used GitHub projects before, just getting my head around the workflow. I see that this issue has 4 tasks that we can sign off against, will have a go at the Login with Google task then.

Google sign in completed by pull PR #35
Anonymous sign in completed by PR #36

@lockieRichter do you think we should create a separate ticket for email login and the anonymous user upgrade?

@lockieRichter I create a couple of subtasks for the complete login feature. Please find them referenced above.

@shockbytes perfect, thank you!

@shockbytes can you move this to done please.

@lockieRichter can we consider this issue as done?

@shockbytes I think so, a user can login with google, email or anonymously, can reset their password and can upgrade from an anonymous account to email based.


Error when saving a PIREP without filling some fields and attempting to edit it

Describe the bug
Hi @Nabeel,
By default, when you open the manual PIREP form, there are no required fields. In our case the issue was the aircraft field. By default, when you load the PIREP form, it will show all fields blank, including the aircraft field. In this particular case, we had saved the PIREP before assigning an aircraft to it, just leaving the field blank. The result was that a NULL entry in the database was created for aircraft ID. When we tried to edit the PIREP the Ooops something went wrong message came up as a PHP error was generated.
Logging into phpMyAdmin, manually changing the NULL value to any valid aircraft ID makes the EDIT form come up normally and without an error. I could imagine that the error would occur as well if other fields were left empty and get assigned NULL as a result.
My suggestion would be to either mark those fields as required, hence preventing a PIREP to be saved without all required information entered first, or have the fields contain some kind of default value, which is accepted by the database. In the case of Aircraft maybe something like "Please select Aircraft" which is assigned ID 1... or possibly as a third option, go ahead and change the mySQL table in such a way, that the value NULL is accepted and no longer causing an error.
I hope this helps you.
Version
<IP_ADDRESS> Beta
To Reproduce
Just go to file a manual PIREP and leave the aircraft field (or possibly other fields but not tested) blank, save the PIREP and then try to Edit it again.
Expected behavior
The PIREP Edit form should open without any error, allowing to edit / submit the manual PIREP.

@buske-it Can you try the latest dev version from the repo or from here?
http://downloads.phpvms.net/phpvms-7.0.0-dev.tar.gz
I think I had addressed that. If you still see it in dev, I'll mark it as a proper bug and fix it. Thanks!!

Is there an easy way to upgrade the current install? The manual is not mentioning anything...
Also, I have tried to download the above package this morning and uploaded it... However, it would come up only with a blank page... nothing else... no installer... Anything I am missing here?
Let me know and I will be happy to test it for you.
Cheers

You should just have to overwrite the files. Blank page, nothing in storage/logs?

I just uploaded it into a test directory and just get a blank page where the installer should be. It works fine with the regular download. Anyway, I made a backup. Tomorrow I will do it as you mentioned it, just overwriting the files.
Give me until later in the morning and I will let you know if it worked.
Cheers

Hi Nabeel,
as I mentioned on Discord, I have checked now and the error still exists in the latest dev version.
You have marked the flight number and the arrival and destination airports as required. However, you did not mark the aircraft field as required. Hence in the database it gets assigned NULL:

This in return causes a PHP error when you try to edit the PIREP after saving it:

It is calling function load() on null, which is not possible. Assigning an aircraft ID manually via phpmyadmin to the PIREP fixes the issue.
I suggest making the aircraft field required as well. That way you are forcing the user to fill it out, preventing the error.
To reproduce: File a manual PIREP and leave the aircraft field default (blank) as it is. Save the PIREP then try to edit it. The above PHP error comes up.
Cheers


Cant add atm cracker to jobs

Well, i added the atm cracker to some jobs. .  I checked multiple times..  there is nothing wrong with the code also as i wont get errors in the client or server console. I just dont spawn with it also as i cant spawn it via the context menu. .  (yea i am sadmin). if i spawn it via toolgun im just getting the prop nothing more. .

Works just fine for me. Check for conflicts with other addons.

@mark i tried it with addon only aswell, nothin worked..

Did you configure it in the ingame config (I think arc_admin_menu or so in console)

Please provide your code (formatted) so others can look.


Update null safety version.

Seems like author MIA. I have published a new v2 package.
Please refer to https://pub.dev/packages/motion_tab_bar_v2.

@aminsamad RTL support is now available on the new release (v2.0.3) with fixed pesky bugs, and supports Flutter 3 also.


[core-amqp] fix remaining eslint errors

Fixes #10775
Brings existing 19 issues down to 0 and makes lint errors fail CI.
Notable: I had to pull the websockets test out into separate browser and node.js files. This was because previously, we were using require to conditionally pull in the ws dependency for node.js, but the linter wants us to stop usage of require. There are dynamic import statements but not with es6 modules (it requires es2020 I believe). Separating the test by runtime let me use ES2015 imports to import ws just in node.js.

/azp run js - eventhubs-client - tests


The webhook response body should support dynamic fields (imagine things like IDs, Dates, etc)

Great idea! Do you feel like creating a PR?


dev release support

Sorry, but I don't see any reason to merge it right now. This is not the final state of the RDP and there might be additional changes. And I don't want to increment the version on each such change. I would agree if the final version looked like this <version>-dev-<number> but it does not have this format.
@Nikita-Smirnov-Exactpro @isengrims We can discuss that separately.


Quickstart fails: HTTP 401 Unauthorized

When trying to run the benchmark on Jetson, quickstart step 4 fails on an unauthorized HTTP response.
 => ERROR [internal] load metadata for nvcr.io/nvidia/isaac/ros:aarch64-r  0.4s
------
 > [internal] load metadata for nvcr.io/nvidia/isaac/ros:aarch64-ros2_humble_33836e394da2d095a59afd2d151038f8:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch anonymous token: unexpected status: 401 Unauthorized
Failed to build base image: isaac_ros_dev-aarch64, aborting.

We're aware of this issue and still trying to find a permanent solution. In the meantime, please try manually authenticating with NGC as described here.


[Feature] Sign Up Support For OSF Registries [OSF-7753] [CAS-59]

Purpose
Add Sign Up Support For OSF Registries.

Changes

Sign Up page has OSF Registries banner and title.
Users registered from OSF Registries receive dedicated confirmation email
Users land on OSF Registries home page after confirmation

For Sign In Changes, see https://openscience.atlassian.net/browse/CAS-59.
Deployment Notes
@brianjgeiger
Need @binoculars's code for EOSF to enable this feature.
Side effects
No
Ticket
Sign Up Support: https://openscience.atlassian.net/browse/OSF-7753
Sing In Support: https://openscience.atlassian.net/browse/CAS-59

Ready for CR and my travis passed: https://travis-ci.org/cslzchen/osf.io/builds/218987492.

Back to AD, need to update Sentry.

Failure is unrelated. Mine travis passed: https://travis-ci.org/cslzchen/osf.io/builds/223263786.

@icereval Target master. Ready after tests pass.


analytics.identify doesn't accept null values

It seems that passing properties with null values as second argument breaks the analytics script.

analytics.min.js:3 Uncaught TypeError: Cannot read property 'constructor' of null
    at analytics.min.js:3
    at analytics.min.js:1
    at p (analytics.min.js:1)
    at u (analytics.min.js:1)
    at i (analytics.min.js:1)
    at e.o.136.u.identify (analytics.min.js:3)
    at analytics.min.js:6
    at c (analytics.min.js:1)
    at u (analytics.min.js:1)
    at e.o.318.n.flush (analytics.min.js:6)
(anonymous) @ analytics.min.js:3
(anonymous) @ analytics.min.js:1
p @ analytics.min.js:1
u @ analytics.min.js:1
i @ analytics.min.js:1
o.136.u.identify @ analytics.min.js:3
(anonymous) @ analytics.min.js:6
c @ analytics.min.js:1
u @ analytics.min.js:1
o.318.n.flush @ analytics.min.js:6
o.340.e.exports @ analytics.min.js:7
n @ analytics.min.js:7
o.345.o.emit @ analytics.min.js:7
o.318.n.ready @ analytics.min.js:6
o.340.e.exports @ analytics.min.js:7
(anonymous) @ analytics.min.js:6
(anonymous) @ analytics.min.js:8

@renanvalentin what was the loc that triggered this?

Hi @f2prateek,
"if ("object" == typeof e && e.constructor !== Date)"
  u.prototype.identify = function(t) {
                var e = t.traits({
                    name: "displayName"
                })
                  , n = s(function(t, e, n) {
                    if ("object" == typeof e && e.constructor !== Date)
                        return t;
                    "id" !== n && (t["displayName" === n || "email" === n ? n : o(n, e)] = e);
                    return t
                }, {}, e);
                if (t.userId())
                    window.FS.identify(String(t.userId()), n);
                else {
                    n.segmentAnonymousId_str = String(t.anonymousId());
                    window.FS.setUserVars(n)
                }
            }

Sorry I was asking what code you were calling that triggered this. analytics.identify(null)?

fwiw that loc you pointed out isn't in a.js but in the fullstory integration specifically https://github.com/segment-integrations/analytics.js-integration-fullstory/blob/master/lib/index.js#L66-L82

it was on identify method:
analytics.identify(user.id, {
      a: user.a,
      b: user.b // My guess is that B being null was breaking the identify method.
 });

@lukehamilton I'm not sure... it seems that didn't fix it.

This was an issue in the fullstory integration and not analytics.js. It will be fixed in the next few days.


Ephemeral Agents

Add support for ephemeral agents
https://docs.terrakube.io/getting-started/deployment/ephemeral-agents
This will require to create Service Account, Role Name and Role Binding

Duplicated #132


fix: author twitter cards

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)

Closes #https://github.com/freeCodeCamp/freeCodeCamp/issues/42977

Currently, Ghost doesn't show a large Twitter card with the default publication image (https://cdn.freecodecamp.org/platform/universal/fcc_meta_1920X1080-indigo.png, which is uploaded to each Ghost instance) if an author page doesn't have a cover image.
This PR adds some extra meta tags with the default publication image (from the CDN to work across all instances), and dimensions if an author doesn't have a cover image. Also, it moves the seo block below the ghost_head helper to override some of the default values that helper gives us.
These changes are deployed to Español News for testing. We can use https://cards-dev.twitter.com/validator to check these author pages:

https://www.freecodecamp.org/espanol/news/author/matias/ (no cover image)
https://www.freecodecamp.org/espanol/news/author/rafael/ (cover image)

Works great. the css build files seems suspicious at first, but it seems like they are coming from pervious changes.

Thanks for checking this out @nhcarrigan and @ahmadabdolsaheb.
Sorry about the noise with the CSS files. I usually leave out everything from the /build directory if the PR doesn't touch any of those files, but I figure they haven't been updated in some time.


Fix for Issue 51

Update the use of the Refinery::Settings API so that this engine works against edge. Please review and let me know if I'm headed in the correct direction. I can squash before you guys pull the changes if you like as well.
#51

Hey @soupmatt,
Sorry for checking your pr only now. The issue was fixed in recent namespace change so I'm going to close this. Thanks for your time and effort!

No problem, I realized that the way I wrote my specs wouldn't run
under 1.8.7, so it would need additional fixing anyway.
On Feb 5, 2012, at 12:15 PM, "Uģis Ozols"
<EMAIL_ADDRESS>wrote:

Hey @soupmatt,
Sorry for checking your pr only now. The issue was fixed in recent namespace change so I'm going to close this. Thanks for your time and effort!

Reply to this email directly or view it on GitHub:
https://github.com/resolve/refinerycms-inquiries/pull/53#issuecomment-3819421


Accessing options for dynamically generate sub-commands

import picocli.CommandLine;

import static picocli.CommandLine.*;
import static picocli.CommandLine.Model.*;

public class Demo {

  public static void main(String[] args) {
    CommandSpec rootSpec = CommandSpec.create();

    final String commandName = "determined-at-runtime-from-remote-source";
    rootSpec.addSubcommand(
        commandName,
        CommandSpec.wrapWithoutInspection(
                new Runnable() {
                  @Override
                  public void run() {
                    System.out.println("How do we access value of 'runtime-option-a'?");
                  }
                })
            .addOption(OptionSpec.builder("runtime-option-a").build()));

    System.exit(new CommandLine(rootSpec).setExecutionStrategy(new RunLast()).execute(commandName));
  }
}

Hi Folks,
We are building a CLI that dynamically creates sub-commands and options associated with those sub-commands.
We aren't able to figure out a way to make the CommandSpec available at command execution time in order to access the user provided value for the option.
Could you please direct us on how we would be able to access option values?
Note that we are unable to use annotations as the sub-commands and their options are determined at runtime on each invocation of the CLI.
TIA

Hi @techthumb, thanks for raising this!
I would do this:
import picocli.CommandLine;

import static picocli.CommandLine.*;
import static picocli.CommandLine.Model.*;

public class Demo {

    public static void main(String[] args) {
        final CommandSpec rootSpec = CommandSpec.create();

        final String commandName = "determined-at-runtime-from-remote-source";
        rootSpec.addSubcommand(
                commandName,
                CommandSpec.wrapWithoutInspection(
                        new Runnable() {
                            @Override
                            public void run() {
                                CommandLine me = rootSpec.subcommands().get(commandName);
                                System.out.printf("Running %s...%n", commandName);

                                CommandSpec spec = me.getCommandSpec();
                                for (OptionSpec option : spec.options()) {
                                    System.out.printf("%s='%s'%n", option.longestName(), option.getValue());
                                }

                                // let's print this command's usage, just to see if that works...
                                me.usage(System.out);
                            }
                        })
                        .addOption(OptionSpec.builder("runtime-option-a").build()));

        System.exit(new CommandLine(rootSpec)
                //.setExecutionStrategy(new RunLast()) // this is already the default
                .execute(commandName));
    }
}

Enjoy using picocli and don't hesitate to ask more questions!

@techthumb Did this resolve the issue? Can we close this ticket? (You can always create a new one if you have more questions.)

Hi @remkop
Yes! it did.
Many thanks for an excellent tool and equally great support!

@techthumb  Glad to hear that! Enjoy using picocli!
Don't forget to star the project on github and tell your friends! 😉

@techthumb In reply to your comment on #631  (repeated below):

We are running into this issue (Include CommandLine$AutoHelpMixin and CommandLine$HelpCommand in graalvm reflection configuration).
We are not using annotations for our commands as mentioned in #1141
We are however using the picocli.CommandLine$HelpCommand via CommandSpec.create().mixinStandardHelpOptions(true) for the root command
We have configured the annotation processor. Config json files are generated when we annotate a dummy command with @Command for the dummy command.
We are NOT however seeing entries for picocli.CommandLine$AutoHelpMixin.
We added picocli.CommandLine$AutoHelpMixin to -Aother.proxy.interfaces, but get an error saying that this should be an interface and not a class.
We'd appreciate some help on this front.
TIA GraalVM Version 20.1.0 (Java Version 11.0.7)

What the annotation processor does, is build up a CommandSpec model of the command hierarchy at compile time that is the same as the model that picocli builds at runtime using reflection. Since your application does not use annotations, the annotation processor will not be able to build up a CommandSpec model from the annotations (because there are no annotations).
But, this may not be a problem: your application itself builds up a CommandSpec model programmatically, right?
You can use this model to generate the GraalVM configurations using the tools in the picocli-codegen module.
The key class is picocli.codegen.aot.graalvm.ReflectionConfigGenerator in the picocli-codegen module. (If your application has resource bundles and/or dynamic proxies you also need ResourceConfigGenerator and DynamicProxyConfigGenerator). The picocli-codegen README has a section on manually generating configurations, but this still assumes that the model can be built up from annotations, so this will not work as is.
Instead, somewhere in your program (maybe in a separate class?), build up a fully configured CommandSpec model of your application, with all subcommands and everything, and then call the ReflectionConfigGenerator::generateReflectionConfig static method with the CommandSpec of the root command. This method returns a JSON String with the reflection configuration. Save this string to a file named reflect-config.json. Include this file in your application JAR file in META-INF/native-image/picocli-generated/your/project/reflect-config.json.
You may want to do this during the build. I recommend creating a separate class with a main method that executes the above steps (create fully configured CommandSpec model, generate the  JSON config string, and save it to a specified location). Then use your build tool to run that class during the build. The picocli-codegen README shows how to  configure the exec-maven-plugin (for Maven) or a custom task (for Gradle) to run your custom class during the build.
Please let me know how it goes.
SIDENOTE: I am planning to write an article about using picocli's programmatic API (without annotations) to create CLI apps, and your feedback would be very helpful! What was easy? What was hard? What difficulties did you encounter and how did you work around them? The more details the better! Many thanks in advance!

Thanks for the prompt response @remkop.
Do you think that it would be worthwhile for picocli to package graalvm config with the jar?
Perhaps a catch-all solution is to use generateNativeImageConfig from https://github.com/mike-neck/graalvm-native-image-plugin
Our understanding of this plugin is that it runs the app and generates the config based on execution.
Perhaps we need to make sure that the executor executes all paths (including error scenarios)

Do you think that it would be worthwhile for picocli to package graalvm config with the jar?

Yes, if possible. That is what the picocli-codegen annotation processor does. Since the GraalVM config is different for each application, picocli cannot generate a GraalVM config without inspecting the CommandSpec of the application root command. If the annotation processor does not work, you will need to do a little bit extra work to use the ReflectionConfigGenerator in the picocli-codegen module.

Perhaps a catch-all solution is to use generateNativeImageConfig from https://github.com/mike-neck/graalvm-native-image-plugin
Our understanding of this plugin is that it runs the app and generates the config based on execution.
Perhaps we need to make sure that the executor executes all paths (including error scenarios)

Indeed, that is an alternative method to generate a GraalVM configuration.
The risk of this approach is that it may miss some configuration if some code path was not executed.
Personally I prefer the approach of generating from a CommandSpec object, since that should cover all reflectively accessed components, without risking to miss any.


cvise: use current llvm-18, not pinned llvm-14

The pin is outdated. It matched the times when nixpkgs used very old llvm by default. Nowadays it should be fine to use something newer.

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/4862

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/4881

Hi, why did you close this? This sounds like an obvious and easy win. (Assuming you tested this to be working fine.)

It now conflicts with https://github.com/NixOS/nixpkgs/commit/f02f51572567cbc6dbaa14b169433941375059a6.


Manually enter IP or scan different subnet

My BroadLink device is on another subnet (VLAN just for IOT devices) I currently have no firewall rules setup to block traffic between subnets. So, I can communicate what the BroadLink device just fine using the app, but BroadLink manager can't detect the device because I'm guessing it's only scanning the subnet/VLAN the docker image is on.
I think it would be nice feature to manually put in the IP of the BroadLink device or be able to scan another subnet.

@Throdne How is this completed?

Never got it working.

+1 for this. My 'workaround' is another instance in the IOT vLAN, but not ideal


No license?

It looks like this project is still missing a licence, making it de-facto not open source. Would you consider adding one?

@s-pellegrini thanks for pointing it out. Could you please make a PR for the license? Thanks.

Well, I could. But I don't know what licence you want to have.
Also usually a licence header is added to every file, not sure it makes sense for a complete newbie in the broject to change every single file in a commit.

Just adopted MIT.

Nice!


Fix issue #32 -implemented dark/light theme

so ive implemeted dark/light theme + a button to switch them
plus new option to use light/dark theme from terminal with -t
here the 2 themes as image

was a bit code i hope i got everything

The dark theme is not applied properly when the app is launched for the first time. The color of the root's background and some labels are not in agreement with those of the dark theme.
@Aniq55 Should we keep dark theme when the app starts for the first time or light theme?

On my system it's fine, can u upload a Screenshot? Then i can correct it

So ok should be fixed try it again ;)

@LoneOne123 I think the light theme should be default. Just like other apps.

@LoneOne123 The bug is solved.
@Aniq55 I too feel that light theme should be default. @LoneOne123 Please can you make light theme to be the default one.

I will when i get up today ;)

so @Aniq55 @djmgit now u can have a look again changed the default theme to light ;)

Great work @LoneOne123


Feedback for: engine/reference/commandline/ps.md

File: engine/reference/commandline/ps.md
There are no longer references to the Go template format of docker ps.

See https://docs.docker.com/engine/reference/commandline/ps/#filtering


mattermost-desktop on Linux - gnome-crash results in persistent mm-desktop seg-fault

I confirm (by marking "x" in the [ ] below: [x]):

[x] This is not a troubleshooting question. Troubleshooting questions go here: http://www.mattermost.org/troubleshoot/.
[x] This doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
[x] I have read contributing guidelines.

Summary
With Mattermost desktop application running, after a gnome-shell catastrophic crash (X bails and drops user back to GDM login), re-login, starting Mattermost persistently fails with a segmentation fault.
Steps to reproduce
$ cat /etc/issue
Ubuntu 17.10 \n \l

$ uname -a
Linux <hostname> 4.13.0-36-generic #40-Ubuntu SMP Fri Feb 16 20:07:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ dpkg --list | grep mattermost
ii  mattermost-desktop                                               4.0.0-43                                                   amd64        Mattermost

$ file /opt/Mattermost/mattermost-desktop
/opt/Mattermost/mattermost-desktop: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=168b8181522fc3a8a3e33e09ae205647e48f5183, stripped

UNKNOWN
(cause gnome-shell to crash in a certain way or maybe any way ...)
(hopefully code inspection based on the stacktrace will help)
$ /opt/Mattermost/mattermost-desktop
Segmentation fault (core dumped)

/var/crash$ ll | grep Mattermost
-rw-r-----  1 mcallaghan whoopsie   1778755 Mar 20 12:54 _opt_Mattermost_mattermost-desktop.1003.crash
-rw-rw-r--  1 mcallaghan whoopsie         0 Mar 20 12:54 _opt_Mattermost_mattermost-desktop.1003.upload
-rw-------  1 whoopsie   whoopsie         0 Mar 20 12:54 _opt_Mattermost_mattermost-desktop.1003.uploaded

Mattermost Server version 4.x-something (don't think it's relevant)

Expected behavior

Primarily, don't get into this cruddy state.
Provide more debug information to stdout (don't crash?)

Observed behavior
$ /opt/Mattermost/mattermost-desktop
Segmentation fault (core dumped)

Stacktrace:
 #0  0x00000000020c2483 in  ()
 #1  0x0000000003fda895 in __start_google_malloc ()
 #2  0x0000000002141965 in calloc ()
 #3  0x00007ff8497fb5d1 in g_malloc0 () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
 #4  0x00007ff84c4714c9 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 #5  0x00007ff84c476855 in g_type_register_static () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 #6  0x00007ff84c476af5 in g_type_register_static_simple () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 #7  0x00007ff84d622e04 in gdk_display_get_type () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
 #8  0x00007ff84d623d00 in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
 #9  0x00007ff84c4741c9 in g_type_class_ref () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 #10 0x00007ff84c459d98 in g_object_new_with_properties () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 #11 0x00007ff84c45a801 in g_object_new () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 #12 0x00007ff84d623f75 in gdk_display_manager_get () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
 #13 0x00007ff84da03954 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
 #14 0x00007ff84d9e9f28 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
 #15 0x00007ff849801fdf in g_option_context_parse () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
 #16 0x00007ff84d9ea538 in gtk_parse_args () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
 #17 0x00007ff84d9ea5b9 in gtk_init () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
 #18 0x0000000000c9f896 in  ()
 #19 0x0000000000c971cf in  ()
 #20 0x0000000000c99c46 in  ()
 #21 0x0000000003facc8b in brightray::BrowserMainParts::PreEarlyInitialization() ()
 #22 0x0000000003e465a9 in atom::AtomBrowserMainParts::PreEarlyInitialization() ()
 #23 0x0000000001021245 in  ()
 #24 0x0000000001044e6e in  ()
 #25 0x000000000146ac68 in  ()
 #26 0x0000000000de9cdc in  ()
 #27 0x0000000000dea130 in  ()

Note! even in this state, there are NO other Mattermost PIDs running
$ ps wauxxx | grep -i matter | grep -v grep
<EMPTY>

Possible fixes
unknown
Workaround
reboot definitely works (but a crappy workaround)
(tried logging out+in again, no effect)
(sometimes the OTHER user logged in needs to logout first, even though they don't run Mattermost at all...)
Other Possibly Relevant Notes
I run a multi-user environment. primary user logged in always (doesn't use mattermost), second user occasionally logged in (uses mattermost)

@fermulator Hi, I think more information is need for us.

cause gnome-shell to crash in a certain way or maybe any way ...

I'm not sure how to reproduce the problem in my side. Which process should I kill? Or is there another way?
As far as looking the stacktrace, the app is crashing at initialization of underlying framework. If there is no ~/.config/Mattermost/uncaughtException-*.txt files, there is no way to get more info by our JavaScript.


Cannot edit draw.io pictures from other deleted pages

Describe the bug
Cannot edit draw.io pictures from other deleted pages.
Steps To Reproduce
Steps to reproduce the behavior:

Create first page and drawing draw.io picture then save.
Copy draw.io picture to second page then save.
Delete first page.
Edit second page but can not edit  draw.io picture on second page.

Expected behavior
Can edit  draw.io picture on second page.
Screenshots

Your Configuration (please complete the following information):
use https://demo.bookstackapp.com

I confirm this bug...
when you copy a diagram to one new page, be sure to juste duplicate all the content inside the new copied diagram (and delete old content) and save the new diagram.
This is annoying since this requires to edit each copied diagram individually before deleting old pages.

I ran into the same issue. The draw.io picture is visible, but it can't be edited.


Network choice during import transaction is not obvious enough

What happened?
Users may not notice that import has an independent network selector from the main client pane. The one-letter button does not signal effectively.

Errors & Logs
No response
App Version
v1.0.0-alpha.37
Web Browser
All

Collapsing those two buttons into a single one like below may be more clear.


cargo install --name: install with a renamed executable

Problem
I'm working on a platform where users may be on different versions at a time. To help test with these versions, I'd like to install multiple versions of the binary with cargo install with different names specified at install-time, so that I can use them separately.
Unfortunately, cargo install does not support this at present - the only name configuration can be done in the manifests, which means there's no way to install a different version of the application with a different name.

Aside from the multi-version scheme I've described, it would also be useful for having binaries with different features installed. I work on another project that builds with and without GPU support as a compile-time feature; I'd like to make sure that both versions work equivalently for users without overriding them each time I install.
Proposed Solution
I'd like a --name parameter to be added, so that the resulting binary can be renamed:
cargo install --path cli --name ambient
cargo install --git https://github.com/AmbientRun/Ambient.git --tag v0.2.1 --name ambient-0.2.1
cargo install --git https://github.com/AmbientRun/Ambient.git --rev 123abcdef --name ambient-123abcdef
# ...

where each binary would have the name specified.

I've implemented a hacky version of this in our internal development tool by cargo install-ing to a temporary directory, and then moving the resulting binary into CARGO_HOME/bin with its resulting name: https://github.com/AmbientRun/Ambient/blob/0e3fa3dbc923d4b010a524d9e78a5aa204c79b7c/campfire/src/install.rs#L17-L66
This works, but it's hacky (cargo install warns about the temp directory not being in the PATH, as well as it replacing the existing binary). Official support would make this much nicer.
Notes
This is a successor issue to #11413, as suggested by @weihanglo.

Note that this is not accepted by the Cargo team. We generally discuss the design first, and if we are happy with it then we do an FCP to solicit feedback from the team and the community.
@rustbot label +S-needs-design +E-medium +Command-install -S-needs-triage

--rename oldname:newname

Unfortunately it may come into conflict with the other unstable feature -Zdifferent-binary-name, so probably this is a dead end.
We may need to come up with a better design, however, if someone is willing to drive it. My current focus is not on this but feel free to have higher level design discussions here :)

Maybe, if creating a whole new flag is too complex, having the option to use env. variables like CARGO_PKG_NAME, CARGO_BIN_NAME is easier and more approachable. If this approach is good enough (at least for a first draft), I could take a go at making just that.

@blyxyas, thanks for looking into this. Could you elaborate how a new env can fix the issue?
I feel like even using env instead of CLI flag, we still need to figure out these open design issues:

How to choose which bin target we're going to rename.
How this rename feature works and interacts with -Zdifferent-binary-name.
How to track the installed binary in Cargo's installed binary tracker.

To me, the format of the current installed binary tracker is broken, and may be a blocker. We probably need a way to coordinate with it before moving on.

Without thinking about it too much, I feel like aforementioned magic strings could work, though I really hate the idea

I feel like a format like "oldname:newname" or similar is just what we need in this situation! Adding another field would mean more parsing and more storage, not ideal. Whereas a format like "oldname:newname", or even a human-readable format like "oldname as newname" is as simple as getting the two variables with a regex or a .split(...), no more JSON parsing than necessary.
While using oldname:newname on a CLI isn't the prettiest thing, it wouldn't be used very often, excusing its clunky-ness with a technical reason.

On the topic of -Zdifferent-binary-name, I've investigated what crates.io and cargo install do, and I think that we can ignore it. The filename produced and the binary name are different things, so they should remain separated.

Since renaming has a couple gotchas when there are multiple binaries, perhaps simply a --postfix-name or a --prefix-name would be sufficient?

Perhaps an even better solution (inspired by shared libraries on Linux), what if every binary was installed with its version/rev number postfixed, with a symbolic link pointing to the most recent (released) version?

Suggestions proposed earlier would be helpful for scenarios I encounter, where projects require specific CLIs at outdated versions to build properly (i.e. wasm-pack, cargo-xtask, wasm-bindgen-cli, etc.)


Wallet address, hovering it, should show the address

Do you think adding extra functionality to it would be cool?
uniswap has a modal that opens when you click the wallet. It provides extra information about the wallet you’re connected with, and actions to change the wallet, etc.
It also shows your balance.
I mentioned it in https://github.com/FuelLabs/swayswap/pull/53#issuecomment-1112911082 with a design example.


Add route controller resource to bundle

This PR adds deployment resource for route controller which use correct image tag, what we cached. Once the bundle is created using this PR, we will also need to make change on crc side. The resource file is located in /opt dir same as kubeconfig file.

/hold
need to test generated bundle.

https://github.com/crc-org/crc/pull/3712#pullrequestreview-1476628518 and https://github.com/crc-org/crc/pull/3712#discussion_r1227779668 are also relevant for this PR.

@cfergeau updated the file location to /usr/share/crc.

@cfergeau as per CI failure, which means I can't create a directory inside /usr/share  because of read only, should I just use /opt/crc then?
 + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i id_ecdsa_crc<EMAIL_ADDRESS>-- 'mkdir -p /usr/share/crc && sudo mv /home/core/route_controller.yaml /usr/share/crc/'
Warning: Permanently added '<IP_ADDRESS>' (ECDSA) to the list of known hosts.
mkdir: cannot create directory ‘/usr/share/crc’: Read-only file system

@cfergeau as per CI failure, which means I can't create a directory inside /usr/share because of read only, should I just use /opt/crc then?
 + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i id_ecdsa_crc<EMAIL_ADDRESS>-- 'mkdir -p /usr/share/crc && sudo mv /home/core/route_controller.yaml /usr/share/crc/'
Warning: Permanently added '<IP_ADDRESS>' (ECDSA) to the list of known hosts.
mkdir: cannot create directory ‘/usr/share/crc’: Read-only file system

/opt/crc, or /usr/local/share

/opt/crc, or /usr/local/shar

@cfergeau went with /opt/crc and updated the PR

/unhold

/hold
until the conversation about backwards compat comes to a conclusion in https://github.com/crc-org/crc/pull/3712

/cherry-pick release-4.14

I'd set our bundle format version to 1.5
https://github.com/crc-org/snc/blob/763e75b9d0608c8b9472092a6fee9bcaa2a6dc17/crc-bundle-info.json.sample#L6-L11


Multilingual FrontEnd

Multilingual Frontend - the frontend gets his own language files, located at system/language/. Investigate and change some methods, edit and add code in several classes to make multilingual frontend possible.

Frontend system messages can now be multilingual - done for now. Future updates are planned to add multilingual feature for frontend content (pages and menus) too.


fix(cli): account flag domain fix

Summary
The Ecosystem onboarding bundle invokes the Lacework CLI using configure in non-interactive mode with the global flags - not using --json_file. If the customer provided the onboarding service with the full URL (i.e. account.lacework.net) the onboarding script would pass that full URL to the CLI leading to an error.  I think the UI, that makes use of the onboarding service, will run into this same issue.
This PR seeks to address this issue by treating the non-interactive configure account flag the same as if the information was provided by json_file. As in we make use of the lwdomain package to validate and select the relevant domain information.
The -a/--account flag will act like the --json_file flag and account prompt by striping the '.lacework.net' domain from the URL - if provided.
Apply the prompt validation to Profile.Verify, i.e. key and secret length requirements.
Makefile install-cli now works with arm64.
How did you test this change?

Unit tests
Integration tests
Manual tests
Invocation via onboard bundle script

Issue
ALLY-1161

Found a gap - setting account via --profile flag will not have domain stripped if using --json_file and --nointeractive.
> lacework configure -k DEV571F4_5878249F0CABC0F5E627F81B720EA65B1CA9285593E8FE4 -s _7f53095dbc7a997dbd6627bed4f45399 --profile dev5.dev5.corp.lacework.net --noninteractive
You are all set!

> cat .lacework.toml
["dev5.dev5.corp.lacework.net"]
  account = "dev5.dev5.corp"
  api_key = "DEV571F4_5878249F0CABC0F5E627F81B720EA65B1CA9285593E8FE4"
  api_secret = "_7f53095dbc7a997dbd6627bed4f45399"
  version = 2

> lacework configure --json_file test.json --profile dev5.dev5.corp.lacework.net --noninteractive
You are all set!

> cat .lacework.toml
["dev5.dev5.corp.lacework.net"]
  account = "dev5.dev5.corp.lacework.net"
  subaccount = "dev5"
  api_key = "DEV571F4_5878249F0CABC0F5E627F81B720EA65B1CA9285593E8FE4"
  api_secret = "_7f53095dbc7a997dbd6627bed4f45399"
  version = 2


Cannot read property 'instanceCount' of undefined Polymer.Base.createdCallback

Uncaught TypeError: Cannot read property 'instanceCount' of undefinedPolymer.Base.createdCallback
@ polymer-micro.html:103
Upgraded from .5 to 1.0 and now I get this error.

how does your created() callback look like ?

Would it be possible to share the source to your element (or a minimal test case) that we can use to dig into this further?

Found the issue while making the test case.  I was importing file that didn't exist.

@cchristensen-cxp
Did you only get this error message appearing in firebase hosting?
When I do firebase serve and everything is fine but when I deploy to firebase hosting this is when I get the error.

@JGSolutions have you been able to fix this issue? I keep getting this when I try to deploy it or serve it through firebase.

In the sw-precache-config.js add this line:
navigateFallbackWhitelist: [ /^/[^_]+// ]

@JGSolutions when i add this line i get this message in the polymer build process:
info:    Preparing build...
info:    Building application...
warn:    /Users/********/Desktop/*******/sw-precache-config.js file was found but could not be loaded
{ loadError: {} }
info:    Generating build/unbundled...
info:    Generating build/bundled...
info:    Build complete!


add "ref" to toc

this PR fixes two issues:

With the merger of git sync v4, parent directories of Notebooks now have a "-ref" at the end of their names. This needs to be updated in the list of available Notebooks to fix broken links
We should point at the rendered version of the Notebooks instead of maintaining a duplicate TOC that points at github files

supercedes #20

Thanks for updating these!


Maybe .vue one file components?

Hi. I love the idea to mix semantic ui and vue. I even wanted to start that on my own after using it extensively with jquery vetsion wrapping in my own library in one project.
What are reasons to use JSX? Why not vue single file components?
One of reasons I dont use React - its JSX and beauty of vue template-script-style combo in .vue files.

Hi, that's a good question.
FIrst of all, there is no need to use JSX in your project if you want to use this library. In fact, all the examples are in .vue files.
Like you, I also prefer how the Vue component file is structured over the React's JSX. However, in this case, there is no CSS to write (Semantic UI Vue is based on the official Semantic UI CSS) and most components are made of a single element, which means the <tempate> block will almost always contain a single line. On the other hand, JSX does offers a lot of flexibility.
I might consider replacing .jsx with .vue if a drawback comes up, but I don't see any so far.

For example, I, as one of fans of vue, would like to contribute to this repo. But I looked into sourcecode, saw JSX there and closed tab :D It is instinct. And what about classes, I already saw some classes from utils.js used in some components. I would like to see usual to vue :class="{active: isActive, big: isBig}" or even: :class="{active, big}". It would be so cool to be in comfort zone of vueeeeee.
Thanks for quick answer, I will be waiting for +1s for my question :)

Sorry to hear you don't want to contribute.
Again, the choice of JSX is for removing those 5ish lines of boilerplate code from each component. Apart from that, the rest of the file isn't different.
I do consider your feedback, but it's more about personal taste than other. I will reopen if I get any feedback concerning practical issues.

Hi,
I don't mind the JSX but Vue.js comes out of the box with Single File Components so I find it better to make use of Vue.js technology.
Would you allow patches to move components from JSX files to VUE files?
That's something I would definitely like to work on.

I'm just trying to say that according to the documentation although JSX is an option, "Vue recommends using templates to build your HTML in the vast majority of cases".
And template files are valid HTML that can be loaded in any recent browser with no need for extra software.
I just think that using template files will make it easier for people  with a Vue background to contribute.

I'm just trying to say that according to the documentation although JSX is an option, "Vue recommends using templates to build your HTML in the vast majority of cases".

True, they do say that. However, our case doesn't fall into the vast majority: every component has no CSS and two lines of HTML at most.
As I said before, the alternative to JSX is using render functions in plain JS, since we do not need 2/3 of what the Vue file provides and it would only add a lot of noise to the code. As the documentation says, JSX is meant to reduce the pain of writing render functions in plain js.

And template files are valid HTML that can be loaded in any recent browser with no need for extra software.

The template part of a .vue file cannot be loaded into any browser: it needs a Webpack loader to be transformed into a javascript string, that is then compiled to a render function.

I just think that using template files will make it easier for people with a Vue background to contribute.

Not sure about this. AFAIK, Vuetify is the biggest component library for Vue: although they do not use Vue files, they have 6k+ stars and 135+ PRs opened within last month.
I think the community is attracted by features more than by Vue/JSX files 🙂


Access to data in connection with service interruptions/termination

Corporate TOS issue: Section L3, you can suspend access at any time without notice or cause and seemingly no obligation to help users extract  data. Section L3, you can terminate on 30 days’ notice, with an obligation to support extracting data.
Unclear why indefinite suspension should potentially lead to a worse result than termination.  Consider clarifying that you’ll provide data extract access for suspensions lasting longer than 30 days.
Related in Section Q, “We reserve the right at any time and from time to time to modify or discontinue, temporarily or permanently, the Website (or any part of it) with or without notice.” Are you able to provide any assurances about data extraction in this context?

Thanks, @MarcM001.
You're right, this was pretty confusing. We're rewriting it and making it much clearer. We should have the new version posted shortly. Thank you for bringing our attention to it!


Responsiveness

@artf a few questions regarding the newsletter project, if you don't mind.
Since the MJML project is kinda dead and it seems like the newsletter project is actively supported and tied to the main grapesjs project, I am trying to see how to transition from MJML by still maintaining the MJML benefits.
As far as I understand, the MJML benefits are Responsiveness and Compatibility.
Responsiveness
How do we go about making the emails more responsive. How do we collapse items (columns, images, etc).
Here is how the demo email looks on mobile:

It seems reasonable that the two columns "Test it" and "Responsive" should collapse on mobile.
As for the columns above, they would also look better collapsed so the image would appear above the text.
Compatibility
MJML adds HTML conditionals. I saw a reference to https://github.com/artf/grapesjs/issues/208
Do we need to go and recreate every component with this code and rewrite the newsletter project? Is there a reason why this functionality is not already integrated with the newsletter project?

Any answer for this question please ?

Intersted in this as well :)

This is not a direct answer to the question, but we are using the newsletter preset to allow our clients to create their personal webpages. We are using newsletters because we only want to allow a limited set of features that more or less overlap with this preset. I re-wrote most of the components using flexbox to be responsive. I can share my code if someone's interested.

Can you share your code carboni-rob? Thank you.

Can you share your code? Thank you.

Sure thing, here it is (we use React TypeScript so you may have to remove types and/or tweak hardcoded values to suit your needs):
export const getResponsiveSect100 = (content: string = ''): string => {
  return `<div style="display: flex; height: 150px;">${content}</div>`;
};

export const getCenteredSect100 = (): string => {
  return `

  `;
};

export const getResponsiveSect50 = ({
  leftContent = '',
  rightContent = '',
}: {
  leftContent?: string;
  rightContent?: string;
} = {}): string => {
  return `

${leftContent}

${rightContent}

  `;
};

export const getResponsiveDiv = ({
  content = '',
  direction = 'row',
}: {
  content?: string;
  direction?: string;
} = {}): string => {
  return `

      ${content}

  `;
};

export const getResponsiveSect30 = (): string => {
  return `

  `;
};

export const getResponsiveSect37 = (): string => {
  return `

  `;
};

export const getResponsiveHeader = ({
  headerSize,
  themeColour,
  text,
  align = 'initial',
}: {
  headerSize: number;
  themeColour: string;
  text: string;
  align?: TextAlign;
}): string => {
  const baseSize = 1.5 - headerSize / 10;

  return `
    <h${headerSize}
      style="font-family: ${fontFamily};
      color: ${themeColour};
      background-color: #fff;
      text-align: ${align};
      font-size: ${baseSize}em;
      font-size: calc(${baseSize}em + 1vw);
      margin: 1vw 0;"
    >
      ${text}
    </h${headerSize}>
  `;
};

export const getResponsiveOrderedList = (content: string): string => {
  return `

${content}

${content}

${content}

${content}

  `;
};

export const getResponsiveUnorderedList = (content: string): string => {
  return `

${content}

${content}

${content}

${content}

  `;
};

export const getButton = ({
  themeColour,
  text,
}: {
  themeColour: string;
  text: string;
}): string => {
  return `
    <button
      class="button"
      style="font-family: ${fontFamily};
      font-size: calc(0.8em + 0.5vw);
      padding: 0.3em 0.5em;
      color: #fff;
      background-color: ${themeColour};
      border-radius: 10px;"
    >
      ${text}
    </button>
  `;
};

export const getResponsiveText = (text: string): string => {
  return `

      ${text}

  `;
};

export const getResponsiveImage = ({
  imgSource = `${newsletterImagesPath}/missing_image_placeholder.png`,
  imgAlt = '',
  imgTitle = '',
}: {
  imgSource?: string;
  imgAlt?: string;
  imgTitle?: string;
} = {}): string => {
  return `

  `;
};

export const getResponsiveTextSection = ({
  headerText,
  contentText,
  themeColour = '#000',
  align = 'initial',
}: {
  headerText: string;
  contentText: string;
  themeColour?: string;
  align?: TextAlign;
}): string => {
  return `
    ${getResponsiveHeader({
      headerSize: 1,
      themeColour,
      text: headerText,
      align,
    })}
    ${getResponsiveText(contentText)}
  `;
};

export const getResponsiveLink = ({
  text,
  colour = '#000',
}: {
  text: string;
  colour?: string;
}): string => {
  return `

      ${text}

  `;
};

export const getResponsiveGridItems = ({
  headerText,
  contentText,
  placeholderImageAlt,
  placeholderImageTitle,
}: {
  headerText: string;
  contentText: string;
  placeholderImageAlt: string;
  placeholderImageTitle: string;
}): string => {
  const largePlaceholderImage = `${newsletterImagesPath}/250x150_placeholder.png`;

  const content = `
    ${getResponsiveImage({
      imgSource: largePlaceholderImage,
      imgAlt: placeholderImageAlt,
      imgTitle: placeholderImageTitle,
    })}
    ${getResponsiveDiv({
      content: getResponsiveTextSection({ headerText, contentText }),
      direction: 'column',
    })}
  `;

  return `
    ${getResponsiveSect50({ leftContent: content, rightContent: content })}
  `;
};

export const getResponsiveListItems = ({
  headerText,
  contentText,
  placeholderImageAlt,
  placeholderImageTitle,
}: {
  headerText: string;
  contentText: string;
  placeholderImageAlt: string;
  placeholderImageTitle: string;
}): string => {
  const smallPlaceholderImage = `${newsletterImagesPath}/150x150_placeholder.png`;

  const image = getResponsiveImage({
    imgSource: smallPlaceholderImage,
    imgAlt: placeholderImageAlt,
    imgTitle: placeholderImageTitle,
  });

  const textSection = getResponsiveTextSection({ headerText, contentText });

  const listItem = `
    ${image}
    ${getResponsiveDiv({ content: textSection, direction: 'column' })}
  `;

  const content = getResponsiveDiv({ content: listItem });

  return `
    ${content}
    ${content}
  `;
};

IMPORTANT: bear in mind that the closing
 tags need to stay on the same line as the opening tags, or Grapes will interpret them as text instead of boxes (which is a different issue) and you won't be able to drag anything inside.
Hope this helps!

Thank you very much.

Thank you very much.

Sorry, had my hands slapped for sharing production code, which is intellectual property of the Company... So I had to delete.

Thank you very much.

Sorry, had my hands slapped for sharing production code, which is intellectual property of the Company... So I had to delete.

It's ok, we understand.

Also looking for the answer to this questions. Any ideas are appreciated.

What's wrong with using the MJML project?

Facing the same issue.
I believe this is just a preset that we can get started with. But want to know how others tackled this problem.
All the ideas are welcomed!

I believe this is just a preset that we can get started with. But want to know how others tackled this problem.

Correct, you can create your own responsive components as already done by someone