proposal: Go 2: add mandatory constructors for named type

Problem
Say we are designing a fraction type:
type Frac struct {
	n int   //numerator
	d int   //denominator, mustn't be 0
}

According to the math definition, Frac.d must't be zero, so we need implement a New function in the package to serve as its constructor:
func New(n, d int) frac {
	if d == 0 {
		panic("denominator can not be zero")
	}
	return frac{n, d}
}

but the New function can't avoid misusing, such as
var f frac
or
f := frac{x, 0}
which are illegal fractions.
In short, the xxx.New() functions is just advisory constructors, but sometimes we need mandatory
constructors.
Proposal
This is a backward-compatible proposal to introduce new init functions to named types as its constructors. When initiate new instance of some type, if the type has no init function, the go compiler initiate it with its default ZERO value, but if the type has any explicit init function, the compiler must call its matched constructor to initiate the instance.

From what i understood I do not think it is a backwards compatible change for types that already have an init function defined before the new language change as code that does not call the init function after the change to create an instance of the type will not compile anymore.

Related to #21737.

 Having var f frac execute arbitrary code is not intuitive to me

I think it's great that you are trying to ensure the internal consistency of instances of your Frac struct.  In Go we try to make default (zero initialised) instances be valid but this is not always possible.
However there is a mechanism to do what you want already in Go, assuming Frac is in its own package, which it probably should be (even if just an internal package).
You simply need to make the type unexported from the package.  Then have the exported "constructor" return an instance of the type.  For example:

package frac
type frac struct { n, d int }
func New(n, d int) frac { ...

Then from another package:

f := frac.New(1, 2)
f := frac.frac{}  // illegal

This is a backward-compatible proposal to introduce new init functions to named types as its constructors. When initiate new instance of some type, if the type has no init function, the go compiler initiate it with its default ZERO value, but if the type has any explicit init function, the compiler must call its matched constructor to initiate the instance.

This seems like overkill for this specific use-case. What you're asking for has the same problems as operator overloading. Wouldn't it be easier to just allow the user to specify alternative defaults for a type? For example,
type Frac struct {
  n int
  d int = 1
}

Now the 'zero' value for Frac.d is 1 instead of 0.
I'm not really arguing in favor of this, for the record; things like this have been proposed and shot-down before, if I remember right. I'm just trying to provide a simpler alternative that doesn't involve hidden functions getting run without the user explicitly asking for it.

When this has mattered for me, I end up doing something like:
type T struct {
    x, y                          int
    userProperlyCalledConstructor bool
}

func NewT(x, y int) *T { return &T{x, y, true} }

func (t *T) M() {
   if !t.userProperlyCalledConstructor {
      panic("you didn't use the NewT constructor")
   }
   // ....
}

We appreciate the problem that this issue is trying to solve.  It might be nice to have better ways to ensure that a type can only be set to valid values.  But this particular approach of requiring a constructor to run implicitly does not seem to fit the spirit of the language.  It's also not clear how to handle composite literals with field keys, as in Frac{d:0}.  And it's not clear how to handle composite literals of more complex types, in which some fields of the outer struct are themselves structs, etc.

Has there been consideration of defined-type default initializers?
If not would that merit a separate proposal?
type T struct {
   i int
   s []byte
}
init T{i: 42, s: make([]byte, 21)} // allow constants and make(T, constant)

type I int
init I(1)
default I(1) // alternative keyword

func f() {
   var t T // t.i == 42 && len(t.s) == 21
}


Disable fading of FancyZone boxes

Provide a description of the new feature / enhancement
No FancyZone Fading
In RDP (Remote Desktop) sessions over low bandwith connections any visual effect slows the workflow down. Therefore I propose a configuration option to disable the fade-in/-out effects in FancyZones.

@tryptichon
this issue is tracked in https://github.com/microsoft/PowerToys/issues/1911


use as library, after render, mathjax doesn't render latex

Hello, I'm trying to use texme as library in web page, I follow steps in the readme
after calling texme.render(), i got rendered html string:

Foo $$ {a}_{1} {a}_{2} $$

i put it in a div, however, the latex string  $$ {a}_{1} {a}_{2} $$ is not rendered by mathjax, i checked in inspecter, it's loaded. also i tried setting protectMath to true or false, it's the same
did i missing anything? how to render latex using texme.render() in web page?
thanks!

applogies for duplicate submit, my netwok was unstable


Setting the source address of an AXFR

Hello! I hope an issue is the right avenue for this request/question. If not feel free to point me in the right direction and shame me appropriately.
I'd like to essentially do this:
https://www.socketloop.com/tutorials/golang-set-up-source-ip-address-before-making-http-request
But for AXFRs. There is a use case where you might want to send your AXFR (or regular query) out of a specific interface or IP on a box that has permission to poke through the firewall.
I believe this can be accomplished by setting LocalAddr on the Dialer that eventually gets used in Dial, or DialTimeout: http://golang.org/src/net/dial.go?s=5630:5708#L42
I'm trying to figure out the best way to do this in this library. Perhaps you can already do it, and I just don't know how :smile:
What I've come up with:
Add a DialTimeoutSource in client.go that looked something like:
// DialTimeoutSource acts like Dial but takes a timeout and a source.
func DialTimeoutSource(network, address string, timeout time.Duration, source Addr) (conn *Conn, err error) {
	conn = new(Conn)
	d := net.Dialer{Timeout: timeout, LocalAddr: source}
	conn.Conn, err = d.Dial(network, address)
	if err != nil {
		return nil, err
	}
	return conn, nil
}

and make use of that in func (t *Transfer) In in xfr.go, by appending a Source field to the Transfer struct.
Something like:
// A Transfer defines parameters that are used during a zone transfer.
type Transfer struct {
	*Conn
....
	tsigTimersOnly bool
	Source         *Addr            // A source IP for the transfer
}

// Think we need to away to stop the transfer

// In performs an incoming transfer with the server in a.
func (t *Transfer) In(q *Msg, a string) (env chan *Envelope, err error) {
	timeout := dnsTimeout
	source := ""
	if t.DialTimeout != 0 {
		timeout = t.DialTimeout
	}
	if t.Source != nil {
		source = t.Source
	}
	t.Conn, err = DialTimeoutSource("tcp", a, timeout, source)

This doesn't solve the problem generally for other types of queries. I'll probably end up making this type of change for my personal use, and I'd be happy to submit a pull request. But if there's something better, more general, or cleaner that someone more familiar with the library could suggest, I'd be happy to implement that as well.
I'd love to know any ideas anyone has, or if I should do something different, or just sod off :rocket:
Thank you @miekg or anyone else that has ideas!

You can create your own Conn on use that in Go dns, but I don't think there is support for this when doing a Transfer.
Maybe it is an idea to pull a net.Dailer into go dns that will give you the flexibility you need?

Adding a transferConn made actually be a nicer idea. Also mirrors
ExchangeConn which is nice.
On 22 Sep 2015 03:12, "Tim Simmons"<EMAIL_ADDRESS>wrote:

I'd like to essentially do this:
https://www.socketloop.com/tutorials/golang-set-up-source-ip-address-before-making-http-request
But for AXFRs. There is a use case where you might want to send your AXFR
(or regular query) out of a specific interface or IP on a box that has
permission to poke through the firewall.
I believe this can be accomplished by setting LocalAddr on the Dialer
that eventually gets used in Dial, or DialTimeout:
http://golang.org/src/net/dial.go?s=5630:5708#L42
I'm trying to figure out the best way to do this in this library. Perhaps
you can already do it, and I just don't know how [image: :smile:]
What I've come up with:
Add a DialTimeoutSource in client.go that looked something like:
// DialTimeoutSource acts like Dial but takes a timeout and a source.func DialTimeoutSource(network, address string, timeout time.Duration, source Addr) (conn *Conn, err error) {
conn = new(Conn)
d := net.Dialer{Timeout: timeout, LocalAddr: source}
conn.Conn, err = d.Dial(network, address)
if err != nil {
return nil, err
}
return conn, nil
}
and make use of that in func (t *Transfer) In in xfr.go, by appending a
Source field to the Transfer struct.
Something like:
// A Transfer defines parameters that are used during a zone transfer.type Transfer struct {
*Conn
....
tsigTimersOnly bool
Source         Addr            // A source IP for the transfer
}
// Think we need to away to stop the transfer
// In performs an incoming transfer with the server in a.func (t *Transfer) In(q *Msg, a string) (env chan *Envelope, err error) {
timeout := dnsTimeout
source := ""
if t.DialTimeout != 0 {
timeout = t.DialTimeout
}
if t.Source != "" {
source = t.Source
}
t.Conn, err = DialTimeoutSource("tcp", a, timeout, source)
This doesn't solve the problem generally for other types of queries. I'll
probably end up making this type of change for my personal use, and I'd be
happy to submit a pull request. But if there's something better, more
general, or cleaner that someone more familiar with the library could
suggest, I'd be happy to implement that as well.
I'd love to know any ideas anyone has, or if I should do something
different, or just sod off [image: :rocket:]
Thank you @miekg https://github.com/miekg or anyone else that has ideas!
—
Reply to this email directly or view it on GitHub
https://github.com/miekg/dns/issues/264.

So the Transfer struct does have a T.conn
// A Transfer defines parameters that are used during a zone transfer.
type Transfer struct {
	*Conn
	DialTimeout    time.Duration     // net.DialTimeout, defaults to 2 seconds
	ReadTimeout    time.Duration     // net.Conn.SetReadTimeout value for connections, defaults to 2 seconds
	WriteTimeout   time.Duration     // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds
	TsigSecret     map[string]string // Secret(s) for Tsig map[<zonename>]<base64 secret>, zonename must be fully qualified
	tsigTimersOnly bool
}

What if I changed Transfer.in to optionally use a Conn if someone sets it before they call transfer.In
So it'd be this in xfr.go:
// In performs an incoming transfer with the server in a.
func (t *Transfer) In(q *Msg, a string) (env chan *Envelope, err error) {
	timeout := dnsTimeout
	if t.DialTimeout != 0 {
		timeout = t.DialTimeout
	}
        if t.Conn != nil {
	    t.Conn, err = DialTimeout("tcp", a, timeout)
            if err != nil {
	            return nil, err
	        }
        }

So that way someone could set the Conn like:
transfer := new(dns.Transfer)
message := new(dns.Msg)
message.SetAxfr(zone_name)
d := Dialer{Timeout: timeout, LocalAddr: somevar}
transfer.Conn, err = d.Dial(network, address)
channel, err := transfer.In(message, *master)

Looks nice. Also I need to take back my comment on ExchangeConn as I deprecated that :) The comment says mimic it with:
//      co := &dns.Conn{Conn: c} // c is your net.Conn
//      co.WriteMsg(m)
//      in, _  := co.ReadMsg()
//      co.Close()

I think your proposal matches that (somewhat) nicely.
Please open a PR with this change.


Discussion: annotation / auto-conversion / post-processing GraphQL responses into domain types?

This is more of a question and discussion rather than a bug.
Let's say I have a custom type in my model like this:
open System

type ProductID =
  | Apple of Guid
  | Banana of Guid
  | Cherry of Guid
  with
    member this.ToString () =
      match this with
      | Apple g -> sprintf "apple/%A" g
      | Banana g -> sprintf "apple/%A" g
      | Cherry g -> sprintf "apple/%A" g

module ProductID =

  let tryParse (x : string) : ProductID option =
    // match x.Split([| '/')
    // etc ...

All good idiomatic F#.
Now, in my GraphQL endpoint, the product ID is encoded as GraphQL ID, which is just a string.
So for a query like this:
query {
  products {
    id
    price
    # ...
  }
}

GraphQL might return this:
{
  "products": [
    {
      "id": "apple/157be5aa-d3c8-4894-befb-a739251a57bb",
      "price": 60
    },
    {
      "id": "banana/11751f22-7908-44c0-bb3b-59d9eddd0457",
      "price": 70
    }
  ]
}

Snowflaqe will (correctly) generate F# code that is something like this:
type Product =
  {
    id : string
    price : int
    // ...
  }

type Query =
  {
     products : Product list
  }

I want to consume this response in a Fable app, but now I have a choice to make. The generated Snowflaqe code has product.id as a string, but ideally I would have a ProductID.
Right now, the options I can see are:

Use the "stringy" ID, but miss out on features of the F# type system. This gives similar safety to JS code, so perhaps not much is lost.
Parse the ID on the fly when I need to match on it, like this id |> ProductID.tryParse |> Option.get. This might fail at run-time, but only in predictable places.
Write another type for Query that has everything properly parsed and do the parsing immediately after the fetch step:

asyncResult {
  let client = GraphQL.GraphqlClient "/graphql"
  let! resultUntyped = client.Query.products ()
  let! resultTyped = parseResult resultUntyped

  return resultTyped
}

This give ultimate safety, but it's lots of extra code.
The ProductID is just an example of this problem, but there are many other cases where it appears. I am currently using the "parse on-the-fly" approach in my own code.
Perhaps there should be some way of configuring Snowflaqe to integrate the parsing in the fetch process? Or maybe I am missing a simple pattern for solving this? I'm not sure what this would look like, so I thought it would be best to start a discussion here.
It might also be interesting to leverage Thoth.Json decoders here, since I usually already have those for other purposes.

Hello @njlr, this is a very good question:

Perhaps there should be some way of configuring Snowflaqe to integrate the parsing in the fetch process?

Currently there isn't any way because we rely on Fable.SimpleJson to automatically and exactly parsing the JSON into the generated types without needing any configuration. In fact, SimpleJson understand GraphQL types and how they should be mapped (for example a GraphQL interface or union maps to a discriminated union of record type for each case).
Now SimpleJson doesn't have a way to override its way of parsing. I believe it is possible but it can be very complicated. Besides changing the automatic parsing behaviour, there needs to be also a way to tell Snowflaqe how to read use the custom converters which complicate the situation even more. Another complication is also making the fsharp target follow these custom generators (Snowflaqe not only generates clients for Fable but also for .NET/F# consumers).
As for Thoth.Json, it is possible to use it and instead generate F# encoders and decoders for each and every generated GraphQL type but this too has downsides:

It will generate a huge amount of code because Snowflaqe normally generated lots of small types which means it makes the bundle size bigger
It requires a lot of work to get it right.

I think the "on-the-fly" method of your code is the way to go because you can assume the data coming from the GraphQL client is always well-typed and the data always comes through as exact as it can be. If you customize the parsing, you lose this assumption.


Unable to start device provider server.

I am planning to implement iOS device farm. Setup the GADS UI while trying to start the device provider server, getting below error,

I am using macOS and followed the instructions in doc for setting up. I am planning to test 1 android and 1 iOS device.

Yeah, my bad for this, I need to add a check for that folder and create it programatically. Just do mkdir logs in the provider repo or just create the logs folder manually and re-run the provider. You might encounter other issues like this - contact me on Discord  for faster communication if you want :)

Also you are not going to get a lot of output in the Terminal, for logs/errors you should look inside the provider.log file after the provider starts

@shamanec Thanks for the quick response mate. It worked like a charm.. Would love to collaborate with you for enhancing this framework. Will reach out to you in discord sooner.

Hi @shamanec Your discord link got expired. Can you share a new one

@Code-P6 I wonder why, when I click it, it points to my profile 😓 You can try and find me by<PHONE_NUMBER>70088704 userID or shamanec :)


run go mod tidy

oops on previous pr

Current dependencies on/for this PR:

main

PR #85   👈

This stack of pull requests is managed by Graphite.


Fix for #186. Implemented custom responds to selector that works fine with x64 simulators on iOS 9

Fixes #186

Good fix, thank you
When it can be merged ?

Actually fix doesn't work. For example it is not possible to define keyboard type for inputs field
also sometimes app crashes with error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Class UIView doesn't fit for subclassing.'

Is it not working with 64 bit simulator or any device?
Regarding assertion in UIView I am not quite sure if it is related to the fix in anyway.

Is it not working with 64 bit simulator or any device?
Regarding assertion in UIView I am not quite sure if it is related to the fix in anyway.

Is it not working with 64 bit simulator or any device?
Regarding assertion in UIView I am not quite sure if it is related to the fix in anyway.

The project seems to be dead, so it might not be ever merged.

Yes, you are right. My issue was not related to this fix


GPU name filter validation in dedicate node should allow special char

Description
GPU'S VENDOR NAME and GPU'S DEVICE NAME Filter input validation in dedicate node should allow some special character as GPU card name can contain them like [ ] / , .
Logs/Alerts

fixed and handled in dedicated node pr

Verified,
Devnet, 28d6c07.
The filter validation now accepts special char [ ] / - , .
https://gridproxy.dev.grid.tf/nodes?rentable=true&status=up&ret_count=true&size=10&page=1&gpu_vendor_name=amd [gpu/test]&gpu_device_name=amd [gpu/test]

TC2230 - Filter dedicated nodes by GPU's device name
TC2229 - Filter dedicated nodes by GPU's vendor name


How to distinguish between vanilla RFC 9134 and ST 2110-22 with JPEG XS?

The spec currently makes ST 2110-22 compliance a MUST. We've been asked whether this NMOS stream mapping would work with vanilla RFC 9134.
I thought we'd be able to distinguish this case by the presence or absence of the SSN (SMPTE Standard Number) format-specific parameter... But, I actually don't see SSN in ST 2110-22. It's in ST 2110-20 which requires e.g. SSN=ST2110-20:2017.
The current example SDP file is almost certainly wrong because it has SSN=ST2110-20:2017 here:
https://github.com/AMWA-TV/nmos-jpeg-xs/blob/80307b78875510bd0dc2a3e6d0cd1db4cc9d19d6/examples/jpeg-xs.sdp#L9
I notice that VSF TR-08 includes SSN=ST2110:22:2019 in its example, which would be perfect if ST 2110-22 required that!

The next revision of ST 2110-22 may introduce optional SSN format-specific parameter, but I realised that TP ("Type Parameter", the name explains everything, doesn't it?) is mandatory and that clearly indicates that the traffic shaping requirements of ST 2110 are in effect. Therefore if it's necessary, the absence of this parameter can be used to distinguish vanilla RFC 9134 JPEG XS.
We already have an NMOS Receiver capability to match this against, urn:x-nmos:cap:transport:st2110_21_sender_type. But it's not indicated on the Sender-side in the NMOS data model, only via the Sender's SDP file. This may be another reason to consider the need for a Sender Attributes register, discussed in https://github.com/AMWA-TV/nmos-parameter-registers/issues/32#issuecomment-963018629.


Add support for ELBv2

Blog Post
Docs

We're looking forward to a PR that supports the new appliation load balancers, but it doesn't look like the api even supports this yet. The docs still reference the old API rev.  We'll have to wait and see when Amazon releases their gem with updated support

Perhaps I'm misinterpreting the response but it definitely looks like the new version of aws-sdk supports ELBv2:
This target group is one that I made through the console:
$ pry -raws-sdk
[1] pry(main)> elbv2 = Aws::ElasticLoadBalancingV2::Client.new
=> #<Aws::ElasticLoadBalancingV2::Client>
[2] pry(main)> elbv2.describe_target_groups
=> #<struct Aws::ElasticLoadBalancingV2::Types::DescribeTargetGroupsOutput
 target_groups=
  [#<struct Aws::ElasticLoadBalancingV2::Types::TargetGroup
    target_group_arn="arn:aws:elasticloadbalancing:us-east-1:REDACTED:targetgroup/test-target-group/REDACTED",
    target_group_name="test-target-group",
    protocol="HTTP",
    port=80,
    vpc_id="vpc-REDACTED",
    health_check_protocol="HTTP",
    health_check_port="traffic-port",
    health_check_interval_seconds=30,
    health_check_timeout_seconds=10,
    healthy_threshold_count=10,
    unhealthy_threshold_count=2,
    health_check_path="/",
    matcher=#<struct Aws::ElasticLoadBalancingV2::Types::Matcher http_code="200">,
    load_balancer_arns=
     ["arn:aws:elasticloadbalancing:us-east-1:REDACTED:loadbalancer/app/test-app-lb/REDACTED"]>],
 next_marker=nil>

I haven't tried making any modifications yet but I have no reason to believe they won't work.
Unfortunately of course there are no ruby docs (yet?) for the new SDK but you can sort of piece your way through the commands by reading the model JSON.
PS. I'm actually working on a PR right now so if I can manage to get it done in a reasonable amount of time I'll try to address my own issue. ;-)

@eherot did you happen to get anywhere with your PR? Thanks!

@iennae I got some work done. Here's the WIP PR if you want to try to contribute to it in the mean time: #265

@eherot Do you have more updates to your PR?

Negative. Sorry!

This would be very helpful for instances managed by OpsWorks since it doesn't support ALB (ELB v2) yet. Looking forward to this feature.

Any update on when ALB's will be supported?


Propose using https://github.com/fsouza/go-dockerclient

We currently use https://github.com/samalba/dockerclient to talk to Docker.  I propose we switch to https://github.com/fsouza/go-dockerclient.  The advantage of https://github.com/fsouza/go-dockerclient is that it has full coverage of the Docker API and is written in a style that is forward compatible.  The @fsouza client seems more active from a larger community perspective where as the samalba client is largely contributed and maintained by maintainers of other Docker projects.  While samalba client is used in other projects like swarm (and machine?) the usage of the Docker API seems to be quite a small subset.  Furthermore I've found @fsouza to be very responsive to merging PRs where as the samalba client does seem to take much longer.

:+1:

:+1:  for fsouza/go-dockerclient

It does seem to be a more active project. Works for me.

Works for me too 🐶.

Fixed in #78


Add CanadianFlags-1.0.ckan

I found my flag pack, where's your flag at Australia? :sunglasses:
@pjf @RichardLake @techman83
(I did actually find a pack but it seems like the download is broken)

Blame Canada!


Document files and directories in production deployment

[x] What is /data/tmp for?
[x] Describe the files/directories within /var/www

The /data/kingfisher-collect symlink is used by env files. Can delete once new env files are deployed by OCP/Dogsbody.

/data/tmp - can be removed, there is no special functionality tied to that
/var/www - nothing lives there - besides .htpasswd for the current, testing domain. You want to remove this anyways.

Thanks! There was something there, but you already deleted it according to Slack :)


chore(main): release 0.72.8

:robot: I have created a release beep boop
0.72.8 (2024-09-11)
Bug Fixes

Datasets: increase slug size and only add suffix if needed (#802) (93d4954)
replaces dot with dash for bucket creation (bd19d4d)
Statics: Remove cors decorator (#809) (39d5ed6)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

0.72.8
:sunflower:


Improved rendering of Barcode128 labels, modes

Adds the Mode property to the ZplBarcode128 class.
Correctly parses empty fields by adding an optional default value to the ConvertBoolean method.
Displays the presentation line either below or above the barcode, as specified by the data fields.
Adds a FontHelper method to convert from SkiaSharp.SKFont to System.Drawing.Font, as required by BarcodeLib.
Adds support for mode A, and partial support for mode N.

Known issues:

No support for modes D or U.
In mode N only start sequences are handled. Further escape sequences within the code are not correctly handled.

Tests:
Long numeric barcode, mode N:
^XA
^FO60,1060^BY3,2^BCN,200,Y,Y,N,N^FD1013486130441141878600786403467495^FS
^XZ

Correct result: Type B is selected, barcode overflows container.

Long numeric barcode, mode A:
^XA
^FO60,1060^BY3,2^BCN,200,Y,Y,N,A^FD1013486130441141878600786403467495^FS
^XZ

Correct result: Type C is selected, barcode fits container.

Long numeric barcode, mode N with Type C start sequence (>;):
^XA
^FO60,1060^BY3,2^BCN,200,Y,Y,N,N^FD>;1013486130441141878600786403467495^FS
^XZ

Correct result: Type C is selected, barcode fits container.

Long numeric barcode, mode A with Type C start sequence (>;):
^XA
^FO60,1060^BY3,2^BCN,200,Y,Y,N,A^FD>;1013486130441141878600786403467495^FS
^XZ

Correct result: The start sequence is part of the barcode. Type begins as B, and switches to C after the first two characters.

Alphanumeric barcode, blank line flag, above flag N:
^XA
^FO100,750^BY3,2,100^BCN,,,N^FDTEST0123456789^FS
^XZ

Correct result: Presentation line is displayed below.

Alphanumeric barcode, blank line flag, above flag Y:
^XA
^FO100,750^BY3,2,100^BCN,,,Y^FDTEST0123456789^FS
^XZ

Correct result: Presentation line is displayed above, barcode location is the same as the previous test.

Alphanumeric barcode, line flag N, blank above flag:
^XA
^FO100,750^BY3,2,100^BCN,,N,^FDTEST0123456789^FS
^XZ

Correct result: No presentation line is displayed.

Alphanumeric barcode, line flag Y, blank above flag:
^XA
^FO100,750^BY3,2,100^BCN,,Y,^FDTEST0123456789^FS
^XZ

Correct result: Presentation line is displayed below.

Great and feel free to work on this repo directly in the future.


How to unsubscribe from the onUserLocationChange? It is continuously accumulating when navigate to other screens

Question
onUserLocationChange is continuously calling multiple times and accumulating when navigating to other screens. Is there any way to unsubscribe from onUserLocationChange when navigating to other screens?
[Sat Mar 06 2021 11:08:27.230]  LOG      hit change
[Sat Mar 06 2021 11:08:27.102]  LOG      hit change
[Sat Mar 06 2021 11:08:27.234]  LOG      hit change
[Sat Mar 06 2021 11:08:27.350]  LOG      hit change
[Sat Mar 06 2021 11:08:27.373]  LOG      hit change
[Sat Mar 06 2021 11:08:27.404]  LOG      hit change
[Sat Mar 06 2021 11:08:27.537]  LOG      hit change
[Sat Mar 06 2021 11:08:27.651]  LOG      hit change
[Sat Mar 06 2021 11:08:27.671]  LOG      hit change
[Sat Mar 06 2021 11:08:27.701]  LOG      hit change
[Sat Mar 06 2021 11:08:27.787]  LOG      hit change
[Sat Mar 06 2021 11:08:27.918]  LOG      hit change
[Sat Mar 06 2021 11:08:28.170]  LOG      hit change
[Sat Mar 06 2021 11:08:28.430]  LOG      hit change
[Sat Mar 06 2021 11:08:28.169]  LOG      hit change
[Sat Mar 06 2021 11:08:28.199]  LOG      hit change
[Sat Mar 06 2021 11:08:28.301]  LOG      hit change
[Sat Mar 06 2021 11:08:28.324]  LOG      hit change
[Sat Mar 06 2021 11:08:28.400]  LOG      hit change
[Sat Mar 06 2021 11:08:28.469]  LOG      hit change
[Sat Mar 06 2021 11:08:28.554]  LOG      hit change
[Sat Mar 06 2021 11:08:28.689]  LOG      hit change
[Sat Mar 06 2021 11:08:28.712]  LOG      hit change
[Sat Mar 06 2021 11:08:28.871]  LOG      hit change
[Sat Mar 06 2021 11:08:28.891]  LOG      hit change
[Sat Mar 06 2021 11:08:28.988]  LOG      hit change

You could try to render the Map only if the screen is focused.

@christopherdro it didn't work. This happens when I navigate to other screens(except the home screen) from the map screen. When I navigate back to the home screen it stops firing onUserLocationChange. Due to that, I remove all the navigations from the map screen for now.

You could use the useIsFocused hook to check if your map screen is active or not and remove the onUserLocationChange prop based on that.
  useEffect(() => {
    if (isFocused) {
      // enable tracking
    } else {
      // disable tracking
    }
  }, [isFocused]);


fix: validation of phone number

## PR Type[x] Bugfix[ ] Feature[ ] Code style update (formatting, local variables)[ ] Refactoring (no functional changes, no API changes)[ ] Build-related changes[ ] CI-related changes[ ] Documentation content changes[ ] Application / infrastructure changes[ ] Other: ## What Is the Current Behavior?input field for for phone number is standard input type text without validation (see issue below for more details)Issue Number: Closes #424 ## What Is the New Behavior?- Phone number is validated- Input for phone number use type "tel" to improve mobile behavior ## Does this PR Introduce a Breaking Change?[ ] Yes[x] No## Other Information
AB#64695

Shouldn't there be some sort of validation error message?

Something seems wrong with the regular expression. The following errors are logged to the browser console when entering numbers in the phone input.

docu of the phonefield is missing in formly.md


Leverage php-http/discovery v1.15 and decouple from guzzlehttp/psr7

This is a follow up of #1429
Since this PR and our discussion at SymfonyCon, I've been working on moving those ideas to "php-http/discovery", and v1.15.0 has just been tagged :tada:
By bumping to v1.15.0, we keep compatibility with PHP >= 7.1 and composer v1 & v2, but we also benefit from:

https://github.com/php-http/discovery/pull/209
https://github.com/php-http/discovery/pull/208

This allows simplifying the dependencies of sentry-php since we can now move guzzlehttp/psr7 from require to require-dev.

Thanks, I'll take a look.

Composer v2.2.20 and v2.5.3 have now been released.
Together with php-http/discovery v1.5.1 this PR should be doubly ready :)


Update client.yml

Proposing to not include the default options when installing the reporting tools. This means that --batch-mode will no longer be included, which means when the build fails (e.g. https://dev.azure.com/azure-sdk/public/_build/results?buildId=72325&view=logs&jobId=b9afb22f-0837-5d02-bc24-6c30aee08bcf), users will be able to see the checkstyle / spotbugs / JavaDoc issue that was identified and won't need to re-run the tooling on their local machine.

This was superseded by other work that I have since merged.


java.lang.IllegalArgumentException in com.huawei.android.launcher.unihome.UniHomeLauncher

Error in Pride in London 2018 app
java.lang.IllegalArgumentException in com.huawei.android.launcher.unihome.UniHomeLauncher
View=DecorView@267df52[] not attached to window manager
View on Bugsnag
Stacktrace
WindowManagerGlobal.java:516 - android.view.WindowManagerGlobal.findViewLocked

View full stacktrace
Created automatically via Bugsnag

Seems device specific, will monitor for recurrence


--reverse and --preview not work

[-] I have read through the manual page (man fzf)
[-] I have the latest version of fzf
[-] I have searched through the existing issues

Info

OS

[x] Linux
[ ] Mac OS X
[ ] Windows
[ ] Etc.

Shell

[ ] bash
[x] zsh
[ ] fish

Problem / Steps to reproduce
fzf:

fzf --preview='head -$LINES {}'

fzf --reverse

no difference between them

Have you assigned the environment variable FZF_DEFAULT_OPTS [^1]?
printenv FZF_DEFAULT_OPTS
# --ansi --reverse --preview-window 'hidden'

Do you notice a difference when running:
FZF_DEFAULT_OPTS="" fzf --preview='head -$LINES {}'

[^1]: junegunn/fzf: README - Environment Variables

What's the output of type fzf?

What's the output of type fzf?

$ type fzf
fzf is /usr/bin/fzf

All the tests are passing, so it's clear that there is no issue regarding the options.

$ type fzf
fzf is /usr/bin/fzf

Make sure that the file is a valid fzf binary. Not some shell script that calls fzf without properly passing the arguments.

you're right. It's the problem with https://github.com/unixorn/fzf-zsh-plugin. It automatically installs the fzf and add it to $PATH, which causes the problem


Text input does not work with monthPicker

In version 2.4.2 of the plugin, text entry of the date does not work when using monthPicker, textInput and format="yyyy-MM". This worked correctly up to version 2.3.6 and appears to be broken in 2.4.0+. It seems that loading of the monthPicker is removing focus from the input.
<template>
  <div>
    <Datepicker v-model="date" format="yyyy-MM" monthPicker textInput/>
  </div>
</template>

Included in the v2.5.0

Verified in v2.5.0.


GroupKFold crossvalidation in AutoGluon Tabular?

Hello,
Thanks for your work on this AutoML package,
Is GroupKFold-cross-validation supported in AutoGluon Tabular?
As AutoGluon creating validation sets for internal search of best model and hyperparameters, it has to create the train/val sets based on allowed groups, or training will be "contaminated".
currently with other models I'm using nested cross-validation approach, where in my inner cv using randomized/baysian parameters search, the lines of code considering the groups indices:
cv_inner = GroupKFold(n_splits=3)
clf = RandomizedSearchCV(model, param_distributions=param_dist, cv=cv_inner, n_iter=200, scoring='accuracy')
search = clf.fit(X_train, y_train, groups=groups_train)

Thank you.

This is not supported at present, but has been requested before and is a reasonable enhancement to add.
AutoGluon currently supports KFold splits by the following code:
def generate_kfold(X, y=None, n_splits=5, random_state=0, stratified=False, n_repeats=1):
    if stratified and (y is not None):
        if n_repeats > 1:
            kf = RepeatedStratifiedKFold(n_splits=n_splits, n_repeats=n_repeats, random_state=random_state)
        else:
            kf = StratifiedKFold(n_splits=n_splits, shuffle=True, random_state=random_state)

        kf.get_n_splits(X, y)
        return [[train_index, test_index] for train_index, test_index in kf.split(X, y)]
    else:
        if n_repeats > 1:
            kf = RepeatedKFold(n_splits=n_splits, n_repeats=n_repeats, random_state=random_state)
        else:
            kf = KFold(n_splits=n_splits, shuffle=True, random_state=random_state)

        kf.get_n_splits(X)
        return [[train_index, test_index] for train_index, test_index in kf.split(X)]

Note that n_repeats allows for repeated bagging / cv. It seems that GroupKFold would not support n_repeats>1, so we would need to force n_repeats=1 in this scenario. Similarly, stratified and random_state arguments would be ignored.
Beyond updates to this function, we will need to add an additional argument to TabularPredictor.fit which allows the passing of the groups argument downstream, and correctly update it when we perform actions such as data augmentation / dropping rows.
I will plan to look into this when I find time, as it shouldn't be overly difficult to add.

Thank you, for the fast response,
I did looked up to see previous request, and closest resembled one was the "Time based crossvalidation", which is not the same.
All your comments for GroupKFold constraints are in place, another approach as an addition enhancement to provide support for random_state and n_repeats is with the GroupShuffleSplit.
Thank you, hope this enhancement will be soon implemented.

@Innixma , thank you for adding this enhancment to the task list of 0.3 release.
Lately I've been playing with H2O and by just adding the ability to assign a fold column, can resolve all posibilities,
Since then I will be able to create the column to which ever fold split I need, taking care of stratification and/or groups and/or TimeSeries.
All what left for the model is to use the cross-validation only according to assigned folds in this column, the only Cons I can think of is that it requires higher understanding and some nice examples can handle this, I'll put my used example:
cv_outer = GroupKFold(n_splits=4)
for train_index, test_index in cv_outer.split(X, y, groups):
    X_train, X_test = X.iloc[train_index, :], X.iloc[test_index, :]
    y_train, y_test = y.iloc[train_index], y.iloc[test_index]
    groups_train, groups_test = groups.iloc[train_index], groups.iloc[test_index]

    cv_inner = GroupKFold(n_splits=3)
    for fold, (in_index_ oof_index) in enumerate(cv_inner.split(X_train, y_train, groups)):
        X_train.loc[X_train.index[oof_index], 'fold'] = fold

The inner cross-validation will assign correctly (considering groups) fold number to each of the rows, using it for cross validation,
inside the model will output expected results.
The same can be done by manipulating the 'fold' column to any of existing supported spliting schemes in SKlearn.
The outer cross-validation is just to create an actual holdouts test sets, again I have to take care of groups and prevent data leakage.

LeaveOneGroupOut support has been added in #1224.
To use it, refer to the documentation of the groups parameter to TabularPredictor, available in v0.3 release.
Thanks @davidabek1 for your very helpful comments and suggestions in this thread!


Add Read inventory

Added endpoint to read-inventory in routes.py
Added test cases for read-inventory

@zhengtr PRs shouldn't have an enhancement label.
https://nyu-devops-spring23-3.slack.com/archives/C04NWAD335G/p1677771021460519

@zhengtr PRs shouldn't have an enhancement label.

Got it, thanks for letting me know.


Efficient pre-processing of the question string

Done via https://github.com/coala/corobo/pull/219 but different approach


FlatList Render Problem Between IOS and Android

Hello,
The application, which works smoothly on the IOS side, works problematically on the Android side. The JSON that FlatList needs to render is transferred into data State, but FlatList does not render.

Expo CLI 4.0.17 environment info:
System:
OS: macOS 10.15.7
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.15.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1
IDEs:
Android Studio: 4.1 AI-201.87<IP_ADDRESS>53283
Xcode: 12.2/12B45b - /usr/bin/xcodebuild
npmPackages:
expo: ^39.0.5 => 39.0.5
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz => 0.63.2
react-native-web: ~0.13.7 => 0.13.18
npmGlobalPackages:
expo-cli: 4.0.17
Expo Workflow: managed

Codes :
//edit
Thank you for help,
Regards.

Could anyone help me please ?

@ahmetboz you might just need a flex: 1 in the flatlist styles if you're just getting a blank screen

@ahmetboz you might just need a flex: 1 in the flatlist styles if you're just getting a blank screen

@mjmasn, thank you for help. styles.sv already has a flex:1 no help ☹

Expo CLI 4.0.17 environment info:
System:
OS: macOS 10.15.7
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.15.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1
IDEs:
Android Studio: 4.1 AI-201.87<IP_ADDRESS>53283
Xcode: 12.2/12B45b - /usr/bin/xcodebuild
npmPackages:
expo: ^39.0.5 => 39.0.5
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz => 0.63.2
react-native-web: ~0.13.7 => 0.13.18
npmGlobalPackages:
expo-cli: 4.0.17
Expo Workflow: managed

Hello, I've been solved the problem. Creating a temporary data and put it into eval() function is required when the data fetched from the API. Then assign the temporary data to state. Thats all.
`
state = {
loading: true,
data: "",
};
setAllLights = async () => {
const {data} = await axios.get(
"API URL"
);
var temp = eval(data);
this.setState({
data: temp,
loading: false,
});
};
componentDidMount() {
this.setAllLights();
}`

Hello, I've been solved the problem. Creating a temporary data and put it into eval() function is required when the data fetched from the API. Then assign the temporary data to state. Thats all.
`
state = {
loading: true,
data: "",
};
setAllLights = async () => {
const {data} = await axios.get(
"API URL"
);
var temp = eval(data);
this.setState({
data: temp,
loading: false,
});
};
componentDidMount() {
this.setAllLights();
}`


Help on getting react hot reloading working with the webpack template

[x] I have read the contribution documentation for this project.
[x] I agree to follow the code of conduct that this project follows, as appropriate.
[x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Hey!
I've been stuck on this for a day or two now and I'm on the edge of giving up. I've searched google but the only thing I did find was using TypeScritp and/or used nodeIntegration which isn't a good security practice.
I did also find somewhere in this repo info about including instructions for getting react to work with the new beta electron forge. Maybe this issue can be used for implementing that documentation if someone is hepful enough.
My question is, what is the proper way of adding React with hot reloading to your webpack template and could you plese provided the minimal viable code needed for that? Cheers and thanks for your help!

My understanding from https://www.electronforge.io/config/plugins/webpack#hot-reloading is that HMR is provided by Webpack, not React.

This is the message I'm getting when making changes to an JS file and that's why I think it has something to do with electron itself. Refreshing the electron window manually (ctrl+r) works fine.

Same issue, same warning.
Init template and install packages
npx create-electron-app my-new-app --template=webpack
npm i react react-dom
npm i @babel/core babel-loader
npm i @babel/preset-env @babel/preset-react

Add babel-loader to webpack.renderer.config.js
rules.push({
    test: /\.jsx?$/,
    exclude: /node_modules/,
    use: [{ loader: 'babel-loader' }]
})

.babelrc
{
    "presets": [
        "@babel/preset-env",
        "@babel/preset-react"
    ]
}

add

 to index.html
Write some code in renderer.js
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';

console.log('👋 This message is being logged by "renderer.js", included via webpack');

function App() {
    return
123

}

ReactDOM.render(<App />, document.getElementById('root'));

@wangjianio Did You find a solution for this issue?

The official documentation indicates that Webpack takes care of the hot recharge but you must force the update of the electron window. It would be great to see some solution for this.

All your renderer processes in development will have hot reloading enabled by default. It is unfortunately impossible to do hot module reloading inside a renderer preload script, WebWorkers, and the main process itself.  However, Webpack is constantly watching and recompiling those files so to get updates for preload scripts simply reload the window. For the main process, just type rs in the console you launched electron-forge from and we will restart your app for you with the new main process code.

I think the key is that the modules "don't know how to update themselves". I used the hot() HOC from react-hot-loader to define which modules should be hot reloaded.
layout.tsx (parent component for the rended portion of my app)
import { hot } from 'react-hot-loader'

const Layout = observer((props: Props) => {
...
})

export default hot(module)(Layout)

I use the same pattern in other components too, depending on what I want to reload. For example, I use the hot() HOC for my appbar component. If I make a change to a child of the app bar then the entire app bar gets reloaded, but layout remains otherwise unchanged. If the HOC is added to the child component then only the child reloads and the app bar remains otherwise unchanged. If the HOC is omitted from the app bar component then the entire layout gets reloaded.
To be perfectly honest, I'm not entirely sure if this is the intended but I had the same error message at first and this approach seems to work. There may be a way to make it more "automated" but I wasn't able to figure it out.

Awesome.
Maybe mention @damienallen comment somewhere in the documentation so no more people lose their time scraping google. It seems this is the only way you can do HMR in React using Electron Forge.

Awesome.
Maybe mention @damienallen comment somewhere in the documentation so no more people lose their time scraping google. It seems this is the only way you can do HMR in React using Electron Forge.

I created a PR with a brief explanation - large inspired by @damienallen so that everyone will have an easier time with this :)

Are there any boilerplate's out there with Electron Forge + Webpack + React + react-hot-loader already working?
After following the instructions here I am still missing something, whenever I try enabling react-hot-loader I receive errors such as:
Uncaught Error: React-hot-loader: hot could not find the name of the the module you have provided
module` provided ƒ App() {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "Hello World!");
}
hot @ react-hot-loader.development.js:3016
(anonymous) @ renderer.js:41
./src/renderer.js @ index.js:36072
__webpack_require__ @ bootstrap:725
fn @ bootstrap:100
0 @ index.js:36083
__webpack_require__ @ bootstrap:725
(anonymous) @ bootstrap:792
(anonymous) @ bootstrap:792
react-hot-loader.development.js:3016 Uncaught Error: React-hot-loader: `hot` could not find the `name` of the the `module` you have provided
    at hot (react-hot-loader.development.js:3016)
    at Module.<anonymous> (renderer.js:41)
    at Module../src/renderer.js (index.js:36072)
    at __webpack_require__ (bootstrap:725)
    at fn (bootstrap:100)
    at Object.0 (index.js:36083)
    at __webpack_require__ (bootstrap:725)
    at bootstrap:792
    at bootstrap:792
hot @ react-hot-loader.development.js:3016
(anonymous) @ renderer.js:41
./src/renderer.js @ index.js:36072
__webpack_require__ @ bootstrap:725
fn @ bootstrap:100
0 @ index.js:36083
__webpack_require__ @ bootstrap:725
(anonymous) @ bootstrap:792
(anonymous) @ bootstrap:792

I don't believe there are. Though I don't think this would be hard to add to the existing typescript + webpack template.
Do you have some more code you could share? It's hard to tell just from the error message what's going on

I managed to figure out what was wrong.
I was doing:
export default hot(App);
Instead of:
export default hot(module)(App);
But there were other things I had to do, and I kinda forget what they all were.

After reading @dsteinman 's comment I thought I may as-well pop up a template repository that includes all the essential set-up for an electron forge app with react just in-case anyone needed it.
https://github.com/Anitorious/electron-forge-typescript-webpack-react-starter

After reading @dsteinman 's comment I thought I may as-well pop up a template repository that includes all the essential set-up for an electron forge app with react just in-case anyone needed it.
https://github.com/Anitorious/electron-forge-typescript-webpack-react-starter

I wish I found this 3 hours ago. 😂 Thank you so much for this! 👏👏👏

Might this help you https://github.com/vuduytuananh/ERT-boilerplate


Rewrite handling of _id to occur before document processed by Shredder

(follow-up to #421)
As suggested in #421 code review, handling of document id by Shredder is bit convoluted wrt initial addition and/or reodering before doing actual shredding. Shredding should not have to modify the passed document: this could be achieved by extracting pre-processing logic to specialized class.
This would simplify Shredder a bit.

Note: although handling rewritten in Shredder, wasn't able to remove accessor to modified document: that requires API change to separate Document/doc-id normalization part (where new ObjectNode need to be created) from actual Shredding (read-only part). We may choose to do that as a follow-up step but for now this should suffice.


Add Collapse

A simple collapse component:

Uses state.
Binds an event listener callback to its own context.
Uses props.children to render content.
Is accessible via aria-expanded.
Has some CSS-in-JS (as unopinionated and minimal as possible).

Linecount aside, I think this turned out pretty good. Opinions @skatcat31 @fejes713?

@skatcat31 Already fixed - I used GitHub's suggestion feature to use your code, so one of the commits is on you now! 😉  - Please use that feature whenever possible, it helps use improve PRs faster and improves git history/blame.

@skatcat31 Already fixed - I used GitHub's suggestion feature to use your code, so one of the commits is on you now! 😉 - Please use that feature whenever possible, it helps us improve PRs faster and improves git history/blame.

I'll have to check into that feature, haven't noticed it quite yet

@skatcat31 I think this is alright now.

Agreed however I think it should be left as a 2 since it's nesting context and using children

Alright, I think there is no controversy surrounding this, so I'm gonna merge the first ever snippet into the master branch! 🚀


Please enable proxy protocol in k3s ingress

This issue is related to similar issues discussed in the docker swarm world - https://github.com/moby/moby/issues/39465 and https://github.com/moby/moby/issues/25526
we need source ip address to be passed on through ingress. The only standards compliant way to do this and be compatible with all kinds of upstream LB (including cloud loadbalancers) is by using proxy protocol
https://github.com/containous/traefik/blob/master/docs/content/routing/entrypoints.md
Traefik already has support for proxyprotocol - this needs to be enabled in the right way for both upstream loadbalancers like ELB to pass on proxy protocol info. And in case clients directly connect, then traefik must inject the appropriate headers

hi guys,
any update on this ? Since you use traefik already as ingress, this shouldnt be too hard right ?
we are having trouble in a production deploy of k3s on AWS

behind a load balancer (it should pass through the headers)
while just using k3s (it should inject source headers)

hi, is there any update on this issue?

I suppose this would have to be implemented in https://github.com/rancher/klipper-lb @ibuildthecloud ? It looks like Amazon supports this behind an annotation for LoadBalancer services: service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*". Maybe something similar could be done for k3s' servicelb. The PROXY protocol is specified at [http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt], I might be willing to get my hands on this task.

Not sure about how it works with klipper-lb (the thing behind k3s's servicelb), but with metallb at least you have to use externalTrafficPolicy: Local in the Service entry for the Traefik Ingress, otherwise inbound traffic will come in through other nodes and you'll lose the original source address as it passes through the other node before hitting the node that's actually running the pod.

As far as I know, the goal of the PROXY protocol is to not make this a problem, as the load balancer keeps track of the source IP to forward it properly to the service.

Agreed.
Proxy protocol injects this and can pass through several nodes.
Each node can optionally inject additional layers into the header to
capture the whole chain (for debugging purposes)
This is scalable and supported across all clouds.
On Fri, 24 Apr, 2020, 00:32 Niklas Korz<EMAIL_ADDRESS>wrote:

As far as I know, the goal of the PROXY protocol is to not make this a
problem, as the load balancer keeps track of the source IP to forward it
properly to the service.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rancher/k3s/issues/852#issuecomment-618595990, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAASYU5VS4ENVR6HUR42WW3ROCGC5ANCNFSM4I4MXPRQ
.

Yes, PROXY protocol is supposed to pass the information along. That only works if the first entrypoint into the system supports it. If you pass it through kube-proxy and it gets NATed between nodes before hitting the Ingress Service which grabs the original layer 3 source and destination, that information is lost. Your LB layer needs to either keep the inbound traffic local (MetalLB) or add the Proxy information itself (ELB).

The solution to this issue is going to be flipping some settings in the traefik chart we install by default or special annotation on your ingress resource. I don't know what that is, but I'd start with first finding out how to use PROXY protocol with Traefiks ingress controller. klipper-lb should have nothing to do with this because it's just a TCP pass through using iptables. If you are just using a service load balancer and not ingress, proxy protocol will work already.

we have had trouble doing this in traefik, so for our current production
effort (we are deploying to AWS using k3s), we are going with haproxy.
On Sat, Apr 25, 2020 at 12:35 AM Darren Shepherd<EMAIL_ADDRESS>wrote:

The solution to this issue is going to be flipping some settings in the
traefik chart we install by default or special annotation on your ingress
resource. I don't know what that is, but I'd start with first finding out
how to use PROXY protocol with Traefiks ingress controller. klipper-lb
should have nothing to do with this because it's just a TCP pass through
using iptables. If you are just using a service load balancer and not
ingress, proxy protocol will work already.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rancher/k3s/issues/852#issuecomment-619191027, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAASYUZECAWQZC4JZDQIINTROHPJNANCNFSM4I4MXPRQ
.

@ibuildthecloud do you think we should update our traefik chart to support this or is this "on the user" to configure?

Is this configurable now because of HelmChartConfig CRD? (To be discussed in our next design call)

@davidnuzik yes and doing so is actually covered in the example docs!
https://rancher.com/docs/k3s/latest/en/helm/#customizing-packaged-components-with-helmchartconfig - see the proxyProtocol: bit.

Test as low priority. Leverage the docs that Brad outlined.

Should not block v1.19.3 release.

Validated in v1.19.3+k3s1 using the example mentioned in the docs

Viewing logs of the traefik pod shows enabling of the proxyprotocol with the specified trusted IPs.:

{"level":"info","msg":"Enabling ProxyProtocol for trusted IPs [<IP_ADDRESS>/8]","time":"2020-10-16T17:43:55Z"}
{"level":"info","msg":"Preparing server https \u0026{Address::443 TLS:0xc0003d17a0 Redirect:\u003cnil\u003e Auth:\u003cnil\u003e WhitelistSourceRange:[] WhiteList:\u003cnil\u003e Compress:true ProxyProtocol:0xc00079b7e0 ForwardedHeaders:0xc00079b8c0} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s","time":"2020-10-16T17:43:55Z"}
{"level":"info","msg":"Enabling ProxyProtocol for trusted IPs [<IP_ADDRESS>/8]","time":"2020-10-16T17:43:55Z"}

Notice the difference when not including the config manifest has mention of proxyprotocol but without any trusted ips:
$ k logs -n kube-system traefik-5dd496474-btz5n | grep -i proxy
{"level":"info","msg":"Preparing server https \u0026{Address::443 TLS:0xc0006157a0 Redirect:\u003cnil\u003e Auth:\u003cnil\u003e WhitelistSourceRange:[] WhiteList:\u003cnil\u003e Compress:true ProxyProtocol:\u003cnil\u003e ForwardedHeaders:0xc0005e4320} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s","time":"2020-10-16T18:01:00Z"}
{"level":"info","msg":"Preparing server prometheus \u0026{Address::9100 TLS:\u003cnil\u003e Redirect:\u003cnil\u003e Auth:\u003cnil\u003e WhitelistSourceRange:[] WhiteList:\u003cnil\u003e Compress:false ProxyProtocol:\u003cnil\u003e ForwardedHeaders:0xc0005e4460} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s","time":"2020-10-16T18:01:00Z"}
{"level":"info","msg":"Preparing server http \u0026{Address::80 TLS:\u003cnil\u003e Redirect:\u003cnil\u003e Auth:\u003cnil\u003e WhitelistSourceRange:[] WhiteList:\u003cnil\u003e Compress:true ProxyProtocol:\u003cnil\u003e ForwardedHeaders:0xc0005e4300} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s","time":"2020-10-16T18:01:00Z"}

All pods come up successfully and appear to be functional

This is only half working. Traefik supports Proxy Protocol but it needs the actual proxy data from the upstream injected into the TCP stream. Loadbalancers from AWS et al do this for you but the Loadbalancer service (Klipper) from k3s does not.
Klipper is essentially two lines of iptables and isn't capable of prepending data into the TCP stream. It took me some good time to realize this.
@rancher-max Your test only checks if Traefik enables Proxy Protocol but it probably did not check if Traefik actually sees the real client IP or was using a loadbalancer from AWS etc. Enabling the setting without having the actual Proxy Protocol data being sent will not do much.

Same here. We had to rip out load balancers and traefik and put haproxy
everywhere. Not ideal at all.
On Sun, 29 Nov, 2020, 00:07 arctica<EMAIL_ADDRESS>wrote:

This is only half working. Traefik supports Proxy Protocol but it needs
the actual proxy data from the upstream injected into the TCP stream.
Loadbalancers from AWS et al do this for you but the Loadbalancer service
(Klipper) from k3s does not.
Klipper is essentially two lines of iptables and isn't capable of
prepending data into the TCP stream. It took me some good time to realize
this.
@rancher-max https://github.com/rancher-max Your test only checks if
Traefik enables Proxy Protocol but it probably did not check if Traefik
actually sees the real client IP or was using a loadbalancer from AWS etc.
Enabling the setting without having the actual Proxy Protocol data being
sent will not do much.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rancher/k3s/issues/852#issuecomment-735274271, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAASYUZFDDFE7TRYFZTMBJDSSE7M5ANCNFSM4I4MXPRQ
.

@sandys Yes we also ripped out the k3s built in loadbalancer and just exposed Traefik directly via HostPort (note this only works if you configure the pod explicitly to run as root as the NET_BIND_SERVICE capability is not working either). Many places suggest not to do this but I can't see the benefit of the Klipper loadblancer in this case or why there need to be svclb-traefik pods running on every node.

The cleaner thing to do here would have been for the loadbalancer to
inject/pass-on proxy protocol headers. In which case, everything downstream
would have worked properly
On Sun, 29 Nov, 2020, 00:24 arctica<EMAIL_ADDRESS>wrote:

@sandys https://github.com/sandys Yes we also ripped out the k3s built
in loadbalancer and just exposed Traefik directly via HostPort (note this
only works if you configure the pod explicitly to run as root as the
NET_BIND_SERVICE capability is not working either). Many places suggest not
to do this but I can't see the benefit of the Klipper loadblancer in this
case or why there need to be svclb-traefik pods running on every node.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rancher/k3s/issues/852#issuecomment-735276286, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAASYU6453OZDY5N5I2NEP3SSFBO3ANCNFSM4I4MXPRQ
.

starting to notice a theme here with k3s, a suggestion is made to fix/make standards compliant and nothing happens except the closing of the issue.
Of note, the validate post above was undone by https://github.com/k3s-io/k3s/issues/852#issuecomment-735274271, this issue needs to be addressed.
Considering that knowing the IP address of the actual endpoint(s) is a must for security, this issue should not have been closed and an actual solution, like OP's suggestion added. I have a barebones cluster and use nginx ingress which also supports proxy protocol however serviceLB doesn't add it and like everyone else can't get the real IP because of that.

Same here. We had to rip out load balancers and traefik and put haproxy everywhere. Not ideal at all.

@sandys, looks like i may have to do the same. I Know it's an old post, any major issues doing this on a production cluster?

Please don't reopen a 3+ year old issue. If you'd like to reopen the topic, please create a new issue or discussion.


x/build: reverse builder config uniformity

Onboarding overhead is very high ATM for builder project.
I'd like to discuss a config uniformity overhaul for the reverse buildlets.
We have been migrating various reverse buildlet Dockerfiles / configurations over to various different stages of "new" piecemeal b/c lack of headcount. eg. uses X version of rundockerbuildlet, uses rundockerbuildlet, are builds hermetic?, uses --reverse (legacy) vs. --reverse-type (latest) flag to cmd/buildlet/buildlet.go
I'd like us document the ideal/latest blessed reverse buildlet config, and push to bring all reverse buildlet configurations up to this config scheme.
I'd also like to discuss the potential for a plan to keep reverse buildlet configurations at latest config scheme in the future.

I will start referencing bugs from here.
Here is why the Solaris/illumos builders are not ideal: #15581

I deployed CL 52633 to see which hosts are using the old --reverse= argument to buildlet instead of --reverse-type= and found:
      1 host type host-darwin-10_8 (mapped from legacy modes ["darwin-amd64-10_8"])
      1 host type host-linux-mipsle (mapped from legacy modes ["linux-mipsle"])
      1 host type host-linux-mips (mapped from legacy modes ["linux-mips"])
      1 host type host-linux-s390x (mapped from legacy modes ["linux-s390x-ibm"])
      2 host type host-darwin-10_12 (mapped from legacy modes ["darwin-amd64-10_12"])
      2 host type host-solaris-amd64 (mapped from legacy modes ["solaris-amd64-smartosbuildlet"])
      3 host type host-darwin-10_10 (mapped from legacy modes ["darwin-amd64-10_10"])
      3 host type host-linux-arm5spacemonkey (mapped from legacy modes ["linux-arm-arm5spacemonkey"])
      5 host type host-linux-ppc64le-osu (mapped from legacy modes ["linux-ppc64le-buildlet"])
      5 host type host-linux-ppc64-osu (mapped from legacy modes ["linux-ppc64-buildlet"])
     14 host type host-darwin-10_11 (mapped from legacy modes ["darwin-amd64-10_11"])
     50 host type host-linux-arm-scaleway (mapped from legacy modes ["host-linux-arm-scaleway"])

Updating the Scaleway images can happen in https://go-review.googlesource.com/c/52293
A bunch of the others are done in https://go-review.googlesource.com/c/52650 (once ppc64 and arm5-spacemonkey are updated)
Updating Mac images is super hard and tedious and SLOW and error prone. I think we'd be better of keeping the mapping in the coordinator and buildlet for a bit. We can hide it from flag listing if helpful to minimize doc clutter.
MIPS seems to be updateable easily enough.
I also want to figure out a plan for #21191 (speaking of cleanup).

Latest update on which hosts are still using the legacy ways:

host type host-darwin-10_10 (mapped from legacy modes ["darwin-amd64-10_10"])
host type host-darwin-10_11 (mapped from legacy modes ["darwin-amd64-10_11"])
host type host-darwin-10_12 (mapped from legacy modes ["darwin-amd64-10_12"])
host type host-linux-arm-scaleway (mapped from legacy modes ["host-linux-arm-scaleway"])
host type host-linux-ppc64-osu (mapped from legacy modes ["linux-ppc64-buildlet"])
host type host-linux-s390x (mapped from legacy modes ["linux-s390x-ibm"])
host type host-solaris-amd64 (mapped from legacy modes ["solaris-amd64-smartosbuildlet"])

Basically no change since Aug 1 2017, except that we no longer OS X 10.8 and the MIPS builders disappeared.
The one fix seems to be that host-linux-ppc64le-osu and host-linux-ppc64-osu are no longer doing the legacy registration.
Also, macOS 10.14 is at least using the new way. And the Mac VMware cluster is easier to work with now since it was upgraded, so we could fix those old versions at least.

Two of those builders are gone now, so remaining is:

host type host-darwin-10_11 (mapped from legacy modes ["darwin-amd64-10_11"])
host type host-darwin-10_12 (mapped from legacy modes ["darwin-amd64-10_12"])
host type host-linux-arm-scaleway (mapped from legacy modes ["host-linux-arm-scaleway"])
host type host-linux-ppc64-osu (mapped from legacy modes ["linux-ppc64-buildlet"])
host type host-linux-s390x (mapped from legacy modes ["linux-s390x-ibm"])

Down to:

host type host-darwin-10_11 (mapped from legacy modes ["darwin-amd64-10_11"])
host type host-darwin-10_12 (mapped from legacy modes ["darwin-amd64-10_12"])
host type host-linux-arm-scaleway (mapped from legacy modes ["host-linux-arm-scaleway"])
host type host-linux-s390x (mapped from legacy modes ["linux-s390x-ibm"])

Just double checked, and yes:
$ kubectl logs $(k get -o name po -l app=coordinator) | grep "mapped from legacy" | perl -ne 'm/host type (\S+)/ and print "$1\n"' | sort | uniq -c
     29 host-darwin-10_11
    215 host-darwin-10_12
    327 host-linux-arm-scaleway
    214 host-linux-s390x

And I just fixed the darwin ones.


Support selection by dragging mouse outside view port

Can you add support for selecting text by dragging the mouse outside of the view port? Similar to what is being supported in various text editing tools.

@TomasMikula I would like to add that I've tested the latest release 6.2 and see no new issues and can confirm the text artifacts are still fixed. I would also like this feature here.

I will note also here that a workaround is to start the selection in the viewport and scroll the mouse wheel while the mouse button is still pressed.

This is now supported in 0.6.3.

Works!

Working great here as well! Very smooth and works great horizontally or vertically!


🎉 Release 0.0.5

This PR was opened by the ready-release-go plugin. When you're ready to do a release, you can merge this pull-request and a new release with version 0.0.5 will be created automatically. If you're not ready to do a release yet, that's fine, whenever you add more changes to main this pull-request will be updated.
Options

[ ] Mark this version as a release candidate

0.0.5 - 2023-12-19
Misc

🎉 Release 0.0.5 [#8]
🎉 Release 0.0.5 [#7]
🎉 Release 0.0.5 [#6]
Bump golang.org/x/crypto from 0.16.0 to 0.17.0 [#5]
Bump golang.org/x/crypto from 0.16.0 to 0.17.0 [#5]

🎉 This PR is included in version 0.0.5 🎉
The release is now available here
Thank you for your contribution. ❤📦🚀


Support for Italian NumberWithUnit .NET

This is a work in progress as it is dependent on WIP #1604.
All test cases pass for Age, Currency, Dimensions and Temperature.

@LionbridgeCS similarly to the Numbers PR (#1604), this PR is in an invalid state. Please see the comments there.
Thanks.

@LionbridgeCS, please update this PR to contain only the Dimension changes now that you've created #1640 for the other units.

We will work on including Dimension changes only as soon as we fix the issues in #1640 which were due to outdated revision on the branch.

@tellarin we will update this one as soon as other PRs in the pipeline are made.

@LionbridgeCS Can we get this updated to only include Dimension? The longer the PR stays stale, the more conflicts will happen.

Closing this PR, will include the changes in a separate PR.


tests: msgq_api: Improve scenario testing

Pend multiple thread to wait for writing on msgq.
Signed-off-by: Punit Vara<EMAIL_ADDRESS>

Codecov Report

Merging #6532 into master will increase coverage by 0.04%.
The diff coverage is 94.73%.

@@            Coverage Diff             @@
##           master    #6532      +/-   ##
==========================================
+ Coverage   53.36%   53.41%   +0.04%
==========================================
  Files         435      435
  Lines       41308    41327      +19
  Branches     7922     7922
==========================================
+ Hits        22046    22074      +28
+ Misses      16044    16034      -10
- Partials     3218     3219       +1

Impacted Files
Coverage Δ

tests/kernel/msgq/msgq_api/src/main.c
75% <ø> (ø)
:arrow_up:

...ests/kernel/msgq/msgq_api/src/test_msgq_contexts.c
97.1% <94.73%> (-0.9%)
:arrow_down:

kernel/posix/pthread.c
70% <0%> (+0.5%)
:arrow_up:

kernel/msg_q.c
93.24% <0%> (+12.16%)
:arrow_up:

Continue to review full report at Codecov.

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

You are not testing return values for many of the APIs you are using. This should be part of the test, otherwise you are just executing code without checking for correct behaviour.


Block Preview Does Not Support Dark Mode or Math Typesetting

Plugin Version: 1.2
Logseq Version: 0.9.18
Platform: Windows 10, 21H2, 64 bit
The block preview in Logseq always displays in light mode even if the draw.io diagram was made in dark mode and/or Logseq dark mode is enabled. Additionally, the block preview can't render Latex math expressions.
Draw.io Editor:

Block Preview:

Maximize View:

can you give an example file of this?

Here is the diagram file (SVG) created by the plugin using /create (it's in light mode despite being created in dark mode):

Plugin embedding:
{{renderer :drawio,<PHONE_NUMBER>365.svg}}

Normal SVG embedding:
![1696245442365.svg](../assets/1696245442365_1696658118020_0.svg)

SVG embedding after manually exporting the diagram in drawio:

@chronos1970 can you export this drawio file and attach it to this issue's comment?

Creating a diagram with the plugin only saves the file in SVG format. I have uploaded the SVG file created as the previous comment's first attachment. I have recreated the same file in draw.io if that's what you want.
system.zip

Here is the manually exported version as well (SVG):

@chronos1970 how to export like this. as I use online version to export as svg, the font color or rectangle's background will mannally write to element's style. because of that I can not change the color to fit dark mode in a very easy way.
maybe I should change the svg background to white. this may not fit dark mode but it can display well in dark mode.

From the top header select File -> Export As -> SVG. Then make sure the Dark option is selected. This works in both the online/plugin version. and the locally installed version

I tried it. the font color or fill color is specified at export. so it is hard to auto change light theme to dark at runtime. maybe currently only light theme is displayed.

If it's not possible to change at runtime, then I think a plugin setting to export to dark mode by default would suffice. However, this wouldn't solve the issue of Latex math expressions not rendering in the block preview (see above images).

this plugin uses drawio embed mode. when export to svg, there is only a keepTheme option which is used to export dark when using dark mode. after exporting, there is no other way to change embeded svg in block. so just use light mode.
Latex math expressions not rendering in the block preview is a bug, this can be soved later.

I think if someone is using Logseq dark mode, then surely they would want to create dark themed draw.io diagrams. Otherwise they wouldn't be visible. So, is it possible to have a plugin setting that enables keepTheme option, pr a way to make newly created diagrams (using /create) be in dark mode by default?
Thanks for your time on this issue.

when create in dark mode editor, the diagram is dark and keep this until you edit in light mode editor. I think this is not acceptable.

Right now, diagrams are practically invisible in Logseq dark mode. Unless you want to alter SVG colors (on the fly) before rendering, you have to export to dark mode or blind Logseq dark mode users with a white background. Users attaching images to Logseq don't expect them to change from dark mode to light mode on their own. Likewise, I don't think users expect SVG that they created in dark mode to be magically turned into light mode. Regardless, I propose that this behavior be configurable in the plugin's settings.

the new version fix block preview problem.

Thanks for the fix! I can confirm math expressions render correctly now. The white background makes diagrams created in dark mode visible now. Although I understand this might not be feasible, It would be great if we could, somehow, have dark themed diagrams for dark mode users.


Don't use the grunt-contrib prefix

The grunt-contrib prefix is reserved for officially supported grunt tasks in the grunt org.
Please rename this task to not use the contrib word both here and on npm.
(I'm on the Grunt team)

Now, that took a long a long time. Fixed with: 04844b81384cf25c0a46cd4c59b1d869c90cf50a


Some completed kata are not included in profile and honor point totals (maybe ranking too)

My profile page (http://www.codewars.com/users/PaulCalvelage/completed) claims that I have completed 1,083 kata.  However, a grep count of the completed kata on the same page puts the total at 1,128.  The http://www.codewars.com/users/PaulCalvelage/site-events page also has the count at 1,083, which may mean that my honor point calculation has been incorrectly calculated by omitting 45 kata.  This may or may not be affecting the ranking calculation as well--I don't have enough information to know.
Background: I have been doing some testing of the kata search.  My strategy has been to make use of the website normally, save the HTML source, and then run a grep search to hunt for inconsistencies or clues.
grep -Eo '[^<]*' completed.html | cat -n > completed.txt

Here's a list of the 1,128 kata I have completed, according to my profile: https://drive.google.com/file/d/0B57YN95qmy_fOE04NkIyWThaQWM/view?usp=sharing

Closing old issue. Please open a new one if this issue is still there.


Update setup.py

updating .Net package for dotnet security update for vulnerability CVE-2022-41032 .
Microsoft is releasing this security advisory to provide information about a vulnerability in .NET 7.0.0-rc, .NET 6.0, .NET Core 3.1, and NuGet (NuGet.exe, NuGet.Commands, NuGet.CommandLine, NuGet.Protocol). This advisory also provides guidance on what developers can do to update their applications to remove this vulnerability.
Newtonsoft.Json prior to version 13.0.1 is vulnerable to Insecure Defaults due to improper handling of expressions with high nesting level that lead to StackOverFlow exception or high CPU and RAM usage. Exploiting this vulnerability results in Denial Of Service (DoS). The serialization and deserialization path have different properties regarding the issue. Deserializing methods (like JsonConvert.DeserializeObject) will process the input that results in burning the CPU, allocating memory, and consuming a thread of execution. Quite high nesting level (>10kk, or 9.5MB of {a:{a:{... input) is needed to achieve the latency over 10 seconds, depending on the hardware. Serializing methods (like JsonConvert.Serialize or JObject.ToString) will throw StackOverFlow exception with the nesting level of around 20k. To mitigate the issue one either need to update Newtonsoft.Json to 13.0.1 or set MaxDepth parameter in the JsonSerializerSettings. This can be done globally with the following statement. After that the parsing of the nested input will fail fast with Newtonsoft.Json.JsonReaderException: JsonConvert.DefaultSettings = () => new JsonSerializerSettings { MaxDepth = 128 }; Repro code: //Create a string representation of an highly nested object (JSON serialized) int nRep = 25000; string json = string.Concat(Enumerable.Repeat("{a:", nRep)) + "1" + string.Concat(Enumerable.Repeat("}", nRep)); //Parse this object (leads to high CPU/RAM consumption) var parsedJson = JsonConvert.DeserializeObject(json); // Methods below all throw stack overflow with nRep around 20k and higher // string a = parsedJson.ToString(); // string b = JsonConvert.SerializeObject(parsedJson); Note the original statement about the problem only affecting IIS applications is misleading. Any application is affected, however the IIS has a behavior that stops restarting the instance after some time resulting in a harder-to-fix DoS.

Hey , Hope you can look into this issue as soon as possible which would help other use the package without any vulnerabilities

Not opposed to bumping (we were planning another update here in the coming weeks), though w.r.t. to the CVE version v1.0.1 has Newtonsoft.Json 13.0.2.

We have to update the NuGet.Protocol from 5.3.0 to 5.7.3 as well, this is the issue related to the above CVE.
So will you merge and update the PR once the update you are working is done.

I am getting issue for the file artifacts__keyring/plugins/plugins/netcore/CredentialProvider.Microsoft/CredentialProvider.Microsoft.deps.json

Iam getting vulnerabilities on Microsoft defender. I think it would be better if you can update it.

Okay , I guess. but still is it good to update the version right ?

Of course! Can you update to use 1.0.8, then I'll approve and merge so a new version can be shipped.

Still seeing the 1.0.7 version in the diff

yeah sorry , check it now.


[MM-39529] Adding an item in the run's RHS dropdown menu to edit a run summary

Summary
This PR is modifying the hamburger menu of a run in the RHS to add an explicit "Edit run summary" item.

Ticket Link
https://github.com/mattermost/mattermost-server/issues/18972
Checklist
- [ ] Telemetry updated
- [ ] Gated by experimental feature flag

[x] Unit tests updated

Dev note

My ReactJS skills are not perfect, so I'm not quite sure that the way I implemented the communication between components is the "state of the art" way to do it. I'm happy to change that to whatever is best!
I had to use a bit of trickery to have the hamburger menu open in the e2e tests because it appears only when the mouse goes over the container. I tried using trigger('mouseover') on the container but it did not work and cypress has no implementation of hover yet was not enough. To remedy that during the test I force the buttons the show.

Hello @JulienTant,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.


[TRACKER] Implementation

List of features to be implemented:

[x] Path finding
[x] Doors
[ ] Weapons
[ ] Shields
[ ] Helm with evasion
[ ] Sensors
[ ] Fire
[ ] Oxygen depletion
[ ] Power management
[ ] Enemy ship
[ ] Unit box selection
[ ] UI

Bugs

[x] Fix unit moving across doors at the same time #1

Closed by mistake


what is the full type of the http response object?

The examples (for javascript) lack any info on what the output response object should look like.
the req is an HttpRequest (defined in @azure/functions) but the http response object isn't documented anywhere as far as I can see? There is only implied  structure that the res object has a body property?
In the typescript definition (@azure/functions/Interfaces.d.ts) the Context interface shows
nothing useful for the res property - just that it's an object of arbitrary key/values.
res?: { [key:string]: any; }

(as for my motivation, I want to control the output of my Azure function, so that it can return a PDF document directly.)
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 5b6cd6a0-5364-65e6-b088-cc00093f836f
Version Independent ID: 3c90d8fb-0fea-3496-e73e-0020ff33adef
Content: Azure Functions HTTP trigger
Content Source: articles/azure-functions/functions-bindings-http-webhook-trigger.md
Service: azure-functions
GitHub Login: @craigshoemaker
Microsoft Alias: cshoe

@ShawnTalbert Thank you for your query, our team will further look into it and get back to you at the earliest.

@ShawnTalbert Looks like there is an open issue for this - Azure/azure-functions-nodejs-worker#169
There is a Response object that you can refer to but guess the types are not in place as of yet. As for the docs, the structure is documented but isn't complete. Please feel free to open an issue on that doc to track the change.

@ShawnTalbert Just following up here... Hope my previous comment clears things up. I believe the issue linked is a better place to track this and have a more insightful discussion.
As for your specific scenario of sending a PDF document, based on this line, I believe you should be able to set the body to a byte[] / Buffer for this to work.

@ShawnTalbert Hope my previous comments clears things up.
Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Update the connectivity profiles to reflect those listed in WPT

Hey Peter,
Started using throttle today and was really missing the 4G profile for testing. So on adding it in I also decided to check the values and add in others as they are listed in WebPageTest.
The 2G profile in throttle is very slow compared to what is listed on WPT, so I'm unsure which one is correct? Looking at the 2G Wikipedia page throttle looks to be correct.

Hi @Nooshu we can change the 2g, the problem with current is that it is almost too slow so its unusable for testing :) Thanks for the PR, it is perfect timing since we gonna Browsertime and sitespeed.io as new majors this week, and then we can also change the 2g :)


subTreeLike and everySubTreeLike methods

Added subTreeLike and everySubTreeLike methods and tests. https://github.com/glenjamin/skin-deep/issues/9#issuecomment-144347882
Solves #22.

Why is 'isLike' a string instead of a boolean?

isLike is a string because I hate seeing mysterious booleans at the call site.
funcCall(true)
// vs
funcCall('isLike')

Bit busy this weekend so proper review might be Monday, looks good at first glance though :+1:

I did the isLike because i saw the use of 'one' here https://github.com/glenjamin/skin-deep/blob/master/skin-deep.js#L211
I could also see using an options object instead, maybe
createFinder(query, predicate, {'isLike': true});
But then you'd probably need to default options to an empty object.

Released as v0.12.0


Update Windows binaries for 0.15.1

These binaries are extracted from the official Windows installer.

Thanks, @jvoigtlaender!


*** Error in `./freerdp-proxy': double free or corruption (out): 0x00007f63a801bb60 ***

build option:
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SERVER=ON -DWITH_PROXY=ON -DWITH_PROXY_MODULES=ON .
config.ini:
[Security]
ServerTlsSecurity = TRUE
ServerRdpSecurity = FALSE
ClientTlsSecurity = FALSE
ClientRdpSecurity = TRUE
ClientNlaSecurity = TRUE
ClientAllowFallbackToTls = TRUE
Describe the bug
settings->ServerCertificate maybe double free
==177270== Invalid free() / delete / delete[] / realloc()
==177270==    at 0x4C28FBD: free (vg_replace_malloc.c:540)
==177270==    by 0x56DEC5B: freerdp_settings_free_internal (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x56DEED5: freerdp_settings_free (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x5707889: rdp_free (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x5728957: freerdp_peer_context_free (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x40B50B: pf_server_handle_peer (in /usr/local/bin/freerdp-proxy)
==177270==    by 0x53AEA96: thread_launcher (in /usr/local/lib64/libwinpr3.so.3.0.0)
==177270==    by 0x5FD2DC4: start_thread (in /usr/lib64/libpthread-2.17.so)
==177270==    by 0x5AFC74C: clone (in /usr/lib64/libc-2.17.so)
==177270==  Address 0x9a89e70 is 0 bytes inside a block of size 376 free'd
==177270==    at 0x4C28FBD: free (vg_replace_malloc.c:540)
==177270==    by 0x570774C: rdp_reset (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x56FC4EF: rdp_client_disconnect (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x56EE8B6: freerdp_disconnect (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x406357: pf_client_thread_proc (in /usr/local/bin/freerdp-proxy)
==177270==    by 0x53AEA96: thread_launcher (in /usr/local/lib64/libwinpr3.so.3.0.0)
==177270==    by 0x5FD2DC4: start_thread (in /usr/lib64/libpthread-2.17.so)
==177270==    by 0x5AFC74C: clone (in /usr/lib64/libc-2.17.so)
==177270==  Block was alloc'd at
==177270==    at 0x4C27EC3: malloc (vg_replace_malloc.c:309)
==177270==    by 0x56C6586: gcc_read_conference_create_response (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x56C93D3: mcs_recv_connect_response (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x57068E3: rdp_recv_callback (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x571174E: transport_check_fds (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x5707509: rdp_check_fds (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x56FC2C5: rdp_client_connect (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x56EFADF: freerdp_connect (in /usr/local/lib64/libfreerdp3.so.3.0.0)
==177270==    by 0x40644A: pf_client_thread_proc (in /usr/local/bin/freerdp-proxy)
==177270==    by 0x53AEA96: thread_launcher (in /usr/local/lib64/libwinpr3.so.3.0.0)
==177270==    by 0x5FD2DC4: start_thread (in /usr/lib64/libpthread-2.17.so)
==177270==    by 0x5AFC74C: clone (in /usr/lib64/libc-2.17.so)
==177270==
gdb info:
(gdb) bt
#0  0x00007fe49b90e1d7 in raise () from /lib64/libc.so.6
#1  0x00007fe49b90f8c8 in abort () from /lib64/libc.so.6
#2  0x00007fe49b94df07 in __libc_message () from /lib64/libc.so.6
#3  0x00007fe49b955503 in _int_free () from /lib64/libc.so.6
#4  0x00007fe49bd25816 in freerdp_settings_free_internal (settings=0x7fe4880008c0) at /data/FreeRDP/libfreerdp/core/settings.c:624
#5  0x00007fe49bd2598f in freerdp_settings_free (settings=0x7fe4880008c0) at /data/FreeRDP/libfreerdp/core/settings.c:657
#6  0x00007fe49bd55c91 in rdp_free (rdp=0x7fe48800d4b0) at /data/FreeRDP/libfreerdp/core/rdp.c:1961
#7  0x00007fe49bd7af20 in freerdp_peer_context_free (client=0x7fe4900008c0) at /data/FreeRDP/libfreerdp/core/peer.c:860
#8  0x000000000040f6a0 in pf_server_handle_peer (arg=0x7fe4900008c0) at /data/FreeRDP/server/proxy/pf_server.c:478
#9  0x00007fe49c1098ea in thread_launcher (arg=0x7fe490000a70) at /data/FreeRDP/winpr/libwinpr/thread/thread.c:327
#10 0x00007fe49b4c0dc5 in start_thread () from /lib64/libpthread.so.0
#11 0x00007fe49b9d074d in clone () from /lib64/libc.so.6

@merlin82 which version are you using? the lines in your trace do not correspond to current master so it must be older?

@merlin82 which version are you using? the lines in your trace do not correspond to current master so it must be older?

I test the latest  master  21158c0, it change to core/settings.c:624
(gdb) bt
#0  0x00007f0f0e5141d7 in raise () from /lib64/libc.so.6
#1  0x00007f0f0e5158c8 in abort () from /lib64/libc.so.6
#2  0x00007f0f0e553f07 in __libc_message () from /lib64/libc.so.6
#3  0x00007f0f0e55b503 in _int_free () from /lib64/libc.so.6
#4  0x00007f0f0e92b856 in freerdp_settings_free_internal (settings=0x7f0efc000f50) at /data/FreeRDP/libfreerdp/core/settings.c:624
#5  0x00007f0f0e92b9cf in freerdp_settings_free (settings=0x7f0efc000f50) at /data/FreeRDP/libfreerdp/core/settings.c:657
#6  0x00007f0f0e95bcd1 in rdp_free (rdp=0x7f0efc000d50) at /data/FreeRDP/libfreerdp/core/rdp.c:1961
#7  0x00007f0f0e980f7c in freerdp_peer_context_free (client=0x7f0f040008c0) at /data/FreeRDP/libfreerdp/core/peer.c:860
#8  0x000000000040f6a0 in pf_server_handle_peer (arg=0x7f0f040008c0) at /data/FreeRDP/server/proxy/pf_server.c:478
#9  0x00007f0f0ed0f8ea in thread_launcher (arg=0x7f0f04000a70) at /data/FreeRDP/winpr/libwinpr/thread/thread.c:327
#10 0x00007f0f0e0c6dc5 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f0f0e5d674d in clone () from /lib64/libc.so.6
valgrind:
==335415== Invalid free() / delete / delete[] / realloc()
==335415==    at 0x4C28FBD: free (vg_replace_malloc.c:540)
==335415==    by 0x5727855: freerdp_settings_free_internal (settings.c:624)
==335415==    by 0x57279CE: freerdp_settings_free (settings.c:657)
==335415==    by 0x5757CD0: rdp_free (rdp.c:1961)
==335415==    by 0x577CF7B: freerdp_peer_context_free (peer.c:860)
==335415==    by 0x40F69F: pf_server_handle_peer (pf_server.c:478)
==335415==    by 0x53E48E9: thread_launcher (thread.c:327)
==335415==    by 0x6049DC4: start_thread (in /usr/lib64/libpthread-2.17.so)
==335415==    by 0x5B7374C: clone (in /usr/lib64/libc-2.17.so)
==335415==  Address 0x3e97e3f0 is 0 bytes inside a block of size 376 free'd
==335415==    at 0x4C28FBD: free (vg_replace_malloc.c:540)
==335415==    by 0x5757AD9: rdp_reset (rdp.c:1919)
==335415==    by 0x5749C2B: rdp_client_disconnect (connection.c:395)
==335415==    by 0x57373A5: freerdp_disconnect (freerdp.c:424)
==335415==    by 0x407D75: pf_client_thread_proc (pf_client.c:545)
==335415==    by 0x408241: pf_client_start (pf_client.c:685)
==335415==    by 0x53E48E9: thread_launcher (thread.c:327)
==335415==    by 0x6049DC4: start_thread (in /usr/lib64/libpthread-2.17.so)
==335415==    by 0x5B7374C: clone (in /usr/lib64/libc-2.17.so)
==335415==  Block was alloc'd at
==335415==    at 0x4C27EC3: malloc (vg_replace_malloc.c:309)
==335415==    by 0x5707C3E: gcc_read_server_security_data (gcc.c:1254)
==335415==    by 0x57058A6: gcc_read_server_data_blocks (gcc.c:559)
==335415==    by 0x5704E07: gcc_read_conference_create_response (gcc.c:345)
==335415==    by 0x570BD27: mcs_recv_connect_response (mcs.c:784)
==335415==    by 0x5756B59: rdp_recv_callback (rdp.c:1577)
==335415==    by 0x576470B: transport_check_fds (transport.c:1181)
==335415==    by 0x57574FE: rdp_check_fds (rdp.c:1727)
==335415==    by 0x5749AC6: rdp_client_connect (connection.c:367)
==335415==    by 0x573667D: freerdp_connect (freerdp.c:114)
==335415==    by 0x4078EE: pf_client_connect (pf_client.c:455)
==335415==    by 0x407AEB: pf_client_thread_proc (pf_client.c:505)

@kubistika this looks like a threading issue to me? No expert here, so can you check please?

i check pc and ps settings->ServerCertificate is same address, so maybe the problem is there? @akallabeth @kubistika
(gdb) p pc->settings
$20 = (rdpSettings *) 0x7fffe8692260
(gdb) p pc->settings->ServerCertificate
$21 = (BYTE *) 0x7fffe403cba0 "\001"
(gdb) p clinet
No symbol "clinet" in current context.
(gdb) p client
$22 = (freerdp_peer *) 0x7fffec000f60
(gdb) p client->settings
$23 = (rdpSettings *) 0x7fffe8000f50
(gdb) p client->settings->ServerCertificate
$24 = (BYTE *) 0x7fffe403cba0 "\001"
(gdb) p ps
$25 = (pServerContext *) 0x7fffe80008c0
(gdb) p ps->context->settings->ServerCertificate
$27 = (BYTE *) 0x7fffe403cba0 "\001"
(gdb) p ps->context->settings
$28 = (rdpSettings *) 0x7fffe8000f50

I've found the reason is in freerdp_settings_copy, ServerCertificate  is not deep copy 。
but i'm not sure, it should copy, or revert value like  CertificateContent in pf_context_copy_settings。
Must the client and server use the same Security?
please help, thanks @akallabeth @kubistika

@merlin82 ServerCertificate is a pointer, so that should be copied manually

does  the pf_context_copy_settings no need to call in proxy_server_reactivate ?  @akallabeth
static BOOL proxy_server_reactivate(rdpContext* ps, const rdpContext* pc)
{
if (!pf_context_copy_settings(ps->settings, pc->settings))
return FALSE;
/*
 * DesktopResize causes internal function rdp_server_reactivate to be called,
 * which causes the reactivation.
 */
if (!ps->update->DesktopResize(ps))
	return FALSE;

return TRUE;

}

@merlin82 why should it?

@merlin82 why should it?

The client copies the settingof the server before connecting. After the client connected, the settings of the client only changes the certificate or key during the connection process?  So I don't think the server needs to copy the settings of the client.
A case:
The Server use ServerTlsSecurity , the client use ClientRdpSecurity,  the settings is  different, Does copy destroy server settings。
@akallabeth

@merlin82 check the call stack ;)

Fixed by #6812


Basic Block Breaking and Placing (I don't know how to lint a file)

I PR'd linting https://github.com/ShrimpyStuff/prismarine-viewer/pull/1

Thx

A more general comment: I have nothing against implementing more client functionalities into this example. But it is just an example, it doesn't aim to be a complete client, just to show a start for people to implement their client using prismarine-viewer.
I feel like this kind of functionalities should be implemented in a real client project, like https://github.com/Heath123/mineflayer-web-test
@Heath123 @rom1504 what do you think ?

I don't own this repo so I don't care what you do with this PR and I'm fine with you guys not implementing it here

I agree but also https://github.com/Heath123/mineflayer-web-test seems dead.
Should we have a PrismarineJS repo dedicated to exposing features to build a fully fledged client ? (Where this kind of PR would belong)

I agree but also https://github.com/Heath123/mineflayer-web-test seems dead.
Should we have a PrismarineJS repo dedicated to exposing features to build a fully fledged client ? (Where this kind of PR would belong)

Well I was planning to work on it and merge it into main Mineweb but having as an official Prismarine project seems to make Psome sense too

I plan on continuing to work on MineWeb, I've just been very busy the past couple of weeks.

I have no idea how to fix that

Moved to https://github.com/PrismarineJS/prismarine-web-client


Einstein Problem in Haskell

Ah, I see you did it in another lang! Looks nice! Once I learn Haskell I'm gonna have to come back and look at it again for sure.

If you want to start learning, here are some good resources:
Learn you a Haskell for Great Good!
Learn Haskell hard and fast


Ability to choose between tensorflow and tensorflow-gpu

This PR adds the ability to choose between tensorflow gpu or non gpu flavors as suggested here: https://github.com/tensorflow/tensorflow/issues/7166#issuecomment-280881808.
It basically moves the tensorflow dependency from install_requires to extra_requires.
Examples:
# no tensorflow
pip install git+https://github.com/openai/baselines.git#egg=baselines

# tensorflow
pip install git+https://github.com/openai/baselines.git#egg=baselines[tf]

# tensorflow-gpu
pip install git+https://github.com/openai/baselines.git#egg=baselines[tf_gpu]

since there is a desire to use a variety of builds of tensorflow (non-gpu and gpu, nightly, custom builds); we decided to remove tensorflow from explicit dependencies entirely, and fail at the install time if no version of tensorflow is present or if it is below 1.4. Burden of installing preferred tensorflow falls on user :)


amazon/mwaa-local:2_2 Image doesn't exist

Hi, the base docker image does not exist on docker hub. It's like it's been removed.

@osmandi  You need to first build the image locally using ./mwaa-local-env build-image

Thanks, it works for me


Google can't render anything which is destroying SEO

Server side rendering would fix this but $$$$$
The previous angular site was rendered, and google is known to render javascript (at least partially).
All we need is to render the meta tags, really.

Currently in universal hell. Send help.

Cool, adding import from 'airbnb-js-shims'; to index fixes this. Just need to update descriptions now.

Done, next step (if it will ever happen) will be to create a universal app for complete SEO control.


Paginator for backend

I'd like to add the paginator also in the backend and btw sorting the columns to improve the user experience

:+1: for paginator since we already have it in the frontend

:+1:

I'm :+1: on it. Showing unpaginated lists is a bad idea IMO.
@javiereguiluz does it need to be implemented here or in your admin bundle though ?

I'm :-1: because the demo application is not something you use in the real world ... but something you use to learn how real-world-looking apps work. If we already have a pagination example in the frontend, that's enough to show the newcomer how it's done.
@stof I don't fully understand your comment because this demo app doesn't use any bundle for the admin backend.

oh, I thought we were using your EasyAdminBundle. I should have checked

@javiereguiluz, but @ccab wants to add a sorting and etc., no only the pagination

@voronkovich in that case I also think it's a bad idea. The "good practice" here should be: if you need sorting, pagintion and all those common features ... use Sonata or any other backend bundle.

Ok so let's keep it in the frontend

Closing it as "won't fix" for the mentioned reasons.


Way to delete multiple episodes

Since all video files are available in the file manager and can consequently be deleted in bulk from there I am not planning on adding the feature.


Document load_template

I was thinking that we could add one extra param: eternal_template and let the users pass an absolute path to a non-standardized template.  What do you think, @dbarrosop?

I think that you were reading my mind. Was planning to suggest that as well :)
How do you envision this though? Given the name you gave to the variable I think we were thinking in two different implementations. The way I thought about this was as follows:

I have my own folder PATH where I put all my templates.
Each driver has it's own subfolder, ie, PATH/eos, PATH/junos, etc...
When I want to use my own template I just do d.load_template('my_service', template_path=PATH)

So my code doesn't have to figure out the current driver or anything. Is this what you were thinking?

Yes, exactly! I don't have a schedule it right now, but will make some time probably next week and implement it.

@dbarrosop I think this one can be closed by now