Update with MongoDB

I am trying to update an entity by setting new values using Kundera platform with MongoDB. However, I am getting a duplicate key exception. The same code works with Cassandra.
What is the safest way to update an entity with Kundera? Right now I am calling persist(entity) method and assume that it works as upsert(), the assumption doesn't hold with MongoDB, but does with Cassandra. Can you please tell me how to update it with MongoDB?

Oct 29, 2015 7:48:54 PM com.leuven.distrinet.lmaas.dmmiddleware.damiddleware.DataAccessService store
INFO: document is not inserted in lmaas.RLog collection. Caused By:
com.impetus.kundera.KunderaException: com.impetus.kundera.KunderaException: document is not inserted in lmaas.RLog collection. Caused By:
at com.impetus.kundera.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:180)
at com.leuven.distrinet.lmaas.dmmiddleware.damiddleware.DataAccessService.store(DataAccessService.java:53)
at com.leuven.distrinet.lmaas.dmmiddleware.services.DataManagementService.persist(DataManagementService.java:83)
at com.leuven.distrinet.lmaas.client.controller.LogDataStorage.doGet(LogDataStorage.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:534)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: com.impetus.kundera.KunderaException: document is not inserted in lmaas.RLog collection. Caused By:
at com.impetus.client.mongodb.MongoDBClient.onFlushCollection(MongoDBClient.java:1095)
at com.impetus.client.mongodb.MongoDBClient.onPersist(MongoDBClient.java:834)
at com.impetus.kundera.client.ClientBase.persist(ClientBase.java:114)
at com.impetus.kundera.lifecycle.states.ManagedState.handleFlush(ManagedState.java:197)
at com.impetus.kundera.graph.Node.flush(Node.java:531)
at com.impetus.kundera.persistence.PersistenceDelegator.flush(PersistenceDelegator.java:403)
at com.impetus.kundera.persistence.PersistenceDelegator.persist(PersistenceDelegator.java:145)
at com.impetus.kundera.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:174)
... 27 more
Caused by: com.mongodb.MongoException$DuplicateKey: { "serverUsed" : "localhost:27017" , "err" : "E11000 duplicate key error index: lmaas.RLog.$id  dup key: { : 11 }" , "code" : 11000 , "n" : 0 , "connectionId" : 189 , "ok" : 1.0}
at com.mongodb.CommandResult.getWriteException(CommandResult.java:88)
at com.mongodb.CommandResult.getException(CommandResult.java:79)
at com.mongodb.CommandResult.throwOnError(CommandResult.java:140)
at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:135)
at com.mongodb.DBTCPConnector.access$000(DBTCPConnector.java:40)
at com.mongodb.DBTCPConnector$1.execute(DBTCPConnector.java:186)
at com.mongodb.DBTCPConnector$1.execute(DBTCPConnector.java:181)
at com.mongodb.DBPort.doOperation(DBPort.java:187)
at com.mongodb.DBTCPConnector.doOperation(DBTCPConnector.java:208)
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:181)
at com.mongodb.DBCollectionImpl.insertWithWriteProtocol(DBCollectionImpl.java:565)
at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:195)
at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:167)
at com.mongodb.DBCollection.insert(DBCollection.java:93)
at com.impetus.client.mongodb.MongoDBClient.onFlushCollection(MongoDBClient.java:1091)
... 34 more

@ansarrafique
For updating entity object on MongoDB.  So it will catch duplicate primary key errors.
Also, you can change the value of write concern (for example, UNACKNOWLEDGED so that no errors are shown for duplicate primary key )for a particular EntityManager instance using property:
em.setProperty(MongoDBClientProperties.WRITE_CONCERN, WriteConcern.UNACKNOWLEDGED);
Hope that helps.
-Devender

Why the em.insert() for the MongoDB performs differently than Cassandra in the case of  update operation? Imagine, in the case of polyglot persistence, calling em.insert() for the update operation would end up in operation failure.
em.merge(object) implementation works for both Cassandra and MongoDB? What is advisable to use to update the data? is it em.insert() or em.merge()?
Also, can you please elaborate more on the writeconcern properties for the MongoDB? Why these properties (ACKNOWLEDGED and UNACKNOWLEDGED ) have an impact on the primary key? It either say wait for the operation to be completed (ACKNOWLEDGED ) or do not wait for operation to be completed (UNACKNOWLEDGED) . In addition, I think the default writeconcern property for Kundera in the case of MongoDB is UNACKNOWLEDGED not ACKNOWLEDGED.

@ansarrafique
Default Write Concern in MongoDB is ACKNOWLEDGED. Refer this.
Impact of primary key due  to WriteConcern Property.
According to MongoDB's documentation - "UNACKNOWLEDGED is similar to errors ignored; however, drivers will attempt to receive and handle network errors when possible and ACKNOWLEDGED write concern allows clients to catch network, duplicate key, and other errors.". Find more on WriteConcern here.
Now, with ACKNOWLEDGED WriteConcern when you insert a document in MongoDB with a primary that is already present in that collection it will show duplicate primary key error. As u mentioned, it will wait for the operation to be completed. MongoDB will not allow adding a document with same primary key. So it will give you a duplicate Key error. In case of UNACKNOWLEDGED, this error is ignored and obiously, the document will not be added as there is duplicate primary key error. But no error is shown to the client.
For updating document in MongoDB with Kundera em.merge() should be used.

Sure, the default writeconcern property for the MongoDB  is ACKNOWLEDGED, whereas in Kundera it was set as UNACKNOWLEDGED (I verified this with Kundera 2.0.6 version). I am not sure if it is still set as UNACKNOWLEDGED.
In the case of UNACKNOWLEDGED with the MongoDB, I doubt that the duplicate key error message will be ignored rather it will still throw the exception. Please correct me if I am wrong.
For updating a document in both Cassandra and MongoDB, still em.merge() should be used or it is advisable only in the case of MongoDB? If so, which method should be used to update a record for polyglot persistence?

@ansarrafique
Kundera 2.0.6 is an older version. Current version is 3.1  In newer version, default writeconcern property for the Kundera-MongoDB is ACKNOWLEDGED.
In the case of UNACKNOWLEDGED with the MongoDB, No exception is thrown.
MongoDB & Cassandra both have a different way to handle inserts.
In case on MongoDB, it won't allow upsert while inserting in the database. So Kundera is following the philosophy of mongoDB. It performs insert using em.persist() and update/upsert using em.merge()
And in case of Cassandra, insert and update are kind of similar under the hood. So, using em.persist()/em.merge() give similar results.
Apart from the individual behavior of the databases, while dealing with polyglot persistence I think using em.persist() for insert and em.merge() for update/upsert will make more sense.

Thanks for the clarification Devender and thanks for pointing out that the write concern property is set as  ACKNOWLEDGED in the latest version of Kundera.


Adjust Gemfile.lock platforms

Motivation
With the recent changes to fix CI, we now can't bundle install in our dev laptops. I'm hoping adding arm64-darwin, x86-darwin and x86-linux will fix the issue.

I need this PR to test changes without patching Gemfile.lock locally, so merging now.


Kubernetes Castlemock Deployment Helm

Hi,
I have created an helm deployment for castlemock pod and i have created an persistent volume.
But when i use castlemock the home directory is ?/.castlemock and if i restart the pod i lose my data.
It's possible change the home directory in configuration of castlemock?
In the configuration of deployment i have configurated this path
volumeMounts:
- mountPath: /root/.castlemock
This is part of deployment file :
containers:
- name: castlemock
image: {{ .Values.image.name }}@{{ .Values.image.digest }}
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
resources:
limits:
cpu: xxxx
memory: xxxx
requests:
cpu: xxxxx
memory: xxxx
ports:
- containerPort: 8080
name: mitm
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 30
periodSeconds: 60
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy:  {{ .Values.image.pullPolicy }}
env:
- name: CASTLEMOCK_CONFIG
valueFrom:
configMapKeyRef:
name: castlemock-env-vars
key: CASTLEMOCK_CONFIG
volumeMounts:
- mountPath: /root/.castlemock
name: target

Problem resolved


Version 2.4.10 not available on pypi

Could you add your latest version to pypi please?

Oh, didn't see that it wasn't on Pypi. That's now done ^^


Move from skypack to esm.sh

There is a problem with skypack. It seems like it is unable to build the new types dependency. All plugins and grammY are migrating to https://esm.sh now, which does not have the same problem.

Works fine.

Can you also do the release?

Already done 😁

Ohh perfect! Just got the notfication. Thank you!


⚠ Bofrost.be has degraded performance

In efe99b1, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1304 ms

Resolved: Bofrost.be performance has improved in e14c8ec after 2 hours, 25 minutes.


StringFlag values with spaces

Is there any way to have a StringFlag that can accept a value with spaces in it?
Such as:
<app> -flag "My Flag Value"

When I try this with the current StringFlag, I get '"My ' as the flag value.

Hi @lukehobbs,
I'm having trouble reproducing your issue, could you provide a complete example? For reference, I ran:
package main

import (
        "fmt"
        "os"

        "github.com/urfave/cli"
)

func main() {
        app := cli.NewApp()

        app.Flags = []cli.Flag{
                cli.StringFlag{
                        Name:  "lang",
                        Value: "english",
                        Usage: "language for the greeting",
                },
        }

        app.Action = func(c *cli.Context) error {
                fmt.Println(c.String("lang"))
                return nil
        }

        app.Run(os.Args)
}

$ go run /tmp/tmp.go --lang "hello world"
hello world

Ah, I've run your example and it worked perfectly. I overlooked the fact that I'm using this readline implementation to create an interactive cli:
	for {
		line, err := readline.String("\n>> ")
		if err == io.EOF {
			break
		}
		if err != nil {
			fmt.Println("error: ", err)
			break
		}
		readline.AddHistory(line)
		err = app.Run(strings.Fields("APPNAME " + line))
		checkErr(err)
	}

I'm assuming the issue is coming from this. Thank you for your help!


Removed datasources are still displayed

Hey,
I removed some datasources and they were still displayed on the home screen of Pivot. I waited a bit and check the coordinator, they were really gone. If you click on them in Pivot: "Query error: no such datasource". I guess there is some sort of cache in Pivot that never checks if the datasources still exists when it's updated.
Workaround: restart Pivot.
Thanks,
PS: Pivot is really great.

Hi, this is how it is expected to work right now. DataCubes (aka data sources) are auto added but never auto removed. You ether have to restart Pivot, and if you have a config you will have to delete them from there also. We are working on fixing that and making that system a lot better literally right now.

All right @vogievetsky, thanks. Do you want I close this issue if it's already wip ?


nixos/xsession: check for env vars

Read $XCOMPOSECACHE and $XDG_DATA_HOME environment variables when writing ~/.compose-cache and ~/.local/share, otherwise use default values.
Motivation for this change
Old script did not check for $XCOMPOSECACHE and $XDG_DATA_HOME
environment variables.
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

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

Thank you for contributing to Nix.
Since you are using the XDG variables for the data path, how about XDG_CACHE_HOME for the default location of the compose cache (if xcomposecache isn't set)?

Aren't these env vars usually set up after this point and potentially in the sessions themselves? I for example have a ~/.xsession file that ends up setting the correct XDG_DATA_HOME, which happens here: https://github.com/NixOS/nixpkgs/blob/9137f83880a209b9e2e308b1a27486026e8aac4f/nixos/modules/services/x11/display-managers/default.nix#L132-L135
So this script doesn't even get the chance to see the correct env vars.

@peterhoeg ~/.compose-cache is the default location, so if it has not been set by the user, other applications (e.g compose (5)) will read from ~/.compose-cache. This patch would have no effect unless the user specifically exports XCOMPOSECACHE.
I also think we should in general try not to change things from the upstream default, as it can cause confusion and inconsistent behavior between distros.

@Infinisil The exact time that the environment variables are set depends on where they are defined. You are correct that, if they are set in ~/.xsession, then they will not be available at the time the script is run. This can be solved by either:

move the sourcing ~/.xsession at the beginning
defining your environment variables elsewhere, such as /etc/profile (this is can be used in NixOS by setting environment.sessionVariables. However this doesn't allow you to have different per-user values (e.g. user A wants XDG_DATA_HOME to be ~/.local/share, and user B wants XDG_DATA_HOME to be ~/.hidden/local/share)

The problem is that ~/.xsession isn't a file you source, but rather execute. It represents the full user session, and it only exits once the user logs out.

It also occurred to me that we could expose services.xserver.displayManager.session.script as an option. This would allow people with niche setups to override the default script. Currently services.xserver.displayManager.sessionCommands only appends to the default script.

@Infinisil Apologies, I am not familiar with "manual" Xorg setups (I use KDE plasma). From looking at the xsession script, it seems like these env vars could be set in ~/.xprofile if we move the sourcing of ~/.xprofile to the beginning.

That might work

@Infinisil Bump? Is there some proper way to request attention? I'm new to git/github, so sorry if this is the wrong way to go about it

@Infinisil
ping?

Not sure, maybe try pinging some people that were involved with this part of the code in the past

As a KDE user, how would you go about overriding the location of the compose cache? Otherwise this looks fine to me but please run the various tests (sddm, plasma5, xfce, gnome3) to ensure this isn't breaking anything.

@peterhoeg Personally, I set XCOMPOSECACHE in /etc/profile, though I imagine you could do it on a per-user basis with ~/.xprofile or ~/.pam_environment

What is the status of this pull request?

While trying to declutter my $HOME I ran into this issue. It would be nice to have this rebased and merged at some point.


Implement candidate workflow

After upload a compendium becomes candidate, only visible to creating user and admins. After storing complete metadata, the candidate status is set to false and all behaves as usual.

[x] Implementation

[x] update viewSingleMetadata

[x] Tests
[x] Web API updated > https://github.com/o2r-project/o2r-web-api/issues/42
[x] issue for platform: https://github.com/o2r-project/o2r-platform/issues/100

For tests to succeed, the latest loader is needed, see https://github.com/o2r-project/o2r-loader/pull/28

Merging to fix loader's tests... chicken-and-egg.


SDP-829: Set pw flow instead of forgot pw

Separated password flow from forgot password, for the case the user is logged in and wants to reset password.

stellar-disbursement-platform-frontend-preview is available here:http://sdp-frontend-pr6.previews.kube001.services.stellar-ops.com/

stellar-disbursement-platform-frontend-preview is available here:http://sdp-frontend-pr6.previews.kube001.services.stellar-ops.com/


Method annotations incorrectly decorate inherited consumer methods

Precondition
Consider the following consumer class:
class GitHub(uplink.Consumer):

    @uplink.get("/users/{username}")
    def get_user(self, username):
        """Get a single user."""

Use any method annotation. For this example, I'll create a custom method annotation, PrintMethodName, that simply prints the name of the consumer method that it wraps:
from uplink import decorators

class PrintMethodName(decorators.MethodAnnotation):

    def modify_request_definition(self, method):
        print(method.__name__)

Steps to recreate
Create a subclass of GitHub and decorate it with the method annotation:
@PrintMethodName()
class GitHubSubclass(GitHub):
    pass

Expected
No output to stdout, since GitHubSubclass doesn't define any consumer methods.
Actual
The method annotation decorates get_user from the parent class, GitHub.
Output:
get_user

The root cause here is that uplink.helpers.get_api_definitions returns all consumer methods available to the given class -- including those inherited through the class hierarchy. Any fix for this issue should add a unit test that verifies that MethodAnnotations only decorate consumer methods defined in the decorated consumer's body.


Calling ".As" does not work on .NET Framework

Hi,
I was trying to use Corvus Json in a Source Generator but it seems like it's not working on .NET Framework (which is what VS is using).
Simple PoC is:
using Corvus.Json;

namespace Issue
{
	internal class Program
	{
		static void Main(string[] args)
		{
			var test = new JsonUri("C:/");
			var test2 = test.As<JsonUri>();
		}
	}
}

Which results in an exception: System.InvalidProgramException: 'Common Language Runtime detected an invalid program.'
It seems to be related to the DynamicMethod in JsonValueNetStandard20Extensions but I haven't yet figured out why it doesn't work.

Can you zip up your repro solution and add it to this issue, please.

Looking back through the logs, we did have an issue with running dynamically generated code inside a SourceGenerator (something we are following up on); the V4.0.0 code generation library removes the dependency on Corvus.Json.ExtendedTypes to mitigate this issue.
V4.0.0 will be shipping in November 2024 alongside .NET 9.0 and you might like to try migrating to preview builds of that if you are building a SourceGenerator.

Hi @WolfspiritM - just giving this a bump.


Add strings.Replace support

Closes #305

I can see the need for something like this. LGTM

Code LGTM!


mautrix-whatsapp: 0.10.1 -> 0.10.2

Description of changes
https://github.com/mautrix/whatsapp/releases/tag/v0.10.2
Related to https://github.com/NixOS/nixpkgs/issues/254798

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] 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

[x] 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
[x] 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.

Deployed to my server and did a basic functionality check.

Note that the vulnerable libwebp is still bundled, but only used for encoding; thus avoiding the known vulnerable code path.

@ofborg build mautrix-whatsapp

@OfBorg evaluate


Add MoveType::WordAfter movement

In order to support the Emacs keybinding M-f (and C-Right and M-Right) for #33, I'm going to add a new movement, MoveType::WordAfter, which moves up to the point right the end of a word.

For future reference, I replaced MoveType::WordAfter with MoveType::WordBegin(WordStyle::NonAlphaNum).


[stable/cluster-autoscaler] - imagePullSecrets support #9584

Signed-off-by: Nick Fisher<EMAIL_ADDRESS>
What this PR does / why we need it:
Added configuration option for imagePullSecrets in cluster-autoscaler chart.
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #9584

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md

/assign @lachie83

/assign @linki


bedtools coverage should have a -sorted option

This is a duplicate of the issue opened here: https://github.com/arq5x/bedtools/issues/77. I'm opening it on this repository because it seems like the other issues tracker should be abandoned. Note my commend in the docs stating that intersect behaves differently than coverage for my purpose. Thanks!

All done for 2.24.0.


wil::GetModuleFileNameW - string size is not adjusted

Here's a snippet that demonstrates the issue:
#include <windows.h>
#include <string>
#include <iostream>
#include "wil/stl.h"
#include "wil/win32_helpers.h"

int main()
{
    std::wstring exePath = wil::GetModuleFileNameW<std::wstring>(nullptr);
    std::wcout << exePath << '\n';
    std::wcout << exePath.length() << '\n';
    std::wcout << wcslen(exePath.c_str()) << '\n';
}

An example output:
C:\Users\User\source\repos\ConsoleApplication1\x64\Release\ConsoleApplication1.exe
127
82

As you can see, the string size is not adjusted after calling GetModuleFileNameW internally.
By the way, if you remove #include "wil/stl.h" and try to compile in Release, the compiler crashes. I reported about it in the compiler feedback.

@jonwis this code looked strange to me:
https://github.com/microsoft/wil/pull/165/files#diff-d37b3eafe71ceccb982be31eccd9c519a718ce9ef557eaaedcdc94225c3467b3R306-R325
Specifically, I didn't find any reference in the docs to the off-by-one difference that explains copiedCount versus copiedCount + 1 for GetModuleFileNameExW vs. GetModuleFileNameW, respectively.
And indeed, looks like the fix doesn't work properly with GetModuleFileNameExW.
Take the snippet above and replace:
wil::GetModuleFileNameW<std::wstring>(nullptr);
with:
wil::GetModuleFileNameExW<std::wstring>(GetCurrentProcess(), nullptr);
You'll see that the returned path has its last character missing.

Indeed, I get "{...}.ex" instead of the expected "{...}.exe", thanks. Time to improve the tests and fix the code!


Limit boxes to 4000 bytes

When the box is 4000 bytes large, reject e2e sending immediately.

:+1:

Let the server decide the max message size (it will return a PAYLOAD_TOO_LARGE status code which is converted into a ApiError::MessageTooLong).


"dummy-flash" device tree bug

I'm currently working on porting Zephyr to i.MX7 SoC and I'm facing an error with cmake when it is generating the generated_dts_board.h.
I want to use only the sram and in my dts I removed the "zephyr,flash" property. I'm not sure if I'm doing this correctly. If I don't want a flash should I need to set it to a specific entry or just remove the property from the dts?
Error message:
Makefile:854: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
-- Selected BOARD colibri_imx7d_m4
Zephyr version: 1.10.99
Parsing Kconfig tree in <snip>/Kconfig
Using <snip>/tests/shell/build/colibri_imx7d_m4/zephyr/.config as base
-- Generating zephyr/include/generated/generated_dts_board.h
Traceback (most recent call last):
  File "<snip>/scripts/dts/extract_dts_includes.py", line 906, in <module>
    main()
  File "<snip>/scripts/dts/extract_dts_includes.py", line 896, in main
    insert_defs(chosen['zephyr,flash'], defs, load_defs, {})
KeyError: 'zephyr,flash'
CMake Error at <snip>/dts/dts.cmake:111 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  <snip>/cmake/app/boilerplate.cmake:227 (include)
  CMakeLists.txt:1 (include)

@mbolivar : Maybe you can suggest something.

@pfalcon there was a thread about this: https://lists.zephyrproject.org/pipermail/zephyr-devel/2018-February/008846.html
I only work in environments where flash is enabled, but it looked like @MaureenHelm had some concrete solutions for @diegosueiro to try that I don't see any additional information about in this issue report.

@mbolivar,
I updated the email thread, but basically:
There will be use cases where just one RAM will be available in the system for Zephyr and this RAM will have to accommodate both code and data. And to get this working I had to apply #6366 and omit the "zephyr,flash" property from dts.

Do you have an example that shows this issue?

@galak ,
I checked the current source of scripts/dts/extract_dts_includes.py and it changed a lot since I raised this issue.
Now, when I set CONFIG_XIP=n in boards/arm/colibri_imx7d_m4/colibri_imx7d_m4_defconfig file, the generated_dts_board.h generation goes through but the compilation fails:
real-ld: invalid origin for memory region FLASH
collect2: error: ld returned 1 exit status
zephyr/CMakeFiles/zephyr_prebuilt.dir/build.make:101: recipe for target 'zephyr/zephyr_prebuilt.elf' failed
make[2]: *** [zephyr/zephyr_prebuilt.elf] Error 1
CMakeFiles/Makefile2:576: recipe for target 'zephyr/CMakeFiles/zephyr_prebuilt.dir/all' failed
make[1]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Basically, the idea is to have both code and data segments in the same memory type. And when I raised this I was only be able to do that with the PR #6366.

@galak ,
If you want I can rebase the PR #6366 and apply this change to scripts/dts/extract_dts_includes.py.

@galak,
Can we consider the fix for the 1.12 release?

@galak ,
How are we going to fix this?

@galak ?

@diegosueiro can you retest to see if this is still an issue.

@diegosueiro can you retest to see if this is still an issue.

Sure. I'll be testing this in the weekend.

@galak,
I can confirm that at 1daf559 "dummy-flash" is working.


Where i find the required app?

This is the error that i received after imago launch.
I have not installed the required app because I can't find them.
Can you help me?
Traceback (most recent call last):
File "/usr/local/bin/imago", line 10, in
sys.exit(main())
File "/home/cesco/.local/lib/python2.7/site-packages/imago/imago.py", line 48, in main
helper.initialize_sqli()
File "/home/cesco/.local/lib/python2.7/site-packages/imago/helper.py", line 15, in initialize_sqli
conn = sqlite3.connect('metadata.db')
sqlite3.OperationalError: unable to open database file

Did you try?
$ pip install imago

I I tried that instruction and after a reboot, imago started correctly from the command line.
I tried some numbers but every search was negative.
Could you suggest me a census number, just to see what imago returns?
Thanks
Regards

Not an issue


Add a locking wrapper for a kcd.ReadWriter. [phab:D1034]

Created by fromberger at 2016-09-01 20:23:06:
This is a convenience to provide locking for implementations of the
ReadWriter interface that are not safe for concurrency.

zarko accepted this revision at 2016-09-01 21:48:54

fromberger closed via commit 16c1feea482575d3b8b8b47bff81245b332a7cae at 2016-09-01 22:40:24


add contribution guildelines

I think it would be nice to add contribution guidelines somewhere in this repository.
We have discussed a lot of different guidelines/rules while working on the pull requests for the db modules and email modules.
Here is a summary of what we have come up with so far:

In general, making the end-user write a little extra boilerplate code is not a bad thing.  This okay as long as the code is simple and easy to copy-paste.

In the Shared data type, try to only use normal values, instead of functions. In general, it should not be a common interface, but values that are shared.
For instance, the Shared data type in the tonatona-db-* contains a Pool SqlBackend, NOT a function like ReaderT SqlBackend m a -> m a that contains a Pool SqlBackend internally.
(However, the Pool data type contains functions internally.  This is okay, but if possible try to use values that are serializable and don't contain functions internally.)

For modules that don't need configuration data at application startup time, DON'T declare the Config type and HasConfig class. If the application doesn't need data at runtime, then don't declare the Shared type and HasShared class.
For instance, the tonatona-email-sendmail class doesn't define either Config or Shared.

In general, we want to define the Config and Shared types, and the HasConfig and HasShared types on the child modules. For example, instead of having Config and HasConfig defined in the Tonatona.Db module, we instead define them in the Tonatona.Db.Postgresql module.
If you think you need Config and Shared to be defined in the parent module and shared between the child modules, it may be worthwhile to consider that you actually need to provide more configuration options in your parent module and just not having any child modules.

Similarly to the last point, if the child module needs to run commands in a separate monad, then that monad should be defined in the child module itself, and not in a parent module.
For example, TonaDbM is defined separately in both Tonatona.Db.Postgresqland Tonatona.Db.Sqlite.

If you need to decide at runtime whether to use one child module or the other, then it is possible to use a sum-type to hold two different child modules.
In this case you will need to use error in the definition of HasShared.  You will also need to use a wrapper function for the functions defined in each child module.
It is ONLY appropriate to use error in the definition of HasShared when you are picking at runtime which of the child modules to use.
There is an example of this in the tonatona-sample package.  Look at the SharedDb type sum-type as well as the sharedDbRun function.

@arowM How do these guidelines/rules look?  Anything that should be changed?

Also, do you have any preferences for where something like this goes?  Two appropriate places may be either in the top-level README.md or in a file like CONTRIBUTING.md.

Good job! So cool.
How about place it in the CONTRIBUTING.md and paste link to it in the  README.md?


Category list missmatch

Hello,
How come the category lists provided do not match those on site? (http://www.yelp.com/developers/documentation/category_list)
For example "Gelato" is in the webpage but not in any of the lists...

My plan is to remove this directory and supply a direct link to the JSON dump on that page. (That download URL is still in some flux).
(I also half-remember this being a code dependency for something, tracking that down.)

OK, there's now a nice downloadable JSON file at

https://www.yelp.com/developers/documentation/v2/all_category_list/categories.json

We no longer need local copies, removing them.


[Production] [Presentation Service] Listed as a contributor on projects and has Profile

Steps

Log into production
Go to https://osf.io/rsfbq/
Look at the contributors listed on the project
Hover over the 'Presentation Service' contributor. Notice the tooltip.
Click on the magnifying glass in the navbar to search
In the search bar enter 'Presentation Service'
Click on the users filter on the left
Click on the user 'Presentation Service'
Click on the only public project listed on the user profile page (Repetitive Extragenic Palindromic PCR (rep-PCR) of Oral Streptococci using DiversiLab™)

Expected
If a user uses the email presentation service to submit a poster or talk I would not expect that the presentation service would be listed as a contributor on the project, or have a tooltip for user claiming.
I would not expect that the Presentation Service would have a user profile page and have a project listed on the user profile page.
Actual
The Presentation Service is a listed contributor on projects creating using the service.
The Presentation Service has a user profile.

Linking this issue, as it mentions similar findings. https://github.com/CenterForOpenScience/osf.io/issues/2447

@nanchen47 is this covered in your recent Presentation Service fixes?

https://github.com/CenterForOpenScience/osf.io/issues/2530


[BUG] Transitive Dependency Vulnerability: inflight: 1.0.6

🐛 Bug Report
Transitive Dependency Vulnerability: exceljs >  archiver > archiver-utils > glob > inflight: 1.0.6
Lib version: 4.4.0
vulnerability: https://security.snyk.io/vuln/SNYK-JS-INFLIGHT-6095116

relate to https://github.com/isaacs/inflight/issues/18

Hi @yikenman, are you sure the issue can be related to the one in inflight repo?
As far as I know the chain of dependencies is<EMAIL_ADDRESS>-><EMAIL_ADDRESS>-><EMAIL_ADDRESS>-><EMAIL_ADDRESS>-><EMAIL_ADDRESS>but glob removed the inflight dependency since version 9.0.0.
I think the related issue is archiverjs/archiver-utils#168 that make the issues in inflight irrelevant for this library.

Is there an update on this?

Try https://github.com/exceljs/exceljs/issues/2829#issuecomment-2421305827


Optimize simple.cs

The largest portion of the performance cost of this method is strictly using Console.ReadLine and Console.WriteLine (in particular Console.WriteLine 32187 times)
Instead, use a StringBuilder to combine the messages and call Console.Write once at the end.
In my testing, making the above change cut the average execution from 2.1 seconds to 0.5 seconds.
Even still, the largest portion of the performance cost is using Console. The word counting in isolation executes in 0.1 seconds on my machine.
Anyway, interesting project and keep up the good work.

Btw, I want to add that other suggestions (from HN) of..

Using a different collection (not Dictionary),
Removing allocations in foreach, using for instead
Removing GetValueOrDefault and using a simple condition if
I tried all of those and they all had negligible impact in .NET 5.0. It's obvious to me that this experiment is optimizing for CPU cycles and not memory footprint. That might be an interesting addition, but it would probably be non-trivial compared to simply measuring execution time.

Further, I want to add that the immutable string implementation in C# was (and is?) highly contentious compared to other languages, and personally I would consider StringBuilder usage idiomatic in C# for this reason.
That said, I would understand if you wanted to split this up into the optimized version.

Not optimize at all, but here is a Linq version for fun
using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
		var pairs = ReadLines()
			.SelectMany(x => x)
			.GroupBy(x => x)
            		.Select(group => $"{group.Count()} {group.Key}")
			.OrderByDescending(x => x);

		Console.WriteLine(string.Join(Environment.NewLine, pairs));
    }

    static IEnumerable<string[]> ReadLines()
    {
        string line;
        while ((line = Console.ReadLine()) != null)
        {
            yield return line.ToLower().Split(' ');
        }
    }
}

try it online

Use a case-insensitive string comparer for the dictionary so you can skip .ToLower()
(I created a pull request for that)

Hmm, that's strange. I've tried pulling these changes (including @calledude's optimization), and I don't see any noticeable timing difference. I'm running it via Mono on Linux, so maybe that's why -- are you on Windows?
BTW, I needed a using System.Text; to make this compile.

In addition, I'd rather than optimize the simple.cs version (though I'm happy to simplify and/or make more idiomatic if we can do that). For optimizations, I'd be happy to add an optimized version.
One other thing: I remember that console output can be super duper slow on Windows, so maybe that's why yours went so much slower with the console write inside the loop.


Improve tabindex in app demo + improve input-page-demo

Thank you for your contribution to the repo. Before submitting this PR, please make sure:

[x] Your code builds clean without any errors or warnings
[ ] You are using approved terminology
[ ] You have added unit tests
[ ] You have updated documentation
[x] You have tested your changes

Please provide a description of the changes proposed in the pull request and reference any related issues in the repository.
Please indicate if this PR contains:

[ ] A bug fix
[ ] A feature request
[ ] Breaking changes
[x] An enhancement

I'm closing this PR due to the following reasons:

Build is not running
Adding 'index' to all dot imports is incorrect and not needed
Contains nonrelevant filed to the PR
Please restructure and create a new one


Fix file path issue in the viz guide

Description
Very small PR that fixes a file path issue in the documentation (visualization guide).
Checklist

[x] I have tested these changes locally.
[x] I have reviewed the code changes.
[x] I have updated the documentation (if necessary).
[x] I have added appropriate unit tests (if applicable).

This PR also validates the prior CI/CD changes to not run jobs on documentation-only PRs.


Switch ppc64le cloud region

Description
Change ppc64le VMs' region from Osaka to Montreal.

@Stringy Can you approve this PR?


Add task commands

-added add task and delete task commands. (edit and read commands not done)
-added save json file for task list
Tentative changes:
-DeliveryModel extends Model (to include all the commands related to delivery)
-DeliveryModelManager extends ModelManager (to include all the managers related to delivery)
-DeliveryModelManager contains ALL managers (TaskManager, CustomerManager, etc)
-ALL managers contains a List (TaskList, CustomerList, etc)
-CustomerManager extends Addressbook
*checkstyle only left with javadocs. (will update once format is confirmed) so CI testing is to fail.

//temp in the code means more codes to be done.


Question: Get font-family and style / weight

hi,
Is there a reliable way to read the font-family, style (italic) and weight from any ttf/otf font?
I've found fontSubfamily and fontFamily on the name header table but is that reliable enough?

If there is another way please forgive me, but I found the fsSelection bitfield to be useful for style/weight as referenced in the opentype.js Font Inspector demo.
This is the linked doc: https://www.microsoft.com/typography/OTSPEC/os2.htm#fss
You can access from a font like this:
var fsSelection = myFont.tables.os2.fsSelection;
Once that is done you can use bitwise operators to come up with any tests you need.
You can probably just do pattern matches on font-family from the name table that you mentioned for the family, but the os2 table also contains another bitfield called sFamilyClass that may be of interest to you.

This doesn't seem to work anymore. The myFont var doesn't have a tables property anymore.


sql_query_for_missing_files was not working on just missing files, bu…

…t workflow tag status, renamed function.  subquery LEFT JOIN referencefile was making it very slow, instead processing the reference list subset to display, and query just that set for referencefile information, then aggregate that into the resulting ref_data to return.
Also, the default query searches for either of two specific ATP terms, instead of the exclusion of two other specific ATP terms

Thanks @sweng66 !


Fix repo link in Cargo.toml

Noticed that the link from libs.rs is broken

 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.You have signed the CLA already but the status is still pending? Let us recheck it.

Renamed the repo instead!


Fix gradle export if targetSdkVersion is missing (#1367)

Here is my proposed fix for issue #1367.
Unfortunately JadxDecompiler was not directly mockable to load raw xml files, so I needed some additional code, to mock it without modifying it.
I hope the testing code for gradle exports can be improved and extended when we have more cases.

@nitram84 thanks! Great work!


Offline Hive lights show as 'on'

Home Assistant release with the issue:

0.87.0
Operating environment (HassOS/Generic):

Hassio running on RPi
Supervisor logs:

19-02-07 13:47:42 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-07 14:22:42 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-07 14:57:42 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-07 15:32:42 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-07 16:07:42 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-07 16:42:42 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-07 17:06:03 INFO (SyncWorker_11) [hassio.docker.interface] Clean homeassistant/armhf-addon-check_config Docker application
19-02-07 17:06:07 INFO (SyncWorker_11) [hassio.docker.addon] Start Docker add-on homeassistant/armhf-addon-check_config with version 0.9
19-02-07 17:17:42 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-07 17:23:09 INFO (MainThread) [hassio.homeassistant] Update Home Assistant to version 0.87.0
19-02-07 17:23:09 INFO (SyncWorker_1) [hassio.docker.interface] Update Docker homeassistant/raspberrypi3-homeassistant:0.86.3 to homeassistant/raspberrypi3-homeassistant:0.87.0
19-02-07 17:23:09 INFO (SyncWorker_1) [hassio.docker.interface] Pull image homeassistant/raspberrypi3-homeassistant tag 0.87.0.
19-02-07 17:26:29 INFO (SyncWorker_1) [hassio.docker.interface] Tag image homeassistant/raspberrypi3-homeassistant with version 0.87.0 as latest
19-02-07 17:26:29 INFO (SyncWorker_1) [hassio.docker.interface] Stop homeassistant/raspberrypi3-homeassistant Docker application
19-02-07 17:26:31 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API error: Received message 8:1000 is not str
19-02-07 17:26:31 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API connection is closed
19-02-07 17:26:36 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:26:36 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:26:36 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:26:41 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:26:41 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:26:41 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:26:46 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:26:46 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:26:46 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:26:51 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:26:51 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:26:51 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:26:56 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:26:56 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:26:56 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:00 INFO (SyncWorker_1) [hassio.docker.interface] Clean homeassistant/raspberrypi3-homeassistant Docker application
19-02-07 17:27:00 INFO (SyncWorker_1) [hassio.docker.interface] Cleanup Docker images: ['homeassistant/raspberrypi3-homeassistant:0.86.3']
19-02-07 17:27:01 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:01 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:01 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:06 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:06 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:06 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:11 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:11 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:11 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:17 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:17 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:17 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:22 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:22 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:22 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:27 INFO (SyncWorker_8) [hassio.docker.homeassistant] Start homeassistant homeassistant/raspberrypi3-homeassistant with version 0.87.0
19-02-07 17:27:27 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:27 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:27 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:32 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:32 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:32 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:37 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:37 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:37 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:42 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:42 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:42 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:47 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:47 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:47 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:52 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:52 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:52 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:27:57 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:27:57 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:27:57 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:28:02 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:28:02 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:28:02 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host <IP_ADDRESS>:8123 ssl:False [Connection refused].
19-02-07 17:28:07 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-02-07 17:28:07 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered
19-02-07 17:28:07 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
19-02-07 17:28:07 INFO (MainThread) [hassio.homeassistant] Successful run Home Assistant 0.87.0
19-02-07 17:28:08 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request running
19-02-07 17:52:42 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
Description of problem:
Offline Hive lights show as 'on' in front end

Opened issue in main home assistant issue tracker


Make beforeEach and afterEach use Ember.run

This wraps the versions of beforeEach and afterEach that ship with
mocha in versions that invoke their callbacks inside of the Ember run
loop.
In all of the Ember applications that we have ever used mocha to
test (which at this point is several over the past couple years), it has
always been the case that we ended up wrapping setup and teardown
blocks inside of an Ember.run, and so they all ended up having code that
wrapped the stock beforeEach/afterEach hooks in an ember run.
This reinforces the BDD style of having side effects inside your
setup/teardown blocks, and have your it blocks be read-only that query
and assert on current state.
In the context of an Ember.run, this means doing setup with side-effects
like dispatching events, propagating bindings, or performing route
transitions inside an ember run. That is all to say, that the default
should always be to use Ember.run. In the unlikely event that a setup
hook should be run outside of the run loop, a reference to the unwrapped
original mocha function is provided with the withoutEmberRun
property. E.g.
beforEach.withoutEmberRun(function() {
// no run loop.
});
It should be noted that this intentionally wraps beforeEach and
afterEach, but leaves before and after alone since those blocks
are run before the application is actually instantiated and usually are
dedicated to suite-level concerns like stubbing global browser objects,
and other non Ember-y things.
It may be that those could be wrapped as well, but we don't really have
the experience to make a call either way.

They're here 6967719fc006c43788fca62c37d417dea5bc06e5. I was wondering what the best way to test this would be. Is there some way to detect if you're inside the run loop?

Ember.run.currentRunLoop

Tests added. Thanks!

I've been thinking about this a bit more.  I think we should solve this upstream, in ember-test-helpers so that all implementations get this behavior by default.
@dgeb - What do you think?

After reviewing the code a bit more, I don't think we are actually translating beforeEach into a passed setup blocks into ember-test-helpers at all. So a shared solution there doesn't make much sense.  Sorry for the noise.
I'm :+1: on this.

LGTM - thanks @cowboyd!


operators hive-operator (1.1.12)

Signed-off-by: Eric Fried<EMAIL_ADDRESS>Thanks submitting your Operator. Please check below list before you create your Pull Request.
Updates to existing Operators

[x] Did you create a ci.yaml file according to the update instructions?
[x] Is your new CSV pointing to the previous version with the replaces property if you chose replaces-mode via the updateGraph property in ci.yaml?
[x] Is your new CSV referenced in the appropriate channel defined in the package.yaml or annotations.yaml ?
[x] Have you tested an update to your Operator when deployed via OLM?
[x] Is your submission signed?

Your submission should not

[x] Modify more than one operator
[x] Modify an Operator you don't own
[x] Rename an operator - please remove and add with a different name instead
[x] Modify any files outside the above mentioned folders
[x] Contain more than one commit. Please squash your commits.

Operator Description must contain (in order)

[x] Description about the managed Application and where to find more information
[x] Features and capabilities of your Operator and how to use it
[x] Any manual steps about potential pre-requisites for using your Operator

Operator Metadata should contain

[x] Human readable name and 1-liner description about your Operator
[x] Valid category name1
[x] One of the pre-defined capability levels2
[x] Links to the maintainer, source code and documentation
[x] Example templates for all Custom Resource Definitions intended to be used
[x] A quadratic logo

/hold
for verification

/hold cancel
Live tests good.

/merge possible

hello bot?

/retest
or something?

@mvalarh  can you please help kick this over the line?


[Feature] Java Agent MongoDb support report db_instance

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
Java Agent MongoDb support report db_instance
for mongodb plugin(3.x/4.x) can support get db_instance info ,but We did not obtain this attribute in the version
Use case
Java Agent MongoDb support report db_instance
Related issues
No response
Are you willing to submit a pull request to implement this on your own?

[X] Yes I am willing to submit a pull request on my own!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I assigned this to you. Please send a pull request within weeks before agent 9.0 release.

I assigned this to you. Please send a pull request within weeks before agent 9.0 release.

Okay, I will send pull request within this week


Untraked signs of git-signs be same when after tracked signes

Description
The untracked sign should look like this:

But when it be after the tracked signs, it becomes same with the tracked signs:

Neovim version
NVIM v0.10.1
Operating system and version
WSL2 and Ubuntu 22.04 LTS
Expected behavior
The new added line should be signed with untracked signs
Actual behavior
Untraked signs of git-signs be same when after tracked signes
Minimal config
for name, url in pairs{
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
  -- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
} do
local install_path = vim.fn.fnamemodify('gitsigns_issue/'..name, ':p')
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.opt.runtimepath:append(install_path)
end

require('gitsigns').setup{
  debug_mode = true, -- You must add this to enable debug messages
  -- ADD GITSIGNS CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
}

-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE

Steps to reproduce

Tracked all changes
Add new lines after a tracked block

Gitsigns debug messages
No response
Gitsigns cache
No response

Sorry, don't understand you're English and reproduction steps are insufficient.

Sorry, don't understand you're English and reproduction steps are insufficient.

In the first picture, I add some lines in a tracked file, the green is brighter.
Then after I use git add . to track all the files in current directory, all the added lines will be tracked, so the color will be darker. Then after I add some new lines after these tracked lines, the lined added now are untracked by git (because I have not use git add to track these lines), the color should be brighter not darker.

Perhaps it's a duplicate of #929?

Perhaps it's a duplicate of #929?

It seems so.

Both signs are there. You need to set signcolumn accordingly to see both.


Projects freezing whilst loading in 3.x branch

Godot version
3.x branch 465ab36
System information
Linux Mint 20, GLES3, Intel HD graphics 630
Issue description
There is a recent (last few days is since I made last pull) regression in 3.x branch causing extremely long loading times in some projects, so slow that it fails to load and acts frozen.
StreamTexture::load seems to be very slow, and being called multiple times for the same textures again and again and again, as if it is not detecting that they are duplicates used in several meshes.
Steps to reproduce
Not sure yet, will try and make minimum reproduction project asap.
Minimal reproduction project
SlowLoadingBug.zip

I think it's actually this PR causing it : #49625 but not 100% sure yet.

I'll investigate as soon as I can. I suspect it's specific to StreamTexture or a certain setup, because I haven't spotted this issue when testing, even with a complex project.
@lawnjelly It there's any minimal project you can share, it would help identifying the faulty case. But if I'm able to reproduce it myself I'll let you know.

Yup I managed to make one, see in the first post, I edited it in.

@lawnjelly Thanks for catching the issue and for the MRP, I've just opened #49668 to fix the regression. Sorry about that!

Fixed by #49668.


Pipe command to another command

How would I write something like this with Castor?
$ bin/console some:command | jq '.some_key'

Should it be like this:
run(['bin/console', 'some:command', '|', 'jq', '.some_key']]

Or is there a nicer API for this?

This is a technical limitations of symfony.
So you need to pass the whole string without the array

Interesting,
Created a little helper, could be interesting to include?
function pipe(array ...$cmds) : string
{
    $cmds = array_map(
        fn ($cmd) => (new Process($cmd))->getCommandLine(),
        $cmds,
    );

    return implode(' | ', $cmds);
}

$cmd = pipe(
    ['php','some.php'],
    ['jq', '.'],
);
io()->writeln($cmd);

run($cmd);

So why so complicated you might ask ? In my situation, I have a very long command line argument, that I did in array syntax.
Having to write that as a string is not nice.

@ruudk This has already been proposed in Symfony, but it's a trap 😅 It's really complicated to have something that work everywhere.
So I don't want to support that in castor too. (If SF cannot, we cannot too!)

Having to write that as a string is not nice.

I'm pretty sure you can handle it 💛 😆
Joke aside, you can use the helper you pasted above, 👍🏼

Haha, thanks. Good to know!


Testing example in docs is not working. ImportError: cannot import name 'with_injector' from 'injector'

The problem is described at https://github.com/python-injector/injector/issues/146 and issue is closed. However, the manual still not updated: https://github.com/python-injector/injector/blob/master/docs/testing.rst

Thanks for reporting! Pull requests are welcome.

@davidparsson any update on this?

Sorry, nope, but thanks for the reminder.
You're right you can't push here, but you can create your own fork and then open a pull request. That's obviously a bit more work for you, but will likely get this resolved faster. Thanks and good luck!

I made a PR https://github.com/python-injector/injector/pull/236. Does it look fine?

It does. Thanks!


Roll back serialport to 9.0.7

We updated to serialport 9.2.0 in https://github.com/tidepool-org/uploader/pull/1411, but any @serialport/bindings newer than 9.0.7 is broken on Linux, see https://github.com/serialport/node-serialport/issues/2266 for details. Until the right prebuilds are available, we'll have to use resolutions to keep @serialport/bindings to a working version.

Going to merge this without review, as it's a roll back.


[Custom Component] -  Is it possible to access the current instance of the Formio Component within the custom component?

Is it possible to access the current instance of the Formio Component within the custom component?
export class My CustomComponent implements FormioCustomComponent<string> {
  @Input() value: string;
  @Output() valueChange: EventEmitter<string> = new EventEmitter<string>();
  @Output() formioEvent: EventEmitter<FormioEvent> = new EventEmitter<FormioEvent>();

  customFunction() {

      //  I need to access the instance of Formio Component here.
   }

}

I would like to access the component because the customOptions are not accessible during initialization. Furthermore, dragging the component does not preserve any of the customOptions.

I had this question too, and no one answered.
The solution I came up with was to create a global service, and within it there are methods for adding and viewing the main instance.
In the formiobasecomponent component within the createRenderer function, I called the add method of the service I created.
  createRenderer() {
    const Renderer = this.getRenderer();
    const form = (new Renderer(
      this.formioElement ? this.formioElement.nativeElement : null,
      this.form,
      this.getRendererOptions()
    ));

    // adicionado-inicio
    this.formFormioService.setEstruturaComponenteFormularioRender(form);
    // adicionado-fim

    return form.instance;
  }

In custom components, I injected this global service and viewed the instance that way.
It worked, I hope it helps you.

Can you explain more @adhonay how you are storing this and how you will get the same instance? It will be very helpful.

Você pode explicar mais@adhonaycomo você está armazenando isso e como obterá a mesma instância? Será muito útil.

import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { ConstantesSistemaFormio } from '../constantes/constantes-sistema-formio';

@Injectable({
  providedIn: 'root'
})
export class FormFormioService {

  private estruturaComponenteFormularioRenderInstanciaPrincipal = new BehaviorSubject<object>(undefined);
  private estruturaComponenteFormularioRenderInstanciaSecundariaGrid = new BehaviorSubject<object>(undefined);

  constructor() { }

  private quantidadeInstaciasFormioRender(): number {
    return document.querySelectorAll(ConstantesSistemaFormio.tceFormio)?.length;
  }

  public existeInstanciaRenderFormio(): boolean {
    return this.quantidadeInstaciasFormioRender() > 0
  }

  public existeInstanciaSecundariaGridAberta(): boolean {
    return this.quantidadeInstaciasFormioRender() === 2
  }

  public setEstruturaComponenteFormularioRender(instancia) {
    if (instancia && this.quantidadeInstaciasFormioRender() <= 1) {
      this.estruturaComponenteFormularioRenderInstanciaPrincipal.next(instancia);
    } else if (instancia && this.quantidadeInstaciasFormioRender() === 2) {
      this.estruturaComponenteFormularioRenderInstanciaSecundariaGrid.next(instancia);
    }
  }
  public getEstruturaComponenteFormularioRenderInstanciaPrincipal(): object {
    return this.estruturaComponenteFormularioRenderInstanciaPrincipal.value;
  }

  public getEstruturaComponenteFormularioRenderInstanciaSecundariaGrid(): object {
    return this.estruturaComponenteFormularioRenderInstanciaSecundariaGrid.value;
  }
}

Can you show the createRenderer class aswell how you are extending the class.?

Você pode explicar mais@adhonaycomo você está armazenando isso e como obterá a mesma instância? Será muito útil.

Ignore the main and secondary instance part, in your case it will probably only be 1 instance. I did it this way, because I am using modals from one instance within another.
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { ConstantesSistemaFormio } from '../constantes/constantes-sistema-formio';

@Injectable({
  providedIn: 'root'
})
export class FormFormioService {

  private estruturaComponenteFormularioRenderInstanciaPrincipal = new BehaviorSubject<object>(undefined);
  private estruturaComponenteFormularioRenderInstanciaSecundariaGrid = new BehaviorSubject<object>(undefined);

  constructor() { }

  private quantidadeInstaciasFormioRender(): number {
    return document.querySelectorAll(ConstantesSistemaFormio.tceFormio)?.length;
  }

  public existeInstanciaRenderFormio(): boolean {
    return this.quantidadeInstaciasFormioRender() > 0
  }

  public existeInstanciaSecundariaGridAberta(): boolean {
    return this.quantidadeInstaciasFormioRender() === 2
  }

  public setEstruturaComponenteFormularioRender(instancia) {
    if (instancia && this.quantidadeInstaciasFormioRender() <= 1) {
      this.estruturaComponenteFormularioRenderInstanciaPrincipal.next(instancia);
    } else if (instancia && this.quantidadeInstaciasFormioRender() === 2) {
      this.estruturaComponenteFormularioRenderInstanciaSecundariaGrid.next(instancia);
    }
  }
  public getEstruturaComponenteFormularioRenderInstanciaPrincipal(): object {
    return this.estruturaComponenteFormularioRenderInstanciaPrincipal.value;
  }

  public getEstruturaComponenteFormularioRenderInstanciaSecundariaGrid(): object {
    return this.estruturaComponenteFormularioRenderInstanciaSecundariaGrid.value;
  }
}

I am not able to get instance when i invoke setInstance(), or either calling createRenderer() from constructor in my custom component using reference from code snippet you provided , so could you please provide your custom component with the proper place where you are getting the instance ? or you can send across the files which have the running code.
(Note: We have tried all possible ways to get instance and we have angular cli 16 as a mandatory platform.)

By extending MaterialComponent class i am able to get the instance of the custom component with setInstance() in one project but in another project without using angular material and considering typescript and angular(angular material excluded ) setup,  which class i can extend/implement to achieve similar behavior?

Hi @dinbtechit
Did you find any solution?

@pradeepsonisoni - I have not. I think the custom component has some issues with the way how it implemented updating the component value. Also, starting from version Formio/angular version 6.0.0 the custom components are being deprecated all together. So it may be worth forking the custom component code and adding it to your own angular project. That way, you will have more control over the code or at least that's what I am going to be doing to fix this issue.

@adhonay If you are able to get the instance. you can share the code how you are implementing the FormioCustomComponent class. let us know because We are not getting the instance.

@adhonaySe você conseguir obter a instância. você pode compartilhar o código como está implementando a classe FormioCustomComponent . deixe-nos saber porque não estamos recebendo a instância.

 EventEmitter<FormioEvent>; // Should be an @Output
}

You don't need anything more than:
1- Create the service as I sent above.
2- Insert the line below into the createRenderer function in formiobasecomponent.ts to send the instance.
    this.formFormioService.setEstruturaComponenteFormularioRender(form);
3- In your CustomComponent, inject the service into the constructor and then wherever you want in the component, use the line:
 let instanciaRender = this.formFormioService.getEstruturaComponenteFormularioRenderInstanciaPrincipal();

@adhonay  -  it is a little hard to decode your service code as its not in english.
but where are you getting the form object from?
this.formFormioService.setEstruturaComponenteFormularioRender(form);  <--<<

is that the instance of for the entire formio form or just the instance of the custom component?

If we have two instance of the same custom component. Is it working with two instance? I don't think so.

I had this question too, and no one answered.
The solution I came up with was to create a global service, and within it there are methods for adding and viewing the main instance.
In the formiobasecomponent component within the createRenderer function, I called the add method of the service I created.
  createRenderer() {
    const Renderer = this.getRenderer();
    const form = (new Renderer(
      this.formioElement ? this.formioElement.nativeElement : null,
      this.form,
      this.getRendererOptions()
    ));

    // adicionado-inicio
    this.formFormioService.setEstruturaComponenteFormularioRender(form);
    // adicionado-fim

    return form.instance;
  }

In custom components, I injected this global service and viewed the instance that way.
It worked, I hope it helps you.

isnt the formiobasecomponent class part the npm package, how did you manage to update the  createRenderer() method to inject the code - >  this.formFormioService.setEstruturaComponenteFormularioRender(form);?

I had this question too, and no one answered.
The solution I came up with was to create a global service, and within it there are methods for adding and viewing the main instance.
In the formiobasecomponent component within the createRenderer function, I called the add method of the service I created.
  createRenderer() {
    const Renderer = this.getRenderer();
    const form = (new Renderer(
      this.formioElement ? this.formioElement.nativeElement : null,
      this.form,
      this.getRendererOptions()
    ));

    // adicionado-inicio
    this.formFormioService.setEstruturaComponenteFormularioRender(form);
    // adicionado-fim

    return form.instance;
  }

In custom components, I injected this global service and viewed the instance that way.
It worked, I hope it helps you.

@adhonay - isn't the formiobasecomponent class part the npm package, how did you manage to update the createRenderer() method to inject the code - > this.formFormioService.setEstruturaComponenteFormularioRender(form);?

I cloned the git project and started implementing custom components from it.
You can modify the createRenderer method because you have direct access to it.
https://github.com/formio/angular/blob/master/projects/angular-formio/src/FormioBaseComp
Line 108

Thanks @adhonay, that makes sense now.  Actually, a better approach would be to fork the custom component and modify the logic there.
https://github.com/formio/angular/tree/5.5.x/projects/angular-formio/src/custom-component

Agent Jeriah Henley linked Freshdesk ticket 50116 for this issue.

It seems this issue has been resolved so I'm going to go ahead and close it but can re-open if someone needs to contribute more here.

For the folks who are still looking for a solution. I ended up creating an Angular Service and maintain the state there. Here is a pseudo code
@Injectable({for: 'root'})
export class MyCompService {
  string buttonTextState = ''; // default empty
}

@Component({...})
export class MyComponent implement FormIoCustomComponent, OnInit, AfterViewInit {

 @Input() buttonText: string;
 myCompService = inject<MyCompService>();

 ngOnInit() {
      if (!buttonText && !this.myCompService.buttonTextState) {
     // Read the buttonText from the state service variable before the component is loaded
      this.buttonText =  this.myCompService.buttonTextState;
     }
 }

ngAfterViewInit() {
    // store Button Text in the service.
  if (buttonText) {
    this.myCompService.buttonTextState = this.buttonText;
 }
}

}


Settings as entities

Description
Currently we have settings that can be set only through gui tool (to save them the same way as schema defined them). This has big disadvantage as we can't modify them throu api calls. It was decided to create entity system to be able modify and save settings through code. Because settings are dynamically created by data in json and contain dynamically modified items (list, dictionary) and still must be able to store then in specific way due to studio and project overrides it is probably the easiest possible solution.
Changes

implemented entity for each item in schema
there are few entities that are GUI specific but it is required to keep them
gui entities like label or separator are entities that are ignored in api calls but are handled in GUI
wrappers are not stored as entities but as data that should be handled only in GUI
schemas are kept the same and items did not change in this PR (but will in next PR as path-widget is not right type)
entity also handle gui specific callbacks if are registered
entities should be also used in settings tool to not contain duplicated logic of storing settings
the goal of this PR is to create entity system and convert system settings to entities which should be also used in settings tool

this goal is enough to validate entities logic
project overrides have more logic and also contain anatomy type which would take a lot of time

How to test

settings tool should work as before

it is possible that it will show you modificatios on startup as previous implementation did not handle metadata properly

api

API examples
To be able use entities it is required to load root entity which is startpoint of all changes.
Load of root entity

from pype.settings import get_system_settings_entity

# This will give you root entity of system settings
system_root = get_system_settings_entity()

With loaded root entity you should be able to access any settings item and modify it.
Data modification through dict keys

system_root = get_system_settings_entity()
new_studio_name = "MyStudio"

# GOOD 1
system_root["general"]["studio_name"] = new_studio_name
# GOOD 2
general_entity = system_root["general"]
general_entity["studio_name"] = new_studio_name

# BAD
studio_name_entity = system_root["general"]["studio_name"]
# This will just set value of variable `studio_name_entity`
studio_name_entity = new_studio_name

Data modification through `set_value` method

system_root = get_system_settings_entity()
new_studio_name = "MyStudio"

# GOOD 1
studio_name_entity = system_root["general"]["studio_name"]
studio_name_entity.set_value(new_studio_name)

# GOOD 2
general_entity = system_root["general"]
general_entity.set_value({
    "studio_name": new_studio_name
})

This will modify the entity you have loaded in memory but to apply changes it is required to call save method. Root entity will save the values from memory to database. The method should be callable from any entity that belongs to hierarchy of created root entity.
Save changes

system_root = get_system_settings_entity()
new_studio_name = "MyStudio"

studio_name_entity = system_root["general"]["studio_name"]
studio_name_entity.set_value(new_studio_name)

# It is possible to call save on any entity
studio_name_entity.save()

# What really happens:
# studio_name_entity.root_item.save()

TODO/known issues

[ ] modifiable dictionary does not properly handle modifications and overrides
[ ] action methods should do what is expected (discard changes, etc.)
[ ] settings tool should change to defaults settings if any defaults are missing or are invalid
[ ] handle not set defaults, should not be possible to use or save any overrides if any defaults are not set
[ ] handle invalid type of overrides, probably by ignoring them?)
[ ] ListStrictEntity does not have widget yet
[ ] missing roles in entities and thei handling
[ ] missing value validations on set_value and on update values from defaults/studio overrides/project overrides
[ ] gui wrappers are not used in settings tool

So far all seems to work smoothly (in regards of the finished items). Will wait for the extra points to be finished before re-testing.


Crime Reports sensor

Description:
Add sensor for crimereports.com
Pull request in home-assistant.github.io with documentation (if applicable): https://github.com/home-assistant/home-assistant.github.io/pull/2062
Example entry for configuration.yaml (if applicable):
sensor:
  - platform: crimereports
    zone: neighborhood

Checklist:
If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[x] New dependencies have been added to the REQUIREMENTS variable (example).
[x] New dependencies are only imported inside functions that use them (example).
[x] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[x] New files were added to .coveragerc.

Hello @happyleavesaoc,
When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).
The commits that are missing a linked GitHub account are the following:

b9b3a5d8a57b2f771961dcc5a4a5e27f0a62de14 - This commit has something that looks like an email address (happyleavesaoc@gmail.com). Maybe try linking that to GitHub?.

Unfortunately, we are unable to accept this pull request until this situation is corrected.
Here are your options:

If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

If you only made a single commit you should be able to rungit commit --amend --author="Author Name<EMAIL_ADDRESS>
(substituting Author Name and<EMAIL_ADDRESS>for your actual information) to set the authorship information.
If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:

You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.

Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.
Thanks, I look forward to checking this PR again soon! :heart:

I don't think that we should use the zone component to do the input. It feels… weird I guess?
I would expect a latitude, longitude and radius to be added to the config. If not passed in, default to the Home Assistant instance latitude/longitude.
To make sure the user either supplies both latitude/longitude or none, use vol.Include (example)

@happyleavesaoc any updates on this PR?

If you plan to finish that, please reopen it.


Feature request: customize the value of CURLOPT_MAXREDIRS on a per-call basis

It looks like CURLOPT_MAXREDIRS is currently hard-coded to 50:
https://github.com/JuliaLang/Downloads.jl/blob/43899e71eed709866f96dd624f1c369a1c8e26a3/src/Curl/Easy.jl#L51-L51
This makes sense, since 50 is also the default for the command-line curl.
However, it would be nice if users could customize the value of CURLOPT_MAXREDIRS on a per-call basis. By "per-call basis", I mean that users could do something like this:
julia> resp_1 = request(url_1; maxredirs = 25)

julia> resp_2 = request(url_2; maxredirs = 100)

In this example, the value of maxredirs passed as a kwarg to the request function will only affect that individual call.

Why would you need to change it?

At a higher level, we could expose every single option that libcurl has. I don't want to do that, which is why it's possible to add an easy_hook to directly set arbitrary curl options.

which is why it's possible to add an easy_hook to directly set arbitrary curl options

That's probably what I should do. Do you have any example code for this?

From looking at the test suite, I'm guessing it'll be something like this:
import Downloads

easy_hook = (easy, info) -> begin
    timeout_seconds = 120
    timeout_milliseconds = round(Clong, timeout_seconds * 1_000)
    Downloads.Curl.setopt(easy, Downloads.Curl.CURLOPT_TIMEOUT_MS, timeout_milliseconds)
end
downloader = Downloads.Downloader()
downloader.easy_hook = easy_hook

output_tempfile = Downloads.download("https://julialang.org/"; downloader = downloader)
output_contents = read(output_tempfile, String)

I think that the ability to provide a custom easy_hookis exactly what I was looking for.


feat(windows-envars): write NRIA_PASSTHROUGH_ENVIRONMENT

Similar to #754, but targeting windows
Added functionality to windows infrastructure recipes that consider NRIA_PASSTHROUGH_ENVIRONMENT variable from CLI and writing to C:\Program Files\New Relic\newrelic-infra\newrelic-infra.yml
i.e.
$env:NRIA_PASSTHROUGH_ENVIRONMENT='some,useful,data';
https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/configuration/infrastructure-agent-configuration-settings/#integrations-variables
Comma-separated values will be parsed/written as an array in yaml. If no values present, nothing will be added to passthrough_environment: in C:\Program Files\New Relic\newrelic-infra\newrelic-infra.yml.
If a value was previously added to the environment using $env:NRIA_PASSTHROUGH_ENVIRONMENT, omitting the command-line option will not remove these values a in the linux recipes.  You must first remove the value from Powershell's env
Get-ChildItem Env:NRIA_PASSTHROUGH_ENVIRONMENT | REMOVE-ITEM

Unnecessary functionality; spirit of the change was to allow custom attributes/tags to be passed to all OHIs - this was accomplished in prior commits ~5/24 which consider NRIA_CUSTOM_ATTRIBUTES


Numbering of the addresses (Rich List)

It would certainly be helpful to have a numbering of the addresses in the "Rich List".

merged


Ensuring User groups can be built as expected

Ensuring User groups can be built as expected
@4a52156a849ac8be5208df8672cedf6de86cc4f5
Prior to this commit the following was happening:
admin_set = FactoryGirl.create(:admin)
admin_set.groups == ['admin']
=> true
found_admin_set = User.find(admin_set.id)
found_admin_set.groups == ['admin']
=> false

This is because the method redefinition was applying only to the in
memory version of the user that was being created. If we were to run
User.find and get back a new in-memory version, the user's groups
override would not be applied.
This change leverages:

ActiveRecord's identity
RSpec::Mocks.allow_message
FactoryGirl's transient attributes

And with this change, we can now specify what each user's groups should
be as part of the FactoryGirl.create or .build method.
In addition this commit replaces direct reference to ::RoleMapper
instead preferring ::User.group_service. The change also removes
some of the now needless spec stubbing of ::RoleMapper by leveraging
the FactoryGirl stubbing that now automatically occurs.

LGTM, but I'd like @jcoyne to take a look.


fix: typo in localization util.launch.py

Related Issue(required)

Description(required)
RandomDownsampleFilter should have been launched, but VoxelGridDownsampleFilter was launched by mistake.

Review Procedure(required)
RandomDownsampleFilter should be launched.

Related PR(optional)
the same PR: https://github.com/tier4/AutowareArchitectureProposal_launcher/pull/168

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

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

If you are adding new package following items are required:

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

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

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

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

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

CI Checks

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

@YamatoAndo Could you fix the ci error?

semantic pr

Error: Pull request has only one commit and it's not semantic; this may lead to a non-semantic commit in the base branch (see https://github.community/t/how-to-change-the-default-squash-merge-commit-message/1155). Amend the commit message to match the pull request title, or add another commit.

DCO
Signed off is necessary

@wep21 Thank you for your review!
It was fixed!


DELIA-61988 : setTimeZoneDST Thunder plugin only accepts Olsen format

Reason for change: Fix support for both Universal and Olsen formats. And fix the invalid response.
Test Procedure: Testing purpose. Valid case Universal and Olsen format and invalid timeZone(Ex :[UTC-5])

 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.You have signed the CLA already but the status is still pending? Let us recheck it.

@srikanth-vv
Could you please review these chanegs?

@srikanth-vv
I have updated the code as per suggestion and added unit-test cases for the Universal time zone.
Please review code.

Hi @srikanth-vv
I updated the test case, checked the locally run, and these test cases ran successfully.
Please review the changes.


Incorrect results

I have a file that should align to a longer file around 553 seconds.  I can verify this by inspection.
Audalign tells me 1913.116375 by correlation, with confidence 1.0
By fingerprinting, 1592.05297 with confidence 7
None of the lower confidence matches are anywhere near 553 seconds.
I'm not sure if I'm doing something wrong, this seems pretty straightforward.
I don't think I can attach my data, but my script and output are attached.
Any advice?
CorrelationResults.txt
FingerprintResults.txt
test.py.txt

It can be tough with longer files, especially when there is a lot of noise involved, so it can help to run the remove noise functions. There are many parameters to adjust in the configuration, and there is some discussion in the wiki.
Each case is different, though, so I can't give specific recommendations without listening to the audio.


Rename slightly confusing variable name

Hello @campoy
A tiny nitpick, hope you don't mind. I found that part confusing/hard to read.
I think it's better to use another name rather than to override 2 lines below, with a complete different meaning.

I signed it!

Hey, could you also change it in the other worker functions?

Hello @campoy, the other worker functions don't have that ambiguity because i always represents the same thing (a row).
Skimming through the code, when seeing line 142, and directly focusing my attention on line 146, it automatically triggers a question in my brain "why wasn't that var passed around?".

That's the reason I thought this change could be useful.
In the other cases, you override that same variable due to the inline function, but that makes perfect sense to me.

I actually rewrote the post with the feedback on that PR so this name is not relevant anymore.
Thanks for the contribution, though!

No problem, keep up the good work :)


ERROR: process is translated under Rosetta. Attempting to replace emulator installation.

Describe the bug
Hi,
I can't run on android emulator on my MAC MINI M1 arm 64. I can run react native app, but rnv is not working... The ANDROID_SDK path is wrong, it is not reading from my .zshrc file...
To Reproduce

Run command 'rnv run -p android'
See error
/Users/XXX/Android/emulator/emulator -list-avds

FAILED with ERROR:
emulator: ERROR: process is translated under Rosetta. Attempting to replace emulator installation.
emulator: Replacing via command: /Users/XXX/Android/emulator/darwin-aarch64-replace.sh (downloading ~120 MB)...
sh: /Users/XXX/Android/emulator/darwin-aarch64-replace.sh: No such file or directory
emulator: Replacement done. Please relaunch the emulator. You will also need to be using an Apple Silicon-compatible system image. Check the release updates blog (https://androidstudio.googleblog.com/) for more details.
Command failed with exit code 255 (Unknown system error -255): /Users/XXX/Android/emulator/emulator -list-avds
Expected behavior
Run app on android emulator.
Desktop (please complete the following information):

OS: MacOs Big Sur ARM M1 chip
Node Version v16.13.2
RNV Version 0.34.0

Thank you for your help.

@thalwani  While RNV should detect that and try to either find the existing SDK based on the common env variables or ask you if it can install it, you can change the config yourself. It's located in ~/.rnv/renative.json. Change the path of the SDK there and you should be good to go. Can you post the full output of the command first so I can try to debug why the "helping" part is not happening?

Thank you for your response.
I had to add this in the renative.json file :
    "sdks": {
        "ANDROID_SDK": "/Users/toufichalwani/Library/Android/sdk", // (<USER> doesn't work)
        "ANDROID_NDK": "/Users/<USER>/Library/Android/sdk/ndk-bundle",
        "IOS_SDK": "No need. Just install Xcode",
        "TIZEN_SDK": "/Users/<USER>/tizen-studio",
        "WEBOS_SDK": "/Users/<USER>/Library/webOS_TV_SDK",
        "KAIOS_SDK": "/Applications/Kaiosrt.app"
    }

but it was searching the emulator in the folder /Users/toufichalwani/Library/Android/sdk/emulator/emulator while it sit in the folder /Users/toufichalwani/Library/Android/sdk/tools/emulator, so I copied this file. Now it is working, but when the application launch it automatically crashes. (See attachment). On iOs, I can't see the app in simulator.
I can't send you the whole error sorry, I can't reproduce it since I change the sdk path. It seems Renative has kept the new working sdk path in "memory".
Thanks.

Without any errors or logs I can't guide you or know why the app crashes on launch or it doesn't install it on iOS. Closing this, feel free to reach out when you can replicate it and post the errors.


One cursor for each store

Make the state so that each store has a cursor which doesn't leak between stores. e.g. the way it is now stores can write and read state related to another store without going through actions and getters. Which is kind of broken encapsulation and a leaky abstraction.

Maybe, but nothing can stop bad programmer writing bad code. This is trade-off as well. Feel free to send PR with better idea. Thank you.

Will try to figure it out and see if I can come back with a decent PR.


Add support for custom pre-configured extension settings to Cody VSCode extension build script

Add support to the build script for producing custom settings builds of the Cody VSCode extension.
This allows to produce a custom build of the Cody VSCode extension that comes with pre-configured settings, which are provided at build time in a separate JSON file.
It works by setting the pre-configured settings values as the new defaults in the extension. This only applies to the current build being run.
How it works: the build script (pnpm run release:dry-run) reads the CODY_RELEASE_CUSTOM_DEFAULT_SETTINGS_FILE env var which loads custom settings from a JSON file and applies them as default values to the extension settings, and produces a custom .vsix build of the extension.
Note that pnpm run release:dry-run is a dry run of the release script, which means it builds the .vsix but doesn't publish it anywhere, so it can be found in vscode/dist/cody.vsix
An example custom settings file:
{
    "cody.autocomplete.advanced.provider": "XYZ",
    "cody.autocomplete.advanced.serverEndpoint": "YYY",
    "cody.autocomplete.advanced.accessToken": "ZZZ"
}

Test plan
In vscode/ run pnpm run release:dry-run with env vars that:

make it a dry run (builds the .vsix locally and skips publishing)
sets release type to "stable"
sets the path to the custom settings file using CODY_RELEASE_CUSTOM_DEFAULT_SETTINGS_FILE

CODY_RELEASE_TYPE=stable CODY_RELEASE_CUSTOM_DEFAULT_SETTINGS_FILE=./custom-settings.json pnpm run release:dry-run

@philipp-spiess FWIW I have been testing this branch and it does seem like it is sufficiently changing the default values - I don't know a lot about the build logic going on under the hood, so maybe you have suggestions I can make - but it seems to work so far


Split gax into two modules/artifacts: gax-core and gax-grpc

This will allow distinct surface stability guarantees and also will allow non-grpc APIs to not pull in grpc as a dependency.

Done in https://github.com/googleapis/gax-java/pull/288


'Back to deed link' on CC0 page is not working

Go to:
https://creativecommons.org/licenses/zero/1.0/legalcode
Click on "« Back to Commons Deed" in the bottom of the page.
See that it redirects to "./" instead of a proper url. It redirects to http://licenses.productionwww.creativecommons.uk0.bigv.io/publicdomain/zero/1.0/

Thank you for reporting this.
/licenses/zero/ is incorrect, it's /publicdomain/zero/ .
There is a redirect for this in the webserver config but it was broken (along with the one for /licenses/CC0...).
I have now fixed this.

Unsure where I found that url last year, a google search actually shows some documents from CC-NL that refer to it.

Yes it's in our redirects so we should handle it (by sending the user to the correct page).
We have a few like that. :-)