understanding migrating from nginx to envoy

Guys, I am new in envoy and I just knew it today.
I wanted to migrate my nginx server to envoy.. But couldn't find any resources on using PHP (app like wordpress) and how "location directive" and "web root" from nginx works in envoy (opening files like css, images, etc). Or do i need an app to run these? Also, I don't want to use laravel to run php.
Is envoy a fully proxy? I wanted to know if these Nginx conf is also available or equivalent in envoy:
root /var/www/web_folder;

location{
  try_files $uri $uri/ /index.php?q=$uri&$args;
}

location ~ \.php${
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  try_files $fastcgi_script_name =404;
  set $path_info $fastcgi_path_info;
  fastcgi_param PATH_INFO $path_info;

  fastcgi_index index.php;

  fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
  fastcgi_read_timeout 300;
}

If not available, what are the best tool to run php with wordpress on envoy?
Really sorry about this question.

Envoy does not function as a general-purpose webserver, so there is no direct equivalent for either CGI or  a www root.


Travis is running only 1 mocha test and then hailing it a success

...but there are 13 tests in total, and hence it's reporting only 14% code coverage where running the full test suite would report close to 99% code coverage.

Fixed the issue. Turns out that the test/results folder didn't exist when the tests were being run, and because the logs were being intercepted, it was difficult to see what was going on.


Fix getMediaByUrl() Method

Add &__d=dis to media URL request
Without this Instagram returns a 200 response but with an error message like for (;;);{"__ar":1,"error":1357004,"errorSummary":"Sorry, something went wrong","errorDescription":"Please try closing and re-opening your browser window.","payload":null,"hsrp":{"hblp":{"consistency":{"rev":1005858897}}},"lid":"7121366591489386466"}'
Fixes #1080

@kingkool68 thanks for contribution


image_picker did't work when i select an image from gallery on android in real device

When i open gallery using ImageSource.gallery the first screen is "Recent pictures", i can select any picture and everything fine, but if i open the gallery i see "Lost device connection" message and white screen. I'm loading the image how they recomment:
_procesImage(ImageSource image) async { final ImagePicker picker = ImagePicker(); file = await picker.pickImage(source: image); setState(() {});  }

I faced the same ıssue when I upgrading the plugın to versıon 0.8.3+3

Hi @AndryCU, thanks for filing the issue.
Can you please provide the output of flutter doctor -v and a minimal complete reproducible code sample?
Please specify which version of image_picker you're experiencing this issue with.
Thank you

@danagbemava-nc
Here's the flutter doctor -v response

I'm using image_picker 0.8.4. Look, i test image_picker on a new app, that only have the code for show an image, and it's works perfectly, but the same code in my StatefulWidget didn't, with the only difference that i have so much code there. I said again, it's works when i load an image from Recents pictures(i can print the pach even, no problem here) but if i select Gallery, don't show any error message and i see Lost device connection message and white screen. I show you a resume of the StatefulWidget, i delete some code, only show the code that interact with the image. Do you need any other detail? Thanks for help me
class PersonPage extends StatefulWidget {
@override
_ProductoPageState createState() => _PersonPageState();
}
class _PersonPageState extends State {
XFile? file;
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Person'),
actions: [
IconButton(
onPressed: _procesImage(ImageSource.gallery),
icon: Icon(Icons.photo_sharp)),
],
),
body: SingleChildScrollView(  child: Column(  children: [  _showPicture(),  ]  ),
);
}
Widget _showPicture() {
if (file == null) {
return Image(
image: AssetImage('assets/no-image.png'),
height: 300.0,
fit: BoxFit.cover,
);
} else {
return Image(
image: FileImage(File(file!.path)),
height: 300.0,
fit: BoxFit.cover,
);
}
}
_procesImage(ImageSource origen) async {
final ImagePicker _picker = ImagePicker();
file = (await _picker.pickImage(source: origen))!;
setState(() {});
}
}

Hi @AndryCU, your code had some errors so I had to make a couple of modifications to get it working.
I was however unable to reproduce your issue. Try the updated code sample and see if you're able to pick the image.
See attached video below.
Side Note: Next time you are asked for the output of flutter doctor -v, kindly copy and paste the output with a little formatting for us, don't send a screenshot. Thank you

 modified code sample
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';

void main() {
  runApp(
    MaterialApp(
      home: PersonPage(),
    ),
  );
}

class PersonPage extends StatefulWidget {
  @override
  _PersonPageState createState() => _PersonPageState();
}

class _PersonPageState extends State<PersonPage> {
  XFile? file;
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Person'),
        actions: [
          IconButton(
            onPressed: () {
              _procesImage(ImageSource.gallery);
            },
            icon: Icon(Icons.photo_sharp),
          ),
        ],
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            _showPicture(),
          ],
        ),
      ),
    );
  }

  Widget _showPicture() {
    if (file == null) {
      return SizedBox();
    } else {
      return Image(
        image: FileImage(File(file!.path)),
        height: 300.0,
        fit: BoxFit.cover,
      );
    }
  }

  _procesImage(ImageSource origen) async {
    final ImagePicker _picker = ImagePicker();
    file = await _picker.pickImage(source: origen);
    setState(() {});
  }
}

https://user-images.githubusercontent.com/88313112/132357389-96e1c8db-4b90-487e-8255-a0ea27ac1753.mp4

@danagbemava-nc
I  test your code. Some times work other don't on my phone(android: 8.1.0 (Go), 1Gb RAM), but in my table always work(android 6.0.1,  3Gb RAM),  maybe is a problem of performance. See the videos below recording on my phone.
Work here:
https://user-images.githubusercontent.com/74194123/132368623-5d4a68c4-1f73-42f5-89b5-2b79e21219a9.mp4
Didn't:
https://user-images.githubusercontent.com/74194123/132368998-ccc46c76-93af-4553-9922-dfee9940a6f6.mp4
After a few minutes (see the clock above the screen)

@danagbemava-nc i think that's a problem for performance, i test not the code that you suggest, my app, and works fine on my table, in my phone, same issue

@AndryCU, have you tried running the app in either release or profile mode?

@danagbemava-nc debug mode...later i will try release mode

Please do and let me know how it perform.

@danagbemava-nc that's it...when i did a release, it's works perfectly.  Thanks


Sign in -  Error message displayed right after login

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to https://staging.new.expensify.com/[](javascript:)

Log in with your any account

Expected Result:
No error message displayed when logged in
Actual Result:
Concierge chat opens up and see the error message after sign in
It occurs occasionally
Workaround:
Unknown
Platform:

Where is this issue occurring?

Web
Android
Mobile Web

Version Number: v1.1.55-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers<EMAIL_ADDRESS>/ Yulia1986Gerets
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/163396594-ed2032c3-7d7c-496c-a4b1-723882a88674.mp4
https://user-images.githubusercontent.com/43996225/163396595-3d10f4b7-ca91-49b8-9b34-a01802e5cc38.mp4
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:
View all open jobs on GitHub

I looked at this and this is probably due to changing testing accounts often since the report that is supposed to be missing belongs to another user. I think we cache it or something so when we open the app we go back to the same one. I tried to reproduce it but I couldn't, so I am going to close this.


Timeout error occurred using Fyne cross

I am trying to compile cross platform applications on MacOS according to this official document：
[https://developer.fyne.io/started/cross-compiling]
I use the doker method recommended in the document.When I pushed forward step by step according to this part of the document, I encountered the following timeout error：

I am very confused because I have successfully downloaded the two dependency packages prompted in the error message to the "$gopath / PKG / mod" directory through go mod, and the project can be developed and run normally locally. And when I copy the link address at the back of the error message get to the browser, I can also successfully access and download the corresponding file compression package.
Then why report the error of "timeout"? Please help answer, thank you very much!
Environmental information:
MacOS 12.2.1
Docker：20.10.14
go env：
GO111MODULE="on" GOARCH="amd64" GOBIN="/Users/hedaihua/go_projects//bin" GOCACHE="/Users/hedaihua/Library/Caches/go-build" GOENV="/Users/hedaihua/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/hedaihua/go_projects/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/hedaihua/go_projects/" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GOVCS="" GOVERSION="go1.17" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/usr/local/go/src/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rc/zzx_5btd77d8g4fybk9rv3000000gp/T/go-build3892759322=/tmp/go-build -gno-record-gcc-switches -fno-common"
@SvenDowideit @fiam @sirkon

https://blog.csdn.net/booskz/article/details/126945338

Docker containers do not use proxies because of the national firewall.
The problem can be solved by modifying it to an accessible GOPROXY.

Sounds like a good answer, thanks


LBRY app locks up on "Downloaded" tab

The Issue
Steps to reproduce

Create a channel with less than 4 characters
Download and publish content
Try and run LBRY and view downloaded content

Expected behaviour
LBRY app should allow you to view your published content.
Actual behaviour
After some time the LBRY app may become unresponsive when you click on the Folder icon for "Downloaded & Published"
System Configuration

LBRY Daemon version:
LBRY App version:
LBRY Installation ID:
Operating system:

Anything Else

Screenshots

Thx for filing, great find! Took care of reward via slack.
Workaround is to abandon the channel

#690 should fix this.

Will be live in next app release (presumably 0.18).


Interest activity

We need to try and Link Profile Activity text-view and interest. Good job so far team mates.

Ignore this. :)


proposal: cmd/{go,cgo,compile}: change interpretation of relative //line directives

Background: generated Go source files may contain //line directives that relate each line of Go source to the line of some other file from which it was generated. If the file named by the line directive is a relative path, cmd/compile currently interprets it like any other relative path, that is, relative to its own os.Getwd. This demands that the tool that generated the //line directive has the same working directory as the compiler (e.g. GOROOT/src), or that it creates the line directive in anticipation of the consuming process having (say) GOROOT/src as its working directory.
By contrast, go/scanner takes a different approach: it interprets relative line directives relative to the scanned file's directory. So, if it encounters the line directive //line a.yacc:1 in a file named a/a.go, the relative line directive is resolved as a/a.yacc. (In March 2018 go/scanner was changed to resemble the compiler in CL 100235, but this was reverted in August 2018 by CL 127658.)
The difference in behavior is easily observed by introducing a dummy line directive with a compiler error into an arbitrary Go source file. In this case, we'll append a relative reference from gopls/main.go to its README.md file:
xtools$ git diff
diff --git a/gopls/main.go b/gopls/main.go
index 083c4efd8..b63784ba8 100644
--- a/gopls/main.go
+++ b/gopls/main.go
@@ -34,3 +34,6 @@ func main() {
        ctx := context.Background()
        tool.Main(ctx, cmd.New(), os.Args[1:])
 }
+
+//line README.md:1
+invalid

When we build the package, the error message names a non-existent file:
xtools$ go build -o /dev/null ./gopls
# golang.org/x/tools/gopls
README.md:1: syntax error: non-declaration statement outside function body

When we use tools based on go/scanner, the error message names the correct file:
xtools$ gopackages -mode=allsyntax -deps ./gopls 2>&1 | grep README
	/Users/adonovan/w/xtools/gopls/README.md:1: expected declaration, found invalid

This is true even when we run the same commands from a different directory. Again, go build names the non-existent file, and go/scanner names the correct file:
xtools$ cd internal/
internal$ go build -o /dev/null ../gopls
# golang.org/x/tools/gopls
README.md:1: syntax error: non-declaration statement outside function body

internal$ gopackages -mode=allsyntax -deps ../gopls 2>&1 | grep README
	/Users/adonovan/w/xtools/gopls/README.md:1: expected declaration, found invalid

Proposal: The compiler's scanner should interpret relative line directives relative to the directory of the scanned file, and this behavior should be documented at https://pkg.go.dev/cmd/compile#hdr-Compiler_Directives.
This may require changes to the line directives emitted by cgo and other tools (including unparam and unconvert, whatever they are).
Arguably, this is an incompatible change, but we notice that more often than not, when published Go modules use relative line directives, they already follow the proposed discipline.
See also:

https://github.com/golang/go/issues/24183
https://github.com/golang/go/issues/26671
https://github.com/golang/go/issues/69689

@griesemer @ianlancetaylor @findleyr @timothy-king

Related Issues

documentation: status of relative filenames in line directives unclear #26207
proposal: go/scanner: stop adding source file directory to relative file name in //line comment  #69689
cmd/compile: //line problems #22660 (closed)
cmd/compile: Compiler doesn't expand paths specified in the //line directive #40365 (closed)
go/scanner: "//line :1" denotes the current directory #7765 (closed)
//line directive does not support source file names containing colons #2543 (closed)

Related Code Changes

go/scanner: Preserve relative filenames from //line comments.
go/scanner: report errors for incorrect line directives
cmd/compile: replace GOROOT in //line directives
go/scanner: continue adding directory to file name

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Since, as you say, the change is not backward compatible, and since we actually tried a related change in 2018 and had to roll it back, I think that we need a GODEBUG setting that can be used to disable the change.

Since, as you say, the change is not backward compatible, and since we actually tried a related change in 2018 and had to roll it back, I think that we need a GODEBUG setting that can be used to disable the change.

Perhaps, though the related change was in the reverse direction, so was a clear regression in functionality for source tools based on go/scanner, whereas the proposed change should mostly affect the behavior of builds that fail, which by definition are exempt from compatibility.

whereas the proposed change should mostly affect the behavior of builds that fail, which by definition are exempt from compatibility.

Wouldn’t it also affect the output of traceback, profiles, debuggers (unsure of this one?), etc.

Wouldn’t it also affect the output of traceback, profiles, debuggers (unsure of this one?), etc?

Yes, it would certainly be an observable change, but I suspect that very few existing tests of such tools rely on scenarios as complex and fragile as the specific outputs (file/line etc) of source generation tools, since they can change for all kinds of reasons. (In the specific case of cgo, we wouldn't expect any changes because the generator and consumer would change together.)
I'm not opposed to a GODEBUG flag, but we should assess whether one is needed before adding one.

This change also will affect compilation errors reported by Bazel and other build systems, but AFAIU this won't impact the successful build results.
It might be a bit inconvenient to generate correct relative //line directives in the build-systems like Buck or Bazel.
At this moment we can easily add an argument like this -timpath=$(pwd) to cmd/cgo and others, so all the paths reported during the build be relative to "the project root".
In case when paths //line directives are relative to the generated files, we'll need to pass -timpath that adds required number of .. to go up in the directory structure to go outside of buck-out/bazel-out and get to the project root. As a result the ``//linederictives will look roughly like this//line ../../../../foo/bar/source_cgo.go`.
BTW, I can recall one more request to clarify/fix //line behaviour #26207 from @zombiezen. It looks like their ideas align with your proposal.

This would also mean that -trimpath would work properly with line directives? I tested that like a month ago, and it was not doing anything.

@adonovan Is there a chance this proposal will be reviewed this week?

Not yet, sorry; the committee moves slowly and has a large backlog.

@adonovan Is there a way to roughly understand when it will be reviewed? In a month, two, etc? Is there specific order like FIFO?

@podtserkovskiy You can track the work of the proposal committee by following the minutes posted at #33502.  You can see the status of all proposals at https://github.com/orgs/golang/projects/17.


a little suggestion

Hello,this proj is great and solve my problem,but if you update it on npm will be better~
npm ver 0.2.0 and yours is 0.2.1

released.

Great,thanks


[usb] Implement transfer timeouts in proxy

Add implementation of USB transfer timeouts into the libusb-to-JS
proxy. Two main aspects of this are: (1) waiting for the transfer result
shouldn't exceed the timeout, and (2) data that's read after an input
transfer is timed out should be rerouted to later transfers.
The goal is to stop relying on the JavaScript counterpart to enforce the
timeouts, since, unlike chrome.usb, WebUSB doesn't support timeouts.
Luckily, "2" was already implemented by us in the past (for the
cancellation to work), so implementing timeouts in this commit isn't a
radical change.

LGTM % nit - and also, I would cut the "ourselves" from the CL title - after all, almost all CLs land some code that we did ourselves :)

Sure, done. And thanks for the fast reviews! Really appreciate that.


Replace Newtonsoft.Json with System.Text.Json

Fixes #19
Type of change
No visible change
How Has This Been Tested?

Extensive unit testing

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[X] Any dependent changes have been merged and published in downstream modules

Pull Request Test Coverage Report for Build<PHONE_NUMBER>7
Details

0 of 3 (0.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.1%) to 65.996%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/DendroDocs.Tool/Program.cs
0
3
0.0%

Totals

Change from base Build<PHONE_NUMBER>1:
0.1%

Covered Lines:
453

Relevant Lines:
645

💛  - Coveralls


Port mapping problem

Hello,
I try to deploy a galera cluster with marathon on two VM (mysql1 : ip <IP_ADDRESS>, mysql2 : ip <IP_ADDRESS>). I need to expose docker container port on the docker host. Everything is working fine when launching containers with command line with -p 3306:3306 -p 4567:4567 but I don't manage to start it with marathon.
Mesos : 0.21.1
Marathon : 0.8.1
I have a galera.json file (full content here : http://sttts.github.io/galera/mesos/2015/03/04/galera-on-mesos.html) to first launch a seed on mysql1. Once the seed is deployed and running, I can scale the number of nodes to join the cluster (I added a constraint to have only one node per machine so the first node will be deployed to mysql2).
For both seed and node, I have the following settings :
"docker": {
	"image": "trompx/mariadb:v1",
	"privileged": true,
	"network": "BRIDGE",
	"portMappings": [
		{ "containerPort": 3306, "hostPort": 0, "protocol": "tcp" },
		{ "containerPort": 8080, "hostPort": 0, "protocol": "tcp" }
	]
},

I get with docker ps
a336c860495b        trompx/mariadb:v1     "/start seed"          6 seconds ago       Up 5 seconds        4444/tcp, 4567/tcp, 4568/tcp, <IP_ADDRESS>:31000->3306/tcp, <IP_ADDRESS>:31001->8080/tcp   mesos-be605bee-1a58-45b7-9e5c-fc2a25afb87a

"nmap -sT -p 3306,4567 <IP_ADDRESS>" gives:
Starting Nmap 6.40 ( http://nmap.org ) at 2015-06-01 12:15 UTC
Nmap scan report for mysql1 (<IP_ADDRESS>)
Host is up (0.000039s latency).
PORT     STATE  SERVICE
3306/tcp closed mysql
4567/tcp closed tram

The seed healthcheck passes, but then when I try to scale the number of nodes (on mysql2), I get a "WSREP: wsrep::connect() failed: 7" error. The node cannot join the seed.
So I tried to force the host port like :
"docker": {
	"image": "trompx/mariadb:v1",
	"privileged": true,
	"network": "BRIDGE",
	"portMappings": [
		{ "containerPort": 3306, "hostPort": 3306, "protocol": "tcp" },
		{ "containerPort": 4567, "hostPort": 4567, "protocol": "tcp" },
		{ "containerPort": 8080, "hostPort": 0, "protocol": "tcp" }
	]
},

but then the seed container is not even deploying, it just stays on 0/1 with "deploying" status.
I tried the following too as suggested here https://github.com/mesosphere/marathon/issues/751 :
"docker": {
	"image": "trompx/mariadb:v1",
	"privileged": true,
	"network": "BRIDGE",
        "parameters": [
               {"key":"publish", "value": "3306:3306"},
               {"key":"publish", "value": "4567:4567"},
	]
},

but I get
HTTP ERROR: 500
Problem accessing /v2/groups/. Reason:
Server Error
Powered by Jetty://

Any idea on why the container is not being deployed when setting the hostPath ? Or how I could just do the equivalent of -p 3306:3306 -p 4567:4567 in marathon ?
Here someone is trying with args but without success : https://groups.google.com/forum/#!msg/marathon-framework/gS3KEFsXIGE/HJCLH_8_KxUJ
Thank you

Hi @trompx,
virtualized networking ("network": "BRIDGE") doesn't work well with peer-to-peer style networking. If a container tries to auto-detect its host name and advertise that to its peers, they will probably fail to connect.
Thus I would advice to use HOST networking ("network": "HOST").
This usually implies that you want to pass your process some configuration to change the ports it binds to. You can achieve parameter substitution in your args array by specifying a different entrypoint for your container.
Actually, Marathon has similar problems starting itself, so here is the JSON I came up with
https://github.com/mesosphere/marathon-demo/blob/master/2015-05-29-intro_and_0.8.2/marathon-docker-v0.8.2-RC4.json
I hope that this helps you. Otherwise, reopen.

Hello @kolloch,
Thanks for the JSON example. I ended up using BRIDGE mode and to make this works, I added custom resources 3306, 4444, 4567, 4568 in mesos slave.
Concerning the container not deploying, I think there is something we could improve. When setting :
{ "containerPort": 3306, "hostPort": 3306, "protocol": "tcp" },
{ "containerPort": 4444, "hostPort": 4444, "protocol": "tcp" },
{ "containerPort": 4567, "hostPort": 4567, "protocol": "tcp" },
{ "containerPort": 4568, "hostPort": 4568, "protocol": "tcp" },
{ "containerPort": 8080, "hostPort": 0, "protocol": "tcp" }

I sometimes got errors saying that ports were overlaping. So the hostPort 0 was dynamically selecting a port (sometimes it was picking one of the 3306-4444-4567-4568). To make this work I had to set it manually to one of the port in the range 31000-32000 (not ideal) but it worked.
So I guess that the order in which portMappings are written is not taken into account.

Hi @trompx, there are some changes in the master of Marathon that should improve that:

for dynamically assigned ports ("hostPort": 0) a random ports from any offered range will be chosen
at least when still available at task launch, no ports that are specified as static hostPorts (!= 0) are used as dynamic ports

Unfortunately, any other task might still use up these statically assigned host for dynamically assigned host ports.
Our story isn't ideal there yet. We have lot's of internal discussions about virtualizing IPs as well but this will take time.


What is the recommended way to integrate with redux-simple-router

I created a clean project using the generator.
then, npm install --save react-router redux-simple-router
but couldn't render components using Routes.
I changed run.js to render the routes:
<Provider store={store}>
    <Router history={history}>
      <Route path="/" component={App}>
        <IndexRoute component={SearchComponent}/>
      </Route>
    </Router>
  </Provider>

Modified reducers/index.js to combine the routeReducer:
import { combineReducers } from 'redux';
import { routeReducer } from 'redux-simple-router'
/* Populated by react-webpack-redux:reducer */
const reducers = { routing: routeReducer, search: require('../reducers/search.js') };

module.exports = combineReducers(reducers);

and added Router.RouteHandler to render under Main.js (AppComponent).
but I keep getting these two errors:
Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of AppComponent.
Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Check the render method of AppComponent.
Thanks in advanced

Ok, apparently Router.RouteHandler  was replaced with this.props.children. I also had to move the Routing "DOM" to the container and pass history as a prop to it. I'm not sure if this is the best practice though. @stylesuxx I think it is a good topic for a wiki. I can close this issue and create a Wiki page for Adding routing using redux-simple-router.what do you think?

Hey @yakirn If you could take the time and add a Wiki page that would be great. I will link it from the README then.
I was thinking about adding a option to enable routing in the generator and to choose between redux-simple-router and redux-router. Although I am not sure when I will tackle this, but most likely in the next couple of weeks.

Hey @yakirn If you could take the time and add a Wiki page that would be great. I will link it from the README then.
I was thinking about adding a option to enable routing in the generator and to choose between redux-simple-router and redux-router. Although I am not sure when I will tackle this, but most likely in the next couple of weeks.

I would be very happy to have a wiki for this ! I'm litteraly stuck with the router

Alright, I will see what I can do in the next couple of days.

Many thanks !

Added routing with react-router to the wiki.

Nice ! But how to render a component with a specific route ?
I see that all routes are loading the App container.
I guess that all components must be loaded inside the App container ?

No, you can make another container and simply route to that.

I thought that the interest of the App container was to be the main container.
How to have a main layout (with nav, header, footer) and route to pages without having to write everything again ?
Should I have to write eveything in the index.js (Routes & Layout) ?
Sorry for thoses dumb questions but I'm so confused with all that new stuff.

And I feel that having separate containers from App means that I will have to manually populate them when I create actions/reducers while the generator do this for me with App container.

Yeah, well routing highly depends on your application and what you want to accomplish.
You can also do routing in your App container if it better fits your purpose.
About the structure: I would put all static things like header and footer to index.html
nav would then be a component I would add to the App container and then do the routing inside it.
I am putting all this into a small demo right now, so stay tuned, should be done in the next couple of hours.

So, here we go I added a wiki page to explain the setup of a simple counter app.

I see that you implementend the container generator ? (I mean that you should update the readme)
App and Stats containers are independants ?
In this case, there is only one reducer and both ctions are linked to the app container but what if I want to create reducers/actions linked to another containers ?
I will have to manually edit the App container after reducer/action generation ?
Would it be efficient to specify a container to link actions/reducers to during generation ?

Yes I updated it in the development branch, just did not merge it into master yet.
The actions do not really care about in which containers/components they are triggered.
The action is triggered somewhere, either in the container or from within a component.
The reducer than takes over the handling of the action and updates the state accordingly.
I use containers in such a way that they handle which Props are passed to the components lying beneath. The components are dumb, they do not care about anything else, than that they get all the props they need - so absolutely no business logic is in containers - they show (parts) of the state and they trigger actions.
What I mean by that is, that I rarely use more than one container, so when I do, it surely has to have mayor differences to the App container, so I am not sure how much sense it makes to generate a new container with all the same functionality as the App container.

Added information to Wiki, closing now.

(referring to the wiki page) How do you adapt the App container to handle multiple routes? Right now, I am bypassing the App container altogether just so I have control over my routes (making my own containers). It looks like you were discussing this in https://github.com/stylesuxx/generator-react-webpack-redux/issues/24 but not in the context of routing?

I suggest using the way described in the Wiki. Your outer most container is responsible for routing and provides all the routes. The route component itself is just a component distributing the props to the real components beneath it.
Not sure if I understand your question regarding multiple routes. In the example in the Wiki I handle three routes:

/
/foo
/bar

or do you mean nested routes like /foo/bar/:someId ? I guess I should really work on a routing example.

/foo and /bar are both using the App component, which I suspect is just a
placeholder to be replaced by some other view components. However, the
App component acts as a container for pretty much the entire application
state because of the way the generator is set up (it auto-adds
actions/reducers). Thus, to use the router you need to pretty much ignore a
pretty important utility.
If you check my linked issue, you'll notice that @stylesuxx mentions
adapting the App component for routing multiple sub routes so one can
avoid playing a massive game of copy-paste. I'd like to know how to do that.
On Jun 20, 2016 08:29, "Chris"<EMAIL_ADDRESS>wrote:

I suggest using the way described in the Wiki. Your outer most container
is responsible for routing and provides all the routes. The route component
itself is just a component distributing the props to the real
components beneath it.
Not sure if I understand your question regarding multiple routes. In the
example in the Wiki
https://github.com/stylesuxx/generator-react-webpack-redux/wiki/Routing
I handle three routes:

/
/foo
/bar

or do you mean nested routes like /foo/bar/:someId ? I guess I should
really work on a routing example.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/stylesuxx/generator-react-webpack-redux/issues/1#issuecomment-227128503,
or mute the thread
https://github.com/notifications/unsubscribe/ACiZGuZ0gv_5wQ8yZZOxh72ky_CdDchZks5qNoefgaJpZM4G71i4
.

Yes, that was me replying ;-)
I will try to set up an example in the next couple of days to illustrate this.

ahhhhhhhhh I was using email on my phone. Thanks!

This is just a short log of my experimentation with react-router, skip to the bottom for source link.
Abstract:
In this example the user will be shown a link to the login page if not logged in yet. After the user is logged in, a link to the member area will be displayed. The user will be greeted on the member page after logging in.
Used routes:

/ Will provide a login button if not logged in, otherwise a link to the member page
/self Will display a welcome message if logged in

Base Setup
mkdir routing
cd routing
yo react-webpack-redux (default settings)

Actions
This example will only need one action to switch the logged in state of the user.
yo react-webpack-redux:action login

Reducers
Only a single state needs to be tracked and this is the users logged in state:
yo react-webpack-redux:reducer user

Simply add a boolen flag to the reducer to keep track of the login state. Also set up the action so that the login state is set to true if a login action happens.
Components
We will use the following components:

login provides a login button

link displays the link to the member area

index displays login button or link to member page

welcome displays a welcome message
yo react-webpack-redux:component Login
yo react-webpack-redux:component Link
yo react-webpack-redux:component Index
yo react-webpack-redux:component Welcome

Containers
For our routes we will need wrapper containers to connect to the stores and set up actions:

indexRoute wrapper for the index route

selfRoute wrapper for the self route
yo react-webpack-redux:container IndexRoute
yo react-webpack-redux:container SelfRoute

Routes
Install react-router
npm install --save react-router

Routes are set up in Main.js
So you basically need a container for every route which you need to connect to the store and set up your actions and props for this route. As far as I can see you will not get around copy and pasting all the actions and props you need for your routes, aka connecting the container to the store.
I was under the impression one could pass props to the routes directly, this does not seem to be the case, I must have confused it with the URL params.
Please let me know if this makes sense to you, or if you can think of a better way. I will experiment with other routers and will add this findings to the Wiki. Maybe I adapt the example and merge it to master for future reference.
You can find the whole source here => https://github.com/stylesuxx/generator-react-webpack-redux/tree/feature/routing-example/examples/routing

@stylesuxx Wow, thanks! I'm a bit relieved that's the only option I have, as I've already scaffolded my entire project like so.

I would not say it is the only way (especially in the JS universe ;-), there are multiple routing solutions:

react-router-redux (like react router but also allows for redux' time travel feature)
universal-router
react-router-component
react-mini-router (not sure if still maintained)

I have not evaluated all of them, universal-router looks very promising, since it seems to allow to simply pass props down to route components. On the other hand, react-router-redux might be the way to go in order to keep time travel functionality.
I would really like to see a generator for routes. I just do not want to rush it, first evaluate which solution would be the best fit.
If you have any input on one of the mentioned libraries, feel free to share your experience.


American Gut study accessions moved on EBI?

The code's current mapping for EBI study and sample accessions seems stale. Trying to access these accessions gets a message from EBI: "suppressed at the submitter's request".
These are the same accessions currently listed on their FAQ: https://www.microbio.me/AmericanGut/faq/

Moved to https://github.com/PersonalGenomesOrg/open-humans/issues/228 for unified tracking


Helm collector CrashLoopBackOff Bottlerocket OS

aws eks: 1.26
eks nodes os: bottlerocket
I am trying to install stackrox collector into eks cluster:
collector-4kbfh                      1/2     CrashLoopBackOff   57 (25s ago)    154m
collector-hqdrw                      1/2     CrashLoopBackOff   57 (59s ago)    154m
collector-lvts9                      1/2     CrashLoopBackOff   56 (5m4s ago)   154m
collector-p2vrz                      1/2     CrashLoopBackOff   57 (29s ago)    154m
collector-prxxh                      1/2     CrashLoopBackOff   57 (29s ago)    154m
collector-tk4jp                      1/2     CrashLoopBackOff   57 (37s ago)    154m

all collector pods crash with error:
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       StartError
      Message:      failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: write /proc/self/attr/keycreate: invalid argument: unknown

Looks like it's related to bottlerocket, because I successfully installed collector into another cluster with CentOS os.

@ovalenti Hello! Sure:
kubectl logs -f collector-tk4jp -c collector
Collector Version: 3.15.0
OS: Bottlerocket OS 1.14.0 (aws-k8s-1.26)
Kernel Version: 5.15.108
Starting StackRox Collector...
[INFO    2023/08/11 14:27:35] Hostname: 'collector-tk4jp'
[INFO    2023/08/11 14:27:35] User configured collection-method=ebpf
[INFO    2023/08/11 14:27:35] Afterglow is enabled
[INFO    2023/08/11 14:27:35] Sensor configured at address: sensor.stackrox.svc:443
[INFO    2023/08/11 14:27:35] Attempting to connect to Sensor
[INFO    2023/08/11 14:27:35] Successfully connected to Sensor.
[INFO    2023/08/11 14:27:35] Module version: 2.5.0
[INFO    2023/08/11 14:27:35] Config: collection_method:ebpf, useChiselCache:1, scrape_interval:30, turn_off_scrape:0, hostname:collector-tk4jp, processesListeningOnPorts:1, logLevel:INFO, set_import_users:0
[INFO    2023/08/11 14:27:35] Attempting to find eBPF probe - Candidate versions:
[INFO    2023/08/11 14:27:35] collector-ebpf-5.15.108.o
[INFO    2023/08/11 14:27:35] Attempting to download collector-ebpf-5.15.108.o
[INFO    2023/08/11 14:27:35] Attempting to download kernel object from https://sensor.stackrox.svc:443/kernel-objects/2.5.0/collector-ebpf-5.15.108.o.gz
[INFO    2023/08/11 14:27:35] HTTP Request failed with error code 404
[WARNING 2023/08/11 14:30:30] Attempted to download collector-ebpf-5.15.108.o.gz 36 time(s)
[WARNING 2023/08/11 14:30:30] Failed to download from collector-ebpf-5.15.108.o.gz
[WARNING 2023/08/11 14:30:30] Unable to download kernel object collector-ebpf-5.15.108.o to /module/collector-ebpf.o.gz
[WARNING 2023/08/11 14:30:30] No suitable kernel object downloaded for collector-ebpf-5.15.108.o
[ERROR   2023/08/11 14:30:30] Failed to initialize collector kernel components.
[INFO    2023/08/11 14:30:30]
[INFO    2023/08/11 14:30:30] == Collector Startup Diagnostics: ==
[INFO    2023/08/11 14:30:30]  Connected to Sensor?       true
[INFO    2023/08/11 14:30:30]  Kernel driver candidates:
[INFO    2023/08/11 14:30:30]    collector-ebpf-5.15.108.o (unavailable)
[INFO    2023/08/11 14:30:30] ====================================
[INFO    2023/08/11 14:30:30]
[FATAL   2023/08/11 14:30:30] Failed to initialize collector kernel components.

Thank you for swift response! I tried the solution that you provided:
helm upgrade --install --create-namespace -n stackrox stackrox-secured-cluster-services stackrox/stackrox-secured-cluster-services \   -f stackrox-init-bundle.yaml \   --set clusterName="cp-dev" \   --set centralEndpoint="central.stackrox.svc:443" --set collector.collectionMethod="core_bpf"
but faced with same error
Do you have plans to support Bottlerocket?

Do you have plans to support Bottlerocket?
I am afraid that this is not currently on the roadmap.

Indeed, ebpf is going to be deprecated in favor of core_bpf, so we tend to focus on this technique.
However, we are assessing the impact and searching for the kernel flavors from cloud providers that are not compatible with core_bpf. I would love to get the log content from your last attempt, please :smiley:

Sorry, look like I mistaken. For now I see that everything is okay with collector container:
  collector:
    Container ID:   containerd://9d54b22fe1ab51faac46a0ba555b151a60d292e80d01cd03a6eea6de822daf04
    Image:          quay.io/stackrox-io/collector-slim:4.1.2
    Image ID:       quay.io/stackrox-io/collector-slim@sha256:a56b0fa0b5108cac110b711af584c1dcded362483d6011c549d801a633d54ccc
    Port:           <none>
    Host Port:      <none>
    State:          Running
      Started:      Fri, 11 Aug 2023 16:26:06 +0100
    Ready:          True
    Restart Count:  0
    Limits:
      cpu:     750m
      memory:  1Gi
    Requests:
      cpu:     50m
      memory:  320Mi
    Environment:
      COLLECTOR_CONFIG:   {"tlsConfig":{"caCertPath":"/var/run/secrets/stackrox.io/certs/ca.pem","clientCertPath":"/var/run/secrets/stackrox.io/certs/cert.pem","clientKeyPath":"/var/run/secrets/stackrox.io/certs/key.pem"}}
      COLLECTION_METHOD:  core_bpf
      GRPC_SERVER:        sensor.stackrox.svc:443
      SNI_HOSTNAME:       sensor.stackrox.svc
    Mounts:
      /host/dev from dev-ro (ro)
      /host/etc from etc-ro (ro)
      /host/proc from proc-ro (ro)
      /host/sys from sys-ro (ro)
      /host/usr/lib from usr-lib-ro (ro)
      /host/var/run/docker.sock from var-run-docker-sock (ro)
      /module from tmpfs-module (rw)
      /run/secrets/stackrox.io/certs/ from certs (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-2rxmj (ro)
  compliance:
    Container ID:  containerd://45da807151e20af5f80777dcd02994cb4e724fac2ae87f6280a4c0d9b2dc98bb
    Image:         quay.io/stackrox-io/main:4.1.2
    Image ID:      quay.io/stackrox-io/main@sha256:91440e9414104b5a1bd1e1d849e7223223a7ddaf45a16ba1cc8c6c5d555f9e1f
    Port:          <none>
    Host Port:     <none>
    Command:
      stackrox/compliance
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       StartError
      Message:      failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: write /proc/self/attr/keycreate: invalid argument: unknown
      Exit Code:    128
      Started:      Thu, 01 Jan 1970 01:00:00 +0100
      Finished:     Fri, 11 Aug 2023 16:26:07 +0100
      ```
      but problems with compliance

But problems with compliance. There is no logs.

I would say that this is back to this part of your first message and the init container issue:
container init: write /proc/self/attr/keycreate: invalid argument: unknown
I will invoke @stackrox/data-shepherds for some guidance about this one :wave:

@ovalenti @melghors there is a securityContext in daemonsetcollector, removing seLinux resolving this issue on BottlerocketOS.

It works! It's necessary to disable in helm of "stackrox-secured-cluster-services":
collector:
  disableSELinuxOptions: true

I will close the ticket for now, since it seems all clear. Let me know if there is something else !


Add getNumPartitions() for WaltzClient

Add getNumPartition() to get total number of partitions of a WaltzClient

Can I get a review on this plz? Thanks😄 @abhipardhu @patrickghannage @smithakoduri @ymatsuda


Monitoring threads continue to run after program has ended

First I'll say I'm a hobbyist programmer so I apologize if there is an obvious solution that I don't see. It seems from the example code that the primary way to end monitoring threads is to call the same method that started the thread, to "toggle off". If a thread isn't toggled off, it will continue to execute even after the main thread is completed (at least in the context I'm working in, Unity3D). I continue to see new post messages in the console even after stopping the program.
It would be convenient to have a way to stop all monitoring and any background threads.

I created a new method that allows all of an object's monitoring threads to be terminated with a single call.  Here's a short example:
comment.Comments.MonitorNew();
comment.Comments.MonitorOld();
comment.Comments.MonitorControversial();

...

comment.Comments.KillAllMonitoringThreads();

Merged into 1.3.  You can get it now on the develop branch.  Does this solve your issue?

Yes it does! Thank you for looking into this.


[DISCUSSION] Proposed API change to pyspextool_setup

Currently, the call to pyspextool_setup is quite long:
1. Explicit:
raw_path = tdfolder
cal_path = redux_folder+'/cals/'
proc_path = redux_folder+'/proc/'
qa_path = redux_folder+'/cals/'

pyspextool_setup(instrument,raw_path=raw_path, cal_path=cal_path, proc_path=proc_path,
                    qa_path=qa_path,verbose=True)

I propose consolidating the input by passing a dictionary of paths instead of individual strings.
2. Consolidated:
spex_prism_paths = {
    'raw_path':  'tests/test_data/spex-prism/data/',
    'cal_path':  'tests/test_data/spex-prism/cals/',
    'proc_path': 'tests/test_data/spex-prism/proc/',
    'qa_path': 'tests/test_data/spex-prism/qa/',
    }

pyspextool_setup(instrument, paths=spex_prism_paths,
                    qa_path=qa_path, verbose=True)

Either way, under the hood, I'm going to change the paths into a dictionary (or TypedDict), but this is a question about the user interface. Which call to pyspextool_setup do you think is better for our users?

Kelle and I have talked about this a bit and my opinion was that it was better to have each value separate because it is easier for the user.   I personally like to see all the things I have to potentially pass without having to see a single thing and then go down to the doc strong to figure out what goes in that thing.

I prefer keeping as is. Right now the demonstration notebooks have the specifying these variables line by line, which makes more sense for the lay user, and it makes the docstring cleaner (lists every variable). If the user wants a more compact form and are pythongenic they can always specify as
spex_prism_paths = {
    'raw_path':  'tests/test_data/spex-prism/data/',
    'cal_path':  'tests/test_data/spex-prism/cals/',
    'proc_path': 'tests/test_data/spex-prism/proc/',
    'qa_path': 'tests/test_data/spex-prism/qa/',
    }

pyspextool_setup(instrument, **spex_prism_paths, verbose=True)

consensus is majority apathy with passionate outliers. we'll keep as is


SW-2688 Fix search criteria transform function in FE to consider the org id

For hotfixes, we won't be merging the PR, see https://terraformation.atlassian.net/wiki/spaces/SW/pages/482017308/Deploying+code#Fix-a-bug-in-production-without-pulling-in-other-changes-from-main


Move build configuration to static configuration files

Summary
This removes the vast majority of the dynamic code from our setup.py files, and instead uses static configuration to specify them.  As part of this, we also use a single VERSION.txt as a single source of truth for both the qiskit-terra main package and the qiskit "metapackage". This should avoid a situation where we let the two get out of sync during a release, which can cause us severe problems for fixing the problem with respect to git tags.

Summary
Details and comments

For the top question, which I didn't answer: I don't think this changes anything about the pip version, though it might require some newer setuptools features to support the dynamic tables.  I don't know what the minimum version of it is, though - setuptools' documentation isn't great at that.


[enhancement] client should abort if reaches the docker limit.

start server (docker only open 1+3 client port)
start 3 clients.
start 4th client, the client should detect the problem and return quickly.

verified.


3.0.0-dev.9 @embedded of foreign types

Hi,
Thanks for the great project, I like what's coming with 3.0.0... kudos :)
I wonder how to embed types for which you can't change the declaration?
Thank you :)

You can extend them and annotate the new class with @embedded 🙂

Yeah ok. Thanks.


Unable to Install Pre V9 Versions

Describe the bug
I am unable to install PDFoundry on Foundry 0.8.9, I've tried through the in-game installer and also by copy pasting the manifest URL's found under the different version on the package page (https://foundryvtt.com/packages/pdfoundry).
To Reproduce
Steps to reproduce the behavior:

Go to 'Install Module'
Click on 'Install'
Or paste json into Manifest URL
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

Version Information:

Chrome Version 97.0.4692.71 (Official Build) (64-bit) AKA latest version
Foundry 0.8.9
PDFoundry v0.8.9

Hi @PhluXx1 - I no longer offer any support for these versions of FVTT for PDFoundry. If you need to install the old versions you may do so manually. You can find them on the releases page, the latest version pre-VTT 9 is here. Download the zip file with 0.8.10 in the name, then extract it into your modules folder.


Fix #157; Add XDG_GREETER_DATA_DIR to ignorelist

Fixes Issue #157 on Arch with a LightDm by adding the Environment Variable "XDG_GREETER_DATA_DIR" to the ignore list. In particular critical, since in a standard install the folder is not accessible and hence throws a permission error.

Thank you for adding this!

How do you resolve this on ubuntu/ debian?


Class 'Tuupola\Middleware\HttpBasicAuthentication' not found

I am using tuupola with slim framework to secure android connection but I always get this error although I followed the steps that I found in this site :
https://github.com/tuupola/slim-basic-auth

You have either not installed the middleware or alternatively not including it in the PHP code.

my php version is : 7.3.7
I opened my terminal in the project folder and paste this code :
composer require tuupola/slim-basic-auth
then I used this in my own project :
$app->add(new Tuupola\Middleware\HttpBasicAuthentication([
"secure"=>false,
"users" => [
"MyUserName" => "MyUserPassword"        ]
]));
that is all what I did.
Did I do anything wrong ??

Are you requiring the  autoload.php in the beginning of code? Something like:
require __DIR__ . "/vendor/autoload.php";

yes
require '../../vendor/autoload.php';

Then I don't know. My guess is that the CLI PHP is 5.x which causes composer to install old version of the middleware. What is the output of:
$ composer require tuupola/slim-basic-auth

it was installed successfully.
I have watched a video tutorial about your library and followed the instructions step by step
this is the video :
https://www.youtube.com/watch?v=HsVptQbgav0

I understand. What is the output of above command? Copy and paste it it here. Should look something like:
$ composer require tuupola/slim-basic-auth
Using version ^3.2 for tuupola/slim-basic-auth
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

I put this :
composer require tuupola/slim-basic-auth
and the output was this :
Using version ^3.2 for tuupola/slim-basic-auth
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

That looks correct. I have no idea what causes the error. I would check the filename and line in the error message to be sure where the error is actually thrown. Delete and rewrite the line in case there are some accidental hidden control characters.

Fatal error: Uncaught Error: Class 'Tuupola\Middleware\HttpBasicAuthentication' not found in
D:\xampp\htdocs\database\public\index.php:23
Stack trace:
#0 {main}
thrown in D:\xampp\htdocs\database\public\index.php on line 23
.....................
Line 23 is : $app->add(new Tuupola\Middleware\HttpBasicAuthentication([
        "secure"=>false,
        "users" => [
                "aliAhmedAbouAli12#" => "thisIsMyPass1993As#"        ]
        ]));

I noticed that the HttpBasicAuthentication.php file is in the path :
\vendor\tuupola\slim-basic-auth
and the HttpBasicAuthentication folder is in path :
\vendor\tuupola\slim-basic-auth\src
does it make  any sense?

Yes, composer installs libraries into vendor directory and autoload.php loads them.

what should I do ?

Assuming you are running composer require tuupola/slim-basic-auth in correct folder and correct autoload.php is included, I have no idea what is causing the error.

you mean the path is correct?

you are the auther, who should I ask if you don't know

Now what ?? what should I do for this error?

I don't know. The error means either middleware is not installed, old version of middleware is installed or middleware is not required in the PHP code. You said all of these have been done correctly. However one of them must be wrong. My guess is composer require was ran in a wrong folder or something similar.

where  should I run it?

this is my index header :
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\UploadedFileInterface;
require '../../vendor/autoload.php';

You should run it in folder where your projects composer.json file is located. It It is the same folder where your vendor/ folder is located. Judging from the code snippet above it is two folders down from the folder where your index.php is located.
For composer usage please refer to composer documentation:
https://getcomposer.org/doc/01-basic-usage.md

it is in the folder you pointed to.... now what ?

I don't know. The problem is not in the middleware.

I am installing the Xampp in #D disk, is that a problem?

this is from composer.json
//////////////////////////////
"require": {
"php": ">=7.1",
"ext-json": "*",
"monolog/monolog": "^1.24",
"php-di/php-di": "^6.0",
"slim/psr7": "^0.5",
"slim/slim": "^4.1",
"tuupola/slim-basic-auth": "^3.2"
},

Maybe try adding a \ in front of the namespace (i.e.):
$app->add(new \Tuupola\Middleware\HttpBasicAuthentication([
"secure"=>false,
"users" => [
"MyUserName" => "MyUserPassword" ]
]));

Dear @tuupola @davehibshman ,
try reproducing this bug or error with Slim Framework 4.x versions.
Since you're using 3.x version that's why you are not able to understand the problem @aliahmed119933 and me are facing.

@aliahmed119933 -- if you're still stuck with this problem then just remove these lines from index.php
OkHttpClient okHttpClient = new OkHttpClient.Builder()
.addInterceptor(
new Interceptor() {
@Override
public Response intercept(Chain chain) throws IOException {
Request original = chain.request();
                             Request.Builder requestBuilder = original.newBuilder()
                                     .addHeader("Authorization", AUTH)
                                     .method(original.method(), original.body());

                             Request request = requestBuilder.build();
                             return chain.proceed(request);
                         }
                     }
             ).build();

You don't need it there. Just go with the Android App's (client) side only.
@tuupola @davehibshman -- this is the solution so you can close this.

@TheCodingArcher  are you sure I do not need these lines in the index?
Will the android client understand the whole process ?
Did you test it?

@aliahmed119933 yes I have tested. All the APIs are working perfectly fine.
Just remember, make sure you are using Slim Framework 4.x and above.
For me, its the latest one Slim 4.5.0 released.
Try with my suggestions for now. If something's still not working for you then we can find out some other solution for you. But for me, it's working like a charm. Hope the same for you too.
Cheers!! :)

@TheCodingArcher  hey man, I did not tested it yet but I was rude and did not thank you, so thanks man, I appreciate. :-D

@TheCodingArcher
I was using slim framework to write restful api and now with version 4 I feel like I don't know anything about slim....
can you help with transforming from 2 to 4 please? if you have time?

@aliahmed119933 im using 4.5.0 aswell. After "composer dump-autoload -o" it worked.


@bufbuild/protobuf proto3 serialization regression: throw error when serializing oneof property with undefined value

Hi all !
We are facing an issue with a oneof message property having a string value being set to undefined is triggering an error since version v1.8.0.
As an example, here is a proto3 message for reproducing the error.
syntax = "proto3";

message MyMessageWithOneOf {
  oneof token {
    string first_token = 1;
    string second_token = 2;
  }
}

And here is the code setting an undefined value (in TS, after generating the proto objects):
const message = { value: undefined, case: 'firstToken' }

Before version 1.8.0 this would successfully be serialized in the request, as we can see in binary-format-proto3.ts, where there is no validation on the field value and it essentially gets set to undefined.
Since version 1.8.0, after a commit aiming at merging proto2 and proto3 serializers, this code in binary-format.ts is now called and we can see that this triggers an assertion error since it does not accept undefined values.

This, to me, seems like a breaking change that could require the change to a major version.
Is there a way we could fix this behaviour to be backward compatible (a patch maybe) ? If not, we should at least update the documentation or the changelog to reflect how this change could break for existing code ?

Hey Nicolas, it looks like this is a misunderstanding regarding how the oneof representation works.
The property case is the discriminator for the union. If it's undefined, this means that no field of the oneof group is selected, and that there is no value. Conversely, if case is specified, the field with this name is selected and has the specified value, meaning that value cannot be undefined.
With your example, this means that all of the the following assignments are valid:
import { MyMessageWithOneOf } from "./gen/...";

const msg = new MyMessageWithOneOf();
msg.token = { case: 'firstToken', value: "abc" };
msg.token = { case: 'secondToken', value: "def" };
msg.token = { case: undefined }; // `value: undefined` can be omitted here

But {value: undefined, case: 'firstToken'} is not valid, and will raise a compile time error with TypeScript.
I am sorry this was not obvious to you. Let me know if we can clarify this in our documentation.

Hiu @timostamm !
Thank you for taking the time to review this.
I kind of agree that we should not be sending undefined but the code I shared above worked with versions prior to v1.8.0. We discovered it when we upgraded to the latest version and the code was now throwing an assert error upon serialization. We were setting the case properly and an undefined value without knowing, and this was serialized as an empty value.
To follow up with your example above, up until the change, we could do this successfully:
const myValue: string | undefined = undefined;
msg.token = { case: 'secondToken', value: myValue };

This is why I felt like this is more of a breaking change 🤔

Sometimes a bug is widely depended on, and fixing it in a patch or minor release would be inadequate.
Clearly you're affected by the change, but I do not get the impression that the previous behavior was widely depended on. Apologies for the inconvenience.


chore(website): disable random failing website config check

Why
See the failure of #408
How
Disabled the failing job by commenting out.
Test Plan
Rebase PR #408, check if it passes.

cc @nicknovitski, I think you added it. I have no idea what this would mean, or how to fix it. We need to merge Aman's PR #408 so I'm (temporarily) disabling the check.


build: the end-2-end tests have become extremely flaky

They have less than 20% success rate.

Papered over in #4605 we still need to investigate

The patch helps only somewhat. I added a 10s delay after wait-connectivity. That's not even quite enough, so I added a triple retry on pings. That is enough for the test to succeed most of the time, but the retry only applies to the end2end_integration test. There's another test that keeps failing: integration_test. That one doesn't have a retry option.
In the end we just need to figure out why it takes so long for path segments to become available.

So, it appears that the segments are available after all (give-or-take a small fix in await-connectivity). What makes the tests fail is Deadline exceeded errors when trying to fetch the segments. Following the breadcrubs, I ended-up seeing a CS RPCing to another and both (if memory serves) of them disappearing for several seconds in the middle of processing the request. So, of course, the 10 s client timeout blows up eventually and so the whole chain of RPCs fails.

Reading the release notes carefully, this is the only thing that stands out:
https://tip.golang.org/doc/go1.23#timer-changes
And indeed, there is something in the Go issue tracker: https://github.com/golang/go/issues/69312 and the offending library https://github.com/quic-go/quic-go/pull/4659
In the meantime, we can downgrade, or use GODEBUG="asynctimerchan=1"
Downgrading Go version shows very high reliability: https://buildkite.com/scionproto/scion/builds/4751


Added #undef for IN and OUT in case they were defined by <minwindef.h>

If you
#include <Windows.h>

before
#include <Zydis.hpp>

the mnemonics IN and OUT conflict with the macros defined in <minwindef.h>:
#ifndef IN
#define IN
#endif

#ifndef OUT
#define OUT
#endif

If Zydis should by design be included first, then I guess we can ignore this PR.

We're aware of this collision on Windows and also considered undefing those, but decided it probably wouldn't be a good idea to do it in our code as it probably breaks a few Windows headers. Instead, users should either do it themselves when they include zydis or just alter the include order.
We're currently working hard on getting version 2, a fully rewritten version of the library, ready for release. In that new version, all of our symbols have a common prefix, avoiding such collisions all together.
Anyways, thanks for the contrib!


updated self-signed https instructions in both influxdb and enterpris…

…e influxdb

Changes for OSS were incorporated into the 1.6.1 release. Changes for InfluxDB Enterprise need to be added to the next release.

Thanks, I'll merge master into this PR once the 1.6.1 changes are added and resolve the merge conflict. These enterprise changes have already been made in the influxdb-1.6 branch which is currently the home for the upcoming influxdb enterprise release.


Is it possible to set default params value in sendMessage (and other methods) when bot init? [FEATURE]

Is your feature request related to a problem? Please describe.
For example, all message I sent with parse_mode: ParseMode::HTML, I want to use default value ParseMode::HTML when parse_mode param ommited when sendMessage called.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response

We will not do this because it would be difficult to maintain.
But you can always extend Nutgram:
https://nutgram.dev/docs/usage/extend
Example:

Nutgram::macro('sendHtmlMessage', function (string $text) {
    return $this->sendMessage(
        text: $text,
        parse_mode: ParseMode::HTML,
    );
});

$bot->sendHtmlMessage('Hello');

Thank you, this is really the solution I need!


Is there any way to specify the position for each module in my design?

As the title, is there any way to specify position for each module in my design on chip architecture?

use the macro.cfg file to specify the positions and orientation

use the macro.cfg file to specify the positions and orientation

@mattvenn
Here is my code for a simple divider https://github.com/trungnl2000/verilog.git
My design has 2 modules: controller and datapath.
Can you please explain more clearly for me how to specify position for each of them? Thank you.

A better place to talk about openlane fundamentals would be the skywater slack. Why don't you join and ask in the openlane channel: https://join.slack.com/t/skywater-pdk/shared_invite/zt-18steaudi-vFYEnjabWFspgA4_iiHkMw

@trungnl2000
Refer this discussion: https://skywater-pdk.slack.com/archives/C016UL7AQ73/p1652420311341329?thread_ts=1652387259.312559&cid=C016UL7AQ73
For Openlane unit test refer: https://github.com/The-OpenROAD-Project/OpenLane/blob/master/designs/manual_macro_placement_test/macro_placement.cfg

@vijayank88 The tag "discussion" is for discussing things with the community, not for questions.


backoff: export errors

LGTM. Please rebase latest master. There are some files are moved to another directory.


Error with nullable relation in the is and isNot clauses

Bug description
There is a type generation error when you have multiple models referencing another model, one with a nullable relation, one without.
The relation becomes non nullable for all.
We can't use where: { xxx: { isNot: null } } anymore.

How to reproduce
I made a minimal reproducible example here: https://github.com/Zenoo/prisma-null-bug
Expected behavior
We should still be able to use null in those clauses.
Prisma information

model User {
  id   String @unique @db.Uuid
  name String @unique @db.VarChar(255)
  foos Foo[]
  bars Bar[]
}

model Foo {
  id     Int     @id @default(autoincrement())
  name   String  @db.VarChar(255)
  user   User?   @relation(fields: [userId], references: [id])
  userId String? @db.Uuid
  bars   Bar[]
}

model Bar {
  id     Int     @id @default(autoincrement())
  name   String  @db.VarChar(255)
  foo    Foo?    @relation(fields: [fooId], references: [id])
  fooId  Int?
  user   User   @relation(fields: [userId], references: [id])
  userId String @db.Uuid
}

import { PrismaClient } from '@prisma/client'

const prisma = new PrismaClient()

async function main() {
  const foosWithoutUser = await prisma.foo.findMany({
    where: {
      user: { isNot: null }, // Error here
    },
  });

  console.log(foosWithoutUser);
}

main()
  .then(async () => {
    await prisma.$disconnect()
  })
  .catch(async (e) => {
    console.error(e)
    await prisma.$disconnect()
    process.exit(1)
  })

Environment & setup

OS: Windows
Database: PostgreSQL
Node.js version: v16.13.1

Prisma Version
4.12.0

Hey @Zenoo, this bug is no longer reproducible with the latest Prisma version. We're closing it now. Thanks for reporting.


SysFlow blog post

Signed-off-by: Vicente J. Jiménez Miras<EMAIL_ADDRESS>
What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind user-interface

/kind content

/kind translation

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area blog

/area documentation

/area videos

What this PR does / why we need it:
New blog post to show how SysFlow leverages Falco Libs and integrates with Falco Sidekick.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: vjjmiras
To complete the pull request process, please assign kris-nova after the PR has been reviewed.
You can assign the PR to them by writing /assign @kris-nova in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/lgtm
/approved

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: danpopnyc, vjjmiras
To complete the pull request process, please assign kris-nova after the PR has been reviewed.
You can assign the PR to them by writing /assign @kris-nova in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: 571e7ef853883f9750c3a73364c839b985ae4d69

/assign radhikapc

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: danpopnyc, vjjmiras
To complete the pull request process, please ask for approval from radhikapc after the PR has been reviewed.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

820724d Adding suggestions/corrections from @radhikapc
1c0538e Changed publishing date to 12/21/2021

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

LGTM label has been added.  Git tree hash: 8fa790bc91a8a9359cf173a4307833b68071e33a

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: danpopnyc, radhikapc, vjjmiras
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [radhikapc]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Error on bot start, after login.

Expected Behavior
BOT starts normally and goes on
Actual Behavior
Gives strange error
Your FULL config.json (remove your username, password, gmapkey and any other private info)

{
"websocket_server": false,
"heartbeat_threshold": 11,
"enable_social": true,
"live_config_update": {
"enabled": false,
"tasks_only": false
},
"tasks": [
{
"type": "TelegramTask",
"config": {
"enabled": false,
"master": null,
"alert_catch": ["all"]
}
},
{
"//NOTE: This task MUST be placed on the top of task list": {},
"type": "RandomAlivePause",
"config": {
"enabled": true,
"min_duration": "00:00:10",
"max_duration": "00:10:00",
"min_interval": "00:05:00",
"max_interval": "01:30:00"
}
},
{
"type": "HandleSoftBan"
},
{
"type": "RandomPause",
"config": {
"enabled": true,
"min_duration": "00:00:10",
"max_duration": "00:10:00",
"min_interval": "00:10:00",
"max_interval": "02:00:00"
}
},
{
"type": "CompleteTutorial",
"config": {
"enabled": true,
"// set a name": "Kaiju9K",
"nickname": "Kaiju9K"
}
},
{
"type": "CollectLevelUpReward",
"config": {
"collect_reward": true,
"level_limit": -1
}
},
{
"type": "IncubateEggs",
"config": {
"enabled": true,
"infinite_longer_eggs_first": false,
"breakable_longer_eggs_first": true,
"min_interval": 120,
"infinite": [2,5,10],
"breakable": [2,5,10]
}
},
{
"type": "UpdateLiveStats",
"config": {
"enabled": false,
"min_interval": 11,
"stats": ["username", "uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
"terminal_log": true,
"terminal_title": true
}
},
{
"type": "UpdateLiveInventory",
"config": {
"enabled": false,
"min_interval": 120,
"show_all_multiple_lines": false,
"items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
}
},
{
"type": "ShowBestPokemon",
"config": {
"enabled": true,
"min_interval": 61,
"amount": 4,
"order_by": "cp",
"info_to_show": ["cp", "ivcp", "dps", "hp"]
}
},
{
"type": "TransferPokemon",
"config": {
"enabled": true,
"min_free_slot": 6,
"transfer_wait_min": 4,
"transfer_wait_max": 6
}
},
{
"type": "NicknamePokemon",
"config": {
"enabled": false,
"nickname_above_iv": 0.9,
"nickname_template": "{iv_pct}_{iv_ads}"
}
},
{
"type": "EvolvePokemon",
"config": {
"enabled": true,
"//evolve all except Zubat and Rattata": "",
"//evolve_all": "-Zubat,-Rattata",
"evolve_all": "Zubat,Rattata,Pidgey,Paras,Golduck,Doduo",
"first_evolve_by": "cp",
"evolve_above_cp": 100,
"evolve_above_iv": 0.8,
"logic": "or",
"min_evolve_speed": 26,
"max_evolve_speed": 31,
"use_lucky_egg": false
}
},
{
"type": "RecycleItems",
"config": {
"enabled": true,
"min_empty_space": 15,
"max_balls_keep": 150,
"max_potions_keep": 50,
"max_berries_keep": 70,
"max_revives_keep": 70,
"item_filter": {
"Pokeball":       { "keep" : 100 },
"Potion":         { "keep" : 10 },
"Super Potion":   { "keep" : 20 },
"Hyper Potion":   { "keep" : 30 },
"Revive":         { "keep" : 30 },
"Razz Berry":     { "keep" : 100 }
},
"recycle_wait_min": 3,
"recycle_wait_max": 5,
"recycle_force": true,
"recycle_force_min": "00:01:00",
"recycle_force_max": "00:05:00"
}
},
{
"type": "CatchPokemon",
"config": {
"enabled": true,
"catch_visible_pokemon": true,
"catch_lured_pokemon": true,
"min_ultraball_to_keep": 5,
"berry_threshold": 0.35,
"vip_berry_threshold": 0.9,
"treat_unseen_as_vip": true,
"daily_catch_limit": 800,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
"nice_rate": 0.3,
"normal_rate": 0.1,
"spin_success_rate" : 0.6,
"hit_rate": 0.75
},
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 4,
"catch_wait_max": 6,
"berry_wait_min": 3,
"berry_wait_max": 6,
"changeball_wait_min": 3,
"changeball_wait_max": 6,
"newtodex_wait_min": 20,
"newtodex_wait_max": 31
}
}
},
{
"type": "SpinFort",
"config": {
"enabled": true,
"spin_wait_min": 3,
"spin_wait_max": 6
}
},
{ "type": "UpdateWebInventory",
"config": {
"enabled": true
}
},
{
"type": "MoveToFort",
"config": {
"enabled": true,
"lure_attraction": true,
"lure_max_distance": 1923,
"walker": "StepWalker",
"log_interval": 65
}
},
{
"type": "FollowSpiral",
"config": {
"enabled": true,
"diameter": 4,
"step_size": 69
}
}
],
"map_object_cache_time": 6,
"forts": {
"avoid_circles": true,
"max_circle_size": 49,
"cache_recent_forts": true
},
"pokemon_bag": {
"// if 'show_at_start' is true, it will log all the pokemons in the bag (not eggs) at bot start": {},
"show_at_start": true,
"// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {},
"show_count": false,
"// if 'show_candies' is true, it will show the amount of candies for each pokemon": {},
"show_candies": false,
"// 'pokemon_info' parameter define which info to show for each pokemon": {},
"// the available options are": {},
"// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {},
"pokemon_info": ["cp", "iv_pct"]
},
"walk_max": 4.10,
"walk_min": 2.09,
"alt_min": 498,
"alt_max": 1091,
"sleep_schedule": [
{
"time": "03:00",
"duration": "2:30",
"time_random_offset": "00:21",
"duration_random_offset": "00:31",
"wake_up_at_location": ""
},
{
"time": "09:11",
"duration": "2:59",
"time_random_offset": "00:21",
"duration_random_offset": "00:31",
"wake_up_at_location": ""
},
{
"time": "14:31",
"duration": "2:50",
"time_random_offset": "00:21",
"duration_random_offset": "00:31",
"wake_up_at_location": ""
},
{
"time": "18:49",
"duration": "2:41",
"time_random_offset": "00:21",
"duration_random_offset": "00:31",
"wake_up_at_location": ""
}
],
"gps_default_altitude": 8.0,
"replicate_gps_xy_noise": true,
"replicate_gps_z_noise": true,
"gps_xy_noise_range": 0.000126,
"gps_z_noise_range": 10.4,
"debug": false,
"test": false,
"walker_limit_output": false,
"health_record": true,
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 17,
"logging": {
"color": true,
"show_datetime": true,
"show_process_name": true,
"show_log_level": true
},
"catch": {
"any": {"candy_threshold" : 400 ,"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
"// Example of always catching Rattata:": {},
"// Rattata": { "always_catch" : true }
},
"release": {
"any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"},
"// Example of always releasing Rattata:": {},
"// Rattata": {"always_release": true},
"// Example of keeping 3 stronger (based on CP) Pidgey:": {},
"// Pidgey": {"keep_best_cp": 3},
"// Example of keeping 2 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_iv": 2},
"// Keep no more than 3 best IV pokemon for every pokemon type": {},
"// any": {"keep_best_iv": 3},
"// Discard all pokemon in bag except 100 pokemon with best CP": {},
"// all": {"keep_best_cp": 100},
"// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3},
"// Example of custom order of static criterion": {},
"// Zubat": {"keep_best_custom": "iv, cp, hp_max", "amount":2}
},
"vips" : {
"Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate": {},
"any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
"Lapras": {},
"Moltres": {},
"Zapdos": {},
"Articuno": {},
    "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
    "Mewtwo": {},
    "Dragonite": {},
    "Snorlax": {},
    "// Mew evolves to Mewtwo": {},
    "Mew": {},
    "Arcanine": {},
    "Vaporeon": {},
    "Gyarados": {},
    "Exeggutor": {},
    "Muk": {},
    "Weezing": {},
    "Flareon": {}
}

}

AND AUTH.JSON IF NEEDED
{     "auth_service": "google",     "username": "--private--",     "password": "--private--",     "location": "tokyo disneyland",     "favorite_locations":[         {"name": "--private--", "coords": "--private--,--private--"}     ],     "gmapkey": "--private--",     "encrypt_location": "",     "telegram_token": "" }
Output when issue occurred

2016-08-29 23:01:09,556 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2016-08-29 23:01:09,572 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2016-08-29 23:01:09,651 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
[2016-08-29 23:01:10] [SleepSchedule] [INFO] [next_sleep] Next sleep at 2016-08-30 03:09:08.073000
[2016-08-29 23:01:10] [PokemonGoBot] [INFO] [set_start_location] Setting start location.
Traceback (most recent call last):
File "pokecli.py", line 781, in
main()
File "pokecli.py", line 217, in main
report_summary(bot)
File "pokecli.py", line 265, in report_summary
metrics.capture_stats()
File "C:\Users\Broooooo\Desktop\GoFPokemonGo-Bot\pokemongo_bot\metrics.py", line 109, in capture_stats
response_dict = request.call()
File "C:\Users\Broooooo\Desktop\GoFPokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 223, in call
if not self.can_call():
File "C:\Users\Broooooo\Desktop\GoFPokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 124, in can_call
raise NoPlayerPositionSetException()
pgoapi.exceptions.NoPlayerPositionSetException
[2016-08-29 23:01:11] [sentry.errors] [ERROR] Sentry responded with an error: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\raven\transport\threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "C:\Python27\lib\site-packages\raven\transport\http.py", line 47, in send
ca_certs=self.ca_certs,
File "C:\Python27\lib\site-packages\raven\utils\http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "C:\Python27\lib\site-packages\future\backports\urllib\request.py", line 494, in open
response = self._open(req, data)
File "C:\Python27\lib\site-packages\future\backports\urllib\request.py", line 512, in _open
'_open', req)
File "C:\Python27\lib\site-packages\future\backports\urllib\request.py", line 466, in _call_chain
result = func(*args)
File "C:\Python27\lib\site-packages\raven\utils\http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "C:\Python27\lib\site-packages\future\backports\urllib\request.py", line 1284, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "C:\Python27\lib\httplib.py", line 1057, in request
self._send_request(method, url, body, headers)
File "C:\Python27\lib\httplib.py", line 1097, in _send_request
self.endheaders(body)
File "C:\Python27\lib\httplib.py", line 1053, in endheaders
self._send_output(message_body)
File "C:\Python27\lib\httplib.py", line 895, in _send_output
msg += message_body
File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte
[2016-08-29 23:01:11] [sentry.errors.uncaught] [ERROR] [u'NoPlayerPositionSetException', u'  File "pokecli.py", line 781, in ', u'  File "pokecli.py", line 217, in main', u'  File "pokecli.py", line 265, in report_summary', u'  File "C:\Users\Broooooo\Desktop\GoFPokemonGo-Bot\pokemongo_bot\metrics.py", line 109, in capture_stats', u'  File "C:\Users\Broooooo\Desktop\GoFPokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 223, in call', u'  File "C:\Users\Broooooo\Desktop\GoFPokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 124, in can_call']
Something went wrong and the bot needed to be restarted. Please investigate the cause.

Steps to Reproduce
Just start the bot
Other Information
OS: win10
Branch: master
Git Commit: 5eb9fb2447accd252b1cb95433598116425583d5
Python Version: 2.7.12(32bit)
Any other relevant files/configs (eg: path files)
I really didn't know how to rename and where to put the encrypt dll/so(the instrucions are poorly organized and not explicit) so i've put all their versions and names in the root directory, i don't think that is the problem tho.

Getting similar error. Yesterday I got this error:
2016-08-29 19:34:34,328 [PokemonGoBot] [INFO]
Traceback (most recent call last):
File "pokecli.py", line 781, in
main()
File "pokecli.py", line 217, in main
report_summary(bot)
File "pokecli.py", line 265, in report_summary
metrics.capture_stats()
File "/home/pi/PokemonGo-Bot-Dev-7/PokemonGo-Bot/pokemongo_bot/metrics.py", line 110, in capture_stats
refresh_inventory(response_dict)
File "/home/pi/PokemonGo-Bot-Dev-7/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1345, in refresh_inventory
_inventory.refresh(data)
AttributeError: 'NoneType' object has no attribute 'refresh'
I did a full reinstall of dev. Error went away. Stopped bot over night. Launched again this morning and yet again the same error.
[2016-08-30 10:35:08]
Traceback (most recent call last):
File "pokecli.py", line 781, in
main()
File "pokecli.py", line 217, in main
report_summary(bot)
File "pokecli.py", line 265, in report_summary
metrics.capture_stats()
File "/home/pi/PokemonGo-Bot-Dev-29/PokemonGo-Bot/pokemongo_bot/metrics.py", line 110, in capture_stats
refresh_inventory(response_dict)
File "/home/pi/PokemonGo-Bot-Dev-29/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1345, in refresh_inventory
_inventory.refresh(data)
AttributeError: 'NoneType' object has no attribute 'refresh'
Wondering if there's a file being written regaridng the inventory than when read causes the crash but when doesn't exist is ok?

i really don't know anything about programming, do you use windows? @azraelppuk

armv7l GNU/Linux on raspberry pi

did a fresh 'git pull' and it now works.

I have same problem run at ubuntu 15.

@ivanli88 Did doing the following help:
git pull
git submodule update --init --recursive
git submodule foreach git pull origin master
source bin/activate (-- do not skip this step --)
pip install -r requirements.txt --upgrade
pip install -r requirements.txt

@mjmadsen Many thanks for your help,  I got an error. "Too many levels of symbolic links"
root@ubuntu:/PokemonGo-Bot# git pull
Already up-to-date.
root@ubuntu:/PokemonGo-Bot# git submodule update --init --recursive
Submodule path 'web': checked out '6ba5609c6151507b5b832a74e471b6b7b1a182c9'
root@ubuntu:/PokemonGo-Bot# git submodule foreach git pull origin master
Entering 'web'
From https://github.com/OpenPoGo/OpenPoGoWeb

branch            master     -> FETCH_HEAD
Updating 6ba5609..607397a
Fast-forward
README.md                         |   2 ++
config/userdata.js.example        |   6 ++++++
css/main.css                      |   3 ++-
image/forts/img_pokestop_lure.png | Bin 0 -> 4960 bytes
index.html                        |  18 +++++++++---------
js/main.js                        |  78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
6 files changed, 89 insertions(+), 18 deletions(-)
create mode 100644 image/forts/img_pokestop_lure.png
root@ubuntu:/PokemonGo-Bot# source bin/activate
(PokemonGo-Bot) root@ubuntu:/PokemonGo-Bot# pip install -r requirements.txt --upgrade
-bash: /PokemonGo-Bot/bin/pip: /PokemonGo-Bot/bin/python2: bad interpreter: Too many levels of symbolic links

@mjmadsen ran all those commands, except source activate bin because it doesn't work on windows.
Do anyone know how to renae the encrypt dll to put it in the root dir?

update from ubuntu 15.04 to 15.10  , it's ok now.

Currently i'm installing ubuntu 16.04.1 LTS, hope there will go straighter

@Creuqe Get it working?

@mjmadsen This laptop isn't dualbooting ubuntu at all


:memo: update readme so that links work from npm

Currently links are broken at https://www.npmjs.com/package/radium :rose:

Only issue with this is that the readme is then tied to master, so if you have a change in another branch you can't use the links. I guess I'd rather have NPM work correctly, though. Thanks!


[FEAT] Enable specifying models path via UI, possibly model map

I'm exploring various LM hosting options (ollama, ooba webui, lm studio, lollms, koboldcpp, etc) and for the most part I'm able to have them all share models in a single folder (/opt/ai/models and e:/models) but I end up having to fiddle with symlinks for LM Studio and Lollms. For ollama I just run it in a docker container and bindmount the models folder for it.
It would be great if the huggingface binding, at least, could take a path to the models directory, if not Elf. Even then, it seems like broader support might call for the introduction of a reasonably simple "modelmap.yaml" type file which lets you (at least) specify the user-facing model name, the model file or dir
- mistral-7b-instruct:
  - presents-as: Mistral-7B-Instruct-v0.1
  - folder: /opt/ai/models/TheBloke/Mistral-7B-Instruct-v01-GGUF  # optional
  - files:
    - tag: Q5_K_M
      file: mistral-7b-instruct-v0.1.Q5_K_M.gguf

- claude2:
  - file: /opt/ai/models/TheBloke/claude2-alpaca-13B-GGUF/claude2-alpaca-13b.Q5_K_M.gguf

if I try to enable the huggingface binding and then specify a full local path without a structured path, e.g. /opt/ai/models/claude2-alpaca-13b.Q5_K_M.gguf:
ERROR:Lollms-WebUI:Exception on /add_reference_to_local_model [POST]
Traceback (most recent call last):
  File "/home/oliver/miniconda3/envs/lollms/lib/python3.10/site-packages/flask/app.py", line 1455, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/oliver/miniconda3/envs/lollms/lib/python3.10/site-packages/flask/app.py", line 869, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/oliver/miniconda3/envs/lollms/lib/python3.10/site-packages/flask_cors/extension.py", line 176, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/oliver/miniconda3/envs/lollms/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/oliver/miniconda3/envs/lollms/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/opt/ai/lollms-webui/app.py", line 1452, in add_reference_to_local_model
    self.config.reference_model(path)
  File "/opt/ai/lollms-webui/lollms_core/lollms/main_config.py", line 196, in reference_model
    folder_path = self.searchModelPath(model_name)
  File "/opt/ai/lollms-webui/lollms_core/lollms/main_config.py", line 145, in searchModelPath
    for mn in self.models_folders:
  File "/opt/ai/lollms-webui/lollms_core/lollms/config.py", line 298, in __getattr__
    return self.config[key]
KeyError: 'models_folders'

Hi.
In lollms I classify models by type. You can use the reference file to link to your models without copying them. I can add a function where you give it the path to a folder and it creates references to all files in it. Does that help?

That would be great, by reference file do you mean symlink? Will that work on Windows? (I work with lin/mac/win and wsl)

Also testing the app, I have all my models in a folder on a specific drive, would like to set Lollms to use the same model folder while keeping the rest of the data in its own folder


HashPartitionResolver gives different results when hosted in a 32 or 64-bits process

When hosted in a 32-bit or a 64-bit process (eg IIS Express), the DocumentDB client returns different values for HashPartitionResolver.ResolveForRead.
We consider this a bug as we expect the DocumentDB database to be independent of the underlying architecture of our client apps and hosting servers (local debugging, On-Premise server, Azure Web App, etc.).

32-bit process, finds the second of two collections:

Environment.Is64BitProcess; // false
_partitionResolver.ResolveForRead("CFR201601192F81OGO"); // dbs/T6t8AA==/colls/T6t8ANdyZQE=/

64-bit process, finds the first of two collections:

Environment.Is64BitProcess; // true
_partitionResolver.ResolveForRead("CFR201601192F81OGO"); // dbs/T6t8AA==/colls/T6t8ALDFcwA=/

SDK client version used: 1.11.3.

Thanks for the report. We will look into it.
In the same time,  HashPartitionResolver is for client side partitioning and is deprecated. We currently support the server side automatic partitioning (Partitioned Collection), can you move to Partitioned Collection?

@clementpuell This was a known issue and the reason why we couldn't fix this after we knew about it as it would be a breaking change now for existing applications relying on the new hash value that is platform independent. As Ming mentioned, client side partitioning is marked as deprecated as you would have noticed in the documentation. Please use the server side partitioning feature now. That way you will not have to maintain different collections in your app. Server side partitioning is based on architecture independent hash based partitioning. Let us know if that would be fine for your case.

Thanks for the answers.
Yes I noticed that client-side partitioning is deprecated but server-side partitioning is also much more expensive (due to a minimum of 10 000 RU/s per partition). We will just work our way around this bug for now.
Do you confirm that client-side partitioning won't be maintained? Will the feature be removed in a future version?

@clementpuell We would be soon releasing the support for lower RUs for partitioned collections which will make it down from 10,100 to 2,600. Please email askdocdb at microsoft dot com if you are interested in it. Also, you mentioned that current minimum is 10,000 per partition. Just wanted to clarify that its 10,000 for the whole collection(which internally includes many partitions), so per partition RUs will be much lower(10,000 equally divided for all partitions).
Yes, I can confirm that client-side partitioning will not be maintained but we are keeping it for backward compatibility and we may remove it in a next major version bump, so I'd not take a dependency on it.
Also, server-side partitioning is the way to go since you don't have to manage the collections yourself and it's automatically take care for you as your data grows.


DecisionTreeClassifier is incompatible with TypeScript strict option

I'm submitting a ...

[x] bug report

Summary
When built with compiler options strict set to true, the following error occurs:
node_modules/machinelearn/tree/tree.d.ts:97:5 - error TS2416: Property 'predict' in type 'DecisionTreeClassifier' is not assignable to the same property in base type 'IMlModel<string | number | boolean>'.
  Type '(X?: (string | number | boolean)[][] | undefined) => any[]' is not assignable to type '(X: (string | number | boolean)[] | (string | number | boolean)[][]) => (string | number | boolean)[] | (string | number | boolean)[][]'.
    Types of parameters 'X' and 'X' are incompatible.
      Type '(string | number | boolean)[] | (string | number | boolean)[][]' is not assignable to type '(string | number | boolean)[][] | undefined'.
        Type '(string | number | boolean)[]' is not assignable to type '(string | number | boolean)[][]'.
          Type 'string | number | boolean' is not assignable to type '(string | number | boolean)[]'.
            Type 'string' is not assignable to type '(string | number | boolean)[]'.

97     predict(X?: Type2DMatrix<string | boolean | number>): any[];

machinelearnjs Version: 2.1.3
TypeScript Version: 3.5.2
Source:
import { DecisionTreeClassifier } from "machinelearn/tree";

const features = ["color", "diameter", "label"];
const decision = new DecisionTreeClassifier({ featureLabels: features });

const X = [["Green", 3], ["Yellow", 3], ["Red", 1], ["Red", 1], ["Yellow", 3]];
const y = ["Apple", "Apple", "Grape", "Grape", "Lemon"];
decision.fit(X, y);
decision.printTree(); // try it out yourself! =)

decision.predict([["Green", 3]]); // [ "Apple" ]
decision.predict(X); // [ [ "Apple" ], [ "Apple", "Lemon" ], [ "Grape", "Grape" ], [ "Grape", "Grape" ], [ "Apple", "Lemon" ] ]

The error is caused by an extra ? in tree\tree.d.ts:
Current:
predict(X?: Type2DMatrix<string | boolean | number>): any[];

If the ? is removed, the error will not occur:
predict(X: Type2DMatrix<string | boolean | number>): any[];

Hey @FranklinWhale , thanks for reporting this. I will take a look at it soon