Porting WritePCAPHandler to Netty

SwiftNIO ships a very interesting handler that allows to dump bytes as PCAP files while these travel the pipeline. This is super useful for debugging. We should port it to Netty:
https://github.com/apple/swift-nio-extras/blob/master/Sources/NIOExtras/WritePCAPHandler.swift

/cc @weissi @Lukasa FYI

Will the handler dump packets received on Netty directly or dumping will happen after packets are decoded?
Example: If I want to dump TLS packets using the handler, will it be possible? I don't wanna dump content decrypted from those TLS packets.

@hyperxpro depends where you put the handler in the pipeline :)

@johnou Makes sense!

👋
Could I tackle this?

@devesh-shetty sure thing ... Let me know if you have any specific question. Basically it is just about porting the SwiftNIO code to Java :)

Will we be writing our own Pcap Writer or some third party library?

Thanks @normanmaurer - will ask questions if I'm puzzled about something.

@hyperxpro I think we can write our own... Looking at the SwiftNIO code it seems like this shouldn't be too much work for our use-case.

@normanmaurer I got some free time so thought I should give it a shot. I took a look at the SwiftNIO code and it writes TCP Flags too (FIN, ACK, SYN, etc). I'm wondering how we'll be able to do that with Java? I mean, we can't look at TCP Packet Flags without some Pcap library, AFAIK. Can you help me here?

The SwiftNIO one makes them up. 😉

@hyperxpro as @Lukasa said... these are just "dummy values".

Alright. PR incoming next week! :D

PTAL #10498

I have a question about PcapWriteHandler: I am looking to integrate it into Vert.x, but I due to how the processing pipeline is beig built up, PcapWriteHandler#channelActive does not get called which then obviously makes the whole thing fall down.
My question is whether or not it's safe for PcapWriteHandler to also implement handlerAdded in the same way that channelActive is implemented.
Thanks

I think it should work. Did you face any issues when using handlerAdded?

Some of the time the file was corrupted and wireshark could not open it.
Of course I don't know if that was because of the change I had made to add the handlerAdded method, or if it was something else.
That's why I wanted to get your opinion on whether you see any fundamental reason why it would work not if I add handlerAdded.

Using handlerAdded seems to work just fine.
However I have another question: Say one wants to capture information from both a server pipeline and a client pipeline and write it to the same pcap file, should that work?
Asking because I got something like:
pcap: File has<PHONE_NUMBER>-byte packet, bigger than maximum of 262144

I assume that this is happening because of the mixing of segment numbers, right?

Yes, that's correct. Pcap instance should not be shared with other pipelines.

Gotcha, thanks.
I'll into lifting that restriction if possible

Also looking at this handler. wanting to have more than one stream per pcap file. My current solution (given the package private aspects of the current code) looks like this:
import java.io.IOException;
import java.io.OutputStream;
import java.util.concurrent.atomic.AtomicInteger;

import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;

@Sharable
public class MyPcapWriteHandler extends ChannelInitializer<Channel> {

    private static final byte[] PCAP_GLOBAL_HEADER = new byte[] { -95, -78, -61, -44, 0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, -1, -1, 0, 0, 0, 1 };

    private AtomicInteger useCount = new AtomicInteger(0);

    private final OutputStream out;

    private ChannelFutureListener bindListener = new ChannelFutureListener() {
        @Override
        public void operationComplete(ChannelFuture future) throws Exception {
            if (future.isSuccess()) {
                useCount.incrementAndGet();
                future.channel().closeFuture().addListener(closeListener);
            } else {
                out.close();
            }
        }
    };

    private ChannelFutureListener closeListener = new ChannelFutureListener() {
        @Override
        public void operationComplete(ChannelFuture future) throws Exception {
            int users = useCount.decrementAndGet();
            if (users == 0)
                out.close();
        }
    };

    public PcapWriteHandler(OutputStream out) throws IOException {
        this.out = out;
        out.write(PCAP_GLOBAL_HEADER);
    }

    public ChannelFutureListener bindListener() {
        return bindListener;
    }

    public ChannelFutureListener closeListener() {
        return closeListener;
    }

    @Override
    protected void initChannel(Channel ch) throws Exception {
        OutputStream sos = new SynchronizedOutputStream(out);
        ChannelPipeline p = ch.pipeline();
        String me = p.context(this).name();
        p.addAfter(me, null, new io.netty.handler.pcap.PcapWriteHandler(sos, false, false));
        ch.closeFuture().addListener(closeListener);
        useCount.incrementAndGet();
    }
}

One (important?) addition is a SynchronizedOutputStream wrapper that decorates all methods with a synchronized keyword, and the close() method stubbed out, so that each PcapWriteHandler can write and close their stream, without colliding with other instances. The usage then looks like:
ChannelFuture bindFuture = b.bind(address);
bindFuture.addListener(pcapWriteHandler.bindListener());

That is when the handler is being used with a ServerSocket, and the pcap should be closed when the server socket is closed (or fails to bind). And then obviously, the actual MyPcapWriteHandler needs to be added to the pipeline at a suitable position. Thoughts on this approach?
I did run into the abovementioned "pcap: File has<PHONE_NUMBER>-byte packet, bigger than maximum of 262144" on one occasion, though (actual number varied, I think). Wondering what the underlying cause of that was, will have to dig more.


feat: allow link options to be set to true and false

Closes #9396
Requires this and this to be updated if the SvelteKit maintainers are okay with merging this.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[ ] This message body should clearly illustrate what problems it solves.
[ ] Ideally, include a test that fails without this PR but passes with it.

Tests

[ ] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Thank you! I'm in favour of this change, though we should probably also update these docs to recommend "false" instead of "off": https://kit.svelte.dev/docs/link-options#disabling-options
I also wonder if we should (non-breakingly) deprecate "off" in favour of "false", in other words print a warning when encountering it? This would make it easy to remove off in future, instead of allowing multiple ways of doing the same thing.

On second thoughts, we should release a version of SvelteKit that respects "false", then update HTMLAttributes accordingly, then deprecate off, otherwise people might get a warning telling them to make an update that will cause a red squiggly. So I think this PR is good to go as-is

opened https://github.com/sveltejs/svelte/issues/8638

I am in favor of deprecating off sooner or later. It makes the link options less confusing ("Is there a difference between off and false?") and more consistent ("Why does off exist but not on?").
The off value is probably not used that frequently, so it shouldn't cause much annoyance.


Get rid of dragMouse.

Instead of making developers tell RobotJS when they want to drag the mouse, just track when the mouse button is toggled down.

That would open the door for dragMouseSmooth without a new api
const closer = (a,b) => ( a > b ? a-1 : a+1 )
async function dragMouseSmooth (ox,oy,last) {
  if (last && last.x === ox && last.y === oy) { return }
  const p = last ? last : robot.getMousePos();
  const r = { x: closer(p.x, ox), y: closer(p.y, oy) }
  robot.dragMouse(r.x, r.y)
  dragMouseSmooth(ox, oy, r)
}

This issue has been closed because it has been inactive for > 240 days.
You may reopen this issue if it has been closed in error.


feat(readiness): add readiness check and event notification #147

Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes: #147
Summary:
Add a new ready property and notifyReadiness() function.
nofityReadiness() is called at a point when we understand all calculations necessary for the component to function properly.
At this point we set ready to true and sent auroMenu-ready as an event.
Type of change:
Please delete options that are not relevant.

[x] New capability
[ ] Revision of an existing capability
[ ] Infrastructure change (automation, etc.)
[ ] Other (please elaborate)

Checklist:

[x] My update follows the CONTRIBUTING guidelines of this project
[x] I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team

:tada: This PR is included in version 2.7.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


ci: Conditionally use pip for 3.7

Am i dumb? I can't seem to figure out conditionals in the GitHub action...

lol what a headache:
if ${{ matrix.python-version == "3.7" }}  # breaks ci

if ${{ matrix.python-version }} == "3.7" # always true

if ${{ matrix.python-version == '3.7' }} # works correctly


Improve error messages for sql offer unavailability

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

[ ] I adhere to the Command Guidelines.

Fixes #9510


add Antenna

Antenna is a feed aggregator, which is triggered as an additional step during publishing. The author tells Antenna, that new content is available.
gemini://warmedal.se/~antenna/

Fixed with #118


Replace libssl3 with libssl3t64

Summary

In Ubuntu Noble the openssl package now depends on libssl3t64 instead of libssl3:
https://packages.ubuntu.com/noble/openssl
Also the location of the default apt sources is now in /etc/apt/sources.list.d/ubuntu.sources file, which uses deb822 format
Checklist

[X] I have viewed, signed, and submitted the Contributor License Agreement.
[X] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[X] I have added an integration test, if necessary.
[X] I have reviewed the styleguide for guidance on my code quality.
[X] I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Also the location of the default apt sources is now in /etc/apt/sources.list.d/ubuntu.sources file, which uses deb822 format

Hey @pbusko - how did you realize this?

Also the location of the default apt sources is now in /etc/apt/sources.list.d/ubuntu.sources file, which uses deb822 format

Hey @pbusko - how did you realize this?

docker build logs are full of messages about duplicated apt sources, also the content of the /etc/apt/sources.list file is now this:
$ cat /etc/apt/sources.list
# Ubuntu sources have moved to the /etc/apt/sources.list.d/ubuntu.sources
# file, which uses the deb822 format. Use deb822-formatted .sources files
# to manage package sources in the /etc/apt/sources.list.d/ directory.
# See the sources.list(5) manual page for details.


Can't remap volume keys

karabiner-elements 12.5.0 can't remap volume_increment and volume_decrement keys even though EventViewer can correctly observe the key down/up events for the volume keys.
I've created a complex modification that remaps "volume_increment" to "x". The rule doesn't take effect when pressing "volume_increment" key.
On the other hand, creating a complex modification that remaps "x" to "volume_increment" does work. The problem is just in the "from" part.
Tested with external keyboard with media keys. All media keys are correctly captured by EventViewer. Double checked syntax and logs load the config file without errors. Tried restarting karabiner-elements.

Sorry, found the problem!
The volume_increment and volume_decrement keys are not "key_codes". They are "consumer_key_codes". Changing karabiner.json to use "consumer_key_code" as the "from" works!


Feature request for transfer compression

Which version of the AzCopy was used?
AzCopy 8.1.0-netcore
Which platform are you using? (ex: Windows, Mac, Linux)
Windows 10
What command did you run?
&"C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\AzCopy.exe" /Source:"D:\MyVM.vhd" /Dest:"https://.blob.core.windows.net//MyVM.vhd?" /BlobType:Page /NC:2
What problem was encountered?
Transfer large files takes a lot of time, it uses available all available uplink capacity (10 Mbit/s).
How can we reproduce the problem in the simplest way?
Upload a large file, like i VHD image
Have you found a mitigation/solution?
Built it transfer compression in Azcopy would help a lot
Trying to gzip the file reduces the file size to 50% and the compression is way faster than the upload.
Built in (optional) transfer compression in azcopy would speedup transfer 2x.
Command line switch to enable would be fine.
Although automatic enabling for long running transfers where the client is not CPU-bound would be cool.

Closing since V8 is no longer being actively maintained. Please give V10 a try here, it's been GA for a bit of time now. Please don't hesitate if you encounter any issue.
You could leverage V10's piping feature to achieve the behavior you are looking for. Please refer to the copy command examples for more info.


maybe a lecture on factors?

I added an example that I briefly went over last time... but I think we could maybe add this to one of the days. I think it is an important topic. What do you think @avahoffman  and @cansavvy ?

I agree - super important, could maybe be a "module" of the classes lecture?

yeah, that's what I was thinking... OK, I'll try to figure out where in the schedule this would make sense

https://github.com/AlexsLemonade/training-modules/blob/master/intro-to-R-tidyverse/01-intro_to_base_R.Rmd There's stuff about factors in here.

https://github.com/AlexsLemonade/training-modules/tree/master/intro-to-R-tidyverse

hmmm I might move this again... I previously showed how helpful forcats is for making plots... but then we would want to do this after the  data visualization module

@carriewright11 is this resolved?

Yes, I think so :)


Issue Number: close #xxx
Problem Summary:
What is changed and how it works?
Proposal: xxx
What's Changed:
Related changes

PR to update pingcap/docs/pingcap/docs-cn:
PR to update pingcap/tidb-ansible:
Need to cherry-pick to the release branch

Check List
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Side effects

Performance regression

Consumes more CPU
Consumes more MEM

Breaking backward compatibility

Release note

Part of the async commit feature.

superseded by https://github.com/tikv/tikv/pull/9196


"az bicep install" freezes on Ubuntu Studio 22.04 LTS

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

Describe the bug

When I run the az bicep install --debug command, it completely hangs the Azure CLI.
This is preventing me from running the necessary commands to install Azure Kubernetes Baseline.
cli.knack.cli: Command arguments: ['bicep', 'install', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f7199f4b250>, <function OutputProducer.on_global_arguments at 0x7f7199e92dd0>, <function CLIQuery.on_global_arguments at 0x7f7199cd0160>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'bicep': ['azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: resource                  0.007        47       209
cli.azure.cli.core: Total (1)                 0.007        47       209
cli.azure.cli.core: Loaded 47 groups, 209 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : bicep install
cli.azure.cli.core: Command table: bicep install
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f719917e680>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/aerith/.azure/commands/2023-05-10.09-11-13.bicep_install.448123.log'.
az_command_data_logger: command args: bicep install --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f71991931c0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f71991f1990>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f71991f1ab0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f7199e92e60>, <function CLIQuery.handle_query_parameter at 0x7f7199cd01f0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f71991f1a20>]
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /BicepLatestRelease HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): downloads.bicep.azure.com:443

To Reproduce

Run az bicep install --debug

Expected behavior

Az CLI installs bicep command.
Environment summary

Additional context

@pcgeek86 Based on the error log, looks like the command is stuck on downloading the bicep CLI. This is due to connectivity or bandwidth issues.
Could you check and confirm if any of the following applies to your scenario?

HTTP Proxy
Restricted Network where the command is running like Firewalls, Route Settings, etc.
Internet Access where the command is running

@PramodValavala-MSFT My internet connection is working perfectly fine. The problem occurred on both a Linux VM and my Windows 11 workstation.

I am not using a proxy
I don't have network restriction rules in place
I have perfectly good internet access

I temporarily worked around the issue by installing Bicep using the Scoop package manager, but the Azure CLI is still broken.
https://scoop.sh/

@pcgeek86 Thanks for the quick confirmation! Could you check to see if the following runs successfully? This is what is being fetched at that line in the log.
curl -v -L https://aka.ms/BicepLatestRelease

@PramodValavala-MSFT yes it works just fine. It returns a large JSON response.

@pcgeek86 Could you run the following command when it is hung?
# If you don't have netstat, install by running this
# sudo apt install net-tools

netstat -t

And then get the IP Address for downloads.bicep.azure.com by running this and share the lines from the netstat output with those IPs as Foreign Address
nslookup downloads.bicep.azure.com

It's magically working this morning. I haven't changed a single thing. This is the exact same Linux VM that was having problems yesterday. 🫤

cli.knack.cli: Command arguments: ['bicep', 'install', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7fb37828f250>, <function OutputProducer.on_global_arguments at 0x7fb3781d2dd0>, <function CLIQuery.on_global_arguments at 0x7fb37800c160>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'bicep': ['azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: resource                  0.007        47       209
cli.azure.cli.core: Total (1)                 0.007        47       209
cli.azure.cli.core: Loaded 47 groups, 209 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : bicep install
cli.azure.cli.core: Command table: bicep install
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fb3774de680>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/aerith/.azure/commands/2023-05-11.08-29-33.bicep_install.451967.log'.
az_command_data_logger: command args: bicep install --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7fb3774f31c0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7fb377551990>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7fb377551ab0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fb3781d2e60>, <function CLIQuery.handle_query_parameter at 0x7fb37800c1f0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7fb377551a20>]
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /BicepLatestRelease HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): downloads.bicep.azure.com:443
urllib3.connectionpool: https://downloads.bicep.azure.com:443 "GET /releases/latest HTTP/1.1" 200 39052
Installing Bicep CLI v0.17.1...
cli.azure.cli.command_modules.resource._bicep: The configuration value of bicep.use_binary_from_path has been set to 'false'.
Successfully installed Bicep CLI to "/home/aerith/.azure/bin/bicep".
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7fb37752a710>, <function _x509_from_base64_to_hex_transform at 0x7fb37752a7a0>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fb3774de8c0>]
az_command_data_logger: exit code: 0
cli.__main__: Command ran in 20.620 seconds (init: 0.091, invoke: 20.528)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3418 in cache
telemetry.check: Negative: The /home/aerith/.azure/telemetry.txt was modified at 2023-05-11 08:28:46.170975, which in less than 600.000000 s


Pausing a plan returns an event containing an error

When pausing the run engine via blueapi (blueapi controller pause) the status message looks like this:
{
   "state":"PAUSED",
   "task_status":{
      "task_id":"977ad14b-e009-43cc-9a6a-4fd3a77c1c08",
      "task_complete":true,
      "task_failed":true
   },
   "errors":[
      "\nYour RunEngine is entering a paused state. These are your options for changing\nthe state of the RunEngine:\n\nRE.resume()    Resume the plan.\nRE.abort()     Perform cleanup, then kill plan.  Mark exit_status='success'.\nRE.halt()      Emergency Stop: Do not perform cleanup --- just stop.\n"
   ],
   "warnings":[

   ]
}

Since the errors list is populated, this is considered an error by clients so they might stop listening to relevant events.
Additionally the message content should not really be sent via blueapi as this is designed for using the RE in an interpreter.

potential solutions:

move from error to warning (easy)
do not send any message at all

reworker.py     def pause(self, defer=False):         LOGGER.info("Requesting to pause the worker")         self._ctx.run_engine.request_pause(defer)
: 214

    def request_pause(self, defer=False):         """         Command the Run Engine to pause.
bluesky/run_engine : 751

also event.py:
class WorkerEvent(BlueapiBaseModel) 105

reworker.py .
: 271
   def _on_state_change(         self,         raw_new_state: RawRunEngineState,         raw_old_state: RawRunEngineState | None = None,     ) -> None:         new_state = WorkerState.from_bluesky_state(raw_new_state)         if raw_old_state:             old_state = WorkerState.from_bluesky_state(raw_old_state)         else:             old_state = WorkerState.UNKNOWN         LOGGER.debug(f"Notifying state change {old_state} -> {new_state}")         self._state = new_state         self._report_status()

it's deep in the entrails of RunEngine, that assumes a pause is an error.
it's not a blueapi issue perhaps


Realm accessed from incorrect thread.

Goals
Remove data from an array of the realm object
Expected Results
data inside realm to be deleted
Actual Results
2021-01-06 15:11:04.927332+0300 Eco Capture[1758:443269] *** Terminating app due to uncaught exception 'RLMException', reason: 'Realm accessed from incorrect thread.'

*** First throw call stack:
(0x1991719d4 0x1acb22b54 0x1058bb134 0x1059ba678 0x10778593c 0x1040f4f00 0x1040f3e8c 0x1040f6264 0x107783814 0x1040f4c48 0x1079458d8 0x1079459d8 0x19a32a4d8 0x1990d4360 0x1990d4320 0x1990d3918 0x1990d3310 0x107946780 0x1040f5038 0x1040f37b0 0x104ae15f8 0x104a1e28c 0x107a3fce4 0x107a41528 0x107a4f994 0x1990f15d0 0x1990eba78 0x1990eab90 0x1af40d598 0x19b9d4638 0x19b9d9bb8 0x1abec5b54 0x1040ec0c0 0x1040ec038 0x1040ed128 0x198dc9588)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'RLMException', reason: 'Can only delete an object from the Realm it belongs to.'
terminating with uncaught exception of type NSException
(lldb)
Steps for others to Reproduce

Create Alamofire request
Put the delete or add or read inside the request
Crash happen

Code Sample
    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            do {
                let realm = try Realm()
                for object in deleted {
                    let test = realm.objects(DataAcc.self).filter("timestamp == " + "\(object.timestamp)")
                    print("Data", test.count)
                }
                print("Data has been deleted")
            } catch let error as NSError {
                print("Error Delete Data: ", error.localizedDescription)
            }
        }, onFailure: { error in
            print("Error uploading data", error)
        })

    }

Edit - This method is working but in that case, i can't make sure that the response is a success so I can confirm remove data
func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {
            do {
                let realm = try Realm()
                try realm.write {
                    realm.delete(deleted)
                    print("Data has been deleted")
                }
            } catch let error as NSError {
                print("Error Delete Data: ", error.localizedDescription)
            }

        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            self.status = true
            print("Data has been sent")
        }, onFailure: { error in
            print("Error uploading data", error)
        })

    }

Version of Realm and Tooling
Realm framework version: 10.5.0
Realm Object Server version: Don't use
Xcode version: Version 12.2 (12B45b)
iOS/OSX version: 14
Dependency manager + version: Latest

Hi @ahmedsafadii,
for sync we recommend Realm Sync.
To not disregard your question though: Can you show us a little more context?
Where is this list coming from? Could you just pass in the object it is attached to?
The SDK offers a ThreadSafeReference: https://realm.io/docs/swift/latest/#passing-instances-across-threads
You could pass in the object in question a parameter and then pass it on (wrapped as a ThreadSafeReference) into the success block.

Hi @ahmedsafadii,
for sync we recommend Realm Sync.
To not disregard your question though: Can you show us a little more context?
Where is this list coming from? Could you just pass in the object it is attached to?
The SDK offers a ThreadSafeReference: https://realm.io/docs/swift/latest/#passing-instances-across-threads
You could pass in the object in question a parameter and then pass it on (wrapped as a ThreadSafeReference) into the success block.

@DominicFrei this is the full cycle
This is executed every 1 sec
    func didReceiveAccelerationX(_ x: Int8, y: Int8, z: Int8, withTimestamp timestamp: Double, fromDevice device: EmpaticaDeviceManager!) {
        DataAccManager.shared.writeData(object: DataAcc(value: ["timestamp" : timestamp, "xPos" : Double(x), "yPos" : Double(y), "zPos" : Double(z)]))
    }

this is the manager
class DataAccManager {

    static let shared = DataAccManager()
    var size: Int = 1000
    var status: Bool = true

    func dataAccsData(data: [[String: Double]], onSuccess: @escaping([AccResponseElement]) -> Void,
                      onFailure: @escaping(String) -> Void) {

        let requestUrl = APIManager.sharedInstance.apiUrl + APIManager.dataAccs

        var headers: HTTPHeaders = []
        headers.add(.acceptLanguage(Constants.Setting.langauge))

        if Defaults[\.token] != "" {
            headers.add(.authorization(bearerToken: Defaults[\.token]))
        }

        AF.request(requestUrl, method: .post, parameters: data, encoder: JSONParameterEncoder.default, headers: headers).responseData { response in
            switch response.result {
            case .success:
                guard let data = response.data else {
                    return
                }
                do {
                    let data = try JSONDecoder().decode([AccResponseElement].self, from: data)
                    print("finish", data.count)
                    onSuccess(data)
                } catch let error {
                    onFailure(error.localizedDescription)
                }
            case .failure(let error):
                onFailure(error.localizedDescription)
            }
        }
    }

    func writeData(object: DataAcc) {

        do {
            let realm = try Realm()
            try realm.write {
                realm.add(object)
            }
        } catch let error as NSError {
            print("Data Acc Write Error: ", error.localizedDescription)
        }
        checkData()
    }

    func checkData() {
        do {
            let realm = try Realm()
            let accSize = realm.objects(DataAcc.self)
            if accSize.count > size {
                if status {
                    status = false
                    print("Should Upload Here")
                    self.prepareData(data: accSize)
                }
            }
            print("Size Is: ", accSize.count)
        } catch let error as NSError {
            print("Error calcualte size: ", error.localizedDescription)
        }
    }

    func prepareData(data: Results<DataAcc>) {

        let deleted = List<DataAcc>()
        var sending = [[String: Double]]()

        for i in 0..<size {
            deleted.append(data[i])
            sending.append([
                "timestamp": data[i].timestamp,
                "z": data[i].xPos,
                "y": data[i].yPos,
                "x": data[i].zPos,
            ])
        }

        print("Before Sending", deleted.count)
        print("Before Sending", sending.count)

        uploadData(deleted: deleted, sending: sending)

    }

    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })

        // TODO: This should excute when the request is finish

        self.clearData(deleted: deleted)

    }

    func clearData(deleted: List<DataAcc>) {
        do {
            let realm = try Realm()
            try realm.write {
                realm.delete(deleted)
                print("Data has been deleted")
            }
        } catch let error as NSError {
            print("Error Delete Data: ", error.localizedDescription)
        }
    }

@DominicFrei this is the full cycle
This is executed every 1 sec
    func didReceiveAccelerationX(_ x: Int8, y: Int8, z: Int8, withTimestamp timestamp: Double, fromDevice device: EmpaticaDeviceManager!) {
        DataAccManager.shared.writeData(object: DataAcc(value: ["timestamp" : timestamp, "xPos" : Double(x), "yPos" : Double(y), "zPos" : Double(z)]))
    }

this is the manager
class DataAccManager {

    static let shared = DataAccManager()
    var size: Int = 1000
    var status: Bool = true

    func dataAccsData(data: [[String: Double]], onSuccess: @escaping([AccResponseElement]) -> Void,
                      onFailure: @escaping(String) -> Void) {

        let requestUrl = APIManager.sharedInstance.apiUrl + APIManager.dataAccs

        var headers: HTTPHeaders = []
        headers.add(.acceptLanguage(Constants.Setting.langauge))

        if Defaults[\.token] != "" {
            headers.add(.authorization(bearerToken: Defaults[\.token]))
        }

        AF.request(requestUrl, method: .post, parameters: data, encoder: JSONParameterEncoder.default, headers: headers).responseData { response in
            switch response.result {
            case .success:
                guard let data = response.data else {
                    return
                }
                do {
                    let data = try JSONDecoder().decode([AccResponseElement].self, from: data)
                    print("finish", data.count)
                    onSuccess(data)
                } catch let error {
                    onFailure(error.localizedDescription)
                }
            case .failure(let error):
                onFailure(error.localizedDescription)
            }
        }
    }

    func writeData(object: DataAcc) {

        do {
            let realm = try Realm()
            try realm.write {
                realm.add(object)
            }
        } catch let error as NSError {
            print("Data Acc Write Error: ", error.localizedDescription)
        }
        checkData()
    }

    func checkData() {
        do {
            let realm = try Realm()
            let accSize = realm.objects(DataAcc.self)
            if accSize.count > size {
                if status {
                    status = false
                    print("Should Upload Here")
                    self.prepareData(data: accSize)
                }
            }
            print("Size Is: ", accSize.count)
        } catch let error as NSError {
            print("Error calcualte size: ", error.localizedDescription)
        }
    }

    func prepareData(data: Results<DataAcc>) {

        let deleted = List<DataAcc>()
        var sending = [[String: Double]]()

        for i in 0..<size {
            deleted.append(data[i])
            sending.append([
                "timestamp": data[i].timestamp,
                "z": data[i].xPos,
                "y": data[i].yPos,
                "x": data[i].zPos,
            ])
        }

        print("Before Sending", deleted.count)
        print("Before Sending", sending.count)

        uploadData(deleted: deleted, sending: sending)

    }

    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })

        // TODO: This should excute when the request is finish

        self.clearData(deleted: deleted)

    }

    func clearData(deleted: List<DataAcc>) {
        do {
            let realm = try Realm()
            try realm.write {
                realm.delete(deleted)
                print("Data has been deleted")
            }
        } catch let error as NSError {
            print("Error Delete Data: ", error.localizedDescription)
        }
    }

@DominicFrei also I try the way that inside the documentation about ThreadSafeReference
    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        let personRef = ThreadSafeReference(to: deleted)
        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            autoreleasepool {
                let realm = try! Realm()
                guard let data = realm.resolve(personRef) else {
                    return // person was deleted
                }
                try! realm.write {
                    realm.delete(data)
                }
            }
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })
    }

I got this error
2021-01-06 20:44:00.465916+0300 Eco Capture[2135:538356] *** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot construct reference to unmanaged object, which can be passed across threads directly'
*** First throw call stack:
(0x1991719d4 0x1acb22b54 0x106651a70 0x106651bec 0x1083ea344 0x1083ea2a8 0x104d1c5ac 0x104d1c4bc 0x104d1bc10 0x104d1b6d0 0x104d0e224 0x104d0e2a8 0x104d33c6c 0x104d62854 0x104d34b44 0x1b1209528 0x1b1209724 0x1b1209a24 0x1b12039e4 0x1b11f299c 0x1b1232f44 0x1b121ead0 0x10867bce4 0x10867d528 0x1086845ac 0x108685268 0x1086843f0 0x108685234 0x108690a5c 0x1df7d25a4 0x1df7d5874)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot construct reference to unmanaged object, which can be passed across threads directly'
terminating with uncaught exception of type NSException
(lldb)

@DominicFrei also I try the way that inside the documentation about ThreadSafeReference
    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        let personRef = ThreadSafeReference(to: deleted)
        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            autoreleasepool {
                let realm = try! Realm()
                guard let data = realm.resolve(personRef) else {
                    return // person was deleted
                }
                try! realm.write {
                    realm.delete(data)
                }
            }
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })
    }

I got this error
2021-01-06 20:44:00.465916+0300 Eco Capture[2135:538356] *** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot construct reference to unmanaged object, which can be passed across threads directly'
*** First throw call stack:
(0x1991719d4 0x1acb22b54 0x106651a70 0x106651bec 0x1083ea344 0x1083ea2a8 0x104d1c5ac 0x104d1c4bc 0x104d1bc10 0x104d1b6d0 0x104d0e224 0x104d0e2a8 0x104d33c6c 0x104d62854 0x104d34b44 0x1b1209528 0x1b1209724 0x1b1209a24 0x1b12039e4 0x1b11f299c 0x1b1232f44 0x1b121ead0 0x10867bce4 0x10867d528 0x1086845ac 0x108685268 0x1086843f0 0x108685234 0x108690a5c 0x1df7d25a4 0x1df7d5874)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot construct reference to unmanaged object, which can be passed across threads directly'
terminating with uncaught exception of type NSException
(lldb)

@DominicFrei also I try the way that inside the documentation about ThreadSafeReference
SWIFT (18 lines)
    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        let personRef = ThreadSafeReference(to: deleted)
        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            autoreleasepool {
                let realm = try! Realm()
                guard let data = realm.resolve(personRef) else {
                    return // person was deleted
                }
                try! realm.write {
                    realm.delete(data)
                }
            }
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })
    }

I got this error
2021-01-06 20:44:00.465916+0300 Eco Capture[2135:538356] *** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot construct reference to unmanaged object, which can be passed across threads directly'
*** First throw call stack:
(0x1991719d4 0x1acb22b54 0x106651a70 0x106651bec 0x1083ea344 0x1083ea2a8 0x104d1c5ac 0x104d1c4bc 0x104d1bc10 0x104d1b6d0 0x104d0e224 0x104d0e2a8 0x104d33c6c 0x104d62854 0x104d34b44 0x1b1209528 0x1b1209724 0x1b1209a24 0x1b12039e4 0x1b11f299c 0x1b1232f44 0x1b121ead0 0x10867bce4 0x10867d528 0x1086845ac 0x108685268 0x1086843f0 0x108685234 0x108690a5c 0x1df7d25a4 0x1df7d5874)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot construct reference to unmanaged object, which can be passed across threads directly'
terminating with uncaught exception of type NSException
(lldb)

@ahmedsafadii You are trying to create a ThreadSafeReference to the List<DataAcc> which is not an object managed by your realm. As pointed our in the error message this can be passed directly and you do not (and cannot) create aThreadSafeReference to that.
ThreadSafeReferences are created for realm objects: https://realm.io/docs/swift/latest/#passing-instances-across-threads

@DominicFrei also I try the way that inside the documentation about ThreadSafeReference
SWIFT (18 lines)
    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        let personRef = ThreadSafeReference(to: deleted)
        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            autoreleasepool {
                let realm = try! Realm()
                guard let data = realm.resolve(personRef) else {
                    return // person was deleted
                }
                try! realm.write {
                    realm.delete(data)
                }
            }
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })
    }

I got this error
2021-01-06 20:44:00.465916+0300 Eco Capture[2135:538356] *** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot construct reference to unmanaged object, which can be passed across threads directly'
*** First throw call stack:
(0x1991719d4 0x1acb22b54 0x106651a70 0x106651bec 0x1083ea344 0x1083ea2a8 0x104d1c5ac 0x104d1c4bc 0x104d1bc10 0x104d1b6d0 0x104d0e224 0x104d0e2a8 0x104d33c6c 0x104d62854 0x104d34b44 0x1b1209528 0x1b1209724 0x1b1209a24 0x1b12039e4 0x1b11f299c 0x1b1232f44 0x1b121ead0 0x10867bce4 0x10867d528 0x1086845ac 0x108685268 0x1086843f0 0x108685234 0x108690a5c 0x1df7d25a4 0x1df7d5874)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot construct reference to unmanaged object, which can be passed across threads directly'
terminating with uncaught exception of type NSException
(lldb)

@ahmedsafadii You are trying to create a ThreadSafeReference to the List<DataAcc> which is not an object managed by your realm. As pointed our in the error message this can be passed directly and you do not (and cannot) create aThreadSafeReference to that.
ThreadSafeReferences are created for realm objects: https://realm.io/docs/swift/latest/#passing-instances-across-threads

@DominicFrei this is the full cycle
This is executed every 1 sec
    func didReceiveAccelerationX(_ x: Int8, y: Int8, z: Int8, withTimestamp timestamp: Double, fromDevice device: EmpaticaDeviceManager!) {
        DataAccManager.shared.writeData(object: DataAcc(value: ["timestamp" : timestamp, "xPos" : Double(x), "yPos" : Double(y), "zPos" : Double(z)]))
    }

this is the manager
SWIFT (114 lines)
class DataAccManager {

    static let shared = DataAccManager()
    var size: Int = 1000
    var status: Bool = true

    func dataAccsData(data: [[String: Double]], onSuccess: @escaping([AccResponseElement]) -> Void,
                      onFailure: @escaping(String) -> Void) {

        let requestUrl = APIManager.sharedInstance.apiUrl + APIManager.dataAccs

        var headers: HTTPHeaders = []
        headers.add(.acceptLanguage(Constants.Setting.langauge))

        if Defaults[\.token] != "" {
            headers.add(.authorization(bearerToken: Defaults[\.token]))
        }

        AF.request(requestUrl, method: .post, parameters: data, encoder: JSONParameterEncoder.default, headers: headers).responseData { response in
            switch response.result {
            case .success:
                guard let data = response.data else {
                    return
                }
                do {
                    let data = try JSONDecoder().decode([AccResponseElement].self, from: data)
                    print("finish", data.count)
                    onSuccess(data)
                } catch let error {
                    onFailure(error.localizedDescription)
                }
            case .failure(let error):
                onFailure(error.localizedDescription)
            }
        }
    }

    func writeData(object: DataAcc) {

        do {
            let realm = try Realm()
            try realm.write {
                realm.add(object)
            }
        } catch let error as NSError {
            print("Data Acc Write Error: ", error.localizedDescription)
        }
        checkData()
    }

    func checkData() {
        do {
            let realm = try Realm()
            let accSize = realm.objects(DataAcc.self)
            if accSize.count > size {
                if status {
                    status = false
                    print("Should Upload Here")
                    self.prepareData(data: accSize)
                }
            }
            print("Size Is: ", accSize.count)
        } catch let error as NSError {
            print("Error calcualte size: ", error.localizedDescription)
        }
    }

    func prepareData(data: Results<DataAcc>) {

        let deleted = List<DataAcc>()
        var sending = [[String: Double]]()

        for i in 0..<size {
            deleted.append(data[i])
            sending.append([
                "timestamp": data[i].timestamp,
                "z": data[i].xPos,
                "y": data[i].yPos,
                "x": data[i].zPos,
            ])
        }

        print("Before Sending", deleted.count)
        print("Before Sending", sending.count)

        uploadData(deleted: deleted, sending: sending)

    }

    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })

        // TODO: This should excute when the request is finish

        self.clearData(deleted: deleted)

    }

    func clearData(deleted: List<DataAcc>) {
        do {
            let realm = try Realm()
            try realm.write {
                realm.delete(deleted)
                print("Data has been deleted")
            }
        } catch let error as NSError {
            print("Error Delete Data: ", error.localizedDescription)
        }
    }

@ahmedsafadii The recommended way to go would be Realm Sync instead of doing it manually yourself.
Have you had a chance to look into that?

@DominicFrei this is the full cycle
This is executed every 1 sec
    func didReceiveAccelerationX(_ x: Int8, y: Int8, z: Int8, withTimestamp timestamp: Double, fromDevice device: EmpaticaDeviceManager!) {
        DataAccManager.shared.writeData(object: DataAcc(value: ["timestamp" : timestamp, "xPos" : Double(x), "yPos" : Double(y), "zPos" : Double(z)]))
    }

this is the manager
SWIFT (114 lines)
class DataAccManager {

    static let shared = DataAccManager()
    var size: Int = 1000
    var status: Bool = true

    func dataAccsData(data: [[String: Double]], onSuccess: @escaping([AccResponseElement]) -> Void,
                      onFailure: @escaping(String) -> Void) {

        let requestUrl = APIManager.sharedInstance.apiUrl + APIManager.dataAccs

        var headers: HTTPHeaders = []
        headers.add(.acceptLanguage(Constants.Setting.langauge))

        if Defaults[\.token] != "" {
            headers.add(.authorization(bearerToken: Defaults[\.token]))
        }

        AF.request(requestUrl, method: .post, parameters: data, encoder: JSONParameterEncoder.default, headers: headers).responseData { response in
            switch response.result {
            case .success:
                guard let data = response.data else {
                    return
                }
                do {
                    let data = try JSONDecoder().decode([AccResponseElement].self, from: data)
                    print("finish", data.count)
                    onSuccess(data)
                } catch let error {
                    onFailure(error.localizedDescription)
                }
            case .failure(let error):
                onFailure(error.localizedDescription)
            }
        }
    }

    func writeData(object: DataAcc) {

        do {
            let realm = try Realm()
            try realm.write {
                realm.add(object)
            }
        } catch let error as NSError {
            print("Data Acc Write Error: ", error.localizedDescription)
        }
        checkData()
    }

    func checkData() {
        do {
            let realm = try Realm()
            let accSize = realm.objects(DataAcc.self)
            if accSize.count > size {
                if status {
                    status = false
                    print("Should Upload Here")
                    self.prepareData(data: accSize)
                }
            }
            print("Size Is: ", accSize.count)
        } catch let error as NSError {
            print("Error calcualte size: ", error.localizedDescription)
        }
    }

    func prepareData(data: Results<DataAcc>) {

        let deleted = List<DataAcc>()
        var sending = [[String: Double]]()

        for i in 0..<size {
            deleted.append(data[i])
            sending.append([
                "timestamp": data[i].timestamp,
                "z": data[i].xPos,
                "y": data[i].yPos,
                "x": data[i].zPos,
            ])
        }

        print("Before Sending", deleted.count)
        print("Before Sending", sending.count)

        uploadData(deleted: deleted, sending: sending)

    }

    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })

        // TODO: This should excute when the request is finish

        self.clearData(deleted: deleted)

    }

    func clearData(deleted: List<DataAcc>) {
        do {
            let realm = try Realm()
            try realm.write {
                realm.delete(deleted)
                print("Data has been deleted")
            }
        } catch let error as NSError {
            print("Error Delete Data: ", error.localizedDescription)
        }
    }

@ahmedsafadii The recommended way to go would be Realm Sync instead of doing it manually yourself.
Have you had a chance to look into that?

@ahmedsafadii In addition to the above posts an the recommendation to look into Realm Sync as the recommended way to go I have created a solution for your situation in case you want to keep this one:
https://github.com/DominicFrei/Playground/blob/realm/realm-cocoa/issues/7028/Tests/PlaygroundTests/PlaygroundTests.swift
Important notes:

RealmSwift.List is not meant to be used as a list of objects like an array, set, etc. It is meant to be used as a reference to other Realm objects within a Realm object.
As shown in my example you have to use ThreadSafeReference on the Realm objects you want to pass to another thread and then solve them their before using them.

@ahmedsafadii In addition to the above posts an the recommendation to look into Realm Sync as the recommended way to go I have created a solution for your situation in case you want to keep this one:
https://github.com/DominicFrei/Playground/blob/realm/realm-cocoa/issues/7028/Tests/PlaygroundTests/PlaygroundTests.swift
Important notes:

RealmSwift.List is not meant to be used as a list of objects like an array, set, etc. It is meant to be used as a reference to other Realm objects within a Realm object.
As shown in my example you have to use ThreadSafeReference on the Realm objects you want to pass to another thread and then solve them their before using them.

@DominicFrei
I will give it a look for the realm sync
for your example, it didn't work
    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        let threadSafeObjects = deleted.map{ ThreadSafeReference(to: $0) }

        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            DispatchQueue.init(label: "queue1").async {
                let realm = try! Realm()
                try! realm.write {
                    threadSafeObjects.forEach { (threadSafeObject: ThreadSafeReference<DataAcc>) in
                        realm.delete(realm.resolve(threadSafeObject)!)
                    }
                }
            }
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })
    }

I have this error
2021-01-07 22:03:40.027594+0300 Eco Capture[397:23273] *** Terminating app due to uncaught exception 'RLMException', reason: 'Realm accessed from incorrect thread.'
*** First throw call stack:
(0x1b05e99d4 0x1c3f9ab54 0x105efdb6c 0x105efda90 0x105efdbec 0x107c96344 0x107c962a8 0x1045bb7d8 0x1045bb7fc 0x1b40fc360 0x1b4083610 0x1045bbf74 0x1045baa04 0x1045bd9d0 0x107c6b814 0x1045bbde0 0x104586a10 0x107f27ce4 0x107f29528 0x107f305ac 0x107f31234 0x107f3ca5c 0x1f6c4a5a4 0x1f6c4d874)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'RLMException', reason: 'Realm accessed from incorrect thread.'
terminating with uncaught exception of type NSException

@DominicFrei
I will give it a look for the realm sync
for your example, it didn't work
    func uploadData(deleted: List<DataAcc>, sending: [[String: Double]]) {

        let threadSafeObjects = deleted.map{ ThreadSafeReference(to: $0) }

        DataAccManager.shared.dataAccsData(data: sending, onSuccess: { result in
            DispatchQueue.init(label: "queue1").async {
                let realm = try! Realm()
                try! realm.write {
                    threadSafeObjects.forEach { (threadSafeObject: ThreadSafeReference<DataAcc>) in
                        realm.delete(realm.resolve(threadSafeObject)!)
                    }
                }
            }
            self.status = true
        }, onFailure: { error in
            print("Error uploading data", error)
        })
    }

I have this error
2021-01-07 22:03:40.027594+0300 Eco Capture[397:23273] *** Terminating app due to uncaught exception 'RLMException', reason: 'Realm accessed from incorrect thread.'
*** First throw call stack:
(0x1b05e99d4 0x1c3f9ab54 0x105efdb6c 0x105efda90 0x105efdbec 0x107c96344 0x107c962a8 0x1045bb7d8 0x1045bb7fc 0x1b40fc360 0x1b4083610 0x1045bbf74 0x1045baa04 0x1045bd9d0 0x107c6b814 0x1045bbde0 0x104586a10 0x107f27ce4 0x107f29528 0x107f305ac 0x107f31234 0x107f3ca5c 0x1f6c4a5a4 0x1f6c4d874)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'RLMException', reason: 'Realm accessed from incorrect thread.'
terminating with uncaught exception of type NSException

i also try realm sync the same crash @DominicFrei
can you provide an example for my works
Note that the crash only happens when the  completion of Alamofire finish

i also try realm sync the same crash @DominicFrei
can you provide an example for my works
Note that the crash only happens when the  completion of Alamofire finish

for your example, it didn't work

@ahmedsafadii Trying to understand this step by step since your code looks fine at first.
Did you check out the above linked playground (https://github.com/DominicFrei/Playground/tree/realm/realm-cocoa/issues/7028) and ran the test in there?
Did it succeed?

for your example, it didn't work

@ahmedsafadii Trying to understand this step by step since your code looks fine at first.
Did you check out the above linked playground (https://github.com/DominicFrei/Playground/tree/realm/realm-cocoa/issues/7028) and ran the test in there?
Did it succeed?

@DominicFrei yes it works fine, I'm saying that if I enter it inside alamofire request completion only this problem happens

@DominicFrei yes it works fine, I'm saying that if I enter it inside alamofire request completion only this problem happens

@ahmedsafadii Alright, understood. Can you extend my example or create a similar (simplified) one where you use Alamofire and it crashes? I could not reproduce the crash on my side so far.

@ahmedsafadii Alright, understood. Can you extend my example or create a similar (simplified) one where you use Alamofire and it crashes? I could not reproduce the crash on my side so far.

@ahmedsafadii Were you able to reproduce what Dominic mentioned?

@ahmedsafadii Were you able to reproduce what Dominic mentioned?

nop :(, I had to change the library

nop :(, I had to change the library


Triggering a listener of a functional component breaks reactivity in Safari 12.1, if iframe is on the page

Version
2.6.10
Reproduction link
https://jsfiddle.net/ebgj6fra/2/
Steps to reproduce

Access the fiddle
click the "change" button

What is expected?
Hello world! should change to tada!
What is actually happening?
In latest Safari (12.1) on Mac OS, nothing happens, but it works as expected in other browsers.

Removing the iframe from the page makes the issue go away, as seen here: https://jsfiddle.net/ebgj6fra/3/
Seems like maybe there's a difference in how/when the latest Safari runs the flushCallbacks.
Conditionally rendering the iframe (v-if="myExpression !== null), triggering the listener inside a setTimeout or calling $forceUpdate circumvents the issue.

Thanks for the boiled down repro 👌

This issue still exists. Perhaps this should be mentioned somewhere in the Vue docs?
We used this as a fix in our main Vue instance:
mounted: function() {         // Fix for Safari         this.$forceUpdate();  }

That example code seems to work when not within JSFiddle.
I note that JSFiddle has one sandbox flag on the iframe as allow-same-origin.
If I remove the allow-same-origin to treat the code as foreign, then re-run the source, the button then functions as expected.
By removing the allow-same-origin I am referring to inspecting the JSFiddle page source and removing the property.
Im wondering if its tripping up some sort of security?


java.io.IOException: Absolute paths must start with:

Hello.
When click Import Sceneformasset on fbx file.
Error: java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException: Absolute paths must start with: C:\Users\Alexey.AndroidStudio3.2\config\plugins\google-sceneform-tools
P.S. in other system import successful ok.

also getting this for both OBJ and FBX, did you ever found a fix ?

What worked for me:
At the end of the app grade file add:
apply plugin: 'com.google.ar.sceneform.plugin'
sceneform.asset('sampledata/models/model.FBX',
'default',
'sampledata/models/model.sfa',
'src/main/assets/model')
From the gradle tasks run "compileSceneformAssets"
the *.sfa and *.sfb files should be created now.

What worked for me:
At the end of the app grade file add:
apply plugin: 'com.google.ar.sceneform.plugin'
sceneform.asset('sampledata/models/model.FBX',
'default',
'sampledata/models/model.sfa',
'src/main/assets/model')
From the gradle tasks run "compileSceneformAssets"
the *.sfa and *.sfb files should be created now.


Fixes requireCordovaModule on cordova 9

fixes: #78

There is difference between npm version and Github repo

Please merge this PR @tkyaji


BigNumber

Higher level, would be good to have typescript and eslint CI here since there's at least one unsafe array access in here

Definitely. I did copy over the .eslintrc.js from the old project. Maybe need to add that to the CI/CD.


⚠ Anthelion has degraded performance

In 903739c, Anthelion ($ATH) experienced degraded performance:

HTTP code: 200
Response time: 3006 ms

Resolved: Anthelion performance has improved in 3608f7e after 411 days, 20 hours, 13 minutes.


Add drop dashboards example

Description
Provide an example on how to remove grafana dashboards from the stack
Fixes #1604
Type of change
What type of changes does your code introduce to the kube-prometheus? Put an x in the box that apply.

[ ] CHANGE (fix or feature that would cause existing functionality to not work as expected)
[ ] FEATURE (non-breaking change which adds functionality)
[ ] BUGFIX (non-breaking change which fixes an issue)
[ ] ENHANCEMENT (non-breaking change which improves existing functionality)
[X] NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry
Please put a one-line changelog entry below. Later this will be copied to the changelog file.

None

Closing in favor of https://github.com/prometheus-operator/kube-prometheus/pull/1657


AccountInfo class has incorrect definitions

This line: https://github.com/hashgraph/hedera-sdk-js/blob/16005a679856b2ff2ce9e492faa7fb47633a46e7/src/account/AccountInfo.js#L22
Querying https://mainnet-public.mirrornode.hedera.com/api/v1/accounts/0.0.484746 returns the following data:

As you can see, 'accountId' is actually being returned as 'account'

@teacoat There is no requirement for the SDKs to be consistent with the mirror node or vice versa. The current SDK API with returning accountId is the correct one, and it is what the other SDKs follow as well.


[spring-cloud-data-flow] ERROR 1130 (HY000): Host '<IP_ADDRESS>' is not allowed to connect to this MySQL server

Is this a request for help?: Yes

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Version of Helm and Kubernetes: Rancher v2.1.7 (Helm v2.10.0-rancher5)
Which chart: spring-cloud-data-flow:2.0.0
What happened: Skipper failed to run properly
What you expected to happen: Skipper should be set up correctly
How to reproduce it (as minimally and precisely as possible):
I have Rancher 2.1.7 installed on a bare metal machine. The chart was installed with the following parameters:
rbac.create=false
server.service.type=NodePort
The chart installs, and everything except Skipper seems to be fine.

When I inspect the logs of the failing container, I see this: ERROR 1130 (HY000): Host '<IP_ADDRESS>' is not allowed to connect to this MySQL server
Can someone explain why I am unable to connect to the mysql database? I would expect the database permissions to be set up properly.
Anything else we need to know: Not really, but feel free to request information.

@chrisjs Hey, I filed this ticket a while ago, and it automatically closed. I am still experiencing this issue when I install SCDF on Rancher. I was wondering if you had any suggestions for fixing it. Currently, the error says ERROR 1045 (28000): Access denied for user<EMAIL_ADDRESS>(using password: YES) for a configuration with
---
  server:
    service:
      type: "NodePort"
  kafka:
    enabled: "true"
  rabbitmq:
    enabled: "false"

i wasn't assigned / @'d until now, so went unnoticed. i see two different errors posted in this thread.

have you tried deleting & purging the helm release, then reinstalling?
have you decoded the secret created for the database and tried connecting to it via a DB client?
we are currently at chart version 2.2.1, your issue indicates 2.0.0. have you tried using the latest chart?
have you tried this on say minikube? i've never tried rancher, but something you may want to rule out..

if none of the above work, please send the current chart version your using, the command used to install the chart and any custom variables you are setting and/or any changes made to the chart. i can then try to reproduce

Hey, no worries. I wasn't sure if I should tag someone.
I eventually got it working. I had to do two main things:

Manually supply a password through the configuration.
Drop the entire Skipper database from mysql and restart the pod it runs in.

The first part allowed Skipper and SCDF to connect to the database. The second part was because skipper was complaining about the flyway versions being incorrect. I am not an expert on why this is required, but it may help someone else someday. Here is my final configuration (with secrets changed obviously):
---
  server:
    service:
      type: "NodePort"
  kafka:
    enabled: "true"
    kafkaPassword: "abc123"
  rabbitmq:
    enabled: "false"
  mysql:
    mysqlRootPassword: "abc123"

Hello ,
I occured the same issue when installing SCDF , I have a mysql connection error
java.sql.SQLException: Host '<IP_ADDRESS>' is not allowed to connect to this MySQL server
Version of Helm and Kubernetes: Rancher v2.3.5
Which chart: spring-cloud-data-flow:2.3
What happened: Skipper failed to run properly
has someone any Idea of this Problem ?

Unfortunately, I never figured this out. Wish I could be more helpful. Good luck!

Unfortunately, I never figured this out. Wish I could be more helpful. Good luck!

I ll try to test your solution But If you can give me more details about how you drop the skipper database ?


Spec fixes

Description of change
Fix specs now that subdomain of local_authorities is enum:

Avoid local_authorities with duplicate subdomains in factories.
Set ripa as default hose.

Story Link
https://link-to-issue

Closing so github actions doesn't keep running the specs twice!


aconcli: Added support for 'Finalize' interface

This is included into #89, so close without merge.


Updated adapter and general concept documentation pages

Signed-off-by: Michael Zhou<EMAIL_ADDRESS>Description
Updates adapter and general concept documentation pages by fixing typos and associated mistakes.
This PR fixes #
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

🚀 Preview for commit d2c88a8769e5871c088e1913391e9c1628f641ea at: https://635b8d970f9f10060d989b3d--meshery-docs-preview.netlify.app

Great attention to detail @michizhou, 😍


Undo functionality

The customer should have possibility to click and undo button to get the card from the edges to the center.
Not sure if this should be totally part of this library or just provide some functionality to achieve it.

Hi @Diolor thanks for the awesome library! Saved me tons of time!
I was wondering, what is the ETA on this functionality? I need it, so if it is low prio for you / don't have the time to do it, I'll get started on it myself. Otherwise I wait so that we are not doing the same thing :)

Hi @boylenssen . I plan this to be part of the v2. I have not started working on it yet. I prioritize first the card directions and then this feature. You may take a look on v2 branch

Hey I have already added a quick hack for undo functionality.

@NehaDhanwani , can you please share the undo functionality.

Thanks @NehaDhanwani, @others: try below in your undo function:
            adapter.notifyDataSetChanged();             flingContainer.removeAllViewsInLayout();             flingContainer.forceLayout();


Fix the OS build

The cascadia/ directory straight up isn't checked into the OS. So adding a test dependency on code in there was a BAD IDEA.

It's gonna be 5pm here before the CI finishes spinning so @DHowett just, do what you gotta do

@msftbot merge this in 1 minute


Missing transparency in sway workspaces widget buttons

I have transparency set on the background of waybar, however for some reason the buttons on the sway/workspaces widget don't display it correctly:

My CSS:
@define-color background alpha(@color0, 0.8);
@define-color inactive darker(darker(@foreground));
@define-color active darker(@foreground);

window#waybar {
  border-radius: 10px;
  background: @background;
  color: @foreground;
}

#workspaces button {
  padding: 5px;
  color: @inactive;
  margin-right: 5px;
  background: @background;
}

#workspaces button.active {
  color: @active;
}

#workspaces button.focused {
  color: @active;
  background: @background;
}

#workspaces button.urgent {
  color: @color0;
  background: lighter(alpha(@active, 0.8));
}

#workspaces button:hover {
  background: @background;
  color: lighter(@active);
}

Wait, the buttons do become transparent if I reduce the alpha value, they're just less transparent than the rest of the bar, for some reason.

Oh, it's just the transparent button background overlaid on top of the transparent module background, setting alpha on the button background to 0 fixes it.


How does Magnus, Rutie, uniffi-rs differ

I am on the search for tools to replace some ruby code with rust. (after mangling around with an external golang based service and all the mess those micro-service-approaches bring up)
So i came across different how-tos like writing rust gem from scratch, how to use rust with ruby and i am bit puzzled about which way to go, also since i am learning rust along the way.
I understand that one should not pass arbitrary ruby objects into the rust-black box, but instead keep the interface small and clean. Besides the memory problems that can arise, this also to reduces the amount of translation-methods. With those, comes my question are there any advantages of using one or the other lib? They all seem to abstract the C-level wrapping.
After taking a dive into uniffi-rs and generating one of their examples, their approach to build ruby code based on templates and a general udf description seems pretty slick.
In the second mentioned article above the author talks about running rust outside of the ruby gvl, how does magnus deal with such?
I hope my questions are not to dummy, but there are quite some moving parts to figure out. A general info about the pros & cons of each approach could really help.

Hey, sorry for taking so long to get back to you on this.

There’s two core ways to get Rust and Ruby talking to each other.

Use Rust’s ability to call C functions to call Ruby’s C API
Use Rust’s ability to export functions with a C ABI to allow Ruby (via the Ruby FFI gem) to call Rust

With the first you get to use all the features of Ruby, objects; classes; calling methods; etc. It’s just a bit clunky because you’re using those features from a foreign language.
The second you can only use the C ABI, so functions, pointers, ints, floats, and C-style strings. You’d then probably want to write a bunch of Ruby code to wrap those functions in a more Rubyesque API.
The straightforward approach to the first would be to directly use the Ruby C API via the rb-sys crate. This is what the “Writing a Rust gem from scratch” post does. This can end up being quite a lot of work, Ruby’s C API was designed for C, so it’s a bit of a chore to use from Rust and gives you plenty of ways to shoot yourself in the foot.
Both Rutie and Magnus take the first approach to the next level, wrapping the raw C API in Rust concepts, making it easier to use, and harder to make mistakes.
My massively bias opinion is that the way Magnus does this is nicer than Rutie, the biggest benefit being the automatic type conversions Magnus does for you, so you can write methods with Rust types and errors and have Magnus do all the conversions to Ruby objects and exceptions. The other bit difference is where things can go wrong Magnus makes it very clear to you that there is the possibility of failure, whereas Rutie is happier to assume the happy path. This makes Magnus a little harder to use in some places (but also makes it easier to spot mistakes earlier).
I’ve not seen it before, but from a quick skim, it looks like uniffi-rs is taking the second of our two core approaches, but automating writing a lot of the wrapping Ruby code for you. This looks like a nice approach when you also want to generate binding for other languages too.
My concerns with the uniffi-rs would be, FFI performance generally doesn’t match Ruby’s C api, particularly doing lots of smaller calls. So I’d want to check that makes sense for my use case. The other worry would be how well their generic udf format matches my use case. How much of Ruby’s feature set does it map to? What parts of that feature set do I want to use?

Currently Magnus doesn’t expose any functions to release the Ruby global variable lock. This feature of Ruby’s C api is very very hard to use correctly, so it needs a lot of careful design to expose it in Magnus and be able to give the kind of “if it compiles it works” guarantees that Rust developers are used to. This is on the roadmap.

Thanks a lot for taking your time for this explanation! Maybe it could reside somewhere more visible, e.g. within an FAQ section of the readme.
Your concerns about uniffi-rs where also the things I thought about when reading the code.


Update ES About Page

Removed markdown in certain areas because it was not being correctly converted into styling.
Pull Request checklist
Please review the below PR requirements:

Build was run locally and any changes were pushed
Ensure that the title clearly describes the changes
Issue to be referenced in the PR description rather than in the commits or PR title
Clean commit history

Merging this as it's just text.


[BUG] [virus warning]

Hi, I just opened up the app and it was grabbed and flagged by AVIRA antivirus.
what is going on???
this should not be happening.
kindly check your side of things immediately.
thanks
Dan

Antivirus wants me to restart the system so thorough cleaning can be done.
WTH??? this looks serious.

I think this is a false positive.
You can confirm by compiling the code on your end and seeing if the resulting exe is flagged.
https://www.virustotal.com/gui/file/a56c57c9fe86bcee6fb976b30ded461d93225a2fa27612da87b485bc2d6cbee1/detection
Here it's flagged by Cynet but not by Avira.
I will add a Github Action to build it in the cloud, which should have no virus, so if it still does, then it must be a false positive.

Please check if the Artifact at the bottom of this page still registers as having a virus:
https://github.com/RupertAvery/DiffusionToolkit/actions/runs/7611424082

Is there any description why it was flagged, e.g. what Drop.Win64.MemTaskProcess... is all about? I can't seem to find any information about it.
I have submitted the build as a false positive report to Avira, but I don't know if/when they will act on it

ok 1.5 and this one gave defender smartscreen warning.
i understand this is expected sometimes in these quick builds.
going ahead with running this.
fingers Xed.

ok. so far so good.
loving this one redesign.
1 request.
make FIT to PREVIEW as CTRL+F instead of the longer CTRL+SHIFT+F.
because we are mostly viewing images more that we are using filters. so it is better if filters get the longer click shortcut.
or maybe let us have the custom HOTKEYS so we can make them as we see fit.
(plus a reset settings or default button, just in case)
Few things to note:
A. there was few files where toolkit was not able to display PNGinfo of a PNG file but i was able to see the info on same file on PNGCHUNK.com
(the info was in json format, visually to me as i recall. I am not a dev, just an artist so very limited understanding, apologies!)
B. plus some JPG files with metadata was also not visible but i was able to view that data in a windows app called (IMAGE glass)
it is an image viewer.
C. Some PNG files had all the information of MODELS and other things in the PROMPT section visible but TOOLKIT said MODEL name or NEGATIVE prompt as : NOT FOUND.
(it was right there in the prompt. TOOLKIT dumped everything in the prompt section
REQUESTS:
Few more things (coming to my mind right now) that can be done here is to:

let us go to the image view from PROMPT thumbnails.
we see thumbnails using prompts  (CTRL+6) but we can't view the images in full view as in image viewer, which is a needed thing. (understand the usage: we search a prompt, we found few related files, now what? we can't view generation settings or those images in details. if this is not implemented then it makes the prompt search almost useless and annoying.
i mean we can see the small thumbnail images, we can copy the generation data, and other things at RIGHT click but we can't view the data or the image. we need to view the data and images as we do them on the image viewer from the prompt view too because we want to enjoy images, explore and ponder at data to plan to generate new images.

some way to change or add metadata or extract metadata from HTML files.
(I use FOOOCUS and PlaygroundAi.com which store the metadata or PNGinfo into the HTML instead of embedded into files.)
each file name is listed along with its prompt and generation settings. there is a clear and visible pattern that can be used easily to extract information from the HTML file and show the info along the image file in TOOLKIT.

use some DESCRIBE tools like midjourney or stablediffusion to recreate the possible PROMPT for images that do not have any prompts.

new ISSUE:
A. i accidently pressed ALT+left arrow and now everything went BLANK and just showing
**Hash:
SHA256: **
clicking on PROMPTS or ALT+TAB multiple times brought it to normal.
B. If i search something, the images are shown but in a ZOOMED up way and only left side of the image.
if I try to zoom out the image goes out of the frame and nothing is visible anymore.
also, the full image view (preview) is keeping the image cut off to the right.
to view the image, i have to double click the image to view in FULL SCREEN view. but i can't from the normal main window GUI.

anyways, so far, no flagging by the antivirus.
please consider my suggestions as i believe they will make the user experience of the TOOLKIT better.
u are awesome.
cheers
Dan

checking for update also triggered the antivirus.
I hope there is something that can be done.
i recommend that you send your app to all the major antivirus software so that they do not keep flagging it.


Can't update the device type via inventory.json

Describe the bug
We are trying to set the device type in the inventory.json of thin-edge.io alongside other fragments. E.g.
{"type": "PumpAgent", "name": "inventoryname", "someothefragment":{}}
Expected behavior
The expected behaviour is that the type behaves here like all the other fragments on the device, i.e. that the type info from the inventory.json is used for the ManagedObject in Cumulocity.
Observed behavior
The type is ignored, instead it looks like the tedge config for device.type is always used instead.
As the inventory.json is more specific, I would have expected the entry there to take precedence
Screenshots

Environment (please complete the following information):

Ubuntu 22.04
thin-edge.io version [e.g. 0.10.0]

Thanks,
Mario

Thanks @anonymosh for creating the ticket. I wouldn't necessarily class it as a bug, but I can understand the use-case as keeping all of the inventory settings in one file is more convenient rather than setting some setting via tedge.toml and via inventory.json.
@anonymosh In the event that the device type is set in both the tedge.toml and the inventory.json, then is it ok if the inventory.json value is used?

Yep, I think that would make the behavior more consistent. ( that is inventory.json being more specific and therefore taking preference)


Update 01-about-stake-pools.mdx

Remove duplicated paragraph

this is a duplicate.

Closing as duplicate


Add Unit testing

Since I consider UT to be so cool, let's add it

Site works fine, let's merge! 🎉


Revert "Recursively manage the contents of dbpath directory"

This reverts commit b9f97ea571f55ed18439d2f9363f4747ae219f18.
This commit broke idempotency:
/Stage[main]/Mongodb::Server::Config/File[/var/lib/mongodb/journal/j._0]/mode: mode changed '0600' to '0755'
Also, the motivation wasn't clear enough in the commit message to
understand why we need to manage the content of dbpath.

It sounds like there is an attempt to fix it here:
https://github.com/puppetlabs/puppetlabs-mongodb/pull/315
I ran a recheck on Travis to see if CI now pass. I'll also test it manually.

Fixed by https://github.com/puppetlabs/puppetlabs-mongodb/pull/339


Feed exclusion by relation. today takes {startOf: "week"} etc

There is no help text for "Exclusion where" under "Row restrictions" when configuring a feed view.  Would really like to, but not sure how to use this feature.


Convert element2index and Zav_of_te to Python

Use the zav_of_te function already in Python, remove old function from Fortran.
Convert element2index to Python

Codecov Report
Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 27.21%. Comparing base (266891f) to head (fe794e6).

Files with missing lines
Patch %
Lines

process/impurity_radiation.py
60.00%
2 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3375      +/-   ##
==========================================
+ Coverage   27.20%   27.21%   +0.01%
==========================================
  Files          76       76
  Lines       17779    17785       +6
==========================================
+ Hits         4837     4841       +4
- Misses      12942    12944       +2

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Add back the predict tests

(I managed to fail at git commit --amend)

Coverage increased (+0.5%) to 83.151% when pulling 581d5615997d80902d186304330b5bfae3ad882d on rust-av:remove_internal_aom into ebbc851fb0e3badc03cc5b866154c55a48db047f on xiph:master.


Tutorial for memcached-operator with oria-operator

Tutorial for memcached-operator with oria-operator

/hold


Error: Failed to max GPU frequency!

Hi!
Great work with the fan, it works for me fine but I always get these errors on startup:
ubuntu python3[4733]: Maximizing clock speeds with jetson_clocks
ubuntu python3[4733]: /usr/bin/jetson_clocks: line 316: : No such file or directory
ubuntu python3[4733]: /usr/bin/jetson_clocks: line 317: : No such file or directory
ubuntu python3[4733]: Error: Failed to max GPU frequency!
ubuntu python3[4733]: Setup complete.
ubuntu python3[4733]: Running normally.
Would you have any  advice on how to resolve them?
Cheers!

this is the overclock via jetson_clocks.
If you don't have jetson_clocks installed, the easiest way to get rid of the error message is to set "MAX_PERF":0 instead of "MAX_PERF":1
in /etc/automagic-fan/config.json
I think it normally comes pre-installed on the jetpack OS, so unfortunately if you don't have it I can't really tell you how to install it.


gh-i: 0.0.7 -> 0.0.8

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/gennaro-tedesco/gh-i/releases.
meta.description for gh-i is: Search github issues interactively
meta.homepage for gh-i is: https://github.com/gennaro-tedesco/gh-i
meta.changelog for gh-i is: https://github.com/gennaro-tedesco/gh-i/releases/tag/v0.0.8
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.0.8 in filename of file in /nix/store/aq7cyxpnvn221zkw2b2dn685vg570dck-gh-i-0.0.8

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

gh-i

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/aq7cyxpnvn221zkw2b2dn685vg570dck-gh-i-0.0.8 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A gh-i https://github.com/r-ryantm/nixpkgs/archive/c1aafecb92d23f0ea76116d4d169d661f9aafd74.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/c1aafecb92d23f0ea76116d4d169d661f9aafd74#gh-i

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/aq7cyxpnvn221zkw2b2dn685vg570dck-gh-i-0.0.8
ls -la /nix/store/aq7cyxpnvn221zkw2b2dn685vg570dck-gh-i-0.0.8/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

gh-i

Maintainer pings
cc @phanirithvij for testing.

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

@NixOS/nixpkgs-merge-bot merge

@NixOS/nixpkgs-merge-bot merge


CLI for Covalent

Description
Covalent CLI (Command Line Interface) for running e2e coverage utility and common ng and node and tslint commands.
What's included?
Usage: cov [options]
Options:
-v, --version     output the version number
versions          output all the covalent versions in a npm project
gen-e2e-report    generate the e2e coverage report
start-e2e-proxy   start the e2e proxy
e2e-for-coverage  runs the end to end tests against the e2e proxy
serve             starts the ng server
serve-e2e         starts the ng server with flags needed to run e2e coverage
e2e               runs the end to end tests against local code base
lint              runs the linter
test              runs the unit tests
build             builds the code
-h, --help        output usage information

Test Steps

[ ] Checkout branch
[ ] npm i
[ ] npm run build
[ ] npm install -g
[ ] Run through the Readme (docs/CLI.md) for CLI Usage sections:
[ ] Help usage
[ ] Versions
[ ] ng Commands
[ ] tslint
[ ] Run through the Readme (covalent-e2e-coverage/README.md) for e2e testing coverage, can try this against appcenter repo or hybrid cloud

Screenshots or link to StackBlitz/Plunker

i'm not sure that -V and -v are the best UX.  It's a bit confusing, and the defacto standard is small v (-v) for version.  Maybe have -v as version and remove -V altogether and just have the long form flag available.

similary, with -g -s and -e just not sure the usefulness of having the short form flags.

thanks for code review @ilsiepotamus
Pushed changes based on review


TypeError: undefined is not an object (evaluating 'l.sendTransaction')

Is there an existing issue for this?

[X] I have searched the existing issues

RainbowKit Version
1.3.0
wagmi Version
1.4.7
Current Behavior
Get a error when signing transaction.
Expected Behavior
Re-direct to metamask to sign transactions.
Steps To Reproduce
No response
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
I'm sure the tx is correct and  works fine on desktop.

UPDATE: I updated my metamask app to the latest version, and disconnected my wallet. Connected again and tried sending transaction but this is what I get. Is it only wallet connect that's supported ?

Latest version is  @rainbow-me/rainbowkit": "^1.3.6" ?

@IbrahimSam96 Can you share a small reproducible example ? Also is it possible for you to upgrade to RainbowKit v2 ?

Updated to V2:
    "@rainbow-me/rainbowkit": "^2.0.0",
     "viem": "^2.7.12",
    "wagmi": "^2.5.7"

Still get same error. I just want to be able to sign any transaction from my phone.

@IbrahimSam96 Can you share a small reproducible example ?
I can't reproduce this on my end. Please send the RainbowKit and wagmi configuration setup + the code where you're signing the transaction.

Signing Transaction
const transactionHash = 'W3siZGF0YSI6IjB4MDk1ZWE3YjMwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA2Zjc3NjA1MWNlMmQzMDFiODA1YjkzZWFkMjc4YTk5NmE5Njc0Y2JlMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDE0N2QzNTcwMCIsInRvIjoiMHhDQjJCMjc3ZjQ1ZjA3NUYwOGNCNDRGOTFCYTMwM0ZCQjEwNjU2RTk1In0seyJkYXRhIjoiMHgyMDc3YzU0YmM0NzYwMzkyMzIxZGEyNzI4MjhmMDgwMzRlOWNiODJiZGIwMWY2MzQ3NGUzMzlkNmNhY2ZkMTJiYzNlOWMwZjIyMTkzMThmMTY3NTk1ZGRkYzliYmU4ZWNiMWNkMGNmMTVjYjNmODJmMDYxMDUxZDAxZGM0OTRkZTA2MzAwNTY0Mjc3MTE3MmJkMDdkNzI0ZjFjZTI5MWIzMzRkNjBlYTQxOTk4MjA1MjYyYmJlNGQwOWIwNTFjMDUwMzk4NmZhOTA1Y2M1OTU3MjBiYzdmZGRlNGQwMjU3YTdlYWE1YTY3NGJhOWJiYTk1MGRmMDM1YjM4MTJlZGRiYTdmNjE4MTcxMDQ3YjczMmE0YzEwNTlmMGZjNjZhYmEwOTI0OWRlMjA1MTJjOTI2MGMxNGU0YmIwZmIyZmU5ZjQwNzU0MWY4MmYwYzdjZTJmNDFjMmM2NjA4N2MxNzkzYzg3NjZmYzhlMjkyMjY2N2MwMzFlZTBkOWI1MGJhMDZiNzk2YjA3ODE2N2U0NDMwOGRjMzVjNTI3YTQ5ZjVlNWE1MmVkOTgxZjI1OGY4Yzg3NGM5MDllYzNjM2RiMjU1MDQ3ZWU0ZWEyZDAxYjg2YmYxNDc2MzRmNTVkMDIzOGViNWI4YTIxNjM1YjIyNjcyZjljNjE4ZjEwOWI1MTU0ZTBjOTQ3NjI0MGY0ZDJmYjg1NTFiZjIwMzMwZmVmM2QyNjBlOTA4YjgyNDYxYzUwNWUyN2Q4M2U3MWFkZDc4YjYxY2NlODMxNTI5NzE5Njg5NGE1MTU3YmVhMWM0NjYxMzgwNTZhZjg1ZWM0OTM3M2QzN2JlNjEwMzA1ZjE1NDQyMTJiNzAwYmEwMjc3YWI4NjFkYzYyNjJkM2RlYWQ2MDI2OTJhZWU2ZDg0NTk5ZWZmMzIxYzYxZGM5YWQ3NDlkMmJiYTQ3NGZhIiwidG8iOiIweDZmNzc2MDUxQ2UyZDMwMWI4MDViOTNlYUQyNzhBOTk2QTk2NzRjYkUiLCJ2YWx1ZSI6IjAiLCJnYXNMaW1pdCI6IjUwMDAwMCJ9XQ='
const decodedTx = Buffer.from(transactionHash, "base64").toString("utf-8");
const serializedTransaction = JSON.parse(decodedTx);

                    await walletClient.sendTransaction({
                        ...serializedTransaction[1],
                        account: wallet.address!,
                        chain: avalancheFuji,
                    }).then((tx) => {

})

Rainbowkit and wagmi configuration setup
import * as React from 'react';
import {
    darkTheme,
    RainbowKitProvider,
} from '@rainbow-me/rainbowkit';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { WagmiProvider, http } from 'wagmi'
import { getDefaultConfig } from '@rainbow-me/rainbowkit'
import {
    avalancheFuji
} from 'wagmi/chains';

const config = getDefaultConfig({
    appName: 'MegaWeapon - Ludex',
    projectId: '52a2dd0d9df4662c8ebee5de93f9770c',
    chains: [avalancheFuji],
    transports: {
        [avalancheFuji.id]: http(),
    },
})
const queryClient = new QueryClient()

export function Provider({ children }: { children: React.ReactNode }) {

    const [mounted, setMounted] = React.useState(false);
    React.useEffect(() => setMounted(true), []);

    return (
        <WagmiProvider config={config} >
            <QueryClientProvider client={queryClient}>
                <RainbowKitProvider theme={darkTheme({
                    accentColor: '#7b3fe4',
                    accentColorForeground: 'white',
                    borderRadius: 'small',
                    fontStack: 'system',
                    overlayBlur: 'small',
                })} >
                    {mounted && children}
                </RainbowKitProvider>
            </QueryClientProvider>

        </WagmiProvider>
    );
}

@IbrahimSam96 It looks like you're crossing a few wires with Viem actions and Wagmi hooks. With Wagmi, you'll typically want to rely on Wagmi's React hooks (which use a Viem walletClient under the hood). This is the dev UX the WagmiProvider is designed around.
Try setting up your signing routine like this, and reference the docs here:
import { useSendTransaction } from 'wagmi'
import { parseEther } from 'viem'

function App() {
  const { sendTransaction } = useSendTransaction()

  return (
    <button
      onClick={() =>
        sendTransaction({
          to: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
          value: parseEther('0.01'),
        })
      }
    >
      Send transaction
    </button>
  )
}

If you're still seeing an issue, this is likely a problem with Wagmi and outside of the scope of RainbowKit, so try to open an issue with them here

Try setting up your signing routine like this, and reference the docs here:

Thanks for referring me to the docs.
This signing routine is for sending value to a wallet.  In my case, I'm tryna send an unsigned populated transaction.

@IbrahimSam96 It looks like you're crossing a few wires with Viem actions and Wagmi hooks. With Wagmi, you'll typically want to rely on Wagmi's React hooks (which use a Viem walletClient under the hood). This is the dev UX the WagmiProvider is designed around.

WOW this worked fine for me. Replacing walletClient.sendTransaction from viem with sendTransaction from wagmi.


cargoNextest: default doNotLinkInheritedArtifacts to true

Motivation

I ran into this error when updating crane in nix-init
error: output file /build/source/target/release/deps/libcfg_if-77e05c14db152ae0.rmeta is not writeable -- check its permissions
error: could not compile `cfg-if` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
error: output file /build/source/target/release/deps/libunicode_ident-b898913f0583b713.rmeta is not writeable -- check its permissions
error: could not compile `unicode-ident` (lib) due to previous error
error: output file /build/source/target/release/deps/libautocfg-75cf3ebdb83349e2.rmeta is not writeable -- check its permissions
error: could not compile `autocfg` (lib) due to previous error
error: output file /build/source/target/release/deps/libpkg_config-3b05c32a2d82ba84.rmeta is not writeable -- check its permissions
error: could not compile `pkg-config` (lib) due to previous error
error: output file /build/source/target/release/deps/libversion_check-712139cd5c88007d.rmeta is not writeable -- check its permissions
error: could not compile `version_check` (lib) due to previous error
error: output file /build/source/target/release/deps/libonce_cell-e6fc23961df30ba1.rmeta is not writeable -- check its permissions
error: could not compile `once_cell` (lib) due to previous error
error: command `/nix/store/lr1r376f6za0pm5warmn2kxak4bl7pay-rust-nightly-default-2023-06-29/bin/cargo test --no-run --message-format json-render-diagnostics --profile release --no-default-features` exited with code 101

Checklist

[ ] added tests to verify new behavior
[ ] added an example template or updated an existing one
[x] updated docs/API.md (or general documentation) with changes
[x] updated CHANGELOG.md

I imagine this would only happen if cargo decides to rebuild things (if everything is up to date it shouldn't need to mutate anything...)
I'm curious, do you happen to have different build flags between the cargo nextest invocation and whatever built its cargoArtifacts?

I did override cargoLockParsed, that's probably why, thanks for the pointer


Export and Import endpoints

Description

[x] Export endpoint to export organization with all dependent resources
[x] Filtering of resource which are not included in export
[x] Import endpoint to create one or more organizations with all dependent resources

Acceptance criteria

[x] Data can be exported in ZITADEL instance
[x] Data can be imported in ZITADEL instance

@stebenz can this be closed?