Error in calculation result.

I want to do the following calculation:
div{ 	left: ((100% - 1230px) / 2); }
result:
div{     left: -565%; }
The correct would be:
div{     left: calc(50% - 615px); }
or
div{    left: 336.5px; }
If I use as in the example below everything works correctly:
div{ 	left: calc((100% - 1230px) / 2); }

This should be reported on the stylus project


English+Chinese display error

Chinese+English+Chinese original content is "当按下Insert键为启动脚本功能"
show is right

Error when editing content
When the cursor is here Press 4 backspace

Error shown as

English+Chinese original content is "Insert键为启动脚本功能"
Error shown as

Fixed.


[New game]: HIGHWAY 404 👾

🎮 Game Request
Game logic and basic description

Survive Highway 404, which is a Spyhunter style game featuring your favorite HTTP status codes.

Point down the features
Game points
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @0xabdulkhalid !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

/assign

Hey @0xabdulkhalid ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


Reorganize K distribution to remove dependence on /usr/lib/kframework sysroot [brew-staging: reorg]

Fixes #1260
Basically, everything is now under /usr or /usr/local rather than /usr/lib/kframework. We create subdirectories under /usr/lib, /usr/include, and /usr/share in order to avoid conflicts.
Finally ready for review.
This encompasses three changes that must be merged largely in sync, so please do not merge this or the other two PRs until after all three have been approved. There are also the changes to the homebrew package that you should consider, but I did not create a PR because Jenkins is the one that merges those changes.
Here are the other diffs:
https://github.com/kframework/llvm-backend/pull/331
https://github.com/kframework/k-exercises/pull/19
https://github.com/kframework/homebrew-k/compare/master...reorg

Note that I still think we should keep the documentation that says how to use WSL for Windows users.

I kept most of the references in the code relating to windows because if we ever decide to support windows later, they will end up saving us a bunch of headaches, but I removed all the references to native windows in the documentation (keeping all references to WSL), and removed all references to batch scripts,cmd, mingw, msys, and cygwin.


If my kernel is 5.17.13 how can i install SDK

Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

Consider checking out SDK examples.
Have you looked in our documentations?
Is you question a frequently asked one?
Try searching our GitHub Issues (open and closed) for a similar issue.

All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)

Required Info

Camera Model
{ R200 / F200 / SR300 / ZR300 / D400 }

Firmware Version
(Open RealSense Viewer --> Click info)

Operating System & Version
{Win (8.1/10) / Linux (Ubuntu 14/16/17) / MacOS

Kernel Version (Linux Only)
(e.g. 4.14.13)

Platform
PC/Raspberry Pi/ NVIDIA Jetson / etc..

SDK Version
{ legacy / 2.. }

Language
{C/C#/labview/nodejs/opencv/pcl/python/unity }

Segment
{Robot/Smartphone/VR/AR/others }

Issue Description
<Describe your issue / question / feature request / etc..>

Hi @Glean-jcy  If you are unable to change your kernel version to one that is officially supported by the librealsense SDK then there is the option of building the SDK from source code with CMake with the RSUSB backend installation method.  This type of build bypasses the kernel and so is not dependent on Linux versions or kernel versions and does not require patching.  It is best suited to single-camera projects rather than multiple cameras on the same computer though.

Hi @Glean-jcy If you are unable to change your kernel version to one that is officially supported by the librealsense SDK then there is the option of building the SDK from source code with CMake with the RSUSB backend installation method. This type of build bypasses the kernel and so is not dependent on Linux versions or kernel versions and does not require patching. It is best suited to single-camera projects rather than multiple cameras on the same computer though.
THX！

Hi @Glean-jcy  Do you require further assistance with this case, please?  Thanks!

oh i can run realsense-viewer now,but i dont now what i had done,and i am doing other things now ,so thx your reply!!!

It's excellent to hear that realsense-viewer is now working for you.  Thanks very much for the update!

It's excellent to hear that realsense-viewer is now working for you. Thanks very much for the update!

I feel surprised that my kernel has always been 5.17.13, and I've never changed it.

The SDK can work with unsupported kernels, though there may be unpredictable consequences in regards to stability.  It seems as though it is stable on your particular computer though.

The SDK can work with unsupported kernels, though there may be unpredictable consequences in regards to stability. It seems as though it is stable on your particular computer though.

Now It seems stable.

Some kernel versions of the same general kernel type but different version numbers may be more stable than others.  A past example was that some RealSense users found kernel 5.11.0-34-generic to be stable but slightly newer kernels such as 5.11.0-38-generic had problems.

Some kernel versions of the same general kernel type but different version numbers may be more stable than others. A past example was that some RealSense users found kernel 5.11.0-34-generic to be stable but slightly newer kernels such as 5.11.0-38-generic had problems.

I learned a lot, thanks!

Hi @Glean-jcy  Do you require further assistance with this case, please?  Thanks!

Case closed due to no further comments received.


Images Don't Show Up in Adaptive Card from Power Automate - Solution of Internet connectivity is not user friendly

Thank You All for Support
The issue has been solved when I switch from 4G  to ADSL
Originally posted by @ahmedmahmoudR in https://github.com/MicrosoftDocs/msteams-docs/issues/4848#issuecomment-1000226294

The original issue is that images don't show up from Adaptive cards when posting them from power automate. The solution was that the user had to update their internet. Does this mean that a fair amount of people I post to will not be able to see the image? I fail to see how this is a solution, when images directly posted show up with the same connection. It is not user-friendly to request individuals to update their internet to view images that they would be able to see if I posted it directly.

We have tested it in multiple PC's & it's working fine for us (Both in Teams Desktop/web and mobile clients).
Also, we have checked without internet & it was not displaying image. So, there doesn't seem to be any specific solution for this failure.

With further testing, if the image is hosted by a website such as deviantArt or AWS S3 buckets, it works. Copying the image address allows it to show up. If you copy the image address from google it does not. Generally if the image address ends with .jpeg and not a token it works. Thanks!

Thanks for your feedback/explanation. We are closing this issue for now. Please feel free to reopen if required.


Gateway clean shutdown

I chose to put the wg.Add(1) wg.Done()s on the calling side because they are not necessarily called from goroutines. The godocs also suggest putting the Add outside the goroutine. It also makes it easy to visually check that all goroutines have a corresponding Add and Done.

Forcing all tests that use newTestingGateway to be long tests is probably a little heavy handed, but it's the result of Sync sometimes taking a few seconds on Travis. This was discussed in #1152.

I'm worried about threads calling wg.Add(1) concurrently with wg.Wait(). I tested this in the hostdb and it caused a race condition.
It seems to me that the most rigorous way of handling this would be a simple convention:
The function that spawns a goroutine is responsible for ensuring that the goroutine exits during shutdown.
This means that a function like listen, which spawns goroutines for each listener, is responsible for ensuring that those goroutines have exited before listen itself exits. It may therefore use its own internal waitgroup:
func (g *Gateway) listen() {
	var wg sync.WaitGroup
	defer wg.Wait()
	for {
		conn, err := g.listener.Accept()
		if err != nil {
			return
		}
		wg.Add(1)
		go func() {
			g.acceptConn(conn)
			wg.Done()
		}()
		select {
		case <-time.After(acceptInterval):
		case <-g.closeChan:
			return
		}
	}
}

This might be complicated by functions that spawn goroutines that live longer than their parent. (Although, we should strive to avoid that pattern outside of the New functions.)

That pattern is great and works well in most places, except as you mentioned when the goroutine outlives the parent. The only place I can find where that is desired is in Connect, which calls all of the on-connect RPCs on the peer. Specifically the consensus' SendBlocks on-connect RPC could cause the call to Connect to not return for 5 minutes.
In this case I'm not sure if it's better to not track the goroutine with any wait group or to use the g.closeWG wait group. Because Connect is an exported method that isn't called very often internally (only by threadedPeerManager infrequently), it seems safe-ish to use the object-global wait group.

Hmmm addPeer also uses go routines that outlive it. I suppose using this pattern in some places is better than not using it at all.

It seems the problem is primarily with exported functions. Any exported function is a "parent," because it was spawned from the outside, not by New. Hmm.

The way I handled this in the host was with the resource lock. All threads had a finite amount of time that they would hold the resource lock. Infinite threads had periodic moments where they release and re-grab the resource lock. If the resource bool is set to false, the threads know that shutdown is occurring and they exit.
All exported functions also reference this shutdown variable. Upon closing, you lock the resource lock, meaning you'll block until everyone has released the resource lock, and then you can set the variable to 'false', knowing that nobody is actively holding it and that exported functions will return an error and exit immediately.

Updated to use the new ThreadGroup type. I wasn't sure which methods should be responsible for calling threads.Add and threads.Done. Is every exported method responsible for calling these? Or maybe every exported method that can return an error? As of now it's not consistent. Some exported methods that are frequently called from goroutines do call threads.Add and threads.Done whereas others that aren't usually called from goroutines do not. I haven't measured the added cost of calling these methods, but it might be negligible enough to blindly call them in every exported method. Unexported methods that begin with threaded are also responsible for calling threads.Add and threads.Done.

You need to add ThreadGroup use to every single function or thread that needs a resource which can close. So, if it's a function which uses the logger, you need to use the ThreadGroup, etc.

Test failures indicate that there's a deadlock somewhere

Closing the listener and peer sessions in gateway.Close is problematic, as concurrent calls to gateway.Close could attempt to close the listener and peer sessions multiple times. This might work, but according to @lukechampine closing multiple times is often undefined.
Adding a if g.threads.IsStopped() { return errClosed } at the top of gateway.Close() wouldn't help, as you would need to hold a lock from the IsStopped check until the call to Stop.
It is a little uglier, but it is also nice to have every threaded method responsible for closing itself, either with a select using the StopChan or by spawning a goroutine and waiting for the StopChan.

Deadlock fixed in 86346d9703ffd4dc11d8c328be8ca8fc36ad0769, but there are still some non-deterministic deadlocks in the host. It appears that writing bug free clean shutdown code is not easy.

looks good to me

I take that back, the build failure for the go module is a deadlock - the threadgroup is blocking after a call to Stop, but there doesn't seem to be any thread which is waiting to call Done, which means there is somewhere that you are calling Add which is not being cleaned up correctly.
panic: test timed out after 5m0s

goroutine 243 [running]:

panic(0x968a80, 0xc82011d460)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/panic.go:464 +0x3ff

testing.startAlarm.func1()

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/testing/testing.go:725 +0x184

created by time.goFunc

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/time/sleep.go:129 +0x6e

goroutine 1 [chan receive]:

testing.RunTests(0xbe6118, 0xe7b780, 0x1d, 0x1d, 0x1)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/testing/testing.go:583 +0xb39

testing.(*M).Run(0xc820051f00, 0xead6d5)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/testing/testing.go:515 +0x11e

main.main()

	github.com/NebulousLabs/Sia/modules/gateway/_test/_testmain.go:110 +0x211

goroutine 17 [syscall, locked to thread]:

runtime.goexit()

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:1998 +0x1

goroutine 143 [IO wait]:

net.runtime_pollWait(0x2b967bf60db8, 0x77, 0xc82004d020)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/netpoll.go:160 +0x63

net.(*pollDesc).Wait(0xc820118370, 0x77, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/fd_poll_runtime.go:73 +0x56

net.(*pollDesc).WaitWrite(0xc820118370, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/fd_poll_runtime.go:82 +0x44

net.(*netFD).connect(0xc820118310, 0x0, 0x0, 0x2b967bf60190, 0xc8201ce5e0, 0xecedffb48, 0x3b2b14f8, 0xe90d20, 0x0, 0x0, ...)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/fd_unix.go:127 +0x2e7

net.(*netFD).dial(0xc820118310, 0x2b967bf61248, 0x0, 0x2b967bf61248, 0xc8201ca660, 0xecedffb48, 0xc83b2b14f8, 0xe90d20, 0x0, 0x0, ...)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/sock_posix.go:137 +0x429

net.socket(0xae5958, 0x3, 0x2, 0x1, 0x0, 0xc8201ca600, 0x2b967bf61248, 0x0, 0x2b967bf61248, 0xc8201ca660, ...)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/sock_posix.go:89 +0x507

net.internetSocket(0xae5958, 0x3, 0x2b967bf61248, 0x0, 0x2b967bf61248, 0xc8201ca660, 0xecedffb48, 0x3b2b14f8, 0xe90d20, 0x1, ...)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/ipsock_posix.go:161 +0x164

net.dialTCP(0xae5958, 0x3, 0x0, 0xc8201ca660, 0xecedffb48, 0x3b2b14f8, 0xe90d20, 0x0, 0x20000004455c0, 0x0, ...)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/tcpsock_posix.go:171 +0x13c

net.dialSingle(0xc82001c120, 0x2b967bf611e0, 0xc8201ca660, 0xecedffb48, 0x3b2b14f8, 0xe90d20, 0x0, 0x0, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/dial.go:371 +0x50d

net.dialSerial.func1(0xecedffb48, 0x3b2b14f8, 0xe90d20, 0x0, 0x0, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/dial.go:343 +0xb5

net.dial(0xae5958, 0x3, 0x2b967bf611e0, 0xc8201ca660, 0xc82004d990, 0xecedffb48, 0x3b2b14f8, 0xe90d20, 0x0, 0x0, ...)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/fd_unix.go:40 +0x7a

net.dialSerial(0xc82001c120, 0xc82011cb30, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/dial.go:345 +0xa82

net.(*Dialer).Dial(0xc82004dc30, 0xae5958, 0x3, 0xb377e0, 0x14, 0x0, 0x0, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/dial.go:239 +0x66d

net.DialTimeout(0xae5958, 0x3, 0xb377e0, 0x14, 0x1bf08eb000, 0x0, 0x0, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/net/dial.go:200 +0xb4

github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).Connect(0xc8201e6180, 0xb377e0, 0x14, 0x0, 0x0)

	/home/travis/gopath/src/github.com/NebulousLabs/Sia/modules/gateway/peers.go:239 +0x5ef

github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).threadedPeerManager.func1(0xc8201e6180, 0xb377e0, 0x14)

	/home/travis/gopath/src/github.com/NebulousLabs/Sia/modules/gateway/peers.go:352 +0x6b

created by github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).threadedPeerManager

	/home/travis/gopath/src/github.com/NebulousLabs/Sia/modules/gateway/peers.go:356 +0x38f

goroutine 202 [semacquire]:

sync.runtime_Semacquire(0xc8201e61e8)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/sema.go:47 +0x26

sync.(*WaitGroup).Wait(0xc8201e61dc)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/sync/waitgroup.go:127 +0x118

github.com/NebulousLabs/Sia/sync.(*ThreadGroup).Stop(0xc8201e61c0, 0x0, 0x0)

	/home/travis/gopath/src/github.com/NebulousLabs/Sia/sync/threadgroup.go:82 +0x1bc

github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).Close(0xc8201e6180, 0x0, 0x0)

	/home/travis/gopath/src/github.com/NebulousLabs/Sia/modules/gateway/gateway.go:58 +0x7e

github.com/NebulousLabs/Sia/modules/gateway.TestConnect(0xc8201e2360)

	/home/travis/gopath/src/github.com/NebulousLabs/Sia/modules/gateway/peers_test.go:206 +0xc40

testing.tRunner(0xc8201e2360, 0xe7b8a0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/testing/testing.go:473 +0xdd

created by testing.RunTests

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/testing/testing.go:582 +0xae3

goroutine 180 [semacquire]:

sync.runtime_Syncsemacquire(0xc8201760d0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/sema.go:241 +0x201

sync.(*Cond).Wait(0xc8201760c0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/sync/cond.go:63 +0xb3

github.com/NebulousLabs/muxado/proto/buffer.(*Inbound).Read(0xc8201e0060, 0xc82011d1a8, 0x4, 0x8, 0x0, 0x0, 0x0)

	/home/travis/gopath/src/github.com/NebulousLabs/muxado/proto/buffer/inbound.go:155 +0x697

github.com/NebulousLabs/muxado/proto.(*Stream).Read(0xc82001e100, 0xc82011d1a8, 0x4, 0x8, 0x0, 0x0, 0x0)

	/home/travis/gopath/src/github.com/NebulousLabs/muxado/proto/stream.go:73 +0x79

io.ReadAtLeast(0x2b967bf65a48, 0xc82001e100, 0xc82011d1a8, 0x4, 0x8, 0x4, 0x0, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/io/io.go:297 +0x119

io.ReadFull(0x2b967bf65a48, 0xc82001e100, 0xc82011d1a8, 0x4, 0x8, 0x80, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/io/io.go:315 +0x77

encoding/binary.Read(0x2b967bf65a48, 0xc82001e100, 0x2b967bfbf0d8, 0xeae4c0, 0x94dfc0, 0xc82011d1a0, 0x0, 0x0)

	/home/travis/.gimme/versions/go1.6.linux.amd64/src/encoding/binary/binary.go:152 +0x16d

github.com/NebulousLabs/muxado/proto/ext.(*Heartbeat).request(0xc8201ee4e0)

	/home/travis/gopath/src/github.com/NebulousLabs/muxado/proto/ext/heartbeat.go:114 +0x3c0

created by github.com/NebulousLabs/muxado/proto/ext.(*Heartbeat).Start

	/home/travis/gopath/src/github.com/NebulousLabs/muxado/proto/ext/heartbeat.go:47 +0xce

FAIL	github.com/NebulousLabs/Sia/modules/gateway	300.020s

So thats why I changed the dialTimeout. It's blocking in Connect on
conn, err := net.DialTimeout("tcp", string(addr), dialTimeout)

I'll investigate, I think it's a bug in the test and changing the dialTimeout just hides it.

Would be nice if ThreadGroup could track the line number of each Add and tell you which one hadn't returned.

oh dammit

Ahh it's the threadedPeerManager trying to connect to the a dummy node. Ideally we wouldn't use dummy nodes, and we'd use real gateways instead, but it's a common pattern in testing so reducing dialTimeout is a better solution.

I'm being mean with this one, given that it seemed to introduce a lot of nondeterministic test failures initially. If the next set of tests passes I'll merge it.


Suite of suites testng.xml parallel execution

TestNG Version
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>6.9.10</version>
                <scope>test</scope>
            </dependency>

Expected behavior
When running a suite of suites via testing.xml I expect each class within a suite to run in parallel.
Actual behaviour
Each suite runs in parallel but classes within the suite run sequentially:
suitea testcase 1 and suite b testcase2 run in parallel
suitea testcase3 runs after testcase1 completes
Is the issue reproductible on runner?
IntelliJ
Test case sample
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" name="Suite" parallel="tests">
    <suite-files>
        <suite-file path="suitea.xml" />
        <suite-file path="suiteb.xml" />
    </suite-files>
</suite> <!-- Suite -->

------suitea.xml--------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" name="Suite" parallel="tests">
    <test name="FirstTest" thread-count="5" parallel="methods" >
        <parameter name="browser" value="chrome"/>
        <parameter name = "title" value="SS1 Verify the login section"/>
        <classes>
            <class name="testsuite.TestCase1"/>
        </classes>
    </test> <!-- First Test -->
    <test name="SecondTest" thread-count="5" parallel="methods" >
        <parameter name="browser" value="chrome"/>
        <parameter name = "title" value="SS2 Second Login Test"/>
        <classes>
            <class name="testsuite.TestCase3"/>
        </classes>
    </test> <!-- Second Test -->
</suite> <!-- Suite -->

------suiteb.xml--------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" name="Suite" parallel="tests">

    <test name="SecondTest" thread-count="5" parallel="methods" >
        <parameter name="browser" value="chrome"/>
        <parameter name = "title" value="SR1 Verify item in mobile list page can be sorted by name"/>
        <classes>
            <class name="testsuite.TestCase2"/>
        </classes>
    </test> <!-- First Test -->
</suite> <!-- Suite -->

@petermartin2002 - Can you please retry using the latest released version of TestNG 6.14.2 and let us know if the issue exists ? 6.9.10 is a very old version.

Upgraded and still the same issue

@petermartin2002 - Can you please help share a sample that can be used to recreate this issue ?

testsuite.zip
framework.zip
Test cases, pom.xml, and testng, and suite xml attached.
It is really straightforward to recreate from that.

Any advice here folks?
When I run the suites on their own they run in parallel but the suite of suites runs each suite and its subsequent tests serially.  Quite frustrating

@petermartin2002 - The attached project contains references to some classes that aren't included. So its not possible to reproduce the issue.
I would request you to please attach a simple test project (without any page objects or selenium dependency), that can be used to reproduce the issue.

@glenn04 - Can you please help create a simple standalone project (which uses nothing outside of core java) that we can use to reproduce the problem ?

Hello,
@glenn04  and @petermartin2002  Have you fix your problem ? Because I have exactly the same issue... Please here is a simple project without other dependencies. Ready to use !
issues1686.zip
To execute :
mvn clean verify -DsuiteXmlFile=myTestng.xml
Thank you :)

@albanlorillard not yet bro, no answer yet from @krmahadevan ?

@glenn04 - I will get to this as soon as possible. A bit swamped by stuff.
@albanlorillard - Thanks for providing a reproducible test. I will try using that to see what is going on.

Hello @krmahadevan ,
Please consider below sample code.
public class LoginTest {
@Test (priority=0)
public void loginTest(){
System.out.println("User Login");
}
@Test (priority=1)
public void registerUser(){
System.out.println("Register User ");
}
@Test (priority=2)
public void forgotPass(){
System.out.println("Forgot Password");
}
}
public class addProduct {
@Test (priority=0)
public void ProductAdd() {
System.out.println("Product Added ");
}
@Test(priority=1)
public void editProduct(){
System.out.println("Product Edited");
}
@Test(priority=2)
public void deleteProduct(){
System.out.println("Delete Product");
}
}
Testng.xml

pom.xml

org.testng
testng
6.14.3
test

Also my all test run in parallel.
Out Put :
Product Added
User Login
Product Edited
Register User
Delete Product
Forgot Password
===============================================
Suite
Total tests run: 6, Failures: 0, Skips: 0

Did any one found any solution ?

if you make yours testng.xml as shown below then your test will execute in proper manner.

Share your experience or thoughts
@VishnuGupta16

@DhavalAtri But it is not suite of suites
The question was about suite of suites parallel run

Any updates on this?
I am using cucumber testng and have the same problem with suite of suites (that listed there suited runs one after another, not in parallel)

@tarasmytlovych - No I am yet to get to this issue. Is this a problem when using TestNG 7.0.0-beta3 (latest released version as of today) ?

I have tried reproducing this issue with TestNG 7.0.0-beta3 and I can't seem to recreate it
@tarasmytlovych - Unless you have a reproducible test that can still reproduce the problem, I may have to close this issue.
Here's what I have (Its the same example that @petermartin2002 had shared when the bug was created. I just cleaned it up and added thread id printing)
package com.rationaleemotions.github.issue1686;

import org.testng.ITestResult;
import org.testng.Reporter;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

public class TestCase1 {
  @BeforeMethod
  public void beforeMethod() {
    System.err.println(getPrefix() + getClass().getName() + " triggered beforeMethod() on #" + Thread.currentThread().getId());
  }

  @Test(priority = 1, description = "SS1 Verify the login section")
  public void login() {
    System.err.println(getPrefix() + getClass().getName() + " triggered login() on #" + Thread.currentThread().getId());
  }

  @AfterMethod
  @Parameters("title")
  public void validate(String title) {
    System.err.println(getPrefix() + getClass().getName() + " triggered validate() with parameter [" + title + "] on #" + Thread.currentThread().getId());
  }

  private static String getPrefix() {
    ITestResult result = Reporter.getCurrentTestResult();
    String suiteName = result.getTestContext().getSuite().getName();
    String testTagName = result.getTestContext().getName();
    return "[Suite :<" + suiteName + ">, Test: <" + testTagName + "> ";
  }

}

package com.rationaleemotions.github.issue1686;

import org.testng.ITestResult;
import org.testng.Reporter;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

public class TestCase2 {
  @BeforeMethod
  public void beforeMethod() {
    System.err.println(getPrefix() + getClass().getName() + " triggered beforeMethod() on #" + Thread.currentThread().getId());
  }

  @Test(priority = 1, description = "SR1 Verify item in mobile list page can be sorted by name")
  public void SR1() {
    System.err.println(getPrefix() + getClass().getName() + " triggered SR1() on #" + Thread.currentThread().getId());
  }

  @AfterMethod
  public void validate(){
    System.err.println(getPrefix() + getClass().getName() + " triggered validate() on #" + Thread.currentThread().getId());
  }

  private static String getPrefix() {
    ITestResult result = Reporter.getCurrentTestResult();
    String suiteName = result.getTestContext().getSuite().getName();
    String testTagName = result.getTestContext().getName();
    return "[Suite :<" + suiteName + ">, Test: <" + testTagName + "> ";
  }

}

package com.rationaleemotions.github.issue1686;

import org.testng.ITestResult;
import org.testng.Reporter;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

public class TestCase3 {
  @BeforeMethod
  public void beforeMethod() {
    System.err.println(
        getPrefix()
            + getClass().getName()
            + " triggered beforeMethod() on #"
            + Thread.currentThread().getId());
  }

  @Test(priority = 1, description = "SS1 Verify the login section")
  public void login() {
    System.err.println(
        getPrefix()
            + getClass().getName()
            + " triggered login() on #"
            + Thread.currentThread().getId());
  }

  @AfterMethod
  @Parameters("title")
  public void validate(String title) {
    System.err.println(
        getPrefix()
            + getClass().getName()
            + " triggered validate() with parameter ["
            + title
            + "] on #"
            + Thread.currentThread().getId());
  }

  private static String getPrefix() {
    ITestResult result = Reporter.getCurrentTestResult();
    String suiteName = result.getTestContext().getSuite().getName();
    String testTagName = result.getTestContext().getName();
    return "[Suite :<" + suiteName + ">, Test: <" + testTagName + "> ";
  }
}

Suites look like below
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" name="Suite" parallel="tests">
  <test name="FirstTest" thread-count="5" parallel="methods">
    <parameter name="browser" value="chrome"/>
    <parameter name="title" value="SS1 Verify the login section"/>
    <classes>
      <class name="com.rationaleemotions.github.issue1686.TestCase1"/>
    </classes>
  </test> <!-- First Test -->
  <test name="SecondTest" thread-count="5" parallel="methods">
    <parameter name="browser" value="chrome"/>
    <parameter name="title" value="SS2 Second Login Test"/>
    <classes>
      <class name="com.rationaleemotions.github.issue1686.TestCase3"/>
    </classes>
  </test> <!-- Second Test -->
</suite> <!-- Suite -->

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" name="Suite" parallel="tests">

  <test name="SecondTest" thread-count="5" parallel="methods" >
    <parameter name="browser" value="chrome"/>
    <parameter name = "title" value="SR1 Verify item in mobile list page can be sorted by name"/>
    <classes>
      <class name="com.rationaleemotions.github.issue1686.TestCase3"/>
    </classes>
  </test> <!-- First Test -->
</suite> <!-- Suite -->

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" name="Suite" parallel="tests" verbose="2">
  <suite-files>
    <suite-file path="./suitea.xml" />
    <suite-file path="./suiteb.xml" />
  </suite-files>
</suite> <!-- Suite -->

Execution output
...
... TestNG 7.0.0-beta3 by Cédric Beust<EMAIL_ADDRESS>...
[Suite :<Suite (0)>, Test: <SecondTest> com.rationaleemotions.github.issue1686.TestCase3 triggered beforeMethod() on #13
[Suite :<Suite (0)>, Test: <FirstTest> com.rationaleemotions.github.issue1686.TestCase1 triggered beforeMethod() on #14
[Suite :<Suite (0)>, Test: <FirstTest> com.rationaleemotions.github.issue1686.TestCase1 triggered login() on #14
[Suite :<Suite (0)>, Test: <SecondTest> com.rationaleemotions.github.issue1686.TestCase3 triggered login() on #13
[Suite :<Suite (0)>, Test: <FirstTest> com.rationaleemotions.github.issue1686.TestCase1 triggered validate() with parameter [SS1 Verify the login section] on #14
[Suite :<Suite (0)>, Test: <SecondTest> com.rationaleemotions.github.issue1686.TestCase3 triggered validate() with parameter [SS2 Second Login Test] on #13

===============================================
Suite (0)
Total tests run: 2, Passes: 2, Failures: 0, Skips: 0
===============================================
[Suite :<Suite (1)>, Test: <SecondTest> com.rationaleemotions.github.issue1686.TestCase3 triggered beforeMethod() on #16
[Suite :<Suite (1)>, Test: <SecondTest> com.rationaleemotions.github.issue1686.TestCase3 triggered login() on #16
[Suite :<Suite (1)>, Test: <SecondTest> com.rationaleemotions.github.issue1686.TestCase3 triggered validate() with parameter [SR1 Verify item in mobile list page can be sorted by name] on #16

===============================================
Suite (1)
Total tests run: 1, Passes: 1, Failures: 0, Skips: 0
===============================================

===============================================
Suite
Total tests run: 3, Passes: 3, Failures: 0, Skips: 0
===============================================

Hi All:
Have anybody tried a suite of xml suites syntax with something :
  ?
Have an xml suite os xml suites and need to find a proper syntax.
Thanks in advance for the advice!

@agoldenberg02

<suite thread-count="3" name="Suite" parallel="xml"> ?

There is nothing like that. The only allowed values are

methods
classes
tests
instances

Haven't seen any response for my earlier question on this and since I am also not able to reproduce the problem. Closing this. If this is still a problem, need a reproducible sample using the latest released version of TestNG (7.0.0-beta7 as of today)

@krmahadevan as far as i see, in your example suites are executed sequentially instead of parallel (first - suitea.xml, then suiteb.xml), but the main issue is how to run suitea and suiteb parallel

@krmahadevan as far as i see, in your example suites are executed sequentially instead of parallel (first - suitea.xml, then suiteb.xml), but the main issue is how to run suitea and suiteb parallel

Hey , We can use the Maven Surefire Plugin to Run the suites in parallel by adding a property called  to the Plugin Configuration.

Even I am waiting for same issue's solution

This is exactly what I am observing as well, even with version 7.1.0. The suite-file's in a suite-files list are executed in sequence, instead of in parallel.

Here's the suite of suite file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="github-1686-master-suite" verbose="2">
  <suite-files>
    <suite-file path="slave-1.xml"/>
    <suite-file path="slave-2.xml"/>
  </suite-files>
</suite>

And here's how the surefire plugin looks like
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M1</version>
        <executions>
          <execution>
            <phase>test</phase>
          </execution>
        </executions>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>src/test/resources/master.xml</suiteXmlFile>
          </suiteXmlFiles>
          <properties>
            <property>
              <name>suitethreadpoolsize</name>
              <value>${threads}</value>
            </property>
          </properties>
        </configuration>
      </plugin>

Execution output
[INFO] Running TestSuite
...
... TestNG 7.1.0 by Cédric Beust<EMAIL_ADDRESS>...

Suite: <github-1686-slave-suite-1>, TestName: <github-1686-test-11>, MethodName: <com.rationaleemotions.TestCase1.one()> running on Thread : 13
Suite: <github-1686-slave-suite-2>, TestName: <github-1686-test-21>, MethodName: <com.rationaleemotions.TestCase1.one()> running on Thread : 14
Suite: <github-1686-slave-suite-2>, TestName: <github-1686-test-21>, MethodName: <com.rationaleemotions.TestCase1.two()> running on Thread : 14
Suite: <github-1686-slave-suite-1>, TestName: <github-1686-test-11>, MethodName: <com.rationaleemotions.TestCase1.two()> running on Thread : 13
Suite: <github-1686-slave-suite-2>, TestName: <github-1686-test-21>, MethodName: <com.rationaleemotions.TestCase2.one()> running on Thread : 14
Suite: <github-1686-slave-suite-1>, TestName: <github-1686-test-11>, MethodName: <com.rationaleemotions.TestCase2.one()> running on Thread : 13
Suite: <github-1686-slave-suite-2>, TestName: <github-1686-test-21>, MethodName: <com.rationaleemotions.TestCase2.two()> running on Thread : 14
Suite: <github-1686-slave-suite-1>, TestName: <github-1686-test-11>, MethodName: <com.rationaleemotions.TestCase2.two()> running on Thread : 13
Suite: <github-1686-slave-suite-2>, TestName: <github-1686-test-22>, MethodName: <com.rationaleemotions.TestCase1.one()> running on Thread : 14
Suite: <github-1686-slave-suite-1>, TestName: <github-1686-test-12>, MethodName: <com.rationaleemotions.TestCase1.one()> running on Thread : 13
Suite: <github-1686-slave-suite-2>, TestName: <github-1686-test-22>, MethodName: <com.rationaleemotions.TestCase1.two()> running on Thread : 14
Suite: <github-1686-slave-suite-1>, TestName: <github-1686-test-12>, MethodName: <com.rationaleemotions.TestCase1.two()> running on Thread : 13
Suite: <github-1686-slave-suite-2>, TestName: <github-1686-test-22>, MethodName: <com.rationaleemotions.TestCase2.one()> running on Thread : 14
Suite: <github-1686-slave-suite-1>, TestName: <github-1686-test-12>, MethodName: <com.rationaleemotions.TestCase2.one()> running on Thread : 13
Suite: <github-1686-slave-suite-2>, TestName: <github-1686-test-22>, MethodName: <com.rationaleemotions.TestCase2.two()> running on Thread : 14
Suite: <github-1686-slave-suite-1>, TestName: <github-1686-test-12>, MethodName: <com.rationaleemotions.TestCase2.two()> running on Thread : 13
[INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.515 s - in TestSuite

The below attached project should demonstrate the parallelism in action.
github-1686.zip
If this is still a problem, please create a new issue and attach a sample project that can be used to reproduce the problem.

how can i execute parallel for below  suite files????

@fh-saikumar Please use the TestNG google groups to get help on TestNG.
And when you post on the google forum, please ensure that you share more context so that it's easier to understand what is the issue. Dont forget to use the latest released version of TestNG (7.6.1 as of today)

That's a suite of suites. I don't think you can execute them in parallel. Atleast not as far as I know of.

So, the final answer, that it is impossible to run separated suites in parallel from master suite?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Automation Test Suite" parallel="tests" thread-count="10">
    <suite-files>
        <suite-file path="src/test/resources/suites/web.xml"/>
        <suite-file path="src/test/resources/suites/api.xml"/>
    </suite-files>
</suite>

@silverenio - Yeah that's the current behaviour as of today. Perhaps it can be changed.
@juherr - WDYT ?

@silverenio - I checked this once again and it looks like it can be done. Please check the below attached project.
when you run the tests using mvn clean test you should see an output like below
[INFO] --- surefire:3.2.5:test (default-test) @ issue_1686 ---
[INFO] Using auto detected provider org.apache.maven.surefire.testng.TestNGProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
...
... TestNG 7.9.0 by Cédric Beust<EMAIL_ADDRESS>...

[Thread #19] Suite -> <child_suite_2>, Test -> <child_test_2>, TestMethod -> <com.rationaleemotions.SampleTestCase.test1()>
[Thread #18] Suite -> <child_suite_1>, Test -> <child_test_1>, TestMethod -> <com.rationaleemotions.SampleTestCase.test1()>

[Thread #19] Suite -> <child_suite_2>, Test -> <child_test_2>, TestMethod -> <
com.rationaleemotions.SampleTestCase.test2()>
[Thread #18] Suite -> <child_suite_1>, Test -> <child_test_1>, TestMethod -> <com.rationaleemotions.SampleTestCase.test2()>
PASSED: com.rationaleemotions.SampleTestCase.test2
PASSED: com.rationaleemotions.SampleTestCase.test1
PASSED: com.rationaleemotions.SampleTestCase.test2
PASSED: com.rationaleemotions.SampleTestCase.test1

===============================================
    child_test_2
    Tests run: 2, Failures: 0, Skips: 0
===============================================

===============================================
    child_test_1
    Tests run: 2, Failures: 0, Skips: 0
===============================================

[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.608 s -- in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipp

ed: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.039 s
[INFO] Finished at: 2024-03-05T19:34:03+05:30
[INFO] ------------------------------------------------------------------------

issue_1686.zip


Hide bot comments in PR

Description
Comments to Pull Requests from third-party bots are very common. They are value for contributors and PR authors. As an viewer however, those comments are noise and require me to scroll to value review comments.
I would like to propose to hide* comments from bots in PRs, when

I'm not repo owner.
I'm not repo contributor.
I'm not repo member.
I'm not PR author (for first-time contributors).

*Possible ways to hide comments from bots:

Collapse.
Grey-out.
Opaque.
Hide completely, aldo I would not suggest this.

Screenshot
No response
Example URLs
https://github.com/typescript-eslint/typescript-eslint/pull/6237
Hide comments from typescript-eslint, nx-cloud, netlify, codecov.

Related:

https://github.com/refined-github/refined-github/issues/2672#issuecomment-1208916485

My current solution for this:
.timeline-comment:not(:hover):has(
	.author + .Label,
	.author:is(
		[href="/apps/github-actions"],
		[href="/codecov-commenter"]
	)
) {
	overflow: hidden;
	height: 39px;
}

My current solution for this:
.unminimized-comment:not(
    :hover,
    .js-discussion > .TimelineItem:first-child *
  ):has(
    .author + .Label,
    .author:is([href="/apps/github-actions"], [href="/codecov-commenter"])
  ) {
  overflow: hidden;
  height: 70px;
}

are there any issues with this? or can this just be implemented?

A couple of issues:

people might be interested in that content
it's actually rather annoying because it opens instantly on hover, and if there are 2/3 stacked on top of each other it's nearly impossible to hover the right one

I would love to use the same mechanism as for off-topic comments:

Combined with the current detection of bots.

I would love to use the same mechanism as for off-topic comments:
Combined with the current detection of bots.

i think this and having it as a toggable option(toggled on by default) for those who still  want to see the comments would be a nice way to do things

I agree it would be nice, it's a lot of DOM though. If the dom is already on the page (likely) it would be much more manageable. Exploration needed.
However I'm still not convinced it's a good default unfortunately, there are bots like on TypeScript's repo that give required, extended information which should not be hidden this way

However I'm still not convinced it's a good default unfortunately, there are bots like on TypeScript's repo that give required, extended information which should not be hidden this way

Agree, that's why I mentioned the conditions when to hide or not:

I would like to propose to hide* comments from bots in PRs, when

I'm not repo owner.
I'm not repo contributor.
I'm not repo member.
I'm not PR author (for first-time contributors).

So, kinda only when you are reader.

Those might actually be interesting exclusions, but then this still won't stop cases where I still don't care about the bots as a PR submitter 🥲
I'm using my CSS snippet specifically to hide comments from noisy bots on repos I contribute to, so a feature with those exclusions would not only be "not useful" but also force me update my snippet to avoid conflicts 😅
(To reiterate: I'm ok with my own snippet because I wrote and added it, but it's not a good default for all.)

To recap:

some bots contain fundamental info and it's not safe to just collapse/hide them for everyone, even with a "summary" style like we do in preview-hidden-comments

Even dim-bots itself is relatively annoying for people who do use bots (#5993 aims to improve the UX though) and that's not even hiding any information.
My second idea would be to de-highlight bots comments to it's easier to ignore them. Would this be useful in practice though?

.unminimized-comment:not(:hover, .js-discussion > .TimelineItem:first-child *):has( .author + .Label, .author:is( [href="/apps/github-actions"], [href="/codecov-commenter"] ) ) * {
color: var(--color-border-default);
}

To recap:

some bots contain fundamental info and it's not safe to just collapse/hide them for everyone, even with a "summary" style like we do in preview-hidden-comments

Even dim-bots itself is relatively annoying for people who do use bots (#5993 aims to improve the UX though) and that's not even hiding any information.
My second idea would be to de-highlight bots comments to it's easier to ignore them. Would this be useful in practice though?

.unminimized-comment:not(:hover, .js-discussion > .TimelineItem:first-child *):has( .author + .Label, .author:is( [href="/apps/github-actions"], [href="/codecov-commenter"] ) ) * {
color: var(--color-border-default);
}

i think we should de-highlight bot comments until you hover over them

Can we implement this: https://github.com/bluwy/refined-github-comments

That userscript looks great and you can use it directly.

Duplicate of https://github.com/refined-github/refined-github/issues/2672

Ultimately this is incompatible with Refined GitHub:

some (bot) comments are important
Refined GitHub won't add a "Hide this user" option

Basically this makes the feature request the same as:

https://github.com/refined-github/refined-github/issues/2672

So now you have at least two options:

https://github.com/bluwy/refined-github-comments
The CSS-only solution I previously suggested


Install the prebuilt binary automatically

Close #221

This should be combined with variations on the plugin manage install commands, one each for how to install without the helper, one for a hook that builds the helper locally (but automatically in install for supported plugin managers), and one for how to fetch the pre-built.
Nice work by the way, still loving Clap!


add docs for building on ubuntu docker containers

Added documentation to successfully perform a build from docker ubuntu container.
Closes #6902

@mourner @jonkoops can this still be an issue? We removed phantomjs


Ability to pass key secret via --extra-vars for OpenStack setups

puppet-ceph allows a user to pass a key secret (e.g. one that could be generated by ceph-authtool --gen-print-key) as a parameter. It then uses this key secret to create a keyring file with capabilities to access pools used by OpenStack. For example: https://github.com/openstack/puppet-ceph/blob/master/manifests/key.pp#L130
Could ceph-ansible have this ability as well?

@leseb I created this issue as per our conversation (I don't seem to have the ability to set Assignees). thanks!

Could this key be set 644 so that the openstack ser


Error when starting a newly created app.

Please provide us with the following information:

This issue is for a: (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

populated .env file with required data, npm start. Node version is 17.9.1

Any log messages given by the failure

Uncaught TypeError: util__WEBPACK_IMPORTED_MODULE_0__.TextEncoder is not a constructor
at<EMAIL_ADDRESS>(bundle.js:675181:21)
at options.factory (bundle.js:803898:31)
at webpack_require (bundle.js:803291:33)
at fn (bundle.js:803555:21)
at<EMAIL_ADDRESS>(bundle.js:625275:76)
at options.factory (bundle.js:803898:31)
at webpack_require (bundle.js:803291:33)
at fn (bundle.js:803555:21)
at<EMAIL_ADDRESS>(bundle.js:25036:80)
at options.factory (bundle.js:803898:31)

Expected/desired behavior

Expected app to start.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
macOs Monterey

Versions

Mention any other details that might be useful

Thanks! We'll be in touch soon.

Re-created the app with 16.20.0 node version.


MicroProfile Health 3.1 Specification Review

[x] Specification name and version
[x] Add the label Release Review
[x] Naming conventions for artifacts:

[x] Specification PDF in the form of microprofile-project-spec-version.pdf
[x] Specification HTML in the form of microprofile-project-spec-version.html
project is the microprofile specification short project name (config, health, ...)
version is the two digit x.y version of the specification

[x] The Nexus Staging links (orgeclipsemicroprofile-NNNN where NNNN is the staging repository id) (eg, https://oss.sonatype.org/content/repositories/orgeclipsemicroprofile-NNNN/org/eclipse/microprofile/config/) which contain all the binaries and relevant documentation:

[x] Staging Repo
[x] Spec PDF
[x] Spec HTML
[x] Javadoc
[x] API Jar
[x] TCK Jar

[x] A link in the Eclipse downloads sections is still available for specs and apidocs:

[x] https://download.eclipse.org/microprofile/staging/microprofile-health-3.1/
[x] An apidocs directory containing the javadoc associated with the API jar.

[x] Summary that a Compatible Implementation is complete, passes the TCK, and that the TCK includes sufficient coverage of the specification.

[x] Compatible Certification Request

[ ] Release Review

[x] Follow governance process and create/update release record

Component Release Record

[x] Email to PMC (more info here)
[x] Start release review by emailing EMO (more info here)(Track the bug issue created by EMO after the email)
[x] A member of Steering Committee initiates the ballot by sending an email to [microprofile-wg]<EMAIL_ADDRESS>(more info here
[ ] After the voting has ended, email [microprofile-wg]<EMAIL_ADDRESS>with the ballot result (more info here

@radcortez and @xstefank, why is there another "specs" directory in the maven repository:
https://oss.sonatype.org/content/repositories/orgeclipsemicroprofile-1469/org/eclipse/microprofile/health/specs/microprofile-health-spec/
Shouldn't the "microprofile-health-spec" directory be at the top-level like all of the rest?
https://oss.sonatype.org/content/repositories/orgeclipsemicroprofile-1469/org/eclipse/microprofile/health/
I looked at the other MP specs in maven and I don't see where other components have inserted this "specs" directory.  Is there a reason for it?  Or, can it be removed?
Thanks!

@kwsutter this is historical, going way before I started with the spec. Personally, I don't think we need to restart the ballot for this now if we want to make the June release for the platform but I agree that it should be done. I will do it in the next release if that's acceptable.

@kwsutter this is historical, going way before I started with the spec. Personally, I don't think we need to restart the ballot for this now if we want to make the June release for the platform but I agree that it should be done. I will do it in the next release if that's acceptable.

Yes, that's the problem, isn't it?  Since it's already staged with this "specs" directory, any update would change the artifacts being voted on, right?  I guess it's just cosmetic.  I will create an Issue in the Health repo to get this cleaned up for the next release.  Thanks.

I don't know if it's too late, it would have been nice had the copyright year in title page of the Spec. document license-efsl.asciidoc been updated to 2021.

@edbratt good catch. Would require a full respin, unfortunately. Do we need to really restart everything again?

@xstefank please update the component releae record to match the new annotation.

@Emily-Jiang done, thanks.

The artifacts are released and available in the maven central. Closing.


Fix key resolution text #2014 and more

The DITA 1.3 spec topic about generated text based on key references is clear that when the primary rules do not work, all elements with @keyref should look to <linktext>. This is not working today for elements without @href, as reported in #2014.
After starting with @raducoravu 's suggested fix, I extended my test case and found quite a few more edge cases that are either broken (wrong output) or bad (no output when we could provide something). This pull request covers all of the following updates:

In rule number 2, the spec topic says non-linking elements should look for <keyword> inside of <keywords> and consider that as matching content. Today the code looks for <keyword> anywhere within the key definition. So if I have <linktext><keyword>book</keyword> title</linktext>, matching text for all elements becomes "book" instead of "book title".
The spec explicitly says that for linking elements, if there are multiple keyword elements in <keywords>, all should be used (rule 3 has an example). Today we only use the first. This pull request takes them all, though I consider this an edge case - the rule carried over from DITA 1.2.
Getting to rule 4, this request adds support for the full content of <linktext> as the next fallback for all elments
Based on rule 5 in the spec topic, linking elements today fall back to @navtitle. But there are a couple of problems here:

If using navtitle, it should prefer <navtitle> (today that is ignored), so I've added that.
Non linking elements never get here, and give bad output. Having reached the end of the specification algorithm, with no good output, I think it's foolish to ignore the available navtitle, so I've added that as another fallback for non-linking elements.
If the target is a local DITA topic, we should not pull the navtitle unless that title is locked, because the true title will be pulled from that topic later

Additionally in rule 5, the specification says that "normal rules apply", which is clearly implementation specific. In links without keys, we fall back to the URI as the last resort, so I've added that as well. Again this is only for non-DITA or non-local content, because local DITA should wait and retrieve link text from the target.

Basically, the focus of this report is on

Getting linktext to work so that key definitions have a universal fallback (this is specifically described in the spec as a best practice, and is broken today.
Fixing output that today is broken (or just bad), and can easily be made correct (or at least reasonable).

Looks like this also addresses #1590.

Converted for-loop with index to stream API, intent easier to read.
Extracted writeLinktext methods to separate methods, also for readability.


Bug: Azure/k8s-deploy@v4 cannot file path of .aml file

What happened?
What happened?
I get an error "Error: undefined" when running the following pipeline:
name: build_deploy_aks_chat
on:
  push:
    branches:
      - "dev"
jobs:
  build-and-push:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout source code
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GH_LIB_TOKEN }}
          submodules: recursive
      - name: Login to DockerHub
        uses: azure/docker-login@v1
        with:
          login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
          username: ${{ secrets.REGISTRY_USERNAME }}
          password: ${{ secrets.REGISTRY_PASSWORD }}
      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: |
            ${{ secrets.registry_login_server }}/myservice-chat
          tags: |
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}
            type=sha
      - name: Build and push Docker image
        uses: docker/build-push-action@v5
        with:
          context: ./services/chat
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          file: ./services/chat/Dockerfile
      - name: Azure login
        uses<EMAIL_ADDRESS>        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}
      - name: Set AKS context
        uses: azure/aks-set-context@v3
        with:
          resource-group: ${{ secrets.resource_group }}
          cluster-name: ${{ secrets.cluster_name }}
      - name: Setup kubectl
        uses: azure/setup-kubectl@v3
      - name: Deploy to AKS
        uses: Azure/k8s-deploy@v4
        with:
          resource-group: ${{ secrets.resource_group }}
          name: ${{ secrets.cluster_name }}
          action: deploy
          strategy: basic
          private-cluster: true
          namespace: "myservice"
          manifests: |
            ./services/chat/manifest/deployment.yaml
            ./services/chat/manifest/service.yaml
            ./services/chat/manifest/horizontal-pod-autoscaler.yaml
          images: |
            ${{ secrets.registry_login_server }}/myservice-chat:latest
          pull-images: false

Then, I get the error:
  the path "/tmp/chat-deployment.yaml" does not exist
  the path "/tmp/chat-service.yaml" does not exist
  the path "/tmp/chat-horizontal-pod-autoscaler.yaml" does not exist

  Error: Error: undefined

I am not sure what else could be an issue.
Many thanks in advance!
Version

[X] I am using the latest version

Runner
Standard GitHub-hosted runners
Relevant log output
Deploying manifests
  ##[debug]/tmp//tmp/deployment.yaml does not exist, and therefore cannot be moved to the manifest directory
  ##[debug]private cluster Kubectl run with invoke command: kubectl apply -f /tmp/deployment.yaml,/tmp/service.yaml,/tmp/horizontal-pod-autoscaler.yaml --namespace ***-ai-assitant-service
  ##[debug]full form of az command: az aks command invoke --resource-group *** --name *** --command kubectl apply -f /tmp/deployment.yaml,/tmp/service.yaml,/tmp/horizontal-pod-autoscaler.yaml --namespace ***-ai-assitant-service --file . -o json
  ##[debug]Could not rename /tmp//tmp/deployment.yaml to  /tmp/manifests//tmp/deployment.yaml ERROR: Error: ENOENT: no such file or directory, copyfile '/tmp//tmp/deployment.yaml' -> '/tmp/manifests//tmp/deployment.yaml'
  ##[debug]from kubectl private cluster command got run output ***"exitCode":0,"stdout":"***\n  \"exitCode\": 1,\n  \"finishedAt\": \"xxx",\n  \"id\": \"xxx\",\n  \"logs\": \"the path \\\"/tmp/deployment.yaml\\\" does not exist\\nthe path \\\"/tmp/service.yaml\\\" does not exist\\nthe path \\\"/tmp/horizontal-pod-autoscaler.yaml\\\" does not exist\\n\",\n  \"provisioningState\": \"Succeeded\",\n  \"reason\": null,\n  \"startedAt\": \"xxx\"\n***\n","stderr":""***
  the path "/tmp/deployment.yaml" does not exist
  the path "/tmp/service.yaml" does not exist
  the path "/tmp/horizontal-pod-autoscaler.yaml" does not exist

  ##[debug]Kubectl apply failed:Error: failed private cluster Kubectl command: kubectl apply -f /tmp/deployment.yaml,/tmp/service.yaml,/tmp/horizontal-pod-autoscaler.yaml --namespace ***-ai-assitant-service
  Error: Error: undefined
  ##[debug]Node Action run completed with exit code 1
  ##[debug]Finishing: Deploy to AKS

/tmp//tmp/deployment.yaml

educated guess:
to me this looks like there is supposed to be something between the two //, that tends to happen when some variable is empty that is expected to be in there, not sure which one it could be though

Just to note.. This seems to be an issue with the private-cluster setting. When working with a non-private cluster it works.
Perhaps is not necessarily a bug, but at least missing documentation on how to deploy to a private cluster.

Just to note.. This seems to be an issue with the private-cluster setting. When working with a non-private cluster it works. Perhaps is not necessarily a bug, but at least missing documentation on how to deploy to a private cluster.

Thank you for your response. Yes, with non-private cluster, I can deploy multiple yaml files in the same step, but not with private cluster. Currently I solve this problem by separating each yaml file into one step (maybe it's not optimal but it's the only way I found.

V5 e v5.0.0 tbm está dando esse problema, passando os arquilos listados, ou apenas a pasta dos arquivos.


Specify concrete syntax for built-in lists, pairs, and data (PLT-378)

This updates the specification to include a description of the syntax for the built-in data type and built-in list and pairs (see this comment).  The syntax accepted by the uplc parser (and others) differs slightly and we'll need to fix that: see PLT-9074.
~The page numbers in the index of notation at the end are all off by one, I think because the title page and the abstract page don't have page numbers. I'm trying to work out how to fix this.~
Rendered PDF: plutus-core-specification.pdf.

This finally passes CI (it only modifies some LaTeX, so I don't know what the problem was), so I'll merge it.


Handle prolongWebView

According to Telegram (https://core.telegram.org/method/messages.requestWebView) we should prolong it instead of restarting it every 15 minutes

I also added some additional patches to the code

help me, what should I do if the console displays “No valid proxy!”

NameError: name 'proxies_data' is not defined. Did you mean: 'proxies_list'?

the console still says "no valid proxy!"


[FEATURE] Ability to extend this stack

Is your feature request related to a problem?
This project deploys 2 stacks today which are dependent on each other. If the user wants to deploy this stack as a part of another CDK code base, they should be able to. We do not have a mechanism or instructions on how to consume this set up.
One of the solution is to publish this code package to npmjs.org
What solution would you like?
Ability to extend this stack so that it can be embedded with another CDK set up if required. One of the use case is https://github.com/opensearch-project/opensearch-devops/issues/129
Also all the variables passed today are passed as context variables, maybe it would be helpful to have them as properties similar to https://github.com/opensearch-project/opensearch-ci#construct-props
What alternatives have you considered?
Deploy this set up first and then run the new CDK set up separately
Do you have any additional context?
Add any other context or screenshots about the feature request here.

Did some research on how to do this and also synced up with @prudhvigodithi (Thanks!).
Looks like OsClusterEntrypoint which is responsible for deploying network and infra stack cannot be extended as it is not an instance of Stack base class. Planning to move the required checks and data transformation to respective classes. I suppose the entrypoint won't be useful much after that. Let me know what you think @rishabh6788 .

opensearch-cluster-cdk is published to npmjs.org now: https://www.npmjs.com/package/@opensearch-project/opensearch-cluster-cdk
Users can now use the package programmatically in their typescript cdk codebase to deploy the stacks.


Method screenshot() performs a remove focus action before taking the screenshot

The problem
Method Selenide.screenshot() also performs a remove focus action.
Details
When calling method screenshot() I've noticed that is also does a remove focus action before taking the actual screenshot. This can lead to catching different UI elements in mid transition due to the remove focus action, elements like the list of a dropdown that was opened.
Tell us about your environment

Selenide Version: 7.1.0
Chrome Version: 123.0.6312.106

It seems the issues comes from "selenide-full-screenshot", when running without it the focus is not removed from the element.
Here is with  "selenide-full-screenshot":

Here is the same, but without "selenide-full-screenshot":

@sdragos13 what do you mean by selenide-full-screenshot?

@sdragos13 Are you sure? I just tried, and got the opposite result: with selenide-full-screenshot, there input field was focused, and without selenide-full-screenshot, the input was blurred.

We have a similar problem


[BUG]

Describe the bug
QGlPicamera2 causes pyinstaller to fail, i.e. executables produced by pyinstaller from code which utilise the QGlPicamera2 class produce the following terminal output:
lea@raspberrypi:~/Code/pkg4/dist/app_full $ sudo ./app_full
OpenGL will not be available
Traceback (most recent call last):
  File "app_full.py", line 13, in <module>
ImportError: cannot import name 'QGlPicamera2' from 'picamera2.previews.qt' (/home/lea/Code/pkg4/dist/app_full/picamera2/previews/qt.pyc)
[7283] Failed to execute script 'app_full' due to unhandled exception!
lea@raspberrypi:~/Code/pkg4/dist/app_full $

It should be noted that if QPicamera2 is substituted for QGlPicamera2 then the rendering is successful.
To Reproduce
Picamera2/apps contains the example file app_full.py, which makes use of the QGlPicamera2 class. If we use the following code to make an executable:
pyinstaller --windowed full_app.py
then attempting to execute the output file app_full produces output from the terminal as shown above
lea@raspberrypi:~/Code/pkg4/dist/app_full $ sudo ./app_full
OpenGL will not be available
Traceback (most recent call last):
  File "app_full.py", line 13, in <module>
ImportError: cannot import name 'QGlPicamera2' from 'picamera2.previews.qt' (/home/lea/Code/pkg4/dist/app_full/picamera2/previews/qt.pyc)
[7283] Failed to execute script 'app_full' due to unhandled exception!
lea@raspberrypi:~/Code/pkg4/dist/app_full $

Hardware :
Raspberry pi 4b, bullseye, HQ camera.
Additional context
from the manual:
Picamera2 provides two Qt widgets:
• QGlPicamera2 - this is a Qt widget that renders the camera images using hardware acceleration through the Pi’s GPU.
• QPicamera2 - a software rendered but otherwise equivalent widget. This version is much slower and the QGlPicamera2 should be preferred in nearly all circumstances except those where it does not work (for example, the application has to operate with a remote window through X forwarding).
Is this a circumstance "where it does not work" or can it be fixed? Because it is not an ideal situation if one cannot package an application which contains instances of the QGlPicamera2 class.

Hi, thanks for the report. I did try this with the same results as you. As far as I can tell, it gets unhappy when you import anything from OpenGL. For example, I tried using this "application":
#!/usr/bin/python3

import os

os.environ["PYOPENGL_PLATFORM"] = "egl"

from OpenGL.EGL.EXT.image_dma_buf_import import *

print("hello")

It runs fine "normally", but after running it through pyinstaller we get import failures.
I'm afraid I don't know anything about pyinstaller and OpenGL, but if anyone else reading this does, or has time to investigate, then that would obviously be useful. It seems like getting the demo app above to work would be a good first step. Sorry that I can't be more helpful at the moment.

Hi, thanks for the report. I did try this with the same results as you. As far as I can tell, it gets unhappy when you import anything from OpenGL. For example, I tried using this "application":
#!/usr/bin/python3

import os

os.environ["PYOPENGL_PLATFORM"] = "egl"

from OpenGL.EGL.EXT.image_dma_buf_import import *

print("hello")

It runs fine "normally", but after running it through pyinstaller we get import failures.
I'm afraid I don't know anything about pyinstaller and OpenGL, but if anyone else reading this does, or has time to investigate, then that would obviously be useful. It seems like getting the demo app above to work would be a good first step. Sorry that I can't be more helpful at the moment.

After further exploring the OpenGL module. I found the error actually comes from the OpenGL/plugins.py:
def importByName( fullName ):
"""Import a class by name"""
name = fullName.split(".")
moduleName = name[:-1]
className = name[-1]
module = import( ".".join(moduleName), {}, {}, moduleName)
return getattr( module, className )
when it tries to load "OpenGL.platform.egl", it has the error "No module named "OpenGL.platform.egl"" and this cause all the returned plugin being None and then cause the problem. In order to fix that, before running pyinstaller, ensure that export PYOPENGL_PLATFORM=egl, which means we want the egl platform. And add the missing module by "pyinstaller --hidden-import=OpenGL.platform.egl -F your_script.py". Then everything should work and also the app code.

Thanks very much for this update. Does that resolve this problem (at least as far as we can resolve it), or is there anything more to do? Thanks.

Hi David, thanks very much for this, and sorry for the delay in getting back to you. I can confirm that the small test file I was using for this now builds successfully.
Perhaps more importantly, the app I am building which is relatively speaking much more complex and diverse also built successfully.
Very pleased! I needed a win today, even if it came from someone else :)


Upgrade GitHub actions to their latest versions

@gavintmyers That is unrelated to the change and is being handled in:

#79


Wrong JsonSerializationSettings behaviour.

In case of the following setup:
services.AddMvc()
        .AddJsonOptions(options =>
         {
             options.SerializerSettings.ContractResolver = new OutputJsonResolver();
             options.SerializerSettings.Converters.Add(new DataConverter());
         });

we will got the following errors:
1) DataConverter (derived from JsonConverter) will not be called at all... never...
I am trying to parse data sent to method of controller. It is used to provide some API for client side and JS sends JSON data with Content-Type: application/json. I need to instantiate custom object to pass it to controller as input parameter. In Web Api 2 it works very well.
2) OutputJsonResolver is not called in some cases.
if I will simply return data (for example some complex object with properties) from controller then OutputJsonResolver will be called and all will be processed correctly.
In case when I need to output custom IActionResult... for example OutputResult derived from JsonResult then OutputJsonResolver will not be called. And it looks OK because JsonResult requires JsonSerializerSettings in constructor... so by default it should not be related.
Although, to achieve required behavior (where resolver will participate) I want to pass settings originally provided in AddJsonOptions call. So I used JsonSerializerSettingsProvider.CreateSerializerSettings()".. but it does not work... and it is clear why... if we will look at the code of this method... it uses some defaults and not settings from MVC options.
OK, if I cannot change default settings then I want to change all formatters and setup all with my settings.
    public class SerializerSettingsSetup : IConfigureOptions<MvcOptions>
    {
        #region Constructors
        public SerializerSettingsSetup(ILoggerFactory loggerFactory, ArrayPool<char> charPool, ObjectPoolProvider objectPoolProvider)
        {
            this.loggerFactory = loggerFactory;
            this.charPool = charPool;
            this.objectPoolProvider = objectPoolProvider;
        }
        #endregion

        #region Fields
        private readonly ILoggerFactory loggerFactory;
        private readonly ArrayPool<char> charPool;
        private readonly ObjectPoolProvider objectPoolProvider;
        #endregion

        #region IConfigureOptions<MvcOptions> Members
        public void Configure(MvcOptions options)
        {
            JsonSerializerSettings inputSettings = JsonSerializerSettingsProvider.CreateSerializerSettings();
            JsonSerializerSettings outputSettings = JsonSerializerSettingsProvider.CreateSerializerSettings();

            inputSettings.Converters.Add(new DataConverter());

            inputSettings.ContractResolver = new InputJsonResolver();
            outputSettings.ContractResolver = new OutputJsonResolver();

            var jsonInputLogger = this.loggerFactory.CreateLogger<JsonInputFormatter>();
            var jsonInputPatchLogger = this.loggerFactory.CreateLogger<JsonPatchInputFormatter>();

            options.InputFormatters.RemoveType<JsonInputFormatter>();
            options.InputFormatters.RemoveType<JsonPatchInputFormatter>();
            options.OutputFormatters.RemoveType<JsonOutputFormatter>();

            options.InputFormatters.Add(new JsonInputFormatter(jsonInputLogger, inputSettings, this.charPool, this.objectPoolProvider));
            options.InputFormatters.Add(new JsonPatchInputFormatter(jsonInputPatchLogger, inputSettings, this.charPool, this.objectPoolProvider));
            options.OutputFormatters.Add(new JsonOutputFormatter(outputSettings, this.charPool));
        }
        #endregion
    }

Configure method will be called during application startup (transient was added correctly and after AddMvc) but it is still not possible to get working converters and resolvers.
Summary: we cannot create / get json settings for each formatter separately. We even cannot do that for input / output separately. And even in case when we try to setup it only once for whole application it still does not work as expected.
So current ASP.Net Core serialization behavior is acceptable for "Hello World" app. But it is absolutely not acceptable  for real life application. This issue is one of critical features which does not allow me to move my projects from Web API 2 or NancyFX to ASP.Net Core.

I guess I have figured out at least some of above questions.
I got converter code working (DataConverter : JsonConverter) when I used [FromBody] attribute.
It looks in comparison to Web Api 2 that attribute is mandatory in ASP.Net Core.
But issues related to JsonSerializerSettingsProvider, settings in JsonResult and different formatters settings are still actual but not so critical.. I think I can add this attribute everywhere in "API" controllers.

@kichalla can you investigate?

If you are trying to access the json options (that you had setup in Startup.cs) in your controller, you can inject the service IOptions<MvcJsonOptions>.
But note that you must never change these settings on a per-request basis because these options are applied globally..i.e they would effect all requests to all controllers.
An example of how you can supply serializer settings to JsonResult is below:
https://github.com/aspnet/Mvc/blob/1.0.0/test/WebSites/BasicWebSite/Controllers/JsonResultController.cs#L33
Note that I mention the example above as caching(i.e settings are static) the contract resolver is important from performance perspective.
If this is not answering your question, probably I am missing something. Could you provide a small repro code of the issue in that case?

In your example for JsonResult json settings are obtained from
_customSerializerSettings = JsonSerializerSettingsProvider.CreateSerializerSettings();
How can I obtain here settings used application-wide (provided in Startup.cs)?
It looks really reasonable to have something like:
_customSerializerSettings = JsonSerializerSettingsProvider.GetGobalSettings();
_customSerializerSettings = JsonSerializerSettingsProvider.CopyGobalSettings();
So we have 3 cases of usage JsonSerializerSettingsProvider:

Use JsonSerializerSettingsProvider.CreateSerializerSettings() to create new app-default settings (like it is now).
Use JsonSerializerSettingsProvider.GetGobalSettings() to reference original settings provided in Startup. You said global settings are used everywhere. But it is not correct for JsonResult it will always use own settings. And I want to make my descendant of JsonResult to be dependent on global settings.
Use JsonSerializerSettingsProvider.CopyGobalSettings() to create copy of global settings and override only required options.

I guess now it is not necessary to provide any demo code and your sample code is enough to discuss original question. But if you still need some code let me know.

How can I obtain here settings used application-wide (provided in Startup.cs)?

You can inject IOptions<MvcJsonOptions> options into your controller. It is these settings I was referring to about not modifying on a per-request basis.

Use JsonSerializerSettingsProvider.GetGobalSettings() to reference original settings provided in Startup. You said global settings are used everywhere. But it is not correct for JsonResult it will always use own settings. And I want to make my descendant of JsonResult to be dependent on global settings.

This is not correct. JsonResult, if used without constructor taking in settings, uses the settings from the global MvcJsonOptions.

This is not correct. JsonResult, if used without constructor taking in settings, uses the settings from the global MvcJsonOptions.

OK, it sounds correct BUT it is not exactly so... to be honest JsonResult will not use any global settings. If I understand source code correctly JsonResult will not provide own settings in case of default constructor (with value only). So since settings property is not initialized - default settings will be used during serialization.
But it makes a significant troubles for classes derived from JsonResult.
If I understand right to consider app-wide json settings I have to inject IOptions<MvcJsonOptions> to controller, manually copy all existing settings to new settings instance, pass it to instance of MyJsonResult (derived from JsonResult), update settings inside for it's own purposes and output this result from controller method.
It looks a bit overkill...
I still think we should allow cloning of app-wide json settings from any point of application or at least from such classes like JsonResult.
Of course if it breaks original conception I can do it only for my solution (I even can do it inside configuration as some trick without injecting to constructor). But there is obviously a disadvantage in this conception...

OK, it sounds correct BUT it is not exactly so... to be honest JsonResult will not use any global settings. If I understand source code correctly JsonResult will not provide own settings in case of default constructor (with value only). So since settings property is not initialized - default settings will be used during serialization.

This is what JsonResult does - you can provide your own settings if you want, but by default it uses the settings from MvcJsonOptions https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonResultExecutor.cs#L118

But it makes a significant troubles for classes derived from JsonResult.

Can I ask why you need to make a derived class of JsonResult? Is there an enhancement we should make that would remove your need to do this?

I still think we should allow cloning of app-wide json settings from any point of application or at least from such classes like JsonResult.

If you really want something like this you can easily build it yourself, but you're opting out of DI.
public static class GlobalSettings
{
    public SerializerSettings Default  { get; set; }

    public SerializerSettings CreateCopy() { ... }
}

...

public void Configure(IApplicationBuilder app, IOptions<MvcJsonOptions> json)
{
    GlobalSettings.Default = json.Value.SerializerSettings;
}

The alternative (if you need a custom JsonResult class) would be to register an 'executor' service which is responsible for actually writing the output. Then you don't need to inject options everywhere it's used. This is the best pattern we were able to come up with mixing DI + user-creatable action results.
If you can tell us more about what you need to accomplish we can try to help.

This is what JsonResult does - you can provide your own settings if you want, but by default it uses the settings from MvcJsonOptions https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonResultExecutor.cs#L118

Yes, it is exactly what is mentioned in my previous post. And this makes troubles since I cannot get this default settings in easy way.

If you really want something like this you can easily build it yourself, but you're opting out of DI.

public static class GlobalSettings
{
public SerializerSettings Default  { get; set; }
public SerializerSettings CreateCopy() { ... }

}

Yes something like this and of course I can create some service to handle settings creation/cloning and register this service on startup. But I thought that JsonSerializerSettingsProvider can be such service.
For now as you mentioned (and some guys in this thread) to meet DI requirements I have 2 options:

Inject in controller mvc options to create copy of app json settings and pass it to MyJsonResult.
Create own executor (maybe derived) and register it to process my json result (desired json settings will be prepared inside).

Either of them really looks a bit complicated...
When I am able to derive from JsonResult I should be able to use logic on which it is based.
It is not very good to get desired behavior by controlling execution of result and not result itself.
But in any case it is acceptable solutions. Just more code in comparison to MVC5.

Can I ask why you need to make a derived class of JsonResult? Is there an enhancement we should make that would remove your need to do this?

I need custom data transformation. I must control how data serialized, what should be serialized and what not... For example I control serialization of custom global unique identifiers... I do not allow to serialize anything except permitted interfaces and so on... So I simply want flexible way to control serialization settings.

Yes something like this and of course I can create some service to handle settings creation/cloning and register this service on startup. But I thought that JsonSerializerSettingsProvider can be such service.

I am not even sure if cloning of settings is a safe thing to do. For example, what does it mean to clone the ContractResolver (which maintains a cache). This would be a question for Json.net.

Create own executor (maybe derived) and register it to process my json result (desired json settings will be prepared inside).

I am not sure if you need to go that far. Following is an example that I tried now. Of course, if you made any changes to JsonOptions in Startup.cs it wouldn't show up here, but as @rynowak mentioned you could maintain your own helper to build up the custom settings and apply it in Startup and as well as use in the custom result.
   public class MyJsonResult : JsonResult
    {
        private static readonly JsonSerializerSettings _serializerSettings;
        private readonly object _value;

        static MyJsonResult()
        {
            _serializerSettings = // get settings from the helper
        }

        public MyJsonResult(object value)
            : base(value, _serializerSettings)
        {
            _value = value;
        }

        public override Task ExecuteResultAsync(ActionContext context)
        {
            var wrappedValue = new MyWrapperClass() { ActualValue = _value };
            this.Value = wrappedValue;

            return base.ExecuteResultAsync(context);
        }
    }

    public class MyWrapperClass
    {
        public object ActualValue { get; set; }
    }

For example, what does it mean to clone the ContractResolver (which maintains a cache).

It will be shallow copy of json settings. So cache will not be a problem..
After cloning I want to get new settings instance but with the same instance of ContractResolver.
So it is simply shallow copy... And if I want to add own resolver I will do that in this copy without impact on original settings.

_serializerSettings = // get settings from the helper

I want to get access to original settings here^. I do not need even wrapper. I can do desired transformation on JSON serialization level (with data converter or contract resolver). So I want to get original settings, create its shallow copy, apply custom options for example custom JsonConverter to this copy. And all of that should be in MyJsonResult. Exactly here:

// get settings from the helper

And as it was mentioned previously we have only 2 ways for now to get original settings:

Inject in controller mvc options to create copy of app json settings and pass it to MyJsonResult.
Create own executor (maybe derived) and register it to process my json result (desired json settings will be prepared inside)...

Because for now I cannot prepare such settings in JsonResult.
We do not have service allowing me to reference original json settings (from startup) or create new settings based on that instance. JsonSerializerSettingsProvider is not a service.. it is just static class with very simple factory method, which creates always new default instance and not based on MvcOptions.

Reminders: Never new up JsonSerializerSettings in an MVC app. Instead call JsonSerializerSettingsProvider.CreateSerializerSettings() and make any customization from that starting point. And, of course, use or customize the instance in MvcJsonOptions unless you need a different instance for some purpose.
It's still not clear to me why the original AddJsonOptions(options => { ... }) isn't working perfectly. Have we figured that out?

dougbu, please read carefully whole thread... I do not know how to reply for your question... all information is present in above messages... And I never mentioned direct settings creation!

I never mentioned direct settings creation!

That was a reminder only.

I do not know how to reply for your question... all information is present in above messages

I've read the thread and see your description of the symptoms. But I don't see why the changes you made in the AddJsonOptions() call aren't honoured. Really a question for @kichalla.

// Create a DI service which has your custom settings
public sealed class LegacyAppJsonSerializerSettings
{
    private readonly JsonSerializerSettings _serializerSettings;

    public LegacyAppJsonSerializerSettings(IOptions<MvcJsonOptions> mvcJsonOptions)
    {
        var globalSerializerSettings = mvcJsonOptions.Value.SerializerSettings;

        // TODO: create a copy of the above globalSerializerSettings and set it to _serializerSettings
    }

    public JsonSerializerSettings GetSettings()
    {
        return _serializerSettings;
    }
}

// Creating this as a singleton so that the contract resolver is cached
services.AddSingleton<LegacyAppJsonSerializerSettings>();

// Injecting into an action directly
[HttpGet]
public IActionResult ActionWithSpecificJsonSettings([FromServices] LegacyAppJsonSerializerSettings jsonSerializerSettings)
{
    return Json(
        new Product { Id = Guid.NewGuid(), Name = "iPhone 6s" },
        jsonSerializerSettings.GetSettings());
}

// injecting into a controller
public class Test1Controller : Controller
{
    private readonly JsonSerializerSettings _serializerSettings;

    public Test1Controller(LegacyAppJsonSerializerSettings jsonSerializerSettings)
    {
        _serializerSettings = jsonSerializerSettings.GetSettings();
    }

// Create a DI service which has your custom settings
public sealed class MyCustomJsonSerializerSettings
{
    private readonly JsonSerializerSettings _globalSerializerSettings;

    public MyCustomJsonSerializerSettings(IOptions<MvcJsonOptions> mvcJsonOptions)
    {
        _globalSerializerSettings = mvcJsonOptions.Value.SerializerSettings;
    }

    public JsonSerializerSettings GetSettings()
    {
        var serializerSettings = new JsonSerializerSettings();

        serializerSettings.MissingMemberHandling = _globalSerializerSettings.MissingMemberHandling;
        serializerSettings.MaxDepth = _globalSerializerSettings.MaxDepth;
        serializerSettings.TypeNameHandling = _globalSerializerSettings.TypeNameHandling;

        // copy other properties...

        return serializerSettings;
    }
}

// Creating this as a singleton so that the contract resolver is cached
services.AddSingleton<MyCustomJsonSerializerSettings>();

// Injecting into an action directly
[HttpGet]
public IActionResult ActionWithSpecificJsonSettings([FromServices] MyCustomJsonSerializerSettings jsonSerializerSettings)
{
    return Json(
        new Product { Id = Guid.NewGuid(), Name = "iPhone 6s" },
        jsonSerializerSettings.GetSettings());
}

// injecting into a controller
public class Test1Controller : Controller
{
    private readonly JsonSerializerSettings _serializerSettings;

    public Test1Controller(MyCustomJsonSerializerSettings jsonSerializerSettings)
    {
        _serializerSettings = jsonSerializerSettings.GetSettings();
    }

Closing this issue now as there are already ways to achieve the scenario being asked for here.


Turn our main code into convention based now that our compiler allows us

Looking into double source map issue before we can convert properly.


"getting started" documentation improvements?

Apologies in advance for the necessarily vague nature of this request; I find myself in the position of needing to learn a number of things simultaneously, with zcbor being one of them.  While I understand the purpose of object serialization in general and CBOR in specific, all of the zcbor documentation for what I need is of the form "look at the tests for usage" - which presupposes a lot more knowledge than you might think.
It would benefit me (and I suspect others) greatly to have some VERY BASIC examples of encoding and decoding using zcbor done in a way which doesn't presuppose much.  The "Features" section of the README.md has tantalizing ideas but no concrete examples how any of them can be realized.
Specific to my case, I'm using Zephyr on a microcontroller and I need to encode some data structures to send to a host for processing in a Javascript app (to replace some homegrown binary encoding that currently exists and is suboptimal for a number of reasons) - yesterday I discovered that Zephyr recently replaced tinycbor with zcbor, and so I figured zcbor was my best bet.  Since then, i've spent several hours digging through code (the Zephyr mcumgr integration, the zcbor github repo) and still haven't successfully encoded or decoded anything, because every piece of knowledge I've sought so far has required me to first familiarize myself with some tangential piece of technology (mcumgr, the Zephyr test suite, python pip - things which I'm sure seem obvious how they relate to someone who already knows).
Anyway - I have no doubt I'll be able to eventually figure out some things I need to do by looking at the code in the tests, then deciding if I want to use generated code or library code (do I even have that right?) and then how to do it.  My intention is that hopefully, once I have done that, perhaps I can provide some of the examples that I could so sorely use right now... but this (figuring out how best to use zcbor) is only a small part of the overall task I need to do, and I will almost definitely get distracted before finding time to contribute back.
Thanks for listening.  :)

Thanks a lot for the feedback.  I'll try to improve this before long. If you have specific questions you wish the documentation would answer, I would appreciate it, so I can get the angle right (I will probably start by looking at the features list since you mention it). I will anyway ask for your review on the doc changes if that's ok with you.

Thanks for the response!  Here's my thoughts so far:
I came at this from Zephyr - I'm working on a Zephyr project and need to encode some C structs for processing off-device; looking around for libraries, I was reminded of protobufs and msgpack.  Looking into msgpack, I encountered CBOR, and recalled having seen tinycbor as a module for Zephyr.  Looking at it from the Zephyr lens, I learned that tinycbor had been replaced in Zephyr 3.1 (I'm using 3.0, so I still have that integration to look forward to) by zcbor for the one in-tree use, mcumgr, which I was unfamiliar with apart from the name.
So, upon hitting the github page for zcbor, I read the README.md - zcbor is a low footprint library in C.  Yay! this is probably what I need.  What was not immediately obvious (believe it or not) was that there was a Python script expected to be used to create the encoder/decoder - I did see shortly thereafter the "Python script and module" section, but somehow, as it was only mentioned way down the page, I thought it was auxiliary instead of a fundamental part of using zcbor (at least, I think it is?  I did eventually figure out how to use it to generate an encoder and decoder for the structure described in the tests/cases/pet.cddl file).  I'm still working through how to actually integrate an encoder/decoder into my project - I don't expect the zcbor documentation to cover all the details of that, but having something earlier (or at least pointed to earlier) in the documentation that at least mentions:

definitions of the encoded struct should be written in a .cddl file which is processed by the python script
a sentence or two about typical usage

I was also fairly confused that a C library appeared to only have a setup.py as build infrastructure - but as I'm looking through the git repo and my Zephyr code to write this response, it's only JUST occurring to me that zcbor was actually intended from the beginning as working with Zephyr? (the "Z" makes a lot of sense in that context) I will confess I'm still learning some of the finer points of Zephyr modules and such, but when I discovered zcbor from looking at github issues in the Zephyr repo, I assumed it was an entirely external project which was brought in.  In retrospect, the fact that it's under the NordicSemiconductor account, and Nordic is a big contributor to Zephyr should have been more of a clue than it was, especially since my project is based on the nrf52840.  Maybe add something about the history to the readme?  Not sure.  But if I'm right that it's largely intended for use with Zephyr, there should be something to explicitly indicate that - maybe with a note that it has uses outside Zephyr?
Anyway, my next step is figuring out how zcbor gets used in practice - since mcumgr is the only real example I can find, I've gotten the code from the Zephyr samples/subsys/mgmt/mcumgr/smp_svr code built and running on an Adafruit Feather nrf52840 so I can try and figure out the remaining stuff I need to - but mcumgr is complicated enough that I'm having to learn a bunch of stuff along the way that's only incidental to my needs.   I hope this hasn't been too long and rambling a description - I'm still figuring out some basic usage and I'm right in the thick of it.  In the near future, I'm also going to have to figure out whether it'll be easier to use zcbor with Zephyr 3.0 or port my entire application forward to Zephyr 3.2 (which will probably be out by the time I'm done) - which complicates me keeping my code in sync with another project which will definitely stay on 3.0 for a while.

Thanks a lot, I will consider all of this when improving the docs.
I will tell you right away that you can use the C library without having to contend with the Python script and CDDL descriptions.  If you are using Zephyr for your project, you should be able to just enable CONFIG_ZCBOR, and start using the C libraries via #include <zcbor_decode.h> and #include <zcbor_decode.h>.
You bring up the history, and yes there are historical reasons why the script is so prominent. It was originally written with the code generation in mind, and later we found that the C libraries were useful in their own right. The script also does more than code generation now (you can operate directly on CBOR/JSON/YAML data), but you probably gathered that from the README.

As part of this, I decided to create two samples (see PR #265). I'm still working on the changes to the README.

As it seems I am in the exact same situation as @jeffrizzo and thus seem to be qualified to share my question marks ;)
As I do have a dynamic structure to be encoded I am using the lib directly (canonical encoding). Not really clear to me is the number of backup states I need to define, or better the total number of states I need to declare. So for example I do have a list (top level) which includes maps and no more list element inside the maps.
The README states:
/** The number of states must be at least equal to one more than the maximum

nested depth of the data.
*/
This would lead to (according to README):
zcbor_state_t states[3];
zcbor_new_state(states, 3, payload, payload_len, elem_count);

But doc for zcbor_new_state() in the header states:
/** Initialize a state with backups.

As long as n_states is more than 1, one of the states in the array is used
as a struct zcbor_state_constant object.
....
*/

So I need to declare one more state as one is taken as constant state? Total 4?
It seems so, as the ZCBOR_STATE_E() adds two elements on the number given as argument (so this is not the number of states but backup states).
Still, in the README the 'n' is the same for ZCBOR_STAT_E and zcbor_new_state. (guess the README is wrong).
In the Pet sample (manual encoding) zero backup states are created even two nesting level are used. I guess this is due to non-canonical encoding. But the samples thus does nor clarify things here.
Also not really clear from the documentation is the max_num argument for list and map encode. From what I understand now:
It's only used in canonical encoding to reserve the right amount of space for the header (choose encoding size). If the encoding size holds true after filling the list a memmove is saved. Else nothing bad happens but I have to life with the memmove. Still the same number must be given to x_start_encode() and x_end_encode(). All this more or less as question....
Thanks for the lib! And thank for listening!

@jeffrizzo and @cgerlach42 I have opened a PR with README changes: #260. If you can take a look it would be greatly appreciated!


More information in user feedback messages

Enhancement request
When you push a user feedback message such as "Added 1 interfaces to Switch01." it would be helpful if it showed the name of the interface added e.g. "Added interface 16 to Switch01."
Great product thanks,
MC

This issue has been closed as it does not conform to one of the provided templates as required by the contributing guide. If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).