Performing Projection  to return matched embedded documents

I am having trouble in returning only matched embedded document. I am new to ODM concept and following is a document structure that is inserted in collection called Project:
{
    "_id" : ObjectId("59f889e46803fa3713454b5d"),
    "projectName" : "usecase-updated",
    "classes" : [
        {
            "_id" : ObjectId("59f9d7776803faea30b895dd"),
            "className" : "OLA"
        },
        {
            "_id" : ObjectId("59f9d8ad6803fa4012b895df"),
            "className" : "HELP"
        },
        {
            "_id" : ObjectId("59f9d9086803fa4112b895de"),
            "className" : "DOC"
        },
        {
            "_id" : ObjectId("59f9d9186803fa4212b895de"),
            "className" : "INVOC"
        }
    ]
}

Now lets suppose that fromProject collection, i wanted to return a Project with specific _id and within that selected Project document,  i wanted to get only the matched embedded Classes documents (with a given _id). I tried creating this query like this:
$collection = $PHPMongoDBInstance->getCollection("Project"); //get the Project Collection
$cursor = $collection->findAsArray()->whereAnd(
            $collection->expression()->where('_id', new MongoId("59f889e46803fa3713454b5d")),
            $collection->expression()->whereElemMatch("classes", $collection->expression()->where("_id",
            new MongoId("59f9d7776803faea30b895dd"))));

I was expecting the result would be something like this:
{
   "_id" : ObjectId("59f889e46803fa3713454b5d"),
    "projectName" : "usecase-updated",
    "classes" : [
          {
            "_id" : ObjectId("59f9d7776803faea30b895dd"),
            "className" : "OLA"
          }
     ]
}

But its not like this. Thing is i am able to achieve the desired field level projection with  native collection instance of mongo driver as follows:
$result = $collection->getMongoCollection("Project")
                                ->findOne(array("_id" => new MongoId("59f889e46803fa3713454b5d")),
                                                 array("classes" => array('$elemMatch' => array( "_id" => new MongoId("59f9d7776803faea30b895dd")))));

So i wonder if we have similar thing in the library where i can pass the fields of the results to return within the chaining of getCollection method.

I tried using aggregation framework and comes up with following query:
$result = $collection->aggregate(array(
    array(
        '$match' => array(
            "_id" => new MongoId("59f889e46803fa3713454b5d")
        )
    ),
    array(
        '$project' => array(
            'classes' => array(
                '$filter' => array(
                    'input' => '$classes',
                    'as' => 'classItem',
                    'cond' => array(
                        '$eq' => array('$$classItem._id' => new MongoId("59f9d9186803fa4212b895de"))
                    )
                )

            )

        )
    )

));

its giving me following exception:
Sokil\\Mongo\\Exception\nMessage: Aggregate error: Unrecognized expression '$$classItem._id'\nFile:
is there any syntax error?

Hello.
ODM tries to map mongo's document to object. Any field of document in collection mapped to property of Sokil\Mongo\Document object, any embedded document mapped to Document property, also as field of embedded document.
If you do not configure your Document class to map embedded document to some Structure, it will be just array.
But you can do some tricks to get embedded document like object: https://github.com/sokil/php-mongo#embedded-documents, so in this way your Document became aggregate of another embedded documents.
In first example, when you query collection using $collection->findAsArray() with whereElemMatch, you get whole aggregate with all embedded documents inside, but only if this whole aggregat contain some fields in it's embedded documentys. Because you filtered by _id and embedded classes containing other id.
In second example, when you call native findOne, you pass second projection parameter:
https://docs.mongodb.com/v3.2/reference/method/db.collection.findOne/.
<?php
$result = $collection->getMongoCollection("Project")->findOne(
    // query
    array(
        "_id" => new MongoId("59f889e46803fa3713454b5d")
    ),
    // projection
    array(
        "classes" => array(
            '$elemMatch' => array(
                "_id" => new MongoId("59f9d7776803faea30b895dd")
            )
        )
    )
);

This code find document by _id and project some fields.
Find by id with bool projection:
> db.test.findOne({"_id": ObjectId("59f889e46803fa3713454b5d")}, {classes: 1})
{
	"_id" : ObjectId("59f889e46803fa3713454b5d"),
	"classes" : [
		{
			"_id" : ObjectId("59f9d7776803faea30b895dd"),
			"className" : "OLA"
		},
		{
			"_id" : ObjectId("59f9d8ad6803fa4012b895df"),
			"className" : "HELP"
		},
		{
			"_id" : ObjectId("59f9d9086803fa4112b895de"),
			"className" : "DOC"
		},
		{
			"_id" : ObjectId("59f9d9186803fa4212b895de"),
			"className" : "INVOC"
		}
	]
}

Due to https://docs.mongodb.com/manual/tutorial/project-fields-from-query-results/#project-specific-array-elements-in-the-returned-array you can also project by some expressions:
Find by id and id of embedded document of "classes":
> db.test.find({"_id": ObjectId("59f889e46803fa3713454b5d")}, {"classes": {$elemMatch: {"_id" : ObjectId("59f9d9086803fa4112b895de")}}}).pretty()
{
	"_id" : ObjectId("59f889e46803fa3713454b5d"),
	"classes" : [
		{
			"_id" : ObjectId("59f9d9086803fa4112b895de"),
			"className" : "DOC"
		}
	]
}

Currently $elemMatch not supported. You can only $slice and project specific fields. And this feature require to beimplemented.

Thank you for the detailed answer. I wanted to move toward the mapping of ODM to a class so i will tryy it with the mapping functionality. Moreover as you mentioned that $elemMatch is not yet implemented so this mean this post can be labeled as enhancement for the development of $elemMatch.
One more update is that I tried with aggregation query and somehow i was able to retrieve desired results. I was making a mistake in the syntax of the aggregation query. Following is my updated aggregation query for retrieving matched embedded document (i am using $filter array aggregation function):
$collection = $PHPMongoDBInstance->getCollection("Project");
$result = $collection->aggregate(array(
    array(
        '$match' => array(
            "_id" => new MongoId($projectId)
        )
    ),
    array(
        '$project' => array(
            'classes' => array(
                '$filter' => array(
                    'input' => '$classes',
                    'as' => 'class',
                    'cond' => array(
                        '$eq' => array('$$class._id', new MongoId("59faff836803fa3b1203d2e5"))
                    )
                )
            ),
            'projectName' => 1
        )
    )
));

the problem was in the syntax of the following expression:
   '$eq' => array('$$classItem._id' => new MongoId("59f9d7776803faea30b895dd"))
I learned that  it shouldn't be a associative array rather each element in the expression should be a separate array item like this:
 '$eq' => array('$$class._id', new MongoId("59faff836803fa3b1203d2e5"))
With this conclusion i am able to get the results correctly.

yes, this feature will be implemented. Thanks for interesting lib )

Implemented in v.1.22.2
Useage:
public function testElemMatch()
    {
        // create new document
        $this->collection
            ->createDocument(array(
                "_id"=> new \MongoId("59f889e46803fa3713454b5d"),
                "projectName" => "usecase-updated",
                "classes" => array(
                    array(
                        "_id" => new \MongoId("59f9d7776803faea30b895dd"),
                        "className" => "OLA"
                    ),
                    array(
                        "_id" => new \MongoId("59f9d8ad6803fa4012b895df"),
                        "className" => "HELP"
                    ),
                    array(
                        "_id" => new \MongoId("59f9d9086803fa4112b895de"),
                        "className" => "DOC"
                    ),
                    array(
                        "_id" => new \MongoId("59f9d9186803fa4212b895de"),
                        "className" => "INVOC"
                    )
                )
            ))
            ->save();
        // filter embedded documents
        $filteredClasses = $this->collection
            ->find()
            ->elemMatch(
                'classes',
                function(Expression $e) {
                    $e->where('_id', new \MongoId("59f9d9186803fa4212b895de"));
                }
            )
            ->one()
            ->classes;
        $this->assertEquals(
            'INVOC',
            $filteredClasses[0]['className']
        );
    }


Bot play another video from different channel at the end, stuck when try to find video in channel

Is there an existing issue for this?

[X] I have searched the existing issues

I'm submitting a ...

[X] bug report
[ ] feature request
[X] support request --> Contact me over mail for support https://github.com/MShawon

Description
Hello,
First of all, this is the awesome project, I learnt a lot from your coding, thank a lot bro.
I noticed that your bot have some problem.

Bot play another video from different channel at the end, which doesn't contain on the list.
Bot stuck when trying to find related video in channel, of course at the end of video.
Bot use so much CPU and RAM for creating profile at the beginning, but after create all of profile to run, the CPU and RAM decrease more than half, so can you increase time for threads? (For example, create the first profile, wait for 5 or 10 seconds and second profile.)

I use bot for livestreaming and livestream video after created. Video usually take 1,5 hours to 2 hours.
[10-Nov-2022 21:24:55] | 14.5%  | Worker 10 | Line : 722 | Exception | Error end screen | TimeoutException |
Environment
- OS : Windows 10
- Python : 3.9.10
- Script version : Newest

config.json
{
    "http_api": {
        "enabled": false,
        "host": "<IP_ADDRESS>",
        "port": 5000
    },
    "database": false,
    "views": 10000,
    "minimum": 85.0,
    "maximum": 95.0,
    "proxy": {
        "category": "f",
        "proxy_type": "http",
        "filename": "proxy.txt",
        "authentication": false,
        "proxy_api": false,
        "refresh": 0.0
    },
    "background": false,
    "bandwidth": true,
    "playback_speed": 1,
    "max_threads": 35,
    "min_threads": 40
}

hello, im getting the same problem.
my bot is stuck on the video channel site.
and sometimes its on a video from a different channel.
it seems like its from the suggested videos

@minh230791 can't seem to reproduce the stuck issue.. for Livestream it will never play video from channel or end screen
Depends on the number of threads you set, script is already instructed to wait before opening multiple chrome.

@minh230791 can't seem to reproduce the stuck issue.. for Livestream it will never play video from channel or end screen Depends on the number of threads you set, script is already instructed to wait before opening multiple chrome.

Hello Shawon, it's not view from live streaming, it's after livestreaming and posted into youtube. The channel automatic create another "Live" tab. So with normal channel, it's only have HOME, VIDEOS, PLAYLISTS, COMMUNITY, CHANNELS, ABOUT. But with the channel have Livestream video, it has HOME, VIDEOS, LIVE (this is different and all livestreaming video was post here, not in VIDEOS tab), PLAYLISTS,...
And can I edit the wait in script?


Unable to resolve module assert buffer events

[x] Review the documentation: https://facebook.github.io/react-native
[x] Search for existing issues: https://github.com/facebook/react-native/issues
[x] Use the latest React Native release: https://github.com/facebook/react-native/releases

Environment
React Native Environment Info:
System:
OS: OS X El Capitan 10.11.6
CPU: x64 Intel(R) Core(TM)2 Duo CPU     E8335  @ 2.66GHz
Memory: 244.53 MB / 6.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.11.0 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 10.2, macOS 10.12, tvOS 10.1, watchOS 3.1
Android SDK:
Build Tools: 22.0.1, 25.0.0, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.1, 27.0.3, 28.0.1
API Levels: 23, 24, 26, 27
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 8.2.1/8C1002 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.1 => 0.57.1
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
var EventEmitter = require('events').EventEmitter;
error: bundling failed: Error: Unable to resolve module events from /Users/Jonathan/Desktop/00-React/MyKitchen/Classes/Scenes/MongoDBTest/index.js: Module events does not exist in the Haste module map
var buffer = require('buffer')
error: bundling failed: Error: Unable to resolve module buffer from /Users/Jonathan/Desktop/00-React/MyKitchen/Classes/Scenes/MongoDBTest/index.js: Module buffer does not exist in the Haste module map
var assert = require('assert');
error: bundling failed: Error: Unable to resolve module assert from /Users/Jonathan/Desktop/00-React/MyKitchen/Classes/Scenes/MongoDBTest/index.js: Module assert does not exist in the Haste module map
Reproducible Demo
Create a new project:
$ react-native init MyKitchen
add this line in App.js:
var assert = require('assert');
$ react-native run-android

These modules are core Node modules, but they are not automatically included in React Native. You might want to look into https://github.com/tradle/rn-nodeify if you want to install these modules.

See the previous comment, this is by design. React Native is not an implementation of node.js.


Make numbered list styling consistent

On https://docs.konghq.com/hub/optum/kong-upstream-jwt/ the numbered list looks great:

But on another page on the docs site https://docs.konghq.com/0.14.x/auth/, a list with the same HTML formatting doesn't look as good:

I try to resolve this. What style do you want, the first or the second one?

The first one - I think it "looks great" while the second one "doesn't look as good" :)

Fixed. 😉


Native module cannot be null

When I import:
import BackgroundTask from 'react-native-background-task';
I get:
Native module cannot be null.

NativeEventEmitter
    NativeEventEmitter.js:31:16
<unknown>
    index.ios.js:3:44
loadModuleImplementation
    require.js:174:12
<unknown>
    index.ios.js:3
loadModuleImplementation
    require.js:174:12
<unknown>
    index.js:6
loadModuleImplementation
    require.js:174:12
<unknown>
    App.js:25
loadModuleImplementation
    require.js:174:12
<unknown>
    AppEntry.js:2
loadModuleImplementation
    require.js:174:12
guardedLoadModule
    require.js:119:45
global code
    <unknown file>:0

Have you installed and linked the react-native-background-fetch module?  As described in the installation steps:
https://github.com/jamesisaac/react-native-background-task#ios
This library doesn't provide its own native module for iOS (it just proxies the other library), so any native module error is likely related to that library not being set up correctly.

stop the react packager and build the project (react-native run-ios) after installing the module. That solved my issue

@Friis1978 and others, just follow the manual steps to link the react-native-background-fetch library here: https://github.com/transistorsoft/react-native-background-fetch/blob/master/docs/INSTALL-MANUAL-IOS.md
In my experience react-native link doesn't do a complete job 99% of the time.

@jrnk Thank you very much, I will let you know if I can make it work, what I really want was to use it to make a tracking app run in the background, but if it can only make a task 1 time every 15 minute, I can not use it. What will you recommend me to use, if the task is for a tracking app ?

@Friis1978 for iOS you can only do that if you set the background mode to listen for location updates, audio, ble etc, see the possible background modes here: https://developer.apple.com/documentation/uikit/core_app/managing_your_app_s_life_cycle/preparing_your_app_to_run_in_the_background/about_the_background_execution_sequence#overview
For Android you can do this with HeadlessJS: https://facebook.github.io/react-native/docs/headless-js-android.html

@jrnk So I can use Background Fetch, and just enable location services from xCode, and use react-native-native-backgroundtask for android ?

@Friis1978 unfortunately not, background fetch is only for what it says, networking in the background with a minimum of 15 min. You’d have to roll your own native module I’m afraid.

@jrnk Ok thanks.

i have this problem too
Native module cannot be null.


[WIP]feat:support inject context to do isomorphic

Checklist

[ ] npm test passes
[ ] tests and/or benchmarks are included
[ ] documentation is changed or added
[ ] commit message follows commit guidelines

Affected core subsystem(s)

Description of change

强烈支持一个，加速进度😊😊

@jtyjty99999 同构这个先不管，先出一个 SSR 的 1.0 版本？

这个怎么用啊，我都报了好多错啊

react ssr: https://github.com/hubcarl/egg-react-webpack-boilerplate


Upgraded to django 3.2

I think to merge this you have to revert all the formatting changes.

3.2 is now explicitly supported after https://github.com/counsyl/capone/pull/25.


The '/elapsed' endpoint shows the elapsed times of Docker/Kubernetes …

…calls since the previous access to this endpoint.
This endpoint should help to find performance problems which increase the
overall response time. See issue #82.

I addressed your comment. PTAL.


Bot crashes when incorrect number of arguments is used

check commands for correct number of arguments
return help description with example command rather than the Bot crashing

unable to replicate


Working example

Could you please attach working example with html and nested views (with they controllers) because I can't make nested views work and from ReadMe file I don't see why.

i had a similar problem and posted a question on stack overflow http://stackoverflow.com/questions/28161642/how-to-get-ui-router-statehelper-working - while I went back to $stateProvider dot notation because I couldn't be bothered continuing with stateHelper - someone kindly provided a working example that you'll see in the accepted response.
My advice is to avoid libraries / directives etc who's authors can't be bothered providing decent documentation with working examples for all the important options.  If it's not worth their time (like 5 minutes in this case) to create a working plunker or jsfiddle, you know they're either not in it for the long haul or simply incompetent - and you're bound to have problems down the road.

This is GitHub, you could just submit a pull request with more doc on the readme.  Also you do realize the entire source code for the project is basically 39 lines?? You could actually read the source. The project literally converts your JSON structure into dot notation, if you can use dot notation and not this project you didn't take the 5 minutes to read the readme.

+1

It's not clear from the readme.md that there is actually a 'url' field.

Guys! Finally I got this!

Body

stateHelperProvider.state({
	name: 'main',
	templateUrl: 'main.html',
	children: [
		{
			name: 'dashboard',
			templateUrl: 'dashboard.html',
			children: [
				{
					name: 'two-columns',
					templateUrl: 'two-columns.html',
					children: [
						{
							url: '/',
							views: {
								'numbers': {
									templateUrl: 'numbers.html'
								},
								'letters': {
									templateUrl: 'letters.html'
								}
							}
						}
					]
				}
			]
		}
	]
});

And if you need see this working: http://codepen.io/rochapablo/pen/Zpyamb/


skipping parent refers to himself

When children token equals to current token maximum nesting level reached fatal occuried

@alexglue would you mind opening this PR again but on the symfony/symfony repository? This is where all merges happen.


question about the uncertainty part

Hi, I have read the part about the uncertainty quantification of neural networks, and I'm confused about the log-likelihood function you mentioned, i.e. -sum((y[:,1] - obs[:,1]).^2)/2σ^2 - sum(x.^2)/2σx^2, especially the value of σ and σw. Is there any reference for this part? Thanks!

Hi, this log likelihood function arises from the Bayesian perspective of view. Consider inferring x given observations y, we have
p(x|y) ∝ p(y|x)p(x) => log(p(x|y)) = log p(y|x) + log p(x) + constant

Assuming that the prior for x is Gaussian with zero mean and std σx, then log p(x) ∝ - sum(x.^2)/2σx^2
Assuming that p(y|x) is Gassuain with mean obs and std σ, then log p(y|x) ∝ -sum((y[:,1] - obs[:,1]).^2)/2σ^2

You might want to look into some literature on Bayesian methods. Maybe this could be helpful: https://www.sagepub.com/sites/default/files/upm-binaries/18550_Chapter6.pdf

Thank you, this is helpful.


Investigate LTC payment address not being accepted by Exodus wallet

Unknown what type of order produced this address, but when entered into Exodus, the following error occurred:

Possibly related:

Good catch. This might be related to https://github.com/OpenBazaar/openbazaar-go/issues/1662

Presumably resolved as part of 1662. Closing.


Deploy on AzS 1808 error

Didnt found a solution yet
Import-Module : The following error occurred while loading the extended type data file: Error in TypeData
"Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer": The TypeConverter was ignored because it already occurs.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer": The member SerializationDepth is already present.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache": The member PropertySerializationSet is already present.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache": The member SerializationMethod is already present.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache": The member PropertySerializationSet is already present.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache": The member SerializationMethod is already present.
Error in TypeData "Microsoft.Azure.Commands.Profile.Models.PSAzureContext": The member SerializationDepth is already present.
Error in TypeData "Microsoft.Azure.Commands.Profile.Models.PSAzureProfile": The member SerializationDepth is already present.
At line:35 char:1

. $tempDir\DeploySQLProvider.ps1 `

  + CategoryInfo          : InvalidOperation: (:) [Import-Module], RuntimeException
  + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

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

ID: 31804a1d-4c4f-70e6-556c-66c533e9b3e3
Version Independent ID: 78f9ac38-1463-c263-2add-63d7dcaab0bc
Content: Using SQL databases on Azure Stack
Content Source: articles/azure-stack/azure-stack-sql-resource-provider-deploy.md
Service: azure-stack
GitHub Login: @jeffgilb
Microsoft Alias: jeffgilb

Hi there @EliWallic , these issues are for doc-related and not technical support feedback. That said, you have to switch to the previous PowerShell profile for <IP_ADDRESS> of the DB RPs
We’re shipping the next version of the RPs to support the new profile soon. Please stay tuned.

#please-close

@EliWallic We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

@SaurabhSharma-MSFT I ran in the same issue as @EliWallic . What is the solution to have the SQL RP on 1808

Hi @SaurabhSharma-MSFT  these issues are for doc-related and not technical support feedback. That said, you have to switch to the previous PowerShell profile for <IP_ADDRESS> of the DB RPs
We’re shipping the next version of the RPs to support the new profile soon. Please stay tuned.


In upstream mode, https requests will cause changes in flow.mode

Problem Description
In upstream mode, https requests will cause changes in flow.mode.
Steps to reproduce the behavior:
proxy.py
from mitmproxy import http

def request(flow: http.HTTPFlow) -> None:
    if flow.request.method == "CONNECT":
        return
    if flow.live:
        print("flow.mode:", flow.mode)
        host = "<IP_ADDRESS>"
        port = 7890
        flow.live.change_upstream_proxy_server((host, port))

run bash
mitmdump -p 8081
mitmdump --mode upstream:http://<IP_ADDRESS>:8081 -s proxy.py --ssl-insecure
export http_proxy=http://<IP_ADDRESS>:8080
export https_proxy=http://<IP_ADDRESS>:8080

result
$ curl https://httpbin.org/get
...
flow.mode: upstream
...
$ curl https://httpbin.org/get -k
...
flow.mode: transparent
...

System Information
$ mitmproxy --version
Mitmproxy: 4.0.4

I don't know if this is a bug, but I think #3721  and #2123  are related to this issue.
English is not my native language; please excuse typing errors.

Also, #2123 should be solved using the following code
from urllib.parse import urlparse
from mitmproxy import ctx

proxy_data = urlparse("http://username:password@<IP_ADDRESS>:1290")
auth = proxy_data.username + ":" + proxy_data.password

def request(flow):
    ctx.log.info("Request")
    if flow.request.method == "CONNECT":
        return

    if flow.live:
        ctx.options.upstream_auth = auth
        flow.live.change_upstream_proxy_server((proxy_data.hostname, proxy_data.port))


In maintenance scripts, the command 'volume.delete Empty -quietFor=24h -force' is not executed

Sponsors SeaweedFS via Patreon https://www.patreon.com/seaweedfs
Report issues here. Ask questions here https://stackoverflow.com/questions/tagged/seaweedfs
Please ask questions in https://github.com/seaweedfs/seaweedfs/discussions
Describe the bug
Hello
In 'master' logs I don't see the execution of the command 'volume.deleteEmpty -quietFor=24 -force'
My scripts in master.toml
scripts = """
  lock
    s3.clean.uploads -timeAgo=24h
    volume.balance -force
    volume.deleteEmpty -quietFor=24h -force
    volume.fix.replication
  unlock
"""

I saw in logs only this:
sep 19 14:24:47 master3 weed-master[23270]: I0919 14:24:47.058107 master_server.go:317 executing: lock []
sep 19 14:24:47 master3 weed-master[23270]: I0919 14:24:47.059028 master_server.go:317 executing: s3.clean.uploads [-timeAgo=24h]
sep 19 14:24:47 master3 weed-master[23270]: I0919 14:24:47.069307 master_server.go:317 executing: volume.balance [-force]
sep 19 14:25:02 master3 weed-master[23270]: I0919 14:25:02.072000 master_server.go:317 executing: volume.fix.replication []
sep 19 14:25:17 master3 weed-master[23270]: I0919 14:25:17.074505 master_server.go:317 executing: unlock []

Should the result of the 'volume.deleteEmpty -quietFor=24h -force' work be displayed in the logs of the masters?
I think this command is not executed.
System Setup
weed version 30GB 3.28 901e8157de1b486f3eca7f52d525cc36523aed4f linux amd64

OS version Centos 7

Expected behavior
Executing the "volume.deleteEmpty -quietFor=24h -force" command in maintenance scripts.
Additional context
If i executing in bash
echo "lock; s3.clean.uploads -timeAgo=24h; volume.balance -force; volume.deleteEmpty -quietFor=24h -force; volume.fix.replication; unlock" | weed shell

All commands works fine

@aoberest I just tested this and haven't noticed any problems. https://github.com/seaweedfs/seaweedfs/issues/3421#issuecomment-1249235988
Since the scripts are executed on the master, and if you have several of them, then on the leader, and you must first make sure that the configuration is identical for all

@kmlebedev Thanks for answer
But i don't saw volume.deleteEmpty -quietFor=24h -force in your output
Do you use this command ?
Can add this 'volume.deleteEmpty -quietFor=24h -force' and test ?
server1_1  | I0916 11:19:16.774397 master_server.go:259 adminScripts:   lock
server1_1  |   ec.encode -fullPercent=95 -quietFor=1h
server1_1  |   ec.rebuild -force
server1_1  |   ec.balance -force
server1_1  |   volume.balance -force
server1_1  |   volume.fix.replication
server1_1  |   unlock

@aoberest any update?

got it.


Gilneas/dalaran changes

Dalaran
Kirin Tor Elite
Hp increased 675 -> 800
Soulburn mana cost 175 -> 125
Dalaran starting Gold Mine increased 800 -> 1000
Hydromancer Storm Cloud
Cooldown reduced from 120s -> 60s
Gilneas
Removed 3 of the starting gold mines for Gilneas a total of 1050 gold
Roar of the Worgen (Genn Roar)
Lvl1 20% -> 10%
Lvl2 40% -> 20%
Lvl3 60% -> 30%
Lvl4 80% -> 40%
Worgen Attack type Chaos -> Normal

Looks like the tooltips for Roar need to be updated too:

I notice that Gilneas's starting Gold Mine isn't registered - you can see this by typing -goldmines.
I'm guessing that's not right, and you would want that Gold Mine to disappear too if Gilneas wasn't picked?


Accent Colour in Spotify's Settings Page no longer found

Perhaps could implement a way to change the accent manually when the settings page fails?

its there, actually report the bug so i can fix the root cause, versions please

Spotify for macOS (Apple Silicon)
<IP_ADDRESS>1.ge66eb7bc
Spicetify v2.36.11
I just installed the Catpuccinn theme, so its the latest.

Uhm the button is still not there? Why is it completed...?


Color cells conditionally

Feature request
I want to color cells green / red.
Is your feature request related to a problem? Please describe.
no
A clear and concise description of what you want and what your use case is.
here is current presentation

Describe the solution you'd like

A clear and concise description of what you want to happen.
Describe alternatives you've considered
none.
A clear and concise description of any alternative solutions or features you've considered.
none.
Additional context
Add any other context or screenshots about the feature request here.
this is the demo link for coloring cells.
https://docs.google.com/spreadsheets/d/1NzR1d8vzlPR0yxO-hRV37KB_dBkDRt1fnbDbeGXWT-w/copy

Hi @johndpope thank you for the detailed request. Theming at this level isn't something we currently have planned for the Grid component, but I'll make sure to bring it back to the team as an idea.


Fixing #1900 JS SDK file upload

JS SDK file upload uses req.body._ContentType to specify the upload content type

Can you add a test to make sure the content type makes it to the files adaper?

@blacha updated the pull request.


Fail if record cannot be decrypted with any keys in multi-decryptor

Previously this would return nil, nil in the final fallthrough case.
Signed-off-by: Justin Cormack<EMAIL_ADDRESS>cc @cyli

Oh, actually I am being confused, yes it will error...

@justincormack I actually find named return vars kinda confusing - I'm not sure why I used it.  I'll submit a new PR with the test and with explicit returns instead, and your much nicer error.  Thanks again!


Batch Size & CUDA Out of Memory Error for Custom Dataset - SimCLR

Context: We’re a team trying to build a reverse image searcher for satellite data. Currently, we’re using the UC Merced land use dataset (linked in notebook below) to train a self-supervised learner and evaluate it using the labels provided with the dataset.
Issue: Batch sizes when training SimCLR cannot be above 16 without causing a CUDA OOM error. This occurs on Colab T4 GPU and locally on nvidia GeForce RTX 2080. When we manually save the model using trainer.save_checkpoint(myPath), the size of the output file is ~328mb. We use a custom dataset of images and instantiate a dataset class. Does the issue stem from our dataloading? With a finetuner SSL classifier added on top (total ~1gb model) , this issue persists and when loaded into CUDA memory, exacerbates the issue with batch size. Does us using a small batch size affect the lars_optimizer’s performance potentially as well?
Code to Reproduce (Colab): https://colab.research.google.com/drive/1b0xukK7RIw6VxrEJb23f91xaMWxBTbs6?usp=sharing

@RudyVenguswamy this looks like a bug to me, let me check on this.


adding boto config ssm read and connect timeout too apps config loading

to: @chunyong-lin
cc: @airbnb/streamalert-maintainers
size: small
Background
Occasionally, apps functions can timeout when reading the config from ssm. Shortening the boto connect/read timeout may assist with this.
Changes

Shortening the boto client connect and read timeout to 5 seconds (from the default of 60).

Testing
No real testing needed - updating old unit tests.

Coverage increased (+0.002%) to 97.388% when pulling 44203e5eb29254cc17435270112797f814ee45f3 on ryandeivert-app-ssm-timeout into 04606fb22914938ace8d2312819c58992fa61205 on master.


fix: handle update and delete on record that wasn't found properly

What kind of change does this PR introduce?
Fixes https://github.com/supabase/supabase-flutter/issues/319
What is the current behavior?
Currently when using .stream(), the SDK throws if it receives an update or delete event for a record not in the in memory cache. However, situation like this could happen in a situation described in this issue https://github.com/supabase/supabase-flutter/issues/319
, or simply because the device was temporary offline, losing some events, and coming back online and receiving the delete or update events for the record that was missed, so throwing an error probably is not the ideal behavior.
What is the new behavior?
If an update event was received for record that does not exist in the cache, it will simply add the record and treat it like an insert. If an delete event of an record that does not exist was received, the SDK will just ignore it.

I haven't tested it, but from their issue's comment, the other way around, where the column gets updated to the negation of the eq filter is still kept. I guess the realtime server doesn't send any event, because the new version doesn't meet the filter. Do you think the realtime team would want to change that? Like creating an issue makes sense?

@Vinzent03 Yeah, I realized that the issue has two parts. I summarized it here. At least this PR solves for half of the problem I think!


Implement IgnoreCase in RegExp engine

JerryScript-DCO-1.0-Signed-off-by: László Langó<EMAIL_ADDRESS>

Good to me

@zherczeg, I've updated the patch according to your comments.

LGTM


Private stacks mvf

A short explanation of the proposed change:
We implement Minimal Viable Feature of "Private Stacks"  which is "Stacks" for limited users.
This Pull Request is not for merge but for discussion. Please comment for implementation to this  and for feature to Design Document( https://docs.google.com/document/d/1_540iCJlMWQw7q4-JZHKYY_Pk3fmhcJk-vurAM4DcZQ/edit?usp=sharing ) if you have any.

An explanation of the use cases your change solves
It is possible to provide a special Stack which require additional supports, to use proprietary resource and so on.

[ x] I have viewed signed and have submitted the Contributor License Agreement

[ x] I have made this pull request to the master branch

[ x] I have run all the unit tests using bundle exec rake

[ x] I have run CF Acceptance Tests on bosh lite

@t-seyama I believe this feature request may be satisfied by support for Isolation Segments - compute only.
https://docs.google.com/document/d/1JPjKxo0JT5rqKZV1XtpydL6ehlyKIk7ipNWMCz2xyKE/edit#

Hi @dieucao,
Thanks for your comment.
Sorry for the delay.
As we are referring in our Design Document [1],  we agree that Isolation Segments seems to be able to address similar use cases.
However, we think there are two different points between Private Stacks and Isolation Segments.
First, Private Stacks allows different stacks to coexist on the same Cell. For example, cflinuxfs2 and centos can be delivered on in one Cell, while Private Stacks can provide centos stack for the limited users. This will contriubute reducing both resource cost and management cost because Isolation Segments requires different cells for each different stack.
Second, Private Stacks can control visibility of stacks. On the other hand, Isolation Segments can provide special stack for only limited number of users, but existence of the stack is known by all user. We think there are cases that users (expecially using stacks that contains proprietary resources, referred in [1]) want to hide even existence of their stacks from public.
We think Private Stacks and Isolation Segments provide solutions of different levels for the similar use cases, and can be used in combination.
[1] https://docs.google.com/document/d/1_540iCJlMWQw7q4-JZHKYY_Pk3fmhcJk-vurAM4DcZQ/edit#heading=h.v0o3dngekgnu
Regards,

@t-seyama we haven't received any further comment on your cf-dev post. I'm going to close this for now, we can revisit if we receive further evidence.


Added Eda to Market Trend Classification Model

Fixed - #202
Closed - #202
I have added eda to market trend classification  !
@rohitinu6 pls review it and if there is any conflicts let me know !

@Mayureshd-18 i have added fixes and close tag
Can you pls and let me know any other changes i have made !

@rohitinu6 pls check PR and merged it !

@rohitinu6  can you pls merged this pr?!

@jvedsaqib  pls check PR and merged it .
If there is any conflicts then let me know!

@jvedsaqib Checked the code. Lgtm. See on your side pls.

yes pls check i have added

@SimranShaikh20 As you can see that even after your changes this PR is not linked to the issue correctly as the issue cant be seen on the Prs page directy, How about you try to add just Closes <issueno.> in the description directly?
T

@SimranShaikh20 As you can see that even after your changes this PR is not linked to the issue correctly as the issue cant be seen on the Prs page directy, How about you try to add just Closes <issueno.> in the description directly?
Thanks

Apologize for inconvenience I had make changes pls check and merged it

@SimranShaikh20 As you can see that even after your changes this PR is not linked to the issue correctly as the issue cant be seen on the Prs page directy, How about you try to add just Closes <issueno.> in the description directly?
Thanks

Apologize for inconvenience I had make changes pls check and merged it

@SimranShaikh20 I edited your description. Now as you can see the issue is linked with the PR correctly. Adding the "-" will changed the format (refer to docs) and the issue was not linked correctly. Keep that in mind and hope you got it!
Thanks

Will merge immediately after atleast one more review!
Thanks & regards

Will merge immediately after atleast one more review!
Thanks & regards

Okay

Looks good to me!

Pls add other label like gssoc ext

@rohitinu6 pls review to PR and is there any conflicts let me know

@rohitinu6 apolozies for inconvience update branch and synced repo
Kindly review my PR and merged it !

@SimranShaikh20 it's not done yet

@rohitinu6  i will make new PR may there is some technical issue from my side


crypto: Fix Kconfig dependencies and cleanup

Fix Kconfig dependencies b/w ext/lib/crypto and drivers/crypto
Minor clean up changes drivers/crypto

please fix commit message

Commit f4b0ee498b:
1: UC5 Title exceeds max length (73>72): "drivers: crypto: Limit the scope of ataes132a crypto_driver_api functions"

Set default MBEDTLS_HEAP_SIZE to 512

I wonder if this is a truly good default, or will just land-lock 0.5K of RAM for apps which don't use full TLS, but only simple crypto algos.

@pfalcon , i have set the minimum value from the sample apps settings.
Anyways applications can always change this default value.


Loss of precision when saving an integer column to Excel

While implementing #7353, I was analysing what related scenarios cause an integer to lose precision.
This lead me to realise that because Excel is using floating-point numbers for storing values, we will lose precision when writing big integers there.
To illustrate:
from Standard.Base import all
from Standard.Table import all

main =
    x = 2^60
    t = Table.new [["X", ["A", "B", "C", "D", "E", "F"]], ["Y", [1, 2, x, x+1, x+2, x+1000]], ["Z", [1.5, 2.5, 3.5, 4.5, 5.5, 6.5]]]
    t.info.print
    t.print

    f = File.new "./test.xls"
    IO.println (t.write f)

    workbook = f.read
    IO.println workbook

    t2 = workbook.read workbook.sheet_names.first
    t2.info.print
    t2.print

    IO.println (t.at "Y" == t2.at "Y").to_vector

yields
   | Column | Items Count | Value Type
---+--------+-------------+---------------------
 0 | X      | 6           | (Char Nothing True)
 1 | Y      | 6           | (Integer 64 bits)
 2 | Z      | 6           | (Float 64 bits)

   | X | Y                   | Z
---+---+---------------------+-----
 0 | A | 1                   | 1.5
 1 | B | 2                   | 2.5
 2 | C |<PHONE_NUMBER>606846976 | 3.5
 3 | D |<PHONE_NUMBER>606846977 | 4.5
 4 | E |<PHONE_NUMBER>606846978 | 5.5
 5 | F |<PHONE_NUMBER>606847976 | 6.5

ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
C:\NBO\enso\.\test.xls
(Excel_Workbook.Value org.apache.poi.hssf.usermodel.HSSFWorkbook@71de1091 (File test.xls) True Infer)
   | Column | Items Count | Value Type
---+--------+-------------+---------------------
 0 | X      | 6           | (Char Nothing True)
 1 | Y      | 6           | (Integer 64 bits)
 2 | Z      | 6           | (Float 64 bits)

   | X | Y                   | Z
---+---+---------------------+-----
 0 | A | 1                   | 1.5
 1 | B | 2                   | 2.5
 2 | C |<PHONE_NUMBER>606846976 | 3.5
 3 | D |<PHONE_NUMBER>606846976 | 4.5
 4 | E |<PHONE_NUMBER>606846976 | 5.5
 5 | F |<PHONE_NUMBER>606848000 | 6.5

[True, True, True, False, False, False]

As we can see - after a 'roundtrip' of saving a table into Excel and back, we can see that the 3 last integers in Y column get 'corrupted' and they now have different values than at the beginning.
This is even slightly more unexpected than #7535, because for the user the column has always been an Integer column - in no place there is an explicit conversion to floats - the column read-back is again an Integer column, just with mangled data.
On the other hand, one could argue that it is not an Enso problem, but just a limitation of the Excel data format. That is indeed true. But I assume not all users will be aware of this limitation and this may cause confusion for Enso users.
Thus, I think it could be a good idea to report a warning when writing an Integer column to an Excel file containing values that we know will get rounded.
In regular cases such warnings should not appear, if the user is working with small enough numbers. Once the numbers grow, I think the user may appreciate such a warning. After all, when working with integers one usually assumes that the arithmetic will be exact and reliable - but in this particular case - that is not true.

Excel accuracy of storing large numbers is not as high (if you enter<PHONE_NUMBER>606846976 in a cell it will lose accuracy).
So closing as not something we can do much about.

Excel accuracy of storing large numbers is not as high (if you enter<PHONE_NUMBER>606846976 in a cell it will lose accuracy).
not something we can do much about.

That's why I thought we should warn when writing this kind of data to an Excel sheet. Of course we cannot magically make the data 'good' because Excel does not have enough accuracy. But shouldn't we warn the user about the potential data loss? In all other formats integer columns are always exact (as of course it is more expected to have some precision loss in floating-point). Here we experience data loss for integer columns - which is a thing that is usually unexpected, hence I thought a warning could be helpful.

After further discussion we decided to re-open this (although with low priority).
Our users usually expect Integer operations to be exact and here we get a loss of precision, much like in #7353.
We can help users be aware of the potential loss of precision by attaching a warning whenever we write an Integer column to Excel with large values that we know will be rounded in a lossy manner.


Fix typo in audit table component

Summary
Minor typo fix in audit_table.verified message
Checklist

[x] Ran make check-style to check for style errors (required for all pull requests)
[x] Ran make test to ensure unit and component tests passed

@saturninoabril rebased


Unable to Claim Certification of APIs and Microservices Projects

I completed all projects and subjects for APIs and Microservices Cert, but when I claim the cert the message "it looks like you have not completed the necessary steps. Please complete the required challenges to claim the APIs and Microservices. I have accepted our Academic Honesty Policy. I redid the projects to the new beta requirements.
Please let me know what i have to do to get the certificate.
Link to the page with the problem:
https://www.freecodecamp.org/settings
Tell us about your browser and operating system
Browser Name: Chrome
Browser Version: Versión 67.0.3396.87 (Build oficial) (64 bits)
Operating System: Windows 10 Pro

Thanks

This issue has been raised already #17522

Hi @AndrewJBateman
This issue is a duplicate of #17522. I would suggest closing this and typing a comment in issue #17522 so that the problem is contained in one issue and not spread out across multiple issues.

This issue is a duplicate of #17522 so I have closed it.


Use $container->call for traces_sampler

👋 all,
It would be great if the traces_sampler would not require static method but use $container->call to call provided sample method in provided class. Why?

Non static method in class -> we can use SentryService convention
We can use container dependency injection (now we need to use app).
It would be easier to test the "sample" method via PHPUnit test (without Laravel app).

From this code:
class SentryService
{
    /**
     * Sample method required by Sentry SDK.
     *
     * @param SamplingContext $context
     *
     * @return float
     * @throws BindingResolutionException
     */
    public static function sample(SamplingContext $context): float
    {
        $app = app();
        /** @var Guard $guard */
        $guard = $app->make(Guard::class);;
        /** @var Request $request */
        $request = $app->make(Request::class);

        if ($context->getParentSampled()) {
            // If the parent transaction (for example a JavaScript front-end)
            // is sampled, also sample the current transaction
            return 1.0;
        }

        if ($guard->check() === false) {
            return 0.0;
        }

        if ($request->cookie('performance', false) !== false) {
            return 1.0;
        }

        return 0.1;
    }
}

to this code
class SentryService
{
    /**
     * Sample method required by Sentry SDK.
     *
     * @param SamplingContext $context
     * @param Guard           $guard
     * @param Request         $request
     *
     * @return float
     */
    public static function sample(SamplingContext $context, Guard $guard, Request $request): float
    {
        if ($context->getParentSampled()) {
            // If the parent transaction (for example a JavaScript front-end)
            // is sampled, also sample the current transaction
            return 1.0;
        }

        if ($guard->check() === false) {
            return 0.0;
        }

        if ($request->cookie('performance', false) !== false) {
            return 1.0;
        }

        return 0.1;
    }
}

Thank you for considering. If needed, I can make PR.
Have a great day,

I might be missing something here but you still have a static method in your SentryService now right? 😄
But I think I get what you intended 👍
There is currently no special handling for the traces_sampler config option, it's handled by the underlying SDK so I'm not sure we can (without breaking existing code) override that and let the Laravel container handle it, maybe it is as simple as wrapping the option in a callback ourselfs using the container but give me some time to think about this and the effect it might have, otherwise it might have to wait for a next major version which I'd rather not do.

Hi, thanks for answering. It should not be a problem.
The syntax is same, but you can do something like this. I could probably make PR. I would do this:

$sampler = $this->config---;

if (is_array($sampler)) {
     $class =  $sampler[0];
     $method = $sampler[1];

    $container = app(); // or better, inject Container contract or $this->app in container

    // static method exits
    if (method_exists($class, $method) === true) {
         $classOrObject = $class;
    } else {
       $classOrObject = $container->make($classOrObject);
    }

   // Laravel will raise exception if does not exist - it is desired because if method does not exits then the sampler is invalid
               $sample = (float) $container->call([$classOrObject, $method]);
}

--
Code I've noticed to, at this moment I've disabled javascript tracing. Original I wanted to use current user and check the "user" level but it does not work because sentry is resolved before request (and user) is validated. So I've ended at with a cookie so i cane "start" testing the production env :)

Hey @pionl, if you've already started to look into this you will quickly notice that the code that executes the traces_sampler is not part of this repository but part of the base PHP SDK.
So we can in fact not change this code like this because we have no control over it directly 😉
That's why we would need to proxy the traces_sampler (and other callbacks) through a callable of our own that does the $container->call method like you said but we cannot simply change the code like you suggested in this repo and also not in the base PHP SDK since it is not Laravel specific.
So there are solutions but want to make sure it has no side-effects because we are changing the passed options and basically proxying them through the container.

Sorry @stayallive, probably my mistake not understanding - so we have similar concept. I did not study the code base.
Then if you are OK with it I can make the changes. Thank you for your time

Sure, give it a shot if you can. Otherwise I'll take a look at it later!
Thanks 💪

@stayallive Done :)

For now this will not be "fixed", see: https://github.com/getsentry/sentry-laravel/pull/537#issuecomment-1052133354.


Retrieve value from valueInterface

Proposal
Retrieve value from valueinterface
Background
type DTO = map[string]interface{}

func Invoke(ctx context.Context, req DTO) (*DTO, error) {
	return &DTO{
		"trace_id": req["trace_id"],
	}, nil
}

Evaluate above code and we get interp.valueInterface of key "trace_id", however, I found no way to retrieve the value of interp.valueInterface .
Can we have some function to retrieve it? It might look like:
func GetValue(vi valueInterface) reflect.Value {
    return vi.value
}

Workarounds
no

Hi,
You should never have to deal with an interp.valueInterface, because the API should never put you in such a situation. If it does, it means there's a bug and which should fix it so that the API directly gives you a reflect.Value.
Can you please give us the full example of how you end up in such a situation?
thanks.

Hi, @mpl see #991


Update code to take advantage of the new next features

The main one is that we can just create a layout and reuse that

Looks like the new app directory isn't recommended for production yet, so let's leave this alone for a while

#600 did the first part of this - the only thing left to do is the admin area.


[SPARK-15857]Add caller context in Spark: invoke YARN/HDFS API to set…

What changes were proposed in this pull request?

Pass 'jobId' to Task.
Add a new function 'setCallerContext' in Utils. 'setCallerContext' function will call APIs of 'org.apache.hadoop.ipc.CallerContext' to set up spark caller contexts, which will be written into HDFS hdfs-audit.log or Yarn resource manager log.
'setCallerContext' function will be called in Yarn client, ApplicationMaster, and Task class.

The Spark caller context written into HDFS log will be "JobID_stageID_stageAttemptId_taskID_attemptNumbe on Spark", and the Spark caller context written into Yarn log will be"{spark.app.name} running on Spark".
How was this patch tested?
Manual Tests against some Spark applications in Yarn client mode and cluster mode. Need to check if spark caller contexts were written into HDFS hdfs-audit.log and Yarn resource manager log successfully.
For example, run SparkKmeans on Spark:
In Yarn resource manager log, there will be a record with the spark caller context.
...
2016-07-21 13:36:26,318 INFO org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger: USER=wyang        IP=<IP_ADDRESS>            OPERATION=Submit Application Request  TARGET=ClientRMService   RESULT=SUCCESS            APPID=application_1469125587135_0004   CALLERCONTEXT=SparkKMeans running on Spark
...
In HDFS hdfs-audit.log, there will be records with spark caller contexts.
...
2016-07-21 13:38:30,799 INFO FSNamesystem.audit: allowed=true           ugi=wyang (auth:SIMPLE)    ip=/<IP_ADDRESS>   cmd=getfileinfo            src=/lr_big.txt/_spark_metadata          dst=null           perm=null        proto=rpc        callerContext=SparkKMeans running on Spark
...
2016-07-21 13:39:35,584 INFO FSNamesystem.audit: allowed=true           ugi=wyang (auth:SIMPLE)    ip=/<IP_ADDRESS>   cmd=open            src=/lr_big.txt  dst=null           perm=null        proto=rpc            callerContext=JobId_0_StageID_0_stageAttemptId_0_taskID_1_attemptNumber_0 on Spark
...
If the hadoop version on which Spark runs does not have CallerContext APIs, there will be no information of Spark caller context in those logs.
… up caller context

Can one of the admins verify this patch?

Spark caller context written into Yarn log will be"{spark.app.name} running on Spark".

This may not be so useful, I think we could get app name form yarn through many different ways, simply printing one line log to RM is not so useful.

Thanks the feedback, Jerry. I am going to update the patch.


Prefix for ID in send message and Markable stanza

In this PR, I added a Prefix for ID generation, since some applications use prefix in ID for some logics. Also I added a Markable flag to the Chat struct, then we can embed the Markable stanza in Send message

TL;DR — There's no rule that a dog can't play basketball, but that doesn't mean it's actually a good idea.

While I don't think anything in RFC 6120 specifically forbids embedding information in the id attribute (as long as it's still unique and unpredictable), this isn't a thing anyone should be doing IMO. It's not part of the spec and it's creating a sort of side-channel unstandardized extension point in the protocol. This may seem harmless if it's just your server or client using it, but eventually other entities that haven't read the spec may end up relying on it and it's a way to create unnamespaced defacto extensions.
Instead you should embed your payload properly with a custom namespace, or define a new extension if it's something that you need mirrored with similar rules to IDs (which may be mirrored in IQ and some presence stanzas). I do know of at least one server doing this to embed IQ routing information so that their cluster routing can be stateless, but I don't think this means it's something we should encourage for the reasons I've already stated.
While this doesn't apply in a normative sense to stanza IDs, please see the Security Consideration section of XEP-0359: Unique and Stable Stanza IDs which specifically forbids this for the IDs generated in that spec. The same sorts of considerations likely apply to stanza IDs.

TL;DR — There's no rule that a dog can't play basketball, but that doesn't mean it's actually a good idea.

While I don't think anything in RFC 6120 specifically forbids embedding information in the id attribute (as long as it's still unique and unpredictable), this isn't a thing anyone should be doing IMO. It's not part of the spec and it's creating a sort of side-channel unstandardized extension point in the protocol. This may seem harmless if it's just your server or client using it, but eventually other entities that haven't read the spec may end up relying on it and it's a way to create unnamespaced defacto extensions.
Instead you should embed your payload properly with a custom namespace, or define a new extension if it's something that you need mirrored with similar rules to IDs (which may be mirrored in IQ and some presence stanzas). I do know of at least one server doing this to embed IQ routing information so that their cluster routing can be stateless, but I don't think this means it's something we should encourage for the reasons I've already stated.
While this doesn't apply in a normative sense to stanza IDs, please see the Security Consideration section of XEP-0359: Unique and Stable Stanza IDs which specifically forbids this for the IDs generated in that spec. The same sorts of considerations likely apply to stanza IDs.

Yup. Id attribute does not meant to store some metainfo and assumption that it can is unnecessary complication and bogus.
If you need to, you always can cache all messages for at least last 15 minutes (if you want for example to catch muc ping timeouts and re-join stoned mucs) or so and refer for their id when needed.

I agree with Sam and eleksir, therefore I'm going to close this.


#94-SelectedJob.css-created-styled-Meysam-Arshadi

Fixes #94

[x] SelectedJob.css created and basic styling added.
[x]  Modified SelectedJob.jsx, Home.css, JobCard.css, and JobCard.jsx accordingly.

Checklist:

[ ] I have carefully reviewed my own code

@Meysam-Arshadi looks good


Remove collection from cache after it's been dropped (MongoLite)

At this moment after collection is dropped, it's still present in cached array
Test case
$app->storage->getCollection('collections/foobar');
$app->storage->dropCollection('collections/foobar');
$app->storage->count('collections/foobar');

Throws an error because there is a SELECT query being run on table which doesn't exist
and was not being created in Database::selectCollection as it's still in cache array
Error: Call to a member function fetch() on bool

lib/MongoLite/Cursor.php:94

Thanks!


implement SymlinkWithFallback

This function attempts to create a symbolic link, but falls back to os.Rename() when the user does not have permission to create symbolic links (e.g. Windows non-administrators).
closes #401

Tested manually on Windows and moves the needle a little further. Now to fix #396...
PS C:\Users\mafishe\go\src\github.com\Azure\draft> .\bin\draft.exe init --client-only
Adding plugin https://github.com/Azure/draft-pack-repo...
Error: exec: "sh": executable file not found in %PATH%
Error: exec: "sh": executable file not found in %PATH%


fix: badge syntax and samples in readme

I found that badges in README are not rendered correctly in NPM and GitHub, and that sample URLS are a little too far away from where they are supposed to be used and rendered unnecessarily.
This PR is to fix the badge syntax and comment out sample URLS near the badges.

Hi thanks for PR but badges keep working. Also since badge links are one time only, I prefer to keep them in footer. Focusing on writing docs from top.

Ohh, I found it by googling that there are ways to define link attributes afterwards in markdown!
Excuse me, I didn't know that. 😿
Now I see all your intention.
I might have broken some syntax while writing docs and thought that it doesn't work.
Everything is fine, so let me close this PR. 👏


Add ldap authentication

We have add support  for LDAP Authentication.

This patch stop working since change the auth system. Does it posible to add it back?


Update action error

When attempting to call Set-NSHostname (or Set-NSTimezone) an error is returned by the Nitro API. I can't find anything concrete, but the API implementation must have changed as I'm sure this used to work? There may be other API calls that are impacted too.
Current Behavior
PS C:\> $ns = Connect-NetScaler -IPAddress <IP_ADDRESS> -Credential nsroot -PassThru
PS C:\> Set-NSHostname -Session $ns -Hostname ns1.lab.local -Verbose -Force

VERBOSE: URI: http://<IP_ADDRESS>/nitro/v1/config/nshostname?action=update
VERBOSE: JSON Payload:
{
    "params":  {
                   "onerror":  "EXIT",
                   "warning":  "NO"
               },
    "nshostname":  {
                       "hostname":  "ns1.lab.local"
                   }
}
Invoke-RestMethod : { "errorcode": 1240, "message": "Invalid nitro action or operation", "severity": "ERROR" }
At C:\Program Files\WindowsPowerShell\Modules\netscaler\Private\_InvokeNSRestApi.ps1:144 char:21
+         $response = Invoke-RestMethod @restParams
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Possible Solution
Removing the -Action update from https://github.com/devblackops/NetScaler/blob/master/NetScaler/Public/Set-NSHostname.ps1#L67 (and https://github.com/devblackops/NetScaler/blob/master/NetScaler/Public/Set-NSTimeZone.ps1#L76) resolves the issue, for example:
_InvokeNSRestApi -Session $Session -Method PUT -Type nshostname -Payload $params # -Action update

Your Environment

NetScaler version used: 11.0 and 11.1
Module version used: 1.3.0
Operating System and PowerShell version: Server 2012 R2 with 5.0.10586.117

I'm happy to submit a PR for this if you want me to? I'm just not sure what the impact is and what else might be affected..

@devblackops Doing some additional testing and it appears that later versions of the API complain about the standard -Action add, -Action delete and -Action update requests. The API uses the standard PUT, POST and DELETE HTTP verbs for these actions and only the likes of -Action unset are actually required in the request.
It looks like the older versions of the API just ignored the extraneous actions - hence why this has only just come to light. The API hasn't changed.


Support autodoc_typehints setting

The autodoc_typehints setting lets you put the type hints in the parameter list instead of the signature.   This is also how https://github.com/tox-dev/sphinx-autodoc-typehints handles type hints, which can be a lot easier to read for complex function signatures.

I second this! I was just searching for how to do this after switching to autodoc2.

I think an option to this makes sense 👍 Happy to recieve PRs

I came up with a way to do this by hacking around in the docutils tree to copy the type hint nodes from the signature into the parameter list. I'm working on an extension to do the same thing by patching Sphinx where it generates the field list for parameters, which is a bit less hacky.
Here's an example of what it looks like: https://mm21.github.io/trilium-alchemy/build/autodoc2/trilium_alchemy/trilium_alchemy.core.html#trilium_alchemy.core.Session
It also changes the list from bullets to a definition list, which I find more clean and readable. The downside is it will only work reliably when there's exactly one signature.
(I may have also added the references to the default values, but can't remember now if that's a vanilla autodoc2 thing.)


Add links to lemmy communities

Lemmy is a federated social media network similar to Reddit.

LGTM

Thank you for your contribution <3


Add/update MicroPython v1.19.1 frozen stubs

add/update MicroPython v1.19.1 frozen stubs
based on micropython commit

Check for issues.
See: https://github.com/Josverl/micropython-stubber/issues/259


convert from Adobe Illustrator to (Inkscape) SVG

reasoning:
As Adobe Illustrator is proprietary, and SVG is an open format, with at the very least Inkscape as a very good, free and open source editor, it might fit better with an open source projects community.
The conversion was done using this code:
find . -name '*.ai' \
	| while read ai
do
	svg="${ai//\.ai/.svg}"
	echo "Converting '$ai' to '$svg' (using Inkscape) ..."
	inkscape \
		--export-filename="$svg" \
		"$ai"
done

My reasoning was, that SVG is a free/open format with free/open tools for editing, and it could be used as the new source file, widening the range of people that could contribute. I for example, do not have Indesign, and while I could surely get a pirated version somehow, I would rather push use Inkscape, and allow others to use it too.
To have two - technically independent - source files for the same thing, I would consider not a good idea, as then some people would work on the AI file, others on the SVG, and development would diverge, which causes gain but no gain, and confuses people. In the end, having both of them around, would mean that people need to edit both of them equally, whenever they change something, which would be counterproductive.
If you see the SVG as purely an output format though, it is a different story, but then I would rather suggest to generate the SVGs as a CI step (build-bot) here on github, and hosting them on the projects github pages, linking to them from the README maybe, instead of having them hosted in the repo directly, as that would again require people to generate and commit the SVG whenever they edit the AI files. If there is a script to generate the SVG files in the repo, then the CI job can use it, and anyone developing can run it locally too, if needed (or in their forks CI job, if they wish so).
So how I would prefer it (most desirable solution to least desirable:

add SVGs & remove AI files
keep AI files & generate SVGs in the CI job
keep AI files -> no change
add SVGs & keep AI files

what do you think/how do you see it?

ouh and.. thanks for your project! :-)
We are developing standards for open source hardware documentation, and I would like to use corne as one of the sample projects for a meta-data standard we are working on, thus all the small changes. :-)

I understood your opinion. Thanks.
There is one big problem, I can't use inkscape and I want to manage my ai files.
I will try think about CI job for the generating SVG.

oook :-)
I did it using inkscape command line, which worked fine,
but apparently the inkscape people also supply a simple python script,
which depends only on python base libraries,
which should be better for a CI job.
If you decide you want this but have no time to do it, tell me, and I'll have a shot at it.

Close once. I agree to keep the plate data more accessible. I want to be able to automate it fully.


Can't sign in to the configuration app: Response_type 'id_token' is not enabled for the application

I finished deploying but when trying to sign in(Step Three) the configuration app, after entering my credentials, I get the follow error:

Sorry, but we’re having trouble signing you in.
AADSTS700054: response_type 'id_token' is not enabled for the application.

Anyone help?

Sorry found the problem: I stupidly configured a wrong redirect URI!


Member decorator function overwrite has wrong type for "this"

TypeScript Version:  4.2.0-dev.20201105

Search Terms:
Code
class SomeClass {
  public foo: number;
  constructor() {
    this.foo = 1;
  }

  private static someDecorator(argPassed: any) {
    return (target: any, propertyKey: string, descriptor: PropertyDescriptor) => {
      const originalMethod = descriptor.value;
      console.log(`decorator arg: ${argPassed}`);
      // anonymous function, not arrow
      descriptor.value = function (...args: any[]) {
        const result = originalMethod.apply(this, args);
        console.log(`foo from decorator ${this.foo}`);
        return result;
      };
    };
  }

  @SomeClass.someDecorator('Passing this in...')
  public doSomething(arg: string) {
    console.log(`original function arg:  ${arg}`)
    console.log(`foo from original function: ${this.foo}`);
  }
}

new SomeClass().doSomething('abc');

Expected behavior:
this in the context of the anonymous function does not refer to descriptor. At the very least, it should be inferred as any
Actual behavior:
The compiler throws an error, but the code it generates runs as expected.
error TS2339: Property 'foo' does not exist on type 'PropertyDescriptor'.

14         console.log(`foo from decorator ${this.foo}`);
                                                  ~~~

Playground Link:
Here is a playground link with the above code
Related Issues:

I think this is a feature: this is inferred as the same type of target when assigning a "method" to the object, to implement the prototype monkey patching.
SomeClass.prototype.foo = function() {
    this; // <== inferred as the same type of SomeClass.prototype
}

The only information the compiler has to go off of is the this type of descriptor, as that is all that has been provided. If you want to carry over the correct this type, you need to provide more information. For example, this gives the correct type information:
private static someDecorator(argPassed: any) {
  return <T extends { foo: any }>(target: T, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: T, ...args: any) => any>) => {
    const originalMethod = descriptor.value!;
    console.log(`decorator arg: ${argPassed}`);
    // anonymous function, not arrow
    descriptor.value = function (...args: any[]) {
      const result = originalMethod.apply(this, args);
      console.log(`foo from decorator ${this.foo}`);
      return result;
    };
  };
}

Playground


Jsonb_accessor does not override parent methods

If you use jsonb_accessor on a subclass, and use it to override a method on a parent class, it does not override the method. See https://github.com/Aevin1387/jsonb-test for an example

Still trying to work out why this happens, but in the mean time here's a workaround:
def getter_that_should_work
  read_attribute(__method__)
end

A minor inconvenience for now, but that works.

v1.0 leans heavily on the attribute API in ActiveRecord 5 and this inheritance issue seems to be a problem there as well. Hopefully it'll get fixed over there.


Vite dev server not loading because of require syntax

After updating to vite 2.6.14, the dev server fails on load with this error message:
Error [ERR_REQUIRE_ESM]: require() of ES Module ........../node_modules/chalk/source/index.js from<EMAIL_ADDRESS>not supported.

I tried replacing this plugin with the original<EMAIL_ADDRESS>which uses import statements instead of require, and that works fine.
Edit: See https://github.com/vitejs/vite/issues/5694

It's due to chalk 5 using ESM. It was a bad idea to use a wildcard for the versioning of it. I pinned it to v4 in 1.3.5


docs: add docker image docs

As shown in #261, I find many beginners will miss the docker image details. So add some instructions for it.

These images are actually no longer maintained--we just switched to ghcr.io.
The images should get downloaded automatically. Did you have to pull them manually?

These images are actually no longer maintained--we just switched to ghcr.io.
The images should get downloaded automatically. Did you have to pull them manually?

I verified again, if no image in local, run uvicorn opendevin.server.listen:app --port 3000 or python3 opendevin/sandbox/sandbox.py  both will trigger the error that image node found. I know when run k8s, it can set image pull policy. Not sure whether we can config the similiar thing in sandbox code.
I tried docker pull ghcr.io/opendevin/sandbox:v0.1, but will get Error response from daemon: denied. I wonder if we config ghcr.io correctly or I use the wrong url.

Whoops--looks like it's private. Asking them to make it public.
That's unfortunate that the image needs to be present. I think these docs are an improvement so let's get it in. We can change the URL once it's fixed.

BTW, can you also add the latest tag for the image? It will be more convenient for pulling image.

Open 2 issues for make image public #270 and add latest image tag #272


Documentation and README.md is outdated which affects discoverablity of features!

I am really struggling with your installation instructions could you please update readme? @aspizu thank you!

What issue are you having?

These commands don't work for python3/pip3
cd ~/Downloads/SRC
pip install lark
git clone https://github.com/aspizu/goboscript
cd goboscript
echo -e "#!/bin/bash\nset -e\npython $(pwd)/gsc "$@"" > ~/.local/bin/gsc
chmod +x ~/.local/bin/gsc
In particular I recommend replacing this command with something more legible and easier to adapt for different python versions
echo -e "#!/bin/bash\nset -e\npython $(pwd)/gsc "$@"" > ~/.local/bin/gsc

If you are on debian/ubuntu install python3-is-python

following your readme commands I get the following error
"zsh: no such file or directory: /Users/stef/.local/bin/gsc"

run this inside where you have cloned the repository
mkdir -p ~/.bin
echo -e "#!/bin/bash\nset -e\npython3 "'"$(pwd)"' > ~/.bin/gsc
chmod +x ~/.bin/gsc
echo -e "path+=(~/.bin)" >> ~/.zshrc


Remove workaround for SSL config in Nagios Core

SSL config needs to be disabled in Nagios Core 4.4.7 due to the update checks causing crashy behaviour, usually overnight.
This might be fixed by updating the Ubuntu base image to 22.04.
Meanwhile, disable SSL with configure:
./config --disable-ssl
See https://github.com/NagiosEnterprises/nagioscore/issues/861 for the upstream bug report.

There's a patch in the works for 4.4.8 release.

Updated the develop branch with the newly release 4.4.8 release. If this looks stable over the next few days, I'll update master and close this.

Closed with 4.4.8.


HDDS-5908. MPU getKey can fail, if completeMPU result is still in cache.

What changes were proposed in this pull request?
This is happening due to bug in a copyObject where we are not using Version uploaded isMPU or not.
This issue will cause reads to fail, as the returned OmKeyInfo version will not have MPU flag set.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5908
How was this patch tested?
Added test

Thank You @errose28 for the review


Fix "This stage 'IdleTimeoutStage' isn't connected!"

Fixes #2277
Reproduction of #2277
The #227 can be reasonably reliably reproduced by running this benchmark https://github.com/RafalSumislawski/http4s/blob/blaze-bench/bench/src/main/scala/org/http4s/bench/BlazeBench.scala with sbt "bench/jmh:run -i 2 -wi 2 -f 5 -t 1 org.http4s.bench.BlazeBench"
It results in the following stack trace:
[info] 20:39:47.384 [Thread-38] ERROR o.h.client.blaze.Http1Connection - Error rendering request
[info] java.lang.Exception: This stage 'IdleTimeoutStage' isn't connected!
[info] 	at org.http4s.blaze.pipeline.Tail._stageDisconnected(Stages.scala:232)
[info] 	at org.http4s.blaze.pipeline.Tail.channelWrite(Stages.scala:113)
[info] 	at org.http4s.blaze.pipeline.Tail.channelWrite$(Stages.scala:109)
[info] 	at org.http4s.blazecore.IdleTimeoutStage.channelWrite(IdleTimeoutStage.scala:28)
[info] 	at org.http4s.blazecore.IdleTimeoutStage.writeRequest(IdleTimeoutStage.scala:57)
[info] 	at org.http4s.blaze.pipeline.Tail.channelWrite(Stages.scala:111)
[info] 	at org.http4s.blaze.pipeline.Tail.channelWrite$(Stages.scala:109)
[info] 	at org.http4s.client.blaze.Http1Connection.channelWrite(Http1Connection.scala:43)
[info] 	at org.http4s.blazecore.util.IdentityWriter.writeBodyChunk(IdentityWriter.scala:73)
[info] 	at org.http4s.blazecore.util.IdentityWriter.writeEnd(IdentityWriter.scala:80)
[info] 	at org.http4s.blazecore.util.EntityBodyWriter.$anonfun$writeEntityBody$1(EntityBodyWriter.scala:63)
[info] 	at flatMap @ org.http4s.internal.package$.fromFuture(package.scala:139)
[info] 	at map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:246)
[info] 	at flatMap @ fs2.internal.CompileScope.$anonfun$close$6(CompileScope.scala:245)
[info] 	at map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:222)
[info] 	at flatMap @ fs2.internal.CompileScope.$anonfun$close$4(CompileScope.scala:244)
[info] 	at map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:222)
[info] 	at flatMap @ fs2.internal.CompileScope.$anonfun$close$2(CompileScope.scala:242)
[info] 	at flatMap @ fs2.internal.CompileScope.close(CompileScope.scala:241)
[info] 	at unsafeRunSync @ org.http4s.bench.BlazeBench$BlazeBenchState.<init>(BlazeBench.scala:97)
[info] 	at flatMap @ fs2.internal.CompileScope.$anonfun$openAncestor$2(CompileScope.scala:261)
[info] 	at flatMap @ fs2.internal.FreeC$.$anonfun$compile$17(Algebra.scala:545)
[info] 	at map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:246)
[info] 	at flatMap @ fs2.internal.CompileScope.$anonfun$close$6(CompileScope.scala:245)
[info] 	at map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:222)
[info] 	at flatMap @ fs2.internal.CompileScope.$anonfun$close$4(CompileScope.scala:244)

Diagnosis
The stacktrace indicates that an Http1Connection attempted to write something to the channel while some of the stages were disconnected.
What I think happens:

Http1Connection#executeRequest starts writing the requst and reading the response in parallel (https://github.com/http4s/http4s/blob/series/0.21/blaze-client/src/main/scala/org/http4s/client/blaze/Http1Connection.scala#L199)
writeBody completes (https://github.com/http4s/http4s/blob/series/0.21/blaze-core/src/main/scala/org/http4s/blazecore/util/EntityBodyWriter.scala#L62)
the server processes the request and sends a response
reading the response completes
the connection is released back to the PoolManager
isRecyclable evaluates to false because the Http1Connection.state == Write (https://github.com/http4s/http4s/blob/series/0.21/client/src/main/scala/org/http4s/client/PoolManager.scala#L299)
the connection is closed (https://github.com/http4s/http4s/blob/series/0.21/client/src/main/scala/org/http4s/client/PoolManager.scala#L261) and the stages are disconnected
writeBodyEnd executes (https://github.com/http4s/http4s/blob/series/0.21/blaze-core/src/main/scala/org/http4s/blazecore/util/EntityBodyWriter.scala#L63) throwing a "java.lang.Exception: This stage 'IdleTimeoutStage' isn't connected!"

This stacktrace happens relatively rarelly, but there's another symptom that appears frequenty, is easy to observ and bad for performance. wiresharking/tcpdumping the communication between http4s-blaze-client and some server shows that the client frequenty closes connections which otherwise look perfectly fine. It happens righ after a request is completed.
Solution
Wait for the write to finish before completing the request and returning the connection to the pool.

The approach seems good to me, but it broke the "Blaze Http1Client should cancel infinite request on completion" test.  Need to figure out if that's a bad mock test or is demonstrating an issue.
Also summoning @RaasAhsan since he reformed that Http1Connection state machine in #4143.

That "Blaze Http1Client should cancel infinite request on completion" is an interesting case. I will have to have a deeper look into it.

Ok, so here's what happens in "Blaze Http1Client should cancel infinite request on completion" and why it works in 0.21.22:

the blaze client send a request with infinitely long entity.
the jetty server doesn't consume the entity, instead it immediately responds with 200 and closes it's end of the connection
the blaze client process the response and returns the connection to the pool (without completing the write and without noticing that the connection is half closed)
the pool sees that the connection isn't idle (write did not finish) so it closes the connection.

At this point it is clear why this PR broke this behavior. My intention was to prevent returning connections to the pool before the write completed, and I did it, so now we don;t close the connection ad keep waiting for the infinite write (or timeout).
There are two thing I would like to do here:

The test scenario is quite unusual. Firstly, because in most cases, the server would first consume the request entity and then send a response. Second, because because in most cases the server would try to handle request without closing connections, because closing connections is inefficient. I' not saying the test is wrong. It's very good. But I feel a need to have a wider suite of tests for infinitely long requests, to avoid breaking some more common case while fixing this edge-case.
I think the current state is that the blaze client does the right thing (closes the connection) for the wrong reason (because it returned it to the pool before write completed). That's why fixing one problem uncovered another. IMO blaze client should close the connection, but the reason for that should be the fact that the server closed it on it's end.

I think the bugfix is more important than this test scenario, and we have a good number of other fixes ready to release.  Should we just mark this as a pending test so we can include this in 0.21.23?

When do you plan to do the release? I'm working on a fix right now.

Ok. This turns out to be harder to fix than I thought. I will remove the 053b92c  from this PR, and mark the failing test as pending. I will extend the tests and fix them in a separate PR.


Working Py3 code that still supports Py2

futurize --stage2 **/*.py

http://python-future.org/futurize_cheatsheet.html#step-2-working-py3-code-that-still-supports-py2

The first stage of the futurize process was done in #752 and this is the second (and final) stage of that process.

Travis refuses to test this PR.


bug: Labware Creator and Opentrons App accept bad labware definitions in the X-axis

Overview

Too large X Well Spacing and X Grid Offset values are able to be input into both Labware Creator and the Opentrons App
Steps to reproduce

Open Labware Creator

Input a large well spacing and/or grid offset value

Download the labware definition
Bad_x_grid_and_spacing.zip

Upload the definition to either Labware Creator or Opentrons App

Current behavior

The definition gets uploaded without issue.
Expected behavior

When the y grid offset or well spacing is modified to be similarly large, the following error appears:
Labware Creator:
.
Opentrons App:

The boundary conditions should behave the same in both the x and y axis when considering grid offset and well spacing.

need to start with validation in labware creator

Hmm... I can't replicate this validation error in Run App with the attached labware def or labware test .py protocol. Also not sure how to make negative coordinates show up in Labware Creator's output, I can make wells that far fall off the plate in positive x/y directions, but not down the negative axes.

This will be fixed for labware creator with custom tip rack work, but error will not be displayed on Run app. Once we release LC, this will no longer be a problem, but if its a definition that was created prior to custom tipracks LC update, this will still be an issue in Run App.
Consider breaking out separate bug / ticket for Run app

^ Just to link tickets: addressed for LC in #7165 (but not addressed in Run App)

Gonna close this bc after #7165 it's a Run App thing, not an LC thing


[Feature request] Cloudflare Support

Is it possible to use Cloudflare Origin CA and Cloudflare proxy instead of letsencrypt?
This can also solve the issue of traffic to China and Australia cuz Cloudflare will choose nearest datacenter from your vm.
But fail2ban must reconfigure to use CF-Connecting-IP instead of origin IP
https://guides.wp-bullet.com/integrate-fail2ban-cloudflare-api-v4-guide/
And also block all traffics comes from anywhere other than cloudflare https://www.cloudflare.com/zh-tw/ips/ .

That's a pretty neat idea. I'll see if I can work that in next time I work on the project. You can also try and get it going and submit a PR. Thanks

I made a cloudflare version and I use it now.
https://github.com/HuJK/bitwarden_gcloud_cloudflare
It uses
gcloud compute firewall-rules create cloudflare-webs \
  --allow=tcp:80,tcp:8080,tcp:8880,tcp:2052,tcp:2082,tcp:2086,tcp:2095,tcp:443,tcp:2053,tcp:2083,tcp:2087,tcp:2096,tcp:8443,udp:80,udp:8080,udp:8880,udp:2052,udp:2082,udp:2086,udp:2095,udp:443,udp:2053,udp:2083,udp:2087,udp:2096,udp:8443 \
  --source-ranges $(curl https://www.cloudflare.com/ips-v4 | sed -z 's/\n/,/g') \
  --target-tags=cloudflare-webs

instead of iptables to blocks all traffics not from cloudflare.
But I didn't finish fall2ban and auto backup yet, so it's not a finished project, so I didn't submit PR.

While I agree this is pretty cool, I prefer the Let's Encrypt approach as it allows for a wider range of DNS providers to be used.
I don't use CloudFlare and that wasn't a big deal in this project as I only had to sacrifice dynamic DNS for this project to work out of the box.
Either way, it's not a huge deal. Just adding my 2 cents...

I agree with @carceneaux and close this for now. I'll link this issue from the README so others can modify if they want a pure Cloudflare option.


Hlo I'm Vinay. I had some problem in project can you please explain about it.

Hi, Vinay ! yes i can explain about it please explain the issue.

During project explanation i was not attended on that day can you please tell how to do it.

actually i had minimal knowledge on coading. i'm from embedded background. Can you please explain in detail about it.

you have those meetings accessable right ? if you want to know what sir said,visit the meet recordings. i am not so good in it to explain..!

I Don't know about .c and .h files can you tell about them.

.c files are basically written to decrease the complexity and length of the files. For example, if you have some 2000 to 3000 lines of code to understand it better you would write itinto multiple files.   .h files are header files, to include the headers you declare them in seperate file

how to create them.How can we relate from one file to another file like .c or .h files.

sorry but i don't have much knowledge about it.

can you please explain about it.

is code are avaliable in internet.can u suggest please.

https://www.interviewbit.com/blog/c-projects/?amp=1


Lyft host certificate lambda2

This is the upgraded branch for which we can use to serve our host certificates from.  I took master and then ported the entire lyft written host file into it. There is scope for more cleanup as I haven't tried to modernize this script to use similar constants as the bless repo at master. We also should add some tests for the file as well, wanted to get a branch out to test against first.

Coverage decreased (-13.7%) to 80.978% when pulling 4891a4f07423ce29c3943c48a2989d07c06d7ac5 on lyft:lyft-host-certificate-lambda2 into 80f3c1b4afd53a39b38be81ab6cedcf3ffb06496 on Netflix:master.


knife ec backup with purge does not cleanup ACLs for clients and nodes

When running knife ec backup with the purge option, acl files are not cleaned up during the purge process for deleted clients and nodes. This makes manual intervention required to cleanup the backups and prevents having automated disaster-recovery replication in place using knife ec backup to an alternate location as node and client deletions are normal events and without the ACL entries being purged errors are generated during the restore for these orphaned objects.
https://github.com/chef/knife-ec-backup/issues/162
Acceptance criteria:

[ ] ?
[ ] ?

#
# Reproduce issue
#

# Create some data
[root@ip-10-0-9-56 ~]# knife node create node1
Created node[node1]
[root@ip-10-0-9-56 ~]# knife client create client1
Created client[client1]
[root@ip-10-0-9-56 ~]# knife node list
node1
[root@ip-10-0-9-56 ~]# knife client list
4thcoffee-validator
client1

# Take an initial backup using knife ec backup
[root@ip-10-0-9-56 ~]# knife ec backup /backup --sql-db automate-cs-oc-erchef  --purge -V -s https://ip-10-0-9-56.us-west-2.compute.internal

# Delete a node and/or client from the Chef Infra Server
[root@ip-10-0-9-56 ~]# knife node delete -y node1
Deleted node[node1]
[root@ip-10-0-9-56 ~]# knife client delete -y client1
Deleted client[client1]
[root@ip-10-0-9-56 ~]# knife node list

[root@ip-10-0-9-56 ~]# knife client list
4thcoffee-validator

# Run knife ec backup again with the --purge option
[root@ip-10-0-9-56 ~]# knife ec backup /backup --sql-db automate-cs-oc-erchef  --purge -V -s https://ip-10-0-9-56.us-west-2.compute.internal

# Find ACLs
[root@ip-10-0-9-56 ~]# find /backup/ -name node1.json
/backup/organizations/4thcoffee/acls/nodes/node1.json
[root@ip-10-0-9-56 ~]# find /backup/ -name client1.json
/backup/organizations/4thcoffee/acls/clients/client1.json

Observation:  The problem exists only for backing up to the SAME directory.  If you backup to a DIFFERENT directory, the problem goes away.  This seems to make sense.  If you want to preserve data, this is working as intended, so just save off the old backup, and make a new one.  If you don't want to preserve data, erase the backup dir before making new backup.  But it depends on the purpose of the --purge option.
[root@ip-10-0-9-56 ~]# knife ec backup /backup1 --sql-db automate-cs-oc-erchef  --purge -V -s https://ip-10-0-9-56.us-west-2.compute.internal
[root@ip-10-0-9-56 ~]# find /backup1/ -name client1.json
[root@ip-10-0-9-56 ~]# find /backup1/ -name node1.json

Question:  Is --purge supposed to delete files in a backup directory?

What's the difference if you don't use the --purge option?
# what happens without purge?

[root@ip-10-0-9-56 ~]# knife node list
node1
node2
[root@ip-10-0-9-56 ~]# knife client list
4thcoffee-validator
client1
client2
[root@ip-10-0-9-56 ~]# knife ec backup /backup-predelete --sql-db automate-cs-oc-erchef  --purge -V -s https://ip-10-0-9-56.us-west-2.compute.internal
[root@ip-10-0-9-56 ~]# find /backup-predelete/ -name node1.json
/backup-predelete/organizations/4thcoffee/acls/nodes/node1.json
/backup-predelete/organizations/4thcoffee/nodes/node1.json
[root@ip-10-0-9-56 ~]# find /backup-predelete/ -name node2.json
/backup-predelete/organizations/4thcoffee/acls/nodes/node2.json
/backup-predelete/organizations/4thcoffee/nodes/node2.json
[root@ip-10-0-9-56 ~]# find /backup-predelete/ -name client1.json
/backup-predelete/organizations/4thcoffee/acls/clients/client1.json
/backup-predelete/organizations/4thcoffee/clients/client1.json
[root@ip-10-0-9-56 ~]# find /backup-predelete/ -name client2.json
/backup-predelete/organizations/4thcoffee/acls/clients/client2.json
/backup-predelete/organizations/4thcoffee/clients/client2.json
[root@ip-10-0-9-56 ~]# knife node delete node1
Do you really want to delete node1? (Y/N) Y
Deleted node[node1]
[root@ip-10-0-9-56 ~]# knife node delete node2 -y
Deleted node[node2]
[root@ip-10-0-9-56 ~]# knife client delete client1 -y
Deleted client[client1]
[root@ip-10-0-9-56 ~]# knife client delete client2 -y
Deleted client[client2]
[root@ip-10-0-9-56 ~]# knife node list

[root@ip-10-0-9-56 ~]# knife client list
4thcoffee-validator
[root@ip-10-0-9-56 ~]# knife ec backup /backup-postdelete-nopurge --sql-db automate-cs-oc-erchef -V -s https://ip-10-0-9-56.us-west-2.compute.internal
[root@ip-10-0-9-56 ~]# find /backup-postdelete-nopurge/ -name node1.json
[root@ip-10-0-9-56 ~]# find /backup-postdelete-nopurge/ -name node2.json
[root@ip-10-0-9-56 ~]# find /backup-postdelete-nopurge/ -name client1.json
[root@ip-10-0-9-56 ~]# find /backup-postdelete-nopurge/ -name client2.json
[root@ip-10-0-9-56 ~]# knife ec backup /backup-postdelete-purge --sql-db automate-cs-oc-erchef --purge -V -s https://ip-10-0-9-56.us-west-2.compute.internal
[root@ip-10-0-9-56 ~]# find /backup-postdelete-purge/ -name node1.json
[root@ip-10-0-9-56 ~]# find /backup-postdelete-purge/ -name node2.json
[root@ip-10-0-9-56 ~]# find /backup-postdelete-purge/ -name client1.json
[root@ip-10-0-9-56 ~]# find /backup-postdelete-purge/ -name client2.json
[root@ip-10-0-9-56 ~]# diff --brief --recursive /backup-postdelete-nopurge /backup-postdelete-purge

The problem is sporadic and intermittent.  Today, I can't reproduce the issue.

Question:  @collinmcneese @PrajaktaPurohit Does anyone know if this worked in the past, and then stopped working?  Or was this functionality just never there?  I'm trying to find out if I should be looking for existing broken code to fix, or if I should be looking to write new functionality that was never there to begin with.

The --purge option can only be used to sync users.  It works when used in this capacity.
root@ip-10-0-4-202:~# chef-server-ctl user-list
jackdoe
janedoe
jilldoe
johndoe
johndoex
pivotal

# Take an initial backup using knife ec backup
root@ip-10-0-4-202:~# knife ec backup /backup --sql-db automate-cs-oc-erchef  --purge -V -s https://ip-10-0-4-202.us-west-2.compute.internal
# snip
root@ip-10-0-4-202:~# cp -r /backup /backup.BAK

# Delete users
root@ip-10-0-4-202:~# chef-server-ctl user-delete johndoe
Do you want to delete the user johndoe? (Y/N) y
Checking organization memberships...
Deleting user johndoe.
root@ip-10-0-4-202:~# chef-server-ctl user-delete johndoex
Do you want to delete the user johndoex? (Y/N) y
Checking organization memberships...
Checking admin group memberships for 1 org(s).
Deleting user johndoex.
root@ip-10-0-4-202:~# chef-server-ctl user-delete jackdoe
Do you want to delete the user jackdoe? (Y/N) y
Checking organization memberships...
Deleting user jackdoe.
root@ip-10-0-4-202:~# chef-server-ctl user-delete jilldoe
Do you want to delete the user jilldoe? (Y/N) y
Checking organization memberships...
Deleting user jilldoe.
root@ip-10-0-4-202:~# chef-server-ctl user-list
janedoe
pivotal

# Take another backup with the --purge option
root@ip-10-0-4-202:~# knife ec backup /backup --sql-db automate-cs-oc-erchef  --purge -V -s https://ip-10-0-4-202.us-west-2.compute.internal
Downloading Users
Deleting user jackdoe from local backup (purge is on)
Deleting user johndoex from local backup (purge is on)
Deleting user jilldoe from local backup (purge is on)
Deleting user johndoe from local backup (purge is on)
Downloading organization object for 4thcoffee from https://ip-10-0-4-202.us-west-2.compute.internal/organizations/4thcoffee
Copying /acls/groups/billing-admins.json
Copying /groups/billing-admins.json
Copying /groups/admins.json
Copying /acls/groups/public_key_read_access.json
Copying /groups/public_key_read_access.json
Copying /clients
Copying /containers
Copying /cookbook_artifacts
Copying /cookbooks
Copying /data_bags
Copying /environments
Copying /invitations.json
Updated /invitations.json
Copying /members.json
Updated /members.json
Copying /nodes
Copying /org.json
Copying /policies
Copying /policy_groups
Copying /roles
Copying /acls/organization.json
Copying /acls/clients/4thcoffee-validator.json
Copying /acls/containers/clients.json
Copying /acls/containers/containers.json
Copying /acls/containers/cookbook_artifacts.json
Copying /acls/containers/cookbooks.json
Copying /acls/containers/data.json
Copying /acls/containers/environments.json
Copying /acls/containers/groups.json
Copying /acls/containers/nodes.json
Copying /acls/containers/policies.json
Copying /acls/containers/policy_groups.json
Copying /acls/containers/roles.json
Copying /acls/containers/sandboxes.json
Copying /acls/environments/_default.json
Copying /acls/groups/000000000000ec9aba30060322d83390.json
Copying /acls/groups/admins.json
Copying /acls/groups/clients.json
Copying /acls/groups/users.json
Copying /groups/000000000000ec9aba30060322d83390.json
Copying /groups/admins.json
Copying /groups/clients.json
Copying /groups/users.json
Updated /groups/users.json
** Finished **

# Find ACLs, compare with original backup
root@ip-10-0-4-202:~# find /backup.BAK/users -name *.json
/backup.BAK/users/jackdoe.json
/backup.BAK/users/johndoex.json
/backup.BAK/users/pivotal.json
/backup.BAK/users/jilldoe.json
/backup.BAK/users/janedoe.json
/backup.BAK/users/johndoe.json
root@ip-10-0-4-202:~# find /backup.BAK/user_acls/ -name *.json
/backup.BAK/user_acls/jackdoe.json
/backup.BAK/user_acls/johndoex.json
/backup.BAK/user_acls/pivotal.json
/backup.BAK/user_acls/jilldoe.json
/backup.BAK/user_acls/janedoe.json
/backup.BAK/user_acls/johndoe.json
root@ip-10-0-4-202:~# find /backup/users -name *.json
/backup/users/pivotal.json
/backup/users/janedoe.json
root@ip-10-0-4-202:~# find /backup/user_acls/ -name *.json
/backup/user_acls/pivotal.json
/backup/user_acls/janedoe.json

Relevant Slack comments:
Prajakta Purohit
Couple of question wrt to this change, would it break with the older versions of Chefserver?
Do we care if it fails from 11 -> 14? There is not a direct migration path there anyways (edited)

Marc Paradise
That is the next thing to explore there. I think we'd expecit it to fail on 11, but not after 12 or 12.something.

Tim Smith
11 breaking is fine

Prajakta Purohit
so a sufficient test would be that 12 onwards we are able to backup --purge and restore with knife-ec-backup? (edited)

Marc Paradise
+ verifying that all acls match up

This fix is available on Chef Infra Server 14.12.21


chg: [var] Added variables, re-order user-data and fixed time-out

ssh would timeout so I added a more lenient waiting time/handshake
in user-data password came before user, which is not logical IMHO
added variables for the username and password
added some more documentation in case of similar failures
added shutdown_command

My build with VMware WS 15.5 takes around 8minutes...
PACKER_LOG=1 packer build ubuntu-2004.json  8.78s user 7.87s system 3% cpu 8:18.39 total

Instead of increasing the number of handshake attempts, I just disabled that first SSH server which IMHO is a cleaner solution. See #2

Thanks for opening this. I just merged #2, which is a clearer solution to one of the problems address here but I feel like the rest are things people might wish to do in their own solutions — this repo is here as an example and I expect people to take what's here and do their own things with it.