encoding/json: document behaviour of json.Marshal() with non-pointer elements with MarshalJSON() defined for pointers

Go version
go1.22.6, go1.23.0
Output of go env in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/dzenovich/Library/Caches/go-build'
GOENV='/Users/dzenovich/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/dzenovich/.gvm/pkgsets/go1.22.6/global/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/dzenovich/.gvm/pkgsets/go1.22.6/global'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/dzenovich/.gvm/gos/go1.22.6'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/dzenovich/.gvm/gos/go1.22.6/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.22.6'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/49/4jhg4kzs3pn3kfn5c4c1hkdw0000gn/T/go-build2096370642=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?
https://go.dev/play/p/Fu4gPKzV7MP
What did you see happen?
slice of structs: [{"V":"marshalled"}]
map with structs: {"v":{"V":{}}}
What did you expect to see?
slice of structs: [{"V":"marshalled"}]
map with structs: {"v":{"V":"marshalled"}}

Related Issues and Documentation

encoding/json: Json marshaler seems to not marshal correctly if there is an embedded struct with custom marshaller #46799 (closed)
encoding/json: Error in Marshalling Slice of Struct type -> affected/package: json #61710 (closed)
encoding/json: Marshaling embedded structures which supports custom json.Marshaler interface #29336 (closed)
affected/package: encoding/json #54609 (closed)
encoding/json: UnmarshalJSON not working consistently with struct embedding #39175 (closed)
encoding/json: Marshal silently ignores custom implementations on pass by value #30351 (closed)
encoding/json: Marshal skips checking Marshaler implementation for nil pointer #48430 (closed)
encoding/json: adding a MarshalJSON method confuses JSON marshalling #67154 (closed)
encoding/json: panic when unmarshalling to struct with embedded struct pointer #30489 (closed)
encoding/json: custom type marshaling doesn't work for map values  #55890

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

https://stackoverflow.com/questions/32495402/why-does-go-forbid-taking-the-address-of-map-member-yet-allows-slice-el
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions

I didn't ask about taking the address of map members. This is a bug report. It's about inconsistent behaviour of json.Marshal().

Also, I'm sure this behaviour can be fixed regardless of possibility to take an address of map members.

Re-opening. Related to #22967.
Here is a reduced version https://go.dev/play/p/_akdvjspgou:
type T struct{}

func (*T) MarshalJSON() ([]byte, error) {
	return []byte(`"marshalled"`), nil
}

func main() {
	s, _ := json.Marshal([]T{{}})
	m, _ := json.Marshal(map[string]interface{}{
		"T":  T{},     // not a json.Marshaler
		"*T": &T{},  // json.Marshaler
	})

	fmt.Printf("[]T: %s\n", s)
	fmt.Printf("map[string]any: %s\n", m)
}

This prints:
[]T: ["marshalled"]
map[string]any: {"*T":"marshalled","T":{}}

This boils down to json.Marshal treating the T elements in []T as a *T. A T is not a json.Marshaler while a *T is a json.Marshaler. Relevant line.
I doubt we can change this behavior. A large amount of code almost certainly depends on this. We may be able to better describe the current behavior in the documentation. (If this is described in the package documentation, apologies for missing it https://pkg.go.dev/encoding/json#Marshaler .)
@dsnet

Folks, it's easy to fix. Really, let's fix it instead of documenting.

I can create a PR if you will.

The problem is that changing behavior at this level will almost certainly break existing working code.  If we want to make this change, we need to first convince ourselves that that won't happen.

The current behaviour doesn't make sense, so it's unlikely for existing code to rely on it.

https://www.hyrumslaw.com/

I think this is #55890, where it has been noted that changing it is considered a breaking change

I think this is #55890, where it has been noted that changing it is considered a breaking change

There are no proof links of that though

Probably we could consider this change as something that can break something potentially, but will make life of Golang developers much better in the future. Looking at all the bug-reports related to the issue, I see that I'm not the only one who suffers from this issue. Just imagine, you can return rows returned by the DB into JSON, but you cannot return one DB row as JSON in format '{"data": row}' without creating a wrapping struct.

There are no proof links of that though

I tried fixing this in the past. There is proof of this. We can't accept this change in the v1 "json" package unfortunately.

I can only say that my change doesn't break any tests, so I consider it as non-breaking.

I don't think lack of tests is a good metric for "non-breaking". It just goes to show that our test coverage is lacking.
I agree that the the change is in the right direction what the package should have done, but I can tell you that previous attempts to fix this have been rolled back. The v2 "json" package is a place where we can fix this since there cannot be any usages depending on the current behavior.

The answer is never. Go 2, in the sense of breaking with the past and no longer compiling old programs, is never going to happen. Go 2 in the sense of being the major revision of Go 1 we started toward in 2017 has already happened.
(from https://go.dev/blog/compat)

I (and I believe many others too) would be happy to have consistent marshalling in Golang a bit earlier.

That quote by Russ is regarding the Go language specification itself.
A "encoding/json/v2" package is entirely different package that would be distinct from the v1 "encoding/json" package. Anything importing and using v1 "encoding/json" would continue to function as is, while anything that imports "encoding/json/v2" would use newer semantics. A program is allowed to import both v1 and v2 simultaneously.
(as an implementation detail, both v1 and v2 will use the same implementation under-the-hood, and pass relevant flags to specify whether to use v1 or v2 semantics.)

As an idea, can we turn on the new consisting marshalling behaviour via setting an ENV variable, for example? This way it will not break anything by accident.

That quote by Russ is regarding the Go language specification itself.
A "encoding/json/v2" package is entirely different package that would be distinct from the v1 "encoding/json" package. Anything importing and using v1 "encoding/json" would continue to function as is, while anything that imports "encoding/json/v2" would use newer semantics. A program is allowed to import both v1 and v2 simultaneously.
(as an implementation detail, both v1 and v2 will use the same implementation under-the-hood, and pass relevant flags to specify whether to use v1 or v2 semantics.)

Sounds good, but marshalling is mostly called by third-party libraries which will still use v1 "encoding/json". No chances to upgrade quickly :(

As an idea, can we turn on the new consistent marshalling behaviour via setting an ENV variable, for example? This way it will not break anything by accident.

We already have GODEBUGs.

 The Go specification tries to be explicit about most properties of the language, but there are some aspects that are undefined. Programs that depend on such unspecified behavior may break in future releases.

@zenovich I am sympathetic to your arguments.  But every change is a matter of weighing costs and benefits.  You are focusing on the benefits.
We have to seriously consider what happens if we do make this change.  We know, from what @dsnet says, that some existing code will break.
The effect will be that people will upgrade to a new version of Go, and their program will stop working in a strange way.  They will look at the release notes.  It's unlikely that the failure mode will be clearly reflected in the release notes, but they may eventually figure out that it is due to a change in how encoding/json handles the MarshalJSON (or MarshalText) method.  For most people, this will be buried in some dependency of their program that they have never looked at closely.  They will have to figure out which dependency it is, report a bug, and wait for a fix.
Or, more likely, they won't even go down that path, and will just report a bug to us saying "I updated to a new Go release and my program stopped working."
No matter what happens, it's not a good experience.
So, changing this behavior carries a cost.
Of course, changing this behavior also carries a benefit, which you've described.
Now we have to weigh the cost and the benefit, and decide what to do.
Our current decision is that we will aim to have more clear behavior in encoding/json/v2.  That will let us reap the benefit over time, with a much smaller cost.
It's true that other choices are possible.  The way to argue in favor of those other choices is not to just focus on the benefits.  It's to explain why the benefit is worth the cost.

@ianlancetaylor I understand your point. What do you think about turning the consistent marshalling behavior on/off via the GODEBUG variable?

True, it's clear that if we make this change we will need to support disabling it using GODEBUG.  That mitigates the cost somewhat, in that once someone figures out what the problem is, they can set the GODEBUG rather than wait for their dependency to be fixed.
But of course a GODEBUG has a different, arguably lesser, cost: we have to maintain two different code branches and test both of them.  Plus of course documentation.
This is also an unfortunate case where the same code behaves differently depending on the GODEBUG setting.  The ideal GODEBUG is one where one version or the other simply fails.  For example, ending support for some insecure crypto library unless a GODEBUG is set.  In that case it is generally clear enough that GODEBUG is the right approach, and that setting GODEBUG (which is a global setting) won't introduce an unexpected failure.  When GODEBUG causes a behavior change, we have to worry about the possibility that some parts of a large program expect one behavior, and some parts expect another behavior.
So we still have to weigh costs and benefits.

It seems this is very similar (or same) to #55890. Closing as a duplicate. The discussion can be continued there. Thanks.


Graph Algorithms

Create a folder for graph algorithms and add algorithms like

bfs
dfs
dijkstra's algorithm
kruskal's minimum spanning tree

Can you assign me the mentioned algorithms

You can do it.
On Thu, 1 Oct, 2020, 9:51 pm cs-mshah<EMAIL_ADDRESS>wrote:

Can you assign me the mentioned algorithms
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Iltwats/hacktoberfest/issues/56#issuecomment-702247470,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AM5BX6FVN3SQ5VOS6LFZQZLSISUAPANCNFSM4SAUQLWQ
.

--
www.jecrcuniversity.edu.in http://www.jecrcuniversity.edu.in
ENGINEERING | SCIENCES | MANAGEMENT | HUMANITIES | LAW | AGRICULTURE |
HOTEL MANAGEMENT | JOURNALISM MASS COMMUNICATION | DESIGN |
*
*Important:
The information in this email is confidential and may be legally
privileged, It is intended solely for the addressee(s). Access to this
email by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution is prohibited and may be
unlawful. If you are not the intended recipient, please contact the sender
by reply email and destroy all copies of the original message. Thank you,
JECRC University - Disclaimer
*"SAVE PAPER.  Good for your planet. Good for
your Business" *

I Have make the PR. Kindly check it!

Can I get this issue assigned under Hacktoberfest 2022?
I'm starting of this year hence any suggestion related to the same would be helpful.


Firefox extension missing

I use Firefox, but the extension seems to not be on the marketplace anymore.
Given the last time of update, is this abandonware? Would love such a tool, as I'm developing a very complicated library for Elm and use debug all the time.

Hey, I have checked the Firefox extension and it has been removed because the code is compiled, even though I have provided them with the link to this repository to see the code for themselves :/ I might try to put it up again, but my priorities now lies elsewhere.
In the meantime, you can use the https://github.com/kraklin/elm-debug-transformer#installation - this extension is just a wrapper of the transformer with settings.


Ability to limit maximum number of clients

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

6 of 8 (75.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.03%) to 98.581%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

server.go
6
8
75.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.03%

Covered Lines:
5698

Relevant Lines:
5780

💛  - Coveralls


Build database-specific integrations

Right now we generate Rakefile that has postgres support only. It'd be nice to have a system that allows people to work with their favourite databases.
This should probably be provide by another gem.

It will be cool if there is any way to use mongoid with project but I am not sure what you think about this.

Hey, @timriley is there any one working on this one? if not I would like to help with this one


Afterglow: why uvl.w/2048.0

Hi,
I'm trying to port woscope to a native Rust application and would like to ask a question regarding the fragment shader.
The afterglow coefficient is smoothstep(0.0, 0.33, uvl.w/2048.0), but uvl.w is floor(aIdx / 4.0 + 0.5), so between 0 and 1. That makes the afterglow coefficient basically 0, no? I am puzzled by why it still displays right in woscope, but it makes the line disappear in my application, as expected. What is the reason for this smoothstep expression?
Also, are the aIdx indices floats instead of ints because of JS?

floor(aIdx / 4.0 + 0.5)
aIdx is an integer index (stored in float) that grows from 0, thus uvl.w / 2048.0 can have values from 0 to 1 if you have 2048 points.

Also, are the aIdx indices floats instead of ints because of JS?

Yes...

What is the reason for this smoothstep expression?

The reason for smoothstep here is to emulate the trail fade-out, instead of having uniform intensity.
I didn't do any rigorous calculations to do this properly, but it is still visually more pleasing than not doing anything.

Thank you for your replies! My mistake was not reading the code that calls the shader closely enough, I had just set aIdx directly to values in [0, 1, 2, 3] for all vertices and did away with the mod. Is the tail overlapping with the previous frame's non-tail section, i.e. are you rendering some vertices twice?

Is the tail overlapping with the previous frame's non-tail section, i.e. are you rendering some vertices twice?

If you're asking if I'm rendering some points on multiple frames, then yes.
I render 2048 points, and a 44KHz waveform is producing ~733 points per frame, so I render each point approximately three times.

I'm closing the issue.
If you have further questions or need some help, please contact me via email.


Automatic proxy and Windows

Hi
On windows, reqwest reads the registry and sets proxy from there.
Implemented in #547 .
First, I want to say it is great !
However, I have an issue that I can't mitigate from this change.
At work, we have 2 proxies : one auth, one basic.
By default from GPO, settings point to the auth proxy, which is not supported by reqwest.
If I set the basic proxy in the environment, it is ignored. Which is what is expected from the code.
I need environment to take precedence over registry, if it is set. And I think this is expected behaviour.
Do you think it can be changed ?
NB: My issue arised when trying to update rust with rustup, which use reqwest.

It looks like the code will check the environment first, and only if it is empty, will it check the registry. It's not doing that? How are you setting the environment?

I tried cmd and powershell, with their respective env commands, set or $env:
I tried lowercase and upcase.
I tested get_proxies() by copying everything, and it gets the proxy from environment.
I tried to debug a ClientBuilder, but it only outputs "ClientBuilder".
How can I check the proxies set with "let c = Client::builder().use_sys_proxy();"
I then tried with manually setting the proxy, and I still got "auth req". 😮
How can I get the raw answer from the proxy ?
And I double checked the proxy I'm using, it is definately the one without auth.

I tested get_proxies() by copying everything, and it gets the proxy from environment.

To be clear, you copied the fn get_proxies code into a new rust file and ran it, and it correctly sees the environment before the register, but then reqwest doesn't? Most odd! What version of reqwest is being used?

No.
I did copy get_proxies (and a few others). It sees the environment first. I think reqwest also get the environment, but I don't know how to check.
Then I tried :
    let c2 = Client::builder()
        .proxy(reqwest::Proxy::all("http://my.nonauth.proxy:8082")?)
        .build()?;
    let res = c2.get("https://monip.org").send();

And I still get

Error(Hyper(Error(Connect, Custom { kind: Other, error: "proxy authentication required" })), "https://monip.org/")

I think reqwest get the proxy right, but the proxy answer something wich makes reqwest (or hyper)

think it is an auth proxy, while it isn't.

or reroute the request to the auth proxy.

Without the raw exchange, I can't tell. If there is no way to print it from rust, I will sniff the conversation, but I would like to try it first in rust, to know how to do it.
I opened this issue on reqwest because I have a few others softwares going through the non auth proxy, and they work just fine. So far, only rustup and my little program to simply check an url using reqwest have this behaviour.

I captured network with wireshark, and the only difference I see is that reqwest does not supply a user-agent. Even if I force one.
If I use wget --user-agent="", it also fails with proxy authentication required.
I'm not sure it's required per spec, but it seems to be on my proxy.
I didn't see how to set it for the proxy.

My IT is gonna change the setting, hopefully.
Not sure anything should be done on reqwest side.

HTTP 1.1 RFC says :
A user agent SHOULD send a User-Agent field in each request unless specifically configured not to do so.

Ya, I think the user agent should be sent to the proxy.

A fix for this has been published in v0.9.21.

Thanks.
Just tested, it works.


Scroll after create Graph

Hello!
First of all I want to thank you about this awesome library! I'm using it in a new project and It's really smooth. I only have one question. Is it posible to automatically scroll to the end of the graph after it appears on the view?
Best regards!

Same problem here.

Just figured it out. You can change the scroll direction:
graphView.direction = ScrollableGraphViewDirection.RightToLeft

RightToLeft will automatically scroll to the end of the graph .

Hi hdoria!
I tried this line of code but It doesn't work for me 😟
`let graphView = ScrollableGraphView(frame: CGRectMake(0.0, 0.0, self.frame.width, self.frame.height))
graphView.topMargin = 80
    graphView.backgroundFillColor = UIColor.colorFromHex("#333333")

    graphView.lineWidth = 1
    graphView.lineColor = UIColor.colorFromHex("#777777")
    graphView.lineStyle = ScrollableGraphViewLineStyle.Smooth

    graphView.shouldFill = true
    graphView.fillType = ScrollableGraphViewFillType.Gradient
    graphView.fillColor = UIColor.colorFromHex("#555555")
    graphView.fillGradientType = ScrollableGraphViewGradientType.Linear
    graphView.fillGradientStartColor = UIColor.colorFromHex("#555555")
    graphView.fillGradientEndColor = UIColor.colorFromHex("#444444")

    graphView.dataPointSpacing = 80
    graphView.dataPointSize = 2
    graphView.dataPointFillColor = UIColor.whiteColor()

    graphView.referenceLineLabelFont = UIFont.boldSystemFontOfSize(8)
    graphView.referenceLineColor = UIColor.whiteColor().colorWithAlphaComponent(0.2)
    graphView.referenceLineLabelColor = UIColor.whiteColor()
    graphView.dataPointLabelColor = UIColor.whiteColor().colorWithAlphaComponent(0.5)

    graphView.shouldAnimateOnStartup = true
    graphView.shouldAdaptRange = true
    graphView.adaptAnimationType = .Elastic
    graphView.animationDuration = 1.5
    graphView.shouldRangeAlwaysStartAtZero = true

    self.graphView?.direction = .RightToLeft

    graphView.setData(values, withLabels: labels)
    self.graphContainerView.addSubview(graphView)`

@hdoria Yes! That property can be used to change which end of the graph it starts at.
@llKoull Try changing:
self.graphView?.direction = .RightToLeft
to
self.graphView.direction = .RightToLeft
I don't think you have declared graphView as an optional.
Otherwise I can't see any other major mistakes. Does it not start at the end of the graph even after changing the direction to .RightToLeft? (Note there is no scrolling animation for this property, it will just start at the end of the graph and the user will have to swipe to the left to see the start of the graph.)

Hi @philackm !
I tried to use self.graphView.direction = .RightToLeft but xcode gives me an error and I cant compile. I also tried to declare it as ! and the i can compile but i get

unexpectedly found nil while unwrapping an Optional value

I always have to scroll from left to right no matters which direction i choose :O
Thanks for your help

I finally got this working, It was my fault, I was using self.grapView and i should use graphview instead.
But now i've got another problem, The graph scroll, that's nice, but the graphic it's not filled with color It seems that only half part of the graphic is filled until i touch It (some lines and the Y-axis values are also hidden. If i touch the graph It fills up with the correct color).
I attach some pictures!

Thanks and best regards!

Hmmm. Could you post the code you have to a GitHub gist (https://gist.github.com) and then post the link here? I'd like to try reproduce it and find what's causing the bug.

On Jun 9, 2016, at 7:39 AM, Raúl Vidal Muiños<EMAIL_ADDRESS>wrote:
I finally got this working, It was my fault, I was using self.grapView and i should use graphview instead.
But now i've got another problem, The graph scroll, that's nice, but the graphic it's not filled with color It seems that only half part of the graphic is filled until i touch It (some lines and the Y-axis values are also hidden. If i touch the graph It fills up with the correct color).
I attach some pictures!
Thanks and best regards!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I'm sorry, but i can't post all the code. Anyways, I can tell you what i've done.
I created a UICollectionView with a custom cell called GraphCollectionViewCell. This is the code of the custom cell:
`import UIKit
import ScrollableGraphView
class GraphCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var graphTitle: UILabel!
@IBOutlet weak var graphContainerView: UIView!
var graphView: ScrollableGraphView?

required init(coder aDecoder: NSCoder)
{
    super.init(coder: aDecoder)!
}

func initializeGraph(values: [Double], labels: [String])
{
    let graphView = ScrollableGraphView(frame: CGRectMake(0.0, 0.0, self.frame.width, self.frame.height))
    graphView.topMargin = 80

    graphView.backgroundFillColor = UIColor.colorFromHex("#333333")

    graphView.lineWidth = 1
    graphView.lineColor = UIColor.colorFromHex("#777777")
    graphView.lineStyle = ScrollableGraphViewLineStyle.Smooth

    graphView.shouldFill = true
    graphView.fillType = ScrollableGraphViewFillType.Gradient
    graphView.fillColor = UIColor.colorFromHex("#555555")
    graphView.fillGradientType = ScrollableGraphViewGradientType.Linear
    graphView.fillGradientStartColor = UIColor.colorFromHex("#555555")
    graphView.fillGradientEndColor = UIColor.colorFromHex("#444444")

    graphView.dataPointSpacing = 80
    graphView.dataPointSize = 2
    graphView.dataPointFillColor = UIColor.whiteColor()

    graphView.referenceLineLabelFont = UIFont.boldSystemFontOfSize(8)
    graphView.referenceLineColor = UIColor.whiteColor().colorWithAlphaComponent(0.2)
    graphView.referenceLineLabelColor = UIColor.whiteColor()
    graphView.dataPointLabelColor = UIColor.whiteColor().colorWithAlphaComponent(0.5)

    graphView.shouldAnimateOnStartup = true
    graphView.shouldAdaptRange = true
    graphView.adaptAnimationType = .Elastic
    graphView.animationDuration = 1.5
    graphView.shouldRangeAlwaysStartAtZero = true

    graphView.setData(values, withLabels: labels)
    graphView.direction = .RightToLeft
    self.graphContainerView.addSubview(graphView)
}

// MARK: Setters

// MARK: Getters

}
`
Then I initialize the cell in the main view using the function

func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell

with the following code:
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(identifier, forIndexPath: indexPath) as! GraphCollectionViewCell             cell.initializeGraph(stepsArray, labels: labelsArray)             return cell
I think that I autolayout can be affecting to the view.
Thanks for your help!

Same problem here. This only happens when using ScrollableGraphViewDirection.RightToLeft.

Okay I just pushed 1.1.1 to cocoapods.
@hdoria, @llKoull Can you please try that version and let me know if it is any better?

Yeah! It's working perfect! ^_^
Thanks @philackm !!!


todo: linux disto inclusion, appimage?

It may make sense to see if we can get packages for various linux distros, or something cross-distro like appimage.
Edit: the latter should be easy now that the application only depends on SDL2 directly.

What help do you brew with your Linux distro reach me out at@giwaruly

What help do you brew with your Linux distro reach me out at@giwaruly

Please don't post if you don't have anything to add with regard to the issue.


Password not set for user created by unleash_user resource

Describe the bug
When creating a user using uleash_user resource, the password is not being set and seem to get ignored.
terraform {
  required_providers {
    unleash = {
      source = "Unleash/unleash"
      version = "1.0.0"
    }
  }
}

provider "unleash" {
  base_url      = "http://localhost:4242"
  authorization = "*:*.admin-token"
}

resource "unleash_user" "arun" {
  email      =<EMAIL_ADDRESS>  name       = "Arun"
  username = "arun"
  root_role  = 1
  send_email = false
  password  = "arun123"
}

Steps to reproduce the bug
No response
Expected behavior
The password should be set for the user
Logs, error output, etc.
2023-11-06T19:38:47.610+0530 [INFO]  provider.terraform-provider-unleash_v1.0.0: Enable debug logging true: @caller=github.com/Unleash/terraform-provider-unleash/internal/provider/http_transport.go:26 tf_req_id=9dab6e2b-6cc9-f3c8-88ce-7a0570edec52 tf_resource_type=unleash_user tf_rpc=ApplyResourceChange @module=unleash tf_provider_addr=registry.terraform.io/unleash/unleash timestamp=2023-11-06T19:38:47.609+0530
2023-11-06T19:38:47.610+0530 [DEBUG] provider.terraform-provider-unleash_v1.0.0: Request:
POST /api/admin/user-admin HTTP/1.1
Host: localhost:4242
User-Agent: OpenAPI-Generator/1.0.0/go
Content-Length: 92
Accept: application/json
Authorization: *:*.c35bff34002ab6dd50894020f38d5efce15383c06bceebc37192a6f5
Content-Type: application/json
Accept-Encoding: gzip

{"email":"arun@example.com","name":"Arun","rootRole":1,"sendEmail":false,"username":"arun"}
: tf_provider_addr=registry.terraform.io/unleash/unleash @module=unleash tf_req_id=9dab6e2b-6cc9-f3c8-88ce-7a0570edec52 tf_resource_type=unleash_user tf_rpc=ApplyResourceChange @caller=github.com/Unleash/terraform-provider-unleash/internal/provider/http_transport.go:30 timestamp=2023-11-06T19:38:47.610+0530
2023-11-06T19:38:47.709+0530 [DEBUG] provider.terraform-provider-unleash_v1.0.0: Finished creating user data source: @caller=github.com/Unleash/terraform-provider-unleash/internal/provider/user_resource.go:165 @module=unleash tf_req_id=9dab6e2b-6cc9-f3c8-88ce-7a0570edec52 success=true tf_provider_addr=registry.terraform.io/unleash/unleash tf_resource_type=unleash_user tf_rpc=ApplyResourceChange timestamp=2023-11-06T19:38:47.708+0530

Screenshots
No response
Additional context
No response
Unleash version
5.6.4
Subscription type
Open source
Hosting type
Self-hosted
SDK information (language and version)
No response

Hi @arunvelsriram I just tested this and reproduced it. The password is not taken into account and I think it's something I missed. Opening a PR soon


Add the emojione from  http://emojione.com/demo/

This program would be even cooler with the emoticons

This would be especially good for consistency as currently Riot Desktop is using emojione and those emojis look very different on Android (and possibly iOS) which uses its native emojis.
I think Telegram is also using emojione on all clients.

IIRC, Telegram actually uses the Twitter emojis by default, of which the copyright status is unclear, which is why the Telegram fork on F-Droid ships without those and uses system emoji. Anyway, Emoji One is a very good emoji set and I'd definitely support using that

Actually, I don't mind which set it is, but consistency is important—among Web and Android and iOS as well as among different Android devices.
See also: https://www.inverse.com/article/14097-emoji-differences-by-platform

Emojis can be sent by modern Android keyboard


fix: enforce https

This PR should fix #1880 by making the $is_stripprefix_enabled parameter default to true, similar to the $is_gzip_enabled parameter, and pushing it to the other middlewares.
After investigating this issue, I've recognized that it doesn't matter whether "Enable gzip compression" or "Force Https" is disabled in the "Advanced" section. The default parameter is always applied. This can be considered a temporary fix until the underlying issue with providing the correct parameters to the function is resolved.
Never wrote php so please be kind:)

Force HTTPS is enabled by default, but only adds the right middleware to the container labels, if you are using https (as if you configure http, it does not make sense to force it).
Using http (force https middleware is not used):

Changing to https (middlware is used):

(same for gzip)
How can I reproduce the issue?

Thanks for this PR. I found the issue and this PR is not needed. It will be fixed in #2805


Enable the auto-refresh authentication option

Refresh Auth:

There is a new back-end service running in a non-UI thread
The service scans all auth tokens every 1 minutes
If the token is expired or the token will expire within 3 minutes, it does auto-refresh the authentication
As long as the auth gets updated, UI thread get notification of  the updated token.

Waiting on #68.

#68 resolved, waiting on #71.

#71 is complete, is this available to merge now?

https://github.com/lic-nz/Malone/pull/69#issuecomment-183973305

@lianwanggit Can you re-submit and target the develop branch?
cc @VladMukhitdinovLic

Some quick thoughts:

What does the UX look like for this?
I'm not sure that auto-refreshing is the best approach, unless it is opt-in/out. You may want to actually have a test with expired tokens.
I'm not sure that auto-scanning is a good idea either, it could be wasteful? I imagined it would be more on-demand: as a request is initiated, refresh the token at that point if required.
I would be interested to know how you communicate the token updates through the UI.
If we extended Malone in the future to support other auth mechanisms, would this be modularizable?

In [Add Token] page, there is an option to enable/disable Auto-refresh
If enabling Auto-refresh, the background task will request and renew token repeatedly. From the users point of view, the token never expires.
Auto-scanning works also on demand, it only refresh the tokens which are expired or will in a short interval (configurable). Anyway, your idea sounds better
The token-auto-refresh-service keeps the cache of all tokens and notifies UI if anything changes by its refreshing
Of course, the current service relies on OAuthApplication, should be extendable for generic auth applications.

It RP is discarded. Please refer to new PR -  Autorefresh #84

Thanks


Network optimisations

[ ] Replace set of connections with a more efficient data structure. Ideally we should be able to find connections to/from any node without having to iterate through the list. A Map<INetworkNode, Set<INetworkNode>> would work, but it does mean a two way mapping is harder to ensure.
[ ] Bring back the unit tests. I deleted them in 3bc51af1a10666891fe4d72177e37fa15e373ca0 but it might be worth bringing them back in a different form to ensure that everything works correctly.
[ ] Optimise the network code. Currently removing a node recreates the entire network. This could be happening several hundred times on a chunk unload.
[ ] Cables cache connections
[ ] Send packets directly rather than on the update tick.

I do think having a set of connections is the most efficient way of doing this. It's much better than traversing the entire network multiple times for any change, which is what vanilla CC does.

The trouble is that it is much harder to then find connections from a node, and so to send a message you end up iterating the connection map once for every node on the network - which isn't optimal.

I think that operation is rather minimal. The advantages of remembering connections as a set are fairly valuable I think

You're probably right. I'll profile everything later today to see if there are any hot spots though.

For instance, in creating new networks when a node is removed, all that needs allocating is the new network objects. The connections get to be transferred from one to the other very efficiently. And especially joining two networks is really efficient this way.

Looking at OpenComputers, they use Map<INetworkNode, Set<Connection>>. I don't want to copy and paste their network infrastructure, but it is pretty well written.
Also, they've copied my idea of using markdown as an in-game documentation format. :frowning:.


Possibility of reducing the Bezier curve ?

Can I reduce the Bezier Curve approximation as a parameter? Sometimes the signature looks like ink pen spreading a bit more than a normal ball pen would. Is it possible to make the image more sharp by reducing the curve interpolations? I changed the minWidth and maxWidth but it still needs to be more sharp.Please let me know. As an example there is this http://willowsystems.github.io/jSignature/#/demo which is more sharp.

I'm not really sure what you mean by sharp, but have you tried setting minWidth and maxWidth to the same value, e.g. 1?

Thanks for the prompt response, I will keep it 1 - 1.5 that looks fine.
Can I actually make Bezier Curve approximation optional to see how that looks like ?
I wanted to see how the real stroke is vis-a-vis the approximated one.

Unfortunately not. But you could probably modify SignaturePad.prototype._drawCurve method and remove the interpolation. It takes Bezier curve as its input, so you could simply remove the whole code there and draw a straight line between its beginning and end.

Thanks! I will just try that just to see how it looks like.

@nishantvarma I'm closing this issue. If you got any more questions, please reopen it.


Regression in parsing of variables named required

@keertip found this testing the bleeding edge analyzer on some internal code.  The analyzer currently (as of 9e87c1667783666c6ba14a43ceda1a451b2a7597) rejects code like the following:
main() {
  var x = [];
  for (final required in x) {}
}

We have been discussing the possibility of making required a reserved word when NNBD is enabled, however even if we do so, we need it to keep working now, and we will need it to continue to work for opted-out libraries even after NNBD is released.
This bisects to @danrubel's commit ebdefa3f5fc2d66cdc969f61a1f409f5fdb2c28f.
Dan is on vacation today so I'm looking into doing a short-term fix by reverting ebdefa3f5fc2d66cdc969f61a1f409f5fdb2c28f (as well as the follow-up commits that depend on it).

Looks like this problem has been here all along, but we only just bumped into it when I added "required" as a modifier. It also fails if I use "external" in place of "required".


[Bug] Chat frame position resetting everytime UI is reloaded (? Blizzard issue)

Chat is resetting to default size everytime I reload the UI. Started happening 30 minutes ago from report.
Not sure why it is happening, or if anyone else is having this issue!
EDIT: upon further investigation, I think this could be a Blizzard issue, the quest log has also been moving vertically during the same period the chat has gone wonky.

LS (Developer) did manage to fix a similiar kind of issue on my end, the fix was to uncheck "Raid Frames" in Blizzards Edit Mode. Try that and report back.

Don't get me started on all the "Edit Mode" bugs. Sometimes you need to save things twice. Like, you move a frame, you hit save, then you move it again, and hit save again. And only then it'll actually save its position properly. It's not unique to the chat frame.

Just getting on now, will give what you said a go! :D

You'll have to be patient with Blizz layout manager for the time being, prob until 10.1 even.... It's not raw, but it's def half-cooked 😅

No stress, if I have to configure the chat everytime I hop on for now it's ok. Not ur fault :)
It's so much better than default chat, so thank you so much for doing this!

No stress, if I have to configure the chat everytime I hop on for now it's ok.

This really shouldn't be happening. Something is really wrong here, in the worst case scenario, just disable all addons, position chat and other frames, reenable addons.


[BOT PR] to update dependencies of istio

This PR will be merged automatically once checks are successful.
none

@istio-testing: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
7660e0a8b088a6295046bf839ba167a0e98fec75
link
/test istio-unit-tests

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

@istio-testing: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
7660e0a8b088a6295046bf839ba167a0e98fec75
link
/test istio-unit-tests

prow/istio-pilot-multicluster-e2e.sh
7660e0a8b088a6295046bf839ba167a0e98fec75
link
/test istio-pilot-multicluster-e2e

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


Net8 FluentAutovalidation and the default ModelStateInvalidFilter

LS,
I have a Net 8 api project  with an ApiController with the following method
[HttpGet("{companyName}/{groupName}")]

public async Task<IActionResult> GetData([FromRoute] string companyName, [FromRoute] string groupName)

I have FluentValidationAutoValidation configured just as the example in the ReadMe, so with
// Disable the built-in .NET model (data annotations) validation.
configuration.DisableBuiltInModelValidation = true;

// Only validate controllers decorated with the FluentValidationAutoValidation attribute.
configuration.ValidationStrategy = ValidationStrategy.Annotations;

The ApiControler has not been decorated with the [FluentValidationAutoValidation] attribute.
When calling the api, I get a 400 error. In the logging I see:
...
Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder: Debug: Done attempting to validate the bound parameter 'companyName' of type 'System.String'.
...
Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder: Debug: Done attempting to validate the bound parameter 'groupName' of type 'System.String'.
...
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Action Filter: Before executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Action Filter: After executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Action Filter: Before executing OnActionExecutionAsync on filter SharpGrip.FluentValidation.AutoValidation.Mvc.Filters.FluentValidationAutoValidationActionFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Action Filter: Before executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter: Debug: The request has model state errors, returning an error response.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Action Filter: After executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Debug: Request was short circuited at action filter 'Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter'.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Action Filter: After executing OnActionExecutionAsync on filter SharpGrip.FluentValidation.AutoValidation.Mvc.Filters.FluentValidationAutoValidationActionFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Action Filter: Before executing OnActionExecuted on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Action Filter: After executing OnActionExecuted on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Result Filter: Before executing OnResultExecuting on filter Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Result Filter: After executing OnResultExecuting on filter Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Result Filter: Before executing OnResultExecuting on filter Microsoft.AspNetCore.Mvc.ProducesAttribute.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Result Filter: After executing OnResultExecuting on filter Microsoft.AspNetCore.Mvc.ProducesAttribute.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Trace: Before executing action result Microsoft.AspNetCore.Mvc.BadRequestObjectResult.

So somehow the default MVC ModelStateInvalidFilter now determines that the model is invalid.
If I set DisableBuiltInModelValidation to false, this behavior disappears.
Any ideas?
Thanks,
David.

Hi @David-Mulder-at-VLK, which version of the library are you using?

Hi @mvdgun ,
Version 1.3.0 of SharpGrip.FluentValidation.AutoValidation.Mvc and FluentValidation.AspNetCore Version 11.3.0".

Hi @David-Mulder-at-VLK, I just released v1.3.1 of the library fixing your issue.


Missing example at https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

Request type

[ ] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[x] Correction or update

Details

The first sentence after the interactive "HTML Demo" section states "The above examples" (ie plural—more than one example). Also, the rest of the paragraph refers to two examples. The problem is that there's only one example in the interactive HTML Demo.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

Thanks for reporting this! I think we used to have two examples here, but we ended up deleting one because it was getting too big for the interactive example.
I've altered the text so that it works for the one remaining example.


The exampleSite directory does not contain the demo site

This theme looks awesome, but one minor issue is that the exampleSite directory in the repo doesn't contain the source code of the demo site at https://accessible-minimalism.netlify.app/

Thanks for reporting, @james-d-mitchell - will look into it! (can't promise how soon, but if the issue is open, it's on my todo list!)


Release v1.2.7

fix - Google IDP doesn't work when created with ROSA CLI
Refactored ROSA to create operator policies when running rosa create cluster
SDA_4308: use root CA to generate OIDC thumbnail
support for path in iam roles and policies
Create cluster - use a GET request to describe cluster details
Refactor GetCluster function
add arn path to ocm and user role
fix- It failed to set empty value with "" for no_proxy filed via interactive mode
Add red-hat-managed tag to roles and policies
Adding an info message after rosa delete admin
compare arn path for existing policy/role
missing '--operator-roles-path' in 'To create this cluster again...'
bump ocm sdk to 0.1.285
allow setting billing model for addong installations
fix setting interactive mode enable for addon installation billing mode
policies: Ensure policy version succeeds
cluster: Allow using local AWS credentials
Only display supported machine types by region
Deleted account and operator policies
ocm: Add aliases for local development
red-hat-managed=true tag now added to operatorroles
move operator policies from account to operator commands
hide arn path flags
Ensure prerequisites for deleting operator and account role policies
path for account and operator roles and policies
fix manual create operator policy sda-6740
Upgrade OCM-SDK-GO version to 0.1.287
Add support for Hypershift cluster creation
Added redhatmanaged=true tag to roles when rosa upgrade operator-roles is ran
Create cluster - list region filtered by OCP version
Improve EnsurePolicy error message
Add also local-proxy env config
set mode only once in operator roles upgrade
fix: changing description for channel group
fix: description of version arg
fix: reporting correct message back if specific version was chosen
[Hypershift] Modify describe cluster to differentiate between classic vs Hosted-cp
feat: adding -o yaml/json option to cmd whoami
Upgrade	cluster	manual mode - prompt the aws operator role upgrade commands
checking addon params
fix: ':' character was at the wrong place
Removing unnecessary hypershift check for managed services.
adding escaped carrier to start of --path argument in ocm-role
Fetch all regions for non-interactive mode
fix: adjusting order of calls to make sure deletion calls aren't being duplicate, this caused a 500 error on login after deleting and recreating admin from a newer rosa cli
refactor: adding strategy and function to check if created on old ROSA
[Hypershift] Enable subnet validation for Hosted clusters
feat: unify acc roles its policies paths
fix: missing changes for --role-path
feat: unify operator role and policy with path from account roles
feat: removing path from ocm-role as it is not supported. oidcProvider already didn't had a path arg
fix: getting path from master instance role
feat: remove operator role path in create cluster in favor of master role path
fix: remove operator-role-path from generated create cluster command as it was deprecated
[Hypershift] Modify describe cluster to differentiate between classic vs Hosted-cp
[Hypershift] Arg validation for Hypershift clusters
fix: using installer instead of control plane role for path
Update stage console URL
go: Bump version to 1.18
Added RedHatManaged=True to manual operator/account/user roles creation
lint: Remove deprecated linter
fix: adding back ocm-roles path option and keeping it hidden
feat: deprecate 'compute-nodes' args in favor of 'replicas' in create cluster cmd
fix: adding trim spaces and tabs when validating cluster name
fix: remove path arg from -h ocm-roles description
Added redhatmanaged=true tag to operator roles in manual mode
fix: enable path arg visibility
chore: add gdbranco github user to owners file
feat: adding message about operator roles and policies path
[SDA-5966]: Rosa STS mode auto conflicts with the watch option
fix: path compatibility issue with inline policies from acc roles
[SDA-6075] Add upgrade policy to rosa struct information when displayed with the rosa describe cluster with -o json or -o yaml

@vkareh @hunterkepley @gdbranco  @jordigilh PTAL

/lgtm

(reordered/ cleaned the release note)


Update mocha to avoid vulnerabilities

Dev Dependencies don't cause security vulnerabilities in your code. npm doesn't install them when you install this project.

Yes, it is less problematic as it only affects people who work directly on this package, but I see no reason to use a 3 year old version instead of the current one. All tests still work.

Unfortunately they don't: https://travis-ci.org/github/jonschlinkert/normalize-path
Changing the build matrix is a breaking change because you no longer test those older versions of the platform.
We'll consider this upgrade when we are ready for a major (breaking) release.

Okay, that's definitely a valid reason then. Thanks for the Travis CI link.

👍 sorry that the PR didn't have the run attached. It seems like github is acting up a bit.


[MRG] Issue warning when points are revaluated

Fixes https://github.com/scikit-optimize/scikit-optimize/pull/163
Supersedes https://github.com/scikit-optimize/scikit-optimize/pull/170

Looks good to me.
(Might be nice to have #234 merged to avoid constantly rebasing it upon new changes such as this one.)

Current coverage is 85.44% (diff: 100%)

Merging #291 into master will increase coverage by 0.18%

@@             master       #291   diff @@
==========================================
  Files            25         25
  Lines          1371       1388    +17
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1169       1186    +17
  Misses          202        202
  Partials          0          0

Powered by Codecov. Last update 7382a81...18987b1

Rebase and merge.
(Tried out the "resolve conflicts" button on the github webpage but not sure I really know what I am doing. Looks useful though)

Not sure what happened? I rebased and pushed and it closed automatically! ?

All commits are gone :o

:ghost: ? :-/


Adding initial scripts

[x] Script for creating label in all existing repo of an organization
[x] Script for subscribing to all repo of an organization for triage members
[x] Improved readme

Hey @bjohansebas :wave:
Yes, organization can be passed as arguments. Additionally, we can do the following things,

Take token as argument (making sure its not logged as it would expose it to programs like ps.)
Take organization(s) as argument
Take label, color as argument
etc.

However, I don't that effort is required here. I think we should put more focus on the task at hand instead of making these scripts all customizable as they are intended for a few people only?

Hey @bjohansebas 👋
Yeah, I thought about adding a package.json too. I was a bit hesitant to be honest. I was thinking whether I should add it or not.
Then the negative arguments won in mind, such as,

Right now we have two scripts that uses different packages, not everyone may use both scripts
We do not need any scripts to run via the package.json

But yes, its merely my opinion. Let's wait and hear opinion from other people as well. There's certainly no harm in adding the file.


Expose detailed LibTxt metrics

This is a tracking issue to track multiple chunks of work related to exposing LibTxt metrics.

I will close this as it does not seem there are issues to track.  #35994 seems to be sufficient in accomplishing the tracking.


update dependencies

apart from a minor comment sounds good, I have to take some time to re-run the benchs :+1:

thanks!


Karaf 4 support

Hello,
is this project still alive?
It seems not to be working with Karaf 4 and perhaps also not with Eclipse Mars. Don't know who is responsible for the NPE.
Current EIK sources

lookup in etc for a file called "org.apache.felix.karaf.features.cfg", in Karaf 4 it is named "org.apache.karaf.features.cfg"
lookup in lib for a file called karaf.jar, in Karaf 4(.0.1) this should be lib/boot/org.apache.karaf.main-4.0.1.jar

Is there someone working on this plugin anymore?

Oh, did not realize, that this is not the upstream project.
I posted the question in the Karaf User Forum, too.
http://karaf.922171.n3.nabble.com/EIK-Karaf-4-support-on-Eclipse-Mars-tc4042052.html


Improve cmedb.py CSV export functions

Hello there,
Currently cmedb.py does not use the csv Python module to export data.
The current implementation is not robust enough : not comma-safe, does not double-quote data, and does not support encoding
Feel free to use this example https://github.com/Porchetta-Industries/CrackMapExec/issues/604 to fix it
Cheers !

duplicate of #604

Not really duplicate, as the #604 is just the export shares function.


Specified key was too long; max key length is 767 bytes: create unique index IX_9738C4E2 on Limsmuc_Conversation (conversationId);_ [Sanitized]

create table Limsmuc_Conversation (
cid LONG not null primary key,
conversationId VARCHAR(256) null,
conversationType INTEGER,
updatedAt DATE null,
syncIdSUC LONG
);
create unique index IX_9738C4E2 on Limsmuc_Conversation (conversationId);
it will happend if that error if charset is utf.
fix:
change conversationId  to VARCHAR(255)

fixed by setting the size of conversationId column to 255


Please include PowerShell instructions to disable IP masking

It would be nice if this included how to do the configuration change with PowerShell.  In this case it would be the Update-AzApplicationInsights cmdlet and the DisableIPMasking parameter.
Example:
Update-AzApplicationInsights -Name MyAppInsights -ResourceGroupName CoolInsights -DisableIPMasking $false
Link:  https://learn.microsoft.com/en-us/powershell/module/az.applicationinsights/update-azapplicationinsights?view=azps-9.5.0

Note that this is similar to issue #60363

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

ID: 730ff1f8-2aff-bedf-a026-1e52af3f2af8
Version Independent ID: 6e1f9b29-76b9-f7fd-7474-47b38595115e
Content: Application Insights IP address collection - Azure Monitor
Content Source: articles/azure-monitor/app/ip-collection.md
Service: azure-monitor
Sub-service: application-insights
GitHub Login: @AaronMaxwell
Microsoft Alias: aaronmax

@PwshPally
Thanks for your feedback! We will investigate and update as appropriate.


Migrate to GitHub Actions

I've been meaning to do this ever since we got access to Actions; now that Travis is acting up again I figured I might as well.

Wait that paragraph on the Hub is out of date, the Dockerfile for HHVM is using 18.04
Something else must be wrong with hg

Right, according to logs the versions of hg and all HHVM packages are all the same as the most recent successful job on Travis, so it's unclear to me what could be causing that failure...


(maint) error log format fix

Before this change, the log message format is wrong and the following
is logged in case external facts file is not proper executable:
2020-04-09 15:07:49.499276 ERROR puppetlabs.facter - error while processing "%1%" for external facts: %2%

After this fix, the proper message will be logged
2020-04-09 15:10:49.546980 ERROR puppetlabs.facter - error while processing "/opt/puppetlabs/facter/facts.d/a.sh" for external facts: child process returned non-zero exit status (8).

CLA signed by all contributors.


Misleading error message when the bucket name is not valid

I typed an invalid bucket name (with an upper case letter) and this is the output of gordon:
 $ gordon apply
Applying project...
  0001_p.json (cloudformation)
    UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS waiting... |
  0002_pr_r.json (custom)
Traceback (most recent call last):
  File "/home/me/.local/bin/gordon", line 11, in <module>
    sys.exit(main())
  File "/home/me/.local/lib/python2.7/site-packages/gordon/bin.py", line 97, in main
    getattr(obj, options.func)()
  File "/home/me/.local/lib/python2.7/site-packages/gordon/core.py", line 432, in apply
    getattr(self, 'apply_{}_template'.format(template_type))(name, filename, context)
  File "/home/me/.local/lib/python2.7/site-packages/gordon/core.py", line 476, in apply_custom_template
    outputs = template.apply(context, self)
  File "/home/me/.local/lib/python2.7/site-packages/gordon/actions.py", line 131, in apply
    action_outputs[action.name] = action.apply(context, project)
  File "/home/me/.local/lib/python2.7/site-packages/gordon/actions.py", line 217, in apply
    obj.upload_file(self.filename, ExtraArgs={'Metadata': {'sha1': file_hash}})
  File "/home/me/.local/lib/python2.7/site-packages/boto3/s3/inject.py", line 161, in object_upload_file
    ExtraArgs=ExtraArgs, Callback=Callback, Config=Config)
  File "/home/me/.local/lib/python2.7/site-packages/boto3/s3/inject.py", line 84, in upload_file
    extra_args=ExtraArgs, callback=Callback)
  File "/home/me/.local/lib/python2.7/site-packages/boto3/s3/transfer.py", line 641, in upload_file
    self._put_object(filename, bucket, key, callback, extra_args)
  File "/home/me/.local/lib/python2.7/site-packages/boto3/s3/transfer.py", line 651, in _put_object
    **extra_args)
  File "/home/me/.local/lib/python2.7/site-packages/botocore/client.py", line 258, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/me/.local/lib/python2.7/site-packages/botocore/client.py", line 548, in _make_api_call
    raise ClientError(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist

I expected an error on the creation of the bucket. I realized what happened when I tried to manually create the bucket: the AWS console told me the name was invalid. Apparently gordon silently ignored the error on creation and failed only on the first access to the bucket.

Furthermore I suggest to leave the bucket name out of the configuration. It's not important and it could be randomly generated. If given a prefix such as gordon-<stage>- then it would be easy to spot it in the S3 console. It could be stored into a dot file in the project folder for easier retrieval, maybe private.conf

I think there are two things we can do to make the experience better / not broken.
The most obvious one is to make gordon not proceed applying templates if the previous didn't finish successfully.
The second thing which would make gordon better would be to add a validation process before applying templates. In this case validate that the name of the bucket is correct... but there are many more situations where gordon could stop people from making configuration mistakes.
About adding a "state" configuration file... that is something which crossed my mind in the past, but the problem is that you would need to have one per stage and region... which might end looking like a mess. Will give it a second think.

First of all, maybe we should split this issue in two, one about the error message and one about the configuration. Sorry for not doing it myself right away.
About the former: if AWS returns an error (does it?) gordon should just print it and quit.
About the latter: I'm not particularly familiar with AWS and I believe that if gordon and the other similar tools will get popular it will be because many other AWS newbies are using them. So, we don't know much about the reasons why some AWS services are tied together and we don't care much. I'm perfectly OK with gordon doing it's magic and hiding everything to me (but be careful about decisions that could cost money to people). Creating the bucket and immediately destroying it would be fine, or uploading the code as a ZIP file. Having to handle too many details would slow me down and create bugs. An example with gordon: I still don't know why I couldn't get the API gateway to pass my parameters to my event object but I'm probably misconfiguring something.
An example from the past: many people started using Rails 10 years ago without knowing anything about Ruby. Ruby was just the scripting language of Rails, used to fill in the blank of the generated scaffolds. It got pretty successful anyway and most of the Ruby developers nowadays develop with Rails. Replace Ruby with AWS and Rails with gordon and you see what I mean. Then you need only to fill in some JS code in the template generated for the code.js file (or Python).

Just fixed the first bit of this issue. It is ready on master, and will be released as part of 0.2.1 https://github.com/jorgebastida/gordon/commit/a8e9f2723e69208c49236ccf35faaba2616c26af
The tl;dr version is that if applying a template fails, gordon will tell you so and exit.
About the second issue, I've added validation for the stage name and the code-bucket setting but... yes, next versions should aim to remove complexity (like the parameters comment you mentioned in the other PR) as well as trying to warn users when some configurations are obviously wrong.
These changes are on master and will get released as part of 0.2.1. Thanks!


Build applications without AVX

I have built examples like face_mesh_cpu on windows successfully. Is it possible to build without using AVX 512 / AVX 2 etc. ? I tried passing flags to msvc compiler using the --copt="-arch:AVX" flag (Reference) but that didn't make a difference.
It seems like if the machine is capable of AVX 512, it uses AVX 512 (similarly AVX2).
I was hoping to get a build with just SSE 4 for example.

Does https://stackoverflow.com/questions/52969630/tensorflow-with-bazel-avx-ignored/53006033 help?

It doesn't. I have tried to use --copt="-arch:AVX" and --copt="-arch:AVX2" etc like the above link suggests, but that didn't seem to do anything different. I'll retry again without the quotes " I've used in case its a syntax error, but msvc didn't complain about the flag, so for now I don't think it's that.

How about the first answer of https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions? To be frank, I don't have a good answer to your question and the only thing I can do is to find the possible solutions online :/

This has been resolved, here's a summary -
Mediapipe uses tensorflowlite delegate , which uses Xnnpack library, and xnnpack library has AVX instructions enabled via intrinsics. So, using a compiler flag like--copt="-arch:AVX" or others won't have an effect. I was able to disable the cpuinfo checks in xnnpack so that it generated only upto SSE 4 instructions.
If anyone is interested, i've put some more details in an issue in xnnpack https://github.com/google/XNNPACK/issues/1453
Closing this issue, thanks.


Use an ssh-agent other than ddev-ssh-agent

Is there an existing issue for this?

[X] I have searched the existing issues

Is your feature request related to a problem? Please describe
We started using 1pass SSH Agent https://blog.1password.com/1password-ssh-agent/.
In our usecase we don't need to save the ssh key pair local anymore. This is why ddev auth ssh does not find any ssh keys on the root system.
Could you find a way to implement this feature in ddev?
Describe the solution you'd like
It would be great if ddev would support 1pass ssh agent, so we could work without any ssh key pairs on the local machines.
Describe alternatives you've considered
No response
Additional context
No response

I don't know how to accomplish this. If we could do this, we would be able to support keys with a regular ssh-agent (as on mac or Linux, for example). But the containers that need this don't have access to that agent. That's why we run a separate ddev-ssh-agent that serves the containers in the docker network.

Hey @plexmaniax,
This is a very specific use case I think. Anyway,  Anyway, I may have an idea how to solve this.
@rfay is it possible to add a single file mount to the container by configuration?
In case it is, mount the socket of your local 1pass agent ~/.1password/agent.sock to /mnt/.1password/agent.sock in the container.
Then add the following config to your ~/.ddev/homeadditions/.ssh/config configuration.
# Share known_hosts across all users of the ssh-agent
UserKnownHostsFile=/home/.ssh-agent/known_hosts
# In the container host key checking can be a problem with non-interactive composer, etc.
# Turn it off. When we upgrade to openssh 7.6 we can use the "accept-new" option instead of "no"
StrictHostKeyChecking=no

Host *
    IdentityAgent "/mnt/.1password/agent.sock"

I assume this will override the default one.
I'm also not sure how this behaves in combination with the SSH container, it's just an idea....

Actually, that's a good point. The whole reason ddev-ssh-agent had to be created back in the day was the lack of support for mounting a socket into the container. That now works on mac (where it didn't for years) and it's always worked on Linux. I imagine it doesn't work on Windows though.
And yes, a docker-compose.*.yaml could add a mount of a socket.

Hi all,
Interesting approach overall and wanted to try it (tried several ways) but does not seem to work.
@nico-loeber Your approach seems quite logic but keeps asking me for the remote user's password somehow (also tried that with a single clean docker container).
Another thing I found was: https://1password.community/discussion/127482/feature-request-using-1p-ssh-from-inside-a-local-docker-container
The user there also did not get it working.
Unfortunately there's quite little ressources on that topic. So, open for other ways to try :)
BR

I confirm that you can use the recipe in https://github.com/drud/ddev-contrib/tree/master/recipes/sshd to solve this problem for some cases. I just did it verbatim and it worked fine. When you access the web container, use ssh -A -p 2222 localhost and you'll have your identities in there. Unfortunately, each project has to have a different port allocated.  You can only use 2222 for one.
There was discussion of doing something like this by default in

https://github.com/drud/ddev/issues/3097
but it didn't seem to get traction.

The approach above should work, let me know if you need any help with it. Closing this for now, happy to continue the conversation here or elsewhere.

An approach did get posted to https://1password.community/discussion/127482/feature-request-using-1p-ssh-from-inside-a-local-docker-container after this discussion happenned. How would that socket forwarding be done with DDEV?

This was discussed wrt Yubikey authentication on macOS recently in https://discord.com/channels/664580571770388500/1029412939595264000/1029412939595264000 and the user tried this and it worked:
https://stackoverflow.com/questions/74033019/how-can-i-use-ddev-auth-ssh-with-a-yubikey/74033072#74033072
.ddev/docker-compose.ssh.yaml:
services:
  web:
    environment:
      - SSH_AUTH_SOCK=/ssh-agent
    volumes:
      - ${SSH_AUTH_SOCK}:/ssh-agent

Related:

#3097

@weitzman if this works... it would easily be a great reason for me to switch to 1password. Those are the kind of things that are rarely worth doing... but wow, loads of value here.

I can’t seem to get it to work, but I bet others can. This is not my area of expertise so hard to debug.
I will say that I’m a huge fan of 1Password. The app works flawlessly, is designed so thoughtfully, and the company shows genuine care for its users

ddev exec ssh-add -l should show you the list of keys that are available.
One thing I failed to mention, you might want to ddev config global --omit-containers=ddev-ssh-agent so that the DDEV approach doesn't get in the way.

That worked to omit the container but I'm not seeing any keys
❯ ddev exec ssh-add -l
Error connecting to agent: No such file or directory

See also https://github.com/drud/ddev/issues/2510#issuecomment-882034430

I see your same result. I did suddenly realize that it might work with Docker Desktop and not with Colima though. But I couldn't get it to work with Docker Desktop either.

Hey folks
Thanks for your effort :)
It would be great if this feature could finished. Maybe it's possible to set this settings in the global config later?

The fundamental problem here is the cross-platform and cross-tool support. The reason we have our own agent is because that was the only way to make things work at all originally.

Intereseting article in 1password: https://1password.community/discussion/127482/feature-request-using-1p-ssh-from-inside-a-local-docker-container - I'm able to make the basic example work, but not getting it working in DDEV yet.
$ docker run -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" alpine sh -c 'apk add openssh && ssh-add -l'
...
Executing busybox-1.35.0-r29.trigger
OK: 15 MiB in 25 packages
4096 SHA256:G99zMFOi9r+TFQLW5Tlb81w7BwkNApDUzhDF4MPkTAc /Users/rfay/.ssh/id_rsa (RSA)

However, when I try what should be the same thing in a docker-compose.1password.yaml I don't succeed:
services:
  web:
    environment:
      - "SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock"
    volumes:
      - "/run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock:rw"

$ ddev ssh
rfay@d9-web:/var/www/html$ echo $SSH_AUTH_SOCK
/run/host-services/ssh-auth.sock
rfay@d9-web:/var/www/html$ ssh-add -l
Error connecting to agent: Permission denied

FYI there are a couple posts newer than the last one here. One person needed to install openssh-server

@weitzman you're talking about in the 1password thread? I didn't find anything useful there in a quick look, but as always super interested in what you might learn.

I managed to get this working using Orbstack. Docker desktop had 2 issues I wasnt able to fix:

Starting docker on startup or via spotlight/applications seemed to mess with either the mounting of the sock file or the SSH_AUTH_SOCK env variable. Launching via command line though was ok.
Even after seeing the file in the web container I had permission issues that I was only able to get around if I SSH in as the root user. Using Orbstack I was able to avoid these issues so the setup was:

Update SSH_AUTH_SOCK to point to your 1password sock file in zshrc/bashrc etc.
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
Add a docker-compose yaml file in the ddev config with the Docker SSH agent forwarding recommendation
services:
  web:
    volumes:
      - type: bind
        source: /run/host-services/ssh-auth.sock
        target: /run/host-services/ssh-auth.sock
    environment:
      - SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock

I'm by no means an expert with this stuff and stumbled across a working setup but hopefully if helps or gives someone an idea to fix the Docker Desktop setup.

@rfay Did you keep on looking at this one to make it work for you?

Awesome! Would you mind writing that up on Stack Overflow or someplace more persistent that can be edited over time? Just answer your own question, click the checkbox to "answer your own question" when writing it.

@rfay Done it right here: https://stackoverflow.com/questions/77574478/is-there-a-way-to-use-1password-in-combination-with-ddev-and-colima/77574479#77574479

Awesome, thanks!

Excited to try this. Thanks @DenisMir .

I've updated the stackoverflow post regarding some information about the --ssh-agent option. What it simply does it sets the forwardAgent: true in the colima configuration. Unfortunately this is not really documented in the colima docs/README.

From https://github.com/ddev/ddev/issues/3878#issuecomment-1402790791

Intereseting article in 1password: https://1password.community/discussion/127482/feature-request-using-1p-ssh-from-inside-a-local-docker-container - I'm able to make the basic example work, but not getting it working in DDEV yet.
$ docker run -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" alpine sh -c 'apk add openssh && ssh-add -l'
...
Executing busybox-1.35.0-r29.trigger
OK: 15 MiB in 25 packages
4096 SHA256:G99zMFOi9r+TFQLW5Tlb81w7BwkNApDUzhDF4MPkTAc /Users/rfay/.ssh/id_rsa (RSA)

However, when I try what should be the same thing in a docker-compose.1password.yaml I don't succeed:
services:
web:
environment:
- "SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock"
volumes:
- "/run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock:rw"
$ ddev ssh
rfay@d9-web:/var/www/html$ echo $SSH_AUTH_SOCK
/run/host-services/ssh-auth.sock
rfay@d9-web:/var/www/html$ ssh-add -l
Error connecting to agent: Permission denied

Just wanted to mention that I think that all this was missing was allowing non-root users access to the socket inside the container:
ddev exec sudo chmod o+rw /run/host-services/ssh-auth.sock

Works a treat.

Would be great to get this thing work for our purpose. :)

@darthsteven could you please give your entire 1password setup including macOS version and Docker provider and version? If you can lay it out completely it would be great.

Sure, so I'm on an Apple Silicon Mac Mini, running MacOS 15.1 and I've installed 1Password and set up ssh keys in there etc. and got that all working on my host mac.
I've then run the command detailed in https://developer.1password.com/docs/ssh/agent/compatibility/#configure-ssh_auth_sock-globally-for-every-client so that it's global and any client can use it.
Specifically these commands:
mkdir -p ~/Library/LaunchAgents
cat << EOF > ~/Library/LaunchAgents/com.1password.SSH_AUTH_SOCK.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.1password.SSH_AUTH_SOCK</string>
  <key>ProgramArguments</key>
  <array>
    <string>/bin/sh</string>
    <string>-c</string>
    <string>/bin/ln -sf $HOME/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock \$SSH_AUTH_SOCK</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
</dict>
</plist>
EOF
launchctl load -w ~/Library/LaunchAgents/com.1password.SSH_AUTH_SOCK.plist

I'm using Docker Desktop, personal edition.
Right out of the gate, running this command shows my ssh keys:
$ docker run -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" alpine sh -c 'apk add openssh && ssh-add -l'
...
4096 SHA256:...
256 SHA256:...

Which makes sense, right? Docker desktop knows about the system wide ssh agent because of the launch agent, and I've shared the socket into the running container, and set the environment variable to that socket location, and the user in the container is the root user.
I've then got a fairly standard DDEV setup, drupal project type (Go Drupal!) and so I can do:
$ ddev exec ssh-add -l
The agent has no identities.
Failed to execute command ssh-add -l: exit status 1

So, at the moment this project is talking to the DDEV ssh auth container, which I don't want obviously...
$ ddev config global --omit-containers=ddev-ssh-agent
...
$ ddev restart
...

So this now gives:
$ ddev exec ssh-add -l
Error connecting to agent: No such file or directory
Failed to execute command ssh-add -l: exit status 2

Thus I want to now map the socket into the ddev web container and set the environment variable, I've done this with a docker compose include added to the .ddev directory:
docker-compose.1password.yaml:
services:
  web:
    volumes:
      - type: bind
        source: /run/host-services/ssh-auth.sock
        target: /run/host-services/ssh-auth.sock
    environment:
      - SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock

This isn't anything new here, this is all from the above issue etc.
So, as expected at this point:
$ ddev restart
...
$ ddev exec ssh-add -l
Error connecting to agent: Permission denied
Failed to execute command ssh-add -l: exit status 2

And this makes perfect sense, since the file permissions on the socket are 660, and owned by root.
So, adding a second file to .ddev directory:
config.1password.yaml:
hooks:
  post-start:
    - exec: "sudo chmod o+rw /run/host-services/ssh-auth.sock"

$ ddev restart
...
$ ddev exec ssh-add -l
4096 SHA256:...
256 SHA256:...

Which are my keys, it works!
Would it be appropriate to re-open this issue?

Renamed and reopened, thanks for your work on this!


Move artifact verbs from admin menu to debug menu

About the PR

Moves artifact activation verbs from admin menu to debug. They'd fit better in tricks but they'd need icons for that and activating the artifact can technically be used for debugging.
Media

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

@mirrorcult BUG!: These verbs can be activated by anyone without permissions

@Chief-Engineer

Fixed #14163


[0.13.0] DROP SERIES not working properly

Bug report
System info:
Influx v0.13.0
Ubuntu Linux x64
Steps to reproduce:

Create a retention policy named rp_mqtt_data for database mqtt_data
> SHOW RETENTION POLICIES ON mqtt_data
name		duration	shardGroupDuration	replicaN	default
default		0		168h0m0s		1		false
rp_mqtt_data	4320h0m0s	168h0m0s		1		true

Insert a new data point into a series in mqtt_data
> use mqtt_data
> drop series from "service/anhld/battery"
> insert service/anhld/battery value=1001

Select data from the series and nothing in return
> select * from "service/anhld/battery"
>

Expected behavior:
Get the inserted data
Actual behavior:
Nothing in return

This issue may be related to #5878

Unable to reproduce with 0.13.0:
> show retention policies on foo
name	duration	shardGroupDuration	replicaN	default
bar	672h0m0s	24h0m0s			1		true

> create retention policy baz on foo duration 4320h replication 1 default
> show retention policies on foo

name	duration	shardGroupDuration	replicaN	default
bar	672h0m0s	24h0m0s			1		false
baz	4320h0m0s	168h0m0s		1		true

> show measurements
> insert service/anhld/battery value=1001
> show measurements
name: measurements
------------------
name
service/anhld/battery

> select * from "service/anhld/battery"
name: service/anhld/battery
---------------------------
time			value
1467051399142565488	1001

@jackzampolin I tested several times and saw that: the issue's randomly occurred. Now I'm using the binaries compiled from the code in the master branch, and it's ok (although I know the next stable version's still not available).
So I close this issue. Thank you!


bugfix: Mutate TransactionExecutionContext between executions

As the TransactionExecutionContext was not updated between executions, inner calls (such as contracts called through the call_contract syscall) would modify their execution context, but this change would have no effect on the caller's execution context.
This bug caused bugs to a appear such as the one reported #604
What happened here is that two different contract calls sent messages to l1, but as the transaction_execution_context.n_messages update was lost between executions, they both had the same order number (0), leading to the UnexpectedHolesL2toL1Messages error
A test for this specific case will be added following #663
Description
Description of the pull request changes and motivation.
Checklist

[ ] Linked to Github Issue
[ ] Unit tests added
[ ] Integration tests added.
[ ] This change requires new documentation.

[ ] Documentation has been added/updated.

Codecov Report

Merging #662 (a9c01ef) into main (3efd683) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #662      +/-   ##
==========================================
+ Coverage   92.29%   92.30%   +0.01%
==========================================
  Files          51       51
  Lines       10561    10579      +18
==========================================
+ Hits         9747     9765      +18
  Misses        814      814

Impacted Files
Coverage Δ

src/execution/execution_entry_point.rs
97.32% <100.00%> (+0.08%)
:arrow_up:

src/lib.rs
91.11% <100.00%> (ø)

src/syscalls/business_logic_syscall_handler.rs
79.58% <100.00%> (ø)

...calls/deprecated_business_logic_syscall_handler.rs
94.49% <100.00%> (+0.01%)
:arrow_up:

src/testing/state.rs
96.93% <100.00%> (ø)

src/transaction/declare.rs
98.73% <100.00%> (+<0.01%)
:arrow_up:

src/transaction/declare_v2.rs
84.95% <100.00%> (+0.12%)
:arrow_up:

src/transaction/deploy.rs
98.63% <100.00%> (ø)

src/transaction/deploy_account.rs
97.82% <100.00%> (+<0.01%)
:arrow_up:

src/transaction/fee.rs
98.76% <100.00%> (ø)

... and 2 more


Voice over focus is not as in expected order in FlatList with two columns

Description
I have a Flatlist with number of columns as 2. When voice over is turned on in iOS device, the first element in the first item of the FlatList is focused and then the first element of the second item in the FlatList is focused, that is in the same row.
Expected- I want to add the focus and accessibility label for all the elements[Text, Button] inside each FlatList item and the voice over focus order should be in a way that it should completely focus/read each element in the first item of the FlatList before the elements in the second item of the FlatList.
This is happening only in iOS that the focus/ reading order is from left to right when voice over is ON.
Please let me know is there a way to handle the above scenario?
Thank you.
Version
0.66.3
Output of npx react-native info
System:
OS: macOS 12.3
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 36.32 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.14.0 - ~/Desktop/react-native/node_modules/.bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v14.15.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 23, 24, 26, 27, 28, 29
Build Tools: 26.0.0, 28.0.3, 29.0.2, 29.0.3, 30.0.2
System Images: android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 13.3/13E113 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_252 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.3 => 0.66.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Enable voice over and swipe left to right over the elements in a React Native FlatList which is having 2 columns.
Snack, code example, screenshot, or link to a repository
No response

Related / dupe of #28299 ?

FWIW, I found the following entry in the react-native-community forum: Accessibility focus order in React Native, which has a workaround, but I believe it would be nice to have this as part of the react-native core.

So this is related directly to the way that iOS and Android handle accessibility focus order in native apps, and how it differs from the web.
On the web, focus order is determined by the order of the elements in the DOM. In your case of the two flat lists, as long as those lists were siblings of one another in the DOM, a screen reader would navigate fully through the first list before traversing the second.
But on native mobile, focus order is not based on the order of the views in the view hierarchy (at least not only based on this), but on their visual position on the screen.
It's hard to say for sure exactly what Apple's VoiceOver logic is here, since it's closed source, but it seems to take visual position into account much more strongly than Google's Talkback does.
Since Talkback is open source, we can actually look at its exact logic, which is the following:

Traverse the view hierarchy starting at the root
Move to the element with the lowest Y position (closest to the top of the screen), If multiple elements have identical Y positions look at their X position and pick the one which is lowest (closes to the left).
Check if this element is focusable, and if so, add it to a running list of focusable elements.
Traverse the branch of the tree from this element down to its children, and repeat steps 2 and 3.
Once the bottom of the tree has been reached, go back up to the element with the next lowest Y position, and repeat steps 2 through 4.
Once the entire tree has been traversed, you now have a list of all focusable elements, in order.

So you can see that it takes the view hierarchy order into account only after it looks at an elements visual position. This means that in your case of two sibling flat lists, in Talkback it would find the top-most-left-most flat list first, and start traversing its descendants before going back up to the second flat list, giving you the desired order.
Since iOS doesn't support the concept of nested accessible elements however, it's system is likely much simpler. Voiceover already knows every element that it needs to focus on, as a user has to explicitly mark each one as an accessible element. Because of this, it can simply look through that list and look at their visual positions alone, rather than having to traverse the entire tree checking if an element should be focusable. This is likely much faster, but does lead to problems like you're describing.
Unfortunately, there's nothing we can do to change VoiceOvers logic here. What we can do however is add support for a system to allow users to define manual focus order, as both iOS and Android have ways to handle this. This is no small task however, and would require some pretty core changes to the way that views are created and managed in React Native.
There's an open issue for that feature here - https://github.com/facebook/react-native/issues/30888
Since this is not something that can be fixed directly, and the only way to resolve it is a new API with an issue open for it already, I'm going to close this out.


adding conditionals to automation

/changelog no colon here

/changelog feat: added automation

Hello @NesTar6!
added the following update to the upcoming version in the changelog:
feat: added automation


Added postman project reference

@peeyushchoudharymsft,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


Performances: quick solution "withRouter" VS render a pathless .

Here (https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/guides/blocked-updates.md) it says:

Quick Solution
If you are running into this issue while using a higher-order component like connect (from react-redux) or observer (from Mobx), you can just wrap that component in a withRouter to remove the blocked updates.
// redux before
const MyConnectedComponent = connect(mapStateToProps)(MyComponent)
// redux after
const MyConnectedComponent = withRouter(connect(mapStateToProps)(MyComponent))
This is not the most efficient solution, but will prevent the blocked updates issue. For more info regarding this solution, read the Redux guide. To understand why this is not the most optimal solution, read this thread.

So this is not optimal for performances and then it continues:

Recommended Solution
The key to avoiding blocked re-renders after location changes is to pass the blocking component the location object as a prop. This will be different whenever the location changes, so comparisons will detect that the current and next location are different.
What happens when the component isn't being rendered by a  and the component rendering it does not have the location in its variable scope? There are two approaches that you can take to automatically inject the location as a prop of your component.
What happens when the component isn't being rendered by a  and the component rendering it does not have the location in its variable scope? There are two approaches that you can take to automatically inject the location as a prop of your component.
Render a pathless . While s are typically used for matching a specific path, a pathless  will always match, so it will always render its component.
// pathless  =  will always be rendered
const MyComponent= () => (
  <SomeComponent>
    <Route component={Blocker} />
  </SomeComponent>
)

So I don't understand: the second one is better than the first one?
Using this: <Route component={Blocker} /> is better (for performances) than this: withRouter(connect(mapStateToProps)(MyComponent))?

Yes, it can be because you can reuse that location with multiple components, creating only one subscription instead of many.

Sorry, can you explain it better here (so maybe I can PR in the doc)? Thanks.

Nothing, @timdorr? Please.

@johnunclesam Using withRouter literally renders a pathless <Route>. If your only use for withRouter is to prevent blocked updates and you already have access to the location prop, then you are just adding extra components to your application by using withRouter instead of passing the location as a prop. If you don't have access to the location, then just use withRouter.
For example, let's imagine we have the following components:
const ConnectedOne = connect(...)(One);
const ConnectedTwo = connect(...)(Two);

const Thing = ({ location }) => (

    {/* right now, these won't update when <Thing> re-renders */}
    <ConnectedOne />
    <ConnectedTwo />

);

const App = () => (
  <Switch>
    <Route exact path='/thing' component={Thing} />
  </Switch>
);

ReactDOM.render((
  <BrowserRouter>
    <App />
  </BrowseRouter>
), holder);

The <Thing> component is rendered by a <Route>, which means that it is passed the location prop when it is rendered. Our <ConnectedOne> and <ConnectedTwo> components are wrapped in connect, which prevents them from re-rendering by default. However, our <Thing> can pass them the location prop, which will cause the shouldComponentUpdate method of the component returned by connect to return true.
const Thing = ({ location }) => (

    <ConnectedOne location={location} />
    <ConnectedTwo location={location}  />

);

Alternatively, we could just wrap ConnectedOne and ConnectedTwo in withRouter to get the same result.
const ConnectedOne = withRouter(connect(...)(One));
const ConnectedTwo = withRouter(connect(...)(Two));

const Thing = ({ location }) => (

    {/* these won't update when <Thing> re-renders */}
    <ConnectedOne />
    <ConnectedTwo />

);

What is the difference? Well, let's take a look at the element trees that each approach will create:
// passing props
<BrowserRouter>
  <App>
    <Switch>
      <Route>
        <Thing>

            <connect>
              <One />
            <connect>
              <Two />

// using withRouter
<BrowserRouter>
  <App>
    <Switch>
      <Route>
        <Thing>

            <withRouter>
              <Route>
                <connect>
                  <One />
            <withRouter>
              <Route>
                <connect>
                  <Two />

Both of the above component trees have the same end result, but the latter adds extra components to your application. Is using withRouter going to have a huge performance hit on your application? Probably not unless you're wrapping half of your components in withRouter. Still, if you already have access to the location component, you might as well just use the prop. The worst is when there is a component that is already rendered by a <Route> and gets wrapped in withRouter.
// don't do this!
const ConnectedThing = withRouter(connect(...)(Thing));
const App = () => (
  <Switch>
    <Route exact path='/thing' component={ConnectedThing} />
  </Switch>
);
/*
<App>
  <Switch>
    <Route>
      <withRouter>
        <Route>
          <connect>
            <Thing>
*/

Thanks @pshrmn. Much appreciated.


Add STS missing Chinese resources

Great job @Seaear 👍
I added some additional translations - commit
Can you please add these translations as well?
Thanks!

@skoruba Already translated all

@Seaear Great - I pushed one latest change in Register view, please check it.
Thanks!

@skoruba Ok, already added


Include license list in distribution

What would you like to be added:
The SPDX license list should be included with the bom distribution to avoid downloading it.
Why is this needed:
On first run, bom will download the SPDX license list. When generating a quick SBOM from a cold start like this the license download can be a bit cumbersome. It can also lead to a CI/CD failure when running bom in a pipeline.
I think we should exploring compiling the license list into a distributable form (a tarball or similar) and shipping it with the binary. I think using go embed could be the way to go to do this.

I can take care of that one. Would you mind assigning it to me?

@puerco https://github.com/spdx/license-list-data

https://github.com/google/licensecheck

/remove-lifecycle stale

/remove-lifecycle rotten

/assign

@developer-guy  I'd like to take a shot at this, if that's cool with you.

Awesome, go for it! :tada:

/remove-lifecycle rotten


Cannot assign to read only property 'exports' of object '#'

I was required to reinstall my node modules and got a weird error as shown below.  I'm trying to debug this but not super clear on where the issue is coming from?  Were there any changes I am not accounting for?

Hi, what version are you using?

So I created a fork and my solution was to replaces the module.exports on choices.js
from
-module.exports = Choices;
 +export default Choices;

and remove store.js

Try forking from the latest master now - what is on master currently is the beta of the next version so their may be minor issues. You may be better off using https://github.com/jshjohnson/Choices/releases/tag/v3.0.2 👍


chore(deps): update dependency botocore to v1.31.23 and boto3 to v1.28.23

Combined update of dependencies done manually since doing separately by renovate doesn't work.

Don't know how to verify this for "auth" locally, but api is good.


Update video-indexer-overview.md

@gadamilan : Thanks for your contribution! The author, @juliako, has been notified to review your proposed change.

#sign-off