plugins mergeStrategies are ignorred

Describe the bug
Because of this line:
mergedConfig.plugins = [...conf1ExceptConf2, ...webpackConfig2.plugins];
in webpack-config-merger.ts, it seems that regardless of the mergeStrategies, the plugins from the custom webpack config are always appended to the end of the plugins list.
To Reproduce
Steps to reproduce the behavior:

with this setting:
            "customWebpackConfig": {            "path": "./extra-webpack.config.js",            "mergeStrategies": { "plugins": "prepend" }          },
and a minimal  extra-webpack.config.js
var ngAnnotatePlugin = require('ng-annotate-webpack-plugin'); module.exports = { plugins: [  new ngAnnotatePlugin() ] };
The pluggin is still appended to the end of the list of plugins, after angular compiler plugin

Expected behavior
The plugin should find its place in the array according to the merging strategy
Builder:
"@angular-builders/custom-webpack": "^7.1.1"
Libraries
"@angular-devkit/build-angular": "^0.11.4",

Hi, thanks for the report.
To be honest I did it in purpose because I couldn't think of any case when the order of plugins matters. Could you please provide an example for such a use case?

Thanks for the quick reply.
I'll try to describe my use case:
I have a hybrid angular-angularjs project that loads a bunch of js files via the scripts array in angular.json.
Those files are not required from inside the main code, so they are ignored by webpack.
The way angular bundles them is by itereating over the files in the scripts array and adding a ScriptsWebpackPlugin to process the files.
  ScriptsWebpackPlugin {     options:       { name: 'some name',        sourceMap: true,        filename: 'some-bundle.js',        scripts: [<the actuatl scripts referenced in angular.json>],        basePath: '\som_base\path\ } }
What I would do is for example ng-annotate those files etc, by I need to do it before angular compiles and minifies them,
I'm not really sure that the plugins approach is the correct one here, I may want to try to use loaders instead. I need to find some way to process the scripts array from angular.json.
Many thanks,
Alex

Would you like to propose a change in the README? I'd gladly merge it. Thanks for the insight!


Pending changes exported from your codespace

Thank you for your email.We’ll disposal and reply as soon as possible~Best Wishes~


refactor!: rework results to have parsedOptions property and store true in values for boolean options

See #70 for longer description.
In parse results, minor code changes:

rename flags to parsedOptions
store true in values for boolean options (rather than undefined)

In README, more churn:

as above
update result property descriptions
show all options found in args in parsedOptions, not just boolean options
update -- description to match current implementation
fix one example that got broken in a previous refactor
replace "withValue" with "type:string"
replace "flag" with "option" or " boolean option" as appropriate
other small tweaks to wording

Added the examples in the README to a file so can confirm actual behaviour!

Closing in favour of #83


Connection thread safety?

In the README it says this:
... a single connection cannot be used on more than one thread
But in the documentation for Database.makeConnection() it says:
Creates a new thread-safe connection to the database that can be reused between executions.
Is Connection thread safe or is it not? The fact that makeConnection() is called before each query by defaults suggests that it probably isn't.
Establishing a new connection with the db for each query is wasteful; how can we update Connection to be totally thread safe? I don't have a very deep knowledge of the underlying C library, but based on the docs it looks like it should support multithreaded environments just fine. So which part currently isn't thread safe? cConnection shouldn't ever be mutated so I must be missing something.

The documentation for that method could be a little bit better. I will update it.
Basically MySQL only supports one connection per thread. So if your app is not multithreaded, just create one connection using makeConnection and then pass that as the third parameter to all of your calls. Or, you can make a new connection for each thread and reuse that connection in the thread.
The reason I chose to make a new connection every time by default is because using the same connection on multiple threads will crash with a fatal error. I'd rather have better performance be opt in than risk people's programs crashing if they don't understand how to work with threading properly.

That makes sense. However, I definitely think it's important to support multithreading without having to reconnect constantly. Most web servers written in Swift will be multithreaded, so I'm sure it's a common requirement.
Connection pooling seems like the logical solution. You say that using the same connection on multiple threads will cause a crash... I'm assuming by that you mean unsynchronized access, right? Unless there's something strange about the C library that I'm missing, we should be able to share connections across threads as long as we synchronize it properly. It shouldn't be too hard with GCD. What do you think?

Yes, I do mean unsynchronized access. I agree it should be easy to re-use the same connection, but I also think it should remain the default to create a new connection. Unless we use GCD internally to synchronize access. But I think that is beyond the scope of this simple wrapper.


Simplify cygwin path conversions

As suggested by @Shane-XB-Qian here, the cygwin path conversion code can be simplified by using cygpath.

@yegappan up to you, merge if you felt ok.


Related images taking too long to respond causes SystemExit

Sentry link

https://openverse.sentry.io/share/issue/b4898535c2184d179c3ae2642f6ea429/
Description

It looks like the images/{identifier}/related page will occasionally take too long to load for certain images, and will cause both a gateway timeout for the user and an uncaught SystemExit exception. Here's the stacktrace (I kept the entire thing in case the redundant lines are indicative of something):
SystemExit: 1
  File "django/core/handlers/wsgi.py", line 131, in __call__
    response = self.get_response(request)
  File "django/core/handlers/base.py", line 140, in get_response
    response = self._middleware_chain(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/utils/deprecation.py", line 136, in __call__
    response = response or self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/utils/deprecation.py", line 136, in __call__
    response = response or self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/utils/deprecation.py", line 136, in __call__
    response = response or self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/utils/deprecation.py", line 136, in __call__
    response = response or self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/utils/deprecation.py", line 136, in __call__
    response = response or self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/utils/deprecation.py", line 136, in __call__
    response = response or self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/utils/deprecation.py", line 136, in __call__
    response = response or self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/utils/deprecation.py", line 136, in __call__
    response = response or self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/utils/deprecation.py", line 136, in __call__
    response = response or self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "oauth2_provider/middleware.py", line 36, in __call__
    response = self.get_response(request)
  File "django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/csrf.py", line 55, in wrapped_view
    return view_func(*args, **kwargs)
  File "rest_framework/viewsets.py", line 125, in view
    return self.dispatch(request, *args, **kwargs)
  File "rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "django/utils/decorators.py", line 46, in _wrapper
    return bound_method(*args, **kwargs)
  File "catalog/api/views/media_views.py", line 132, in related
    results, num_results = search_controller.related_media(
  File "catalog/api/controllers/search_controller.py", line 483, in related_media
    results = _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 216, in _post_process_results
    return _post_process_results(
  File "catalog/api/controllers/search_controller.py", line 214, in _post_process_results
    search_response = s.execute()
  File "elasticsearch_dsl/search.py", line 723, in execute
    self, es.search(index=self._index, **params)
  File "elasticsearch/client/utils.py", line 347, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
  File "elasticsearch/client/__init__.py", line 1821, in search
    return self.transport.perform_request(
  File "elasticsearch/transport.py", line 427, in perform_request
    status, headers_response, data = connection.perform_request(
  File "elasticsearch/connection/http_requests.py", line 166, in perform_request
    response = self.session.send(prepared_request, **send_kwargs)
  File "requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
    # Permission is hereby granted, free of charge, to any person obtaining a copy
  File "urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "http/client.py", line 1375, in getresponse
    response.begin()
  File "http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "http/client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "gevent/_socketcommon.py", line 693, in recv_into
    self._wait(self._read_event)
  File "src/gevent/_hub_primitives.py", line 317, in gevent._gevent_c_hub_primitives.wait_on_socket
  File "src/gevent/_hub_primitives.py", line 322, in gevent._gevent_c_hub_primitives.wait_on_socket
  File "src/gevent/_hub_primitives.py", line 313, in gevent._gevent_c_hub_primitives._primitive_wait
  File "src/gevent/_hub_primitives.py", line 314, in gevent._gevent_c_hub_primitives._primitive_wait
  File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
  File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
  File "src/gevent/_hub_primitives.py", line 55, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
  File "src/gevent/_waiter.py", line 154, in gevent._gevent_c_waiter.Waiter.get
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
  File "gunicorn/workers/base.py", line 203, in handle_abort
    sys.exit(1)

Reproduction

This is, fortunately, highly reproducible with the following URL: https://api.openverse.engineering/v1/images/520a3049-afaa-47e7-b060-7928a3b04df9/related/
I wonder if this is perhaps because all of the stored, related images are dead links and so the API is just iterating again and again to try and find some images.

This will be fixed by #2415


[DO NOT MERGE] Python binding / wrapper look and feel

FIXME are the sections that further discussion is desired.
The wrapper is restricted that a lot of interaction with in-process API is pre-defined (i.e. how to handle released TRITONSERVER_Request and TRITONSERVER_Response). The intention is that user shouldn't need to handle object lifecycle explicitly. The lower level binding will also be provided if they want finer control (i.e. reuse underlying objects to avoid alloc/release overhead).
At the end of _server.py is a basic example usage of the wrapper. At the end of _infer.py is an example implementation of allocator.

I don't see the necessary of providing synchronized infer API, user can read from response iterator after async_infer return and it will block until response is ready.

I think that's a valid argument for the C-API but for Python we need to integrate that with asyncIO. Also, I think it is not just the infer API. We probably need async version for all the time-consuming Triton APIs (e.g., load/unload). I'm just wondering whether there is a way to avoid ending up with two async infer APIs (one that uses callback based and another that uses asyncIO). We could provide only provide an asyncIO based async infer API but that would make the sync code a bit awkward. For example, they'd have to run asyncio.run(server.async_infer).
Regarding having multiple models with the same name, I think we can document that all the models with same name would point to the same underlying object or we could also error out if the user tries to load another model with the same name.


chore(master): release 0.38.0-alpha

:robot: I have created a release beep boop
0.38.0-alpha (2024-02-04)
Features

new (5b0fdae)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/mafqla/yalis-blog/releases/tag/v0.38.0-alpha :sunflower:


Finalize homepage design

[ ] Drop content into homepage design (including breakpoints)
[ ] Ensure Rufaro is happy with the copy in situ and proof reads it, for any additional feedback
[ ] Work on finalizing graphics and imagery for homepage
[ ] Work with Jo to build it
[ ] Work with Jo to add/tweak animations & effects

21 Nov - working on branding, mtg with leads scheduled - update to follow

22 Nov - caught up with Rufaro this morning to discuss amended homepage copy. Working to get this into designs and send back any feedback so that Rufaro can send over final copy to Robin / James for a final sign off before handing to dev.

1//24: Shey & Jo pairing up on this today


GGL physical  coordinates

Stacking of GGL in physical instead of angular coordinates.

Basic directory for tests is candide:/home/mkilbing/astro/Runs/UNIONS/ggl-agn/jobs.

Test 1: Comparison of three different ways to compute bg - fg correlations.
Runs of compute_ng_binned_samples.py.
Results in Shen22_and_Liu19_logM_min_7_nz_0_z_0.1_0.8_test_nfg.

treecorr.process (stack=auto)
treecorr.process_cross + treecorr.finalize (stack=cross)
treecorr.process + unions_wl.post-process stacking (stack=post)

Test 2: For narrow redshift range, compare angular and physical stacking.
Runs in Shen22_and_Liu19_logM_min_7_nz_0_z_0.5_0.8_test_physical.
Setting:

Shen22 & Liu19 joint AGN sample
log Mmin/M☉ = 7
z = 0.5 … 0.8
LensFit catalogue + mask

Test 3: Compare measured g_t to theoretical prediction.
Run in Shen22_and_Liu19_logM_min_7_nz_0_z_0.5_0.8_test_physical.
Averaging still to check.

`

Updated code (commit 9e7d03558abcfeb7ff163ee17512e2885dd45888, https://github.com/CosmoStat/unions-shear-ustc-cea/pull/27/commits/9e7d03558abcfeb7ff163ee17512e2885dd45888) seems to work now.


[Feature Request] Variable Class Name Prefix

Great work on the library!
It's making my life much easier, except that I've run into a snag with conflicting CSS names, primarily with the generic "grid" class. I've got a few other libraries which unfortunately also use that name, and it's causing chaos.
Allowing Gridlex to use a class prefix variable would clear off class name re-use issues forever! i.e. gl_grid, gl_col etc...

.grid and .col are now variables. You can change them in gridlex-vars :
@gl-gridName/$gl-gridName and @gl-colName/$gl-colName


Update date-function.md

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

File
Status
Preview URL
Details

Language/Reference/User-Interface-Help/date-function.md
:white_check_mark:Succeeded
View

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


Wallet Demo Tweaks

I had a hard time getting this to work. I may have hit a limit of connected apps. I will ping the discord for Pera on this. When I deleted a few connected apps it was able to connect. I am at 42 connected apps now.
First , user needs to know to have the Pera wallet set to Testnet mode (in developer settings), or it will not connect. That should be listed on the page before the QR code is shown.
One can not read the text behind the QR code. So move the QR code display under the Status.
The connection is listed as Algorand SDK for Unitynitynity with no logo (note the spelling).
After the connection is confirmed, we should display a link to verify the transaction in Algoexplorer.

this is no longer relevant with walletconnect not supported anymore


No longer supported?

That's my assumption based on your blog post not loading.

Does it matter? The library still works.


postgresql_ssl_enabled defaults to False

based on discussion with @benrudolph

:+1: maybe @dannyroberts to confirm?

I'm not super familiar with what changing postgresql_ssl_enabled does on a production environment. Can you describe what'll happen when we deploy this to prod?

postgres will stop using ssl for connections to it over the network if this is set to false. but i believe that's already the case on prod. https://dimagi.slack.com/archives/web-team/p1459324647000130

Cool, thanks. Let's make sure to run this with --check on each instance we have to make sure we're either not changing things or changing things correctly. (I imagine there's a change that needs to happen on both postgres clients like web workers, etc. and in postgres's config itself.)
Good to merge from my side once you've removed the hold off on merge tag.


Add PostgreSQL13 support

For the blob I downloaded https://github.com/postgres/postgres/archive/refs/tags/REL_13_10.tar.gz
wget 'https://github.com/postgres/postgres/archive/refs/tags/REL_13_10.tar.gz'
tar xzf REL_13_10.tar.gz
mv postgres-REL_13_10/ postgresql-13.10
tar czf postgresql-13.10.tar.gz postgresql-13.10
bosh add-blob postgresql-13.10.tar.gz postgres/postgresql-13.10.tar.gz

For me compilation worked as well as migrating existing data from a deployment using v44.
Addresses #61
unfortunately I do not get the acceptance-tests running -.-

Close as the release has been updated


Request: Search only head words, without morphological understanding

Hi. Thanks a lot for Myosotis, it's a great piece of software. Ἐπαινῶ, Γεωργὲ!
I think it would be great to have an option to search only head-words. E.g., typing βάλλομεν or ἔβαλλε will not find βάλλω, only βάλλω, βάλλ or βάλ will do, like searching a normal dictionary.
A different, but similar, suggestion, is to display in the result list only the dictionary entry, e.g. βάλλω, even if I searched βάλλομεν etc., and let the user scroll up and down the dictionary entries, a bit like Logeion.
(I might try to do it myself, but your uncommented code, leaves me quite perplexed for now)
Anyhow, thank you very much!

Hi, thanks for your feedback. Unfortunately, I don't have much time now to improve or document Myosotis, as a quick fix I can suggest replacing similarForms with lemmas on this line:
https://github.com/gebrkn/Myosotis/blob/master/app/js/index.js#L173
This should return a list of root words for the form in the search box.
If you have any further questions, feel free to ask.

Thanks, I'll give it a try.


'Continue L;' statement does not cancel stream subscription

The Dart Programming Language Speciﬁcation version 1.11, chapter 17.15 Continue reads:

Let sc be a continue statement. If sc is of the form continue L;, then let sE
be the the innermost labeled do (17.8), for (17.6) or while (17.7) statement or
case clause with label L enclosing sc . If s c is of the form continue; then let sE
be the the innermost do (17.8), for (17.6) or while (17.7) statement enclosing sc .
...
If sE is an asynchronous for loop (17.6.3), let ak be the set of asynchronous
for loops and yield-each statements (17.16.2) enclosing sc that are enclosed
in sE , 1 ≤ k ≤ m, where a k is enclosed in ak+1 . The stream subscriptions
associated with aj are canceled, 1 ≤ j ≤ m, innermost ﬁrst, so that aj is
canceled before aj+1 .

The following code demonstrates that stream subscription is not canceled:
import 'dart:async';

class WrapStream extends Stream {
  int _id;
  Stream _stream;
  WrapStream(this._id, this._stream);
  listen(onData, {onError,onDone,cancelOnError}) {
    print("listen $_id");
    return new _WrapSub(_stream.listen(onData, onError:onError, onDone:onDone,
        cancelOnError: cancelOnError), _id);
  }
}

class _WrapSub implements StreamSubscription {
  int _id;
  StreamSubscription _sub;
  _WrapSub(this._sub, this._id);
  void onData(d) { _sub.onData(d); }
  void onError(d) { _sub.onError(d); }
  void onDone(d) { _sub.onDone(d); }
  void pause([Future f]) { _sub.pause(f); }
  void resume() { _sub.resume(); }
  bool get isPaused => _sub.isPaused;
  Future cancel() {
    print("cancel $_id");
    var f = _sub.cancel();
    if (f is Future) {
      f = f.whenComplete(() { print("cancelled! $_id"); });
    }
    return f;
  }
  Future asFuture([val]) => _sub.asFuture(val);
}

Stream makeStream(Iterable iterable, int id) {

Stream s = new Stream.fromIterable(iterable);
print("created stream $id");
return new WrapStream(id, s);
}

Future test5() async {
  List<int> log = [];
  int i = 0;
  L:
  await for (String s in makeStream(['a0', 'b0'], i++)) {
    switch (s) {
      case 'a0':
        print('case a0');
        await for (String s in makeStream(['a1', 'b1', 'c1'], i++)) {
          print('s: $s');
          switch (s) {
            case 'a1':
              print('case a1');
              continue;
            case 'b1':
              print('case b1');
              continue M;
            default:
              print("case default $s");
              break;
          }
        }
        break;

      M:
      case 'b0':
        print("label M");
        break;
    }
  }
}

main() {
  test5().then((_) => print("test1 completed"));
}

Test produces output:

created stream 0
listen 0
case a0
created stream 1
listen 1
s: a1
case a1
s: b1
case b1
label M
label M
test1 completed

Expected output is:

created stream 0
listen 0
case a0
created stream 1
listen 1
s: a1
case a1
s: b1
case b1
cancel 1
label M
label M
test1 completed

Dart VM version: 1.13.1 (Thu Dec 17 06:40:17 2015) on "windows_x64"

Likely caused by the one-element cache on the StreamIterator used internally in the implementation of the await-for. That means that the inner stream has seen the next (and last) element and is therefore already done at the time the cancel happens, and if the StreamIterator knows this, it won't forward the cancel method.
If you add a fourth element to the inner stream, I expect you will see a cancel.
That's an explanation, not an excuse, the behavior is not spec compliant. (Personally I think the specification is overly specific at this point, disallowing the current behavior, but it is unlikely to change, so we might need to use a different helper class than the StreamIterator).

I checked on Dart VM version: 1.13.2 (Tue Jan 05 06:46:24 2016) on "windows_x64" the problem is reproducible, even if I add more elements to inner stream.

CL https://codereview.chromium.org/2030763002/ fixes this. The close/cancel calls in the implicit finally clauses were not properly inlined for forward jumps to outer switch statements.

Fixed in 1859ce46c337e4e047e6543c561ff77af7910074


WIP: Build Config for Toy Model

This PR is a WIP (Work in Progress):

The "toy_model_with_strs.ipynb" file is the same as the toy model, but I added in the 'str()' function to more objects and added in code to print out ALL root -> leaf paths in the model.
I used the result of this to manually create the toy_model_test_config.txt file
I created as much of the config as I could and it does parse successfully when using "from google.protobuf import text_format" to parse the data in the txt file
For this file, I have not added in the information for the acting and corrected demo updaters as I'm not sure how to do that. DONE
I also have some questions regarding the condition, index, and probability data as I'm not sure if I converted those correctly/used the correct data for those fields. DONE
Added in the updaters and created the config with one tribe

Action Items:
- Set up a meeting to go over the questions above and the config in this PR. DONE

LGTM. Please make sure to not merge this to main.


How to use async atom in atomsWithQuery jotai v2?

Now it returns typing error
const idAtom = atom(async (get) => {
  await new Promise((resolve) => setTimeout(resolve, 100));
  return 1;
});

// Typing error here because of using async
// I need async to await get id from atom id
const [userAtom] = atomsWithQuery(async (get) => {
  const id = await get(idAtom);
  return {
    queryKey: ["getUser", id],
    queryFn: async () => await fetch("https://reqres.in/api/users/" + id)
  };
});

Reproduction link:
https://codesandbox.io/s/nifty-kirch-sg309h?file=/src/App.tsx

Thank you

Good question. It's not entirely solved yet.
Related discussion: https://github.com/pmndrs/jotai/discussions/1615
Let me know which solution (more or less workaround) you like.

Thank you for fast reply!
Improve jotai-tanstack-query seems the way jotai users naturally expect when migrate.
I was about to migrate my code to jotai v2.
I tried using unstable_unwrap expecting it handle the await for me, but didn't work either.
const [usersAtom] = atomsWithQuery((get) => {
  const id = unstable_unwrap(idAtom);
  return {
    queryKey: ["getUsers", id],
    queryFn: async () => await fetch("https://reqres.in/api/users/" + id)
  };
});

Using loadable seems too verbose.
I will try atoms in atom, and report. seems it will work. I'll report back later.
Hopefully can create general function wrapper such as asyncAtomsWithQuery.

Currently, my belief is improving jotai-tanstack-query is hardly possible or maintainable. (That doesn't stop someone to try and correct me.)
I hope unwrap to work. It should return undefined initially, so can you try enabled: id === undefined and see if it works around?

This one works, i think it fetched twice with undefined and 1 as id
const [userAtom] = atomsWithQuery((get) => {
  const id = get(unstable_unwrap(idAtom));
  return {
    queryKey: ["getUser", id],
    queryFn: async () => {
      const res = await fetch("https://reqres.in/api/users/" + id);
      return res.json();
    }
    //enabled: id !== undefined
  };

https://codesandbox.io/s/summer-dream-gwrv7j?file=/src/App.tsx
Uncommenting the enabled makes it loading forever. So it seems unstable unwrap cannot be used.

Final resort: https://codesandbox.io/s/brave-voice-ruxvdp

Unfortunately this one seems need extra work to handle the null in the component.

Final resort: https://codesandbox.io/s/brave-voice-ruxvdp

I tried to wrap the atom query in atom, seems promising but not working, maybe you can have a look.
https://codesandbox.io/s/dawn-currying-0ljnqr?file=/src/App.tsx

Unfortunately this one seems need extra work to handle the null in the component.

Final resort: https://codesandbox.io/s/brave-voice-ruxvdp

I tried to wrap the atom query in atom, seems promising but not working, maybe you can have a look.
https://codesandbox.io/s/dawn-currying-0ljnqr?file=/src/App.tsx

Here you go: https://codesandbox.io/s/musing-shirley-fq0p9c

Uncommenting the enabled makes it loading forever.

We want to fix this if possible. The tricky part is TanStack Query requires to re-use observer on option change. Hmm, tbh, I'm not sure what's blocking. Can be a bug. Can be a limitation.

Here you go: https://codesandbox.io/s/musing-shirley-fq0p9c

Thank you! This seems the way to go, but need utils function to wrap the atomsQuery and hooks to get the value since writing double useAtomValue seems weird.

Yeah, a util function would be nice. It can probably avoid dobule useAtomValue. We can consider adding such a util in this lib.

I tried to write a generic utils for this, it seems works fine, but need your help with the typing. Right now i'm using any
https://codesandbox.io/s/quirky-farrell-3f9r7j?file=/src/utils.ts

Updated with typing:
https://codesandbox.io/s/broken-bash-wpco26?file=/src/utils.ts
Seems work for async and sync atom now.
Is there a way to get the value using useAtomValue instead double useAtomValue or it's not possible using atom in atom?

Ended up with rewriting. Here you go: https://codesandbox.io/s/bold-cherry-o10yl5?file=/src/utils.ts
I found a fix in jotai's type utils. Will open a PR there.

Amazing, as expected from @dai-shi sensei, thank you, it seems i can try migrate my code now.

I found a fix in jotai's type utils. Will open a PR there.

https://github.com/pmndrs/jotai/pull/1741

@devnomic If it goes well, would you open a PR in this repo?

Yes sure

Ended up with rewriting. Here you go: https://codesandbox.io/s/bold-cherry-o10yl5?file=/src/utils.ts
I found a fix in jotai's type utils. Will open a PR there.

This looks pretty great and solves my usecase. I would love to also see splitAsyncAtom to simplify it :)

I think splitAtom case is easy. Just unstable_unwrap would do. Please check the v2 migration guide.
https://github.com/pmndrs/jotai/blob/11add6285012fed1c9b25928e3d7ade694e3dd00/docs/guides/migrating-to-v2-api.mdx?plain=1#L212

Thanks for he pointers.
I tried playing with it and realized my suggestion was not applicable since in this case the function returns array directly and one can't make array out of atom since the size would be unknown until read.


nixos/zfs: import encrypted datasets by default for zfsUnstable

Motivation for this change
Already works like a charm but needs more documentation.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

For the mean-time, these are the commands, I used to get a bootable encrypted zfs:
zfs create -o encryption=aes-256-gcm -o keyformat=passphrase -o mountpoint=none zroot/root
zfs create -o mountpoint=legacy -o sync=disabled zroot/root/tmp
zfs create -o mountpoint=legacy -o com.sun:auto-snapshot=true zroot/root/home
zfs create -o mountpoint=legacy -o com.sun:auto-snapshot=true zroot/root/nixos
mount -t zfs zroot/root/nixos /mnt
mkdir /mnt/{home,tmp,boot}
mount /dev/sda1 /mnt/boot/
mount -t zfs zroot/root/home /mnt/home/
mount -t zfs zroot/root/tmp /mnt/tmp/
nixos-generate-config  --root /mnt
nixos-install

Reasons why you want fs-encryption over luks: https://sockpuppet.org/blog/2014/04/30/you-dont-want-xts/

At least I added documentation here: https://nixos.wiki/wiki/NixOS_on_ZFS#Encrypted_ZFS

@Mic92 just an fyi: that upstream PR was merged February 2: https://github.com/zfsonlinux/zfs/pull/6864#issuecomment-362687293 .

@davidblewett yes, we also put a migration guide on the wiki.

Are encrypted data sets supported now in 19.03? Trying to set this up on a fresh install and getting complaints from the zpool/zfs commands when I try setting the encryption option :(

As mensoned in the wiki zfs 0.8 is required. How ever the installer comes with 0.7.13. You can update but the kernel module stays in that Version that does not feature encrytion. Therefore the errors.

@jaykru it will work with nixos unstable or if you build your own zfs installer with zfsUnstable enabled: https://github.com/Mic92/dotfiles/blob/1606c820b82353dbf06884cac5a127e1f92479a5/nixos/images/install-iso.nix#L16
https://github.com/Mic92/dotfiles/blob/master/nixos/images/zfs.nix#L2


Dedupe keywords and handle edge cases

What does this change?

Deduplicate keywords on ingestion.
Strip leading and trailing whitespace.
Don't save empty strings.
Unit tests for the above.

How to test

How can we measure success?

Have we considered potential risks?

Images

Accessibility

[ ] Tested with screen reader
[ ] Navigable with keyboard
[ ] Colour contrast passed
[ ] The change doesn't use only colour to convey meaning

LGTM - good catch

thanks! i should also have said h/t to @andrew-nowak for raising the deduping point


Support Jekyll 4.x

Need to upgrade to Jekyll 4.x because of https://jekyllrb.com/news/2018/09/19/security-fixes-for-3-6-3-7-3-8/
Also need your plugin :)

@benbalter  Can you take a look at this ?


Bug in Rouchon2

          > It's a little weird that the `Rouchon2` performs bad no? 🤔

Yes I think there's a bug. By reducing to dt = 1e-4 I get a worse performance than dt = 1e-3. I'm pretty sure it used to work so probably a bug introduced in a recent PR? Rouchon1 seems correct though because reducing dt by a factor of 10, I get a factor 10 reduction in error as well.
Originally posted by @gautierronan in https://github.com/dynamiqs/dynamiqs/issues/166#issuecomment-1661740529

In the end, I think it works as intended. Probably we're hitting some other limit (machine precision?) when reducing dt to dt=1e-4. Closing this for now, feel free to re-open.

It's a bit too large for machine précision issue, I think we should investigate this further. If the scheme is not bugged, we should document this limit once we understand why it exists.

It's a bit too large for a machine precision issue, and I guess you'll have the same in double precision. I think we should investigate this further. If the scheme is not bugged, we should document this limit once we understand why it exists.

But reducing from dt=1e-2 to dt=1e-3, I do get a 10^2-fold reduction in error, as expected from an order 2 scheme. So there's something else we're hitting.

Below is the actual plot of the error against dt for the test problem we have. The dashed black line shows y = 10 * dt**2. I'm not sure what's happening at short times and the sudden drop in error at t=0.5, but otherwise I'd call that a working solver. And we might actually be hitting machine precision at 1e-6 error in the norm. Note that the machine precision error can build up throughout the solver and scale with the matrix size when taking the norm.

Nice plot! I'm convinced now. I'd love to see if we can go lower for double precision, but it's not worth the trouble if you don't have time. Thanks for the detailed analysis.


streamline reviews

@kartojal noted that sometimes reviews here are a bit slow.
The bottleneck currently is that we always manually check:

that each contract is verified on the most popular explorer of that chain
that the contracts are in fact the correct contracts
in some rare cases we even diff the contracts (or ask the pr creator to provide a diff)
for some we manually check that they are correctly configured

I think at least the first 3 points should be perfectly automatable.
No good idea yet how, but is possible for sure.

is now done in https://github.com/bgd-labs/aave-address-book/pull/570 - visuals can be improved etc, but we now have a ci action reporting if added addresses are verified or not (on mainnets only atm)


Review function, snprintf, to avoid buffer overflow

Describe the bug
snprintf, is used which may cause overflow issues. Not urgent.
Expected behavior
Review functions for security reasons. If needed, use a safer function such as sprintf_s.
https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-enhanced-versions-of-crt-functions?view=vs-2019
Code snips
https://github.com/nasa/cFE/blob/a148b97511de3f45f6677c1a3a0b17197f867e28/fsw/cfe-core/src/es/cfe_es_task.c#L381
https://github.com/nasa/cFE/blob/a148b97511de3f45f6677c1a3a0b17197f867e28/fsw/cfe-core/src/es/cfe_es_task.c#L385
https://github.com/nasa/cFE/blob/a148b97511de3f45f6677c1a3a0b17197f867e28/fsw/cfe-core/src/es/cfe_es_task.c#L391
https://github.com/nasa/cFE/blob/a148b97511de3f45f6677c1a3a0b17197f867e28/fsw/cfe-core/src/es/cfe_es_task.c#L399
https://github.com/nasa/cFE/blob/a148b97511de3f45f6677c1a3a0b17197f867e28/fsw/cfe-core/src/fs/cfe_fs_api.c#L396
Additional context
References:

https://docs.roguewave.com/en/klocwork/current/sv.banned.required.sprintf
https://cwe.mitre.org/data/definitions/676.html
https://help.semmle.com/wiki/display/CCPPOBJ/Potentially+overflowing+call+to+snprintf
http://tldp.org/HOWTO/Secure-Programs-HOWTO/dangers-c.html
https://github.com/intel/safestringlib/wiki/SDL-List-of-Banned-Functions
https://linux.die.net/man/3/snprintf
https://securitylab.github.com/research/cve-2018-18820-snprintf-vulnerability-icecast

Reporter Info
Ariel Adams, ASRC Federal

Is it snprintf() that is actually banned?  sprintf(), for sure ... and most the references above are talking about sprintf and suggesting use of snprintf() as the safer alternative.

@jphickey You are right that snprintf() is a much better alternative than sprintf(), however, there are still issues with snprintf() that can be replaced with safer alternatives. The function does not guarantee protection against buffer overflows since it depends on the buffer size you provide. You can find the list of banned functions here: https://docs.microsoft.com/en-us/previous-versions/bb288454(v=msdn.10)?redirectedfrom=MSDN. Here is an additional link for more information: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=vs-2019

@ArielSAdamsNASA  -- I'm still unclear on this -- the document specifically cited in your previous comment says that sprintf() is the banned function and snprintf() is the recommended alternative, unless I'm reading this incorrectly?  I can't find anything that says snprintf is "banned"
There have been cases of some library vendors not implementing it properly according to the standard.
And there is the issue of not handling the return code properly.
But when properly used I can't see how snprintf is inadequate/inappropriate for what we are doing here.

@ArielSAdamsNASA do we need to close this issue or just figure out how to make sure that our use of snprintf don't result in buffer overruns?

I concur that snprintf has some caveats/dangers - particularly with respect to the return code and handling that properly - whereas sprintf() is a buffer overflow exploit in almost all use-cases, and should rightfully be banned.

There are still a few stray uses of sprintf() across cFS. Should these be removed?


FlexibleSettings, settings -> parameters, deprecated api

closes(?) #147
@h1alexbel take a look, please

Codecov Report
Patch coverage: 88.88% and project coverage change: -1.66 :warning:

Comparison is base (7b0b10c) 84.07% compared to head (96864dd) 82.42%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #153      +/-   ##
============================================
- Coverage     84.07%   82.42%   -1.66%
- Complexity       55       59       +4
============================================
  Files            23       24       +1
  Lines           157      165       +8
============================================
+ Hits            132      136       +4
- Misses           25       29       +4

Impacted Files
Coverage Δ

...va/io/github/eocqrs/kafka/consumer/KfConsumer.java
52.38% <ø> (ø)

...rs/kafka/consumer/settings/KfConsumerSettings.java
88.88% <ø> (-11.12%)
:arrow_down:

...thub/eocqrs/kafka/parameters/BootstrapServers.java
100.00% <ø> (ø)

...ava/io/github/eocqrs/kafka/parameters/GroupId.java
100.00% <ø> (ø)

...ithub/eocqrs/kafka/parameters/KeyDeserializer.java
100.00% <ø> (ø)

.../github/eocqrs/kafka/parameters/KeySerializer.java
100.00% <ø> (ø)

...va/io/github/eocqrs/kafka/parameters/KfParams.java
100.00% <ø> (ø)

...hub/eocqrs/kafka/parameters/ValueDeserializer.java
100.00% <ø> (ø)

...ithub/eocqrs/kafka/parameters/ValueSerializer.java
100.00% <ø> (ø)

...va/io/github/eocqrs/kafka/producer/KfProducer.java
64.28% <ø> (ø)

... and 3 more

... and 2 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@h1alexbel take a look, please
puzzles created

sometimes codecov.io is super annoying!

@l3r8yJ yeah, I see

@rultor merge

@l3r8yJ thanks!


feat: upstream spec to ecotone

Description
Update ecotone spec.

Why lint-links action not working?
-it option in docker run makes problem. I removed it.

Which commit did you use of Optimism spec? How about adding UPSTREAM.md like kroma?


Use species range to modify prediction

This seems to help out quite a bit. Below is ROC curves for all species in the training data, left side is without using geo info, right side is with using geo info. After 43 epochs:

For comparison, this is after 1 epoch:


Remove newline at end of inline math blocks

Remove newline that is substituted in at {math end}.

This appears to be resolved by this comment. Most likely due to tidy up of parser in late 2015.


Publish successful but not reflected in portal init.py file

Hello,
I have created an Azure Function and successfully deployed it from VS Code.  But when I view it in the Azure Portal, my code is not reflected.  The dummy template code is there.  How do I get the portal to pick up the code I am deploying to it from VS Code?
Regards,
Amy

Please add more repro steps, including what language your project is, what triggers you used, and how you created the function app


EDC 0.6.0 → Fatal error while Initiate data flow → No data flow controller found

EDC0.6.0 Azure Deployment
Api:
{{CONSUMER_MANAGEMENT_URL}}/transferprocesses/a9692b8d-a80d-4d69-953e-41cd69a3cf9d/state remains in
{
    "@type": "TransferState",
    "state": "REQUESTED",
    "@context": {
        "@vocab": "https://w3id.org/edc/v0.0.1/ns/",
        "edc": "https://w3id.org/edc/v0.0.1/ns/",
        "tx": "https://w3id.org/tractusx/v0.0.1/ns/",
        "odrl": "http://www.w3.org/ns/odrl/2/"
    }
}

Data Consumer Log:
DEBUG 2024-03-22T11:46:49.824091743 [CONSUMER] ContractNegotiation 1e9f9e6c-8995-4f8a-b6e5-cb38fe916fdc is now in state AGREED.
DEBUG 2024-03-22T11:46:50.154520298 [ConsumerContractNegotiationManagerImpl] ContractNegotiation 1e9f9e6c-8995-4f8a-b6e5-cb38fe916fdc is now in state VERIFYING
DEBUG 2024-03-22T11:46:50.170258858 ContractNegotiation: ID 1e9f9e6c-8995-4f8a-b6e5-cb38fe916fdc. [consumer] send verification
DEBUG 2024-03-22T11:46:50.406462254 ContractNegotiation: ID 1e9f9e6c-8995-4f8a-b6e5-cb38fe916fdc. [consumer] send verification
DEBUG 2024-03-22T11:46:50.422731712 [ConsumerContractNegotiationManagerImpl] ContractNegotiation 1e9f9e6c-8995-4f8a-b6e5-cb38fe916fdc is now in state VERIFIED
DEBUG 2024-03-22T11:46:50.887910023 DSP: Incoming ContractNegotiationEventMessage for class org.eclipse.edc.connector.contract.spi.types.negotiation.ContractNegotiation process: 1e9f9e6c-8995-4f8a-b6e5-cb38fe916fdc
DEBUG 2024-03-22T11:46:50.989721762 [CONSUMER] ContractNegotiation 1e9f9e6c-8995-4f8a-b6e5-cb38fe916fdc is now in state FINALIZED.
WARNING 2024-03-22T11:47:31.04480696 The attribute https://w3id.org/edc/v0.0.1/ns/connectorAddress has been deprecated in type https://w3id.org/edc/v0.0.1/ns/TransferRequest, please use https://w3id.org/edc/v0.0.1/ns/counterPartyAddress
DEBUG 2024-03-22T11:47:31.057410927 [TransferProcessManagerImpl] TransferProcess a9692b8d-a80d-4d69-953e-41cd69a3cf9d is now in state INITIAL
DEBUG 2024-03-22T11:47:31.058987523 Process a9692b8d-a80d-4d69-953e-41cd69a3cf9d is now INITIAL
DEBUG 2024-03-22T11:47:31.0675425 Transfer Process created a9692b8d-a80d-4d69-953e-41cd69a3cf9d
DEBUG 2024-03-22T11:47:31.684474771 [TransferProcessManagerImpl] TransferProcess a9692b8d-a80d-4d69-953e-41cd69a3cf9d is now in state PROVISIONING
DEBUG 2024-03-22T11:47:31.700336929 TransferProcess: ID a9692b8d-a80d-4d69-953e-41cd69a3cf9d. Provisioning
DEBUG 2024-03-22T11:47:31.713645994 [TransferProcessManagerImpl] TransferProcess a9692b8d-a80d-4d69-953e-41cd69a3cf9d is now in state PROVISIONED
DEBUG 2024-03-22T11:47:31.746978406 [TransferProcessManagerImpl] TransferProcess a9692b8d-a80d-4d69-953e-41cd69a3cf9d is now in state REQUESTING
DEBUG 2024-03-22T11:47:31.763820761 TransferProcess: ID a9692b8d-a80d-4d69-953e-41cd69a3cf9d. send transfer request to https://bpnl00000007txd8.edc.supplyon.com/api/v1/dsp
DEBUG 2024-03-22T11:47:31.998532642 TransferProcess: ID a9692b8d-a80d-4d69-953e-41cd69a3cf9d. send transfer request to https://bpnl00000007txd8.edc.supplyon.com/api/v1/dsp
DEBUG 2024-03-22T11:47:32.011623107 [TransferProcessManagerImpl] TransferProcess a9692b8d-a80d-4d69-953e-41cd69a3cf9d is now in state REQUESTED

Data Provider Log:
DEBUG 2024-03-22T11:46:49.109429071 DSP: Incoming ContractRequestMessage for class org.eclipse.edc.connector.contract.spi.types.negotiation.ContractNegotiation process
WARNING 2024-03-22T11:46:49.435335137 This policy evaluation function (class [BusinessPartnerPermissionFunction]) was deprecated and is scheduled for removal in version 0.6.0 of Tractus-X EDC
WARNING 2024-03-22T11:46:49.440538624 This policy evaluation function (class [BusinessPartnerPermissionFunction]) was deprecated and is scheduled for removal in version 0.6.0 of Tractus-X EDC
DEBUG 2024-03-22T11:46:49.446660908 [PROVIDER] ContractNegotiation 71546e85-4051-4732-9b4f-a9171dea6247 is now in state REQUESTED.
DEBUG 2024-03-22T11:46:49.492498991 [ProviderContractNegotiationManagerImpl] ContractNegotiation 71546e85-4051-4732-9b4f-a9171dea6247 is now in state AGREEING
DEBUG 2024-03-22T11:46:49.508985949 ContractNegotiation: ID 71546e85-4051-4732-9b4f-a9171dea6247. [Provider] send agreement
DEBUG 2024-03-22T11:46:49.829603229 ContractNegotiation: ID 71546e85-4051-4732-9b4f-a9171dea6247. [Provider] send agreement
DEBUG 2024-03-22T11:46:49.847631583 [ProviderContractNegotiationManagerImpl] ContractNegotiation 71546e85-4051-4732-9b4f-a9171dea6247 is now in state AGREED
DEBUG 2024-03-22T11:46:50.293813042 DSP: Incoming ContractAgreementVerificationMessage for class org.eclipse.edc.connector.contract.spi.types.negotiation.ContractNegotiation process: 71546e85-4051-4732-9b4f-a9171dea6247
DEBUG 2024-03-22T11:46:50.400609669 [PROVIDER] ContractNegotiation 71546e85-4051-4732-9b4f-a9171dea6247 is now in state VERIFIED.
DEBUG 2024-03-22T11:46:50.736069211 [ProviderContractNegotiationManagerImpl] ContractNegotiation 71546e85-4051-4732-9b4f-a9171dea6247 is now in state FINALIZING
DEBUG 2024-03-22T11:46:50.751552971 ContractNegotiation: ID 71546e85-4051-4732-9b4f-a9171dea6247. [Provider] send finalization
DEBUG 2024-03-22T11:46:51.001583932 ContractNegotiation: ID 71546e85-4051-4732-9b4f-a9171dea6247. [Provider] send finalization
DEBUG 2024-03-22T11:46:51.043781724 [ProviderContractNegotiationManagerImpl] ContractNegotiation 71546e85-4051-4732-9b4f-a9171dea6247 is now in state FINALIZED
DEBUG 2024-03-22T11:47:31.891350925 DSP: Incoming TransferRequestMessage for class org.eclipse.edc.connector.transfer.spi.types.TransferProcess process
WARNING 2024-03-22T11:47:31.978246195 This policy evaluation function (class [BusinessPartnerPermissionFunction]) was deprecated and is scheduled for removal in version 0.6.0 of Tractus-X EDC
INFO 2024-03-22T11:47:31.978428195 Evaluated policy access for referringConnectorClaim: BPNL00000007TWDX and contract id: 60c4c3f5-a6fe-4adf-aecc-fe179839a7c0 with result: true
DEBUG 2024-03-22T11:47:31.990711762 TransferProcess 94b2999f-9350-48e1-8fd7-c6e88787cdf2 is now in state INITIAL
DEBUG 2024-03-22T11:47:32.841844715 [TransferProcessManagerImpl] TransferProcess 94b2999f-9350-48e1-8fd7-c6e88787cdf2 is now in state PROVISIONING
DEBUG 2024-03-22T11:47:32.860243866 TransferProcess: ID 94b2999f-9350-48e1-8fd7-c6e88787cdf2. Provisioning
DEBUG 2024-03-22T11:47:32.885444999 [TransferProcessManagerImpl] TransferProcess 94b2999f-9350-48e1-8fd7-c6e88787cdf2 is now in state PROVISIONED
DEBUG 2024-03-22T11:47:32.962690395 [TransferProcessManagerImpl] TransferProcess 94b2999f-9350-48e1-8fd7-c6e88787cdf2 is now in state STARTING
DEBUG 2024-03-22T11:47:32.991473519 TransferProcess: ID 94b2999f-9350-48e1-8fd7-c6e88787cdf2. Initiate data flow
SEVERE 2024-03-22T11:47:32.991706819 TransferProcess: ID 94b2999f-9350-48e1-8fd7-c6e88787cdf2. Fatal error while Initiate data flow. Error details: Unable to process transfer 94b2999f-9350-48e1-8fd7-c6e88787cdf2. No data flow controller found
WARNING 2024-03-22T11:47:32.991792819 Unable to process transfer 94b2999f-9350-48e1-8fd7-c6e88787cdf2. No data flow controller found
DEBUG 2024-03-22T11:47:33.009496072 [TransferProcessManagerImpl] TransferProcess 94b2999f-9350-48e1-8fd7-c6e88787cdf2 is now in state TERMINATING
DEBUG 2024-03-22T11:47:33.027737924 TransferProcess: ID 94b2999f-9350-48e1-8fd7-c6e88787cdf2. Terminate data flow
SEVERE 2024-03-22T11:47:33.027866123 TransferProcess: ID 94b2999f-9350-48e1-8fd7-c6e88787cdf2. Fatal error while Terminate data flow. Error details: Unable to process transfer 94b2999f-9350-48e1-8fd7-c6e88787cdf2. No data flow controller found
WARNING 2024-03-22T11:47:33.027942623 Unable to process transfer 94b2999f-9350-48e1-8fd7-c6e88787cdf2. No data flow controller found
DEBUG 2024-03-22T11:47:33.041238688 [TransferProcessManagerImpl] TransferProcess 94b2999f-9350-48e1-8fd7-c6e88787cdf2 is now in state TERMINATED

Having the same issue. this is the request used from my side:
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/",
"odrl": "http://www.w3.org/ns/odrl/2/"
},
"@type": "TransferRequest",
"assetId": "{{enduranceEstimatorReceiverAssetId}}",
"counterPartyAddress": "{{providerControlPlane}}/api/v1/dsp",
"connectorId": "BPNL00000002HCQ9",
"contractId": "db190d06-85f6-46f1-9fe7-1e38dadf1b62",
"protocol": "dataspace-protocol-http",
"dataDestination": {
"type": "HttpProxy"
},
"managedResources": false,
"privateProperties": {
"receiverHttpEndpoint": "{{adacEdcCallback}}?code={{adacRulServiceApiCode}}"
}
}

@dreni i took the liberty of adding formatting to your post

Hi @dreni @jerzy-wachowiak
I might know the root of this issue  can you check if in your startup log if you see something like this?

One of these settings is not configured, so the connector won't be able to provide 'consumer-pull' transfers

I can see following exceptions on startup:
INFO 2024-03-26T12:38:23.031216661 Started Control Plane Services
[2024-03-26 12:38:23] [INFO   ] Cannot unwrap ThreadPoolExecutor for monitoring from java.util.concurrent.Executors$DelegatedScheduledExecutorService due to java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.concurrent.ScheduledExecutorService java.util.concurrent.Executors$DelegatedScheduledExecutorService.e accessible: module java.base does not "opens java.util.concurrent" to unnamed module @29b5cd00
INFO 2024-03-26T12:38:23.03510422 Started EDR Core
...
INFO 2024-03-26T12:38:23.045102571 Started Management API: Transfer Process
[2024-03-26 12:38:23] [INFO   ] Cannot unwrap ThreadPoolExecutor for monitoring from java.util.concurrent.Executors$DelegatedScheduledExecutorService due to java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.concurrent.ScheduledExecutorService java.util.concurrent.Executors$DelegatedScheduledExecutorService.e accessible: module java.base does not "opens java.util.concurrent" to unnamed module @29b5cd00
INFO 2024-03-26T12:38:23.045770881 Started org.eclipse.edc.validator.dataaddress.httpdata.HttpDataDataAddressValidatorExtension

Hi @dreni @jerzy-wachowiak
I might know the root of this issue can you check if in your startup log if you see something like this in the provider control plane?

One of these settings is not configured, so the connector won't be able to provide 'consumer-pull' transfers

I had this in the logs. The reason was exactly,  as @wolf4ood suggested, missing of following keys in my values.yaml file:
vault.secretNames.transferProxyTokenSignerPrivateKey and
vault.secretNames.transferProxyTokenSignerPublicKey

generating an rsa key pair and saving them to vault fixed the issue.

Cool thanks @dreni
so i guess we can close this right?

@wolf4ood yes, you can.

Followed the advice above but it still crashes

@dreni Have you stripped "-----BEGIN PUBLIC KEY-----" "-----END PUBLIC KEY-----" "-----BEGIN PRIVATE KEY-----" "-----END PRIVATE KEY-----" form

private_key.txt
public_key.txt

or left the keys as is in the attached files?
I'm getting above errors related to the keys...


get insert kb to work in input editor

fixes https://github.com/microsoft/vscode-copilot/issues/4797

I'm still not sure how users are supposed to discover secondary keybindings

Perhaps we should have a second keybinding with a when clause like I did in the first commit on this PR and call updateToolbar when focus moves to/from the inline chat widget input so the hover reflects the correct keybinding to use?


invalid syntax : Any help please

root@kali:~/Desktop/CloudFail# python cloudfail.py --target site.com
File "cloudfail.py", line 23
print(Style.NORMAL + "[" + datetimestr + "] " + data + Style.RESET_ALL,' ', end=end)
^
SyntaxError: invalid syntax
root@kali:~/Desktop/CloudFail#

Hi mate
This is most likely due to invalid syntax with Python2, have you tried running with Python3?

Either setup Python3 or you can fork and remove the code thats invalid to Python3 (end=end)

To Solve the Issue  ! :100:
sudo apt-get install python3-pip -y
/CloudFail# pip3 install -r requirements.txt
python3 cloudfail.py


fix(parser): incorrect promise error handling

Currently, if you have a Zod Function Schema and you say it returns a Promise value then Zod will create a new Promise wrapping the returned Promise. When the wrapped Promise resolves it will validate it with the Promise type parser and if it doesn't validate it will reject the new Promise or resolve it if the parsing succeeds.
However, wrapping a Promise into a new Promise breaks catching the Promise rejection further up the stack as the Promise that generates the error is not the Promise anything is attaching .catch too or wrapping in a try {} catch {} block.
Instead of wrapping the Promise we can simply just add a new .then chain which performs the validation. If it throws it will automatically reject the Promise and it ensures that the correct Promise is having error handling added to it further up the stack.
I created this in the web-editor and haven't tested any other scenario, but I have applied the same patch to my local copy of Zod and it now correctly handles rejected promises.

This change is

I believe this is fixed in Zod 2. Give it a shot with yarn add zod@beta and let me know if you're getting the expected behavior.


Add rss feed

Fixes #5700 #5713 #5723 #5856 #6108 https://github.com/facebook/react/issues/28429

Thank you very much @rickhanlonii


Docs: explain how diag log level and OTEL_LOG_LEVEL env variable interact

reading this docs section: https://github.com/signalfx/splunk-otel-js/blob/main/docs/troubleshooting.md
there is a log level being passed as the second argument to diag.setLogger, and there is mention of the OTEL_LOG_LEVEL environment variable. it's not clear if/how those two things interact

There's a new logLevel option now, when set it will set up the diagnostic logger with the given log level.
OTEL_LOG_LEVEL will now do the same (with the programmatic way having preference). See https://github.com/signalfx/splunk-otel-js/blob/main/docs/troubleshooting.md


Emptypackages

So ...
we can't detect package roots for packages that don't participate in the build.  A nuget package that has no dll's to reference is a content assembly.  Content assemblies do participate in the build.  So if no assemblies are referenced it must provide content.
E.g ...
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>EmptyPackage</id>
    <version>1.0.0</version>
   ...
  </metadata>
  <files>
    <file src="TextFile1.txt" target="contentFiles/any/any/TextFile1.txt" />
  </files>
</package>

We were hoping to provide a package authoring experience that doesn't force people to use a nuspec.


Extremely Slow in cal_ot_mat

Dear developers,
I have a tiny anndata object which shape is 1570 × 19241. But when I ran cal_ot_mat as tutorial "Gene Trajectory Python tutorial: Human myeloid", the progress is extremelty slow and no progress bar is shown.
It cost me more than 90 minute without any result, and it still running. System monitor suggests all cores are fully occupied.
It's very weird for such a tiny dataset. Any help are greatly appreciated.
Here is my code.
from gene_trajectory.add_gene_bin_score import add_gene_bin_score
from gene_trajectory.coarse_grain import select_top_genes, coarse_grain_adata
from gene_trajectory.extract_gene_trajectory import get_gene_embedding, extract_gene_trajectory
from gene_trajectory.get_graph_distance import get_graph_distance
from gene_trajectory.gene_distance_shared import cal_ot_mat
from gene_trajectory.run_dm import run_dm
from gene_trajectory.plot.gene_trajectory_plots import plot_gene_trajectory_3d, plot_gene_trajectory_umap
from gene_trajectory.util.download_file import download_file_if_missing

import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
warnings.simplefilter(action='ignore', category=UserWarning)

# Prepare the input for gene-gene Wasserstein distance computation
genes = select_top_genes(NK,
                         layer='counts',
                         n_variable_genes=3000)
run_dm(NK)
cell_graph_dist = get_graph_distance(NK, k=10)
gene_expression_updated, graph_dist_updated = coarse_grain_adata(NK,
                                                                 graph_dist=cell_graph_dist,
                                                                 features=genes,
                                                                 n=500)

gene_dist_mat = cal_ot_mat(gene_expr=gene_expression_updated,
                           ot_cost=graph_dist_updated,
                           show_progress_bar=True,
                           processes=26) # I tried 26 and default param both.

My anndata object,
AnnData object with n_obs × n_vars = 1570 × 19241
    obs: 'sample', 'n_genes_by_counts', 'total_counts', 'total_counts_mt', 'pct_counts_mt', 'n_genes', 'doublet_score', 'predicted_doublet', 'n_counts', 'leiden', 'annot', 'NK_anno', 'NK_anno_L3'
    var: 'mt', 'n_cells_by_counts', 'mean_counts', 'pct_dropout_by_counts', 'total_counts', 'n_cells', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
    uns: 'NK_anno_L3_colors', 'NK_anno_colors', 'annot_colors', 'hvg', 'leiden', 'leiden_colors', 'log1p', 'neighbors', 'pca', 'rank_genes_groups', 'sample_colors', 'scrublet', 'umap'
    obsm: 'X_pca', 'X_pca_harmony', 'X_umap'
    varm: 'PCs'
    layers: 'counts'
    obsp: 'connectivities', 'distances'

My packages,
gene-trajectory               1.0.4

Python version 3.9.19

Thank @fra-pcmgf.
However I have already reduce to top genes and coarse grain cells, as the tutorial did. The only difference is that I set n_variable_genes param to 3000, which is 500 originally.
genes = select_top_genes(..., n_variable_genes=3000)
# .......
gene_expression_updated, graph_dist_updated = coarse_grain_adata(..., features=genes, n=500)

In "Improve the computation efficiency of gene-gene distance matrix" documentation, it said that,

When the cell graph is large, the time cost for finding the optimal transport solution increases exponentially.

But currently this anndata object only has 1570 cells, and the number of gene is limited to 3000. Is this still a "large cell graph" as the doc indicated?
I'm just wondering that, is such a long calculation period is normal for dataset of this size, or some kinds of bug?
I'm not sure and have no idea about these questions.

Sorry for the late response.
I have just ran the mouse tutorial, and all the parameters were kept same with the tutorial.
My cpus are intel Xeon E5 2680v4 × 2, all 28 cores are used in calculation process.
I manually stopped the cal_ot_mat process at
21%|██        | 145875/692076 [12:53<48:17, 188.49it/s] .
It cost me 13m 37.9s to reach 21%, thus theoretically, the entire process should be around 60m. That is, for a dataset of shape 10328 × 32285, already performed coarse_grain_adata, selected 2000 top genes by select_top_genes, cal_ot_mat process will cost 1h to calculate.
So it's even more weird to spend more time on a smaller dataset, which shape is 1570 × 19241, with coarse_grain_adata and select_top_genes performed. Also, during the calculation of my own dataset, the progress bar never show. I doubt whether are some bugs? 🤔
Any idea?


feat: add override print args in the exec function.

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

[ ] N
[x] Y

#54 Add print_ast parameter on apply_overrides function.

2. What is the scope of this PR (e.g. component or file name):

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[x] Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

[x] N
[ ] Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

[ ] Unit test
[ ] Integration test
[ ] Benchmark (add benchmark stats below)
[ ] Manual test (add detailed scripts or steps below)
[x] Other

6. Release note

Please refer to Release Notes Language Style Guide to write a quality release note.
None

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 3 (0.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.002%) to 60.418%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

kclvm/src/lib.rs
0
1
0.0%

kclvm/tools/src/query/override.rs
0
2
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.002%

Covered Lines:
23789

Relevant Lines:
39374

💛  - Coveralls


Do not use workflow_run for end-to-end tests either.

What
These are no longer running because I changed the name of the workflow.
This upset me, as I would expect a warning, at least. Instead I have no feedback. This has convinced me that workflow_run is a bad idea.
How
I am merging the E2E test job into the "ship" workflow so that we can use job chaining instead, which seems less brittle.

Tested and working.


Add schema identificator to failed validation message

Right now it just gives information on why instance is invalid:
error: object has too few properties (found 0 but schema requires at least 1)
    level: ""error""
    schema: {""loadingURI"":""#"",""pointer"":""""}
    instance: {""pointer"":""""}
    domain: ""validation""
    keyword: ""minProperties""
    found: 0
    required: 1

But doesn't say which instance is invalid and Support needs to make guesses where is the error exactly. This should be:
error: instance of "iglu:com.acme/event/jsonschema/1-0-2": object has too few properties (found 0 but schema requires at least 1)
    level: ""error""
    schema: {""loadingURI"":""#"",""pointer"":""""}
    instance: {""pointer"":""""}
    domain: ""validation""
    keyword: ""minProperties""
    found: 0
    required: 1

This was implemented as part of #113 and #78


Ensure data chunks do not get fetched unnecessarily

For a composite blob get, with #439, the frontend will only make one call to get both BlobInfo and the Blob. There are scenarios where the frontend would ask for both but based on the contents of BlobInfo, choose to not ask for the data. This issue is to make the change to avoid fetching the data chunks unnecessarily in such scenarios. The proposal is the following:

for simple blobs, get the whole blob (there is no other choice)
for composite blobs, make the operation callback as soon as the metadata blob is fetched (rather than waiting for the data chunks). Once the caller makes a readInto() call, the router will know for sure that the caller wants the data as well - and will initiate the data chunk fetching at that point.

On looking into the code, I realize that this is already the case. GetBlobOperation calls the operation completion callback as soon as the metadata chunk is received successfully. The fetching of data chunks does not wait for the readInto() callback, but that is the right thing to do - and so what is noted in the issue description above is not the right thing, I realize now - this is because for the common case where the Blob data will most likely be fetched, the router should not delay the fetching of the data chunks. For the case where the data will not be needed, the router might end up fetching a few data chunks, but since the frontend is given the BlobInfo as soon as the metadata chunk is fetched, the abort for data will happen as early as possible. Basically, the need is to hand over the BlobInfo at the earliest which is already the case currently.


Please add a few more skills

I know you arent developing this mod anymore and this is more or less a fools wish. but it would be amazing if there were a few more skills to utilize such as "engineering"."constitution", "dexterity" and "alchemy"

I stopped working on this mod. And the way I made it doesn't allow for an easy way to add more skills.


Discount travel perks not working.

Describe the bug
Discount travel perks not working.
To Reproduce
Just not working at all

Game Log
Player.log

Should work in 1.0.133 now. Please close the ticket if your problem is solved.


How can I set window['ga-disable-UA-XXXX-XX'] to true initially

I'd like to implement an Opt-In component in my nuxt app to actively opt into Google Analytics Tracking (due to European DSGVO regulation). Is there a way to set window['ga-disable-UA-XXXX-XX'] = true initially to prevent gtag() to start tracking?
Only when the user hits an agree-button the i'd like to set window['ga-disable-UA-XXXX-XX'] = false programmatically in my Nuxt-component. Is that possible, too?
Thanks for helping out.

try with disableAutoPageTrack and then modify tracking in your main app similar what explained here:
https://github.com/nuxt-community/google-gtag#to-make-sure-that-every-page-is-tracked-correctly

This is the most important functionality, otherwise no one can use this module on their website without being sued. Even, if you ask people for their consent, you are not allowed to enable any analytics or tracking before the user has actually clicked yes.
It would be great, if someone could answer how this kind of behavior can be configured using this nuxt module. If it's not possible I have to use gtag natively and use the provided window['ga-disable-GA_MEASUREMENT_ID'] = true; method.

This is the only (not quite good) solution working for me at the moment. This is the code within my cookie component...
accept() {         if (process.browser) {           localStorage.setItem("GDPR:accepted", true)           window['ga-disable-UA-0000000-1'] = false           window.location.reload()         }       },

Any update?


Downloaded file with drive api can't be found

One more questions:
I tested the download scenario with the service account.  (https://developers.google.com/drive/api/v3/manage-downloads)
file_id_download = "1GiewAJc460ccEX-ScDybp0rkLnsD8q5W"
request = service.files().get_media(fileId=file_id_download)
fh = io.BytesIO()
downloader = MediaIoBaseDownload(fh, request)
done = False
while done is False:
status, done = downloader.next_chunk()
print "Download %d%%." % int(status.progress() * 100)
And scripts returns:
python sa_demo.py
Download 100%.
But I can't find the download file in my local. Could you please give me some guidelines on that?

Hi @tianchao-haohan,
The sample creates a in-memory binary stream io.BytesIO(...). If you want to write to a file you can do something like fh = open("myfile", "rb"). See Binary I/O Documentation.

Hi @tianchao-haohan,
The sample creates a in-memory binary stream io.BytesIO(...). If you want to write to a file you can do something like fh = open("myfile", "rb"). See Binary I/O Documentation.
Update the code to:

 fh = open("test_file.csv", "w")
 downloader = MediaIoBaseDownload(fh, request)

raise HttpError(resp, content, uri=self._uri)

googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/drive/v3/files/1m4xCk89N123456qWeKjOLme6zw98o8G62ghVW8O9nE?alt=media returned "Only files with binary content can be downloaded. Use Export with Google Docs files.">

Can you try 'wb' isntead of 'w'?

Yes. I tried both 'w' and 'wb'.

Whoops sorry, I was reading the documentation incorrectly. I think this StackOverflow question answers your question well. You can either read from fh and write to a file, or open a io.FileIO object.

Change:
request = service.files().get_media(fileId=file_id_download)
To:
request = service.files().export_media(fileId=file_id_download, mimeType='text/csv')
Works for me now.
Appreciate your help!

I'm closing off this issue as it is resolved.


Upgrade to Spring Vault 2.2.1

@mp911de can we get an idea about the date when 2.2.2 will be released? Just for tracking our own release.

The next release train is Hoxton SR2. Check out https://github.com/spring-cloud/spring-cloud-release/milestones to keep track of Spring Cloud‘s release planning.

Thanks @mp911de

Related: Spring Vault 2.2.1 (not Spring Cloud) is scheduled for tomorrow, after Spring Framework is released.


KeyError when using get_namespace_information() function

I was uploading PEPs with pepdbagent and I noticed with the lastest version, I get this error after uploading a project and trying to access it:
File "pepdbagent/pepdbagent.py", line 436, in <listcomp>     "description": p[4]["proj_description"], KeyError: 'proj_description'

I'm not sure what I did wrong, but here are the steps to reproduce:

Drop projects table with DROP TABLE projects
Use sql here to create fresh table
Connect to database in python and upload a project:

>>> from pepdbagent import Connection
>>> import peppy
>>> p = peppy.Project("examples/demo/BiocProject/project_config.yaml")
>>> conn = Connection(
...     host="localhost",
...     user="postgres",
...     password="docker"
... )
>>> conn.upload_project(p, namespace="demo", name="BiocProject")
>>> conn.get_namespace_info("demo")

Observe error

Interestingly, I can still grab the project:
>>> conn.get_project_by_registry("demo/BiocProject")
Project
_config_file: null
_sample_table_path: null
_subsample_tables_path: null
_samples:
 - Sample 'laminB1Lads' in Project (None)

Can't reproduce anymore. I might have had an old cached version somewhere I was using. I'll close for now and if it comes back up I'll reopen.

I have changed it few days ago, now pepdbagent shoudn't have this problem.
I have created new class pepannot, so it will handle this error:
check new code here:
https://github.com/pepkit/pepdbagent/blob/3478eade8709f2f30bcba5074ff5a2e20d6e972c/pepdbagent/pepdbagent.py#L440-L441

Okay. That's odd it was broken yesterday, but fine now.


Results get worse compared to commit 116

We started working with the cartographer in the end of october. So we started with the version 116. We worked on that Version till early january. We decided to go onto the newest Version at that point and had no problem running the rosbag again. The only difference was the result. We tried a few weeks to get it to a result as good as befor, but couldnt get it running. We wrote a shell script to auto test some parameters, this got us a better result, but still not as good as befor. As reference we had a mobile mapping system from riegel (similar to this http://www.riegl.com/nc/products/mobile-scanning/produktdetail/product/scanner/53/)
We also integrated the gps fix from the xsens to get better result, this did not made a big difference as the xsens uses a internal filter.
We are using a Sick lms500 and a xsens as imu. They were mounted on a Van and we were driving around near our university. We are working in postprocessing on a VM with xubuntu 14.04. (4cores 16gb ram)
To the Results:
Version 116:

Parameter test results:

(this is with gps as odom, thats why its rotated)
We did read some of the commit msgs, but could not really find out which step made our results getting worse. Maybe someone of you can find the problem.
I m attaching the rosbag, the configuration files, launchfiles and urdf modells. (old and new Version, the other configurations were not changed)
Also I m attaching a program with remaps the imu-data, because we had problems doing it with the ros-internal tools. Also this has the program for the gpsfix to utm conversion node. (this are in the folder cartographer_fue and are build in a normal catkin_ws with catkin_make )
As github just supports 10mb uploads, the files are on google-drive: https://drive.google.com/open?id=0B0ht7RlOmWvLX0UzalhycGdLVjg
If you need some new Information or I missed some needed information feel free to ask.

Since #116 there have been algorithmic changes to local SLAM and the default configuration we provide is for a backpack. One could of course bisect to figure out which commit(s) caused the drop in quality, but I'm not sure this is helpful to you. I would think what you need is tuning for the car use case.
I looked into the data you provided, though without the GPS derived odometry. If you think that part is important: Could you record a bag that has the necessary odometry so that I can simply replay it?
It seems the main issue is tuning. For example, I increased the maximum distance to submaps to consider for loop closure to 30 meters. Also, to avoid slipping in one case in the lower right of the map, I increased reliance on the constant velocity model a bit by raising the translation_weight. The 5 cm default resolution is quite high for a car so I changed it to 15 cm.
SPARSE_POSE_GRAPH.constraint_builder.max_constraint_distance = 30.
TRAJECTORY_BUILDER_2D.submaps.resolution = 0.15
TRAJECTORY_BUILDER_2D.ceres_scan_matcher.translation_weight = 3e1

This produces a map very similar to the one you show for #116. I hope this helps you as a starting point. If you have further questions, just let me know.

Thank you for the quick response. It really looks better now :)
I tryed to record the data, so you dont need to run the nodes, but I failed. I m getting a time syncronisation warning from the Cartographer, while replaying.
[ WARN] [1485363867.747249771,<PHONE_NUMBER>.488265818]: W0125 18:04:27.000000 20856 tf_bridge.cc:51] Lookup would require extrapolation into the past.  Requested time<PHONE_NUMBER>.311152900 but the earliest data is at time<PHONE_NUMBER>.634929960, when looking up transform from frame [imu_link] to frame [base_link]
The cartographer is not calculating any results because of this.


Only update when the mouse moves in front of the window?

Hello contributors,
I have some questions here.
Here is my code:
setInterval(() => {
console.log('Tick tock')
}, 1000)

I think it will write on the console every second: tick tock
but no, it will only print when i move the mouse in front of the window :(
Is it right?
However, at some point, I will write:
setTimeout(() => {
// do sth
}, ms)

and it was never triggered until I moved the mouse? @@
Please give me an answer. Thank you.

Update:
when i insert:
setInterval(() => {}, 1000)

into main.js
everything works ✌  :V

I think something has blocked the main thread.

I guess it's a problem with libui-node because it replaces the standard setTimeout and setInterval methods.

I guess it's a problem with libui-node because it replaces the standard setTimeout and setInterval methods.

(This issue is the reason why libui-node originially replaced these functions, don't know why it is still happening though.)

Yes, I think so, I will close this issue because it does not belong to Vuido.
Thanks everyone.

const libui = require('libui-node')
libui.startLoop()
setInterval(() => console.log('tick'), 1000)

This code solves my problem, thanks again.


Enabled logging fixed.

Related Issue(s)
Closes #38
Description
Rebased enable_logging on main to make it functional.
See: https://github.com/fungover/thunder/pull/61 for details.
Checklist

[x ] Code compiles correctly
[ x] Extended the README / documentation, if necessary
[ x] Added tests to cover new changes
[ x] All new and existing tests passed
[ x] The code follows the code style of this project

Closed since forking caused issues with SonarCloud.


Make sure to populate the multidat error back up the stack

I was getting a module mismatch error but it was hidden under the sheets. I think in general it's nice to propagate fatal errors like this up the stack

The error is still being propagated; if you look at the stack trace it should be clear (:
Also: I wasn't aware module mismatch errors were handled through a callback; I would've assumed they threw? That seems like a rather odd use of callbacks imo


"not enough memory: you tried to allocate 0GB" error is being observed on executin train.lua and after running 390/390 tests

Hi Sergey,
"not enough memory: you tried to allocate 0GB" error is being observed on executin train.lua and after running 390/390 tests. Does incresing the RAM really help? My current RAM size is 8GB.
Train accuracy: 10.15 %	 time: 1388.22 s
==> doing some iterations on train data for batch normalization
/root/torch/install/bin/lua: $ Torch: not enough memory: you tried to allocate 0GB. Buy new RAM! at /root/torch/pkg/torch/lib/TH/THGeneral.c:210
stack traceback:
[C]: ?
[C]: in function 'Tensor'
/root/torch/install/share/lua/5.1/cltorch/Random.lua:8: in function 'bernoulli'
/root/torch/install/share/lua/5.1/nn/Dropout.lua:19: in function 'updateOutput'
/root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'updateOutput'
/root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'updateOutput'
/root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function </root/torch/install/share/lua/5.1/nn/Sequential.lua:41>
(tail call): ?
train.lua:131: in function 'test'
train.lua:191: in main chunk
[C]: in function 'dofile'
.../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: ?
\Thanks

After increasing the RAM, it worked. However, I see a new issue now :(
==> doing some iterations on train data for batch normalization
==> testing
Test accuracy:	10
/root/torch/install/bin/lua: cannot open </usr/bin/gnuplot -persist > /dev/null 2>&1> in mode  w at /root/torch/pkg/torch/lib/TH/THDiskFile.c:585
stack traceback:
[C]: ?
[C]: in function 'PipeFile'
...root/torch/install/share/lua/5.1/gnuplot/gnuplot.lua:134: in function 'getfigure'
...root/torch/install/share/lua/5.1/gnuplot/gnuplot.lua:651: in function 'filefigure'
...root/torch/install/share/lua/5.1/gnuplot/gnuplot.lua:658: in function 'epsfigure'
/root/torch/install/share/lua/5.1/optim/Logger.lua:163: in function 'plot'
train.lua:152: in function 'test'
train.lua:191: in main chunk
[C]: in function 'dofile'
.../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: ?

hi, you are on opencl branch right? it is a little bit after cuda version, I have added an option that will hopefully fix this. Also about RAM, you could try to add some collectgarbage() calls in the main for loop to save some memory.

Hi Sergey,
I am now getting the below error :(
==> configuring model
/root/torch/install/bin/lua: /root/torch/install/share/lua/5.1/nn/Copy.lua:11: attempt to index a nil value
stack traceback:
/root/torch/install/share/lua/5.1/nn/Copy.lua:11: in function '__init'
/root/torch/install/share/lua/5.1/torch/init.lua:54: in function </root/torch/install/share/lua/5.1/torch/init.lua:50>
[C]: in function 'Copy'
train.lua:45: in main chunk
[C]: in function 'dofile'
.../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: ?


[WIP] - Null Reference Exception when using inheritance

I too was experiencing the issues described in #7 and was poking around.
This is an very rough and incomplete PR but does allow EF to create a migration with inheritance. It doesn't however allow the annotations to be persisted for subsequent migrations. I believe Laraue.EfCoreTriggers.Common.TriggerBuilders.Base.Trigger<TTriggerEntity> needs to derive from Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping so it can be serialized but I am not sure how that should work at the moment.
I thought I would post this in case someone else wished to use this as a jumping off point or if I have some time later

Hi, @Meberem, Could you please provide a code to reproduce the error in your case?

Hi @win7user10 I think I have managed to isolate the issue. It appears more to be an issue with Conversion than inheritance but it is possible to demonstrate it. Here is a Minimal API with the different scenarios and the errors they generate:
using Laraue.EfCoreTriggers.Common.Extensions;
using Laraue.EfCoreTriggers.SqlLite.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Newtonsoft.Json;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<MyDbContext>(options =>
{
    options
        .UseSqlite("Filename=\"./my.db\"")
        .UseSqlLiteTriggers();
});
var app = builder.Build();

app.MapGet("/", () => "Hello World!");

app.Run();

public class MyObject
{
    public int Id { get; set; }
    public ChildObject Children { get; set; }
}

public class ChildObject
{
    public string Content { get; set; }
}

public class AuditObject
{
    public int Id { get; set; }
    public ChildObject Children { get; set; }
}

class MyDbContext : DbContext
{
    public MyDbContext(DbContextOptions<MyDbContext> options)
        :base(options)
    {
    }

    public DbSet<MyObject> Objects { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);
        // OnModelCreating_Success(modelBuilder);
        // OnModelCreating_NullValueProperty_1(modelBuilder);
        // OnModelCreating_NullValueProperty_2(modelBuilder);
        OnModelCreating_MustAddAuditObject(modelBuilder);
    }

    private void OnModelCreating_Success(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<AuditObject>(ChildrenAsJson);

        modelBuilder.Entity<MyObject>(builder =>
        {
            ChildrenAsJson(builder);
            AddTrigger(builder);
        });
    }

    private void OnModelCreating_MustAddAuditObject(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<MyObject>(builder =>
        {
            ChildrenAsJson(builder);
            AddTrigger(builder);
        });

        modelBuilder.Entity<AuditObject>(ChildrenAsJson);
    }

    private void OnModelCreating_NullValueProperty_1(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<MyObject>(builder =>
        {
            AddTrigger(builder);
            ChildrenAsJson(builder);
        });

        modelBuilder.Entity<AuditObject>(ChildrenAsJson);
    }

    private void OnModelCreating_NullValueProperty_2(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<AuditObject>(ChildrenAsJson);

        modelBuilder.Entity<MyObject>(builder =>
        {
            AddTrigger(builder);
            ChildrenAsJson(builder);
        });
    }

    private void AddTrigger(EntityTypeBuilder<MyObject> builder)
    {
        builder
            .AfterInsert(trigger => trigger.Action(action => action.Insert(myObject => new AuditObject
            {
                Id = myObject.Id,
                Children = myObject.Children,
            })));
    }

    private void ChildrenAsJson(EntityTypeBuilder<MyObject> builder)
    {
        builder
            .Property(x => x.Children)
            .HasColumnType("text")
            .HasConversion(
                child => JsonConvert.SerializeObject(child),
                child => JsonConvert.DeserializeObject<ChildObject>(child));
    }

    private void ChildrenAsJson(EntityTypeBuilder<AuditObject> builder)
    {
        builder
            .Property(x => x.Children)
            .HasColumnType("text")
            .HasConversion(
                child => JsonConvert.SerializeObject(child),
                child => JsonConvert.DeserializeObject<ChildObject>(child));
    }
}

@Meberem, Hi, thank you for your suggestion to use object annotation instead of converting to string SQL. I used this while made library refactoring. Inheritance support also will be added after the new version will be published.


Add microk8s version command

Description
fixes #3065
The proposed implementation is the following:

At build time, we write upstream versions (kubernetes and CNI so far) into a var file.
version command reads from the file.
Snap version and revision is queried from snap list microk8s

@lferran what would you say if we rewrote the microk8s.wrapper in python with click and add there the --version argument?
[1] https://github.com/canonical/microk8s/blob/master/microk8s-resources/wrappers/microk8s.wrapper

@lferran what would you say if we rewrote the microk8s.wrapper in python with click and add there the --version argument?
[1] https://github.com/canonical/microk8s/blob/master/microk8s-resources/wrappers/microk8s.wrapper

sounds good to me! I'll close this and go for rewriting the main entrypoint in python first