[RFC] Deprecate on_configure_sharded_model callback/LM hooks

Proposed refactor
Deprecate on_configure_sharded_model callback/LM hooks in v1.6 for removal in v1.8
https://github.com/PyTorchLightning/pytorch-lightning/blob/5ad5ba54c0c477546d21daf75ac7b4748d7963a7/pytorch_lightning/callbacks/base.py#L60-L61
Motivation
I see no uses of this hook either externally or internally: https://www.grep.app/search?q=on_configure_sharded_model
Additional context
This hook was originally added in #6679
cc @justusschock @awaelchli @akihironitta @rohitgr7 @tchaton @carmocca @borda @ninginthecloud @daniellepintz

@SeanNaren I believe it has never been properly advertised. I think it would be fair to remove it as I don't really find a real use case for it.

Sounds good! Should we also remove the additional code tied to it (exposing the context manager for larger models in deepspeed/FSDP etc?)

I agree with removal, the hook is really specific. Using it doesn't paint a good picture design-wise so I think it'll be good to clean up, now that it's not necessary.

Should we also remove the additional code tied to it (exposing the context manager for larger models in deepspeed/FSDP etc?)

yes sounds good. can you link to the code we can remove so whoever does this issue remove it as well?
For anyone picking up this issue, you can also follow https://github.com/PyTorchLightning/pytorch-lightning/pull/10940 as an example

I will try to do this.

Yes!

I don't know how to write the test for this.

hey @Piyush-97
for the test you need to ensure that the deprecation warning is caught when someone uses this hook.
check this for reference.

def test_v1_8_0_on_configure_sharded_model(tmpdir):
class TestCallback(Callback):
def on_configure_sharded_model(self, trainer, model):
print("Configuring sharded model")
model = BoringModel()

trainer = Trainer(
    callbacks=[TestCallback()],
    max_epochs=1,
    fast_dev_run=True,
    enable_progress_bar=False,
    logger=False,
    default_root_dir=tmpdir,
    strategy='ddp_sharded'
)
with pytest.deprecated_call(
    match="The `on_configure_sharded_model` callback hook was deprecated in v1.6 and will be removed in v1.8."
):
    trainer.fit(model)

I don't have GPU and I am not sure if this is right.

@Piyush-97 - you don't have to specify strategy="ddp_sharded" for the test. we should warn the user whenever the hook is overridden that it is deprecated.
def test_v1_8_0_on_configure_sharded_model(tmpdir):
    class TestCallback(Callback):
        def on_configure_sharded_model(self, trainer, model):
            print("Configuring sharded model")

    model = BoringModel()
    trainer = Trainer(
        callbacks=[TestCallback()],
        max_epochs=1,
        fast_dev_run=True,
        enable_progress_bar=False,
        logger=False,
        default_root_dir=tmpdir,
    )
    with pytest.deprecated_call(
        match="The `on_configure_sharded_model` callback hook was deprecated in v1.6 and will be removed in v1.8."
    ):
        trainer.fit(model)`

I have written a test but it is failing with two more tests.

Hi @Piyush-97 those failures are due to a known issue affecting multiple PRs, not just yours: #11633


[Bug]: Icon rendered half when background is colored

Checklist

[X] I have read the appropriate section in the contributing guidelines
[X] I believe this issue is a problem with polybar itself and not a misconfiguration on my part
[X] I have searched for other open and closed issues that may have already reported this problem
[X] I have checked the known issues page for this problem.
[X] I have followed the debugging guide to narrow down the problem to a minimal config.

Steps to reproduce

Have a binary/script print this %{F#606060}   %{F- }Haze
Create a module and call it in bar

[module/weather]
type = custom/script

label = %output%
; label-background = #302A36

exec = fakeweather
interval = 960

This will fully print the emoji like here:

but if you uncomment the label-background line and load this again, the emoji will not be fully rendered:

Minimal config
[module/weather]
type = custom/script

label = %output%
; label-background = #302A36

exec = fakeweather
interval = 960

Polybar log
No response
Expected behavior
Show full emoji as usual when background is colored
Actual behavior
Emoji is not fully shown when background is colored
Window Manager and Version
Plasma 5.27.8
Linux Distribution
6.5.4-arch2-1 Endeavour os
Polybar version
polybar 3.6.3

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Build type: Release
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/polybar/src=/usr/src/debug/polybar -flto=auto -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Wsuggest-override
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wall -Wextra -Wpedantic -Wsuggest-override  -Wall -Wextra -Wpedantic -Wsuggest-override

Additional Context / Screenshots
No response

See #991

I think I've most of the workarounds already in place. I'm using the official jetbrains monospaced font, which is not a nerd font, as the original post suggests and I'm also using the icon fonts separately like this:
# Text
font-0 = "JetBrains Mono:style=Bold:pixelsize=9;3"
font-1 = "Font Awesome 6 Free Solid:size=10;3"
font-2 = "Material Design Icons Desktop:size=11;3"
font-3 = "Material Design Icons Desktop:size=15;5"
# Glyphs
font-4 = "MesloLGS NF:style=Regular:size=15;4"

yet this issue persists when the background is colored

this is the full config I'm using

All nerd fonts except their monospaced variants have this issue, it doesn't matter if you use a different font for text, it matters which fonts the icons come from. I would recommend using Symbols Nerd Font Mono as your icon font

All nerd fonts except their monospaced variants have this issue

I don't understand. The jetbrains mono font I'm using is not a nerd font. It's the official font


openrouter does not response to inputs

in the latest pull, after active open router by adding valid keys, inputs could not be sent.
No response after clicking the send button.

my fault. I disabled it somewhere.


Supervisor Meeting 2

September 26, 2023
Dr. Yuan, Matthew, Sam, Ethan
Agenda:

Update Dr. Yuan on current progress
Discuss implementation ideas

Associated Meeting Minutes: https://github.com/SammyG7/Mac-AR/blob/main/docs/MeetingMinutes/MeetingMinutes.pdf

Missed due to illness.


[Bindings] Azure SQL DB / SQL Server Binding

Describe the proposal
Customers who heavily leverage SQL Server installations in their existing on-premises data centres and are also moving to the cloud and adopting Azure SQL DB during the move to the cloud. Furthermore, these customers likely have relatively complex data structures, tables, views, and a host of stored procedures to make their systems work.
Providing a Dapr binding for Azure SQL DB & SQL Server that looks the same as the Microsoft SQL Server & Azure SQL state management component YAML component but gives them the ability to interact with their existing databases through the abstraction of the Dapr API will help progress Dapr's adoption for these customers.
The YAML would likely look as follows:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: <NAME>
spec:
  type: bindings.sqlserver
  version: v1
  metadata:
    # Authenticate using SQL Server credentials
    - name: connectionString
      value: Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;
    # Authenticate with Microsoft Entra ID (Azure SQL only)
    # "useAzureAD" be set to "true"
    - name: useAzureAD
      value: true
    # Connection string or URL of the Azure SQL database, optionally containing the database
    - name: connectionString
      value: sqlserver://myServerName.database.windows.net:1433?database=myDataBase

Given the intended use case, I'm not sure focusing on a specific table or indexing policy makes sense to include in the binding YAML. That would be for the database developer to configure on their database.
This would ultimately give developers the ability to (re)build their systems using Dapr without having to change their state stores and lowering the barrier of entry into Dapr for those who heavily leverage SQL Server / Azure SQL DB.

#3409 is related.


How to clone a 3rd generation crytocurrency

Hereby, I can not find any wallet and smart tool for asset allocation.
Please help me a 3rd generation crytocurrency ..

Can this be closed? it's not related at all to neo? @erikzhang


add download arware and get last rollup tx in ar toolbox

Change

Add download arware file
support API to get last rollup tx

PR-Codex overview
This PR focuses on adding new functionality and improving error handling for arware operations.
Detailed summary

Added ArwareOpError error type.
Added ArwareOpError variant to existing error handling code.
Added new function download_and_parse_record_batch to download and parse record batches.
Added new function get_prev_arware_tx to get the previous arware transaction.
Updated existing functions to use ArwareOpError where necessary.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Codecov Report

Merging #533 (b2eb631) into main (cab7f67) will increase coverage by 1.40%.
The diff coverage is 79.95%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main     #533      +/-   ##
==========================================
+ Coverage   54.37%   55.77%   +1.40%
==========================================
  Files          71       72       +1
  Lines       13700    14090     +390
  Branches       61       61
==========================================
+ Hits         7449     7859     +410
+ Misses       6251     6231      -20

Flag
Coverage Δ

rust
55.77% <79.95%> (+1.40%)
:arrow_up:

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

Impacted Files
Coverage Δ

src/error/src/lib.rs
100.00% <ø> (ø)

src/node/src/rollup_executor.rs
30.94% <57.14%> (+3.79%)
:arrow_up:

src/storage/src/ar_fs.rs
53.65% <65.45%> (+16.70%)
:arrow_up:

src/node/src/ar_toolbox.rs
83.28% <83.28%> (ø)

... and 9 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Unexpected Error while loading python project

Loading a python project in Visual Studio in Administrator-Mode shows an error dialog: An unexpected error occured
Steps to Reproduce

Start Visual Studio
Open Python Project

Expected behavior
No error
Additional context and screenshots
[Window Title]
devenv.exe
[Main Instruction]
An unexpected error occurred
[Content]
Please press Ctrl+C to copy the contents of this dialog and report this error to our issue tracker.
[^] Hide details  [Schließen]
[Expanded Information]

Build: 16.4.19310.1

System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: first
   at System.Linq.Enumerable.Union[TSource](IEnumerable`1 first, IEnumerable`1 second)
   at Microsoft.PythonTools.Interpreter.CondaPackageManager.<GetEnvironmentVariables>d__23.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 Microsoft.PythonTools.Interpreter.CondaPackageManager.<CacheInstalledPackagesAsync>d__59.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 Microsoft.PythonTools.Interpreter.CondaPackageManager.<GetInstalledPackagesAsync>d__64.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 Microsoft.PythonTools.Project.InterpretersNode.<RefreshPackagesAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
   --- End of inner exception stack trace ---
   at System.AggregateException.Handle(Func`2 predicate)
   at Microsoft.PythonTools.Infrastructure.TaskExtensions.<>c__9`1.<SilenceException>b__9_0(Task t)
   at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- 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 Microsoft.PythonTools.Infrastructure.VSTaskExtensions.<HandleAllExceptions>d__5.MoveNext()
---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: first
   at System.Linq.Enumerable.Union[TSource](IEnumerable`1 first, IEnumerable`1 second)
   at Microsoft.PythonTools.Interpreter.CondaPackageManager.<GetEnvironmentVariables>d__23.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 Microsoft.PythonTools.Interpreter.CondaPackageManager.<CacheInstalledPackagesAsync>d__59.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 Microsoft.PythonTools.Interpreter.CondaPackageManager.<GetInstalledPackagesAsync>d__64.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 Microsoft.PythonTools.Project.InterpretersNode.<RefreshPackagesAsync>d_

Configuration information (If you are providing a diagnostics file (see below), skip this section)
VS Version: Version 16.4.1
PTVS version: 16.4.19310.1
Python version:
Debugger Type (if applicable): [New debugger or legacy debugger?]
Diagnostics file
Diagnostic Info 2019-12-11T105749.txt

Thank you for reporting the issue.
A temporary workaround is to remove the Conda environment from the project which allow you to open the project without issues. If you need the conda environment for development, try using the Conda base environment (see below on how to add it) or recreate the conda virtual environment.
Let me know if any of these workarounds work for you or if you need more help.


Document vertical-drift coldbox fcl files

All: I added a readme for the VD coldbox fcl configs:. I made some guesses about what some of the file are for. Could you correct those and add brief descriptions for others that you know.
And please assign anyone else who may have contributed here.
Note that you directly edit the file following the above link.
Thanks in advance.

Giving up.


Upgrade cloud foundry to version 32.7.0

What

Upgrade cloud foundry to version 32.7.0
Switch to a new cf-acceptance-tests image with golang 1.21.1
Add a meta header to the error page.
Bump jammy stemcell to 1.222

Why
Two problems were found with this release.

Smoke tests were failing with the following error:

go: errors parsing go.mod:
/go/src/github.com/cloudfoundry/cf-smoke-tests/go.mod:5: unknown directive: toolchain

This is because upstream switched to golang 1.21.

Cf acceptance tests were failing due to new tests around the readiness checks. See this issue. A meta tag has been added to the gorouter error page to work around this.

How to review

Tested in dev05
Uaa tests done

Notes
In draft until docker change has been merged.

🚨⚠ Please do not merge this pull request via the GitHub UI ⚠🚨

WFM having tested UAA, cert rotation, non-slim autoscaler tests.
No capi migrations this time.

Updated docker image tags for final merged version of https://github.com/alphagov/paas-docker-cloudfoundry-tools/pull/296


Question about the extension of Adding Semantics

Hi! In the appendix there is a chapter about Adding Semantics, but I haven't found any codes related to this chapter. Could you please upload the codes? Thanks!

Hi,
The code for adding semantics is included in the diffseg.ipynb file. You just need to run cell 1b to enable semantics.


Minor updates

These were some recent minor updates I had found in reintroducing myself into various parts of the codebase.

@Purg - this looks good to me!


add server defaults for up/downgrade, fixes #140

Merging due to offline conversation with @shellicious


Question : how to set a top most window ? thanks

I assume you are using iced_winit, which is a wrapper around winit. Winit has with_always_on_top, so perhaps theres a way to set that when building the window?
https://docs.rs/winit/0.22.2/winit/window/struct.WindowBuilder.html#method.with_always_on_top

So it looks like theres a bunch of crap that gets used when initializing winit, but with_always_on_top is not one of them: https://github.com/hecrj/iced/blob/master/winit/src/settings.rs#L77
It should be a simple change however to add it in along side the others. Might be a good PR?


BZ-1281549 - KIE Server: jBPM extension ignore runtime strategy (and …

…other settings) from deployment descriptor included in kjar
(cherry picked from commit bee00cf897f0c047786a7d2620f6b08fb93d5a4f)

jenkins retest this

@mswiderski code looks good, but jenkins failed first build. trying again. +1 to merge if jenkins succeed.

this was caused by failure in jbpm (my fault wrong cherry pick) and thus this failed.
jenkins retest this

jenkins retest this

jenkins retest this


Regenerate cert with right id-DMTF-hardware-identity format

Fix: #2325
Regenerate all related cert with right id-DMTF-hardware-identity format.

@jyao1 feel free to merge as you see fit.


Bug in Average Pool2D topi implementation for Integer inputs

def manual_test():
    data_shape=(1, 1, 2, 2)
    data_dtype='int32'
    data = relay.var("data", shape=data_shape,
            dtype=data_dtype)
    pool = relay.op.nn.avg_pool2d(data, pool_size=(2, 2))
    func = pool
    func = run_infer_type(func)
    func = relay.Function(relay.analysis.free_vars(func),
                func)
    print(func)
    with relay.build_config(opt_level=0):
        graph, lib, params = relay.build(func, "llvm", params=None)
        mod = graph_runtime.create(graph, lib, ctx=tvm.cpu(0))
        golden_data = np.array([5, 5, 5, 5]).reshape(data_shape).astype(data_dtype)
        mod.set_input("data",golden_data)
        mod.run()
        res = mod.get_output(0).asnumpy()
        print(res)

The above gives output 4 instead of 5.
Setting the golden_data to (1, 1, 1, 1) gives output 0.
I think we are dividing before accumulating. Since, we have only tested on Float32, this never showed up before. But, in int32, it performs int division.

We want to update this the compute to move the division after the accumulation. @anijain2305 can you look into that?

QAveragePool should be rewritten. And  if we want to keep compatibility with TFLite, we should make the accumulation type be "Uint16", not "int32" here. I know it is very strange, but we meet the correctness problem when we parse TFLite model. We find TFLite's opt implementation is "UINT16", but the non-opt (reference) implementation is "int32". However, the default behavior of TFLite is opt.  I wish we could consider this scenario. Otherwise, we can not keep the compatibility with TFLite.

@FrozenGene for avg_pool, we can just use composed op to solve the problem.
avg_pool2d(int_8_value.astype("uint16")).astype("int8")

Yes, I will take a look next week.
I quickly tried to call topi::divide after tvm::sum. Threw me an error that the Reduction axis can only at level 0 and suggested to create a new Tensor.
@yzhliu suggested to call nested tvm::compute. I am not sure if having nested compute affects existing schedules. So, it might be little longer task, given what happens. Will try nested compute first.

@anijain2305 Write two isolated tvm::compute could solve this issue. I also met this problem. I write one topi::nn::q_pool implementation

@tqchen @FrozenGene
I made following changes - basically creating an intermediate tensor for just sum.
    // TVM compute for summing the pooling windows.
    auto pool_sum = tvm::compute(out_shape,
    [&](const Array<Var>& output) {
      Array<Expr> indices;
      for (const Var& var : output) indices.push_back(var);
      indices.Set(height_axis, output[height_axis] * stride_height + dheight);
      indices.Set(width_axis, output[width_axis] * stride_width + dwidth);
      return tvm::sum(temp(indices), { dheight, dwidth });
    }, "tensor", "pool_sum");

    // TVM compute for dividing the reduced window sum by kernel size.
    return tvm::compute(out_shape,
    [&](const Array<Var>& output) {
      Array<Expr> indices;
      for (const Var& var : output) indices.push_back(var);
      return pool_sum(indices) / (kernel_height * kernel_width);
      if (count_include_pad) {
        return pool_sum(indices) / (kernel_height * kernel_width);
      } else {
        Expr h_start = output[height_axis] * stride_height - pad_top;
        Expr w_start = output[width_axis] * stride_width - pad_left;
        Expr h_end = ir::Min::make(h_start + kernel_height, height);
        Expr w_end = ir::Min::make(w_start + kernel_width, width);
        h_start = ir::Max::make(h_start, make_const(Int(32), 0));
        w_start = ir::Max::make(w_start, make_const(Int(32), 0));
        Expr divide_factor = ir::Max::make((h_end - h_start) * (w_end - w_start),
                                           make_const(Int(32), 1));
        return pool_sum(indices) / divide_factor;
      }
    }, "tensor", "pool_avg");

I am still getting the following error. Any direction?
TVMError: Check failed: 0 == level_: Reductions are only allowed at the top level of compute.
Please create another tensor for further composition.

Fixed. Closing.


0 padding not working?

Hi
It seems when I give padding a 0, it defaults to 256? Is it my misunderstanding or is it just designed that way? i simply just want the menu to show without any sliding, for now I'm setting the padding to -1 which kinda makes it look like it opened without any sliding, but I can still see that 1px white edge.
Thanks in advance for any help!

I would also like to set padding as 0 but it seems not possible with the current implementation because it padding is set in like this.
this._padding = this._translateTo = parseInt(options.padding, 10) || 256;
And with 0 it becomes
parseInt(0, 10) || 256;
Which is
0 || 256
Which is 256
It could be fixed something like this but I'm not sure if the current implementation is intended behaviour of the library.
 var padding = parseInt(options.padding, 10);
 this._padding = this._translateTo = padding === undefined ? 256 : padding;

It has been awhile since I did this, but I was able to get my desired outcome of having it overlay on the content.
    // Initialize slideout
    var slideout = new Slideout({
        'panel': document.getElementById('panel'),
        'menu': document.getElementById('menu'),
        'padding': -1,
        'tolerance': 70,
        'side': 'right',
    });

If you make the viewport small on https://base.wayne.edu you can click the hamburger icon in the upper right to see the outcome. If that is something you want to replicate I can share further code if necessary :)


Update docs to reflect that sage 8 does not currently support node 6

It's actually not sage itself that doesn't support it, but some dependencies, like node-sass (also this are not compatible with node 6 yet, also graceful-fs.
Until this is fixed, or Sage 9 is released, which changes a lot of things, I'd recommend putting
Node >= 0.12.x, < 6.x
into the documentation.

This is not actually true.
I'm using sage 8 with an updated node, and despite I had to mess in updating my -g packages, at the moment it works, though giving quite a bunch of node warnings in running gulp (I think the main offender here is node-sass and its dependencies)

That's great to hear!
Do you mind sharing the steps you needed to take to get it running? Since it doesn't seem to work out of the box.
My main problem was (even after rebuilding node-sass) that main.scss was not being compiled to main.css, only throwing lots of JS stack traces.
Thus my site was left unstyled.

You have to rm -rf node_modules/* and then npm install again, because libsass needs new bindings.


improvement prefer to chose tablet on alive disk #39467

cherry pick from #39467

run buildall

run buildall


Node not found. Please check the remote tab is open

"Node not found. Please check the remote tab is open"
is a message that appears every time I press 3D debugging, and click on the game window, how do I fix it?

One of the features of this tool is to synchronise the selected item in the 'remote scene tree' with the running game. However, in order to do that, the remote scene tree needs to be open.
There are two ways of doing this:

Every time you run the game, select the 'Remote' tab in the scene tree.
Automate 1 so it happens every time. Go to Editor Settings, and set debugger/auto_switch_to_remote_scene_tree to true

I'll add this to the readme.
Thanks!

Thanks!


feat(detection_by_tracker): add debug and modify existence_probability

Related Issue(required)

Description(required)

Added visualization of detection by tracker
existence probability was fixed at 0.1, so 2d iou is now set.

Review Procedure(required)

Related PR(optional)

Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.

[x] Read commit-guidelines
[x] Assign PR to reviewer

If you are adding new package following items are required:

[ ] Documentation with description of the package is available
[ ] A sample launch file and parameter file are available if the package contains executable nodes

Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.

[ ] Commits are properly organized and messages are according to the guideline
[ ] PR title describes the changes

Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.

[ ] All open points are addressed and tracked via issues or tickets

CI Checks

Build and test for PR / build-and-test-pr: Required to pass before the merge.
Build and test for PR / clang-tidy-pr: NOT required to pass before the merge. It is up to the reviewer(s). Found false positives? See the [guidelines][clang-tidy-guidelines].
Check spelling: NOT required to pass before the merge. It is up to the reviewer(s). See here if you want to add some words to the spell check dictionary.

I confirmed to work in my pc


JniGen can have methods with Classes and Throwables

This pull request allows native code generated with JniGen to have parameters of type java.lang.Class or java.lang.Throwable.
Previously, JniGen would crash when parameters included a Class or Throwable because the method declaration created by javah would not match the expectation from the JniGen code generator. (See this issue: #4157 )
The jni test code has not changed; I've merely reformatted it so it's valid C code and added a couple of arguments.
Also, I wasn't really sure what I was doing with the Ant stuff in the test code, so someone might want to look closely at that part. I just modified it until it stopped giving errors :P

Maybe we can get @badlogic to take a peek at his baby.

Got conflicts now. If you fix that up I'll merge it.

@mdsimmo will happily merge if you can resolve the conflicts.

@badlogic @NathanSweet Conflicts are now resolved

Cheers!


similarity function functionality is insufficiently general

The X argument to SimilarityFromFunction is assumed to be an ndarray. This makes it awkward to pass heterogeneous types of data to the similarity function. I suppose that one could create some kind of structured data type (NumPy has a facility for doing that) but that's not very client-code-friendly. pandas.DataFrame was invented for exactly such purposes. DataFrame usually quacks almost like np.ndarray. But for this particular purpose it fails utterly, the problem being that the enumerate() function, when called on an ndarray, enumerates over the rows, but when called on a DataFrame, enumerates over the columns!
You cannot get around this issue by having some types of data for the species in a global data structure and referring to that global data structure in the similarity function. This seems to result in the global data structure being copied into the Ray instances' shared memory over and over, complaints of object spillage, and eventually using up the hard drive. Perhaps the solution to that would be to ray.put() the global data structures and have the similarity function make use of the reference returned by put.

Perhaps one could just convert the DataFrame to a numpy array. But, it would be more client-code-friendly if one could use the feature (column) names in the similiarity function.


'utf-8' codec can't decode byte 0xcd in position 133: invalid continuation byte

Click to expand!
Issue Type
Bug
Source
binary
Tensorflow Version
2.11
Custom Code
No
OS Platform and Distribution
windows 64
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
secundum commendationem feci replacement error est, nunc aliud
with tf.io.gfile.GFile(path, 'r') as fid:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 133: invalid continuation byte

Standalone code to reproduce the issue
https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html#preparing-the-dataset

Relevant log output
Traceback (most recent call last):
  File "C:\Python\TensorFlow_Trainin_Custom\venv\lib\site-packages\object_detection\utils\label_map_util.py", line 133, in load_labelmap
    label_map_string = fid.read()
  File "C:\Python\TensorFlow_Trainin_Custom\venv\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 116, in read
    self._preread_check()
  File "C:\Python\TensorFlow_Trainin_Custom\venv\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 77, in _preread_check
    self._read_buf = _pywrap_file_io.BufferedInputStream(
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 133: invalid continuation byte

@eagl69
Could you please provide a reproducible sample code as colab gist to reproduce this issue.
Thank you!


[Bug]: LOLI not working

Version of the software
0.2.5 (beta)
Operating system
window 11
Browser / Native
Chrome
What happened?
When I tray to start a job with a LOLI config, the message "NOT SUPPORTED EXCEPTION" pops, but when i try another type of confg it works. What could it be?
Relevant LoliCode if needed
No response

Any information on the kinds of blocks involved in the config? Maybe the config is using one of the few blocks or features that are not supported by OB2 coming from OB1.

This is the LoliScript of the config
#Filmin REQUEST POST "https://apiv3.filmin.es/oauth/access_token"
CONTENT "username=&client_id=j2Gal1ZDbCtdiRa9&client_secret=zPNBDTu01qXQHlqkNqK8iY8p7H8nmW7x&password=&grant_type=password"
CONTENTTYPE "application/x-www-form-urlencoded"
HEADER "Accept: application/vnd.filmin.v1+json"
HEADER "Cache-Control: no-cache"
HEADER "Accept-Encoding: UTF-8"
HEADER "X-Client-Identifier: Android_v3.9.8_build101"
HEADER "X-Client-Id: j2Gal1ZDbCtdiRa9"
HEADER "X-Client-Language: es-ES"
HEADER "Connection: close"
HEADER "Content-Type: application/x-www-form-urlencoded"
HEADER "Content-Length: 144"
HEADER "Host: apiv3.filmin.es"
HEADER "User-Agent: okhttp/3.8.0"
KEYCHECK
KEYCHAIN Failure OR
KEY "" Contains "401"
KEYCHAIN Success OR
KEY "" Contains "200"
PARSE "" JSON "access_token" -> VAR "AT"
REQUEST GET "https://apiv3.filmin.es/user/"
HEADER "Authorization: Bearer "
HEADER "Accept: application/vnd.filmin.v1+json"
HEADER "Cache-Control: no-cache"
HEADER "Accept-Encoding: UTF-8"
HEADER "X-Client-Identifier: Android_v3.9.8_build101"
HEADER "X-Client-Id: j2Gal1ZDbCtdiRa9"
HEADER "X-Client-Language: es-ES"
HEADER "Connection: close"
HEADER "Host: apiv3.filmin.es"
HEADER "User-Agent: okhttp/3.8.0"
KEYCHECK BanOnToCheck=FALSE
KEYCHAIN Custom "CUSTOM" OR
KEY "subscriptions":{"data":[]}"
PARSE "" JSON "name" CreateEmpty=FALSE -> CAP "Plan"
PARSE "" JSON "expiration_date" CreateEmpty=FALSE -> CAP "Expiration Date"
!PARSE "" LR "pin":" ","" -> CAP "Pin"

Any information on the kinds of blocks involved in the config? Maybe the config is using one of the few blocks or features that are not supported by OB2 coming from OB1.


Bump to 0.4.1

Issue #, if available:
Description of changes:
Testing done:
Merge Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.
General

[ ] I have read the CONTRIBUTING doc
[ ] I used the commit message format described in CONTRIBUTING
[ ] I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

[ ] I have installed and run git secrets to make sure I did not commit any sensitive information (passwords or credentials)
[ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
[ ] I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report
Base: 71.90% // Head: 71.58% // Decreases project coverage by -0.32% :warning:

Coverage data is based on head (7d497b0) compared to base (e0d581f).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
- Coverage   71.90%   71.58%   -0.32%
==========================================
  Files          33       33
  Lines        3584     3562      -22
==========================================
- Hits         2577     2550      -27
- Misses       1007     1012       +5

Impacted Files
Coverage Δ

src/schemas.jl
97.05% <0.00%> (-2.95%)
:arrow_down:

src/jobs.jl
95.86% <0.00%> (-1.56%)
:arrow_down:

src/irtypes.jl
91.66% <0.00%> (-0.65%)
:arrow_down:

src/qubit_set.jl
75.51% <0.00%> (-0.49%)
:arrow_down:

src/tracker.jl
81.25% <0.00%> (-0.15%)
:arrow_down:

src/ahs.jl
97.72% <0.00%> (-0.10%)
:arrow_down:

src/task.jl
91.13% <0.00%> (-0.09%)
:arrow_down:

src/utils.jl
95.16% <0.00%> (-0.08%)
:arrow_down:

src/circuit.jl
95.40% <0.00%> (-0.04%)
:arrow_down:

src/raw_schema.jl
95.55% <0.00%> (-0.01%)
:arrow_down:

... and 2 more

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

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


Bcp 003 tests

Hmm, going back to the default HTTP_TIMEOUT means the Avahi build fails IS-04-01 test_13. Increasing it to pass that one test case on one build config is a pretty big sledgehammer. :-/

It might be interesting to remove the HTTPS timing workaround in IS0401Test.do_registry_basics_prereqs and look what happens as I wonder if the cause is related.
https://github.com/AMWA-TV/nmos-testing/blob/97f3b452b8ba08588e4539ae702fbf589afe7378/nmostesting/suites/IS0401Test.py#L213-L220
                # in event of testing HTTPS support, the TLS handshake seems to take nearly 2 seconds, so
                # when the first registry is disabled, an additional few seconds is needed to ensure the node
                # has a chance to make a connection to it, receive the 5xx error, and make a connection to
                # the next one
                if CONFIG.ENABLE_HTTPS:
                    heartbeat_countdown = CONFIG.HEARTBEAT_INTERVAL + 1 + 5
                else:
                    heartbeat_countdown = CONFIG.HEARTBEAT_INTERVAL + 1

yep, the HTTP_TIMEOUT workaround was for the avahi build originally

I noticed IS-04-01 test_13 has started failing for ubuntu-14.04 (non-Conan) on the last few commits with:
            "detail": "Receiver target PUT did not produce a 202 response code: 400",

Haven't yet checked if I failed to merge something that should have been into build-test from the src files. I assumed it initially stopped working when the mocks.testsuite.nmos.tv name was removed from hosts, but the latest build is using the latest test suite commit which should have nmos-mocks.local in the URL...
FWIW, I also see in the testoutput:
 * WARNING: Could not find an installation of 'testssl'. Some tests will be disabled.

and "Test Disabled" in the BCP-003-01 json output (which we aren't classifying as a failure).


Define folder and files structure

There is a lot of ways to structure folders.
Some usual folder and files we can expect are:

components: shared atomic components

index.js
ComponentName.jsx
ComponentName.style.jsx
ComponentName.docs.mdx
ComponentName

ChildComponent.jsx

styles: shared and global styles, including themes

index.js
themes.js
global.css
variables.css
other.css

services: external API services code

index.js
Service

index.js
file.js

utils: reusable js functions

index.js
file.js

pages: pages for each routes, and the router

router.js
AuthRedirect.jsx
Home.jsx
Page.jsx

layouts: reusable layouts for mobile and desktop

index.js
SinglePane.js
SideBar.js

templates: shared groups of components that works together

index.js
Form.js
Table.js

What about this project? Any idea how to structure folders and files?

Shared Components is really efficient, also going with the reusable functions would great for us and maybe using pages too, but that will be less efficient in my opinion


#2506 show recent sequences on project board

The project overview now also shows the latest 5 sequences with deep links to the service and the sequence.

fixes #2506

@ermin-muratovic can you please reduce the font size of this part as used for the time/date? Hence we would win some space.

What's the behavior of the sequence screen? Because the dashboard and the sequence screen are using the same object for the sequences I guess.

What's the behavior of the sequence screen? Because the dashboard and the sequence screen are using the same object for the sequences I guess.

It should just show the latest 5 sequences inside a project.

There are 3 code smells listed in Sonar. Can you please get rid of them, should be done really quick.


Issue #16 was not fixed

What happened?
Issue #16 was not fixed.
The builds are failing and I cannot pull with go mod tidy
the new version of the package. See here: https://github.com/pulumi/pulumi-kubernetes-ingress-nginx/runs/7341405439?check_suite_focus=true
Steps to reproduce
Just to go mod tidy
Expected Behavior
To get a new version with latest fixes.
Actual Behavior
I got the old version.
Versions used
Latest
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Hi @MihaiSandor
There's an issue I am investigating that go is complaining of docker moby not available - when that's taken care of, this will be working again
Paul

@stack72 Any updates?

up

Hi @MihaiSandor
We are looking at this and aim to get a release out asap - the dependency is only seeming to be on these build runners so something isn't quite right
Paul

Hey @stack72,
Almost half a month has passed and we still don't have
any release to be able to use this module. Do you have
any idea when the release will be out?
Mihai


Artifact Hub support: helpers to maintain artifacthub-pkg.yml

Artifact Hub support: helpers to maintain artifacthub-pkg.yml
Artifact Hub now supports Inspektor Gadgets: https://github.com/artifacthub/hub/issues/3665
This means gadget authors can already publish their gadgets on Artifact Hub by adding two files on their repositories:

artifacthub-repo.yml
artifacthub-pkg.yml

You can see the list of all gadgets is published on Artifact Hub:
https://artifacthub.io/packages/search?kind=22
However, artifacthub-pkg.yml is not easy to write and to keep in sync with the same metadata in gadget.yaml. Therefore, this PR adds a new build feature to create or artifacthub-pkg.yml:
ig image build -t mygadget:latest --update-metadata --update-artifacthub-pkg .

The gadgets from the main IG repository are published on this page:

Changes in this PR:

Add new badge in README.md
Add creation date in ig image list (based on #2611)
Add artifacthub-repo.yml with the repositoryID provided in the Artifact Hub dashboard
Implement the --update-artifacthub-pkg flag. This include a default template if the file didn't exist before.
Update the hello world gadget to include a link to Artifact Hub
Update the gadgets/Makefile to make use of --update-artifacthub-pkg
Update all gadget.yaml to have a name with the "trace dns" pattern

How to use

Visit the Artifact Hub links:

https://artifacthub.io/packages/search?kind=22
https://artifacthub.io/packages/search?repo=inspektor-gadgets

Testing done
In the Artifact Hub dashboard, the official inspektor gadgets are currently configured to use my branch (alban_hub), so we can see the gadgets, even though this PR is not merged yet.
Once merged, I will change the setting to use the main branch.

Fixes https://github.com/inspektor-gadget/inspektor-gadget/issues/2175

Another batch of comments, first can you please include in this PR only changed related to Artifact Hub?

Could you please clarify which changes to include and which changes to do later? In my mind, all this PR is related to Artifact Hub.

Another comment, I will take a thorough look once all my previous comments are addressed.

Thanks for the previous reviews. I am splitting this PR in two: I would like to get the gadgets published soon with #2643 and implement the helper tools after.


delay compsensated gradient descent

This feature is important as discussed in issue#8744.

I signed it!

Hi @alextp any more advice?

@cstur4 tf.contrib is currently being deprecated so I don't want to add any more code to it until the replacement addons package is ready. Please see https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md for more information.
So I'll close this :-/ sorry


DONOTMERGE WIP: Appveyor artifact for windows_installer

I sent the patch to the ML<EMAIL_ADDRESS>Closing the PR as the testing was successful.


[video_player] not parsing urls correctly

I have a url like so https%3A%2F%2F....
Using the video player plugin, this becomes https:/... missing one slash, which results to FileNotFoundException

Hi @DeadlyMissile
Can you please provide your flutter doctor -v,
your flutter run --verbose,
your pubspec.yaml
and a minimal reproducible code sample.
Thank you

Without additional information we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.


Bugfix: Broken xml stops logging

fixes #273
problem: XmlLoggingConfiguration.Initialize eats exception with invalid
XML. ALso XmlLoggingConfiguration.Reload never returns null.
So the null check is not enough

added InitializeSucceeded (nullable bool) in XmlLoggingConfiguration
checks also InitializeSucceeded. If false, DON't apply the config.

Result: invalidating the XML won't stop logging, the old config will be used.
Also, the auto reload won't turned to false (the default)
The unit tests proves the solution and also the previous problem.

The changes are small, but a review would be wise because there is a new public property added.

Unit tests are working local. Dunno why AppVeyor is complaining

Fixed: )

Looks good to me. Just wondering about all the linebreaks between the tests? Any reason for this?

The line breaks is just bad coding style of me ;) - I like white space when programming.
Most of the time I let Resharper fix this, but too bad the NLog code style if really different then my Resharper profile (I like var for example)
I will fix this code styling thing with a commit.

wtf. Removed newlines and now are the unit tests failing?

Unit tests are fixed and PR is ready for merge after review.

@304NotModified Good work, please see my comments, otherwise it looks great

Thanks. Unneeded newlines removed!


Support TurboConfirm v2.0 + Turbo8 morph (after modal form redirect)

Why?
TurboConfirm v2.0 introduced breaking changes to the setup process.  Also, Turbo 8 supports scroll preservation & morphing when a form submission redirects back to the same page.  This PR introduces changes to the frame missing handler which allow a modal form submission which redirects back to the page which opened the modal form to take advantage of this behavior as well.
What Changed
What changed in this PR?

[x] update TurboConfirm initializer for v2.0 setup changes + current Optics modal classes.
[x] update frame_missing_handler.js to take advantage of Turbo 8 morphing & scroll preservation in certain scenarios.

Screenshots

 Update Modals generator for TurboConfirm v2.0, current Optics, & Turbo 8 morphing


Challenge: Dockerize application

Maybe it would be a good idea to have the application as a Docker image. That would definitely ease deployment and orchestration with other services, as well as easily running the application in an isolated environment.

:+1:


Refurbished #635: Replace mechanism for single-threaded access to R-API

#635
Due to git-issues, I simply had to copy and paste the changes over to this PR, to be able to merge with master-branch.

I'm waiting on merging this until we finish discussing if poisoning was something that was dealt with before, or if it is a new issue. This would occur if a panic occurred somewhere (have to check R side and Rust side), and then all other threads would all panic due to this.
Secondly, I'm trying to see if I can find an anecdotal evidence if this PR effects performance, in that if we get better performance.
This PR is the direction we should take with single_threaded anyways. It has been reviewed by a Rust expert, and by an extendr expert (@Ilia-Kosenkov), and @yutannihilation has also looked at it. And it is written by me.

Alright, about the panic..
I've written a test:

You'd expect that once one thread crashes, the other one should stuff work:
running 1 test
Started
Alive!
Alive!
Alive!
Boom!
thread '<unnamed>' panicked at extendr-api\src\thread_safety.rs:176:17:
secondary thread panicked
Alive!
stack backtrace:
   0: rust_begin_unwind
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\std\src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\core\src/panicking.rs:72:14
   2: extendr_api::thread_safety::tests::test_panic_in_rust::{{closure}}::{{closure}}
             at .\src\thread_safety.rs:176:17
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Alive!
Alive!

 *  The terminal process "C:\Users\minin\scoop\apps\rustup\current\.cargo\bin\cargo.exe 'test', '--package', 'extendr-api', '--lib', '--', 'thread_safety::tests', '--nocapture'" terminated with exit code:<PHONE_NUMBER>.
 *  Terminal will be reused by tasks, press any key to close it.

However, this doesn't happen in either in master or this PR:
(first, master):
running 1 test
Started
Alive!
Alive!
Alive!
Boom!
thread '<unnamed>' panicked at extendr-api\src\thread_safety.rs:171:21:
secondary thread panicked
stack backtrace:
   0: rust_begin_unwind
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\std\src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\core\src/panicking.rs:72:14
   2: extendr_api::thread_safety::tests::test_panic_in_rust::{{closure}}::{{closure}}::{{closure}}
             at .\src\thread_safety.rs:171:21
   3: extendr_api::thread_safety::single_threaded
             at .\src\thread_safety.rs:59:15
   4: extendr_api::thread_safety::tests::test_panic_in_rust::{{closure}}::{{closure}}
             at .\src\thread_safety.rs:169:17
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
test thread_safety::tests::test_panic_in_rust has been running for over 60 seconds

running 1 test
Started
Alive!
Alive!
Alive!
Boom!
thread '<unnamed>' panicked at extendr-api\src\thread_safety.rs:149:21:
secondary thread panicked
stack backtrace:
   0: rust_begin_unwind
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\std\src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\core\src/panicking.rs:72:14
   2: extendr_api::thread_safety::tests::test_panic_in_rust::{{closure}}::{{closure}}::{{closure}}
             at .\src\thread_safety.rs:149:21
   3: extendr_api::thread_safety::single_threaded
             at .\src\thread_safety.rs:37:18
   4: extendr_api::thread_safety::tests::test_panic_in_rust::{{closure}}::{{closure}}
             at .\src\thread_safety.rs:147:17
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at extendr-api\src\thread_safety.rs:29:32:
called `Result::unwrap()` on an `Err` value: PoisonError { .. }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\std\src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\core\src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\core\src/result.rs:1653:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575\library\core\src/result.rs:1077:23
   4: extendr_api::thread_safety::single_threaded
             at .\src\thread_safety.rs:29:14
   5: extendr_api::thread_safety::tests::test_panic_in_rust::{{closure}}::{{closure}}
             at .\src\thread_safety.rs:141:17
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'thread_safety::tests::test_panic_in_rust' panicked at extendr-api\src\thread_safety.rs:157:22:
called `Result::unwrap()` on an `Err` value: Any { .. }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\std\src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\core\src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\core\src/result.rs:1653:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575\library\core\src/result.rs:1077:23
   4: extendr_api::thread_safety::tests::test_panic_in_rust::{{closure}}
             at .\src\thread_safety.rs:157:13
   5: std::thread::scoped::scope::{{closure}}
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575\library\std\src\thread/scoped.rs:146:51
   6: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575\library\core\src\panic/unwind_safe.rs:272:9
   7: std::panicking::try::do_call
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575\library\std\src/panicking.rs:552:40
   8: __rust_try
   9: std::panicking::try
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575\library\std\src/panicking.rs:516:19
  10: std::panic::catch_unwind
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575\library\std\src/panic.rs:142:14
  11: std::thread::scoped::scope
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575\library\std\src\thread/scoped.rs:146:18
  12: extendr_api::thread_safety::tests::test_panic_in_rust
             at .\src\thread_safety.rs:138:9
  13: extendr_api::thread_safety::tests::test_panic_in_rust::{{closure}}
             at .\src\thread_safety.rs:135:28
  14: core::ops::function::FnOnce::call_once
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575\library\core\src\ops/function.rs:250:5
  15: core::ops::function::FnOnce::call_once
             at /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library\core\src\ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
test thread_safety::tests::test_panic_in_rust ... FAILED

failures:

failures:
    thread_safety::tests::test_panic_in_rust

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 39 filtered out; finished in 5.06s

error: test failed, to rerun pass `-p extendr-api --lib`

 *  The terminal process "C:\Users\minin\scoop\apps\rustup\current\.cargo\bin\cargo.exe 'test', '--package', 'extendr-api', '--lib', '--', 'thread_safety::tests::test_panic_in_rust', '--exact', '--nocapture'" terminated with exit code: 101.
 *  Terminal will be reused by tasks, press any key to close it.

But and this is very important: master never terminates! While this PR will terminate.
As @Ilia-Kosenkov pointed out, we should really test a panic from R as well..

Alright @Ilia-Kosenkov, I have the fix, and a test. Should we restart this conversation in another PR, where we handle the panics in single_threaded? Especially since they weren't handled before, so this PR is only improving the status quo?

Yeah let's do a separate pr


Add summariseInObservation example

Currently, summariseInObservation does not have an example in the website (see, for example, summariseClinicalRecords, which has an example of its functionality).

This needs #84 to be completed first so we can use the mock function in the example


pgsync doesn't support "completion" type

PGSync version:
Postgres version:
Elasticsearch version:
Redis version:
Python version:
Problem Description:
I am trying implement suggest completion to my index mapping,but it seems that pgsync doesn't suppot it
Error Message (if any):
RuntimeError: Invalid Elasticsearch type completion

[
    {
        "database": "",
        "index": "",
        "nodes": {
            "table": "",
            "columns": [
                "id",
                "name"
            ],
            "transform": {
                    "mapping": {
                        "name": {"type": "completion"}

                        }
                    }

        }
    }
]

I have now added this to the main branch.

Closing as resolved, thanks

still not working
RuntimeError: Invalid Elasticsearch type compeletion


Internal React error

this error appears after the component mounts

sometimes it crashes the app

also the package needs to be updated to the latest react native

Actually this is the best package I have ever used in design, functionality, and flexibility, so please keep updating it.
"react": "18.2.0",
"react-native": "^0.71.3",
"sharingan-rn-modal-dropdown": "^1.4.0",

Same issue. Error occur when i unmount


Verification of the selection of the "Nr. joburi nepublicate (desc.)" option

Description: Verify that the "Nr. joburi nepublicate (desc.)" option from the sort dropdown menu in the "Companii" section can be selected.
Preconditions: Have the https://admin.peviitor.ro/ page opened.

Step 1
Verify that the "Nr. joburi nepublicate (desc.)" option from the sort dropdown menu in the "Companii" section can be selected.

Expected results
The "Nr. joburi nepublicate" option from the sort dropdown menu in the "Companii" section can be selected.


vercel 部署报错 No Output Directory named "public" found after the Build completed.

...writing to cache...
17:30:04.205 | Error: No Output Directory named "public" found after the Build completed. You can configure the Output Directory in your Project Settings.
17:30:04.206 | Learn More: https://vercel.link/missing-public-directory
17:30:04.818 | Deployment completed
17:30:04.430 | STATIC_BUILD_NO_OUT_DIR: No Output Directory named "public" found after the Build completed. You can configure the Output Directory in your Project Settings.

+1 , yeah same problem. thanks


add GetCursor function

this method is used to obtain a transparent mouse image

has realized on pr #8


How to set up ping monitor to Sonarr

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

📝 Describe your problem
I have a strange issue.  I have the arr stack installed and UK is monitoring it fine through Cloudflare tunnels, but in Sonarr and only Sonarr I keep getting log spam of this line every 30 seconds (which is my heartbeat interval)
2023-12-13 14:35:22.8|Info|Auth|Auth-Unauthorized ip 192.9.xxx.xxx  url 'http://sonarr.foo.org'
I looked in the docs to try and use a ping monitor but when I enter my URL it tells me pop up of "Please match the requested format."
If I turn off auth on the app General page it goes away, but I don't want to do that as it's a secondary layer to my server.
I guess my question is, what is the format I'm supposed to use to set up a monitor for Sonarr that doesn't access the auth page?
Both Ping and Health are referenced in the docs and I don't think I'm using them correctly.
📝 Error Message(s) or Log
2023-12-13 14:58:34.7|Info|Auth|Auth-Unauthorized ip 192.9.xxx.xxx url 'http://sonarr.foo.org'
🐻 Uptime-Kuma Version
1.23.10
💻 Operating System and Arch
Ubuntu 22.04.3 LTS
🌐 Browser
Google Chrome Version 120.0.6099.71
🐋 Docker Version
Docker version 20.10.24, build 297e128
🟩 NodeJS Version
na

I think this issue might resolve your question https://github.com/Sonarr/Sonarr/issues/5396
from reading the error message:
In case you want to use the health check endpoint, you might have to allow said IP to auth

Thanks for the reply.  I read through that thread before opening this and it's not making sense to me.   I'm pretty new to this and have a real basic understanding of linux.   When I try and add https://myurl.org/ping it tells me it's not the correct format.
I don't understand what that format should be.
I looked in Sonarr's settings and don't see anything (including advanced) that references how to add an IP to auth

In case you want to use the health check endpoint, you might have to allow said IP to auth

Sorry to be a bother on this but I'm kinda lost.

When I try and add ... it tells me it's not the correct format.

Please go step by step.
What did you add where?
What system is telling you what error message exactly?
Could you attach a screenshot of your configuration with the api key redacted?

Also important: are you using the v3 or v4 api of sonarr?

Sonarr is v3.
Currently this is what I have for my monitor

Since I'm using CF Tunnels that has basic auth I have this included.

When I try and change the monitor type to PING I get this error.

I also tried changing to this url and still get the auth spam in my log.
2023-12-13 15:57:24.5|Info|Auth|Auth-Unauthorized ip <IP_ADDRESS> url 'http://sonarr.xxxxxxx.org/api/v3/health'

What you are trying to monitor is a https-api => use the https monitor.
You are missing the auth fields entirely => rejected auth is too be expected.
From the sonarr docs (https://sonarr.tv/docs/api/) I get this field:

[!NOTE]
The v3 API docs apply to both v3 and v4 versions of Sonarr. Some functionality may only be available in v4 of the Sonarr application

I tried using the Authentication section with the username/password for the auth page on Sonarr and that didn't change anything.

According to their api that is not a supported auth mechanism.
Please use the apiKey as I wrote above

Please use the apiKey as I wrote above

I followed https://sonarr.tv/docs/api/ and entered the ip address that needs auth

Which opened this window.  I generated an API key in UP and entered it in both of these fields.  I still get the same log entries.

I have this as my entry in UP

I generated an API key in UP and entered it in both of these fields.

Have you added the correct header to the request?
Please be more specific in what software you have added fields? (Uptime Kuma won't know if you add something to the swagger editor UI)
Could you re-check that you have added the X-Api-Key-Header or include the apikey query parameter.
Please attach a screenshot of your full configuration (including headers, as they are the relevant part)

I have this as my entry in Uptime Kuma

Please use the ping or health check-routes as specified in the sonarr api. It is unclear to me if other routes require more auth.

Please remember that I'm somewhat new to this.
I am completely guessing at what to do.

Have you added the correct header to the request?
I have this in my headers section

{
"CF-Access-Client-Id": "efxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.access",
"CF-Access-Client-Secret": "74382c889975xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Please use the ping or health check-routes as specified in the sonarr api.
I still have no idea what I'm supposed to add in either of these entries.

According to their api that is not a supported auth mechanism.
Please use the apiKey as I wrote above

You stated earlier to do this.   Do what with the API key?  What entry am I supposed to put in it?
Am I supposed to create a key in uptimekuma?  I did and I have no idea what I'm supposed to do with it.
You posted this address  https://sonarr.tv/docs/api/ but that doesn't tell me what I'm supposed to do with it.
I followed the link and guessing that it is looking for the address to authorize I entered the address that is showing
in my logs and clicked authorize.  I then entered the API key that I generated in uptimekuma, but that didn't work.

Success!!!
This was the part I needed.
https://example.com/ping?apikey=INSERT_API_KEY_HERE
I added the API key from Sonarr into the URL you gave and the log spam stopped.
Thank you so much for being patient with me.  I greatly appreciate it.

Issue closed.


Custom assertion messages for Snowhouse

Attempt to extend Snowhouse assertions to make them able to accept custom assertion messages.
General idea: overload of Assert::That which accepts a wrapper of a Snowhouse Expression with additional message string. DefaultFailureHandler accepts such additional string and adds it to assertion messages, if provided.
Example:
Assert::That(
    shortestDistance(1, 2, 3),
    WithMessage(
        EqualsWithDelta(4.242640687, 1e-9),
        "Invalid result for input: x=1, y=2, z=3"
    )
);

<FAILED::>Invalid result for input: x=1, y=2, z=3<:LF:>Expected: equal to 4.24264 (+/- 1e-09)<:LF:>Actual: 5.24264<:LF:>

Pros:

Backwards compatible, should not modify behavior of existing code in any way.
Should work with any Snowhouse expression, not only Equals.

Cons:

The fork modifies files of Snowhouse and does not realize its goal just by using extension points available in the framework.
Syntax is rather clumsy, because main goal was to modify original Snowhouse as little as possible (see "Potential improvements" below).
Does not provide three-argument variant of AssertThat macro. Can be used only as Assert::That

TODOs:

Provide additional overloads of Assert::That which would work with bool, fluent expressions, const char*, etc.
Document.

Potential improvements:

Assertion syntax could be improved in one of following ways:

Provide a variant of AssertThat macro which would accept three arguments. Macro overloading, yay!
Provide some better way to create a message wrapper, for example EqualsWithDelta(4.242640687, 1e-9).WithMessage("Invalid result for input: x=1, y=2, z=3"). Would require modification of Expression.

Credits:
Inspired by user MikChan and his idea.

Converting to draft because we should maintain a separate branch (not target master), and also we're using headers-only branch. I pushed headers-only-codewars, so we can branch from there.

Can you explain why we need a wrapper? Can we overload Assert::That to accept (actual, expected, message) similar to how you did to DefaultFailureHandler?
I don't think we need to use AssertThat macro?

Can you explain why we need a wrapper? Can we overload Assert::That to accept (actual, expected, message) similar to how you did to DefaultFailureHandler?

Because such overload is ambiguous. Assert::That already accepts a string parameter in this place, with different meaning. Note that currently, prototype of That is exactly:
void That(const ActualType& actual, const ExpressionType& expression, const char* file_name = "", int line_number = 0)`.

Adding message at the place you proposed risks (highly unprobable, I do admit) that all existing calls to Assert::That(function_under_test("foo"), Equals("bar"), "some_file_name_used_for_whatever_reason.cpp")  will change their meaning.
So basically:

we can declare that we do not care about existing code and redefine the meaning of currently existing calls with three arguments, or
we introduce a set of functions parallel to That with another name and additional message parameter, or
we take some precautions that overloads of That with newly introduced message argument do not clash with existing code.

I choose the third approach: keep the name (i.e. That), and avoid clashes with potentially existing calls by making types of arguments different enough to avoid ambiguity. If you prefer any other approach, or have some better idea, let me know.

Oh, I missed that, thanks for the detailed explanation.
Yeah, let's avoid the first approach.
The second approach would be something like Assert::WithMessageThat(actual, expression, message).
Another way for the third approach is to wrap only the message:
Assert::That(
    shortestDistance(1, 2, 3),
    EqualsWithDelta(4.242640687, 1e-9),
    Message("Invalid result for input: x=1, y=2, z=3")
);

Assert::That(
    shortestDistance(1, 2, 3),
    EqualsWithDelta(4.242640687, 1e-9),
    Note("Invalid result for input: x=1, y=2, z=3")
);

Do you prefer any of these, or I just prepare both in one fork and see how they work?

I prefer only wrapping the message, but you can try other approaches if you want.
The required change is minimal, and the API feels more natural to me.
AssertionMessage struct (this should be a safe enough name, but open to suggestions) can be put in assert.h.
struct AssertionMessage {
  // Prevent implicit conversion
  explicit AssertionMessage(const std::string& message)
    : m_message { message }
  {
  }
  const std::string m_message;
};
// maybe make the field private and add a getter like `AssertionException` struct and match the codebase style

Assert::That(
  shortestDistance(1, 2, 3),
  EqualsWithDelta(4.242640687, 1e-9),
  AssertionMessage("Invalid result for input: x=1, y=2, z=3")
);

Closing because superseded by #3


[FLOC-1232] [WIP] Sphinx extension for bootstrap components.

https://clusterhq.atlassian.net/browse/FLOC-1232

The generated page doesn't look at all right, but that is because the styles and stuff aren't there. Hopefully this branch demonstrates how to have different layout for different pages. Although the layout should be based on #1064 rather than what is here.

Apologies @tomprince there was a mistake in the RST to HTML conversion guide I sent you for the new directives - intro-text was given as wrapping the content in
 tags, whereas it should be:
intro-text::
content

maps to

content

It is in fact the top
=====================
Getting Started with Flocker
=====================

that should map to

Getting started with Flocker

if we can't make a regular RST header enclosed by two lines of = come out with that, I guess we need a custom header directive to.
Another considerable problem is that Sphinx insists on creating permalink anchors next to any heading of any level. I guess worst-case-scenario I could style these to not be rendered on the page at all, but it'd also be easier to not have them in the HTML for this layout, if that's possible.
Tables in the RST need to come out with table and table-striped classes on the HTML, is there anything built in to docutils to handle that, or would we need another custom table directive?
I know you can add :class: attributes to any standard directives, but tables are rendered just from the text formatting without any preceding directive so perhaps there's not a built-in mechanism to add classes to those?
The directive extensions for tabs are slightly off in the HTML they produce, currently producing two divs with tab-content classes. What we want is one tab-content classed element containing two tab-pane elements:

Install the flocker-cli client on your Mac (requires homebrew):

                    <samp>
$ brew update && \
    brew tap clusterhq/flocker && \
    brew install flocker-0.3.2
                    </samp>

Install the flocker-cli client on your Linux machine:

                    <samp>
$ virtualenv flocker-tutorial && \
    flocker-tutorial/bin/pip install --upgrade pip && \
    flocker-tutorial/bin/pip install --quiet flocker-cli
                    </samp>

Tricky thing is that the first occurrence of a tab-pane should also have an active class, but if we can't address that at the Sphinx level, I should be able to do some JavaScript magic there to correct it at the time of page load.
I'll continue to test and review this, but there's some initial issues that can be addressed or thought about. Thanks.

Another considerable problem is that Sphinx insists on creating permalink anchors next to any heading of any level. I guess worst-case-scenario I could style these to not be rendered on the page at all, but it'd also be easier to not have them in the HTML for this layout, if that's possible.

I think they should be left. With the default sphinx theme, they only show up when you hover over the title, and are in any case useful.

I beleive I've addressed the issue with tabs.
Regarding the tables, alternating rows already have 'row-odd' and 'row-even' classes. Is that sufficient to get the appropriate styling?
The other changes are mechanical changes that should be straightforward to implement.

I beleive I've addressed the issue with tabs.

Thanks Tom

Regarding the tables, alternating rows already have 'row-odd' and 'row-even' classes. Is that sufficient to get the appropriate styling?

I can work with that, yeah, it'll take a little adjustment but probably a lot easier and quicker than the work you'd have to put in to generate the tables differently.

@tomprince I've added a branch off this branch at https://github.com/ClusterHQ/flocker/compare/docs-getting-started-diverged-FLOC-1232?expand=1
In that, I've added the required static assets for the getting started page, filled in the base "home page" layout with the required header/nav/footers that surround the generated doc content, added a "hero-header" directive and altered the "intro-text" directive. This has got us a bit closer to what we want the final Sphinx generated files to come out like. We can merge that branch in to this one if you like, I just didn't want to commit straight to your WIP pull request.

@tomprince if you want to be freed up for other stuff now, I'm pretty confident I can take this over now and continue working on my branch of this branch. I'll keep committing to that, and then perhaps if you want to get involved in reviewing the final state of things on Monday afternoon (so your Monday morning I guess), I think I'll have a reasonable working solution in place by then.

"hero-header" directive

Is there any chance this could be done just with CSS? It is already the only h1 in the document.

Is there any chance this could be done just with CSS? It is already the only h1 in the document.

Unfortunately the RST file needs a top h1 to have a Sphinx-recognised title such that it can be included in a table of contents.
============================
Getting started with Flocker
============================

.. header-hero::

   Getting started with Flocker

I wanted to be able to do it with pure CSS but unfortunately was problematic while preserving correct Sphinx behaviour.

Unfortunately the RST file needs a top h1 to have a Sphinx-recognised title such that it can be included in a table of contents.

My point is, that you are already styling the sphinx-provided h1 (to hide it). Couldn't you just apply the style you need to that h1, instead of having a duplicate one created by a directive?

Couldn't you just apply the style you need to that h1, instead of having a duplicate one created by a directive?

Oh right, unfortunately not; the header-hero is to allow the h1 to be enclosed in a header tag.

Is that strictly necessary?

Is that strictly necessary?

I suppose it's to some extent relative how "strictly necessary" anything is in software technique, the best I can promise is that time permitting, I will endeavour to streamline the RST and remove any custom directives we can get away with before this whole "new docs, new website, new tutorial" project has to be completed and delivered.

Is that strictly necessary?

I think I manged to remove the need for it, just by applying the styles that were applied to header and h1 to the sphinx-generated `h1 instead.

Closing in favour of #1083.


lost setting button

the setting button lost after i update my spotify, and re-install spicetify

what's your versions

https://github.com/spicetify/spicetify-cli/pull/2573
you need to wait for this to be merged and a spicetify release, or downgrade spotify in the meantime.,

what's your versions

my spotify version is  <IP_ADDRESS>4.g42cf0a50


Improve Mesh Info Display for List Values

Currently the mesh info pop up displays a long and hard to read list (without any rounding) when the speed/fuel values are saved as an array. It would be good to improve this.

This is now fixed on the linked branch. Values within lists are now rounded to 3 decimal places, as with float values. This also fixes a bug that was preventing conversion factors being applied to list values for display in Mesh Info, e.g. speed in knots or CO2e values from fuel usages.


Does this introduce a function coloring problem?

This proposal introduces a new question whenever calling a function: what context should this function be run in?
There isn't a principled way of making this decision.
Consider a class:
import {f, g} from './qux.js';

class Foo {
  constructor() {
    // ...
  }

  bar() {
    f();
    g();
  }
}

When we call f and g in bar(), this class has at least two choices. It could call the function directly and keep the current context, or it could take a snapshot during construction and call f in that context. How can the author of Foo know which is appropriate? The answer doesn't need to be the same, f could require the constructor snapshot, and g could require the context that bar was called in. More problematically, bar might need to call a function that sometimes calls f and sometimes calls g.
This isn't a purely abstract concern, it came up while investigating using AsyncContext to power two APIs that are somewhat context-shaped. One is a DI system that flows down the tree of constructors, and the other is an event providence system (to answer questions like "what user interaction prompted this work"). Problems arise because a method on a class doesn't know when a function that it's calling may need to construct an object that participates in the DI system, so it's tempting to just run all of the class's work inside a snapshot taken at construction, but if it does that, then no other context can flow through the class, so work can't be reliably attributed to user interactions.
Taking a step back, it seems like this proposal introduces a function coloring problem – as described in What color is your function? – where a function's color is determined by its current call stack and the snapshots it has access to, there are N different colors, and there are few constraints on the relation defining which colors can call which. This information can't be known statically, and so there's limited ability for documentation or tooling to help. Taken together, I don't see how to build composable and reliable abstractions with AsyncContext.

It'd just run within whatever context it's already in. Context is based on causality, which means a call should always inherit the context its already in. For the case of a snapshot restore, the context would still flow all the way up to that point, it just gets replaced whenever a specific decision has been made to inherit a different context than the most directly received one.

@Qard I'm not sure which part of my post that's in response to.

When we call f and g in bar(), this class has at least two choices. It could call the function directly and keep the current context, or it could take a snapshot during construction and call f in that context.

It would always using the current context unless the user code explicitly decides to bind the context differently somehow. It's not a matter of picking one or the other, the current context is selected by default and should be assumed to be the correct context in almost all cases.

Why is that correct? By convention?
People can write code with AsyncContext that does require snapshotting and restoring in the constructor (I've seen a real world dependency injection system with roughly this shape). It would even work reasonably well in isolation, until there was a second protocol in the codebase that used AsyncContext and needed context to flow down through methods. This is my concern about composition and function coloring, where it's possible to design locally valid protocols that can't be composed, and you can get into a situation where some functions can't call others, because they have mutually incompatible context requirements.

People can write code with AsyncContext that does require snapshotting and restoring in the constructor (I've seen a real world dependency injection system with roughly this shape). It would even work reasonably well in isolation

This is my concern about composition and function coloring, where it's possible to design locally valid protocols that can't be composed,

This is true of a lot of things. I imagine some people will try the pattern outlined in the original post and hit problems, but preventing all anti-patterns is pretty much impossible.
If people want to use AsyncContext for dependency injection use cases, they are probably better off just not snapshotting in constructors. This is more flexible anyway as they can configure dependencies per (method) call if desired.

This is true of a lot of things.

What else are you thinking of here?

I imagine some people will try the pattern outlined in the original post and hit problems

They won't hit problems until there's a second AsyncContext protocol in use in the codebase that uses a different convention. By that point they might be in a real bad way, if two or more mutually incompatible protocols developed separately and got fairly big before someone needed to compose them.
Apps will have context information available in some call stacks but not others, and the obvious solution in the API is to create a protocol of "You must create a snapshot in [this condition] and then run [other work] inside that snapshot." And it's not obvious that doing so introduces the function coloring problem where code that adheres to one such protocol can't call or be called by code that adheres to a different protocol.

I would argue that a DI systems should work with a dedicated AsyncContext.Variable instead. A DI system will probably store its own mapping model within one AsyncContext.Variable. Snapshotting is only meant for job schedulers that are unaware and uninterested of variables.

What else are you thinking of here?

Basically every anti-pattern ever, just because something is an anti-pattern doesn't mean developers won't write things that way anyway. (Often because they don't even realise what they're doing is an anti-pattern).
AsyncContext is specifically designed for the usage pattern where AsyncContext.Snapshot is used to associate a async state to a callback (see also web integration), if people use it other ways I really do feel like that's their problem.

Also generally speaking, I would say capturing the context at constructor time is an anti-pattern anyway as you're effectively taking a dependency on some arbitrary global state. Like in this example:
const logger = new AsyncContext.Variable({ default: defaultLogger });

function doSomething() {
    logger.get().log("Some message");
}

class Service {
    #snapshot = new AsyncContext.Snapshot();

    method() {
        doSomething();
    }
}

The constructor use case came from a project that was aiming to have a tree of providers and consumers, somewhat similar to React context, where any consumer gets its value from the closest providing ancestor, and that ancestor is determined by tree of which objects construct which.
I agree that a leaf node would just grab any variables they need at construction time:
class Service {
    #dependency = validateDependency(dependencyVar.get());
}

And everything is easy when classes construct their children during their own constructors (which is how the app worked initially).
The problems arise when they do construction at any other time. So a change comes in:
class Requester {
-  #service = new Service();
+  // Service is heavy weight, improve page load time by initializing it on first use.
+  #service = null;

 makeRequest() {
+    if (this.#service === null) {
+      // depending on who first called makeRequest, this may throw because dependencyVar is invalid
+      this.#service = new Service();
+    }
    const response = this.#service.actuallyMakeTheRequest();
    // yada yada yada
    return response;
  }
}

Neither Requester nor the caller to makeRequest knows or cares about the correct value of dependencyVar, that flows down from the object that creates a Requester (or the object that made it, etc).
So to fix it, the author of this change will probably create a snapshot in Requester's constructor and run new Service() in it. And that would work! Until some other code running in the Service constructor has different needs for context to flow down.

You could work around this by doing, essentially a local implementation of AsyncContext where all of the system's state is stored within a single variable so that it composes. Something like:

const diInfo = new AsyncContext.Variable({});

export class DiVariable<T> {
  #key = Symbol();
  get(): T | null {
    return diInfo.get()[this.key];
  }
  run(value: T, f: () => void) {
    const currentVal = diInfo.get();
    diInfo.run({...currentVal, [this.key]: value}, f);
  }
}

export class DiSnapshot {
  #diVal = diInfo.get();

  run(f: () => void) {
    diInfo.run(this.#diVal, f);
  }
}

That way you're wrapping the entire DI system's state into a single variable, so Requester can store and restore a DiSnapshot without interfering with other protocols built on top of AsyncContext.

The core premise of function coloring is that red (async) functions can call red functions and blue (sync) functions, and blue functions can only call blue functions. In order for a blue function to call a red function, we have to change the blue function into a red one. Then all the callers of our now-red function also need to be changed. So red functions are viral.
You could argue that getting the state to wrap the function causes a viral color change. If function foo calls bar which calls baz, and baz requires an explicit param, then that has to passed down each step. baz has to receive it, so bar has to receive it, and foo has to pass it. The param forces each call to change.
If we change the explicit param to an implicit param with AsyncContext, we haven't forced a color change, we've only changed the way we pass the data down. It could be an explicit regular param, or an implicit param via AC if we're within a callstack. If there's not a direct callstack hierarchy, then this requires an explicit Snapshot param to be passed down. But this is all the same. AC doesn't color the function, changing the function to require that param colors it.
I haven't seen how your current DI system currently works, so I can't comment how it works now. But I imagine it works similarly to what's described above, requiring some state to be passed into the services helper.


Problem when using callbacks on counter-cache model (e.g. Papertrail)

Hi - wondering about the best way to handle this situation:

We have a parent model that has the count column.
Also on this parent model we are using the Papertrail gem, and we want to record changes to the count column.

Problem --> when the count column is updated from counter_culture, the update is happening via
an update_all statement:
counter.rb#67:
klass.where(relation_primary_key(relation) => id_to_change).update_all updates.join(', ')
which doesn't fire callbacks on the parent model and thus doesn't trigger Papertrail (or anything that relies on callbacks).
Is the reason the update_all is used instead of update purely for performance (i.e. no need to instantiate an actual object), or something else (perhaps circular callbacks, etc)? Any ideas on the best way to support things which rely on callbacks being fired on the parent?
Thanks!

Performance is definitely a concern here; so is potential circular callbacks. I see what you're trying to do, and that makes sense to me, but it's not something that's currently supported. I'd be open to a PR that adds an option for this, but I'd want to keep the current default behavior. I don't have a need for this, so won't work on it myself. But again, very open to a PR. 😄
The only other idea I'd have here is to add Papertrail to the counted model instead; then you could reconstruct the count. But that's pretty involved and not really what you're looking for.
Sorry I can't be more helpful here!


[HOLD for payment 2024-05-08] CRITICAL: [Invoice Rooms] Implement Invoice rooms with individual receivers in the App

Part of the Invoicing V0.1 project
Main issue: https://github.com/Expensify/Expensify/issues/341717
Doc section: Invoicing V1 - Invoice Rooms
Project: #vip-billpay
Feature Description
Invoice rooms with individual receivers.
Manual Test Steps
Automated Tests
Issue OwnerCurrent Issue Owner: @kevinksullivan

Hi, I’m Michael (Mykhailo) from Callstack and I would like to work on this issue.

Updates:

Looks like I have finished with the invoice room UI. The app renders all the information in order with the doc.
Once the backend is ready, we probably have some frontend issues. Right now I use only optimistic data from https://github.com/Expensify/App/pull/40015.

To do:

Get done with nested pages.

Screenshot

@rezkiy37 Could you please post an update here?

Updates:

Updated title and subtitle logic to render accordingly with the doc.
Refactor changes.
Other monir changes.

To do:

Test with the backend.
Polish.

Also, we are waiting for the backend fixes.

WIP. waiting for the next Auth deploy

The PR has been opened for review.

Hey!
I just wanted to let you know about my vacation for next week. I will be back on 06.05.2024. Meanwhile, I asked @waterim to take over this issue.
See you soon!

@waterim what is the plan for this one? I was not sure if this one should be getting worked on or not.

Aw, actually is this just a holding issue for the whole project? So there are a lot of things still being done so this is open.

@cristipaval What is this issue being used for?

This was part of the implementation phase of the project. The work has been merged but it is still open for the C+ payment.

Ah okay, thanks that's helpful.

I am proposing regression test steps today.

Regression Test Proposal

Send an invoice.
Open an invoice report room.
Verify that the room and its actions look properly.
Click on an invoice report preview.
Verify that the invoice report looks properly.

Do we agree 👍 or 👎

Assigned @rushatgabhane as the C+ who reviewed the PR

@kevinksullivan could you please attach payment summary 🙇

@kevinksullivan, @rushatgabhane is the only contributor to pay here, for the C+ review

Payment summary:

@rushatgabhane $250

@kevinksullivan should this be $500 because critical?

ah yes, sorry about that. Updated

$500 approved for @rushatgabhane


Added finalize back in

Finalize added back in and nativeObj safety check in case delete() or release() already called.

Instead of merging this one I suggest reverting #4014.
This one still mixes release with delete that are totally different things!

agree. reverting #4014 is also more correct in terms of git practices, we can be sure then that we get back exactly to the previous state.

Replacing with #4031 and closing.

This removed finalize and left n_delete in release(). Instead of doing random reverts, how about I fix them properly and submit a pull request?

@sgjava , the solution that was implemented before your changes allows both manual memory clean-up via Mat::release() and less efficient but automated finalize() API.
I see no improvements in removing more traditional Java world finalize() approach in order to force people using manual Mat::release(). Also I consider as a conceptual error mixing Mat::release() with object deletion.

If you really know a better solution than the existing one - let's discuss it in details before merging changes into almost released code.

finalize() is not traditional and is in fact bad practice as I've pointed out several times. It can behave differently on different JVM implementations and versions. In fact, it is not called at all a lot of times and causes the Finalizer queue to get backed up besides performance issues. If finalize were best practice it would be used for JDBC connections, file I/O. etc. to clean up resources. Even Oracle says not to use them http://docs.oracle.com/cd/E13188_01/jrockit/docs142/devapp/codeprac.html#998529
That being said I'd still like to make the changes I've made, but keep finalize since you guys want it there. Here's what I propose:
o Keep finalize()
o Mat.release and Mat.delete will be separate, but I'd suggest a a new helper method like releaseAndDelete() the wraps both, since 99% of the time that's what you are doing.
o Use public modifier on nativeObj so it can be modified by delete() to set it to 0. This way if delete() is called more than once (you call delete() explicitly, but finalize() tries to do it again) you get a Java exception instead of a JVM crash.
Let me know if this sounds good and I can make the changes once all the reverts are done.

Since created Java Mat object should keep the corresponding native Mat object and they should be destroyed simultaneously. So users should never call delete() and put Java object to invalid state. Both nativeObj pointer and delete() methods were made protected intentionally to prevent calls from user code!
When user wants to free up the memory occupied by the corresponding native object data - it's enough to call release() (this way work in C++ API as well); After release() Mat object is still valid, can be passed further OpenCV calls (new memory will be allocated), but occupies only few bytes in native memory.

Yea, but the way of disposing both Java Object and native memory at the same time are flawed since it's based on finalize(). Native memory is the major concern. If you use finalize() then you are guaranteed that Object will be there possibly until JVM exit which could be days or weeks depending on the application. You may say this is only a few bytes, but why leave unused Objects in memory when they should have been GC?
Any ways, I agreed with you to let release() only do Mat::release. It would still be nice to have public access to delete() because I'll just patch the source on my end to remove finalize() since I don't want to use a broken implementation. You have to remember there's no protection against calling release() twice. You will get *** Error in `/usr/lib/jvm/jdk1.8.0/bin/java': malloc(): memory corruption: 0x00007fd814230fb0 *** and crash the JVM. This should be protected by a check of nativeObj.

Again: the delete function (destroying the native Mat) shouldn't be called until the Java Mat is being destroyed, both Java and native Mat objects should have the same live time. That's why it will not be public.
Mat::release() without deleting native object can be called as many times as needed - it just makes Mat object empty but still valid.
Applications with sophisticated memory use can call Java garbage collector manually to not wait for weeks for it automatic run...

Yea, I understand how release and delete works. I'm working on a page describing the memory issues using NetBeans profiler and Valgrind. There are very few corner cases that would require explicit GC (I've never used it in 20 years of Java development). "The reason everyone always says to avoid System.gc() is that it is a pretty good indicator of fundamentally broken code. Any code that depends on it for correctness is certainly broken; any that rely on it for performance are most likely broken." I believe that is the case here.
http://stackoverflow.com/questions/2414105/why-is-it-bad-practice-to-call-system-gc


Clarify example 2 output

Summary
State more clearly which string is output to the console.
Fixes #35834

@dotnet-policy-service agree


pymsfilereader for mac?

Hi,
Thermo had developed assembly to replace MSFileReader.
It supposed to interface better.
https://planetorbitrap.com/rawfilereader
I am using a Mac, so I cannot install MSFileReader anyway.   There are four .dll files in rawfilereader:
ThermoFisher.CommonCore.Data.dll
ThermoFisher.CommonCore.MassPrecisionEstimator.dll
ThermoFisher.CommonCore.RawFileReader.dll
ThermoFisher.CommonCore.BackgroundSubtraction.dll
How do I make it work?
Thanks,
Vivian

HI Vivian,
There is a package called RawQuant that interfaces with the new library: pip install RawQuant.  I believe it will work with a mac.
I have been using it since yesterday.  I'm really grateful to François for his wrappers, but the underlying library is outdated and buggy.  Have you contacted Jim Shofstahl from Thermo at the address on page you linked to?  He's being quite helpful.
Rex

Just to chime in here if you decide to go the RawQuant route: I would actually recommend you use RawTools (https://github.com/kevinkovalchik/RawTools) instead of RawQuant. Although RawQuant does interface with this Python package, we are no longer supporting it. RawTools remains fully supported, has all the functionality and more of RawQuant, and even has a GUI if you want it. RawTools is built on the new ThermoRawFileReader library and works on Linux, Mac, and Windows. Feel free to post an issue or a feature request if you have troubles or we are missing a feature you would like to see!

Hi, Rex and Chris,
Thank you so much for your information!  I managed to get peak extraction from an R library called rawDiag.  So I am not going to spend time on RawTools for now.  However, I will definitely keep it in mind.
Yes, I contacted Jim.  He was very helpful!
Vivian


Format config files to improve readability

Overview
Adjust configuration files to improve readability.
The default config files have a mix of different definition of config keys. Some lines start with
;"WHITESPACE"config-key =, some with (which should the default) ;config-key =.
Adjust all config keys to use the same pattern (semi-colon w/o ws): ";key = value"
Adjust comments (semi-colon with ws): "; My comment description"
Added new-line between description and config key, if config-key has a description

@big-r81 mind if I merge it? I have a PR pending which touch the .ini so didn't want to have to solve conflicts.


1.11.2-2.0.2 crashes dedicated Forge 1.11.2 build 2226  on player connect

crash report:
https://gist.github.com/30bf18101449e816b763337b66ce04cd
fml server latest:
https://gist.github.com/3c4ce5fac78c9c26df66763b6663a6af

This (client-side method on dedicated server) will be fixed in 2.0.4 release (very soon).

It's now fixed in 2.0.4.


update apollo federation version to 0.20.4

Hi Brian, I reverted back as per you suggestion on peer dependencies vs devDependencies

Thanks for merging. Now I see a new patch release https://github.com/ExpediaGroup/graphql-component/releases/tag/v2.1.1