Best practice for using/loading data from a file for unit tests?

I have a few functions I would like to have unit tests for that require loading data from a file. What is the best way in nbdev to have it set up so that those files are included in the package and github CI is able to find to run the tests?
I've read through this (https://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files) which goes over how to do something like this using regular setup.py utils. Is it possible to set data_files in settings.ini for this purpose?
Otherwise, what would be considered the best approach to accomplish something like this under the nbdev framework?

Please use forums.fast.ai for help


simplify the process for pandas dataframe

Hi!
Maybe it would be cool if it was possible to just pass a dataframe with specific columns name to have the chart? I'm currently implement your work into the python graph gallery using this logic (available soon).
If you're interested in this, I can send you a PR with this

Hi!
It's a great idea, sure, thanks!

new release is out: arcplot 0.1.5 which includes wrappers for this. (pip install arcplot==0.1.5) thanks @JosephBARBIERDARNAL , I will close this issue.


Document how to bypass Mailpit and allow Postmark to send email

Is there an existing issue for this?

[X] I have searched the existing issues

Is your feature request related to a problem?
Mailpit works great, but it would be nice with documentation on how to bypass it in different scenarios. For example if you are using the combination of DDEV,  Drupal Symfony Mailer with Postmark.
This could be added under https://ddev.readthedocs.io/en/latest/users/usage/developer-tools/#email-capture-and-review-mailpit.
Describe your solution
Document or add a command for bypassing Mailpit in different scenarios.
Describe alternatives
No response
Additional context
No response

Do you mean how to tell your app not to use it?  That's your own app settings, not usually recommended though, as emails can escape. Mailhog had a feature to "release" emails, you'll find that on stack overflow, I imagine mailpit has that. @tyler36 ?

Yes, I want to allow emails to escape, by disabling Mailpit in DDEV. Releasing might also work? Though I think allowing to disable Mailpit would probably be preferable ...

@gitressa you'd just have to configure your app to not use Mailpit. Then how you want to send out mails is totally up to you. Mind that direct SMTP from your workstation would probably not work anyways.
The "overhead" of having Mailpit run is really minimal. It uses a mere 4MB RAM on my system while I don't use it.

Thanks for the feedback @jonaseberle. I am sending email with the Drupal Postmark module.

The Postmark module allows the administrator to switch the standard SMTP library over to use the third party Postmark API to send out emails from their site.

Also, I am using the Drupal Symfony Mailer to allow sending HTML emails. In the meantime I found these possibly relevant issues:

https://www.drupal.org/project/symfony_mailer/issues/3358693
https://www.drupal.org/project/symfony_mailer/issues/3277333
https://www.drupal.org/project/symfony_mailer/issues/3390630

What is the simplest way of disabling Mailpit in DDEV, to check if that solves it?

As Randy and me already said, just send it to somewhere different ;)
If you really want to stop the service:
jonas@www:/var/www/html$ supervisorctl stop mailpit
mailpit: stopped

jonas@www:/var/www/html$ supervisorctl status all
apache2                          RUNNING   pid 2057, uptime 0:02:00
child_exit_monitor               RUNNING   pid 2055, uptime 0:02:00
mailpit                          STOPPED   Dec 06 02:22 PM
php-fpm                          RUNNING   pid 2056, uptime 0:02:00

Thanks for the tip on how to stop Mailpit.
I get this message, where running Cron is used to trigger the sending of the email. The Postmark module does work in Drupal, I tested it via the "Test email" feature:
$ drush cron
 [error]  Message: Unable to send email. Contact the site administrator if the problem persists.

$ drush watchdog:show
 ----- -------------- ------------ ---------- --------------------------------------------------------------------------------------
  ID    Date           Type         Severity   Message
 ----- -------------- ------------ ---------- --------------------------------------------------------------------------------------
  390   06/Dec 14:43   cron         Info       Cron run completed.
  389   06/Dec 14:43   cron         Info       Execution of update_cron() took 20.32ms.
  388   06/Dec 14:43   cron         Info       Starting execution of update_cron(), execution of system_cron() took 22.19ms.
  387   06/Dec 14:43   cron         Info       Starting execution of system_cron(), execution of simplenews_cron() took 58.83ms.
  386   06/Dec 14:43   simplenews   Notice     0 emails sent in 0 seconds, 0 skipped, 0 failed permanently, 1 failed retrying.
  385   06/Dec 14:43   mailer       Error      Error sending email: Connection could not be established with host "localhost:1025":
                                               stream_socket_client(): Unable to connect to localhost:1025 (Cannot assign requested
                                               address)

There are a lot of moving parts here, and using Postmark is an extra factor.
So I'll just leave this issue as it is, and maybe someone using the rare combination of DDEV,  Drupal Symfony Mailer with Postmark can share their solution on how to bypass Mailpit. I'll update the issue summary as well, since disabling Mailpit is not the solution.

WIth symfony mailer you just have to change your setup to something that will accept emails.
This is what DDEV does in settings.ddev.php:
// Override drupal/symfony_mailer default config to use Mailpit
$config['symfony_mailer.mailer_transport.sendmail']['plugin'] = 'smtp';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['user']='';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['pass']='';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['host']='localhost';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['port']='1025';

You will just have to change that (do it in settings.php or settings.local.php after the inclusion of settings.ddev.php. But you'll have to have a mailserver somewhere willing to accept your emails. For example, from obsolete https://stackoverflow.com/a/62804492/215713

You need an smtp server that will accept regular SMTP traffic. These days, it will require a username and password. I used mailgun (https://www.mailgun.com/), which is free but requires a credit card. I'll assume you have this set up.

But this is something that should be done only with great

WIth symfony mailer you just have to change your setup to something that will accept emails.
This is what DDEV does in settings.ddev.php:
// Override drupal/symfony_mailer default config to use Mailpit
$config['symfony_mailer.mailer_transport.sendmail']['plugin'] = 'smtp';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['user']='';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['pass']='';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['host']='localhost';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['port']='1025';

You will just have to change that (do it in settings.php or settings.local.php after the inclusion of settings.ddev.php. But you'll have to have a mailserver somewhere willing to accept your emails. For example, from obsolete https://stackoverflow.com/a/62804492/215713

You need an smtp server that will accept regular SMTP traffic. These days, it will require a username and password. I used mailgun (https://www.mailgun.com/), which is free but requires a credit card. I'll assume you have this set up.

But this is something that should be done only with great care, and is not recommended if you could release emails you don't want to release to the world.

Didn't mean to close it, awkward keyboard. But this really is ready to close. The answer is... Use your CMS and its settings to direct your emails to where you want them to go. If it's not mailpit, then direct them to go where you want them to go. DDEV sets up mailpit for you default in many situations, including default usage of Drupal, but all you have to do is override that.

Thanks for the suggestions to both of you. The challenge is that Postmark is not using SMTP.

The Postmark module allows the administrator to switch the standard SMTP library over to use the third party Postmark API to send out emails from their site.

The method it is using: https://postmarkapp.com/developer/user-guide/send-email-with-api
As I wrote earlier, the Postmark test feature works well. If I go to Postmark settings (/admin/config/mail/postmark) and send an email via Test email > Recipient the mail is sent, and I receive it. So it does work.
Drupal's Mail System (/admin/config/system/mailsystem) set up like this:

Formatter: Default PHP mailer
Sender: Postmark mailer

This is why I think bypassing Mailpit would be easier, by disabling it from intercepting emails. But if it can be set up via settings.php that would be fine for me as well. I just don't know how.
PS. I am very much aware that you need to be cautious about not sending out emails by mistake :)

Since this is a fairly Postmark specific challenge, I have created How to bypass Mailpit in DDEV? Wherever a solution is found, I will share it in the other issue.
I do foresee that using non-SMTP services for email will be getting more and more popular, so it would be prudent for DDEV to also offer a solution for this scenario.

@gitressa, Postmark has SMTP support https://postmarkapp.com/smtp-service
So, your Drupal config should look something like this (not tested):
// Override drupal/symfony_mailer default config to use Postmark
$config['symfony_mailer.mailer_transport.sendmail']['plugin'] = 'smtp';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['user']='YOUR_POSTMARK_SERVER_API_TOKEN';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['pass']='YOUR_POSTMARK_SERVER_API_TOKEN';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['host']='smtp.postmarkapp.com';
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['port']='587';

Thanks @stasadev. Though Postmark may also support SMTP, the point of using Postmark can be specifically to not use SMTP, for whatever reason.
The Drupal Postmark module is for non-SMTP usage, see Does this module use the REST API or the SMTP endpoint?.

Just thinking maybe you can go the other way, there is a config schema for Drupal Symfony Mailer.
From https://git.drupalcode.org/project/symfony_mailer

Mailer Transport
By default, Symfony Mailer uses the sendmail transport. You can configure a
different transport such as SMTP at "Configuration » System » Mailer »
Transport".
This module provides a GUI for the built-in Symfony transports. 3rd-party
transports can be configured using the "DSN" transport, and entering the DSN
directly.

What if you use https://github.com/symfony/postmark-mailer instead of Drupal Postmark:
composer require symfony/postmark-mailer

$config['symfony_mailer.settings']['default_transport'] = 'dsn';
$config['symfony_mailer.transport_plugin.dsn'] = 'postmark+api://KEY@default';

For me, the only problem I see here is the lack of examples in the documentation.

Glad you figured it out, @gitressa. It's gread when different frameworks can use the same codebase.

Yes, it was nice for me to be reminded that Drupal is in fact based on Symfony, and libraries can be installed outside of a Drupal module.
It's so great that you bring a deeper understanding of PHP frameworks such as Laravel and Symfony to DDEV, and maybe even Drupal itself in the future?
By the way I tried again to set it up in settings.php, but I think some parts have a hard time "speaking together". It would be nice to have it as "temporary config" in settings.php and not via the GUI, since that may get accidentally committed. But this was as close as I got, though still not working (I get "Error sending email: Missing email transport: please configure a default."):
// Override drupal/symfony_mailer default config to use Postmark
$config['symfony_mailer.settings']['default_transport'] = 'dsn';
$config['symfony_mailer.mailer_transport.dsn']['plugin'] = 'dsn';
$config['symfony_mailer.mailer_transport.dsn']['configuration']['dsn'] = 'postmark+api://KEY@default';

I'll be closing the issue, since the problem is solved..

@gitressa, to better understand Drupal I looked into this:

It would be nice to have it as "temporary config" in settings.php and not via the GUI
I get "Error sending email: Missing email transport: please configure a default."

The name of the transport depends on the Machine name (id), for example, for the Postmark label it will be postmark:

Or the transport itself can be declared using YAML, by analogy with symfony_mailer.mailer_transport.sendmail.yml, I created a new transport (I don't know where better to store such custom configs):
$ cat web/modules/contrib/symfony_mailer/config/install/symfony_mailer.mailer_transport.postmark.yml
langcode: en
status: true
dependencies: {}
id: postmark
label: Postmark
plugin: dsn
configuration:
  dsn: 'postmark+api://KEY@default'

$ ddev drush config:import --partial --source=modules/contrib/symfony_mailer/config/install

And finally, set it by default and override it with a real key in the settings.ddev.php:
$config['symfony_mailer.settings']['default_transport'] = 'postmark';
$config['symfony_mailer.mailer_transport.postmark']['configuration']['dsn'] = 'postmark+api://REAL_KEY@default';

P.S. Symfony Mailer component has been added as a composer dependency in the upcoming Drupal 10.2.0 https://www.drupal.org/node/3369935 - the config syntax will be different.

It works perfectly, thanks @stasadev! ... and great with the heads up about the Symfony Mailer component in the future. I'll try to test with Drupal 10.2 at some point. I really hope your company starts working with Drupal (if they are not already?) since it's obvious that you could bring a lot of expertise along with you, into the Drupal community.


Problematic sky redshifts on P1 of tileid 24763, expid 189274, night 20230808

I marked 20230808/189274/24763 as unsure due to problematic sky redshifts on P1.  This is likely due to the noisy b1 amplifier after summer 2023 restart.

We could choose to mark this as good or to mark bad and reprocess.

Merging with #131, closing.


Support mapping from np.int and np.float

I have a NumPy array of values that I would like to put into Scylla. When I use np.ndarray.astype(SmallInt) it succeeds, but I get a marshalling error when I try to upload the data.
I am guessing that there is a lack of support for these types in scyllapy. I expect it to be a simple solution considering NumPy has Rust bindings.

Hi. I don't think that supporting such types is inside the scope of the driver.  Here's an example of how you can insert numpy array in your database without any issue.
import asyncio
from scyllapy import Scylla
from scyllapy import extra_types
import numpy as np

async def main():
    scylla = Scylla(
        contact_points=["localhost"],
    )
    await scylla.startup()
    await scylla.execute(
        "CREATE KEYSPACE IF NOT EXISTS test WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };"
    )
    await scylla.execute(
        "CREATE TABLE IF NOT EXISTS test.test (id int, data LIST<SMALLINT>, PRIMARY KEY (id));"
    )
    await scylla.execute("TRUNCATE test.test;")

    arr = np.array(range(10), dtype=np.int8)
    data = list(map(extra_types.SmallInt, arr))      # <-- Here's how you can convert numpy array to Scylla type

    await scylla.execute("INSERT INTO test.test (id, data) VALUES (1, ?);", (data,))
    res = await scylla.execute("SELECT * FROM test.test;")
    print(res.all())

if __name__ == "__main__":
    asyncio.run(main())

Yeah, that is what I do right now.
I think scope is purely defined by you; if you say it is within scope it would be. We wouldn't depend on numpy on the Python side, but on the rust side only. Please reconsider.


missing quotes

i'm using PhpStorm and it flags error at this line

Hi @iMokhles ,
Ok, thanks, merged!

This has caused pagination to not work correctly for me. After removing the quotes everything works fine.
When navigating using a page number, all of the rows are displayed. Using the next button results in the following JS error
Uncaught TypeError: Cannot read property 'nTr' of undefined
    at _fnDraw (jquery.dataTables.js:2021)
    at _fnReDraw (jquery.dataTables.js:2126)
    at _Api.<anonymous> (jquery.dataTables.js:7285)
    at _Api.iterator (jquery.dataTables.js:6875)
    at _Api.<anonymous> (jquery.dataTables.js:7284)
    at _Api.draw (jquery.dataTables.js:7038)
    at clickHandler (dataTables.bootstrap.js:49)
    at HTMLLIElement.<anonymous> (jquery.dataTables.js:5179)
    at HTMLLIElement.dispatch (jquery-2.2.0.min.js:3)
    at HTMLLIElement.r.handle (jquery-2.2.0.min.js:3)

PhpStorm squawks at me too, but as $crud->getDefaultPageLength() return s a number it's okay without quotes.
Can anyone else confirm this pagination issue?

Very bad change. 'pageLength' has to be int, not string. If it's a string, there is
a following problem (with example text below the table):

Load of first Table (crud) page:  "Showing 1 to 25 of 1 496 entries" <- OK
Load of second Table (crud) page: "Showing 26 to 1 496 of 1 496 entries" <- WRONG

And it's because 'END' is calculated in jquery.dataTables.js in fnDisplayEnd function, where
len = "25";
start = 25;
and return Math.min(start+len, this._iRecordsDisplay) returns 1496 instead of 50
It's because "25" + 25 = "2525"
and correct would be 25 + 25 = 50


all: restore to 77c1d99ece3c6c623bfab0b09ff9d87614fad978 state

Attempt to restore to lost commit. Recovered from oauth2-77c1d99ece3c6c623bfab0b09ff9d87614fad978 downloaded from GitHub - the download sadly doesn't include git history, and so far I've been unable to find a way to get something with git history.
https://github.com/sourcegraph/oauth2/commits/77c1d99ece3c6c623bfab0b09ff9d87614fad978
This branch compares against 2bc19b11175fd0ae72c59c53fa45eff3f93d6a46, which 77c1d99ece3c6c623bfab0b09ff9d87614fad978 was last updated with from upstream, to try and reconstruct the diff. It looks like the only change we're missing is https://github.com/golang/oauth2/pull/442

Closed by https://github.com/sourcegraph/sourcegraph/pull/51495


Support native Rust applets

When the applet is written in Rust and it is not a security problem for the applet to be compiled as a native static library and linked with the platform (for example if the applet doesn't use unsafe and is cooperative), then users should be able to do so for performance, footprint, or other reasons.
A possible idea to do so would be to require the applet to be async. When a host function is called, the following would happen:

The host function would store some information for the scheduler and yield.
The scheduler would execute the function, store the result for the applet, and resume the applet.
The host function would then see the result and return it.

Scheduling between applets and threads can only be done when applets call a host function. But given that this feature should be used when the applet is somehow trusted, it seems reasonable that it is also well-behaving and yielding regularly enough.

A simpler approach for a single applet would be to execute host functions without unwinding the stack. This means that the stack will grow proportionally to the WebAssembly threads stack (which shouldn't grow more than 5 threads for reasonable applets).


Please invite me to the Jaidevstudio Community Organization

Name
Shipra Kushwaha
Discord Username (if applicable)
Just_hunt#8792
Additional Context
Learn to more about open source.

It's great having you contribute to this project
If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord Server and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.

Invitation sent for the GitHub Organisation. Welcome to the community 🎉#
Don't forget after accepting to make it public so it appears on your GitHub profile for everyone else to see, you can do this by finding your name in the GitHub organisation list and change the dropdown to public https://github.com/orgs/jaidevstudio/people
Like this

Tips for practising:
Remember contributing to open source is not just about code, its about collaboration, communication and adding value
I hope that helps

Please check your email or organisation page 🙏


[pickles] Use Typ.t's to_field_elements everywhere

This PR builds upon #11083.
This removes the explicit modules that determine the 'public input' of circuits' main functions, to give us the flexibility of choosing between 'inputs', 'outputs', or 'inputs and outputs' depending on the needs of the circuit (in an upcoming PR). This also ensures that we are using the same code for to_field_elements, by using the one provided by the Typ.t.
Checklist:

[ ] Modified the current draft of release notes with details on what is completed or incomplete within this project
[ ] Document code purpose, how to use it

Mention expected invariants, implicit constraints

[ ] Tests were added for the new behavior

Document test purpose, significance of failures
Test names should reflect their purpose

[ ] All tests pass (CI will check this if you didn't)
[ ] Serialized types are in stable-versioned modules
[ ] Does this close issues? List them

Closing, tracked as an issue in https://github.com/MinaProtocol/mina/issues/14828.


Organize and add test and documentation for printIdentifier helper

This is something that is quite useful for any external tool that want to write some typespec code(Openapi3 to tsp converter for example or api view)
Edit: actually that was already exported as that exact name directly from the formatter. This then just adds tests

All changed packages have been documented.

:white_check_mark: @typespec/compiler

Show changes
@typespec/compiler - internal ✏

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3792/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3792/


INVALID_PARAMETER_VALUE: Model registry functionality is unavailable

If you like the repo, please give it a :star:
Description
While trying to use kedro-mlflow with sqlite backend, I receive the following error in the UI:
INVALID_PARAMETER_VALUE: Model registry functionality is unavailable; got unsupported URI 'file:///kedro/data/06_models' for model registry data storage. Supported URI schemes are: ['postgresql', 'mysql', 'sqlite', 'mssql']. See https://www.mlflow.org/docs/latest/tracking.html#storage for how to run an MLflow server against one of the supported backend storage locations.

mlflow.yml is the default generated configuration with the following changes:
server:
  mlflow_tracking_uri: data/06_models/ # if null, will use mlflow.get_tracking_uri() as a default
  mlflow_registry_uri: data/06_models/registry.db # if null, mlflow_tracking_uri will be used as mlflow default

Happy to submit a more thorough issue w/ reproducibility information etc, but want to first sanity check if there is an obvious mistake in my understanding of the registry configuration?

Hi @andrewcstewart, actually your configuration is almost correct: when you do not specify the dialect of your URIs, they are interpreted as local uri, and so they are converted to an absolute path prepended with file:///. This actually makes senses: if you use a relative path, mlflow cannot "guess" what type of database you are using.
You need to use an absolute path, and to preprend it with sqlite:/// dialect, so your configuration becomes:
server:
  mlflow_tracking_uri: data/06_models/ # <- ok, if it is relative it will create a mlruns folder here
  mlflow_registry_uri: sqlite:///absolute/path/to/data/06_models/registry.db # <- change this line

Aha, that makes sense.  The thought occurred to me but I thought I pulled that directly from an example in the docs and figured the plugin's automatic handling of relative paths -> abs paths must also be autodetecting .db as sqlite.
Anyway, thanks!

I think I should rather correct the documentation than trying to autodetect sqlite URI 😅 The URI validation logic is already quite complicated due to subtle differences between linux / windows / macOS.
This would make extra assumptions (is your .db really a sqlite file? there are a lot of other possibilities! Is .db the only extension I should detect? This is likely the most common, but it is not completely standardized), and I don't think Ishould  go against mlflow decisions here.
I let the issue open to  remember to correct the documentation which is indeed incorrect.

Little bit of missing context behind my presumption there is I had come across some issue over at https://github.com/mlflow/mlflow about defaulting to sqlite:// when registry_uri contains .db (or something along those lines).


Added registration links

Link-checker failures are unrelated or temporary, no need to hold up a merge because of that.


Update object to 0.18

Object 0.18 completely rewrites the core parsing/writing of most object formats to not depend on goblin and to copy less data while parsing. This release also fixes several bugs, including some preventing linking of generated object files using lld.
https://github.com/gimli-rs/object/compare/0.17.0...0.18.0

👍


Switch warehousecontroller from using non-LTS ubuntu for docker

Travis is no longer able to build docker images based on 16.10 as its apt sources are 404 now.
https://www.ubuntu.com/info/release-end-of-life

wontfix


Bump base images to latest

Pull Request Motivation
#4033
Kind
/kind cleanup
Release Note
NONE

/cherry-pick release-1.10

/cherry-pick release-1.11

/test pull-cert-manager-master-make-test
/test pull-cert-manager-master-e2e-v1-26
(node was terminated during the tests)

/test pull-cert-manager-master-e2e-v1-26
/test pull-cert-manager-master-make-test

NB: The cherry-picks failed because the base images were already up to date on release-1.10 and release-1.11 - presumably because I did that manually ready for the releases of 1.11.0 and 1.10.2. Just hadn't done it for master.


test flake: bins/tsan/h2_full+workarounds_nosec_test retry_too_many_attempts

seen on master (for the first time)
https://source.cloud.google.com/results/invocations/db74ebf3-4118-4ea3-be39-a277734abbb9/targets/github%2Fgrpc%2Fc_linux_tsan_native_x64_clang7.0/tests
D0531 13:56:11.389324057   15848 test_config.cc:391]         test slowdown factor: sanitizer=5, fixture=1, poller=5, total=25
D0531 13:56:11.415105048   15848 ev_posix.cc:145]            Using polling engine: poll-cv
D0531 13:56:11.419121732   15848 dns_resolver.cc:339]        Using native dns resolver
I0531 13:56:11.421601408   15848 retry_too_many_attempts.cc:47] Running test: retry_too_many_attempts/chttp2/fullstack
D0531 13:56:11.562884046   15848 retry_too_many_attempts.cc:155] client_peer_before_call=localhost:13341
D0531 13:56:11.563050040   15848 dns_resolver.cc:280]        Start resolving.
I0531 13:56:11.579305085   15848 subchannel.cc:608]          New connected subchannel at 0x7b0800000380 for subchannel 0x7b540000ff00
D0531 13:56:11.590403977   15848 retry_too_many_attempts.cc:197] server_peer=ipv6:[::1]:38086
D0531 13:56:11.590496394   15848 retry_too_many_attempts.cc:201] client_peer=ipv6:[::1]:13341
D0531 13:56:12.596951747   15848 retry_too_many_attempts.cc:238] server_peer=ipv6:[::1]:38086
D0531 13:56:12.597011859   15848 retry_too_many_attempts.cc:242] client_peer=ipv6:[::1]:13341
D0531 13:56:13.601243637   15848 ev_posix.cc:145]            Using polling engine: poll-cv
D0531 13:56:13.601373491   15848 dns_resolver.cc:339]        Using native dns resolver
E0531 13:56:16.641495372   15848 ev_poll_posix.cc:1687]      assertion failed: res == 0

https://github.com/grpc/grpc/blob/70ce9e21df4f6a18fbcfbb2103d1e89987125f4a/src/core/lib/iomgr/ev_poll_posix.cc#L1687

Last occurrence of this I found in from 3 months ago.
https://source.cloud.google.com/results/invocations/10a170d7-7fa0-4217-8f86-f8f11fa2f0ce
Seems safe to close


Add internal event emitter

This is a solution to the following problem:
External (non-chain) handlers of ChainEventEmitter events can't be guaranteed that the proper side effects (internal to the chain) have been performed, at the time that the external handler is triggered.
This problem has been hinted at in #1655, where a new event is introduced, rather than relying on the existing events.
It's done for the following reasons:

the BlockPool is currently not part of the public IBeaconChain interface, so the sync can't retrieve the 'missing ancestor'
the sync can't really rely on the BlockPool being properly updated when the "error:block" event is fired/handled

Number 1. can be rectified fairly easily, either with a public method or public member on IBeaconChain
its 2. that this PR deals with.
The problem stems from the fact that multiple event handlers can be run concurrently (in the case that handlers are async / have async steps).
This means that external chain event handlers can be interwoven with internal chain event handlers in a way that exposes external handlers to an inconsistent chain state.
There are several ways to handle the problem, this is an attempt to systematically resolve it.
This PR adds an "internal event emitter" that is used to wire together chain submodules.
The chain's event handlers subscribe to this internal emitter.
These handlers perform various important side effects (eg: updating caches/db) that we want completed before external handers can run.
Once the chain's event handler finishes in its entirety (async function completes), the same event, with the same args is emitted from the public/external event emitter, where downstream consumers can attach event handlers.

so the internal emitter and emitter throws same event with same data.
in the case of #1655 , validate.ts throws error:block with missing parent root while sync doesn't want that missing parent root, it wants missing ancestor root.
if we go with this, we have to publish BlockPool to chain.ts and sync should consult BlockPool itself to get missing ancestor root.

Introduce "internal" event prefix.

That was my original thought as well. I ended up not doing this for a few reasons.
IMO these internal events shouldn't be available at all to outside consumers. Its not like the internal events are any different semantically, in fact, they're the exact same. The only difference to consumers is that one fires before the chain is in a coherent state, and one fires after the chain is in a coherent state.
Making a distinction between the internal and external events means we need duplicate event types. Again, the events are exactly the same, one-for-one copies of each other.
Using internal events mean that chain modules now need to be aware of the internal/external distinction (by emitting internal events).
While it is more explicit to have internal events, IMO it will be more straightforward and DRY to have a single event interface, just used internally and externally. The fact that the second (internal) event emitter exists, which also fulfills the same interface, should be an implementation detail irrelevant to chain consumers.


API to generate jpeg file

Hi, I want to use api to generate jpeg file, but the screenshot option 'type' can not use, because in the URL already has 'type' parameter for choose pdf or screenshot, please help thanks.

@virtualorz I appended screenshot image parameter a bit ago.
http://localhost:3000/?url=http://google.com&type=screenshot&screenshotType=jpeg


Cannot read property 'sign' of undefined

Cannot read property 'sign' of undefined
react-native:57.0

Same issue

i also have the same issue, with react-native: 0.58.4

Hey Guys!  Can someone here help me?

Hey, I've just released v2!
Please read the README and give me feedback.

Please can this issue be re-opened?
I am getting this error also on, using "react-native-pure-jwt": "^3.0.2" and "react-native": "0.71.8"


[Bug] EvernoteOAuthActivity not translated

Steps to reproduce:

Open EvernoteOAuthActivity with english language on device
Head back to previous activity
Change language in device settings
Open app and reopen EvernoteOAuthActivity
Result: EvernoteOAthActivity is left translated in previous language

That is fixed. The new version 2.0.0 uses the main Evernote app for authentication and the fallback EvernoteOAuthActivity now listens for config changes.


Failed to run cloned experiment

Hi, I'm trying to run cloned experiment with no success.
The steps I  have made:

cloned the ultralytics/yolov5 project from github https://github.com/ultralytics/yolov5.git
added trians -agent integration code to the train.py file.
run manually the train.
after trains captured the experiment I cloned it.
TRAINS-AGENT deamon took the cloned Exp. and run it.
the run failed with this error. (full log task_c01ad3b002704b89ad76531e5092b05b.log)

ERROR: For --editable= git+https://github.com/cocodataset/cocoapi.git@8c9bcc3cf640524c4c20a9c40e89cb6a2f2fa0e9#egg=pycocotools, only bzr+URL, git+URL, hg+URL, svn+URL are currently supported
ERROR: For --editable= git+https://github.com/cocodataset/cocoapi.git@8c9bcc3cf640524c4c20a9c40e89cb6a2f2fa0e9#egg=pycocotools, only bzr+URL, git+URL, hg+URL, svn+URL are currently supported
RequirementsManager handler raised exception: Failed installing GIT/HTTPs package '-e git+https://github.com/cocodataset/cocoapi.git@8c9bcc3cf640524c4c20a9c40e89cb6a2f2fa0e9#egg=pycocotools'
trains_agent: ERROR: Could not install task requirements!
Failed installing GIT/HTTPs package '-e git+https://github.com/cocodataset/cocoapi.git@8c9bcc3cf640524c4c20a9c40e89cb6a2f2fa0e9#egg=pycocotools'

What should I do?

Could you attach :

Full trains-agent execution log (from the results->log tab)
List of installed packages as captured from the "manual" run
What is the trains-agent version?

BTW:
If for any reason you see a missing package or wrong version, just right-click the Task, select Reset, then you can edit the installed packages (the same way you edit requirements.txt) and fix the missing package.
In your case, based on the original yolov5 requirements
I would replace the pycocotools line with:
git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI
Notice there was a bugfix with trains-agent fixing the #subdirectory=PythonAPI suffix in git repo python install.
I recommend testing with
pip install trains-agent==0.15.2rc0

thanks for the fast reply :)

attached above task_c01ad3b002704b89ad76531e5092b05b.log
above.
trains-agent version 0.15.1

in addition to trains-agent==0.15.2rc0 do I need a compatible version of trains?

Hi @omricarmi

in addition to trains-agent==0.15.2rc0 do I need a compatible version of trains?

No need to change the trains version, just the trains-agent :)

Great it works thanks


Implicit package references language update

Mods based on @fleed feeback in https://github.com/dotnet/docs/pull/1833
Thanks to @fleed for calling these changes out.

Thank you @GuardRex . Sorry if I couldn't complete changes because of missing time.

@fleed Thanks for bringing this up and getting it on track. I just moved it over here b/c I didn't know if you were available to keep working on it. We're just trying to get some stuff merged and closed. Thanks again for your help. :+1:


How To - Work with local models

Summary
Add the how-to doc: Work with local models

Internal previews

📄 File
🔗 Preview link

docs/ai/how-to/work-with-local-models.md
Use Custom and Local AI Models with the Semantic Kernel SDK

@catbutler ready for your review

Finally got back in the PR swing of things, so you get proper suggestions now! 😃 Also found more metadata guidelines for titles and descriptions.
I like this doc's elegant structure and supporting snippets. It did leave me wondering how to use the steps to integrate a given model - that might be me failing to see something, but if that isn't covered I think it should be. I also left some specific suggestions inline. Cheers!

@catbutler thanks for the review! You have a good point that the code samples could show some more mock code about interacting with your model from the service classes. I updated the code snippets with some more mocks.
Ready for a second pass!

When do you plan to add the new docs to the TOC in the working branch?

As soon as that PR is merged, we're waiting to complete any other PRs until then. I'll update this PR to include the TOC addition.

When do you plan to add the new docs to the TOC in the working branch?

As soon as that PR is merged, we're waiting to complete any other PRs until then. I'll update this PR to include the TOC addition.

@gewarren TOC update is now added to this PR!

A couple of general notes on the whole doc:

We need to add a clear description, that accessing custom LLMs (i.e.: Llama2) is also using HTTP calls. That means that the model need to be hosted 1st, using ollama in example. The prerequisites explains this, a link to this ollama blog may help the audience to know how to run local models (https://ollama.com/blog/openai-compatibility)
In the MyTextGeneration.cs and MyChatCompletion.cs samples, we use MyModel as a mock model (docs/ai/how-to/snippets/semantic-kernel/model/MyModel.cs). It will be nice to mention and explain that this is a mock model.
This is a just a suggestion: besides the mock MyModel.cs, I think we will share some value to show an implementation of a real custom model implementing the http requests to a local model. Something like this one (https://github.com/elbruno/semantickernel-localLLMs/blob/main/src/sk-customllm/CustomChatCompletionService.cs). And show the lines on how to change the [var service = new MyChatCompletionService();] to the real custom model.

A couple of general notes on the whole doc:

We need to add a clear description, that accessing custom LLMs (i.e.: Llama2) is also using HTTP calls. That means that the model need to be hosted 1st, using ollama in example. The prerequisites explains this, a link to this ollama blog may help the audience to know how to run local models (https://ollama.com/blog/openai-compatibility)
In the MyTextGeneration.cs and MyChatCompletion.cs samples, we use MyModel as a mock model (docs/ai/how-to/snippets/semantic-kernel/model/MyModel.cs). It will be nice to mention and explain that this is a mock model.
This is a just a suggestion: besides the mock MyModel.cs, I think we will share some value to show an implementation of a real custom model implementing the http requests to a local model. Something like this one (https://github.com/elbruno/semantickernel-localLLMs/blob/main/src/sk-customllm/CustomChatCompletionService.cs). And show the lines on how to change the [var service = new MyChatCompletionService();] to the real custom model.

@elbruno thanks for the feedback! I've incorporated the suggested changes:

Add details to the introduction that explain most models will be accessed via HTTP and REST APIs, you'll need to host the model in a way that is accessible to your application via HTTP, a link to the Ollama blog as an example of a REST API for completions.
Removed the mock model and replaced it with HTTP requests
Added comments to the service initializers to show that's where the user would update the configuration based on their service implementation.

@haywoodsloan One general feedback item for this doc and others - can we try to format code samples so that they render without horizontal scrollbars? We usually break long lines of code onto multiple lines so the user can see it all at once.


Port channel upgradeability into relayer-next

Background

ibc-go is planning on releasing channel upgradeability in Q2. As such, the requisite components of this feature will need to be implemented in Hermes for it to go live in the ecosystem.
This issue tracks the threads of work that feed into the completion of implementing channel upgradeability in Hermes.
## Tasks
- [ ] Implement abstract IBC handshake components in relayer framework
- [ ] Implement channel upgradeability such that it can be performed in a manual ad-hoc fashion
- [ ] Implement an `auto_handshake` function similar to the `auto_relay` function

For Admin Use

[ ] https://github.com/informalsystems/hermes/labels/tracking or https://github.com/informalsystems/hermes/labels/okr label (as well as any other appropriate labels) applied
[ ] Appropriate milestone (priority) applied
[ ] Appropriate contributors tagged

Closing this as out-of-scope: porting channel upgradability will be implemented in Hermes v1.


Open this case again: On Xamarin.Forms after update to pre version:<IP_ADDRESS>-pre2 Android project fail to build

@daniel-luberda Hi,
Sorry to say that in indeed it's a FFImageLoading issue, but I think is an easy one, since in this new pre-release version of Xamarin.Forms they moved to Xamarin.Android.Support.v4(and Friends) to version <IP_ADDRESS> all you need to do is just re-build the nugget packages with that version.
For confirming that it's a FFImageLoading I tried removing all packages from my project, install lates pre-release of Xamarin.Forms <IP_ADDRESS>-pre2, install again all packages that I was using except FFImageLoading and try to build, and It succeeded, then Add FFImageLoading and try to build, it failed with the errors I posted before.
After that I created a new project, installed Xamarin.Forms <IP_ADDRESS>-pre2, build succeeded, install FFImageLoading and Failed again.
I was reading in the same post you point it out and people says they are having this issues with 3rd party libs that need to update their Xamarin.Android.Support.v4(and Friends) to version <IP_ADDRESS>
Thank You

@lecnierfreeman Thanks for the info. I didn't test alpha Xamarin.Forms yet. I'll give it a look soon.

I can confirm and I just recompiled FFImageLoading.Forms.Droid w/ Forms <IP_ADDRESS>-pre4 and all is back to normal.  I think I'm gonna wait for you guys to release on NuGet with the update.
Awesome Work!  Love this Plugin.

@daniel-luberda I'm using XF <IP_ADDRESS>-pre4 and having the same issues. I have Android Support library 23.3.0.

Xamarin Forms 2.2.0 stable just got released, any chance you can get a new nuget package out so we can use the new forms build in Android? Thanks :)

Have same errors, as above. Can not get it to work with latest stable Forms build on Android. Shows multiple "missing resource" errors

Upgraded xamarin forms to version 2.2, I can't build, same issue as others.

This is really urgent. 2.2 is a stable release now and it doesn't build with FFImageLoading.

@daniel-luberda Is it fixed in master?

@molinch Yes, sort of. The XF packages aren't updated in the Master yet. But if you do update them and build, it's running fine.
Currently running the new compiled version on beta's on iOS and Android for about a week now, without problems.

Thanks for the feedback @timbrand !
I'll do that then

@molinch I'll fix that and release alpha nuget now.

Thank You, Thank You, Thank You, I've been waiting for this two weeks, couldn't build Android.

FFImageLoading 2.1.0-alpha2 nuget with Xamarin.Forms <IP_ADDRESS> support released.

can confirm it works.
but only after you add the references to the platform-specific project, too.
i'm pretty new to the xamarin-thing so i don't know if that's normal.

At the moment, I'm getting a weird
Exception in thread "main" error in COMPILETODALVIK

@adrianknight89 TBH I don't know why you got this but it definitely seems to be a Xamarin or Android issue
Thanks for posting the solution! It will be useful in case somebody else gets it in the future.

@krisrok Yes that's the normal scenario :)

I have done some testing over the past couple of hours. The XF2.2 version compiles/runs for me.
However, I am seeing some perf degradation in the alpha nugets compared to the original nugets. My observations:
1- Loading the images on start-up (from DiskCache I'm guessing) seems particularly slow as well. If I turn the app off/on there is always a long lag at the beginning until the images show up. This lag feels slower than what I had in the previous FF nugets.
2- Are the images loaded in a different order than before? Looks like some of the last ones now show up first. This could be what's causing the slowness perception.
Is this expected? Is it possible to revert to the "old" method of caching within this nuget?

Does the latest build really depend on XF2.2? I have a lot of issues with XF 2.2 right now on Android so I am holding off on upgrading.

@patook I created https://github.com/molinch/FFImageLoading/issues/188 for your issue it will be easier to continue there

FYI we have the latest version of FFImageLoading (compiled from source) in production for the past two days on iOS and things are stable.

@daniel-luberda Can I let you answer @ravensorb's question?

@ravensorb  Yes, It depends on it. I'll try to make two nugets on release "old Forms" and "new Forms" as those builds are not compatible.

Interesting -- what changed that sets the hard dependency?

Actually, Xamarin.Forms 2.2 (Android) itself, I'll try to investigate if we can do something about it to be independent of that.

I don't think you can. If you use the android app compat packages, you have to set the nuget dependency to a specific version (just as Forms does). Or you could depend on a Forms version range (2.1.X or 2.2.X), which in turn would depend on a specific AppCompat version...

@tobiasschulz  Thanks to @aritchie, we'll probably have this sorted out and be compatible with all XF versions in one package:

remove resources.cs and edit your csproj. Remove

2.1.0-rc1 nuget released. As always, testers needed.

@ravensorb @patook @adrianknight89 @krisrok @lecnierfreeman Could you please test the release candidate and tell us in case you find anything weird?
We would like to release it this as soon as possible.
Thanks !

@molinch The build I got from source has been in production on the iOS app store for over a week and is running perfectly. I have had zero crashes in the last 5,000 sessions with the 2.1 build (and XF2.2).

Hmmm this is really bugging me, I am having absolutely major issues with 2.1.0-rc1 with xamarin forms 2.2. Images aren't getting cached. I have them in a list view, they get downloaded each time. When I click on the cell to go to next page, the same image is again displayed in the content page, and it's getting re downloaded. I close the app, turn off net, open the app, and images are not there, error place holder is shown. Also in my list view  scrolling through the list, you can see other images briefly be loaded where they shouldn't be.
My bindings are in the XAML
<ffimageloading:CachedImage
WidthRequest="100"
HeightRequest="100"
DownsampleToViewSize="true"
DownsampleUseDipUnits="true"
Aspect="AspectFill"
LoadingPlaceholder="ImageLoading.png"
ErrorPlaceholder="ImageLoadingError.png"
Source="{Binding FirstImage}" />

@michaeldimoudis Did you try the newest nuget (RC1)? Is it on Android/iOS? I'll need more details.

Yea I'm on RC1. It's iOS. I'll fire up Android and see if it's the same...

@daniel-luberda it's fine on Android. Just iOS is my issue... I'll keep trying some things, cleaning, resetting sim, etc.

@michaeldimoudis It has to be something specific to your project. Do you empty any caches? Do you preserve caches between app deploys?

@daniel-luberda nop, just a stock standard implementation. I init it in AppDelegate, and just call CachedImage where I need to. The only non standard thing is my ImageService initialize which is this. This all worked as expected before I upgraded forms and FFImageLoading nuget packages.
        ImageService.Instance.Initialize(new Configuration
        {
            FadeAnimationDuration = 50,
            HttpClient = new HttpClient (new AuthenticatedHttpImageClientHandler (() => new SecureStorage ()))
        });

It is so weird, that if I load the image in the ListView, and then go to another page with the same image, it re downloads it arrrgghh :(
I'm on the beta channel of Xamarin Studio. If I have time later I might go to the previous branch with the stable nuget, and see if this anomaly keeps happening... I pretty much just updated the nuget package, and converted my ListView to have DataTemplateSelector and that's all...

Ok there is something weird going on with FFImageLoading 2.1.0 on iOS, I restored my project back to master with xamarin forms 2.0 and FFImageLoading <IP_ADDRESS>, worked as expected, cached when offline as expected. I then only updated FFImageLoading to 2.1.0 rc1 and images don't get cached. Obviously I let the app re download the images on 2.1.0, closed app and turned off my wifi, opened app, and all images were now broken. I did get this error in the output window once, not sure if it's much help: WARNING: An HttpWebRequest was added to the ConnectionGroup queue because the connection limit was reached.
It's approaching midnight where I am, so I'll leave this here, if you need me to do any other debugging let me know.

You are right I confirm the issue. I'm working on it.
Many thanks for reporting it 👍

@molinch is this something that was newly introduced in the last week? I have last week's build of 2.1 from source and am not seeing such an error (I think).

@patook the bug is only on iOS

@michaeldimoudis fixed in git, should be available soon via nuget

@molinch no probs, glad this was caught now not later :) Nuget isn't updated yet, you get an ETA for that? Cheers.

Hi @molinch are the RC2 nugets up?

@patook you can look it up yourself at https://github.com/luberda-molinet/FFImageLoading
just scroll down to the version history. the topmost entry is the newest version available on nuget.

Unfortunately Daniel's PC is broken now: some liquid fell on it.
So we will need to wait 1 or 2 additional days before having the final nuget.
Meanwhile you can use, as krisrok said, the prerelease nugets.

Released 2.1.0-rc2 release, feel free to test it as it's stable candidate. If you're using 2.1.0-rc1 on iOS, it's very important to update as that version has a bug that causes caching to be disabled. Thanks.

i am still hitting the corrupt data error after loading the latest version.
Unable to read package from path 'Xamarin.FFImageLoading.Forms.2.1.0-rc2\Xamarin.FFImageLoading.Forms.2.1.0-rc2.nupkg'.
  File contains corrupted data.

+1

2.1 released which supports new XF and fixes corrupted package issue.
Many thanks @ravensorb for your help and debugging!


Print Capability

Could you please add a button to print this documentation?

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

ID: 808812eb-d44a-e405-70ed-4d15ed9be975
Version Independent ID: a3144c13-db26-9dbc-30d8-ae6ca52457af
Content: Errors and Exception Handling (Modern C++)
Content Source: docs/cpp/errors-and-exception-handling-modern-cpp.md
Product: visual-cpp
GitHub Login: @mikeblome
Microsoft Alias: mblome

@kringej Do you see a "Download PDF" link below the navigation pane on the left. You might need to scroll down to see it, depending on your display settings.


Run mypy via CI

This enables the "Mypy Check" GitHub Action.
https://github.com/marketplace/actions/mypy-check
I'm using @master instead of a tag, because the latest tag is 0.971, whereas master seems possibly to update to new stable mypy versions more often.
The documentation says:

Make sure you have a mypy.ini or setup.cfg file at the root of your repository!

But I'm hoping I may not need to do that here, because I'm using the default configuration. (Running mypy manually, on this repository, does not require any configuration file.)

Although this does work, I wrote the mypy.yml file based on my erroneous assumption that I could use actions/setup-python to set the Python version, which appears not to be the case: I specified 3.11 that way, but 3.10 is used.
So I think I have to specify the Python version in the configuration of actions/mypy-check itself, as documented for it.


Implement the query parsing in the default doc mapper & disable range queries

Range queries are not possible today in quickwit. We need to disable them.

Renamed the issue as we first need to implement the query parsing in the default doc mapper.

@evanxg852000 I see that you assigned the ticket to yourself. Here is a bit of guidance.
One "clean" way to do this is as follows.
Depend on the tantivy-query-grammar crate.
https://docs.rs/tantivy-query-grammar/0.15.0/tantivy_query_grammar/enum.UserInputAst.html
Parse the user query into an UserInputQuery object.
Go recursively through the Ast (no worries there cannot be any cycle) and check that there are no range within the query.

If there is a range, return an Error explaining ranges are not supported for the moment.

@evanxg852000 I think you should also factorize our trivial query building logic.
A good way to do it might be  to introduce a pub(crate) in doc_mapper.rs
pub(crate) fn build_query(
    schema: &Schema,
    request: &SearchRequest,
    default_fields: Vec<String>,
) -> Result<Box<dyn Query>, QueryParserError> { ... }

That implements does the field name resolution, the no range query check, and the query parsing boilerplate.
Then have the different mapper call this function.
(an alternative solution that might seem logic would be to have a blanket implementation in DocMapper and add a default_fields method in the trait.. I am not fond of this solution because it requires adding the default_fields method in the trait, but feel free to challenge it.)

Thanks @fulmicoton for the explanation, I was already wondering how would I plug my code to check for Range since the tantivy query parser does all the work without exposing intermediate step/object. But yes this is the cleanest solution for our case while avoiding duplication of the parser.
On the second note, I will go with your solution. To me, this has an advantage in handling all this in one site.

The benefit is minor... By adding the build_query function, you can implement the logic in every call traits. On the other hand, it forces us to add a default_fields method in the trait, even though this is not necessarily something that always makes sense.


I wonder how energy for fine-grained behavior is reflected in timeloop-accelergy.

Hi. First of all, thank you for your great works.
I have a question about your works.
One of the contributions of the Accelergy paper is to support energy for fine-grained actions. But I think Timeloop doesn't define fine-grained behaviors like gated_MAC or repeated/random access.
Can you tell me how the energy of fine-grained actions is reflected when I run Accelergy and Timeloop together?
Thanks

Thanks for bringing up the question!
You are correct that Timeloop does not define the fine-grained behaviors of the components. In fact, the current version of Timeloop-Accelergy infrastructure does not reflect the energy differences of the fine-grained behaviors yet; Timeloop currently only captures coarse-grained actions. That is something we aim to address as future work.


Can i skip the location permission?

i want to use this library without location permission as my bluetooth device is not a beacon device. so can i scan devices without location permission?

Related stackoverflow question


Difference btwn Attack_screen and Attack_Attack_screen?

Firstly, I really appreciate that you opened this great API to us.
By the way, I found very similar actions while their ids are different -
Attack_screen (12) and Attack_Attack_screen (14).
Similarly, there are also Attack_minimap (13) and Attack_Attack_minimap (15)
I wonder what is different between those.
Thank you.

Any ending in _screen take a point on the screen, whereas those ending in _minimap take a point on the minimap. Since those can be different resolutions and have similar but different effects they're split into different functions.
Attack_screen vs Attack_Attack_screen is general vs specific. An easier example is Burrow where each unit that can burrow has its own ability, but they're all very similar so there's a general Burrow. It turns out there are a few versions of attack as well (eg for units in a bunker, or for support units like a medivac) that are a bit different than a normal attack, but that are conceptually similar enough to merge into a general Attack.

@tewalds Thank you!


1145 refactor admin resolver from master

🍰 Pullrequest
getUserCreations makes 6 Calls to the database so we want to change the calls so we only need 1 or maximal 2 calls for the transaction_creations and login_pending_tasks_admin
Issues

fixes #1145
fixes #1165

Todo

[x] Create call on transaction_creations
[x] Create call on login_pending_tasks_admin
[x] Calculate the open creations
[x] Test functionality

This looks great - thank you for optimizing those queries!


Update the architecture document

Update the current document to follow the 3.0 architectural changes

Also see #392

duplicate of  #392


Comment counter

Comment counter
In this pull request I have added the counter to count the length of the comment and display the number of comment when the pop up comment is loaded. The number will be increased if the comment is added

Thanks for your feedback @brhanuhailu  😎


Confusing information about webchat use on IRC -dev

From IRC http://irc.minetest.net/minetest/2018-11-17#i_5440860
23:25 Hawk777         On the IRC rules page: “Webchat cannot be used on #minetest-dev.” Also on the IRC rules page: a link to #minetest-dev in Webchat. Maybe someone should remove that?
23:27 Hawk777         Although, the wiki version of the IRC rules says Webchat users can actually join the channel, just not talk. So, perhaps the text just needs clarifying.

They already made a PR


cli-plugin-unit-jest constantly needs to be re-installed

Version
4.1.1
Environment info
Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 13.3.0 - /usr/local/bin/node
    Yarn: 1.19.2 - /usr/local/bin/yarn
    npm: 6.13.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 79.0.3945.117
    Firefox: 71.0
    Safari: 13.0.4
  npmPackages:
    @fullcalendar/vue: ^4.0.2-beta => 4.3.1
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  3.12.1
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  3.12.1
    @vue/cli-plugin-babel: ^3.7.0 => 3.12.1
    @vue/cli-plugin-eslint: ^3.7.0 => 3.12.1
    @vue/cli-plugin-unit-jest: ^4.1.2 => 4.1.1
    @vue/cli-service: ^3.7.0 => 3.12.1
    @vue/cli-shared-utils:  3.12.1 (4.1.1)
    @vue/component-compiler-utils:  3.1.0
    @vue/eslint-config-prettier: ^4.0.1 => 4.0.1
    @vue/preload-webpack-plugin:  1.1.1
    @vue/test-utils: ^1.0.0-beta.30 => 1.0.0-beta.30
    @vue/web-component-wrapper:  1.2.0
    babel-helper-vue-jsx-merge-props:  2.0.3
    eslint-plugin-vue:  4.7.1
    highcharts-vue: ^1.3.5 => 1.3.5
    jest-serializer-vue:  2.0.2
    vue: ^2.6.10 => 2.6.10
    vue-chartjs: ^3.4.0 => 3.5.0
    vue-clipboard2: ^0.3.0 => 0.3.1
    vue-eslint-parser:  2.0.3
    vue-flatpickr-component: ^8.1.2 => 8.1.5
    vue-gtag: ^1.1.1 => 1.1.1
    vue-hot-reload-api:  2.3.4
    vue-jest:  3.0.5
    vue-loader:  15.7.2
    vue-moment: ^4.0.0 => 4.0.0
    vue-nestable: ^2.4.4 => 2.4.5
    vue-particles: ^1.0.9 => 1.0.9
    vue-router: ^3.0.6 => 3.1.3
    vue-spinner: ^1.0.3 => 1.0.3
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vue2-dropzone: ^3.6.0 => 3.6.0
    vue2-transitions: ^0.2.3 => 0.2.3
    vuex: ^3.1.1 => 3.1.2
  npmGlobalPackages:
    @vue/cli: 4.1.1

Steps to reproduce
(with a Vue project already started in the Repo)
0. npm run serve

npm install -g @vue/cli
brew install yarn
vue add unit-jest
(On another machine using the repo) Create a branch and install a new package using npm install --save

What is expected?
The unit-jest (cli-plugin-unit-jest) package will still be found in the new branch (within the same directory) and the npm app will start/run successfully with no errors. This is how this works on other machines running this setup in our Org.
What is actually happening?
The unit-jest package has to be continually reinstalled, sometimes within the same branch after installing a new package. This doesn't seem to happen globally across all systems in our organization, but creating a branch and installing a new package make it happen. It seems like the installation of a new package wipes the cli-plugin-unit-jest package.

When I installed it on my machine it worked fine. However, it doesn't stay installed for one of the devs on our team. Is there some package.json or install flag thing I need to do to get this system to remember that it still has jest installed after a new package is installed? It takes a few minutes every time to get it installed and they are losing time to this silly problem.

Closing due to inactivity.


crosshair api

is there any api to change or update crosshair? thanks.

Yes, you can make a PUT request to RiotKV_RNet_GetSettings to change the settings (including crosshairs).
This requires a Valorant restart to take effect.


Fails to find icon for wsl (Ubuntu)

Not sure about other WSL distributions, but at least for my Ubuntu profile, your script fails to find the icon for it. Just a minor annoyance, simple enough to fix in the regedit myself, but just thought I'd point that out. Additionally, I had removed Azure from my profiles on windows terminal (no point in having it in there if I don't use azure), but your script still adds it to the context menu, even though having removed the default powershell 5 from windows terminal profiles made it not go to the context menus. Fairly unfamiliar with the powershell scripting language so not sure if these are issues in the script or weird default bugs from windows terminal itself. Either way, figured I should point this out. All in all, great script, made my life much easier getting these to the context menus, even if there are those couple of annoyances I had to manually sort out

Run
install.ps1 Mini

cannot get the correct icon. In the older version, this will work correctly.

But after reboot, the icon turned into normal.
I don't know why. Maybe the icon value doesn't work in the first time?

install.ps1 Mini

how to remove this mini ?


Add in-repo CODE-OF-CONDUCT.md, CONTRIBUTING.md files

What would you like to be added:
Consider if each repo should have an explicit copy of (at least) the CODE-OF-CONDUCT.md and CONTRIBUTING.md.
Why is this needed:
It seems like most CNCF-related projects do this, even if the same docs also appear on their website. We currently only show these docs on our website.

I suspect part of the point of having these in-repo is that GitHub handles them specially.

This is done for the main Submariner repo, but I guess I'll leave it open to track the TODO of repeating for other repos.


Display complete friends list

Punk currently displays only people who are online.

Added in https://github.com/scholtzm/punk/commit/be1cf2c75582175ca445ff2ff456c713f5f12c1b


Dutch translation of the strings

Note: I have not compiled the files to test if there weren't any errors.

Thanks @nvbln.
Riot also uses translations strings from MatrixKit (https://github.com/matrix-org/matrix-ios-kit/blob/master/MatrixKit/Assets/MatrixKitAssets.bundle/en.lproj/MatrixKit.strings). May I ask you to translate them too?

@nvbln, as per https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.rst, can you please sign off this PR?

@manuroe

May I ask you to translate them too?

Thanks for pointing that out. I will once I have a good few hours of free time, I am afraid that isn't now though.
As per request I changed the copyright dates (and added myself to the authors list) in the new commit.

can you please sign off this PR?

Of course. I hope you don't mind it if I don't post my email in plain text though (although I am sure it is bound to turn up somewhere), you can always see it in the git commits.
Signed-off-by: Nathan van Beelen

@nvbln, your PR is approved.
I will merge it once we are done with our current release candidate. So, your translations will be not in the coming release but the one after. Hopefully, translations on MatrixKit will be available at that time for a full translation of the app.


After switching to ^4.5.* sql aggregation query is appending n at the end of the result

Bug description
When running this simple query you get a different result than the one when you execute it directly in the SQL terminal
Prisma appends an 'n' character at the end of the number
const res = await db.$queryRaw<QueryType>`select DATE_FORMAT(field, '%b') as period, count(id) as nr from table_name where created > '2021-11-30' and status != 'xxx`;

Result is
{ period: 'Aug', nr: 1n }
When you execute this exact query in the database you don't get the extra 'n'
Even this simple aggregation query is problematic
const res = await db.$queryRawselect count(id) as nr from table_name
The result is
[ { nr: 15n } ]
How to reproduce
Just run a similar query I think you should
Expected behavior
'n' char should be omitted
Prisma information

	"dependencies": {
		"@koa/cors": "^3.1.0",
		"@koa/router": "^10.1.0",
		"@prisma/client": "^4.6.1",
		"@types/redis": "^4.0.11",
		"date-fns": "^2.25.0",
		"dotenv": "^10.0.0",
		"facebook-nodejs-business-sdk": "^13.0.0",
		"fs-extra": "^10.0.0",
		"inversify": "^6.0.1",
		"jsonwebtoken": "^8.5.1",
		"koa": "^2.13.1",
		"koa-bodyparser": "^4.3.0",
		"koa-helmet": "^6.1.0",
		"koa2-ratelimit": "^1.1.1",
		"mysql": "^2.18.1",
		"redis": "4",
		"reflect-metadata": "^0.1.13",
		"zod": "^3.11.6"
	},

    const res = await this.db.$queryRaw<QueryType>`select count(id) as nr from applications`;

Environment & setup

OS: Linux
Database: MariaDB
Node.js version: v16.13.1

Prisma Version
prisma                  : 4.6.1
@prisma/client          : 4.6.1
Current platform        : darwin-arm64
Query Engine (Node-API) : libquery-engine 694eea289a8462c80264df36757e4fdc129b1b32 (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/migration-engine-darwin-arm64)
Introspection Engine    : introspection-core 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/introspection-engine-darwin-arm64)
Format Binary           : prisma-fmt 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/prisma-fmt-darwin-arm64)
Format Wasm             : @prisma/prisma-fmt-wasm 4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32
Default Engines Hash    : 694eea289a8462c80264df36757e4fdc129b1b32
Studio                  : 0.476.0

This is an expected behavour since 4.0.0. See the explanations here. I am going to close this for now in favor of discussions in #14613


Straight Arrows shouldn't be Hold and Drag.

Straight arrows can be as simple as point and click and not creating more bending/creating multiple points. this is driving me insane.

You can click-doubleclick, or click-click-escape.


[Issue] JSON Examples are not poplated

Subject of the issue
The JSON files in the ./examples directory are not populated and I am unsure how to use them
Your environment

Terraform Version: 1.8.4
Module Version: 0.2.0

Steps to reproduce
The JSON files in the ./examples directory are not populated and I am unsure how to use them

Fixed with commit 7b4cb05a576a2310203822acda64d2e2e4dcdbe8


ngCompiler.ReflectorHost is not a constructor

Please provide us with the following information:

OS?
Windows 10
Versions.
angular-cli: 1.0.0-beta.22-1
The log given by the failure.
ngCompiler.ReflectorHost is not a constructor
TypeError: ngCompiler.ReflectorHost is not a constructor
Mention any other details that might be useful.
Its a fresh project , Only created the project and update all npm packages to the latest.
When i ng-serve I get the ngCompiler.ReflectorHost  error

[ ] ---------------------------------------------------------------

Thanks! We'll be in touch soon.

Angular 2.3.0 is not supported. Revert back to 2.2.4 or earlier.

Hey.
When I downgrade to 2.2.4 I dont get the ngCompiler.ReflectorHost error, but still the project don't run... It stack on 20%.
I dont know if it relevent but I get this error just before the 20%:

10% building modules 2/2 modules 0 active(node:4308) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: AppModule is not an NgModule
(node:4308) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


Update Dart2 template to support null safety

This has been on our to-do lists for quite a while now, but here it is finally: The null-safe version of Dart2 template.
The Mustache templates changed of course, and during testing few bugs were also uncovered. In particular, default values weren't injected properly in the template and now they are. In addition, sometimes the template wasn't testing for the correct parameter and mixing required, defaultValue and isNullable. This has also been addressed in few places and tallies now with other templates, for example Kotlin's.
In some cases, however, where the user should have provided a default value (but possibly forgot to do so), I have included a friendly notice which hints to the user about the need to add a default value. This has actually helped me personally uncover a few places where I forgot to do so... Quite a nice hint I think.
Due to the introduction of null safety, deserialization becomes an even stricter endeavor. I have added assert() clauses therefore in order to ensure that when in testing in development, the developer can see the errors and the offending keys.
I have a big project using this updated template, and have tested the app thoroughly to make sure it continues to work.

PR checklist

[X] Read the contribution guidelines.
[X] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
[X] Run the following to build the project and update samples:./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh

Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
For Windows users, please run the script in Git BASH.
[X] File the PR against the correct branch: master (5.3.0), 6.0.x
[X] If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@jimschubert @dr4ke616 @karismann @Zomzog @andrewemery @4brunu @yutaka0m @wing328 @jaumard @josh-burton @amondnet @sbu-WBT @kuhnroyal @agilob @ahmednfwela

That was quick 💪 So, what's your plan now @agilob?


Survey Statistics - Example/Comparison (Python)

I'd like to add a Python survey statistics example and comparison

Great, Thanks @michaelwalshe


Testing PID extension

Hi!
I had a look at the video about the PID extension and tried to test it but i faced several issues:

I do not understand how I am supposed to deal with the installation of the extension. I see there is a pymodaq_pid repository but it is not a PyPI package (I installed pymodaq_pid_models).
I think there is a mistake in the load_pid_module method in dashboard.py l.196. self.pid_window should probably be win.
In the import of dashboard.py DAQ_PID is taken from pid_controller defined in the subfolder pid of pymodaq. I guess it should take it from the pymodaq_pid once it has been installed no?

I am a bit lost… :)
Thanks a lot!

could you update your issue or close it?


Stable Diffusion-V2.1-Base model

Hi, great work! The paper stated that latent consistency model is distillated from Stable Diffusion-V2.1-Base, however, this repo only provide Dreamshaper v7 model, a version of Stable-Diffusion v1-5. Why it is the case? Does Dreamshaper v7 better than Stable Diffusion-V2.1-Base?

We will release these following checkpoints one by one,  be patient. This Dreamshaper v7 distilled model is for demonstration.


Implement https://github.com/digipolisgent/robo-digipolis-package/issues/6

Should be implemented in te helpers package?


Unity Asset folder structure for Urdf file and resources

It seems only the following folder structure is valid:
robot_description_dir
   urdf_dir
      myrobot.urdf
      meshes_dir
         link1.stl
         link2.stl
         etc

Packages with the following structure fail:
robot_description_dir
   urdf_dir
      myrobot.urdf
   meshes_dir
      link1.stl
      link2.stl
      etc

I've tested this with franka and ur5 and get the same result. I can only import when I change the structure of the directory. Was there a reason to follow this structure on the Unity side or could this be followed to allow for various structures of the robot_description directory?

Hi @mcevoyandy,

You a right, there is only one valid folder structure.
The folder structure is defined  the URDF mesh attribute filename="package://...".
UrdfImporter expects the meshes to be at the same relative folder location as they are on the ROS side.
When importing the URDF from ROS via UrdfImporter all resources are automatically placed in their correct folder sturcutre.
When importing the URDF from a local file, via UrdfGenerator you need to make sure that the resources folder structure corresponds to that on the ROS side.

Some background info:
In theory URDF resources could be defined as follows:
\link_1
     mesh_link.stl
\link_2
     mesh_link.stl

If we did not consider the folder structure and let Unity search for the assets by filename, it would fail in this example and use the same mesh for both links.
UrdfAssetDatabase is responsible for mapping package:\\... destinations to Unity Asset folder destinations. See e.g. methods CreateVisual and CreateCollider asking UrdfAssetDatabase where to find a mesh.
If you need more flexibility for your URDF mesh folder structure in Unity you might want to  adjust UrdfAssetDatabase to your needs and e.g. ask the user for a root URDF resources folder somewhere in the Unity Assets folder structure.
For keeping it simple, I think would not like that in my ROS# version, though.

Hi @MartinBischoff
From my testing it seems that the assets get saved in the proper folder structure according to filename="package://... but then the error occurs during retrieval if the meshes aren't in the same directory as the urdf file. So in the second example I posted, the folder structure is maintained, but Unity fails to find the meshes in that location and the mesh object is null.

I got your point now. You are right, the urdf file location specifies the package:// root folder counterpart in the Unity Asset folder structure.
This is coded in GetAssetPathFromPackagePath in UrdfAssetDatabase.
We did that for the following reason:
Whether copied manually or by calling
rosparam get /robot_description

via rosbridge, once a URDF file is in a Unity asset folder we do not know the original URDF file location in the ROS package.
Often there doesn't even exist a corresponding URDF file in the ROS package. Instead, the /robot_description parameter (which actually gives out what should be the URDF file contents) is often assembled from multiple xacro files located in various different package folders.
Does this answer your question? Do you have any improvement suggestions?
Which folder flexibility would you like to have?

@mcevoyandy any comment? can we close this issue?

I'd like to take a better look at it but haven't had time yet. I would be inclined to leave it open. Fixing this issue will make this package more accessible.

I did some initial testing and have a few robots coming in with no problems, but am not sure if this solution is the best approach:
changes I made: (tests not done over rosbridge yet)

assetPath was made to be the path to the robot description package instead of the path to the URDF file
In GetAssetPathFromPackagePath I ignore the package declaration package://package_name instead of just package://

Anyway, what are your thoughts on changing the paths so they're relative to the package? Then the URDF importer should work for any custom structure so long as they copy in the whole package into the Assets folder.

Sure, the folder structure can be changed as you discussed above.
However, how do you set the value of assetPath in general?
As I tried to explain already in my answer above:
We do not know the package root folder in the Unity asset folder structure. We use the location of the urdf file to set it.
Considering your example, users might put your robot description package e.g. in

Assets/urdf/robot_description_dir
Assets/robots/robot_description_dir
Assets/robot_description_dir
Assets/robot_description_dir/robot_description_dir

How do you identify the package root folder in Unity? Especially when importing the URDF via rosbridge_suite?

For my tests I've been adding the whole robot description package under assets so have been looking for the package.xml file, which I think takes care of the examples you listed.
And I haven't gotten to the rosbridge_suite yet... will try to look at that this weekend. If I'm able to come up with something solid I'll submit a pull request.

Thanks @mcevoyandy for your efforts in this issue.
Please note that I am not convinced by the suggested modifications due to the following reasons:

Some description packages have a lot of additional data like python code, meshes in various formats and multiple robot model variants that are not required by the Urdf model in Unity. Coppying the whole robot description package will clutter the Unity asset folders with addtional files, increase the build time and can even cause errors.

As already mentioned above, some description packages have no urdf file at all. The contents of the /robot_description param is assembled by xacro files at runtime. When importing the urdf via rosbridge, where in the package folder structure would you put the urdf file, that is generated ion the Windows side only, if not in the root folder?

The urdf importer is designed to copy all neccessary data from the Ubuntu side, not more not less. It searches the urdf for referenced resources and then search the collada files for referenced texture images. Only those files are copied into the asset folder. This minimizes the effort for importing and asset handling and keeps the folder nice and clean. We also have no package.xml when importing via rosbridge.

I still think the current folder structure and import procedure is the most convenient one. The only thing we should improve is to inform the users to put the urdf in the root folder when copying the files manually.

We now have an updated Wiki page explaining the file-based URDF import in more detail, esp. where to put the .urdf file.
We have not identified any better solution for generic ROS packages in this issue.  The existing solution is pratical and now also well documented.  I therefore suggest to close the issue. @mcevoyandy : do you agree?

@mcevoyandy : I reopened this issue  due to your pull request #57 .
In order to achieve more flexibility in the URDF asset folder organization, why don't we simply ask the user where the root package folder is, if we can not find it?

Having thought about this issue, I'd suggest to simplify the modifications in pull request #57 as follows:

If the first resource (= mesh or texture) is not found, ask the user where the package root folder in the Asset Folder is.
-> This resolves import problems where the URDF is not in the package root folder.
If this resource, or any other resource is not found during the import process, ask the user where this particular resource is.
-> This resolves import problems where the resource folder structure does not correspond to the package folder structure.

We can use OpenFolderPanel and OpenFilePanel for asking the use the required infos.
In each dialog, the user shall have the opportunity to cancel the whole import (as many dialogs might have to be closed if a folder structure is messed up).

Thank you @SuzannahSmith for realizing my suggested solution above!
Changes merged in commit https://github.com/siemens/ros-sharp/commit/28df9ba48d49181caad91114b1760c70b9162254.


Feature suggestion: add a callback for logging threads (in addition to the async work callback)

Current callback set with fmtlog::setLogCB is called from fmtlog::poll, which doesn't help in scheduling background asynchronous work done by fmtlog::poll. Consider adding a callback that would be called in the context of the logging thread based on some criteria, which could be used to queue a work request for the thread calling fmtlog::poll.
Consider a scenario in which fmtlog::poll is being called periodically (e.g. once a second) and keeps the logging buffer reasonably empty for new log messages. If a logging burst occurs that would overflow the buffer, some of the messages would be lost or blocking will occur, based on FMTLOG_BLOCK. If the frequency of fmtlog::poll is increased, it would be called unnecessarily most of the time, since logging bursts would happen rarely.
If there was a callback invoked in the logging thread context (i.e. from the call stack of log and logOnce), and this callback would have some call condition (e.g. when logger buffer is 50% full), it would be possible to use this callback to queue an asynchronous work request for the logger thread at the application level (i.e. outside of fmtlog), which would trigger fmtlog::poll call between regular polling intervals.

Good suggestion. However the log queue is too simple to tell how much full it is: it can only know if it's full or not. If a callback is added when the queue is already full, it might not be useful as it's too late: it needs to notify and wait for the polling thread to flush the queue, so not a good solution.

This feature is supported now, please check out the new api: fmtlog::setLogQFullCB(cb) and have a try, thanks.

Awesome. Thank you. I will try it out tomorrow and will let you know.

@MengRao Tested out new functionality and it works great. Thanks again.
I also merged the changes I use for my project, which includes these:

CMake builds debug/release libraries (e.g. assert works as expected, debugging shows variables, etc)
FMTLOG_ONCE_LOCATION is added to allow the caller to pass in actual location instead of the logging facility location (e.g. think a logger service - using current location only captures logging service location).
GitHub action builds all platforms and runs tests. It currently is just helpful to see that all works, but may be extended to build per-OS packages.

You can see these changes here. If you are interested in any of them individually, let me know and I will create pull requests. Otherwise, will not mention this again.
https://github.com/gh-andre/fmtlog
I also can help you out to build a Nuget package for Windows, if you'd like. Let me know.

Sorry, ran into a problem with the callback - there's no user argument that can be passed in and it's defined in such a way that it's not possible to pass in a class with a function operator. Without one of these it's hard to integrate it into any logging facility.

LogQFullCB is simply a global function pointer saved in fmtlog as same as LogCB, so there could only be one instance and user argument is not quite useful as global/static variables can be used in the callback. This callback is not designed in the C++ fashion so as to minimize performance cost, because low latency is the first priority in fmtlog design.

There's no performance degradation in adding an argument to a function call. It's just another variable that you pass in and you don't even need to check if it's been set or not. So, there's really no benefit in not providing it.
As for usefulness, keeping the argument variable in the logger allows callers to avoid using globals in their architecture. Keeps the code cleaner and leaves room for expansion. For example, you can add a logger handle to logging calls and this logger could be used in places that allow multiple applications per process, each with their own logger.

emm... For adding user function arguments, the only generic way is to add a void pointer(which I dont think is elegant either), but if it can meet your needs I'll make the change.

Well, I would argue that it's more elegant than having a global on the caller's side :)
I think a void pointer will work out well for most people, including myself. It would be great if you could add it. Thanks.
For a more type-focused solution, you would need some type of a polymorphic callback handle and I would say that having such handle without having a multi-instance logger wouldn't be very practical, as you pointed out earlier. Could be a good feature for the backlog, though.

Changes are done, please check.

Works great. Thank you!


etcd fails to come up active on Oracle Linux 7.9 with Selinux enabled

What kind of request is this:
bug
Steps to reproduce:

Rancher server 2.6 master-head 5715b8a
Oracle Linux 7.9 with SELinux ON for Downstream cluster
Start provisioning the RKE1 cluster

Result:
DEBU[0153] [etcd] Successfully created log link for Container [etcd] on host [x.x.x.x]
INFO[0153] [etcd] Successfully started etcd plane.. Checking etcd cluster health
TRAC[0153] IsDockerSELinuxEnabled: securityOpt found: [name=seccomp,profile=default]
TRAC[0153] IsDockerSELinuxEnabled: securityOpt found: [name=selinux]
DEBU[0153] Host [x.x.x.x] has SELinux enabled in Docker
DEBU[0153] Found selinux in DockerInfo.SecurityOptions on host [<IP_ADDRESS>]
DEBU[0153] Applying security opt label [label=type:rke_container_t] for etcd container on host [x.x.x.x]
DEBU[0153] [etcd] check etcd cluster health on host [x.x.x.x]
DEBU[0153] using "/private/tmp/com.apple.launchd.Xcri8tzo2G/Listeners" SSH_AUTH_SOCK
DEBU[0158] [etcd] failed to check health for etcd host [<IP_ADDRESS>]: failed to get /health for host [x.x.x.x]: Get "https://<IP_ADDRESS>:2379/health": EOF
DEBU[0163] using "/private/tmp/com.apple.launchd.Xcri8tzo2G/Listeners" SSH_AUTH_SOCK
DEBU[0168] [etcd] failed to check health for etcd host [<IP_ADDRESS>]: failed to get /health for host [x.x.x.x]: Get "https://<IP_ADDRESS>:2379/health": EOF
DEBU[0173] using "/private/tmp/com.apple.launchd.Xcri8tzo2G/Listeners" SSH_AUTH_SOCK
DEBU[0176] [etcd] failed to check health for etcd host [<IP_ADDRESS>]: failed to get /health for host [x.x.x.x]: Get "https://<IP_ADDRESS>:2379/health": EOF
DEBU[0181] using "/private/tmp/com.apple.launchd.Xcri8tzo2G/Listeners" SSH_AUTH_SOCK
DEBU[0184] [etcd] failed to check health for etcd host [<IP_ADDRESS>]: failed to get /health for host [x.x.x.x]: Get "https://<IP_ADDRESS>:2379/health": EOF
DEBU[0189] using "/private/tmp/com.apple.launchd.Xcri8tzo2G/Listeners" SSH_AUTH_SOCK
DEBU[0195] [etcd] failed to check health for etcd host [<IP_ADDRESS>]: failed to get /health for host [x.x.x.x]: Get "https://<IP_ADDRESS>:2379/health": EOF
DEBU[0200] using "/private/tmp/com.apple.launchd.Xcri8tzo2G/Listeners" SSH_AUTH_SOCK
DEBU[0201] [etcd] failed to check health for etcd host [x.x.x.x]: failed to get /health for host [x.x.x.x]: Get "https://<IP_ADDRESS>:2379/health": Unable to access the service on <IP_ADDRESS>:2379. The service might be still starting up. Error: ssh: rejected: connect failed (Connection refused)
DEBU[0206] using "/private/tmp/com.apple.launchd.Xcri8tzo2G/Listeners" SSH_AUTH_SOCK

Other details that may be helpful:
etcd container logs (internal IP is different due to be a second QA pass):
2021-06-14 16:55:56.680132 I | etcdserver: setting up the initial cluster version to 3.4
2021-06-14 16:55:56.682076 N | etcdserver/membership: set the initial cluster version to 3.4
2021-06-14 16:55:56.682133 I | etcdserver/api: enabled capabilities for version 3.4
2021-06-14 16:55:56.682174 I | etcdserver: published {Name:etcd-izol7-etcd-1 ClientURLs:[https://<IP_ADDRESS>:2379]} to cluster aad3968602ff5fc9
2021-06-14 16:55:56.682364 I | embed: ready to serve client requests
2021-06-14 16:55:56.683422 I | embed: serving client requests on <IP_ADDRESS>:2379
WARNING: 2021/06/14 16:55:56 grpc: addrConn.createTransport failed to connect to {<IP_ADDRESS>:2379  <nil> 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp <IP_ADDRESS>:2379: connect: connection reset by peer". Reconnecting...
2021-06-14 16:55:56.684222 C | etcdmain: accept tcp <IP_ADDRESS>:2380: accept: permission denied
2021-06-14 16:55:57.121239 W | pkg/flags: unrecognized environment variable ETCD_UNSUPPORTED_ARCH=x86_64
[WARNING] Deprecated '--logger=capnslog' flag is set; use '--logger=zap' flag instead
2021-06-14 16:55:57.121408 I | etcdmain: etcd Version: 3.4.15
2021-06-14 16:55:57.121418 I | etcdmain: Git SHA: aa7126864
2021-06-14 16:55:57.121422 I | etcdmain: Go Version: go1.12.17
2021-06-14 16:55:57.121426 I | etcdmain: Go OS/Arch: linux/amd64
2021-06-14 16:55:57.121445 I | etcdmain: setting maximum number of CPUs to 2, total number of available CPUs is 2
2021-06-14 16:55:57.121543 N | etcdmain: the server is already initialized as member before, starting as etcd member...
[WARNING] Deprecated '--logger=capnslog' flag is set; use '--logger=zap' flag instead
2021-06-14 16:55:57.121579 I | embed: peerTLS: cert = /etc/kubernetes/ssl/kube-etcd-172-31-1-133.pem, key = /etc/kubernetes/ssl/kube-etcd-172-31-1-133-key.pem, trusted-ca = /etc/kubernetes/ssl/kube-ca.pem, client-cert-auth = true, crl-file =
2021-06-14 16:55:57.122144 I | embed: name = etcd-izol7-etcd-1
2021-06-14 16:55:57.122155 I | embed: data dir = /var/lib/rancher/etcd/
2021-06-14 16:55:57.122161 I | embed: member dir = /var/lib/rancher/etcd/member
2021-06-14 16:55:57.122165 I | embed: heartbeat = 500ms
2021-06-14 16:55:57.122169 I | embed: election = 5000ms
2021-06-14 16:55:57.122172 I | embed: snapshot count = 100000
2021-06-14 16:55:57.122181 I | embed: advertise client URLs = https://<IP_ADDRESS>:2379
2021-06-14 16:55:57.122185 I | embed: initial advertise peer URLs = https://<IP_ADDRESS>:2380
2021-06-14 16:55:57.122191 I | embed: initial cluster =
2021-06-14 16:55:57.123977 I | etcdserver: restarting member 31353a19648311e9 in cluster aad3968602ff5fc9 at commit index 6
raft2021/06/14 16:55:57 INFO: 31353a19648311e9 switched to configuration voters=()
raft2021/06/14 16:55:57 INFO: 31353a19648311e9 became follower at term 3
raft2021/06/14 16:55:57 INFO: newRaft 31353a19648311e9 [peers: [], term: 3, commit: 6, applied: 0, lastindex: 6, lastterm: 3]
2021-06-14 16:55:57.125625 W | auth: simple token is not cryptographically signed
2021-06-14 16:55:57.129830 I | etcdserver: starting server... [version: 3.4.15, cluster version: to_be_decided]
raft2021/06/14 16:55:57 INFO: 31353a19648311e9 switched to configuration voters=(3545804162359038441)
2021-06-14 16:55:57.130516 I | etcdserver/membership: added member 31353a19648311e9 [https://<IP_ADDRESS>:2380] to cluster aad3968602ff5fc9
2021-06-14 16:55:57.130693 N | etcdserver/membership: set the initial cluster version to 3.4

Firewall is disabled in the logs and security group is open
ec2-user@izol7-etcd-1 ~]$ sudo systemctl status iptables
● iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
[ec2-user@izol7-etcd-1 ~]$ sudo systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Environment information

Rancher version: 2.6 master-head 5715b8a
Installation option: HA RKE1

I also tried directly with RKE 1.3.0-rc7

CentOS 7.9 and CentOS 8.3 worked on this same Rancher setup.
https://github.com/rancher/rancher/issues/33132

@izaac Does it work without SELinux enabled? Was the rancher-selinux RPM installed (even though it seems a network issue)

Rancher version 2.6 master-head (06/18/2021) 3763e5d
@superseb

This works without SELinux enabled.
The SELinux Rancher RPM version installed in the AMI is rancher-selinux-0.2~rc1-1.el7.noarch

Docker version: 19.03.15
cc @sowmyav27

Error seen in /var/log/messages:
Jun 21 16:12:51 ip-172-31-12-116 kernel: audit: type=1400 audit(1624291971.843:10): avc:  denied  { accept } for  pid=3416 comm="etcd" laddr=<IP_ADDRESS> lport=2379 scontext=system_u:system_r:rke_container_t:s0:c41,c959 tcontext=system_u:system_r:rke_container_t:s0:c41,c959 tclass=tcp_socket permissive=0

Can be tested with https://github.com/rancher/rancher-selinux/releases/tag/v0.2-rc2.testing.1

Rancher version: v2.6 master-head (06/22/2021) d44698d
This is working now by using the latest rancher-selinux test rpm. rancher-selinux-0.2~rc2-1.el7.noarch
Tested with an RKE1  OracleLinux 7.9 with SELinux OS and Docker enabled. Docker version 19.03.15
1 etcd, 1 control plane and 3 workers.
Cluster got active. And I was able to create a deployment.


Checkbox does not toggle

I am using a semantic.react with typescript. Here is a simple example
export class SearchBar extends Component<{}, { status: boolean }> {
constructor() {
    super();
    this.state = { status: true };
}

public render() {
    return (

                <Checkbox label="status" checked={this.state.status} onClick={() => this.updateStatus()}/>

    );
}

private updateStatus() {
    this.setState({ status: !this.state.status });
}

}
the div seems to be generated always with readonly tag

I have tried this with onChange also. Am i doing something wrong here ?

Seems like this is a less issue with the packaged themes. I will move this out to the other branch.

I seem to have the same problem. As soon as I add a function to onClick or onChange the checkbox doesn't toggle anymore.

Here's a working example:
http://react.semantic-ui.com/modules/checkbox#remote-control

To elaborate on what @psudarsa said, for me this was a css issue as I was using a custom theme and the css resulting from the Gulp build.
Despite the actual input having the class of hidden, being readonly and not showing as checked, the javascript is actually working as it should. The problem is missing css. When using a custom theme, the builder is not including custom checkbox overrides.
To fix this I copied the overrides from themes/default/modules/checkbox.overrides to site/modules/checkbox.overrides and the check mark appeared. You may need to copy/paste the code from/to a different location depending on your theming needs.


Fixed typo in table of contents

Fixed typo in 'Destructuring with default values' heading in table of contents as it wasn't linking correctly

TOC is generated automatically. Gonna update it. Thanks for reporting!


new portrait images

Thanks for this contribution!

The image for reyna has a different size from all the other ones (reyna is  326x500 while others are 587x900). Can you get the image for reyna that is also 587x900?
The portraits that are being used on the site are located in public/assets/imgs/agents/portraits. The images folder is just an auxiliary place for images (old and new) used in the project. You probably meant to update public/assets/imgs/agents/portraits and not images/valorant/agents/portraits

use https://valorant-api.com/v1/agents  for all new images

use https://valorant-api.com/v1/agents for all new images

Thanks, didn't know about this!


Bad response headers for preflight OPTIONS requests

Hi,
I'm bulding an app on top of ezplatform & symfony and I'm currently trying to use the JS REST API provided by ezplatform.
Here are my nelmio_cors configs :
nelmio_cors:
    paths:
        '^/api/ezp/v2/':
            max_age: 3600
            allow_credentials: true
            allow_origin: ['*']
            allow_methods: ['POST', 'PUT', 'GET', 'DELETE', 'OPTIONS']
            expose_headers: []

Trying to request my app from an other domain (cors requests) I'm stuck with this error which occurs during preflight requests.
Response for preflight has invalid HTTP status code 405 (from Google Chrome)
Looking at the response headers, I noted that the response headers were not the ones I was hoping for. At least, this header is missing :
Access-Control-Allow-Methods: POST, PUT, GET, DELETE, OPTIONS
Looking inside the nelmio_cors bundle code, I figured out that this code form CorsListener is never reached :
if ($options['allow_methods']) {
      $response->headers->set('Access-Control-Allow-Methods', implode(', ', $options['allow_methods']));
}

It seems that $options is empty or at least doesn't contains the good values.
I don't know if there is a bug here or if I' missing something. I also posted this question on stackoverflow (for more detail)
Thanks in advance for help

Ok well, the problem has been spotted : it appears that it doesn't come from nelmio_cors.
ezplatform is the one who rewrite my "allow_methods" header , not sure why but this is it...
So this issue can be closed !
Thanks for the good work


User anonymization raises an AccessDeniedException because the user is not enabled

The case of enabled users has been addressed in fb835fdb0355d67ad599815e88d2f88d9c96306c, but we still need to make sure that we never supply a disabled user to this method.


Update README.md

CONTRIBUTORS ADDED

@all-contributors please add @sudhanshutiwari264  for maintenance, review, doc and code

@all-contributors please add @archithdwij  for  maintenance, review, doc and code

@all-contributors please add @CrioDo for eventOrganizing, maintenance, review, doc and code

@all-contributors please add @kiranbeeyes  for eventOrganizing, maintenance, review, doc and code


Create an SAPUI5 App from the Command Line

Tutorial URL: https://developers.sap.com/tutorials/cp-cf-sapui5-local.html
Please specify the step you are referring to
Step 4: Package the MTA archive
Hi,
It was not possible the *.mtar creation. Please, could anyone help me?
Thanks!
Dotta
2020-05-03T10_20_34_048Z-debug.log

I'm afraid the error log doesn't provide too much information. Can you run npx mbt build to check if you see a more detailed output?
As this is a Windows log, make  is usually the first suspect here. Did you already install this tool?

I'll close this one due to inactivity, please reopen if needed :)