[MSSQL] Add module/option for testing xp_cmdshell & xp_dirtree

Hi 👋
It would be very nice to have a module or an option for testing if:

xp_cmdshell is enabled or the current have sufficient privileges
xp_dirtree can be use to grab NetNTLM authentication

$ netexec mssql -u 'MSSQLSERVER' -p 'X' -d certified.htb <IP_ADDRESS> -L
LOW PRIVILEGE MODULES
[*] mssql_priv                Enumerate and exploit MSSQL privileges

HIGH PRIVILEGE MODULES (requires admin privs)
[*] empire_exec               Uses Empire's RESTful API to generate a launcher for the specified listener and executes it
[*] met_inject                Downloads the Meterpreter stager and injects it into memory
[*] nanodump                  Get lsass dump using nanodump and parse the result with pypykatz
[*] test_connection           Pings a host
[*] web_delivery              Kicks off a Metasploit Payload using the exploit/multi/script/web_delivery module

$ mssqlclient.py<EMAIL_ADDRESS>-windows-auth

[*] ACK: Result: 1 - Microsoft SQL Server (160 3232)
[!] Press help for extra shell commands
SQL (CERTIFIEDDC\MSSQLSERVER  guest@master)> help

    enable_xp_cmdshell         - you know what it means
    disable_xp_cmdshell         - you know what it means
    xp_cmdshell {cmd}           - executes cmd using xp_cmdshell
    xp_dirtree {path}            - executes xp_dirtree on the path

Cheers 🚀

Oh yes, take a look at #456 :)


Windows 10 or 11?

[Enter feedback here]
This doesn't say much about Microsoft's commitment to WPF.  Why does the table not go to WIndows 10 or 11?

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

ID: 60c5ae30-77fe-da6e-a320-17a4e734f0cd
Version Independent ID: ba7cff33-a2c3-ae78-c1c6-ad0839c03ad4
Content: Control Styles and Templates - WPF .NET Framework
Content Source: dotnet-desktop-guide/framework/wpf/controls/control-styles-and-templates.md
Product: dotnet-framework
Technology: dotnet-wpf
GitHub Login: @adegeo
Microsoft Alias: adegeo

Thank you for the feedback.
The themes haven't been updated in quite some time. WPF uses its own theme system that doesn't automatically use the Windows theme. So a full WPF theme must be written for WPF to be styled like Windows 11/10. You can vote and voice your comment in the WPF repo: https://github.com/dotnet/wpf/issues/4749


Cannot satisfy dependency script.module.addon.signals

Netflix add-on version
1.18.9+matrix.1
Operative systems used
Linux (Ubuntu / Mint / ...)
Kodi version used
Kodi 19 (Matrix)
Description of the bug
When trying to install the Netflix plugin from the repo in Kodi, it says dependency script.module.addon.signals version 0.0.6+matrix.1 cannot be satisfied, so installing the plugin fails.
Steps to reproduce the behavior

Download repo zip from Github readme
Open Kodi, select install from zip
Try and install the addon from the repo in Kodi

Debug log - mandatory
https://paste.kodi.tv/ohulafutat.kodi (look at line 269)
Possible fix
No response
Additional context
No response
Screenshots
No response

Cannot reproduce on Android.


Add .ogg support

Added/tested this locally while converting some audio files, and thought others might find it helpful

Thanks for pushing forward the change. LGTM


getPort.php

I tried something, surely unfinished. I don't know how to manipulate the .out of the function. You use "$response" but can you explain how I can manipulate the echo of the function ?

I recommend checking out the code for the blacklist. It built the object and spit it out all at once

ok. I will see that tomorrow... 3 am in my timezone ;)

ok. I try something which is quite the same... as I just removed useless class and just check if ip or domain was correctly set. Not tested if it worked or not.

for the choice of the Port to check, we can of course do a discussion. I can add more. It's just to not write 1000 lines on the page ;)

Beyond the external request, is there any real benefit from moving away from the CDN?

In fact, there are different reason (it's only my point of view... :) ) :

If there is a new version we won't need to change code, but only the files which are in css/ and javascript/
2d reason  : each time you send a request to google servers, and even if it's set to "anonymous", google gets your ip, at least ip from the server... which is quite bad, everything is centralized.

Bootstrap isn't by Google, it is a framework developed by twitter, and the CDN is served by Stackpath.  Keeping the CDN in use is actually decentralizing it so the load isn't being put on your own personal CDN. This helps reduce the cost of hosting and reduces the host's server load.

ok. Well anyway, it was not the object of the PR ;) For privacy use, most of servers use their own bootstrap css files... The CDN hosters track websites, which is not a really good feature. Most of the website which care of privacy and data use their own files.

Is it ok like that ?

Do you have an idea what I did wrong ?

It works... finally (I forgot I had this PR pending). But I've still a problem with the title. It's still undefined... but strange as I added it to the main.js ... Do you have an idea how I can correct it ?

Don't worry.
Well, understanding Javascript here is quite difficult. I didn't understand why it didn't work.  ;) Now I understand better even if there are some part of the code which are still weird for me like the title. I didn't see a limited number of "case" in main.js, but it's perhaps my error ?

I'll check this out this weekend. can you add screenshots of it working?

Well, finally, it's ok. I get the title. Surely a cache I had in my browser. So, the PR is ready for final review. Wait 2 sec : I will add screenshot ;)

For this screenshot, I just changed the title in the index.html.
Perhaps in the future, I will try to add title, because in fact, here there is no title.

@charlesabarnes : Ok, done.

Sometimes it say ports is closed but are open... Perhaps increase the time in the function (to try more time) ?


[question] Could pouch collect container cpu load?

Ⅰ. Issue Description
I  found that we could not use cadvisor in Kubernetes to collect the container cpu load.
Ⅱ. Describe what happened
Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)

Ⅴ. Anything else we need to know?
Ⅵ. Environment:

pouch version (use pouch version):
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

Could you answer the issue here? we could collect more progress data to fill this issue. And make people know the progress. Thanks. @Starnop

I am sorry, maybe need more time to learn more details about cadvisor, and some releated info please refer to :
https://github.com/google/cadvisor/pull/437
https://github.com/google/cadvisor/pull/1188

I think we could collect container cpu load via PouchContainer in Kubernetes via cadvisor? Am I right?
@Starnop
If the answer is yes. I am afraid that we should support @hkebao to make it as soon as possible.

@allencloud
In fact, the pouch has nothing to do with the that whether it can be collected or not. Since the pouch rely on containerd, for the cadvisor, all containers created by pouch be equivalent to created by containerd.
Currently, the cadvisor only collects containers information in k8s.io namespace of containerd which cannot be changed.
In addition, for all I know, cadvisor  get taskstats according to cgroup path of container using netlink tools, and use formulas  load(t) = load(t-1) e^(-5/60) + n (1 - e^(-5/60)) to calculate the CPU Load Average.
The last, according to the source code, the caller should set flag enable_load_reader to true  to enable collect cpu load. Here's a little hint, if you run cadvisor in a container and want to get the data of cpu load, you should set the network of container to be host.
var enableLoadReader = flag.Bool("enable_load_reader", false, "Whether to enable cpu load reader")

@hkebao
So if you cannot get data of cpu load, maybe sone advices will help you a little:

make sure that you have defined the namespace of containerd to k8s.io

// Notes(ziren): default-namespace is passed to containerd, the default
// value is 'default'. So if IsCriEnabled is true for k8s, we should set the DefaultNamespace
// to k8s.io
flagSet.StringVar(&cfg.DefaultNamespace, "default-namespace", namespaces.Default, "default-namespace is passed to containerd, the default value is 'default'")

make sure that you have set true  with flag enable_load_reader
make sure that set host to the network of container cadvisor if you run cadvisor in a container
make sure that cpu loader has been initialized properly, it is necessary to view the logs.

@Starnop could we file PR to cadvisor to support configurable namespace? I think it should support it.

@hkebao Is there still any questions? Please let us know if you have any.  And if not, could you please help close this issue? Thanks. :)

@fuweid I have open an issue . However, there is no reply. And I have look around the source code, it's not easy to add a parameter due to the non-expandable design. I am afraid it is  difficult to advance this matter for now.


Refactor to use Class Hierarchy

The previous code had some issues with cross dependencies. Moving to a class hierarchy should resolve most of them and decouple the code a little bit. There are still some issues that need to be resolved.

[ ] Clean up the to_string methods
[ ] Properly implement gLibrary that is a global variable at the moment. I should probably inject the dependency in the constructors.
[x] There is some kind of bug that REDUCED the error count, the logic however should not have changed!

Merging as is. The other issues will be solved in separate PRs.


Use libfranka in simulation and without real robot

Hello,
Is it possible to use libfranka with simulation and without connecting to a real robot? I see in codes that it needs robot-hostname.
What is your suggestion for controlling the panda in simulation? There are a lot of useful codes and controllers in libfranka.
Thank you

Hi, without the real robot you won't have access to the model library. Further information can be found there: 1, 2 and 3


Switch the argument parser to be sub-command based

Effectively defines three sub-command: compile, repl and connect (defaulting to repl), rather than switching based on what combination of input files, --repl and --client were specified.
Hopefully this makes the optparse-applicative code a little easier to understand too.

Command overview
λ :main --help
Usage: <interactive> [COMMAND] [-v|--version]
  The Amulet compiler and REPL, version <IP_ADDRESS> (053fcfd)

Available options:
  -h,--help                Show this help text
  -v,--version             Show version information

Available commands:
  compile                  Compile an Amulet file to Lua.
  repl                     Launch the Amulet REPL.
  connect                  Connect to an already running REPL instance.
λ :main compile --help
Usage: <interactive> compile FILE [-o|--out FILE] [-O|--opt LEVEL]
                             [(-t|--test) | --test-tc] [--lib ARG]
  Compile an Amulet file to Lua.

Available options:
  FILE                     The file to compile.
  -o,--out FILE            Write the generated Lua to a specific file.
  -O,--opt LEVEL           Controls the optimisation level. (default: 1)
  -t,--test                Provides additional debug information on the output
  --test-tc                Provides additional type check information on the
                           output
  --lib ARG                Add a folder to the library path
  -h,--help                Show this help text
λ :main repl --help
Usage: <interactive> repl [FILE] [--port PORT] [(-t|--test) | --test-tc]
                          [--lib ARG]
  Launch the Amulet REPL.

Available options:
  FILE                     A file to load into the REPL.
  --port PORT              Port to use for the REPL server. (default: 5478)
  -t,--test                Provides additional debug information on the output
  --test-tc                Provides additional type check information on the
                           output
  --lib ARG                Add a folder to the library path
  -h,--help                Show this help text
λ :main connect --help
Usage: <interactive> connect COMMAND [--port PORT]
  Connect to an already running REPL instance.

Available options:
  COMMAND                  The command to run on the remote REPL.
  --port PORT              Port the remote REPL is hosted on. (default: 5478)
  -h,--help                Show this help text

Beautiful! Thank you so much.


fix: use setup-dfx github action

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes # (issue)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist:

[ ] The title of this PR complies with Conventional Commits.
[ ] I have edited the CHANGELOG accordingly.
[ ] I have made corresponding changes to the documentation.

Just realized that e2e.yml doesn't really run any tests.
      # - name: 'Run tests'
      #   run: bats e2e/bash/icx.bash

Maybe we can delete it?
Or we fix icx.bash and enable the test?

Duplicates https://github.com/dfinity/agent-rs/pull/518


Add type field to store/policy json config

What would you like to be added?
When we configure store or policy through CRD, the metadata.name is the real name for this resource, and spec.name behaves as type. When we refactored verifier, verifier json config already supported both name and type fields so that users could set multiple verifiers of the same type.
We should also add type field to store and policy json config so that all resources have consistent behavior in CLI mode.
Anything else you would like to add?
No response
Are you willing to submit PRs to contribute to this feature?

[ ] Yes, I am willing to implement it.

Tackle during CLI scenarios


Missing restart option when game is tie

Display "Play again" and add reset button which is missing

I want to work on this issue

Hi, I would love to contribute to enhancing the UI using Tailwind CSS and adding react-toasts as a GSSOC'24 contributor. Could you please assign this issue to me? I’m excited to improve the user experience and make the game more interactive. Thanks!

I want to work on this issue

I want to work on this issue. Assign it to me

Please assign me the task.


Wasm: codegen for trunc and nearest with more tests

This change is

Hi @commonlisp, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

Reviewed 6 of 7 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 3 unresolved discussions.

lib/Backend/Lower.cpp, line 2989 [r2] (raw file):

        case Js::OpCode::Trunc_A:
            m_lowererMD.GenerateFastInlineBuiltInCall(instr, (IR::JnHelperMethod)0);

This requires SSE 4, it will crash or produce invalid code if the machine doesn't have sse 4.
You can test with ch.exe misc.js -on:wasm -sse:2 -forcenative
Either make a valid path for this case or make it NYI in this case like so
WASM_UNARY__OPCODE(F32Trunc,          0x80, F_F , Trunc_Flt      , !AutoSystemInfo::Data.SSE4_1Available())

lib/Backend/LowerMDShared.cpp, line 6136 [r2] (raw file):

void
LowererMD::GenerateTrunc(IR::Instr * instr)

Also remove the declaration of both functions in the header file

test/wasm/misc.wast, line 6 [r2] (raw file):

;;-------------------------------------------------------------------------------------------------------

(module

Add f64 tests for trunc and nearest. Also use named functions to avoid potential errors with the index when exporting

Comments from Reviewable

lib/Backend/Lower.cpp, line 2989 [r2] (raw file):
Previously, Cellule (Michael Ferris) wrote…
> This requires SSE 4, it will crash or produce invalid code if the machine doesn't have sse 4.
> You can test with `ch.exe misc.js -on:wasm -sse:2 -forcenative`
> Either make a valid path for this case or make it NYI in this case like so
> `WASM_UNARY__OPCODE(F32Trunc,          0x80, F_F , Trunc_Flt      , !AutoSystemInfo::Data.SSE4_1Available())`

Good catch, this definitely needs a code path for older machines. IMO we shouldn't have this defined conditional on SSE4.1 because that will mess up testing, e.g. in case the test VM has or does not have SSE4.1

Comments from Reviewable

Review status: all files reviewed at latest revision, 3 unresolved discussions.

lib/Backend/Lower.cpp, line 2989 [r2] (raw file):
Previously, MikeHolman (Michael Holman) wrote…
> Good catch, this definitely needs a code path for older machines. IMO we shouldn't have this defined conditional on SSE4.1 because that will mess up testing, e.g. in case the test VM has or does not have SSE4.1

For now, using builtins for SSE2. This is consistent with how InlineMathCeil and Floor are being handled right now.

lib/Backend/LowerMDShared.cpp, line 6136 [r2] (raw file):
Previously, Cellule (Michael Ferris) wrote…
> Also remove the declaration of both functions in the header file

Done.

test/wasm/misc.wast, line 6 [r2] (raw file):
Previously, Cellule (Michael Ferris) wrote…
> Add f64 tests for trunc and nearest. Also use named functions to avoid potential errors with the index when exporting

Done.

Comments from Reviewable

Reviewed 9 of 9 files at r3.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

Comments from Reviewable


Possible bug - retry attempt count does not increment

Is this a bug report?
Yes

Can you also reproduce the problem with the latest version?
Yes, reproduced using v. <IP_ADDRESS>7-develop
Environment

Operating system: Windows 10 Enterprise 64-bit (10.0, Build 16299)
Visual Studio version: VS Pro 2017 15.7.5
Dotnet version: .NET Framework 4.7.1

Steps to Reproduce

(Write your steps here:)

Create a new console app based on the QuickStart example in the MT docs
Create a Consumer for the YourMessage event. The Consume method should invoke the context.GetRetryAttempt() method - logging it out for example. Then throw some exception to trigger the retries.
Connect the Consumer and configure to use Immediate retries using UseRetry(...)
Run the console app, it should demonstrate that the attempt count does not increment with each retry, outputting 0 each time.

Notes:

I'm using RabbitMQ as the transport
The issue seems to only occur when retries are configured at the Consumer level. Configuring retries on the bus configurator works - the attempt count increments as expected.
In my case, I'd like to use retries for some consumers and not for others - can't see a way of doing this by configuring on the bus.

Expected Behavior

I expected the first time the message is consumed GetRetryAttempt() would return 0, the next time 1, the next time 2 etc. until the limit was reached.
Actual Behavior

Each time GetRetryAttempt() is invoked within the Consume method, 0 is returned. Note, it retries the correct amount of times, then faults as expected. However the retry attempt count doesn't seem to be correct. e.g. output:
Press any key to exit
Attempt: 0
MassTransit.Messages Warning: 0 : R-RETRY rabbitmq://eur-soxapdev01/playground/test_queue 7a000000-9a3c-0005-97ac-08d633725364 Big bad exception, System.Exception: Big bad exception
   at MassTransit.PossibleRetryBug.Program.YourMessageConsumer.Consume(ConsumeContext`1 context) in C:\andrew\test-projects\MassTransit.PossibleRetryBug\MassTransit.PossibleRetryBug\MassTransit.PossibleRetryBug\Program.cs:line 47
   at MassTransit.Pipeline.Filters.MethodConsumerMessageFilter`2.GreenPipes.IFilter<MassTransit.ConsumerConsumeContext<TConsumer,TMessage>>.Send(ConsumerConsumeContext`2 context, IPipe`1 next)
   at GreenPipes.Pipes.LastPipe`1.Send(TContext context)
   at MassTransit.Pipeline.Pipes.ConsumerMergePipe`2.Send(ConsumerConsumeContext`1 context)
   at GreenPipes.Filters.RetryFilter`1.<GreenPipes-IFilter<TContext>-Send>d__4.MoveNext()
Attempt: 0
Attempt: 0
Attempt: 0
MassTransit.Messages Error: 0 : R-FAULT rabbitmq://eur-soxapdev01/playground/test_queue 7a000000-9a3c-0005-97ac-08d633725364 MassTransit.PossibleRetryBug.YourMessage MassTransit.PossibleRetryBug.Program+YourMessageConsumer(00:00:25.5818986) Big bad exception, System.Exception: Big bad exception
   at MassTransit.PossibleRetryBug.Program.YourMessageConsumer.Consume(ConsumeContext`1 context) in C:\andrew\test-projects\MassTransit.PossibleRetryBug\MassTransit.PossibleRetryBug\MassTransit.PossibleRetryBug\Program.cs:line 47
   at MassTransit.Pipeline.Filters.MethodConsumerMessageFilter`2.GreenPipes.IFilter<MassTransit.ConsumerConsumeContext<TConsumer,TMessage>>.Send(ConsumerConsumeContext`2 context, IPipe`1 next)
   at GreenPipes.Pipes.LastPipe`1.Send(TContext context)
   at MassTransit.Pipeline.Pipes.ConsumerMergePipe`2.Send(ConsumerConsumeContext`1 context)
   at GreenPipes.Filters.RetryFilter`1.<Attempt>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at GreenPipes.Filters.RetryFilter`1.<Attempt>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at GreenPipes.Filters.RetryFilter`1.<GreenPipes-IFilter<TContext>-Send>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MassTransit.Pipeline.ConsumerFactories.DelegateConsumerFactory`1.<Send>d__2`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MassTransit.Pipeline.Filters.ConsumerMessageFilter`2.<GreenPipes-IFilter<MassTransit-ConsumeContext<TMessage>>-Send>d__4.MoveNext()
Attempt (from fault consumer): 0
Faulted, won't retry any more.

Reproducible Demo

Full example below, copy-and-paste into a new console app
NuGet references:

MassTransit.RabbitMQ <IP_ADDRESS>7-develop

using System;
using System.Threading.Tasks;
using GreenPipes;
using MassTransit;

namespace PossibleRetryBug
{
    public class YourMessage { public string Text { get; set; } }

    public class Program
    {
        public static void Main(string[] args)
        {
            var bus = Bus.Factory.CreateUsingRabbitMq(sbc =>
            {
                var host = sbc.Host(new Uri("rabbitmq://localhost"), h =>
                {
                    h.Username("guest");
                    h.Password("guest");
                });

                sbc.ReceiveEndpoint(host, "test_queue", ep =>
                {
                    ep.Consumer(() => new YourMessageConsumer(), consumerConfig =>
                    {
                        consumerConfig.UseRetry(retryConfig => retryConfig.Interval(3, TimeSpan.FromSeconds(5)));
                    });
                });
            });

            bus.Start();
            bus.Publish(new YourMessage { Text = "Hi" });

            Console.WriteLine("Press any key to exit");
            Console.ReadKey();

            bus.Stop();
        }

        public class YourMessageConsumer : IConsumer<YourMessage>, IConsumer<Fault<YourMessage>>
        {
            public Task Consume(ConsumeContext<YourMessage> context)
            {
                Console.WriteLine($"Attempt: {context.GetRetryAttempt()}");

                throw new Exception("Big bad exception");
            }

            public Task Consume(ConsumeContext<Fault<YourMessage>> context)
            {
                Console.WriteLine($"Attempt (from fault consumer): {context.GetRetryAttempt()}");

                Console.WriteLine(@"Faulted, won't retry any more.");
                return Task.CompletedTask;
            }
        }
    }
}

p.s. Thank you for all your hard work on this excellent framework, it really is a high quality project.

FWIW, the Fault<T> message will have a RetryAttempt of 0, since it's the first attempt at processing the Fault<T> message. But the retry attempt should be correct within the T consumer.

So this is something related to the way the ConsumerConsumeContext is proxying the ConsumeContext, by which the ConsumeRetryContext isn't showing up as a Payload. I'm looking into it, as it seems to be a concern that may have other subtle hidden bugs that aren't showing up. If you just move the retry up above the consumer it works as expected.
ep.UseRetry(...) instead of consumerConfig.UseRetry(...)

Interesting, thanks for looking into this. I tried configuring the retries on the receive endpoint. It does increment, but on the first retry the GetRetryAttempt invocation returns 0 - would you expect this to be 1?
sbc.ReceiveEndpoint(host, "test_queue", ep =>
{
    ep.UseRetry(retryConfig => retryConfig.Immediate(3));
    ep.Consumer(() => new YourMessageConsumer());
});

//... rest of the code is the same as above ...

Example output:
Press any key to exit
Attempt: 0
MassTransit.Messages Warning: 0 : R-RETRY rabbitmq://eur-soxapdev01/playground/test_queue 98040000-5de7-0015-89d2-08d634cd465c Big bad exception, System.Exception: Big bad exception
...
Attempt: 0
Attempt: 1
Attempt: 2
MassTransit.Messages Error: 0 : R-FAULT rabbitmq://eur-soxapdev01/playground/test_queue 98040000-5de7-0015-89d2-08d634cd465c MassTransitBug.YourMessage MassTransitBug.Program+YourMessageConsumer(00:00:01.3821997) Big bad exception,
...
Attempt (from fault consumer): 0
Faulted, won't retry any more.

It's fine if the retry count starts at 0, but I can't see an easy way to detect if a Consume execution is the first retry or the initial handling as the ```GetRetryAttempt`` call returns 0 for both. Apologies if I'm missing something obvious here.

The counts were off in 5.1.5, the next commit fixes the counts, and the issue as well.
Note that your failing test, because of where the UseRetry is placed, will retry with the same consumer instance, since it's within the consumer. MassTransit builds a pipeline, and pipelines executes in order - configuration determines that order.


Feature request: suggest rebooting into other fastboot mode when cannot obtain unlock token.

I kept getting Failed to obtain the token! Please enter it manually:  until I noticed that the device shows "fastbootd" in blue instead of "fastboot" in orange. After entering fastboot the other way it worked.
Look like adb reboot fastboot is not the same as entering fastboot using button presses.
MiUnlockTool may show a helpful message that the device may be not in the expected mode when fastboot platform tool works, but getting the code fails.
Also the message itself may be more specific "Failed to obtain the token from the device" - I initially assumed it fails to get the code from Xiaomi.

There is a difference between fastboot mode and bootloader mode ...
to enter bootloader mode
adb reboot bootloader

if you are in Fastboot mode (in blue).
fastboot reboot bootloader

Yes, but the essential part is that both respond to fastboot platform tool, making it easy to confuse. For example, MiUnlockTool can obtain a model name in fastboot mode, which made me believe that I was on the right track.
The longer message can help others, not experienced in distinguishing bootloader, fastboot, recovery and Mi Assistant modes to avoid that dead end.


Adding more meditation songs in Augmented reality Meditation part

@akshitagupta15june ma'am, as there are only 5 songs in Augmented reality Meditation part ,I want to add more songs into it.kindly assign me this issue so that i can work into it.

some are working on this


Search Keyboard Navigation

TODO: Search bar should refocus when pressing up key from first search result.
After this PR is merged: Implement first search result being selected by default, so that people can type a search query and hit the enter bar once they get a satisfactory result.

Added Features and fixed some bugs like

The case if the user is not focused on the modalInput, makes the UI work better
move up to select the input field
Type anywhere to fill up the input, Enter to select the option
Auto select the first option (with debounce, a bit janky)

Search relevance to be tackled in future PR
When focused text field, down arrow key should go to end of text box.


Recovering from a lost connection

Hi,
I'm probably missing something simple, but how would one detect/cleanup after a connection loss and then reconnect when connectivity is restored?
Currently I connect and save the connection in a variable.  I use that connection periodically.  If it gets an error (cable unplugged in this case), I call close on the connection.  When the link is restored, I make a new connection and things continue.  However, at some point soon after the reconnect a ECONNRESET is thrown.
What is the proper way to handle connection loss?
Thanks,
Kevin

I use this module to create a gateway between 2 types of networks, one being modbus. What I do is manage the connection outside and just pass the connection (a stream) to the transport. I'm not sure if this module should handle the connection and reconnect if needed, perhaps just some helper functions that could wrap that functionality.
An ECONNRESET in your case, if it's TCP, that's the other endpoint (or a router if in the middle) saying "I don't know anything about this connection, drop it". This can happen quite frequently on mobile networks.

Thanks for taking to time to respond.  I'm sure I'm just missing something...it's probably my lack of proficiency with streams.
I fine with maintaining the connection, but I'm not seeing a way to do that with the connection object returned by modbus.tcp.connect().  If I call connection.close(), I would expect the socket/etc to be completely torn down.  But when the network link is restored I get the ECONNRESET or sometimes Socket.writeAfterFIN...it seems like I shouldn't get these if the connect has been manually closed.
It feels like the modbus library is maybe hanging on to the connection in some way even when I tell it to close.  So I'm not sure how to properly/completely clean up on connection failure so that I can start over when the link is restored.

The following example doesn't exactly match my situation, but I think it illustrates some of what I'm seeing.
mb.tcp.connect(502, '<IP_ADDRESS>', { debug: 'test', retry: 5000 }, (err, connection) => {
  console.log('connect', err, connection);

  if (!err) {
    connection.readCoils({ address: 1, quantity: 8 }, (err, res) => {
      console.log('readCoils', err, connection);
    });

    connection.close(() => {
      console.log('connection closed manually');
    });
  }
});

...and that yields the following output...
connect null
Stream {domain: null, _events: Object, _eventsCount: 0, _maxListeners: undefined, transport: Transport, …}
connection closed manually
readCoils null
Stream {domain: null, _events: Object, _eventsCount: 0, _maxListeners: undefined, transport: Transport, …}
Error: read ECONNRESET
    at exports._errnoException (util.js:1016:11)
    at TCP.onread (net.js:609:25)

So, it seems like that error should be getting passed back to my readCoils callback so that it can be handled nicely rather than crashing the program.

I believe you know that your readCoils request will not be fulfilled because you're calling connection.close() at the same time (connection is a stream instance which asks the transport to close which in turn asks the real socket connection to close).
You should not be receiving the ECONNRESET that way. The error is being thrown because you're not listening for the error event in connection. But don't try it now, I already tested locally and I'm not propagating the error event to the stream so that will be useless.
I'm going to make 2 changes:

Being able to listen to error event on your connection so you can catch errors, log them and do something about it (instead of the process crashing);
Check if your readCoils also doesn't throw and, instead, return a nice error indicating the connection has gone sometime before.

Thank you for insisting on your explanation 👍

Ya, putting the close there was just to force the error.  Thanks for digging into it.

Can you test the master branch to see if it still happens? You should be able to listen for the error in your connection object and also receive a fake ECLOSED error when calling the readCoils.

I believe my answer was not clear. For your example, the ECLOSED error should come up inside your readCoils.
For other unexpected errors occurring on other occasions, you should be able to listen for the error event.

I'm not seeing the ECLOSED and am still getting the ECONNRESET.  However, if I add the error handler on the connection, I can intercept it there and keep things alive.

I tested with something similar to the example you gave. Are you now testing with your real code?

At least what I did is now on 2e7c1c4f98dbc886c2077eec9d988f02234a1223

I'm using the same test code...
mb.tcp.connect(502, '<IP_ADDRESS>', { debug: 'test', retry: 5000 }, (err, connection) => {
  console.log('connect', err, connection);

  if (!err) {
    connection.readCoils({ address: 1, quantity: 8 }, (err, res) => {
      console.log('readCoils', err, connection);
    });

    connection.close(() => {
      console.log('connection closed manually');
    });
  }
});

...which yields...
connect null
Stream {domain: null, _events: Object, _eventsCount: 0, _maxListeners: undefined, transport: Transport, …}
connection closed manually
readCoils null
Stream {domain: null, _events: Object, _eventsCount: 0, _maxListeners: undefined, transport: Transport, …}
Error: read ECONNRESET
    at exports._errnoException (util.js:1016:11)
    at TCP.onread (net.js:609:25)

With the addition of an error handler on connection, I have...
mb.tcp.connect(502, '<IP_ADDRESS>', { debug: 'test', retry: 5000 }, (err, connection) => {
  console.log('connect', err, connection);

  connection.on('error', (err) => {
    console.error('connect', err);
  });

  if (!err) {
    connection.readCoils({ address: 1, quantity: 8 }, (err, res) => {
      console.log('readCoils', err, connection);
    });

    connection.close(() => {
      console.log('connection closed manually');
    });
  }
});

...which yields (without crashing)...
connect null
Stream {domain: null, _events: Object, _eventsCount: 0, _maxListeners: undefined, transport: Transport, …}
connection closed manually
readCoils null
Stream {domain: null, _events: Object, _eventsCount: 1, _maxListeners: undefined, transport: Transport, …}
connect
Error: read ECONNRESET

What do you have on that ip/port? Do you have the code or is that out of the scope?

I still can't get your ECONNRESET but I now get a writeAfterFIN error using this sample.
var modbus = require("modbus-stream");

modbus.tcp.server({ debug: "server" }, function (connection) {
	connection.on("read-coils", function (req, reply) {
		setTimeout(function () {
			return reply(null, [ true ]);
		}, 500);
	});
}).listen(12345, function () {
	console.log("server ready");
	modbus.tcp.connect(12345, { debug: "client" }, function (err, connection) {
		connection.readCoils({ address: 0, quantity: 1 }, function (err, info) {
			if (err) {
				return console.log("readCoils error", err);
			}

			console.log("response", info.response);
		});
		connection.close(function () {
			console.log("connection closed");
		});
	});
});

I get this:
server ready
2017-07-03T09:59:52.890Z << client 0x[ 00, 01, 00, 00, 00, 06, 01, 01, 00, 00, 00, 01 ]
connection closed
2017-07-03T09:59:52.896Z >> server 0x[ 00, 01, 00, 00, 00, 06, 01, 01, 00, 00, 00, 01 ]
2017-07-03T09:59:53.400Z << server 0x[ 00, 01, 00, 00, 00, 04, 01, 01, 01, 01 ]

Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (net.js:275:12)
    at Transport.BaseTransport.write (/Users/dresende/Projects/modbus-stream/lib/transport/transport.js:45:15)
    at /Users/dresende/Projects/modbus-stream/lib/transport/transport.js:148:17
    at null._onTimeout (/Users/dresende/Projects/modbus-stream/test.js:10:11)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

I'm going to dig a bit further.

Forget it, this is a server error, not the client. You can avoid the throw by just:
connection.on("error", function (err) {
	console.log("server error", err);
});

Works for me :)

So, it seems your server might be closing the connection right after readCoils. I'm now remembering that perhaps your server doesn't allow the connection to be kept alive.
I'm going to simulate that and see if the module handles it nicely. Perhaps a close/end event would be better, although if the server just resets the connection you still need to check for the error event.

I exposed a close event in the new version (0.26.0) so you can detect the connection being closed before trying to send something again (and receiving an error). I hope this works out for you. If you feel there's still something wrong please reopen the ticket.

Sounds great, thanks for your work!


Notification on custom messages

Notifications on custom Messages
This addition will add a text field similar to grounditem's highlighted items list where any of the given messages entered are being searched for. If any message appears the player will be notified and told what
message was found.
Option: Notify on message
This will enable and disable the feature entirely.
 In the demo you can see "Hel*,*bay," which will match with anything with prefix Hel or postfix bay.
Things that could be improved are that currently we are splitting on commas. This means in order to use commas in your message you have to insert a * instead which could break some message types. Just extra work is involved to setup in these cases.
Demo

Maybe remove the quotes from the input? "Hel*,bay," would become Hel,*bay. This is consistent with the ground items plugin.

They are not in the actual input. They were there to show you what was in the box. Its identical to grounditems implementation.

This seems almost identical to #2474. See my comments there.

@Adam I think I have what you were looking for in the other PR. I made it into its own plugin with a few options. I can always separate the message types into two text boxes to be filled. One with Public, Clan, and Private chat and the other be things from the server like drops and such. This way is far more flexible and can accomplish the exact same thing but with less config clutter. We could even remove the trade and duel request toggle since the user could just add a "requested trade" message.


NTR: 	 si independent pericentric heterochromatin formation

Please provide as much information as you can:

Suggested term label:

si independent pericentric heterochromatin formation

Definition (free text)
standard def, but maybe include the components (YTH family RNA-binding protein (Mmi1 In pombe), CPF +?

Reference, in format PMID:#######

PMID: 31269446
CPF Recruitment to Non-canonical Transcription Termination Sites Triggers Heterochromatin Assembly and Gene Silencing
This paper also describes a roe for this pathway in pericentromeric heterochromatin formation,  in parallel to RNAi

Gene product name and ID to be annotated to this term

Parent term(s)

Children terms (if applicable) Should any existing terms that should be moved underneath this new proposed term?

Synonyms (please specify, EXACT, BROAD, NARROW or RELATED)

Cross-references

For enzymes, please provide RHEA and/or EC numbers.

Can also provide MetaCyc, KEGG, Wikipedia, and other links.

Any other information

@colinlog  @pgaudet  can discuss Friday?

OK I can do that, it will be clear which pathway it is.

I think a better label would be
determinant of selective removal (DSR) -dependent heterochromatin formation
(at least for the facultative pathway)
BUT,
that does not seem to apply to the centromeric pathway (there is such a lot in this paper!)
I can just annotate the ones implemented in the pericentromeric pathway to  pericentric heterochromatin formation" (GO:0031508)
I will keep this ticket for
determinant of selective removal (DSR) -dependent heterochromatin formation
I could repurpose
GO:0033621 | nuclear-transcribed mRNA catabolic process, meiosis-specific transcripts
for this and improve the term.
This is the same meaning, but I don't know if the  pathway is specific for only meiotic genes in other species.
@colinlog
GO:0033621
nuclear-transcribed mRNA catabolic process, meiosis-specific transcripts

Should this be modelled as "gene silencing'. (It is to prevent ectopic expression of meiotic gene  during vegetative growth), or as an RNA  catabolic process? or both?
(Sorry this ticket has changed topics somewhat!)

note also that we still have terms like
siRNA-independent facultative heterochromatin formation
Perhaps these could be MTREC/NURS  dependent/mediated facultative heterochromatin formation?
Also, not that there is a mismatch between the
siRNA-mediated terms and their regulatory children which still say dependent


az cli failed with ModuleNotFoundError: No module named 'colorama'

Describe the bug
Command Name
Install Azure CLI with "curl -L https://aka.ms/InstallAzureCli | bash". Started a new shell but "az --help" crashed for missing "colorama". Manually installed "pip install colorama", but didn't fix the issue.
Errors:
The command failed with an unexpected error. Here is the traceback:
No module named 'colorama'
Traceback (most recent call last):
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 582, in execute
    parsed_args = self.parser.parse_args(args)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/knack/parser.py", line 261, in parse_args
    return super().parse_args(args)
  File "/home/meiyang/miniconda3/envs/amlt_release/lib/python3.7/argparse.py", line 1755, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/home/meiyang/miniconda3/envs/amlt_release/lib/python3.7/argparse.py", line 1787, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/home/meiyang/miniconda3/envs/amlt_release/lib/python3.7/argparse.py", line 1993, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/home/meiyang/miniconda3/envs/amlt_release/lib/python3.7/argparse.py", line 1933, in consume_optional
    take_action(action, args, option_string)
  File "/home/meiyang/miniconda3/envs/amlt_release/lib/python3.7/argparse.py", line 1861, in take_action
    action(self, namespace, argument_values, option_string)
  File "/home/meiyang/miniconda3/envs/amlt_release/lib/python3.7/argparse.py", line 1043, in __call__
    parser.print_help()
  File "/home/meiyang/miniconda3/envs/amlt_release/lib/python3.7/argparse.py", line 2481, in print_help
    self._print_message(self.format_help(), file)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/azure/cli/core/parser.py", line 195, in format_help
    super(AzCliCommandParser, self).format_help()
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/knack/parser.py", line 251, in format_help
    is_group)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/azure/cli/core/_help.py", line 168, in show_help
    else self.group_help_cls(self, delimiters, parser)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/knack/help.py", line 253, in __init__
    child.load(options)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/azure/cli/core/_help.py", line 306, in load
    loader.versioned_load(self, options)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/azure/cli/core/_help_loaders.py", line 154, in versioned_load
    super(CliHelpFile, help_obj).load(parser)  # pylint:disable=bad-super-call
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/knack/help.py", line 198, in load
    description = getattr(options, 'description', None)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/knack/parser.py", line 242, in __getattribute__
    if callable(self._description) else self._description
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/azure/cli/core/commands/command_operation.py", line 133, in description_loader
    op = self.get_op_handler(self.op_path)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
    handler = import_module(mod_to_import)
  File "/home/meiyang/lib/azure-cli/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/meiyang/lib/azure-cli/lib/python3.7/site-packages/azure/cli/command_modules/find/custom.py", line 13, in <module>
    import colorama  # pylint: disable=import-error
ModuleNotFoundError: No module named 'colorama'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

curl -L https://aka.ms/InstallAzureCli | bash
pip install colorama
Start a new shell
az --help

Expected Behavior
Environment Summary
Linux-5.4.0-89-generic-x86_64-with-debian-bullseye-sid, Ubuntu 20.04.3 LTS
Python 3.7.11
Installer:

azure-cli 2.30.0

Additional Context

@jiasli for awareness

We have removed knack 0.8.3 from PyPI as azure-cli-core is incompatible with knack 0.8.3.
To fix an existing broken installation, please run
~/lib/azure-cli/bin/python -m pip install knack==0.8.2

@jiasli Thanks for your suggestion. I manually installed knack v0.8.2 as you suggested, but "az --help" crashed with the same error. I also didn't understand why installing knack would resolve error of missing colorama.

Please make sure you use the python at ~/lib/azure-cli/bin/python, instead of pip in your current virtual environment.


Rework install shell files

Description of changes
The nawk part was taken before https://github.com/NixOS/nixpkgs/pull/332084, but it is here for demonstration purposes.

Things done

Built on platform(s)

[ ] 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

[ ] Fits CONTRIBUTING.md.

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

@afh I have taken your bump to make a test here. Can you review it?

Hum, does it cause mass-rebuild?

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/4382

Two extra ideas:

rename this to installArtifacts,  since it is a more general name than installShellFiles

green alias

include other artifact installers like installDoc

@philiptaron you commented about using testEqualContent. However, from what I have seen, it does test singular files, not directory trees. So I prefer to keep it as is.
@infinisil i want to ask your opinion about a specific decision.
As I have written in https://github.com/NixOS/nixpkgs/pull/332612/commits/f72e74d7aef142ea16d0841fa4322fc1310bb913:

Rationale: Since RFCs 140 and 146, the old category-based hierarchy is
deprecated and obsolete, and a new approach took place: packages should be as
self-contained as possible.
This paradigm is reflected in many new strict checks that prohibit a package to
refer to files outside its directory tree.
Following this spirit, this commit essentially moves nixpkgs
pkgs/test/default.nix to ./tests/default.nix.

What do you think? Is this a good approach?

What do you think? Is this a good approach?

That looks great to me, nice work!


[Enhancement][API] Support batch copy and export online workflow

Purpose of the pull request
fix #8855

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

Codecov Report

Merging #10678 (690e465) into dev (3fbfa27) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                dev   #10678      +/-   ##
============================================
- Coverage     40.90%   40.89%   -0.01%
+ Complexity     4830     4828       -2
============================================
  Files           897      897
  Lines         36157    36152       -5
  Branches       4006     4000       -6
============================================
- Hits          14789    14786       -3
+ Misses        19897    19894       -3
- Partials       1471     1472       +1

Impacted Files
Coverage Δ

...api/service/impl/ProcessDefinitionServiceImpl.java
31.37% <100.00%> (+0.05%)
:arrow_up:

...er/master/dispatch/host/assign/RandomSelector.java
77.77% <0.00%> (-5.56%)
:arrow_down:

...dolphinscheduler/remote/future/ResponseFuture.java
81.96% <0.00%> (-1.64%)
:arrow_down:

...r/plugin/task/sqoop/parameter/SqoopParameters.java
53.33% <0.00%> (-1.34%)
:arrow_down:

...rver/master/runner/task/BlockingTaskProcessor.java
75.60% <0.00%> (-0.30%)
:arrow_down:

...eduler/api/service/impl/DataSourceServiceImpl.java
29.41% <0.00%> (ø)

.../dolphinscheduler/plugin/task/datax/DataxTask.java
0.00% <0.00%> (ø)

...cheduler/plugin/task/api/ShellCommandExecutor.java
0.00% <0.00%> (ø)

...er/api/service/impl/TaskDefinitionServiceImpl.java
24.01% <0.00%> (+0.05%)
:arrow_up:

...hinscheduler/plugin/alert/wechat/WeChatSender.java
29.78% <0.00%> (+0.20%)
:arrow_up:

... and 1 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 3fbfa27...690e465. Read the comment docs.


Enhancement: Kill server process using PID (platform agnostic)

Write cmd.Process.PID to a file like .running when server is started
in killServer:

check file exists
get pid from file
p := os.Process.FindProcess(pid)
p.Kill()

Side note: I have at least two PRs incoming.  One would address this if. The other fixes some other platform agnosticities (yes that's a made up word).

This sounds good to me, since this tool is just used to run the server locally, ideally it'd work well on windows too, I'm afraid I haven't had a windows laptop to test on so the windows support has been lacking in the past. I'd prefer if the file was created in secrets as a dotfile, as that's where I tend to put stuff that shouldn't be committed to projects.

I'd prefer if the file was created in secrets as a dotfile, as that's where I tend to put stuff that shouldn't be committed to projects.

Agreed.


Update languages-for-voicemail-greetings-and-messages.md

Update languages

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


Make require: true the default for Model#fetch

Related Issues: #718

Introduction
Make require: true the default for Model#fetch and Collection#fetchOne calls.
Motivation
When fetching a single model there is usually a precise set of constraints, so as a user I'm interested in getting that model, not any other value. This is especially true when logging in a user, or when looking for a specific record of something. Usually all further processing of said model should be skipped since it wouldn't make sense, so this facilitates that mechanism by default.
This change ensures that fetch calls like:
new MyModel({id: 1}).fetch()

will always resolve with a model, avoiding the need to additionally check if the result is not null. If the model cannot be fetched because it does not exist in the database an error will be thrown and the fetch call will be rejected with MyModel.NotFoundError. This specific error class can be caught and dealt with appropriately:
new MyModel({id: 1})
  .fetch()
  .then(myModel => {
    // do something with the fetched model
  })
  .catch(MyModel.NotFoundError, error => {
    // handle no results error
  })

Closes #718.
Proposed solution
This adds a new Model#requireFetch property that can be used to set the default behavior when handling empty responses of Model#fetch, and sets its default value to true, meaning that the default is to reject the fetch Promise.
The new model level property also means that users that prefer the previous behavior can easily adapt their code by simply adding requireFetch: false to their model definitions.
There is a migration guide in the Wiki to help with the transition to this new default.
Current PR Issues
This does not change the default behavior when fetching collections, mainly because it's not easy to catch an EmptyResponse error from a collection built from model methods like Model#fetchAll or Model#fetchPage. It can also be argued that when fetching collections, the requirements are not as strict, and it's usually OK for them to be empty.
Not everyone is going to like this change, but it should be relatively easy to keep using the previous behavior for those that prefer to think is terms of SQL and less about abstract higher level objects.
Alternatives considered
There are some commits in this series that actually made require: true the default also for fetching collections, unifying all fetch interfaces in terms of behavior, but it was proving very difficult (impossible?) to catch errors by a specific collection's EmptyResponse error.

This is not a good change. You're making quite an assumption for use cases. What if I wanted to check if a value exists (i.e., I'm searching by string for a dictionary entry... if it's not there, oh well!). You should leave it to the developer to decide what they want to do if the value is not there. I upgraded recently from 0.13 to 1.0 and this broke many things.


Improve the console error logging appearance

This makes secondary information less visually prominent to improve overall readability.
Various loggers were also tweaked for consistency.
Preview
Before

After

Thanks!


Stocks without institutional_holders

Stocks like VZ doesn't have institutional_holders, so get Ticker info fails:
import yfinance as yf
tickerData = yf.Ticker("VZ")
info = tickerData.info
print(info)

In base.py is possible to check the length of the holders:
    if len(holders) > 1:
        self._institutional_holders = holders[1]

Facing the same issue with brk-b. The following fix works:
try:
self._institutional_holders = holders[1]
except:
self._institutional_holders = {}


ITO smart contracts for MATIC and BSC

I will close this PR.
Changes/Fixes included in:
https://github.com/DimensionDev/InitialTwitterOffering/pull/28


DupFinder Support

I'm working on support for Jetbrains DupFinder. Does anybody need some specific options?

:+1: woot!
The main one for me would be the ability to pass a config file into the alias so that all the configuration can be stored in that file.

:+1:

Merged


Use configuration file to start KBS

Now the parameters to start a KBS is eight https://github.com/confidential-containers/kbs/blob/main/src/kbs/src/main.rs#L25 . We might need to change the way to start KBS like kata-agent, s.t.

Define a configuration file
Read parameters from a given configuration file or degrate to a default one

Hi! I'm happy to take a look at this.
Looks like there is already support for a config file:
https://github.com/confidential-containers/kbs/blob/9902fb1a109bb9dfed791f7fc99eee44a5d6fd2d/src/kbs/src/main.rs#L65-L68
What should the new state look like compared to now? And which file format do we want to use (right now JSON seems to be used)?

@johananl Hey, welcome to Confidential Containers!

Looks like there is already support for a config file:

Yes, it it. However, the parameters from the commandline are still too many as
https://github.com/confidential-containers/kbs/blob/main/src/kbs/src/main.rs#L21C1-L58C2
My idea is that we use a single configuration file to set all the parameters, and we can also receive parameters from commandline. The logic might look like

If -c parameter is given, KBS will use the given path as its configuration file
If no -c parameter is given, by default KBS will look for a specific file as its configuration file, e.g. /etc/kbs.config or something
If more parameters are given, KBS will give priority to the parameters entered on the command line. For example

timeout=10 is set in the config file, while -t 100 is given via parameter. Then 100 will be used.

In this way, it seems more "configuration as code". Could you share some point of views?

I am not so sure about the configuration file approach.
Unlike kata-agent KBS is a pretty dynamic, container native application. OTOH kata-agent's config is pretty static and takes time to make any config changes and see them at play.
IMO for a container native application it should either support env vars or flags by default. So when a user deploys a KBS all they have to bother about is making changes in one config file like here:
https://github.com/confidential-containers/kbs/blob/9902fb1a109bb9dfed791f7fc99eee44a5d6fd2d/config/kubernetes/base/deployment.yaml#L21-L31

IMO for a container native application it should either support env vars or flags by default. So when a user deploys a KBS all they have to bother about is making changes in one config file like here:

Thanks for your ideas. I think if we use a single configuration file, we can leverage configmap mechanism in kubernetes to deploy KBS. A potential better way for the two aims is that we can also receive parameters from commandline to overwrite the settings from config file.

I get Xynnn007's point about too many CLI arguments. This is annoying especially when running the binary manually.
I also agree with Suraj that cloud-native apps tend to favor CLI args and env vars for their configuration.
AFAICT we could allow both approaches if we wanted, for example using the config crate: https://crates.io/crates/config
Maybe it would help to figure out what the main deployment method for KBS is, and make sure whatever approach we choose works best for that method. Is it mainly k8s? Do we also expect people to install KBS directly on VMs or bare metal servers?

Following an offline discussion with @mkulke, Magnus thinks it would make sense to support the following two methods of specifying KBS config:

CLI args or env vars where args have a higher precedence than vars.
A config file.

Using this approach, specifying a config file precludes specifying options in args or env vars. In other words, specifying --config in combination with e.g. --socket is an invalid state.
If there are no objections I'll take a stab at Magnus' approach and open a PR for review.

I've had some discussions with my colleagues offline about this. I'm summarizing the discussions here:
Right now the KBS config is split among CLI arguments as well as a config file.
https://github.com/confidential-containers/kbs/blob/2c6f6d04633a6eb1711c2041ce7cff6acce5a874/src/kbs/src/main.rs#L19-L58
https://github.com/confidential-containers/kbs/blob/2c6f6d04633a6eb1711c2041ce7cff6acce5a874/src/api/src/config.rs#L15-L55
Initially I wanted to consolidate the KBS config into a single struct and allow the user to populate this struct using one of the following two methods:

Reading a config file
Accepting CLI args and/or reading env vars

Method 1 is easy to implement: We accept just one CLI argument, --config, which points to a config file which in turn contains all the options.
Method 2 is also easy to implement: We use the clap crate which can handle arbitrary combinations of CLI args and env vars.
However, if we want to consolidate the config then method 2 must support the same options as method 1. This is tricky because the config is nested rather than flat. Example:
https://github.com/confidential-containers/kbs/blob/2c6f6d04633a6eb1711c2041ce7cff6acce5a874/src/api/src/config.rs#L50-L54
https://github.com/confidential-containers/kbs/blob/2c6f6d04633a6eb1711c2041ce7cff6acce5a874/src/api/src/attestation/amber/mod.rs#L37-L43
How would we specify e.g. amber -> base_url via a CLI argument? We could go with --amber-base-url, but then we'd have a bunch of --<method>-<option> args for each of the supported attestation methods. The same goes for repository types and configurations: We'd quickly find ourselves with args such as --localfs-dir-path, --localfs-foo and --localfs-bar and then also --remote-storage-dir-path, --remote-storage-baz and --remote-storage-qux.
Lastly, specifying structured JSON values as strings in CLI args or env vars is VERY messy, and we already need to do this for repository_description:
https://github.com/confidential-containers/kbs/blob/2c6f6d04633a6eb1711c2041ce7cff6acce5a874/src/api/src/config.rs#L28
I tried to pass a value to repository_description and ran into escaping problems and other parsing issues.
All of the above makes me think it's undesirable or impractical to have 100% parity between config file options and CLI args / env vars. Looking at other cloud native projects such as Envoy, it's clear that some options are only configurable on the CLI whereas others are only configurable via a config file (in the case of Envoy there are other alternatives to config files but they are the same in that the config is specified as a data structure rather than discrete config bits on the CLI or in env vars).
I've tried to generalize which options usually go in config files and which should be CLI args or env vars. Here are my thoughts:

If there are just a few config options and the config scheme is flat, it's better to avoid config files altogether.
If nested config options are required, it's easier to specify nested options in a config file.
Things which are tied to a specific invocation of the application (log level, debug mode, which config file to use) should be in CLI args and/or env vars.

What do you think @Xynnn007?
P. S. Please forgive the 📜

Hi @johananl , thanks for the cool thought process!

If there are just a few config options and the config scheme is flat, it's better to avoid config files altogether.
If nested config options are required, it's easier to specify nested options in a config file.
Things which are tied to a specific invocation of the application (log level, debug mode, which config file to use) should be in CLI args and/or env vars.

Agreed. I think it is a great summury. As you've mentioned, there are nested options in the config file like amber_config, which makes us SHOULD use a config file to avoid mess. Also, the CLI/ENVs are easy to read, which is helpful to specify the flags/specific invocation for app.
I prefer to think about what options we can move from CLI/ENV to the config files. In this way we can try to make the commandline easy to read and leave the other configurations structurialized inside the config file.

OK, great. I'll use the "what can we move to config file" approach and try to keep only invocation-specific options as CLI args. I'll also add env var support for all the CLI arg options.

PR #150 is ready for review. FWIW I'm still not sure which config params should reside in the config file and which should be CLI args 😬 I can't come up with a clear-cut definition of which params should go where and keep changing my opinion.
For now I went with the "put everything in the config file" approach in the PR because that's what we seem to have arrived at here, plus it may be easier to discuss with something concrete to look at. But there are clearly cases where it's nicer to have something (e.g. listening sockets) as a CLI arg.
Thoughts and opinions welcome (can be done directly on the PR 😉).


Added an example to ArcBetweenPoints class

Added an example to ArcBetweenPoints class
Changelog / Overview

Motivation
I am adding an example to the class that didn't have one.
Explanation for Changes

Documentation Reference

Testing Status

Further Comments

Checklist

[checked] I have read the Contributing Guidelines
[checked] I have written a descriptive PR title (see top of PR template for examples)
[checked] I have written a changelog entry for the PR or deem it unnecessary
[checked] My new functions/classes either have a docstring or are private
[checked] My new functions/classes have tests added and (optional) examples in the docs
[checked] My new documentation builds, looks correctly formatted, and adds no additional build warnings

Reviewer Checklist

[ ] The PR title is descriptive enough
[ ] The PR is labeled correctly
[ ] The changelog entry is completed if necessary
[ ] Newly added functions/classes either have a docstring or are private
[ ] Newly added functions/classes have tests added and (optional) examples in the docs
[ ] Newly added documentation builds, looks correctly formatted, and adds no additional build warnings

Can you rename arc1 to arc since there's only one?


⚠ Turnos 24x7 has degraded performance

In 3e917c2, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 938 ms

Resolved: Turnos 24x7 performance has improved in 4bf21e6.


UserWarning: Pandas requires version '3.0.5' or newer of 'xlsxwriter' (version '3.0.3' currently installed).

<!---   *** BEFORE SUBMITTING: PASTE CLIPBOARD HERE TO COMPLETE YOUR REPORT ***   ---!>

Hey @vasbanos, thanks for reporting. Could you post a screenshot of that warning so we can better understand how to prevent displaying it?
Otherwise we won't be able to help you.

Closing due to lack of response.

pip install xlsxwriter --upgrade         it works perfectly for me


Revert "MWPW-154549 | Integrating unity Block in CC"

Reverts adobecom/cc#379

since its unity PR we will check the revert changes in STAGE. so adding 'verified' label for same

now unity block not loading in stage..PF below


Set name and language for MediaStreamDescriptor

Values for Name and Language propagate to AudioTrack and VideoTrack as expected. Without these values, getting the Name and Language of each stream is a bit cumbersome.

@lukasf Thank you. Yes, I am aware of these properties in FFmpegMediaSource. I personally don't want to pass FFmpegMediaSource around between components in my project as I want to abstract it away. Having these properties available right on the track is more convenient for me.

Alright, merged. Thank you @huynhsontung

@huynhsontung - Good change, had thought about looking into that as well!


add _hubClusterResource property to cluster node

Signed-off-by: Sherin Varughese<EMAIL_ADDRESS>Related Issue:  stolostron/backlog#25996
Description of changes
https://github.com/stolostron/backlog/issues/25996#issuecomment-1267108973

/lgtm
/hold
/override unit-test
The changed line not covered by tests is simply fixing a typo.

/override ci/prow/unit-test
The changed line not covered by tests is simply fixing a typo.


Build error in Unity 6000 "undefined symbol"

Hello, today I found your package and loved it from the first moment. I have created 2 layout mockups with it in no time. Feels great compared to Unity's layout disaster. But unfortunately the build pipeline fails in WebGL and I have no idea why. I have filed an issue at Unitys forum but maybe you can help.
Thanks a lot and have a nice day

Hey @RobTranquillo, thanks for the report. I'm glad you liked the package ^^
So, you say you have an "undefined symbol" error, but in the forum there is nothing with this error written in it. Can you post here the whole error message? I mean, which symbol is undefined in your build?
Maybe Unity 6 needs WebGL native plugins to be in .a and dropped support for .bc files?


Menu scroll on Android not working

Have a problem scrolling the SB Admin 2 on mobile phones. It's working fine on desktop, and when I'm testing the narrow view on desktops. But I can't scroll the menu on phones. I just scroll the content in the behind.
What's could possible be wrong? I haven't changed (what I can tell) anything from original code.

I've updated to SB Admin Pro 2 version 2. Now it's working. I was running version 1.3.
The problem was isolated to the included style.css. The new one worked just fine.


[GEP-18] Add a new constraint in .status.constraints for Shoots whose CAs are expiring in less than 1y

How to categorize this PR?

/area security
/kind enhancement
What this PR does / why we need it:
This PR adds a new optional constraint to the .status.constraints of Shoots.
It is only visible when there is at least one CA certificate which expires in less than 1y as a "warning"/reminder that a rotation should be performed.
FYI @gardener/dashboard-maintainers
Which issue(s) this PR fixes:
Part of #3292
Release note:

In case at least one shoot cluster CA certificate is about to expire in less than `1y`, a new constraint of type `CACertificateValiditiesAcceptable` will be visible in the `.status.constraints` to make end-users aware that a rotation should be performed.

/assign


Manual Jogging Buttons for Axis

Add manual jogging buttons for X, Y and Z axis so can use mouse instead of keyboard to move each axis.

Impletmented

Re-Factoring Code


Test failing - TypeError: Class constructor Worker cannot be invoked without 'new' - window.matchMedia

Summary
When trying to test run for snapshot testing using jest and react-test-renderer, facing the issue TypeError: Class constructor Worker cannot be invoked without 'new' pointing from filepond.js which is using window.matchMedia
...
How to reproduce
Test snapshot for a component which is using filepond using below code
it("should render correctly", () => {     const tree = renderer.create(<App />).toJSON();     expect(tree).toMatchSnapshot();   });
(or)
Download this Codesandbox repo and try. (some reason not failing in codesandbox)
...
Expected behaviour
Test to pass
...
Additional information

"filepond": "^4.13.5",
"react-filepond": "^7.0.1",

...

Environment
Version

OS
Windows ...

Device
...

Browser
Chrome / ...

Have got a workaround by having this mock before
Object.defineProperty(window, 'matchMedia', {
      writable: true,
      value: jest.fn().mockImplementation(query => ({
        matches: false,
        media: query,
        onchange: null,
        addListener: jest.fn(), // deprecated
        removeListener: jest.fn(), // deprecated
        addEventListener: jest.fn(),
        removeEventListener: jest.fn(),
        dispatchEvent: jest.fn(),
      })),
    });


"printerrors" option doesn't seem to work as documented

var logentries = require('node-logentries');

var log = logentries.logger({
  token: 'xxxx',
  printerror: true
});

console.warn("I AM ABOUT TO HAVE MY BIG ERROR _ HERE GOES!!!");

log.err("Hey look it's something. Or something.");

(This also happens if I leave out the "printerror" option, where it should default to true)
I do get the messages showing up in Logentries online - so it's doing its thing, but I would expect the "Hey look it's something" line to also be printed to STDERR or STDOUT or something.
I think I see the problem - I'll try to create a pull request for it.

The new client has a 'console' option. If the console option is true, logs of level 0-2 will use console.log, level 3 will use console.warn, and levels 4-7 will use console.error.


Remove Daily UI page navigation

Daily UI isn't available on the site so when you reach the last project (Tasting note / LCBO), there shouldn't be an option to navigate to daily UI page.

Fixed


Reloader is breaking the execution if using Poetry scripts

The Flask reloader is apparently using the executed command instead of the actual Python package. When I try running with Poetry scripts, it throws an error (only if the reloader is enabled)
To replicate the behavior you can create a new Poetry Python package, install Flask and create the following Poetry script:
[tool.poetry.scripts]
dev = 'my_package.main:run'

(as you can imagine, you need to have a run function inside a file called main.py within a folder called my_package that will create the app and run it)
Now, you can set FLASK_DEBUG=0 and run it with poetry run dev. It will work (as expected).
After this, you can set FLASK_DEBUG=1 and run the same command, it will fail saying that it wasn't able to find the dev file. I've explored it a little bit, and the problem isn't the debugger, but the reloader (if you launch with the debugger, but without the reloader it works)
It seems the reloader somehow uses the executed command (dev) as the expected Python file to be used upon reloading and, because of that, it can't find the file and throws an error.
Environment:

Python version: 3.10
Flask version: 2.2.2

If I modify Werkzeug's reloader to print out sys.argv and sys.orig_argv, it shows this:
sys.argv = ['dev']
sys.orig_argv = ['/home/david/.cache/pypoetry/virtualenvs/hello-y1FJtfO2-py3.10/bin/python', '-c', "import sys; from importlib import import_module; sys.argv = ['dev']; sys.exit(import_module('hello').run())"]

This points to an issue with Poetry, it is breaking the documented behavior of sys.argv by setting sys.argv = ["dev"] instead of ["-c"]. Please report that to Poetry.
That said, Werkzeug still wouldn't support this, as the python -c 'code' form of invoking Python does not put enough information in sys.argv to recreate the command. I was already looking at sys.orig_argv, but that was only added in Python 3.10.

I opened https://github.com/pallets/werkzeug/issues/2589 to better describe what I was working on already. It will fix this issue as well. The sys.argv issue above should still be reported to Poetry.

thanks @davidism for the detailed explanation. Tomorrow I'll open an issue on the Poetry repository 😁
Regarding using Flask CLI, I'm already doing that. I found that issue because I wanted to experiment with Poetry Scripts and accidentally found it 😁


Why not distribution Zen?

Please help me

Hello,
We will be deprecating "zencash-mobile" soon. It won't be updated.
Please use any other wallet from the list: https://www.horizen.io/wallets/


useSortable transform styles delayed and glitchy

I have been using sortable with the exact same code in other places with no issue, but for some reason my latest implementation is causing weirdness when dragging. I have narrowed it down to the
const style = {
      // transform: CSS.Transform.toString(transform),
      transform: CSS.Translate.toString(transform),
      transition,
}

Neither CSS.Transform nor CSS.Translate fixes it.
Basically when dragging, it doesn't move instantly to where its expected, and is delayed and jumpy...the drop works and it changes, but the UI feedback is very chunky.
// The context/sortablecontext parent container
<DndContext onDragEnd={updateSubImageOrder} sensors={[pointerSensor, touchSensor]} >
        <SortableContext items={items} strategy={rectSortingStrategy}>
              {images && images.map((image, index) => {
                  return(
                      <SeedGridThumbnail
                          image={image}
                          index={index}
                          callback={clickHandler}
                          key={_.get(image, 'id')}
                          sortKey={_.get(image, 'id')} />
                  )
              })}
      </SortableContext>
</DndContext>

// The useSortable (with proper id being set to match the context items
const {
    attributes,
    isDragging,
    listeners,
    setNodeRef,
    transform,
    transition,
  } = useSortable({
    id: _.get(image, 'id')
  })

// The sortable DOM elements
<div
      key={_.get(props, 'sortKey')}
      className={styles.image}
      data-id={_.get(image, "id")}
      ref={setNodeRef} style={style} {...attributes} {...listeners} // Sortability
      >
      <Image
        alt={_.get(image, "name")}
        data-id={_.get(image, "id")}
        src={_.get(image, "url")}
        key={_.get(image, "id")}
        width="768" height="768"
        placeholder='blur'
        blurdataurl={base64LoadingData}
        />
    </div>

Thanks for any insight. I am pretty sure the items data is updating properly, as the state updates on the DB after I drag and drop.

@astralmedia How did you fixed that ?


pkg/metadata: add 'comm' label for process

This also modifies the executable label to
be part of global metadata rather than for just the compiler.
Fixes #652
Signed-off-by: Sumera Priyadarsini<EMAIL_ADDRESS>

Good job 💯


special handling of asyncs and promises

so I have this code
export function context(): DependencyContainer {
  container.register(
    Beans.APOLLO_CONFIG,
    {
      useFactory: instanceCachingFactory<Promise<Config>>(async(c) => {
        return getApolloServerConfig();
      }),
    });
  return container;
}

getApolloServerConfig is an async function
now all the way down I have to do this
export function testContext(): DependencyContainer {
  const testContainer = context().createChildContainer();
  testContainer.register(
    TestBeans.APOLLO_SERVER,
    {
      useFactory: instanceCachingFactory<Promise<ApolloServer>>(async(c) => {
        const config = await c.resolve<Promise<Config>>(Beans.APOLLO_CONFIG);
        return new ApolloServer({
          ...config,
          engine: false,
        });
      }),
    });

  testContainer.register(
    TestBeans.APOLLO_TEST_CLIENT,
    {
      useFactory: instanceCachingFactory<Promise<ApolloServerTestClient>>(async(c) => {
        const server = await c.resolve<Promise<ApolloServer>>(TestBeans.APOLLO_SERVER);
        return createTestClient(server);
      }),
    });
  return testContainer;
}

including a final await in after my resolve.
what I'd really like to do (and maybe this isn't possible? is to return the promise on the first one, but have the following calls simply request the result of the first promise.
export function testContext(): DependencyContainer {
  const testContainer = context().createChildContainer();
  testContainer.register(
    TestBeans.APOLLO_SERVER,
    {
      useFactory: instanceCachingFactory<Promise<ApolloServer>>((c) => {
        const config = await c.resolve<Config>(Beans.APOLLO_CONFIG);
        return new ApolloServer({
          ...config,
          engine: false,
        });
      }),
    });

  testContainer.register(
    TestBeans.APOLLO_TEST_CLIENT,
    {
      useFactory: instanceCachingFactory<ApolloServerTestClient>((c) => {
        const server = await c.resolve<ApolloServer>(TestBeans.APOLLO_SERVER);
        return createTestClient(server);
      }),
    });
  return testContainer;
}

this may not be possible in any sort of sane rational way, I'm uncertain as I'm only recently coming to this from a Java/Spring world.

Promises cache their values by default, so multiple calls to resolve() return the first resolution result. It's like a Java Future that way. https://www.ecma-international.org/ecma-262/6.0/#sec-promise-resolve-functions

sure, but I'd rather not have to do container.resolve<Promise<Foo> when I could (in theory) just do container.resolve<Foo>

Dependency injection is by nature synchronous, so you would need to register the Foo instance after your first resolve in that case.

I have come up with this as sort of a pattern, but I still question whether it might be possible to block on resolve, when registering a promise (yes I know DI is blocking by nature), basically a way of telling the container, this will be available, so wait for it...
  await createContentfulConnector(container.resolve(Beans.CONTENTFUL_CONNECTOR_CONFIG))
    .then((conn) => {
      container.register(Beans.CONTENTFUL_CONNECTOR, { useValue: conn });
    });```

As far as I know, there is no way to make asynchronous things block in JavaScript (without using a native C/C++ module). The pattern you posted above is exactly what I was thinking, but you'd still need to make sure your program awaits the resolve/register before trying to resolve the actual instance (which would be the responsibility of the program, not the DI container).
I could see a case for adding a helper for the above pattern into tsyringe though (to guide usage to the pattern)

I'd be ok with that, or maybe just some documentation. Though I can't help but wondering if maybe there's a way that a flag could be set internally for "building in progress" then also have that updated once the promise is resolved, in this way the resolve could be called as normal, but continue to block until ready.

I think the best way to handle this right now would be to update the documentation for this case. Even if the container internally tracked whether or not "building is in progress", there would still need to be some external await ... since we can't force JS to block. Because of that, I feel the solution should live entirely outside of the container (via the helper function you suggested for example)

so, I wrote this...
export function factory(explicit?: symbol, { singleton = true, container = rootContainer() } = {}) {
  return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
    const token = !!explicit ? explicit : Symbol.for(propertyKey);
    const factory = (c: DependencyContainer) => {
      const obj = descriptor.value.apply(target, [c]);
      if (obj instanceof Promise) {
        const handler = {
          get: (target: Promise<any>, prop: string, receiver: any) => {
            return target.then((o) => {
              return o[prop].apply(o);
            });
          },
        };
        return new Proxy(obj, handler);
      }
      return obj;
    };
    const finalFactory = singleton ? instanceCachingFactory(factory) : factory;
    container.register(token, { useFactory: finalFactory });
  };

would something like proxyForPromiseFactory(...) be a good idea to fulfill this? (this is a first attempt, if you see something broken please let me know)

looked into the proxy thing more... it doesn't work, the more I think about this, I'm not sure it's a good idea, in our case it's me trying to support an existing anti-pattern.

I was reading this issue and thinking if there is a better way of doing this. Can we specify on the arguments of the factory the dependencies to build the new bean and then the framework can orchestrate to call the factory function just when all their dependencies are resolved?
Something like this:
  testContainer.register(
    TestBeans.APOLLO_TEST_CLIENT,
    {
      useFactory: instanceCachingFactory<Promise<ApolloServerTestClient>>(TestBeans.APOLLO_SERVER, (c, server: ApolloServer)
        => createTestClient(server)),
    });

@Xapphire13 sorry to jump in like this, but thread is the closest thing I've found online to help with this use case. What is your recommendation here for handling async resolutions? I am using Tsyringe with routing-controllers so I need some way to resolve my async dependencies before an API request is addressed.

Has anyone found a solution to this? this unfortunately was a huge blocker for me :(

Hitting the same issue, but I agree that DI should focus on injection, whereas async initialisation should live outside the container. I've create an abstract class AsyncService for these use cases which has a static async bindContainer(...) which first registers the component, and then calls the AbstractService's init() function:
export abstract class AsyncService implements Disposable {
	static async bindContainer(
		container: DependencyContainer,
		token: InjectionToken,
		provider: ClassProvider<AsyncService>,
		options?: RegistrationOptions,
	) {
		container.register(token, provider, options);
		await container.resolve<AsyncService>(token).init();
	}

	async init(): Promise<void> {}
	async dispose(): Promise<void> {}
}

class UserService extends AsyncService {
         async init(): Promise<void> {
           // do some async init stuff
         }
}

// at composition root:
await UserSupabaseRepo.bindContainer(
		childContainer,
		UserSupabaseRepo,
		{
			useClass: UserSupabaseRepo,
		},
		{
			lifecycle: Lifecycle.ContainerScoped,
		},
	);

Hitting the same issue, but I agree that DI should focus on injection, whereas async initialisation should live outside the container. My approach: I've create an abstract class AsyncService for these use cases which has a static async bindContainer(...) which first registers the component, and then calls the AbstractService's init() function:
export abstract class AsyncService implements Disposable {
	static async bindContainer(
		container: DependencyContainer,
		token: InjectionToken,
		provider: ClassProvider<AsyncService>,
		options?: RegistrationOptions,
	) {
	  container.register(token, provider, options);
	  await container.resolve<AsyncService>(token).init();
	}

	async init(): Promise<void> {}
	async dispose(): Promise<void> {}
}

class UserService extends AsyncService {
	constructor(
		@inject('database') protected db: Database,
	) {
	  super();
	}

         async init(): Promise<void> {
           // do some async init stuff, eg:
	  await this.db.getUser();
         }
}

// at composition root:
await UserService.bindContainer(
		childContainer,
		UserService,
		{
			useClass: UserService,
		},
	);

The drawback is that the instances are not lazily loaded! But resolving the deps can be done without handling the initialisation promise.

Got another approach that solves the drawbacks of the one I posted before, it's mainly a wrapper around the existing API that improves readability and reduces duplicating registration-code:

I still have an AsyncService class that declares an async init() function
The an async FactoryProvider is essentially a ServiceProvider that initialises the service asynchronously. To play nicely with resolving tokens, for each AsyncService implementation I also has implement its own ServiceProvider subclass.
init() is called through the ServiceProvider
Registering the ServiceProvider is done through a convenience function that:

Registers the constructor through a ClassProvider under a private token - no-one can access the class instance unless using its provider
Registers the ServiceProvider for the passed token, which whenever it is resolved, will call await init() on the service.

This means now I can register the class provider and factory provider tied to their AsyncService implementation, with their own Lifecycle each. Every time I resolve the concrete ServiceProvider I can be sure to get the factory that properly initialises my service async, so my client is forced to await that async factory and awaiting full initialisation is done in the control flow, not during dependency injection.
export class ServiceProvider<T extends AsyncService> extends Promise<T> {}

export abstract class AsyncService {
    async init(): Promise<void> {}
}

export async function registerServiceProvider(
	container: DependencyContainer,
	providerToken: InjectionToken<ServiceProvider>,
	providedClass: constructor<AsyncService> | DelayedConstructor<AsyncService>,
	options: RegistrationOptions & {
		factoryWrapper?: (
			factoryFunc: FactoryFunction<ServiceProvider>,
		) => FactoryFunction<ServiceProvider>;
	} = {
		factoryWrapper: (f) => f,
		lifecycle: Lifecycle.Transient,
	},
) {
	const serviceUuidToken = uuidv4();
	container.register(
		serviceUuidToken,
		{
			useClass: providedClass,
		},
		{
			lifecycle: options.lifecycle,
		},
	);

	const serviceFactory: FactoryFunction<ServiceProvider> = async (
		dependencyContainer: DependencyContainer,
	) => {
		const service = dependencyContainer.resolve<AsyncService>(serviceUuidToken);
		await service.init();
		return service;
	};
	container.register<ServiceProvider>(providerToken, {
		useFactory: options.factoryWrapper
			? options.factoryWrapper(serviceFactory)
			: serviceFactory,
	});
}

// Registering a concrete implementation:
class ConcreteServiceProvider extends ServiceProvider<ConcreteService> {}
class ConcreteService  extends AsyncService {
        async init() { /* your async init */ }
}
registerServiceProvider(
		container,
		ConcreteServiceProvider,
		ConcreteService,
		{
			lifecycle: Lifecycle.ContainerScoped,
			factoryWrapper: instancePerContainerCachingFactory,
		},
	);

// Resolving the service through its provider:
const serviceProvider = container.resolve<ConcreteServiceProvider>(
	ConcreteServiceProvider,
);
const service = await serviceProvider();

It's a more generic approach than mentioned in the comments above, which allows for declaring AsyncService implementations that are resolved and initialised appropriately without re-implementing that logic for every such class you might have. It's useful in case you find yourself with many similar cases where you need async initialisation of your deps.


getDate(int columnIndex, Calendar cal) not implemented

The getDate function that accepts a column index and a calendar is not implemented:
	@Override
	public Date getDate(int columnIndex, Calendar cal) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

Some clients (Apache Drill being one) require this functionality since they always pass a Calendar object.

I noticed that you already added it as a simple wrapper around getDate - I think it is sufficient, the JDBC spec doesn't specify what getDate(int, Calendar) should do differently, just that it should return a Date object.
The Oracle JDBC for example only uses the calendar to construct the milliseconds value of the Date object (https://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html) which I think is redundant.
Anyway, I have tested the latest release and it is working as expected, so I think you can go ahead and close this issue :-)

I was still thinking about it and wanted to validate if ES always provides a timezone in its Date's. But ill leave it for now


Change autologout countdown message txt

Ticket Link
GROUPINGS-819
Test Checklist

[x] Unit Tests Passed:
[x] Jasmine Tests Passed:
[x] General Visual Inspection:

Looks fine. Without seeing it I'm not sure if "Minutes remaining" should have a trailing semicolon "Minutes remaining:"

Looking at the code the current message is
"Warning! This session will expire soon. Minutes Remaining (timeRemaining)"
i think it would be appropriate to add the semicolon to separate the text from the time remaining

Also I am thinking we should change this message to be "Time remaining:" instead as the time remaining contains "minutes:seconds"


[New Feature] Download from Anyrun?

Hi,
is it possibile to implement download from anyrun searching by hash on publicsubmissions?
Thank you

No. Not possible. Anyrun prevents that.
On Thu 26. Dec 2019 at 17:41, gabbiano83<EMAIL_ADDRESS>wrote:

Hi,
is it possibile to implement download from anyrun searching by hash?
Thank you
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Neo23x0/munin/issues/28?email_source=notifications&email_token=AAVYFJEVLPIPDG5WMQCPIXLQ2TNERA5CNFSM4J7MZNO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICXOD4A,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVYFJF2647OYGJU7SUFGOTQ2TNERANCNFSM4J7MZNOQ
.

--
Florian Roth
Key material (Keybase, S/MIME, PGP, Threema):
https://keybase.pub/johngalt/


Fixed TTNN Enums conflicting with TT

PR closes #1057
Hacky Solution, need to find the root cause by investigating the mlir-tblgen tool. (Will make an issue for this)

Hey @nsmithtt, the error occurs when importing both the tt and ttnn modules in Python. You end up getting the following error:
RuntimeError: Attribute builder for 'TT_Arch' is already registered with func: <function _tt_arch at 0x7f430c0f45e0>

Seemingly the issue is some weird quirk of mlir-tblgen that doubly generates the TT Enums and when both dialects are imported they're doubly registered (causing this error). This behaviour was also replicated when I automatically generated ttkernel Enums. The current solution is a bit of a workaround, but I wanted to unblock ttnn dialect related development for now.

Update: figured out the issue. Silly spelling mistake, PR updated.


Update VehicleWindowIndex

Updated index names to match the actual array of window bone indexes used by the game.

Merged since enum values with "Extra" are vaguer than intended ones. According to alloc8or's Native DB for RDR2. intended vehicle seat enum really has "EXTRA" values, though (e.g. VS_EXTRA_LEFT_1).
Anyway, let's see if some existing scripts throw exceptions for trying to get values from old enum names If that's case, I think the exceptions will be thrown when parsing config files. If this change causes the issue, we'll have to add old names with the obsolete attribute as usual.


Desktop grid/boxes

Description of the new feature / enhancement
Separating the desktop are into sort of boxes.
Scenario when this would be used?
I keep a lot of files for ongoing projects on my desktop. I'd like the legal stuff to be in one bunch, and the monetary in another, or project A in one bunch, and project B in another.
Supporting information
There are proprietary solution (fences) but I want it to be open source, and I don't like adding extra software anyway.

/dup https://github.com/microsoft/PowerToys/issues/1392

Fences is a great 3rd party app that can do this today, fyi