add layers into geospace

This PR attempts to add Raster and Vector (GeoDataFrame) layers into GeoSpace. The component diagram looks like below:
classDiagram
  MapModuleJS ..> MapModule: visualises
  MapModule ..> GeoSpace: gets data
  GeoSpace *-- _AgentLayer
  GeoSpace *-- RasterLayer
  GeoSpace *-- GeoDataFrame
  _AgentLayer ..> GeoAgents: contains

Before it is ready to merge, the main issue is, there is a auto_convert_crs parameter in the GeoSpace.add_layer() method, similar to GeoSpace.add_agents(), which is really annoying. Image the users have sources of data with different crs from the GeoSpace. To avoid errors, they will have to:
space = GeoSpace()
space.add_layer(RasterLayer.from_file("some_file.tif"), auto_convert_crs=True)
space.add_layer(some_gdf, auto_convert_crs=True)
space.add_agents(some_agents, auto_convert_crs=True)

But we still need this parameter, due to the same reason as GeoAgents. Shall we do something like this instead -
space = GeoSpace(auto_convert_crs=True)
space.add_layer(RasterLayer.from_file("some_file.tif"))
space.add_layer(some_gdf)
space.add_agents(some_agents)

Or is there any other better way?

hmm let me look into the dependency issue in python 3.10

Thanks for the reply!
My concern with setting auto_convert_crs=True by default is that, I don't think it'll ever be set to False by users, and it gets ignored.
Instead, the point of having it to be False by default is, users get reminded if their data are of different crs. Subsequently they can choose to either a) manually change all crs to make them consistent, or b) set auto_convert_crs=True, knowing that crs conversion is done.

For the auto_convert_crs decision, see the messages surrounding https://github.com/projectmesa/mesa-geo/pull/58#discussion_r854360659=.

Instead, the point of having it to be False by default is, users get reminded if their data are of different crs. Subsequently they can choose to either a) manually change all crs to make them consistent, or b) set auto_convert_crs=True, knowing that crs conversion is done.

That is exactly my point. There is no alternative to converting the crs, so why require the extra step of doing a) or b) ?
What is the user advantage here?

Yes, there is no alternative to converting the crs to the same one. The question is, should the users be notified about any crs inconsistency and conversion?
If auto_convert_crs=True by default, everything could silently get converted to the default crs epsg:3857. For example:
space = GeoSpace()
space.add_layer(a_raster_layer_of_epsg_4326)
space.add_layer(a_geodataframe_of_epsg_4326)
space.add_agents(some_agents_of_epsg_4326)
# Surprise! Everything is in epsg:3857 now.

Yes it shouldn't happen silently as a side effect, it should be a feature! That is, the function of add_agents is to add agents to the GeoSpace by converting their CRS to the crs of the GeoSpace. If we add to this to the docstring and also mention it again in the tutorial that should be sufficient information imho

Very good! My apologies but I can't stop myself from thinking about this meme

Ok, so in summary, we have two options:

Remove the auto_convert_crs parameter. In docstrings and tutorial, we highlight to our users that, add_layer() and add_agents() will add layers and agents to GeoSpace by converting their CRS into that of the GeoSpace.
Put the auto_convert_crs parameter into GeoSpace constructor, and have it equal to False by default. Users get an ValueError whenever they attempt to add layers/agents of different CRS into GeoSpace (how dare you), unless they set auto_convert_crs=True.

@Corvince prefers Option 1 and I'm leaning towards Option 2.
@rht @tpike3 What do you think? Please feel free to come up with more options : )

I am on vacation and mobile so I cannot verify this, but have you tested the original idea of raising just a warning? Because from how I understand it after reading about issuing warnings, they should actually only display once!? So the main concern about hundreds of warnings could be dismissed.
This could be option 3)
https://docs.python.domainunion.de/3/library/warnings.html#the-warnings-filter

Voting for option 3. Didn't know  that you could make it display only once.

Implemented Option 3. Ready for review now.

Great! Could you just make the warning option a kwarg? If we then add more options to GeoSpace later it won't be API breaking (without warning being always the second argument)

In the last commit, I didn't see any code that would result in the warning being printed only once. It seems that users will have to manually do this:
warnings.simplefilter("once", ...)

This is not ideal.
There is another way to display the warning only once. Define an attribute self.warning_is_shown = False. If the warning is then later shown once, then set it to True, and never display the subsequent warnings.

Let me try to explain this. For the following code (which is the default behavior):
1  for _ in range(10):
2      warnings.warn("This is a warning.")
3
4  for _ in range(10):
5      warnings.warn("This is a warning.")

we will end up with two warnings instead of 20, one from line 2, the other one from line 5.
If we change from default to "once":
1  warnings.filterwarnings("once")
2
3  for _ in range(10):
4      warnings.warn("This is a warning.")
5
6  for _ in range(10):
7      warnings.warn("This is a warning.")

There is going to be only one warning, since the messages from line 4 and line 7 are the same.
In our case, I think the default behavior is good enough - one warning for hundreds of agents.

Not sure if I've done it correctly, but I put warn_crs_conversion into kwargs. The examples are also updated accordingly.

OK, that's fine then.

Is there any more changes that are needed in order to merge this PR?

LGTM from my end. If @Corvince doesn't merge this within a day, I will do it.

I don't have the time atm to do a proper review, so I'll just merge this with just a quick look.

Thanks a lot for the help guys! Appreciate the comments.
I will keep working on raster layers for the next PR, and will need your feedback too : )


[Enhancement]: Timer in the Master Typing game

Is your enhancement request related to a problem? Please describe.➕
Game enhancement in the Master Typing Game
Describe the solution you'd like
Solution steps
As GSSoC23 contributor, I would add a timer that refreshes every time the player clicks the correct key.
Please assign this issue to me.
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @AbhaBarge !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

/assign

Please assign me this issue.

Hey @AbhaBarge 👋!
@kunjgit here,
Hope you are doing extremely well 😇
It's confirmed 🥳, GameZone is taking part in hacktoberfest and ready to have another 💥
Ready to have some amazing contributions once again also thank you for you support in GSSoC23 you have took us on top 5 ❤🔥
if you still haven't joined us join us on Discord
See you soon 😊

Hey @AbhaBarge 👋!
@kunjgit here,
Hope you are enjoying this hacktober 😀
We are excited to share that we are opening issue from our side where you will be going to add games on our website 🚀
Work on this issue 🔥
and help us building GameZone 💗
if you still haven't joined us join us on Discord
See you soon 😊

Hello @AbhaBarge, Time's Uppp!⏰
Sorry for closing your issue!
But it's more than a week since we haven't received anything from your side 😢 .
Come up with new ideas, create a new issue and make sure you finish it within a week! 🔥
All the best! 🚀
Happy Hacking! 💗

Hey @AbhaBarge ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


[IOTDB-3428] Linear expanse RegionGroup

The following two scenarios trigger RegionGroup expansion:

When a StorageGroup writes schema/data for the first time, initialize a SchemaRegionGroup/DataRegionGroup for it.
When a StorageGroup writes schema/data continuously, extend some SchemaRegionGroups/DataRegionGroups until its slotCount\regionCount <= maxSlotCount\maxRegionCount.

The following two scenarios trigger the adjustment of maxRegionGroupCount:

Register/Remove DataNode.
Set/Delete StorageGroup.

See maxRegionGroupCount for detailed adjustment formulas.

WIP.

Ready for review~


fix import and export regex

The previous regex did not correctly match newlines, but the updated regex ensures accurate matching of whitespace, including newlines.
This modification enables matching of import statements like the following:
import {
  A,
  B
} from "test"

Hi @kotarella1110, thanks for submitting this PR. Would you be able to update the relevant tests as well?

@benyap Updated the relevant tests. Please review again!

@all-contributors add @kotarella1110 for bug fix and tests

Hey @kotarella1110, this has been released in 0.8.16. Thanks again for your contribution!


Unknown fields in BEFORE FILTER BY and IGNORE DIMENSIONS don't fail the validation

Example formulas:
SUM([field] BEFORE FILTER BY [notExist])
AGO(SUM([field]), [Date], "month" IGNORE DIMENSIONS [notExist]).
Similar to https://github.com/datalens-tech/datalens-backend/issues/98

Test for the issue: #532

Tests for this issue: https://github.com/datalens-tech/datalens-backend/pull/673


TypeError: object of type 'NoneType' has no len()

Occurring in line 266 of file vidsiv.py after the function get_flist() has completed. Traced to the return value of each trio task return value in the previously mentioned function. ret2 = ResultCapture.start_soon(nsy, find_videos, recvlist.clone(), bar, log). Return values of trio tasks are being returned with nonetype.
https://github.com/anoduck/vidsiv/blob/bebb07c5de9211b0aec59a4d891798d0164a2b81/vidsiv.py#L244

https://github.com/anoduck/vidsiv/commit/bebb07c5de9211b0aec59a4d891798d0164a2b81#r133403544

list.extend does not return a newly created list.


fix(ac): Added trust_remote in README inference

What does this PR do?
Follow up on #1262 with one more --trust_remote_code True fix.

Fixes # (issue)
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


Provide 1.7.10 Download

Since the jenkins page we used to download it until now is down, would it be possible to get a compiled download for 1.7.10? There is a branch here that looks semi-active still. There is at least some need for this in the Greg Tech New Horizons Community.

Yeah same with 1.12 if it can be uploaded to Curse as Jenkins is broken again


Can't convert from a .pb file

Hey,
I'm currently trying to convert a tensforflow graph to coreml. The neural network is as a .pb file (which is associated with two other files in a folder for the varaibles and the weights).
I can load it, use it and predict from an input image on a jupyter notebook with no problems.
However, when i'm trying to convert it with:
frozen_model_file = '/Users/Desktop/mobile_net/saved_model.pb'
coreml_model_path = 'my_model.mlmodel'
coreml_model = tfcoreml.convert(
tf_model_path=frozen_model_file,
mlmodel_path=coreml_model_path,
input_name_shape_dict={'image:0':[224,224,3,1]},
output_feature_names=['descriptor:0'])
I got the following error in the convert line:
DecodeError                               Traceback (most recent call last)
 in ()
5         mlmodel_path=coreml_model_path,
6         input_name_shape_dict={'image:0':[224,224,3,1]},
----> 7         output_feature_names=['descriptor:0'])
~/Desktop/tf-coreml/tfcoreml/_tf_coreml_converter.py in convert(tf_model_path, mlmodel_path, output_feature_names, input_name_shape_dict, image_input_names, is_bgr, red_bias, green_bias, blue_bias, gray_bias, image_scale, class_labels, predicted_feature_name, predicted_probabilities_output, add_custom_layers, custom_conversion_functions)
591       predicted_probabilities_output=predicted_probabilities_output,
592       add_custom_layers=add_custom_layers,
--> 593       custom_conversion_functions=custom_conversion_functions)
~/Desktop/tf-coreml/tfcoreml/_tf_coreml_converter.py in _convert_pb_to_mlmodel(tf_model_path, mlmodel_path, output_feature_names, input_name_shape_dict, image_input_names, is_bgr, red_bias, green_bias, blue_bias, gray_bias, image_scale, class_labels, predicted_feature_name, predicted_probabilities_output, add_custom_layers, custom_conversion_functions)
148   tf.reset_default_graph()
149   gdef = tf.GraphDef()
--> 150   gdef.ParseFromString(serialized)
151
152   with tf.Graph().as_default() as g:
DecodeError: Error parsing message
Do you know what is going on?
P.S. I got the same error when I try to load the model and "parse" it with
with tf.gfile.GFile(frozen_model_file, "rb") as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
Thank you for your help!

Hi Ketsuko,
My guess is that the ParseFromString only takes frozen graph pb but not saved model.
You could try convert original ckpt to frozen graph and convert it again.

lcycoding,
Thank you for your answer!
Yes, this is also what it feel, the probleme is, I have nockpt files. To be more precise, I juste have a variables.index and a variables.data-00000-of-00001 ... the model can be loaded and return results...
However, I have been able to  converted it to a .TFLITE
So, I'm wondering, is there a way to convert a .tflite to a .mlmodel?
I've seen somewhere on Stackoverflow to use toco, but I couldn't find a relevant docs for it...
Any thoughts?
Thanks!

@Ketsuko
Try this script to convert savedmodel to frozen graph
Hope this helps.
import tensorflow as tf

with tf.Session(graph=tf.Graph()) as sess:
    tf.saved_model.loader.load(sess, ["serve"], './folder_you_save_savedmodel')
    graph = tf.get_default_graph().as_graph_def()
    with tf.gfile.GFile('./frozen.pb', "wb") as f:
        f.write(graph.SerializeToString())

And for your another question, TFLite file may not be compatible with mlmodel file.

@lcycoding
Thank you so much for your help!!!!!
It worked very fine!!!
I have now a real pb frozen graph!

lcycoding,
Thank you for your answer!
Yes, this is also what it feel, the problem is I have no ckpt files. To be more precise, I juste have a variables.index and a variables.data-00000-of-00001 file... the model can be loaded and returns results...
However, I have been able to converted it to a .TFLITE file (tensorflow lite)
So, I'm wondering, is there a way to convert a .tflite into a .mlmodel?
I've seen somewhere on Stackoverflow toco can be used but I couldn't find a relevant doc for it...
Any thoughts?
Hello Ketsuko,

Can you please share the script using which you converted ..data-00000-of-00001 to .TFLITE file?
Your help will really be appreciated.

Thanks!


C_CPP :- Matrix Chain Multiplication using DP

Description
I would like to work on this issue :
In this I explain how we can convert a simple recursive code to dynamic programming code with good comments and with Algorithm.
Domain
C/CPP
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign


Add support for multiple application config in aws s3 repository.

Multiple application configurations can be loaded with comma separators from aws s3.
For example, abc-service and aws-common config can be load.
spring:
  application:
    name: abc-service
  cloud:
    config:
      name: abc-service, aws-common

@mars2cbh Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@mars2cbh Thank you for signing the Contributor License Agreement!

Added test code for AWS S3 Repository multi-application configuration.


Add support for mpv installed from microsoft store

Tested in Windows 11 vm
Installer for tests: https://mega.nz/file/IRRCjAhQ#rCXXHHVbQUa_B4jBuk4cQLafvQKnhmwFlDqmFaxImlU
One small problem is found thought https://github.com/SilverEzhik/mpv-msix/issues/18

I tested and it works fine on Windows 10. The command primpt issue you highlight might be a Windows 11 only issue.
Does setting Syncplay to send mpv the --no-terminal player argument resolve the issue for you on Windows 11 VM? If so, it might want to add that as a workaround for that specific use case.


Fixes

Tried to fix up display lists, but it seems this time Laurent has won the battle... Poor display lists.. they were so good while they lasted... EOL

FPS: 1,300. I wonder what display lists would do to that...


Xss vulnerability

Hi, this is Xcheck team. Our code safety check tool Xcheck has found 2 xss vulnerabilities in this object. Here are the detail.

yii2_fecshop-master/app/appfront/theme/base/front/checkout/cart/index.php
line: 294.  selectall = "<?= Yii::$app->request->get('selectall') ?>";
yii2_fecshop-master/app/apphtml5/theme/base/html5/checkout/cart/index.php
line:175  selectall = "<?= Yii::$app->request->get('selectall') ?>";

You can visit this url to verify. http://fecshop.apphtml5.fancyecommerce.com/checkout/cart?selectall=xcheck%22;alert(1);a=%22

bug fixed: https://github.com/fecshop/yii2_fecshop/commit/8fac6455882333cfe3d81c4121d523813e28e31a
thank you.


Log all searches

It would be useful to have a collection of what gets searched.

saved to coda?
cloudflare + export?

All calls sent through the semantic search /api/search are logged as part of the Google Cloud Run. That can be exported periodically. Currently, the in-browser TF searches are not tracked. So we can either log that or wait until it gets integrated with the /api/search.

When is it likely to get integrated? That does sound like a much better solution, on multiple levels

I hope to have a better idea after testing out the responsiveness next weekend. If we can move it over, shouldn't take too long.

Idea approved in 26 Feb 2023 Office Hours

If we implement a feature like this, I would suggest logging these queries in such a way that they can not be tied to any PII (personally identifiable information) from the user and additionally create a Terms of Service and Privacy page that unambiguously and clearly to the user spells out how the data is used. The ideal storage functions would make us compliant with the variety of privacy regulation around the world. See https://github.com/StampyAI/stampy-ui/issues/81 for related discussion

@diziet if you've done some research on best TOS that we could reuse, can you please link in here? If we choose to go that way on the next dev call, it might be useful to have all info ready for implementation, thanks! ;)

can be viewed at https://console.cloud.google.com/logs/query;query=resource.type %3D "cloud_run_revision"
resource.labels.service_name %3D "stampy-nlp"
resource.labels.location %3D "us-west1"
 severity>%3DDEFAULT queries;cursorTimestamp=2023-05-24T15:12:02.477604Z?project=stampy-nlp


FileOutputManager - handle non header messages

Issue: #475

[x] Tick here to confirm that you have run RunCodeFormatter.ps1

Description:
Fix bug with no header messages
Test:
Add a fileOutputManager and use a serialiser with no header.

@navalev have a look at the comments and give me a shout if you need some additional explanation.


How do I pass variables to hooks?

When I've used React Query before, I used it as a hook. Like Tanner showed in this demo: https://youtu.be/DocXo3gqGdI?t=2817
And also in the React Query Docs, https://tanstack.com/query/v4/docs/guides/mutations
It shows how data can be passed into a useMutation that runs inside mutationFn. This allows you to abstract a 'useUpdateMyData' hook, or something like that. And it has all of the fetching logic inside, and you just pass a small amount of data to make it mutate different documents.
function App() {
  const mutation = useMutation({
    mutationFn: newTodo => { // Right here, data comes in as newTodo
      return axios.post('/todos', newTodo)
    }
  })

  return (

      {mutation.isLoading ? (
        'Adding todo...'
      ) : (
        <>
          {mutation.isError ? (

An error occurred: {mutation.error.message}

          ) : null}

          {mutation.isSuccess ?
Todo added!
 : null}

          <button
            onClick={() => {
              mutation.mutate({ id: new Date(), title: 'Do Laundry' })
            }}
          >
            Create Todo
          </button>
        </>
      )}

  )
}

I incorporated that into custom hooks on other projects:
import 'react-native-get-random-values';
import Constants from 'expo-constants';
import { useMutation, useQueryClient } from 'react-query';
import getDbName from '../../utils/loadDatabaseName';
const CosmosClient = require('@azure/cosmos').CosmosClient;

const containerId = 'logbooks';

export const useDeleteLogbook = () => {
  const queryClient = useQueryClient();
  const { mutate: deleteLogbook } = useMutation(
    newLogbook => mutation(newLogbook),
    {
      onSuccess: () => {
        queryClient.invalidateQueries('logbooks');
      },
    }
  );
  return { deleteLogbook };
};

const mutation = async logbook => { // Right here, my dynamic data comes into my hook as 'logbook'
  const endpoint = await Constants.manifest.extra.cosmosEndpoint;
  const key = await Constants.manifest.extra.cosmosKey;
  const databaseId = await getDbName();
  const client = new CosmosClient({ endpoint, key });

  await client
    .database(databaseId)
    .container(containerId)
    .item(logbook.id, logbook.userId)
    .delete();
};

Then in my code, I could use the hook and it was incredibly clean:

// Inside react component:
const { deleteLogbook } = useDeleteLogbook();
          onPress: () => deleteLogbook(logbook),

But now I'm trying to do the same thing with this package, and I'm running into trouble.
I've implemented a custom deletion hook like so. But I can't find a way to pass dynamic variables in as before.
import { collection, doc } from 'firebase/firestore';
import { useFirestoreDocumentDeletion } from '@react-query-firebase/firestore';
import { db } from '../../utils/firebase';

export const useDeleteLogbook = () => {
  const collection = collection(db, 'logbooks');
  const ref = doc(collection, '456');// I want to pass a dynamic value here instead of 456
  const { mutation: deleteLogbook } = useFirestoreDocumentDeletion(ref);
  return { deleteLogbook };
};

According to your example, you call the mutate function with no data passed in. Just mutation.mutate()
 <button
        disabled={mutation.isLoading}
        onClick={() => {
          mutation.mutate(); // No data passed in
        }}
      >
        Delete document
      </button>

https://react-query-firebase.invertase.dev/firestore/data-mutation
So I'm wondering, how do we implement this with dynamic data? For example, if I have a list, where each item has a delete button. How do I pass in mutation.mutate(<clickedElement'sId>) so that my react-query-firebase code can delete the correct document?
Could you point me in the right direction or give me a small example?
I tried reading the code of this package, but  I'm not great with typescript yet.

How about something like this?
https://pastebin.com/BH7fcit9

Thanks for the reply @alexco4532.
What you have there is basically what's in the docs.
To make that work, I'd have to put the useDeleteLogbooks hook into button component, and then have that button component be duplicated a whole bunch of times in say, a list of logbooks. It's not the end of the world, but it's also not how my app is built currently.
In the end I decided to drop this package because it wouldn't refresh the data, even if your specified source: "server" and forced a refresh.


Rust compiler is needed

Though it's easy to figure out you might consider to mention it in the readme.

Won't be for long tho

Fixed, thanks for reporting!


Fancy Zones Additional Priority Grid Template

First of all, I love fancy zones. I am using it Every Day and just loved it. I have a Suggestion for Priority Grid Template, Some times I wanted to use Flip or mirror Version of Priority Grid like Smaller zones on Left and Larger on the Right Side. Currently, I am using custom Templates for that but it will be awsome if there are both versions available.

You can just edit the template and slice it up however you want :)  Click "Edit selected layout"


puppet is updating logicmonitor using PUT instead of PATCH

I have a system that I set custom properties on in the web interface of logicmonitor. However, every time puppet runs, they are overwritten.  I can see the following entries in the audit log :
Here's the log of the original modifications, made by user patrick:
XXXXXXXXXXXXXXXXXXXXX | patrick |<PHONE_NUMBER> | 2018-03-23 15:52:52 EDT | 174.XXX.XXX.XXX | 2C84830FE08F33B989F903CA028303D1 | Update host<2408, bonnie.example.com> (monitored by collector <53, heatherlee.example.com>), [Added property (jdbc.postgres.dbname:mydbname)] [Added property (jdbc.postgres.pass:********)] [Added property (system.categories:snmpTCPUDP,Netsnmp,snmpHR,snmp)]
And a few minutes later, puppet runs, and generates this audit log:
XXXXXXXXXXXXXXXXXXX | sysmaint |<PHONE_NUMBER> | 2018-03-23 15:57:07 EDT | 198.XXX.XXX.XXX |   | Update host bonnie.stockpile.nemgint.com, [Modified property puppet.update.on: 2018-03-23T15:24:18-04:00 -> 2018-03-23T15:57:07-04:00] [Deleted property jdbc.postgres.dbname] [Deleted property jdbc.postgres.pass] [Deleted property system.categories] , Remove Host From HostGroup : Linux Servers.  via API token XXXXXXXXXXXXXX
Here's the puppet code that's triggering the issue:
class profile::monitoring(
    String $collector,
    String $contact,
    String $location,
    Boolean $manage_snmp            = false,
    String $snmp_service_ensure     = 'running',
    String $snmp_network            = '<IP_ADDRESS>/0',
    Array[String] $snmp_ports       = [ 'udp:161' ],
    Array[String] $device_groups    = []
) {

    # generate a unique community per host
    $snmp_community = pw_hash($uuid, 'SHA-256', regsubst($hostname, '[^A-Za-z]', ''))

    class { 'logicmonitor::device':
        collector   => $collector,
        groups      => sort($device_groups),
        properties  => {
            "snmp.community" => $snmp_community
        }
    }

    if $manage_snmp {

        class { 'snmp':
            agentaddress   => $snmp_ports,
            ro_community   => $snmp_community,
            ro_community6  => $snmp_community,
            ro_network     => $snmp_network,
            contact        => $contact,
            location       => $location,
            service_ensure => $snmp_service_ensure,
            snmpd_config   => [ 'extend lm-inodes /bin/df -ilTP -x tmpfs' ]
        }
    }

}

This is the relevant section of YAML for the host: (generated by foreman, which is used as an external node classifier)
---
classes:
  profile::monitoring:
    collector: mycollector.example.com
    contact<EMAIL_ADDRESS>    device_groups:
    - Servers/XXXXXX/Production/CentOS
    - Servers/Backend/Postgres/Main/Production
    location: XXXXXXX/Production
    manage_snmp: true
parameters:
  puppetmaster: puppet.example.com
  domainname: mydomain.example.com
  foreman_domain_description: ''
  hostgroup: XXXXXX/Servers/Backend/Postgres/Main/Production
  location: Production
  location_title: Tierpoint/Production

Module has been updated to version 2.0.5 both here and on Puppet Forge


feat: migrate from Expo Router to React Navigation

This is an ongoing umbrella issues. Features or bugs will be added on an ongoing basis to track importance:

Not being able to choose screen presentation - there is no filesystem and/or programatic API to do so
Not being able to define all screens ahead of time. We have list of models. We could get list of all the screens and declare them, together with initial options. That way we could push to a screen that hasn't loaded yet w/o a flickering title (right now, we will put default title and then, update the title again once it renders with <Stack.Title />)

screen presentation, you want to use modals? I guess you looked into this: https://docs.expo.dev/router/advanced/modals/
for defining screens ahead of time I think it can be done with expo router. the tricky part is that we don't have the metadata like title handy at the time when we push to that route. if we did, there are ways

Initially, I somewhat thought this was still available in React Navigation:
router.push(route, { presentation: 'modal' })

but I think it's gone for a while now! 😆
Apparently, it is similar in both routers, so I will update the issue to focus on screen map instead.

Yeah, it kinda sucks but I think it could be possible with Expo Router to do the following:
import { Stack } from 'expo-router';
export default function Layout() {
  return (
    <Stack>
     {screens.map(screen => (
      <Stack.Screen
        name={screen.name}
        options={screen.options}
      />
      )}
    </Stack>
  );
}

However, as per their documentation, it appears all screens need to have a corresponding file on the filesystem, which is not the case with React Navigation. So, unless I am wrong, we would have to move away from Expo Router or find an API to register a screen programatically (there's one for sure, question whether it's exported).
To make this work, we need to solve:

for defining screens ahead of time I think it can be done with expo router. the tricky part is that we don't have the metadata like title handy at the time when we push to that route. if we did, there are ways

Do you have any thoughts?
I have an idea (maybe stupid, but worth checking if possible): In your default model, e.g. "inventory", define "Stack" and "Stack Screen" however you want.
import { Stack } from '@rise-tools/kit-expo-router';
export const models = {
   inventory: Inventory,
   inventoryItem: InventoryItem,
}

export function InventoryRouter() {
  return (
    <Stack>
      <Stack.Screen
          name="inventory"
          options={{ title: "Inventory "}}
      />
     <Stack.Screen
          name="inventoryItem"
          options={{ title: "Inventory Item"}}
      />
    </Stack>
  );
}

Even better, we could further leverage that to get rid of models map, e.g.:
import { Stack } from '@rise-tools/kit-expo-router';

const Inventory = view(() => {}) // view state model
const InventoryItem = () => { // fn state model

}

export function InventoryRouter() {
  return (
    <Stack>
      <Stack.Screen
          name="home"
          options={{ title: "Inventory "}}
          modelState={Inventory} // React Navigation has "component", we have "modelState"
      />
     <Stack.Screen
          name="item"
          options={{ title: "Inventory Item"}}
          modelState={InventoryItem} // React Navigation has "component", we have "modelState"
      />
    </Stack>
  );
}

and in the main file:
import { Inventory } from './inventory'
createWSServer([inventory], Number(process.env.PORT || '3005'))

and for each item in the array, call it to get JSON and convert it to:
{ "inventory": InventoryRouter, "inventory/home": Inventory, "inventory/item": inventoryItem }

to make it all available as valid routes.
On top of that, return the component that is currently being accessed. Typically, the user will first call "inventory" which will return  configuration pointing to the default route and then, subsequent request will be fired to get data for that path. Can probably be improved, but just an idea.


Upper-bound dependencies to compile with MSRV 1.36

This is an example of how we could set upper version bounds for the published 0.7 version to work with its MSRV 1.36 without requiring fixes by the user.

[ ] I've included my change in CHANGELOG.md

@torkleyy I have no idea if we could add this onto 0.7, e.g. as 0.7.2. Perhaps with some extra CI we could ensure that the current release version (or even the last two since the 0.6 branch also still exists) are also still tested (but probably allowing future clippy failures) is also tested as well and works with our official MSRV without needing user-fixes.

Codecov Report

Merging #385 (c6b925f) into v0.7 (1ae8b8c) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             v0.7     #385      +/-   ##
==========================================
+ Coverage   88.87%   88.90%   +0.02%
==========================================
  Files          47       47
  Lines        4982     4982
==========================================
+ Hits         4428     4429       +1
+ Misses        554      553       -1

Impacted Files
Coverage Δ

src/parse.rs
93.29% <0.00%> (+0.15%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ae8b8c...c6b925f. Read the comment docs.

I don't think we should restrict the dependency range like this, it will hurt users of newer Rust versions who will now end up with multiple versions of the same dependency (or unable to use the latest features of indexmap).

In that case, how do we ensure that both the MSRV and the latest stable work nicely? Perhaps we could document how you can fix such incompatibility errors, and give the explicit steps for the MSRV?

Correct me if I'm mistaken, but can't you use the same procedure as we do in our CI step to ensure we locked the correct versions?
Binary crates using ron shouldn't have to worry about this as they'll have the old version locked anyways, and libraries depending on ron will have to patch their lock file in CI (in case they test on old Rust versions) and give similar instructions to their users.

Superseded by #386


Fix SLSA link

It did not point to an external site and resulted in a 404.

I just saw there already is a PR.


Adjuste to python3.5

In python3.5 the sintax of import modules in local folders is diferent.
Ex:
from . import module

Could we merge?

Yes

@augustochaos Have you also tested it with Python2?

Maybe lets implement travis tests?

@cwirz I think that's a good idea. I will try to implement it this evening with both python2.7 and python3.5 as target.

Can we merge that

@augustochaos I don't think this is true. Could you try running it in Python3 and paste the error if you get any?

As @k-funk mentioned, I'm also getting this error with the latest version of django-cms:
  File ".../venv/lib/python3.5/site-packages/cmsplugin_gallery/models.py", line 13, in <module>
    import utils
ImportError: No module named 'utils'

@k-funk Released a Python3 compatible version on pypi, pip install cmsplugin_gallery --upgrade should just work.  Closing this PR.

Thanks for the update. Just did pip install cmsplugin_gallery --upgrade and received:
Collecting cmsplugin_gallery
  Downloading cmsplugin_gallery-1.0.0.tar.gz
…
Successfully built cmsplugin-gallery
Installing collected packages: cmsplugin-gallery, pytz, django
  Found existing installation: cmsplugin-gallery 0.6.5
    Uninstalling cmsplugin-gallery-0.6.5:
      Successfully uninstalled cmsplugin-gallery-0.6.5
  Found existing installation: pytz 2017.3
    Uninstalling pytz-2017.3:
      Successfully uninstalled pytz-2017.3
  Found existing installation: Django 1.8.18
    Uninstalling Django-1.8.18:
      Successfully uninstalled Django-1.8.18
Successfully installed cmsplugin-gallery-1.0.0 django-2.0.2 pytz-2018.3

Considering that the highest version of django that django-cms supports is 1.10, that might be an issue…

Yes, I agree. Let me see if I can release a fix for this. For now, please
just manually install your preferred django version again.
On Feb 21, 2018 5:13 PM, "tehfink"<EMAIL_ADDRESS>wrote:

Thanks for the update. Just did pip install cmsplugin_gallery --upgrade
and received:
Collecting cmsplugin_gallery
Downloading cmsplugin_gallery-1.0.0.tar.gz
…
Successfully built cmsplugin-gallery
Installing collected packages: cmsplugin-gallery, pytz, django
Found existing installation: cmsplugin-gallery 0.6.5
Uninstalling cmsplugin-gallery-0.6.5:
Successfully uninstalled cmsplugin-gallery-0.6.5
Found existing installation: pytz 2017.3
Uninstalling pytz-2017.3:
Successfully uninstalled pytz-2017.3
Found existing installation: Django 1.8.18
Uninstalling Django-1.8.18:
Successfully uninstalled Django-1.8.18
Successfully installed cmsplugin-gallery-1.0.0 django-2.0.2 pytz-2018.3
Considering that the highest version of django that django-cms supports is
1.10, that might be an issue…
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/centralniak/cmsplugin_gallery/pull/25#issuecomment-367300795,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAg0Tqgooq5rHl1lquVd0lOliTvkxDGoks5tXAF8gaJpZM4KWdBS
.


Cleaning up and updating deps

This updates the build environment and dependencies for Syringe.

This will fix some issues that were reported in the short-term, but since Go is changing the way it does dependency management YET AGAIN, we should consider moving to Go modules soon, as some of the issues I ran into were a result of problems in dep, which we're currently using. Other issues were caused by my own negligence in Gopkg.toml, which I tried as best I could to fix in this PR.

Summary

Moved to Go 1.12 in the Docker image
Removed Go 1.10 and 1.11 in the travis environment, added 1.13
Updated and fixed brokenness in deps (there was a lot)

Closes #133 and closes #134

I hesitated merging this because I was considering spending even more time cleaning up the configuration now that I understand dep a lot more than I did a year ago. However, given that Go modules are apparently the future (which future, I am not sure yet) I expect this would be mostly wasted effort. I'll add a milestone to the MP1 project to move to Go modules so that this gets done properly. But as for this effort, this PR fixes the issues raised in #133 and #134, so I'm happy with it for now.


Map Readonly Property Through Constructor Parameters

Hi,
I am practicing Domain Driven recently and trying to save value into LiteDB. There is a principle for ValueObject inside DDD is that all ValueObject should be immutable, once create no way to modify.
My ValueObject looks like this:
    public class TestValueObject : ValueObject<TestValueObject>
    {
        public TestValueObject(string value)
        {
            this.value = value;
        }

        public string value { get; }
    }

However, when I am trying to restore it, LiteDB complaining about missing paramaterless contractor.
I am just imaging if we can map read-only property though constructor parameters(keep same names etc), things will get handy.

The same problem is reported here:
https://github.com/mbdavid/LiteDB/issues/1132

I have same problem. but I solved it. If you don't mind, I have some extension methods could help you.
https://github.com/supershowwei/chef.extensions/tree/master/Chef.Extensions.LiteDB
Extension methods have publish to NuGet.
https://www.nuget.org/packages/Chef.Extensions.LiteDB


DISCUSSION: add support for meta get parser

TL;DR - What are you trying to accomplish?
We want to have support for both the ascii protocol and meta protocol this is the first PR to move in that direction and lays the ground work for building out the meta protocol and returning the meta tag values back to the caller.
Details - How are you making this change?  What are the effects of this change?
Related to: https://github.com/Shopify/async-memcached/pull/64
As a prototype step to break changes up into smaller chunks, we are adding a new struct MetaValue that is part of the Value struct response.  Going forward, this will be refactored so that the two structs are separated and the Value struct will retain its original shape.  The new MetaValue can contain optional flag response value for any requested flags. The parser will parse all implemented flag responses and it should be easy to extend to add support for additional meta flags.

Closed in favour of: https://github.com/Shopify/async-memcached/pull/66, https://github.com/Shopify/async-memcached/pull/67, https://github.com/Shopify/async-memcached/pull/68


Feature Request: popToIndex()

Short description of the problem:
I found that popping to a specific index in the navigation stack was more difficult than I thought it should be. If it isn't the first view (whereby popToRoot can be used) and you don't have a reference to a specific ViewController (whereby popTo can be used), it requires (or so I presume) that remove must be called, removing all but the current ViewController and then pop followed afterwards to pop back.
What behavior are you expecting?
A method such as popToIndex.
If you determine value to this new feature in nav-controller.ts, would I be able to fork and create a PR following the contribution guidelines?
Which Ionic Version? 2.x
Cordova CLI: 6.2.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.9
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
ios-deploy version: 1.8.5
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.10.1
Xcode version: Xcode 7.3.1 Build version 7D1014

@Rambatino hi, can you explain the use case this feature could be useful?

If you have a variable number of pages (determined by specific choices the user makes during their navigation) culminating in a specific action, for instance, by sending an email and then to pop back to a specific ViewController (let's say at the third level of the stack)
I could keep track of how many pages the user navigated, or keep hold of the reference to the original ViewController, but it would be much cleaner if I could just pop to a specific index on the stack, that I know is consistent.

@manucorporat any update? Can I build and spec it?

Hi @Rambatino I have been talking with my team about this feature and we all agree this is not a good idea, it looks like an error prone API.
A stack structure does not have indexes like an array does (even so under the hood it can be implemented with an array).
"(let's say at the third level of the stack)" how do you know it is the third level of the stack?
You could have a different stack somehow, and the index would be different each time and not what they intended when you hardcoded the number.
popTo is the correct API you should try to use.
Thanks for your time!


Feature/remove stake watcher

This PR simplifies some of the legacy staking logic. Some features/designs are slightly different than the original:

Removes concept of stakeWatcher
Introduces a --skip-send-to-l2 flag to explicitly skip sending tokens to L2 instead of being implicit about it

Some considerations:

I don't think the bridge instantiation is optimal. It works, but let me know if there is a more optimal way to do this with the current architecture (i.e., no explicit stake watcher)

For example, an arbitrary watcher is instantiated in order to retrieve the bridge.

feedback comments @shanefontaine


dune-project and lib/dune refer to quadtree instead of ack

Title. Is this intentional?
I've started writing some code to create a basic cube visualisation and I'd like to make a visualisation of an octree using Ack.

Hi! The library started as a Quadtree implementation and I hadn't had time to get to that. Just switched it over to Ack and did some general cleanup.
This is in very early development and may have some quirks, you're absolutely welcome to use it though and I would appreciate any and all feedback!

Will do! I'll ping you on Discord when I get some visualisations online (hopefully today).


10 VSCode extension updates

Description of changes

vscode-extensions.eamodio.gitlens: 13.4.0 -> 14.1.1
vscode-extensions.gruntfuggly.todo-tree: 0.0.224 -> 0.0.226
vscode-extensions.tyriar.sort-lines: 1.9.1 -> 1.10.2
vscode-extensions.rust-lang.rust-analyzer: 0.3.1426 -> 0.3.1607
vscode-extensions.esbenp.prettier-vscode: 9.19.0 -> 10.1.0
vscode-extensions.jnoortheen.nix-ide: 0.2.1 -> 0.2.2
vscode-extensions.pkief.material-icon-theme: 4.25.0 -> 4.29.0
vscode-extensions.github.vscode-pull-request-github: 0.66.0 -> 0.68.1
vscode-extensions.bmalehorn.vscode-fish: 1.0.33 -> 1.0.35
vscode-extensions.tamasfe.even-better-toml: 0.19.0 -> 0.19.2

Closes: #246432
Closes: #246430
Closes: #246428
Closes: #246427
Closes: #246424
Closes: #246422
Closes: #246421
Closes: #246420
Closes: #246418
Closes: #246416

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

@drupol perhaps you're free for a review? Thanks!

cc @Janik-Haag

@drupol accidentally formatted a file, fixing

@drupol in a few of the commits there's a space missing between the arrow and the version number, let me know if it should be changed. Thanks!

Also, not sure if any labels are missing for the PR

@drupol fixed

Let's wait for the ci to verify the hashes.


Instructions on how to start a single node or a cluster

TODO: Write usage instructions for each cookbook.

It would be superful if you could spare a few minutes to write a quick explanation how to get a single etcd node or event a cluster up and running - even a code example would be good.
I know you may not maintain this much, but a response would do me the world of good. Thanks

Yeah, I didn't touch this for quite a while, but I am also not working for Assembla anymore, so that's one of the main reasons.
Installing a single instance would be easy, you just need to set up a wrapper cookbook where you include this one in the default recipe for example, and set these attributes:
# disable clustering
node.etcd.clustered = false
# set required version, available versions are here: https://github.com/coreos/etcd/releases
# but I only tested it with 2.0.11, so you may have to adjust to newer versions
node.etcd.version = '3.1.1'

Or you can define the same attributes in a role which is assigned to the required server/node, and run chef, it will download, install, and start your etcd instance.
For a cluster you also need to define some addressing. Let's say we have 2 nodes we want to put in a etcd cluster with IP addresses <IP_ADDRESS> and <IP_ADDRESS>.
The 1 node attribues would look like this:
etcd.clustered = true
# IP addresses for etcd to listen on the host here, could be 1 or many, let's say we have <IP_ADDRESS> on this node
etcd.peer_listen_addresses = ['<IP_ADDRESS>']
etcd.client_listen_addresses = ['<IP_ADDRESS>']
# node1 and node2 are the hostnames of the nodes
etcd.nodes =  { "node1" => "<IP_ADDRESS>", "node2" => "<IP_ADDRESS>" }

And second node attributes:
etcd.clustered = true
# IP addresses for etcd to listen on the host here, could be 1 or many, let's say we have <IP_ADDRESS> on this node
etcd.peer_listen_addresses = ['<IP_ADDRESS>']
etcd.client_listen_addresses = ['<IP_ADDRESS>']
# node1 and node2 are the hostnames of the nodes
etcd.nodes =  { "node1" => "<IP_ADDRESS>", "node2" => "<IP_ADDRESS>" }

Hopefully this helps.


collectd-cloudwatch stopped, After I updated collectd.

Hi,
Thank you for making great plugins.
But I have a problem right now.
The collectd-cloudwatch stopped working, After I updated collectd.
Please tell me how to complete this properly.
First I installed yum install -y collectd, And I run to setup.py.
It's worked.
But I tried to upgrade collectd because I wanted to get disk data.
When I implemented it, I got an error like the one below.
[ec2-user@10-0-0-5 ~]]$ sudo ./setup.py
Installing dependencies ... OK
Installing python dependencies ... OK
Downloading plugin ... OK
Extracting plugin ... OK
Moving to collectd plugins directory ... OK
Copying CloudWatch plugin include file ... OK

Choose AWS region for published metrics:
  1. Automatic [xxxxxxxx]
  2. Custom
Enter choice [1]:

Choose hostname for published metrics:
  1. EC2 instance id [xxxxxxxx]
  2. Custom
Enter choice [1]:

Choose authentication method:
  1. IAM Role [xxxxxxxx]
  2. IAM User
Enter choice [1]:

Enter proxy server name:
  1. None
  2. Custom
Enter choice [1]:

Enter proxy server port:
  1. None
  2. Custom
Enter choice [1]:

Choose how to install CloudWatch plugin in collectd:
  1. Do not modify existing collectd configuration
  2. Add plugin to the existing configuration
  3. Use CloudWatch recommended configuration (4 metrics)
Enter choice [3]:
Plugin configuration written successfully.
Creating backup of the original configuration ... OK
Replacing collectd configuration ... OK
Replacing whitelist configuration ... OK
Stopping collectd process ... NOT OK
Starting collectd process ... NOT OK
Installation cancelled due to an error.
Executed command: '/usr/sbin/collectd'.
Error output: '[2017-04-03 16:45:53] plugin_load: plugin "logfile" successfully loaded.
Error: Reading the config file failed!
Read the logs for details.'.

So I read collectd.log
[2017-04-03 16:45:53] [error] python plugin: Error importing module "cloudwatch_writer".
[2017-04-03 16:45:53] [error] Unhandled python exception in importing module: ImportError: No module named requests
[2017-04-03 16:45:53] [error] Traceback (most recent call last):
[2017-04-03 16:45:53] [error]   File "/opt/collectd-plugins/cloudwatch_writer.py", line 10, in <module>
    from cloudwatch.modules.configuration.confighelper import ConfigHelper
[2017-04-03 16:45:53] [error]   File "/opt/collectd-plugins/cloudwatch/modules/configuration/confighelper.py", line 4, in <module>
    from metadatareader import MetadataReader
[2017-04-03 16:45:53] [error]   File "/opt/collectd-plugins/cloudwatch/modules/configuration/metadatareader.py", line 2, in <module>
    from requests import Session, codes
[2017-04-03 16:45:53] [error] ImportError: No module named requests

I thought whether the requests library does not exist. But it seems to exist.
[ec2-user@10-0-0-5 ~]$ pip freeze
aws-cfn-bootstrap==1.4
awscli==1.11.29
Babel==0.9.4
backports.ssl-match-hostname==<IP_ADDRESS>
boto==2.42.0
botocore==1.4.86
chardet==2.0.1
cloud-init==0.7.6
colorama==0.2.5
configobj==4.7.2
docutils==0.11
ecdsa==0.11
futures==3.0.3
iniparse==0.3.1
Jinja2==2.7.2
jmespath==0.9.0
jsonpatch==1.2
jsonpointer==1.0
kitchen==1.1.1
lockfile==0.8
MarkupSafe==0.11
paramiko==1.15.1
PIL==1.1.6
ply==3.4
pyasn1==0.1.7
pycrypto==2.6.1
pycurl==7.19.0
pygpgme==0.3
pyliblzma==0.5.3
pystache==0.5.3
python-daemon==1.5.2
python-dateutil==2.1
pyxattr==0.5.0
PyYAML==3.10
requests==2.13.0
rsa==3.4.1
simplejson==3.6.5
six==1.8.0
urlgrabber==3.9.1
urllib3==1.8.2
virtualenv==12.0.7
yum-metadata-parser==1.1.4

[ec2-user@10-0-0-5 ~]$ ls -la /usr/local/lib/python2.7/site-packages/
total 28
drwxr-xr-x 5 root root 4096 Apr  3 16:45 .
drwxr-xr-x 3 root root 4096 Jan 21 08:25 ..
-rw-r--r-- 1 root root  119 Sep  2  2016 README
-rw-r--r-- 1 root root  207 Mar 28 18:52 easy-install.pth
drwxr-xr-x 4 root root 4096 Mar 28 18:52 pip-9.0.1-py2.7.egg
drwxr-xr-x 3 root root 4096 Apr  3 16:45 requests
drwxr-xr-x 2 root root 4096 Apr  3 16:45 requests-2.13.0.dist-info

I would like to know how to solve this problem.
Incidentally, the collectd currently installed is as follows.
(i tried version 5.5/5.6/5.7, all version happen same problem.)
[ec2-user@10-0-0-5 ~]$ collectd -h
Usage: collectd [OPTIONS]

Available options:
  General:
    -C <file>       Configuration file.
                    Default: /etc/collectd.conf
    -t              Test config and exit.
    -T              Test plugin read and exit.
    -P <file>       PID-file.
                    Default: /var/run/collectd.pid
    -f              Don't fork to the background.
    -h              Display help (this message)

Builtin defaults:
  Config file       /etc/collectd.conf
  PID file          /var/run/collectd.pid
  Plugin directory  /usr/lib64/collectd
  Data directory    /var/lib/collectd

collectd <IP_ADDRESS>.g4f9adee, http://collectd.org/
by Florian octo Forster<EMAIL_ADDRESS>for contributions see `AUTHORS'

[ec2-user@10-0-0-5 ~]$ ls -la | grep -e "collectd*"
-rw-rw-r--   1 ec2-user ec2-user    525176 Nov 29 20:19 collectd-<IP_ADDRESS>.g4f9adee-1.el6.x86_64.rpm
-rw-rw-r--   1 ec2-user ec2-user    533672 Mar  6 03:27 collectd-<IP_ADDRESS>.g294aa61-4.el6.x86_64.rpm
-rw-rw-r--   1 ec2-user ec2-user    566148 Mar 11 00:22 collectd-<IP_ADDRESS>.g3f710d0-3.el6.x86_64.rpm
-rw-rw-r--   1 ec2-user ec2-user    641152 Mar 11 00:17 collectd-<IP_ADDRESS>.g3f710d0-3.el7.centos.x86_64.rpm
-rw-rw-r--   1 ec2-user ec2-user     15564 Nov 29 20:19 collectd-disk-<IP_ADDRESS>.g4f9adee-1.el6.x86_64.rpm
-rw-rw-r--   1 ec2-user ec2-user     16160 Mar  6 03:27 collectd-disk-<IP_ADDRESS>.g294aa61-4.el6.x86_64.rpm
-rw-rw-r--   1 ec2-user ec2-user     16364 Mar 11 00:22 collectd-disk-<IP_ADDRESS>.g3f710d0-3.el6.x86_64.rpm
-rw-rw-r--   1 ec2-user ec2-user     43004 Nov 29 20:19 collectd-python-<IP_ADDRESS>.g4f9adee-1.el6.x86_64.rpm
-rw-rw-r--   1 ec2-user ec2-user     43928 Mar  6 03:27 collectd-python-<IP_ADDRESS>.g294aa61-4.el6.x86_64.rpm
-rw-rw-r--   1 ec2-user ec2-user     44200 Mar 11 00:23 collectd-python-<IP_ADDRESS>.g3f710d0-3.el6.x86_64.rpm

Thank you for your helpful.
Best regards.
Yo

Could you check if there are multi version of collectd exist?
For example: /sbin/collectd, /opt/collectd/....

Thank you fo replay!
I checked it, But I found collectd is only /usr/sbin/collectd ...
[ec2-user@10-0-0-5 ~]$ sudo find / -name "collectd"
/usr/include/collectd           #directory
/usr/lib64/collectd             #directory
/usr/share/collectd             #directory
/usr/sbin/collectd              #use command
/etc/rc.d/init.d/collectd       #sysV init program
/var/lib/collectd               #directory

And share for my OS version.
[ec2-user@10-0-0-5 src]$ uname -a
Linux ip-10-0-0-5 4.4.44-39.55.amzn1.x86_64 #1 SMP Mon Jan 30 18:15:53 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I suggest you reinstall the collectd, and check if it works without this plugin

Looks like the dependent library has problem. could you run "easy_install -U --quiet requests" to check the result?

Hi,
I resolved it, I checked python version.
Before run setup.py.
[ec2-user@10-0-0-5 src]$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python2.7-config /usr/lib/python2.7 /usr/lib64/python2.7 /usr/local/lib/python2.7 /usr/include/python2.7 /usr/share/man/man1/python.1.gz

After run it.
[ec2-user@10-0-0-5 src]$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python2.7-config /usr/bin/python2.6 /usr/lib/python2.7 /usr/lib/python2.6 /usr/lib64/python2.7 /usr/lib64/python2.6 /usr/local/lib/python2.7 /usr/local/lib/python2.6 /usr/include/python2.7 /usr/include/python2.6 /usr/share/man/man1/python.1.gz

I thought python 2.6 was used in setup.py.
So I used python-pip to install requests into the 2.6 library.
[ec2-user@10-0-0-5 src]$ pip -V
pip 6.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
[ec2-user@10-0-0-5 src]$ python-pip -V
pip 6.1.1 from /usr/lib/python2.6/dist-packages (python 2.6)
[ec2-user@10-0-0-5 src]$ ls -la /usr/local/lib/python2.6/site-packages/
total 20
drwxr-xr-x 4 root root 4096 Apr  9 22:36 .
drwxr-xr-x 3 root root 4096 Apr  9 22:14 ..
-rw-r--r-- 1 root root  119 Sep  2  2016 README

[ec2-user@10-0-0-5 src]$ sudo python-pip install requests
You are using pip version 6.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting requests
  Using cached requests-2.13.0-py2.py3-none-any.whl
Installing collected packages: requests
Successfully installed requests-2.13.0

After that I successfully terminated setup.py and confirmed that collectd worked.
Do you know why setup.py uses python 2.6?
Please tell me if you knew.
Thank you for your helpful.
Best regards.
Yo

In setup.py, it just uses the easy_install to install the dependency. I guess python2.6 is your default python interpretor.

I have the same issue,
[2019-04-01 20:32:16] [error] python plugin: Error importing module "cloudwatch_writer".
[2019-04-01 20:32:16] [error] Unhandled python exception in importing module: ImportError: No module named cloudwatch_writer
After, changing the ownership to collectd
ls -al /opt/collectd-plugins/
total 56
drw-r--r--. 3 collectd collectd   116 Apr  1 20:28 .
drwxr-xr-x. 7 root     root       109 Apr  1 20:11 ..
drwxrwxrwx. 4 collectd collectd   128 Apr  1 20:28 cloudwatch
-rwxrwxrwx. 1 collectd collectd  1120 Apr  1 20:28 cloudwatch_writer.py
-rwxrwxrwx. 1 collectd collectd  1611 Apr  1 20:28 cloudwatch_writer.pyc
-rwxrwxrwx. 1 collectd collectd     1 Apr  1 20:28 init.py
-rwxrwxrwx. 1 collectd collectd 42620 Apr  1 20:28 setup.py
I am facing this, error on collectd user If i Change it to root it working as expected!


Inference of a custom image

Dear usuyama,
This is a very interesting project Congrats!
I ran your ePillID_tutorial_colab.ipynb and got a trained version of the model.
I wanted use the model on a single custom image as a starting point, but could not figure out how. Could you please provide the correct way to do so?

Thank you for trying out this repo!
Some parts of the evaluation code should be helpful, but unfortunately there's no standalone code for processing custom images right now. Ideally we want to have a small demo app that can take custom images and show prediction results.


Configurable Y axis title position to be above the axis

Expected Behavior

You can see the above image probability is the name of y axis and i need that name where i mentioned(above the y-axis)
Current Behavior
https://jsfiddle.net/sridhark/nez2cvot/
Environment

Chart.js version: 2.8
Browser name and version: Chrome

It is not possible in the current implementation.

+1 , even I need this  feature .

it is possible to provide a patch for this feature or any other work around to achieve this

You can change the scale title alignment, but it will be rotated by 90deg.
https://www.chartjs.org/docs/latest/axes/labelling.html#scale-title-configuration

+1 on this!

+1

+1

As workaround, you could use chartjs-plugin-annotation for that:
https://codepen.io/stockinail/pen/VwNKmWX


Refactor(BW6-761): use revisited Ate pairing instead of Tate

Description

Revisit the Miller loop algorithm from https://github.com/Consensys/gnark/pull/846 to allow fixed-argument pairings needed for KZG optimization (see https://github.com/Consensys/gnark/pull/874). TL;DR: use Eq. (6') instead of (6) in https://hackmd.io/@gnark/BW6-761-changes.
The PR needs gnark-crypto PR https://github.com/Consensys/gnark-crypto/pull/465 for testing.
TODO:

[x] Implement revisited ate Miller loop
[x] Implement fixed-argument revisited ate Miller loop

Type of change

[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)

How has this been tested?

Same existing tests work fine + new tests for fixed-argument pairing (compare pairing result to gnark-crypto).
How has this been benchmarked?

Old
New

R1CS
2,764,966
2,762,882

SCS
28,191,311
28,215,838

We lost 2084 R1CS and 24527 SRS for a single pairing compared to master but this should be offset in KZG gadget #874 with the fixed-argument pairing that the new Miller loop allows (see below).

Fixed-argument pairing

R1CS
2,133,509

SCS
22,481,220

Checklist:

[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] I did not modify files generated from templates
[x] golangci-lint does not output errors locally
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

Actually, I was relooking and there were some errors. Will submit another review after testing and recompiling

There was an old test of a function that does not exist anymore (MulBy034) — replaced it by the new test of MulBy014.

Actually, I was relooking and there were some errors. Will submit another review after testing and recompiling

There was an old test of a function that does not exist anymore (MulBy034) — replaced it by the new test of MulBy014.


Compat with Istio v1.5?

Hello,
I was wondering if you're been testing authservice with Istio 1.5?
Regards
Henrik

We had manually tested the Authservice with the beta release of Istio 1.5 and found that it worked.
The project has not yet matured to the point of having automated integration tests which run against new versions of Istio.
Have you run into any trouble?

No, we're just planning a bit over here. Thanks for replying =)


wat tries to create folders in /usr/lib

I tried installing wat using npm but when I try to start in fails with access denied trying to mkdir /usr/lib/node_modules/wat/.local as part of clerk.scaffold
the paths look vaguely xdgish so maybe $XDG_DATA_HOME is what you want

Okay can do - was going back and forth on where to put all the local files. Need a good cross-platform solution.

@keis Alright - ported everything over to ${os.tmpDir()}/.wat/.local/, and tried this out on Windows and Ubuntu. Looks pretty good.


Update Program.cs

What kind of change does this PR introduce?
Improvement fix :D
What is the current behavior?
No error logged on errors.
What is the new behavior?
Error logged on errors.
What might this PR break?
Nothing.
Please check if the PR fulfills these requirements

[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

Other information:

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

Thanks for the pr but event builder is changing soon. So will be closing this one.

It's basically getting a full rewrite so will leave as is for the moment. There's also some splat extensions that can an make that logging easier.

@glennawatson Hmm, I think would be awesome if you could expose the eventbuilder somehow (prebuilt binary), as a nuget package for example. We want to generate the events for some DevExpress libraries but for that we have to maintain our own fork, instead of just using an existing exe (https://github.com/gluck/ReactiveUI/blob/DevExpress/ReactiveUI.Events/ReactiveUI.Events.Dx15.Xpf_Net40.csproj)

Yeah that's the direction I am going. You can specify nuget or assembly to generate events for.

Part of the motivation for the rewrite we had users who were ahead on xamarin forms so their events weren't matching. So by rewriting and allowing it to be a msbuild task or global tool we can generate events for specific versions.
I had to speed up the generation to do it so using Roslyn and system.reflection.metadata now

@glennawatson Btw, how about renaming the .events packages to something more proper, that does not include "ReactiveUI"? Cause technically, apart from the repo, they don't use anything reactiveui.
Maybe they should be renamed to just "Reactive.Events.X". What do you think?

Worth asking about that one on slack under the #reactiveui-dev channel.
Generally I shy away from package renames since there is quite a bit of work involved.

https://github.com/reactiveui/pharmacist is going to be released in the next 24 hours. It's the replacement for event builder.

So for the devexpress libraries, you can probably just use Pharmacist.MsBuild now, similar to what we do with Xamarin.Essentials -- I'm integrating some of @gluck performance improvements he tried to implement about 2-3 years ago now.


Change qubits to qargs in BaseChannel compose method

What is the expected enhancement?
The BaseOperator uses the qubits kwarg for compose method. This should be changed to qargs for consistency with QuantumCircuit.append.

This was fixed with #2198


[@azure-tools/azure-http-specs] - Modify code to handle http-client-* packages tests

This PR is the typespec-azure counterpart of the PR https://github.com/microsoft/typespec/pull/4799. These changes are required in the specs to handle the test success in http-client-java, http-client-net and http-client-python packages. The scenarios are also validated using the test:e2e script.
Please review and approve the PR. Thanks

No changes needing a change description found.

You can try these changes here

🛝 Playground
🌐 Website
📚 Next docs


Token is working but Authentication says "Full authentication is required to access this resource."

My token login works fine, but if I try to know if I am fully logged in by my route:
UserController.php
/**
  * @Route("/auth/me", name="userIsAuthenticated")
  */
public function authenticated()
{
    return new Response(':-)', Response::HTTP_OK);
}

it just shows

Symfony\Component\HttpKernel\Exception\HttpException:
Full authentication is required to access this resource.

I found out that in the StackTrace only "symfony\security-http\Firewall" appears and nothing with Lexik?
I tried also the jwt.io if the token works and it works its all valid.
security.yaml
security:
    encoders:
        App\Entity\User:
            algorithm: auto

    providers:
        app_user_provider:
            entity:
                class: App\Entity\User
                property: email

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

        login:
            pattern:  ^/auth
            stateless: true
            anonymous: true
            json_login:
                check_path:               /auth
                success_handler:          lexik_jwt_authentication.handler.authentication_success
                failure_handler:          lexik_jwt_authentication.handler.authentication_failure

        api:
            pattern:   ^/
            stateless: true
            provider: app_user_provider
            guard:
                authenticators:
                    - lexik_jwt_authentication.jwt_token_authenticator

    access_control:
         - { path: ^/auth/me, roles: IS_AUTHENTICATED_FULLY }

The issue was that my /auth/me route was going to use the /auth firewall. The /auth firewall has no lexik authenticator in the configuration.
I just needed to change ^/auth to ^/auth$ and all is fine.
The $ sign prevents the firewall for working for eveything like
/auth/me
/auth/example
/auth/anotherexample
...

It only uses the exact match /auth route :-)

vk


Adding [SHRP] Sharpness custom Axis

This axis is introduced by the Geologica font.
I changed the description, making it somewhat coordinated with how ROND axis was described and clarifying the value ranges.
Ideally, this PR should be included in the same git pull subtree alongside the deletion of MUTA and the inclusion of YALN

@vv-monsalve what are next steps here?

@vv-monsalve what are next steps here?

We are waiting for the eng team work is complete on the axis registration pipeline updates before merging any new axis.

Eng notified us that we are ready to begin registration of new custom axes again.  This PR should be good to go!


Syntax error in the code

@notcl4y14 I think you might be using a Node.js version that is too old and does not support top-level-await (see https://github.com/nodejs/release#release-schedule). You can find out what your Node.js version is by running node --version. As you can see in the release schedule, versions before 14 are considered End-of-Life and are not being maintained so I don't try to support them. Please make sure to use one of 14, 16, 18, 19, or 20.

Gotcha, thanks
P.S. I'm using node.js 13


Port ANCM installer changes to 2.1

This will also allow us to remove the ANCM installer and Window hosting bundles steps in team city.

I still see files in https://github.com/aspnet/AspNetCore/tree/jkotalik/21Installers/src/IISIntegration/src/AspNetCoreModuleV2. Should these be removed, too?

I can go ahead and do it in this PR

Separately or inline with this PR is fine with me. Just wanted to avoid having any confusion about what we have to service in the future when there is (inevitably) a servicing bug in ancm v2

By the way, please hold off until we open the branch for 2.1.7. I'll let you know when that happens. Hopefully later this week.

We good: http://aspnetci/viewLog.html?buildId=590687&buildTypeId=Releases_21Public_WindowsInstallers&tab=artifacts#!fk6iluux85,-1xlv4ivii3kto

:shipit:


More fields from Github Query should be logged into the Database

Expected behaviour
From the github query when user's sign up for an account, there should also be saved fields to be used for the Profile page.
Fields to include:

Name
Email
Github Link
Github Avatar
BIO

Checklist

[x] This issue is linked to the appropriate project.
[x] This issue has appropriate labels.

Update on passing the GitHub user data from the router file to the service function. Next, we will insert GitHub user data into the user table.

If you're just joining the branch, we've got some action items for you:

You'll need to reset your database because some migrations have been edited. Before getting your local development environment going on this branch, make sure to do a docker-compose down to remove the MySQL container.
You'll need to rebuild everything with a docker-compose build.
Finally, there's a new endpoint for you, /profile/:principal_id.

Here's today's progress on this ticket:

The day started out with a route called /current-user that ostensibly had the relevant profile information being returned from the API for the current user.

However, that approach isn't scalable, since we'd want to show profile info for not-logged-in users. I removed and modified this endpoint.

We created an endpoint for /profile/:principal_id that contains all the information needed for the folks working on #356 to link the profile page with the database, at least for reading. This includes a user's full name, bio, email address, GitHub information, and social profiles.

To use this, just call the API with endpoint /profile/1 (for example, for principal ID (aka user ID) 1. This will show you enough information for that user for the web app to be able to render a profile page.
For those doing that work, please note:

There are top-level full_name and bio fields that are separate from the fields given to us from GitHub; this is to allow for asynchronous changes of this information between Rhizone and GitHub. In theory the logic should work like this: if the top-level fields are null, show the information from GitHub; otherwise, show the information from Rhizone, since that's what the user has set.
github_accounts and social_networks are both arrays. It's fair to assume they are arrays with at least one member, since currently the only way to log in is via GitHub, which populates both arrays.
You're going to get a URL back from social_profiles that will look something like //example.com/subfolder. This is intentional. Please use this as your href; you do not need to prepend "http:" or "https:" to this.
I've made life a little easier and pulled out the models I created into their own separate file in the api/src/models directory. You should assume that if data is being returned from this new endpoint, it will adhere to the models defined in this directory.

There's still a good amount of work to do, however:

I commented out some tests in order to get the code working, but that needs to be un-done and proper testing needs to occur with the modified code.
Not sure if it's in scope for this ticket, #355, or for the other ticket, #356, but the POST request to that endpoint needs to be handled so that the information can be updated.
I'd love for the relevant columns in principals to be pre-populated with the information we get from GitHub upon first login.
There's probably some better Express.js-native error handling that could have been done here.
More TSDoc-style comments would be nice.
I make no warranty for the code I added today. I tried my best to adhere to good standards, but we're running up against a deadline and things just need to work. We're now at a point where both teams can work independently on finishing their tickets.
Look for anything else I marked with a // TODO: that may need some work.

This leaves the following questions:

Is handling the POST for the edited data within scope for this ticket or the other one? If it's not in scope for this ticket, can we go ahead and merge this into main right now so as not to hold up the other team?
Should the branch for the other ticket go ahead and pull from this one, even though it's not merged into main yet?


Provide a default factory for Bucket.policy_vars field

Issue #, if available:
Description of changes:

Provide a default factory for Bucket.policy_vars field

This patch fixes an error in cloudtrail e2e tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

/lgtm


Update the section about Unreal

Remove reference to a specific version of Unreal (4) and clarify that Unreal supports C++ and the Blueprint Visual Scripting System (copy edit).

@mattetti : Thanks for your contribution! The author(s) have been notified to review your proposed change. @grbury

Adding Summer.
Sent from my T-Mobile 5G Device
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: PRMerger10 @.>
Sent: Thursday, May 27, 2021 7:27:32 PM
To: MicrosoftDocs/mixed-reality @.>
Cc: Graham Bury @.>; Mention @.>
Subject: Re: [MicrosoftDocs/mixed-reality] Update the section about Unreal (#333)
@mattettihttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmattetti&data=04|01|grbury%40microsoft.com|eee6aad287ad4b507d8808d92180262a|72f988bf86f141af91ab2d7cd011db47|1|0|637577656550332463|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=QrJWXRku4ty98cs1c2Fql8i8NvKxgDZZOAC2qEQsuM0%3D&reserved=0 : Thanks for your contribution! The author(s) have been notified to review your proposed change. @grburyhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgrbury&data=04|01|grbury%40microsoft.com|eee6aad287ad4b507d8808d92180262a|72f988bf86f141af91ab2d7cd011db47|1|0|637577656550342457|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=qiBqo%2FP4VoeTp4%2B4%2BC8N972PKfvwXjPtIt7TLQpK9vA%3D&reserved=0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fmixed-reality%2Fpull%2F333%23issuecomment-850065311&data=04|01|grbury%40microsoft.com|eee6aad287ad4b507d8808d92180262a|72f988bf86f141af91ab2d7cd011db47|1|0|637577656550352452|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=Ygzp55LEjvzyGjA2eg82fy1OzUpFI7AdAT1ejjpm8XI%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAK5QQFUADGKRMNJ3PWAVM2DTP35RJANCNFSM45VRGB3Q&data=04|01|grbury%40microsoft.com|eee6aad287ad4b507d8808d92180262a|72f988bf86f141af91ab2d7cd011db47|1|0|637577656550352452|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=6%2FDmDku7d6i1x1UMaqPUbzCKJ5xMjPacKS8EPYeWhnc%3D&reserved=0.


Extracting subtitles from m3u8 file

Is it currently possible to extract subtitles from an m3u8 file with youtube-dl? If so, how?

This feature is not landed yet. It's requested in #6106 and has an incomplete implementation at #6144.


[prometheus] increase timeout to 10 seconds (master)

Sister PR for https://github.com/DataDog/integrations-core/pull/1398

I ran into this issue trying to set up dd-agent with kube-state-metrics for the first time. I'm glad to see this fix was merged 3 weeks ago. Is this available in any datadog/agent v6 release on Docker hub?


Async JSI functions with promises block the event loop indefinitely

Description
While playing with the JSI I have found that using Promises in conjunction with async JSI functions can lead to the JS thread being blocked. According to the react native profiler the JS thread is still operating at 60fps but the JS thread is not responding to tap handlers and never resolves the promise. Note this happens sometimes and is hard to predict which suggests there is some race condition.
I am able to unblock the JS thread by periodically kicking the event loop into action with something like
const tick = async () => {
  await new Promise(r => setTimeout(r, 1000))
  tick()
}
tick()

I've also noticed that using Promises in conjunction with the JSI can occasionally lead to extremely long await times for the promise to be resolved, in the order of 250ms.
I have only tested this on iOS without Hermes. Occurs on both simulator and device.
Version
0.67.1
Output of npx react-native info
System:
    OS: macOS 12.0.1
    CPU: (10) x64 Apple M1 Max
    Memory: 20.13 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.2 - ~/.nvm/versions/node/v14.18.2/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v14.18.2/bin/yarn
    npm: 6.14.6 - ~/.nvm/versions/node/v14.18.2/bin/npm
    Watchman: 2<IP_ADDRESS> - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
    Python: 2.7.18 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.4 => 0.63.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce
A minimal failing example can be found here https://github.com/mfbx9da4/react-native-jsi-promise
1
Create an async native JSI function which spawns a thread, does some work and then resolves once it's done its work. You can use a callback or a promise to resolve from the native function. I've opted to use a callback as there are less moving parts this way. You could also use std::thread instead of GCD's dispatch_async for spawning the thread, the behaviour is observed with both. I've opted to use dispatch_async below.
    auto foo = jsi::Function::createFromHostFunction(
        jsiRuntime,
        jsi::PropNameID::forAscii(jsiRuntime, "foo"),
        1,
        [cryptoPp, myqueue](jsi::Runtime& runtime, const jsi::Value& thisValue, const jsi::Value* arguments, size_t count) -> jsi::Value {

            auto userCallbackRef = std::make_shared<jsi::Object>(arguments[0].getObject(runtime));

            dispatch_async(myqueue, ^(void){
                auto val = jsi::String::createFromUtf8(runtime, std::to_string(std::rand()));
                auto error = jsi::Value::undefined();
                userCallbackRef->asFunction(runtime).call(runtime, error, val);
            });

            return jsi::Value::undefined();
        }
    );
    jsiRuntime.global().setProperty(jsiRuntime, "foo", std::move(foo));

Source code here
2
Call the JSI function in a loop resolving the promise
for (let i = 0; i < 10; i++) {
    const start = Date.now();
    await new Promise(r => {
      jsiPromise.foo((err, x) => {
        console.log(i, 'err, x', err, x, Date.now() - start);
        r(x);
      });
    });
  }

Source code here
It might take several refreshes to get stuck but the JS thread does eventually get stuck.
Snack, code example, screenshot, or link to a repository
https://github.com/mfbx9da4/react-native-jsi-promise

Does this happen on JSC as well as on Hermes?

Only tested JSC and iOS thus far but present on device and simulator. Will update the description.

Thanks for flagging this. This is a great question. We also realized the original bridge-based microtask mechanism wouldn't work for sync C++ -> JS call in the new architecture.
I added drainMicrotasks to JSI a while ago for the exact purpose you mentioned (to flush microtasks on the JS side before getting back to C++).
That being said,

It wouldn't be available (until, hopefully, March) because we are still in the process of migrating to that. Under the hood, it's a completely different mechanism with the JSTimer::callReactNativeMicrotask so we have to be careful.
I wanna raise up another concern which is that JSI API need integration from JS engine. So actually, I think we may only migrate RN on Hermes to this "new JSI-based microtask mechanism" because it may only works for Hermes. It wouldn't just work for JSC/V8 until some works have been done there.

So...I think it's about right to directly call require("react-native/Libraries/Core/Timers/JSTimers.js").callReactNativeMicrotasks() for now (for Hermes) and for a while (for JSC, etc.) to unblock the development.
If it became a norm, I think it could make sense to expose a drainMicrotasks to globalThis or something equivalent for library developers to call from the JS side as well. 🤔 Although technically, this probably shouldn't be exposed to JavaScript.
I'll keep you posted whenever I have a update, but also feel free to follow-up!

Hey @Huxpro , thanks so much for the detailed answer and it’s great to know we were on the right track!
We implemented the solution of calling callReactNativeMicrotasks() immediately after we make any call from C++ to JS, and it improved things a lot, but we do still see occasional issues where the UI is not updated until something else (e.g. a touch) triggers a bridge message.
I also tried implementing a solution where we send a “dummy” message over the bridge with every C++ -> JS update, using the usual native modules method, and this works perfectly, but feels a little inelegant.
I was wondering whether there might be more going on under the hood when you send a bridge message, i.e. we are missing some other important part when we just call callReactNativeMicrotasks() directly – but your response makes me think this could be a timing thing/race condition instead – e.g. sending a bridge message takes longer than a direct call into JS, and when we callReactNativeMicrotasks() directly, occasionally some microtask has not even been queued yet.
I will experiment a little and report back. Thanks for the input!

Thanks for all your input on this. For now, sorry I haven't responded yet, I haven't got round to testing the proposed solutions. For now, I'm avoid using the JSI for asynchronous methods. @Huxpro could I get a link to the #jsi discord?

@tomduncalf

but we do still see occasional issues where the UI is not updated until something else (e.g. a touch) triggers a bridge message.

I've seen that and I'm not sure if that's an expected behavior or not.
Actually, I think instead of calling callReactNativeMicrotasks on JS, it's probably better to call JSIExecutor::flush on C++. But I don't understand why TurboModule aren't flushing things properly automatically for you.
I'll try to loop in someone understanding this better.

It looks like you call that method from a different thread.
I guess you should schedule that callback to JS thread with call invoker which if I remember correctly is keeping count of tasks like that.

@Huxpro Thanks for the pointer to try calling JSIExectuor::flush! This seems to work perfectly if we call it after every C++ to JS call, so it seems that some of the extra work flush does vs callReactNativeMicrotasks is important.
However, I couldn't work out a way to call flush from our code without adding some extra code to React Native to expose flush on the RCTCxxBridge: https://github.com/facebook/react-native/pull/33201/files. Perhaps you know of some other way we can access this from outside?
Regarding "I don't understand why TurboModule aren't flushing things properly automatically for you" – we are calling directly from C++ to JS, using JSC’s JSObjectCallAsFunction in our master branch and the JSI equivalent, JSIFunc->call in our hermes branch, so I suspect RN has no way of knowing that anything needs to be flushed.
While this is probably a slightly unusual pattern for a React Native module to communicate to JS right now, our understanding is that with the new architecture, this kind of direct C++ to JS communication (bypassing the bridge) will become more commonplace, so others may hit the same issues.

To provide an update on this, I found that we were able to expose the jsCallInvoker member of the RCTBridge, which has a method invokeAsync which calls a lambda you pass to it on the JS thread, then calls flush(). This allows us to flush the UI queue without needing to modify React Native to expose JSIExecutor::flush() directly.
The lambda to invokeAsync could just be a no-op, but in our case I'm using to reset a flag which prevents us making multiple calls to invokeAsync if one is already pending (e.g. if many C++ to JS calls occur in a short space of time).
You can see how we've implemented this for Realm in this PR, essentially we create a std::function which calls invokeAsync and then pass this through our initialization code so that our "call JS function" abstraction (we abstract over multiple Javascript engines) can call it whenever we call into JS from C++.
I'd be interested to know if there is a more "official" solution for this scenario planned though!

Although we have a workaround, I still feel this issue is important to get a proper fix for.

@kraenhansen does this still happen in 0.70?

Although we have a workaround, I still feel this issue is important to get a proper fix for.

+1 to this. Also for anything New Architecture related like this one, posting on reactwg/react-native-new-architecture should be the preferred way as we're getting a lot of noise on the React Native issue tracker, causing issue like this one to get lost.

What should I do In JNI code

@310381453 here is how I did it for Android: https://github.com/realm/realm-js/commit/7b9ee1c3bd6b9b5d7ede8c7feeca90a3081cc0ac. I. Some of the complexity may be related to how Realm is set up. I seem to recall that if you use Turbomodules it is easier to get hold of the async call invoker.

@kelset we're still seeing this on RN 0.71.0 (just tested with 0.71.0-rc.5).

It looks like you call that method from a different thread. I guess you should schedule that callback to JS thread with Jscallinvoker which if I remember correctly is keeping count of tasks like that.

As mentioned by @Szymon20000, this could be a problem in your code example @mfbx9da4. JS runtime can only be accessed from single thread at a time. Access from multiple threads is undefined behaviour. Could you fix it and see if you can still repro the problem?

Since this issue is a big problem for us because this behavior blocks our callbacks for push messages if any setTimeout is currently running, we implemented some workaround. We build a timer hook that calls setTimeout without the milliesconds parameter periodically, hence it releases the javascripts macro task queue after each execution. In this function we check if the time elapsed since the timer starts.
Hope this workaround helps for all having this issue.
Hook implementation:
import { useCallback, useEffect, useState } from 'react';

/**
 * Props for the useTimeout hook.
 */
interface UseTimeoutProps {
    // number of milliseconds after that the callback is called
    timeout: number;

    // The callback that is called after the timeout exceeds
    callback: () => void;
}

/**
 * Hook that provides a setTimeout alternative to provide a workaround for the issue https://github.com/facebook/react-native/issues/33006 .
 * The callback given by the props is called after the timeout given by the props (in milliseconds) exceeds.
 * The hook returns a start and stop function that can be used to start and stop the timer.
 *
 * @param props
 */
export const useTimeout = (props: UseTimeoutProps) => {
    const [startDate, setStartDate] = useState<Date | null>(null);

    /**
     * Checks if the timeout was reached. If yes, the callback will be called. If no,
     * the method will queue itself to the JavaScript macro tasks to check again.
     */
    const macroTaskRun = useCallback(() => {
        if (!startDate) {
            return;
        }

        const tmpStartDate = new Date(startDate);
        tmpStartDate.setMilliseconds(tmpStartDate.getMilliseconds() + props.timeout);

        if (new Date() >= tmpStartDate) {
            props.callback();
        } else {
            setTimeout(macroTaskRun);
        }
    }, [startDate, props]);

    /**
     * Starts the timer.
     */
    const start = useCallback(() => {
        setStartDate(new Date());
    }, []);

    /**
     * Stops the timer.
     */
    const stop = useCallback(() => {
        setStartDate(null);
    }, []);

    /**
     * Called if the startDate was changed.
     * If the startDate was set, the periodically check if the timeout was reached will be started.
     */
    useEffect(() => {
        if (!startDate) {
            return;
        }

        macroTaskRun();
    }, [startDate, macroTaskRun]);

    return {
        start,
        stop,
    };
};

usage:
...
const timeoutCallback = useCallback(() => console.log('finished'), [])

const { start, stop } = useTimeout({ timeout: 20000, callback: timeoutCallback });

useEffect(() => {
    start();
}, []);

useEffect(() => {
    stop();
}, [someStopConfition]);

In an attempt to reproduce the behaviour through a C++ native module in the RN Tester app, I finally realized the culprit of our issue. We were relying on platform primitives, such as the CoreFoundation RunLoop (on iOS) and ALooper on Android to schedule async work. As outlined in the description of https://github.com/realm/realm-js/pull/6791 we should instead schedule work trough the React Native CallInvoker API. I consider this issue closed from the perspective of the realm package. A good followup action could be to document the importance of calling through the invoker and the reason for its existence.


First attempt at running automated tests on all pull requests

Motivations:
See issue #11
Main changes:

a hdden folder to host a github workflow has been created
it contains a .yml file that describes a list of actions that github should perform, and in which conditions
I included:

unit tests using pytests for platform ubuntu, macos and windows
for branches master and devel
for pushes and Pull Requests on these branches
for Python versions 3.7 and 3.8
A lintering tool (automated syntax checking with flake8)

This is a first try,, let's see if it works  (but we'll only know after the merge)

Cool ! I merge thanks :)


Nested Systems

Feature request

[X] I confirm that this is a feature request rather than a question.

What problem does this feature solve?
We have lots of systems some of them can be grouped like environments or CDN's.  It would be good if they could be grouped within the systems list
What does the proposed API look like?
How should this be implemented in your opinion?
nesting the systems with a system group object within the config & locales files
Are you willing to work on this yourself?**
Willing to help test

Duplicated https://github.com/bazzite/statusfy/issues/162.


Don't return deleted users in the support console user search

Context
The user search in the support console returns deleted users.
Changes proposed in this pull request
Hide deleted users from support console search results.

For CC users does the search also exclude anyone who hasn't seen the privacy policy?

For CC users does the search also exclude anyone who hasn't seen the privacy policy?

Yes, this is already handled in the Pundit authorisation scope:
https://github.com/DFE-Digital/get-help-with-tech/blob/main/app/policies/user_policy.rb#L3-L11


Ability to add a custom stylesheet to an individual board.

That would be nice for branding, additional info, etc...

You can already do that.

Go to Settings > Application > Custom stylesheet
Each board have a unique css class "board-project-ID", by example "board-project-2"
So each board can be customized and probably anything in the user interface

I think i love you.
Many thanx!


[MM-842]: Added server testcases for command/daily_summary.go

Summary
Added server testcases for command/daily_summary.go

Create a PR with the changes on MM


rom-rails#success? does not work with ROM::ConstraintError

irb(main):013:0> ApprovalForm.build(description: 'hello world', incident_id: 106694).save.success?
  ROM[mysql] (1.5ms)  INSERT INTO `approvals` (`description`, `incident_id`) VALUES ('hello world', 106694)
NoMethodError: undefined method `any?' for #<ROM::SQL::ConstraintError:0x007f95e4e59468>
        from /Users/kwando/projects/work/sms_api2/vendor/bundle/ruby/2.1.0/gems/rom-rails-0.3.1/lib/rom/rails/model/form.rb:116:in `success?'

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/11122853-rom-rails-success-does-not-work-with-rom-constrainterror?utm_campaign=plugin&utm_content=tracker%2F155789&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F155789&utm_medium=issues&utm_source=github).

Test to reproduce is here:
https://github.com/cflipse/rom-rails/commit/a17012030c046634fb34661ac68c5c1bb3b89a2f
Looking at this, I'm not actually sure that this is a rom-rails error.  I think the "actual" bug is that the exception is leaking out of the try block, rather than the expected ROM::Commands::Result::Failure object

So, I can make that specific error go away with a small code change, but
Here's the thing:  ActiveRecord lets validation errors bubble all the way up, typically.  You violate a database constraint, it explodes immediately.  This is kind-of good, as you get an error close to the failure.  ROM swallows the constraint errors and return them in a failed command data object, and you check / verify a few lines down.
Unfortunately, that error accessor is also the place where we put validation failures.  Same attribute, different APIs.  We can catch the constraint failure, and successfully report that the command has failed ... and rails will, in most cases, re-render the form, and attempt to display the validation error messages.  Which will explode with another no method error, this time for [].  And it'll be even further away from the source.
It kind of feels to me like the issue is that we conflate validation failures and persistence failures in the same spot, and the solution lies closer to CommandRegistry#try  .. I'm not entirely sure.  @solnic, thoughts?

This is a super important subject to discuss. My way of thinking about it initially was that we're gonna treat specific constraint violations as validation errors too that were raised by the db backend (sequel in our case). Then you are free to handle them however you want, ie you may re-raise the error if you want.
I'm not sure what the problem is with re-rendering the form. What no method error for []? rom-rails should wrap those errors with whatever is needed so that they can be handled easily. I wouldn't go as far as trying to treat them as the same kind of a validation error form the ruby side (ie unique constraint validation vs ruby AM uniqueness validation), because semantics are different. But I think it should be possible to just handle constraint errors on the UI layer by simply showing an error message that it failed and please try again. We're talking about edge cases here but they happen, right.
Your code can handle that error, you've got original error and you've got command error which wraps it. So it's a matter of handling it properly.

in progress:  https://github.com/cflipse/rom-rails/tree/constraint-errors
If you pull that branch and run the specs, you'll get:
  1) Form #errors recovers from database errors
     Failure/Error: expect(result.errors[:email]).to eq []
     NoMethodError:
       undefined method `[]' for #<ROM::SQL::ConstraintError: ROM::SQL::ConstraintError>

So, on a failure, the form assigns and treats the error as the value coming back from command.try, which nests whatever real failure it got.  Sometimes, that's a validation error.  Sometimes, that's the database constraint.
The form is expecting the nested command error to conform to AM::Validations, which the constraint does not do, nor should it.  For those violations, I think all we've really got is a string message, and we can't assign it to the field or fields that triggered the violation.
I suspect what we're looking at is more along the lines of having the forms using an error proxy, that can look at both "types" of failures,  and present them in a non-explody kind of way.  That might also clean up the 'pre-validation' error blocks that I had to do to make the forms render cleanly in the first place.

Yes that was my idea, not to choke on those errors and handle them gracefully and simply treat db constraints as your second defense against corrupted data.

fixed in rom-rb/rom-rails/pull/35