DerbyDatabase.getDefaultDriver() returns liquibase.repackaged.org.apache.derby.jdbc.EmbeddedDriver

Environment
openjdk version "11.0.13" 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Liquibase Version:  4.6.x
Liquibase Integration & Version: maven
Liquibase Extension(s) & Version:
Database Vendor & Version:  Derby <IP_ADDRESS>
Operating System Type & Version:  MacOS Monterey
Description
DerbyDatabase.close() is throwing a java.lang.ClassNotFoundException: liquibase.repackaged.org.apache.derby.jdbc.EmbeddedDriver.
This is because DerbyDatabase.getDefaultDriver() returns the liquibase.repackaged... driver class name rather than the actual one.
It seems that the source code and the binary do not correspond to each other for 4.6.x.
Steps To Reproduce

git clone https://bitbucket.org/alexlitovsky1/liquibase-derby-bug.git
mvn clean test

Actual Behavior
Test fails:  expected: <org.apache.derby.jdbc.EmbeddedDriver> but was: <liquibase.repackaged.org.apache.derby.jdbc.EmbeddedDriver>
Expected/Desired Behavior
The test should pass.

The getDefaultDriver for Derby no longer fails with an error due to a mismatch in expected class name.

Test Notes

If you run mvn clean test and get an error that --release is an invalid flag, check your $JAVA_HOME variable; you need a Java version newer than Java 8 to use the example build.
To run the tests using the fix branch, follow the instructions in Liquibase SDK Maven Plugin to get the artifact associated with the PR 2429. Remember to set the branch name in your .m2 settings.xml to dont-shade-all-apache.

** Error Seen Before Fix**
[INFO] Running com.alexlitovsky.bug.liquibase.derby.DerbyDatabaseTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.176 s <<< FAILURE! - in com.alexlitovsky.bug.liquibase.derby.DerbyDatabaseTest
[ERROR] testGetDefaultDriver  Time elapsed: 0.172 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <org.apache.derby.jdbc.EmbeddedDriver> but was: <liquibase.repackaged.org.apache.derby.jdbc.EmbeddedDriver>
        at com.alexlitovsky.bug.liquibase.derby.DerbyDatabaseTest.testGetDefaultDriver(DerbyDatabaseTest.java:16)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   DerbyDatabaseTest.testGetDefaultDriver:16 expected: <org.apache.derby.jdbc.EmbeddedDriver> but was: <liquibase.repackaged.org.apache.derby.jdbc.EmbeddedDriver>

No Error Seen After Fix
[INFO] -------------------------------------------------------
[INFO] Running com.alexlitovsky.bug.liquibase.derby.DerbyDatabaseTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.168 s - in com.alexlitovsky.bug.liquibase.derby.DerbyDatabaseTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

Test Environment
Liquibase Maven Plugin from Build https://github.com/liquibase/liquibase/actions/runs/1773361660
GitHub Repo https://bitbucket.org/alexlitovsky1/liquibase-derby-bug/src/master/
Java 14


Old devices have no delete option

General information
Home Assistant
Version: 2022.11.1
Installation method (according to instructions):
[x] Linux VM
[ ] Operating System
[ ] Container
[ ] Supervised
[ ] Core
Integration

Installation method:
[x] HACS
[ ] manual from release
[ ] manual from git
Integration version: 1.9.2
Root topic: nothing? not sure where to check that setting
Application settings

topic: sensor/SleepAsAndroid/%%%device%%%
[x] I can see MQTT messages from application at MQTT-server
How it works now?
99.9% as expected, everything works great, except I have old devices that I can not delete from HA that have been changed out for other phones etc.
What do you expect?
The device to be deleteable in the devices screen
Steps to reproduce
Not sure, but I think

add phone as a sensor
change the device name
old device has no delete button in device list

Debug log
N/A

Additional information
Thank you for the great quality of life boost this is giving me!

@thomasfinstad, thank you for report.
"Delete" button will be useful.
Will check how to add it.

For now you may disable device (via corresponding switch) in edit menu at top-right conner of the device screen.

I will keep the old device as disabled for now until there is a way to fully delete it.
I ask that you keep this issue open until there is a way to delete devices, as an indicator to others with the same question.

Sure. It should be fixed, but I can't see way to do it.
For now I could not understand what kind of data should be provided by the integration to enable delete button.

Yes, it is work.
Release will be ready in few minutes.

Fixed in v1.10.0


⚠ gorzdrav.org has degraded performance

In 7cb16cc, gorzdrav.org (https://gorzdrav.org) experienced degraded performance:

HTTP code: 200
Response time: 7720 ms

Resolved: gorzdrav.org performance has improved in a5bb67b.


AppMap mode V1 exists

[ ] AppMap panel that opens with an AppMap icon in the UI exists
[ ] AppMap panel lists all AppMaps in project folders alphabetically by their name
[ ] Clicking on an AppMap in the list opens the AppMap in a viewer or focuses on an existing viewer with the AppMap
[ ] AppMap list can be filtered by user-entered text, matching metadata / name of AppMaps; filter can be reset
[ ] AppMaps can be found with user-entered search phrase, AppMaps in the result set can be opened in a new/existing viewer

@ptrdvrk Thanks!
matching metadata / name: which properties of the metadata should be matched?


filament()->getCurrentPanel() always returns a panel, even outside Filament

Package
filament/filament
Package Version
v3
Laravel Version
v11
Livewire Version
v3
PHP Version
PHP 8.3
Problem description
When serving a response outside of Filament, filament()->getCurrentPanel() returns the default panel.
I reuse form schemas between Filament routes and public routes and would like to add conditional code to tweak various parameters.
I'd question whether these lines are needed in PanelRegistry:
https://github.com/filamentphp/filament/blob/085ba5449421a6cba81deee7bf52c626785cad59/packages/panels/src/PanelRegistry.php#L21-L32
To me the default panel is not necessarily the current panel.
Happy to provide a PR if needed.
Expected behavior
I would expect this return null when not in a Filament context, especially considering the return type of the method is ?Panel.
Steps to reproduce
Execute
filament()->getCurrentPanel()

when not in a request served by Filament.
Reproduction repository (issue will be closed if this is not valid)
https://github.com/filamentphp/demo
Relevant log output
No response

Donate 💰 to fund this issue

You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
100% of the funding will be distributed between the Filament core team to run all aspects of the project.
Thank you in advance for helping us make maintenance sustainable!

I agree this is confusing and I would personally expect the same behavior as you described, @austincarpenter.
This is related to what we discussed the other day, @danharrin.

Breaking so implemented in v4 #15137


Problem with sending IEnumerable of interface members

I'm trying to send a command with the use of MassTransit. In the command body there's an object which contains an IEnumerable of interface members. When I use the Service Bus Explorer to peek on the message in the queue, it's a correctly serialized JSON, however, when I check what has been received, the enumerable doesn't contain the interface members of the type that has been used when serializing, but some weird GreenPipes copy of it, which are unfortunately only mirror copies of the actual interface, so all the meaningful data is lost (e.g. instead MyProject.Models.Block.IBlockDTO I'm getting GreenPipes.DynamicInternal.MyProject.Models.Block.IBlockDTO).
Below some modified code snippets:
public class IndexItemCommand<T> : IIndexItemCommand<T> where T : IndexBaseDTO
{
    public T ItemToIndex { get; set; }
}

[DataContract]
public class IndexTestDTO : IndexBaseDTO
{
    [DataMember]
    public IEnumerable<IBlockDTO> TestEnumerable { get; set; }

    [DataMember]
    public string Title { get; set; }
}

public class IndexItemCommandConsumer<T> : IConsumer<IIndexItemCommand<T>> where T : IndexBaseDTO
{
    private readonly IIndexingService indexingService;

    public IndexItemCommandConsumer(IIndexingService indexingService)
    {
        this.indexingService = indexingService;
    }

    public async Task Consume(ConsumeContext<IIndexItemCommand<T>> context)
    {
        await indexingService.ReindexComponentAsync(
            context.Message.ItemToIndex //the members of TestEnumerable are of type
             //GreenPipes.DynamicInternal.MyProject.Models.Block.IBlockDTO here
        );
    }
}

private static void SetupEndpoints(Container container, IServiceBusBusFactoryConfigurator config)
{
    config.ReceiveEndpoint(
        "index-item", c =>
        {
            c.Consumer<IndexItemCommandConsumer<IndexTestDTO>>(container);
        });
}

If you can update the contract, make it an array, or an IList<IBlockDTO>.
I don't think a pure IEnumerable<T> has ever been supported by MT, that isn't to say we can't add it, but it isn't presently.

This seems to work, based on a unit test I wrote, so I'm going to close it.


64 bit Cuis image out of memory

When loading the image, the VM shows the loading screen until the tab crashes because there is no more memory. Reproduced this on both Chrome and Firefox.
For example: https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/raw/master/Cuis6.0-5299.image

It seems this is not an issue with the latest Cuis image anymore (Cuis6.0-5352.image)


Support GStreamer 1.x

A notification by way of a feature request :smile:
Over the last couple of weeks I've been trying to fix up GStreamer-Java support for GStreamer 1.x.  Webcam pipelines do seem to be working OK, but it would be good to get some other projects testing.
https://github.com/gstreamer-java/gst1-java-core
If you're interested in providing an updated GStreamer driver I'm happy to help with info.  The API has changed a bit and documentation is a bit sparse at the moment.  There's also a simple webcam example in https://github.com/gstreamer-java/gst1-java-examples (in fact, only example so far)

Hi @neilcsmith-net,
This is wonderful news :) I'm really glad for letting me know about gstreamer-java and will start working on the updated GStreamer Webcam Capture driver as soon as possible.
I was observing another GStreamer Java implementation project so far, but since there was no update for more a year now I didn't do anything to get it working within Webcam Capture API. Here is the link:
https://github.com/octachoron/gstreamer-1.x-java

Hi @sarxos
Thanks.  Yes, there is also https://github.com/armouroflight/gstreamer1.x-java which I forked back for gst1-java-core.  When Google Code shut down a few of us who were maintainers on the old repository set up the GitHub organisation to try and bring the various efforts together.  I have to admit my own involvement around 1.x support has been minimal until now, but I suddenly found I need it for another project! :smile:  (see latest tweet on https://twitter.com/PraxisLIVE)


Implemented Webmap of Nodes on network

fixes: #1074
Implemented Webmap into website
Accessible through endpoint /webmap

Hi, Awesome work @franchyze923
Some sort of clustering like https://esri.github.io/esri-leaflet/examples/clustering-feature-layers.html would be a nice addition. It will handle overlaps in a better manner as well.

What do you say @thenewboston-developers/designers @thenewboston-developers/ui-developers ?

@itsnikhil Agreed that would look awesome and it's probably what we should do. I'm actually offsetting the coordinates slightly because there are overlapping coordinates and without staggering the positions, some would appear right on top of each other.
I just looked into your suggestion and I think I would need to use a react implementation of that.
I found this https://github.com/yuzhva/react-leaflet-markercluster but I'm having trouble installing due to dependencies. I would need to update<EMAIL_ADDRESS>If this is something we can do I can look into it. Also found someone else using "Supercluster" to  achieve this effect https://www.leighhalliday.com/leaflet-clustering.
Maybe figuring this out will be another issue? Not sure how long it will take me to get clustering up and running.

@thenewboston-developers/designers @buckyroberts any feedback on this?

@franchyze923 Sick work, looking amazing 💯
@kristykjlee may I check with you if the following icons and their colour schemes are alright? They are SVG files, so we can customise the icons and their colours freely. I have generated the site so that you can access it here to observe the UI: http://tnb-webmap.surge.sh/webmap

@jamessspanggg Hey this is looking great!!

@franchyze923 can you resolve the conflicts?

@franchyze923 can you resolve the conflicts?

@franchyze923 can you resolve the conflicts?

Just resolved

@franchyze923 can you resolve the conflicts?

Just resolved

@jamessspanggg I fixed the mobile dropdown. I also set the default zoom level a little further out. It's now further out on Desktop version as well but I think it's ok. I'm not quite sure how to set the zoom level based on whether or not a user is on mobile vs desktop.

@jamessspanggg I fixed the mobile dropdown. I also set the default zoom level a little further out. It's now further out on Desktop version as well but I think it's ok. I'm not quite sure how to set the zoom level based on whether or not a user is on mobile vs desktop.

@jamessspanggg I fixed the mobile dropdown. I also set the default zoom level a little further out. It's now further out on Desktop version as well but I think it's ok. I'm not quite sure how to set the zoom level based on whether or not a user is on mobile vs desktop.

To set the zoom level when its in different viewports, you can use the useWindowDimensions hook available in the project. That hook is able to get the width of the device, and with that information, you can conditionally set the zoom level of the map. Let me know if you face any problems.

@jamessspanggg I fixed the mobile dropdown. I also set the default zoom level a little further out. It's now further out on Desktop version as well but I think it's ok. I'm not quite sure how to set the zoom level based on whether or not a user is on mobile vs desktop.

To set the zoom level when its in different viewports, you can use the useWindowDimensions hook available in the project. That hook is able to get the width of the device, and with that information, you can conditionally set the zoom level of the map. Let me know if you face any problems.

@jamessspanggg I got useWindowDimensions working - very cool, it's looking better on mobile now.

@jamessspanggg I got useWindowDimensions working - very cool, it's looking better on mobile now.

@franchyze923 and @jamessspanggg I will review the whole code soon. This seems awesome btw 😏

@franchyze923 and @jamessspanggg I will review the whole code soon. This seems awesome btw 😏

@franchyze923 and @jamessspanggg  , I have done few changes:-

Limited the min-zoom level according to client width.
Change the popover width as per client width.
The Map's bottom offset is used to calculate total height instead of fixed 50vh to show more of map content.

Few concerns:-

Firstly are you guys getting type errors due to react-select ? I was getting it and had to include 2nd parameter to generic for it to run locally but the github action still asks for 1 type argument only.
In my iPhone, the popup instantaneously disappears on marker click. Only at certain position, if it is clicked again then the popup is visible until closed or loses focus.

@franchyze923 and @jamessspanggg  , I have done few changes:-

Limited the min-zoom level according to client width.
Change the popover width as per client width.
The Map's bottom offset is used to calculate total height instead of fixed 50vh to show more of map content.

Few concerns:-

Firstly are you guys getting type errors due to react-select ? I was getting it and had to include 2nd parameter to generic for it to run locally but the github action still asks for 1 type argument only.
In my iPhone, the popup instantaneously disappears on marker click. Only at certain position, if it is clicked again then the popup is visible until closed or loses focus.

Few concerns:-

Firstly are you guys getting type errors due to react-select ? I was getting it and had to include 2nd parameter to generic for it to run locally but the github action still asks for 1 type argument only.

I am not getting the type errors that you mentioned :/

In my iPhone, the popup instantaneously disappears on marker click. Only at certain position, if it is clicked again then the popup is visible until closed or loses focus.

Yes I am getting the same issue as well. @franchyze923 can you look into this?

P.S. - Can you check the changes in your dekstop and tablet/mobile view ?

Yes it is works fine.
https://github.com/thenewboston-developers/Website/blob/b93651b8185f1a623987405b08c20360f174126b/src/containers/Webmap/index.tsx#L92-L101
For the above, would it be better to merge the two to:
   <Popup maxWidth={windowDimensions.clientWidth > 450 ? 700 : 250} position={[node.lat + Math.random() * (0.2 - 0.1) + 0.1, node.lon]}>
     {renderPopupContent(node)}
   </Popup>

Few concerns:-

Firstly are you guys getting type errors due to react-select ? I was getting it and had to include 2nd parameter to generic for it to run locally but the github action still asks for 1 type argument only.

I am not getting the type errors that you mentioned :/

In my iPhone, the popup instantaneously disappears on marker click. Only at certain position, if it is clicked again then the popup is visible until closed or loses focus.

Yes I am getting the same issue as well. @franchyze923 can you look into this?

P.S. - Can you check the changes in your dekstop and tablet/mobile view ?

Yes it is works fine.
https://github.com/thenewboston-developers/Website/blob/b93651b8185f1a623987405b08c20360f174126b/src/containers/Webmap/index.tsx#L92-L101
For the above, would it be better to merge the two to:
   <Popup maxWidth={windowDimensions.clientWidth > 450 ? 700 : 250} position={[node.lat + Math.random() * (0.2 - 0.1) + 0.1, node.lon]}>
     {renderPopupContent(node)}
   </Popup>

@jamessspanggg Yeah I didn't go for that because on device rotation the maxWidth change wasn't reflecting for popup i.e. if you opened the site in landscape mode in your mobile (which is very rare) - the popup width will be 700 even for the portrait orientation unless the page is reloaded.
Do you think it's worth covering this small edge case or not ?

@jamessspanggg Yeah I didn't go for that because on device rotation the maxWidth change wasn't reflecting for popup i.e. if you opened the site in landscape mode in your mobile (which is very rare) - the popup width will be 700 even for the portrait orientation unless the page is reloaded.
Do you think it's worth covering this small edge case or not ?

@jamessspanggg Yeah I didn't go for that because on device rotation the maxWidth change wasn't reflecting for popup i.e. if you opened the site in landscape mode in your mobile (which is very rare) - the popup width will be 700 even for the portrait orientation unless the page is reloaded in portrait mode.
Do you think it's worth covering this small edge case or not ?

Ahhh I see, in this case I think its worth covering this small edge case for the UX.

@jamessspanggg Yeah I didn't go for that because on device rotation the maxWidth change wasn't reflecting for popup i.e. if you opened the site in landscape mode in your mobile (which is very rare) - the popup width will be 700 even for the portrait orientation unless the page is reloaded in portrait mode.
Do you think it's worth covering this small edge case or not ?

Ahhh I see, in this case I think its worth covering this small edge case for the UX.

In my iPhone, the popup instantaneously disappears on marker click. Only at certain position, if it is clicked again then the popup is visible until closed or loses focus.

Yes I am getting the same issue as well. @franchyze923 can you look into this?

I'm not seeing this behavior, although I'm only testing by switching the device toolbar in chrome dev tools. How are you guys testing on your actual devices without deploying the website somewhere?
https://user-images.githubusercontent.com/9319623/103771252-5cf3de80-4ff5-11eb-81c1-74558b5f4596.mp4

In my iPhone, the popup instantaneously disappears on marker click. Only at certain position, if it is clicked again then the popup is visible until closed or loses focus.

Yes I am getting the same issue as well. @franchyze923 can you look into this?

I'm not seeing this behavior, although I'm only testing by switching the device toolbar in chrome dev tools. How are you guys testing on your actual devices without deploying the website somewhere?
https://user-images.githubusercontent.com/9319623/103771252-5cf3de80-4ff5-11eb-81c1-74558b5f4596.mp4

How are you guys testing on your actual devices without deploying the website somewhere?
@franchyze923 The way I do it on windows is:

Connect your phone and PC to the same network.
Run ipconfig in cmd prompt. It will list your PC's IPv4 address.
Open <your_pc_ip>:3000 on your phone.

I am sure there are other ways too but this is the one I use the most. 😄

How are you guys testing on your actual devices without deploying the website somewhere?
@franchyze923 The way I do it on windows is:

Connect your phone and PC to the same network.
Run ipconfig in cmd prompt. It will list your PC's IPv4 address.
Open <your_pc_ip>:3000 on your phone.

I am sure there are other ways too but this is the one I use the most. 😄

@franchyze923 I am merging this request. When you get time, do create a separate issue to look into the mobile popup issue and propose a suitable fix.

@franchyze923 I am merging this request. When you get time, do create a separate issue to look into the mobile popup issue and propose a suitable fix.

@franchyze923 I am merging this request. When you get time, do create a separate issue to look into the mobile popup issue and propose a suitable fix.

Will Do. Thanks everyone for the help and suggestions. I don't normally work with Typescript so really appreciate all the support!

@franchyze923 I am merging this request. When you get time, do create a separate issue to look into the mobile popup issue and propose a suitable fix.

Will Do. Thanks everyone for the help and suggestions. I don't normally work with Typescript so really appreciate all the support!

@jamessspanggg @franchyze923 @lapstjup
I did some minor changes.

Moved svgs to assets.
Some renaming.
Re-designed popup.

Nice! Thank you. I like re redesigned pop up

@jamessspanggg @franchyze923 @lapstjup
I did some minor changes.

Moved svgs to assets.
Some renaming.
Re-designed popup.

Nice! Thank you. I like re redesigned pop up

How are you guys testing on your actual devices without deploying the website somewhere?

@franchyze923 The way I do it on windows is:

Connect your phone and PC to the same network.
Run ipconfig in cmd prompt. It will list your PC's IPv4 address.
Open <your_pc_ip>:3000 on your phone.

I am sure there are other ways too but this is the one I use the most. 😄
BTW super awesome work! 💯 🎉

Worked perfectly! Thanks for the tip, I didn't think of this

How are you guys testing on your actual devices without deploying the website somewhere?

@franchyze923 The way I do it on windows is:

Connect your phone and PC to the same network.
Run ipconfig in cmd prompt. It will list your PC's IPv4 address.
Open <your_pc_ip>:3000 on your phone.

I am sure there are other ways too but this is the one I use the most. 😄
BTW super awesome work! 💯 🎉

Worked perfectly!


Added banner functionality for newCourse

Added banner functionality for newCourse
https://github.com/ita-social-projects/SpaceToStudy-Client/assets/108689551/89ee92b4-de32-41c1-b602-c4090e51d1a4
#1306

Maybe we are we supposed to have some loading spinner component to gave our user feedback that his image is actually uploading? (It would be good in case if user have unstable or slow internet connection)

Maybe we are supposed to have some loading spinner component to gave our user feedback that his image is actually uploading? (It would be good in case if user have unstable or slow internet connection)

I'm not sure, cause currently we uploading image directly to browser without making any backend requests. We can add loader in the scope of New Course backend integration.
ps: My laptop recorded video with some lags, so u can be confused, but actually image uploads without any delays


Add look support to Web MaterialXView

Features

Parse looks found in MaterialX files and use this to perform assignment. In the case where no assignment matches any geometry in the scene then the first material is assigned to the entire scene. Supports rudimentary regexpr string matching of names.
Keep track of material assignments and compile unique set of shaders once and assign after 1) material load, 2) geometry change. The latter allows for material to be loaded first and geometry second to have the same result as the reverse.
Will load UI for all materials found via looks. Add back in "hide" controls as the material list can take up more space.

Results
https://user-images.githubusercontent.com/49369885/173661975-1f73147d-64ea-4517-8887-5c7fc9e72302.mp4
FIxes / Updates

Remove hard-coded hacks to re-path images only to the Images/ folder. Add rudimentary local search pathing for textures.  Required to support MTLX file local texture folders such as found for the chessboard and boombox.
Chessboard, wood and brass tiled files with looks now have proper assignments.
Fix image installation to install all files properly based on original location.
Fixed shaderball glTF file to have geometry at root so that dag path based assignment works.
Add a glTF sample file which has materials converted to MTLX and uses collections which was never tested in the viewer.
Fix material dropdown filtering to only include files with a ".mtlx" suffix to filter out image sub-folders.
Add additional testing for looks which was missing to ensure the api is robust.
Add in findRenderableMaterials()  exposure to be able to get back all material nodes in a document.

Found (leave to be resolved as separate issues)

Spurious divide by zero errors for some shaders
Some placement issue with image calibration shader. Not new.

@kwokcb This change looks really promising, and I think it's definitely worthwhile to include in the upcoming 1.38.5.
Can you explain in more detail the motivation for modifying shaderball.glb?  Since this is our default geometry across MaterialX viewers, I'd like to make sure I fully understand any proposed changes to it, and we should be careful not to break the assumptions of external tools leveraging the same model.

@kwokcb It sounds wise to revert this change for now, so that we're minimizing new changes in preparation for the 1.38.5 release.  In the future, let's take a closer look at the scene pathing in our GLB files, and come up with a consistent convention that aligns with usage in other projects.


LogLevel seems too heavy for its function

I am sure there is a very good consideration for having LogLevel as it is.. But I feel whatever it is - it must be tramped by performance considerations. Passing class ref in high performance / high throughput systems thousands times per sec should be less efficient than just copying an int to a stack,, Prove me wrong please :)

Yes it would make more sense to have LogLevel as enum-value. Not sure about the reason for having it as a class.

Maybe because enum-ToString() is expensive, unless using a helper function.
Maybe because it should be possible to create own custom LogLevel-objects.

Anyway it would be a breaking change to change it from class to enum. See also #1269

I am not following you notes in the bullet list.. enum to string is only good if you can have custom log level but(!) LogLevel is sealed class so you cant have it customized (unless i am missing something).. also if anyone asks me - I'd prefer not having custom log levels anyway if that means faster logging.. after all practical considerations are as important in this life as theoretical ones.. imo

@maxima120 Don't think I wrote anywhere in my reply that your suggestion was a bad idea. I just tried to use my imagination to think of reasons  why the choice made to use a class instead of an enum-value.

It actually started as an enum, but then changed to a class here:
https://github.com/NLog/NLog/commit/663c7df82dc49ded74f0999bfe2d1f4d7a959e66#diff-c6bb1d04c63afe2e41fcdb55c5560bc46eab63f5b03e180fb55e219cbbdbad78
Then later to fix code-analysis warnings, then it was change to be sealed class. But I guess if one changed the constructor to public, then one could create custom LogLevel-values without inheritance. Anyway just my imagination.

Closing as no apparent performance issue, but could be a candidate for the major refactoring in NLog 6.0


Using my own date formatter

Now that Date is decodable, what's the best way to specify a different date format?

Most types that per default conform to Decodable now also have the following static property you can set:
static var decoder: (AnyObject) throws -> DecodedType {get set}

So just set it to your previous decode-function and you should be fine.
(Slightly more info here: readme.md#customization)


feat(core): add .-touched:invalid as an alternative to .-invalid

Purpose
Enable upcoming <Form> and <Field> components, as well as customer specific implementations, to simply mark a field/input as .-touched to take full advantage of HTML5 validation.
Adding .-touched on blur is much simpler than replicating the entire validation logic in JavaScript.
This is even more valuable for non-React (or vanilla) customers that want minimal JS.
For example:
https://user-images.githubusercontent.com/18623773/108243003-7edc9700-7145-11eb-8cde-82f3d9976240.mov
Approach
Add .-touched:invalid to every occurrence of .-invalid.
Testing
Video above.
Risks
More power means more responsibility.

Specificity is crazy for Checkbox and Radio 🙈 But I have no other solution because of complex designs...

I know right.
At this point we might as well loosen the stylelint rule to make use of nesting and make it more readable.
Or we could try and simplify the design a bit, would be nice to use the input instead of needing the extra span.

Or we could try and simplify the design a bit, would be nice to use the input instead of needing the extra span.

Let's suggest this to designers, and see what they say.
Otherwise LGTM, feel free to merge this.


Migrate basic CI/CD pipeline to GitHub Actions

@innomaxx is this PR finished?

@innomaxx is this PR finished?

No, still working. I add steps one by one to ensure it works properly. I will notify you on completion

The build job should include tests and there should be an additional job (not matrix) to lint, run tests once, and generate a code coverage report
We just do not need this report for all matrix runs

@andrii-bodnar done


Map out plan to use ICM as the curiosity module

Paper here: https://arxiv.org/pdf/1705.05363.pdf
Discussion:
This is the first paper I have seen that could be a viable way to use curiosity in a game as large as Minecraft. The modules are already broken down into a structure that is amenable to this "inverse dynamics model".

There are three learning problems to solve:

Learning the optimal policy (policy gradient methods)
Learning the inverse dynamics model

Given state $\phi(s_t)$ and $\phi(s_{t + 1})$, predict the action $a_t$ that was taken

Learning the forward dynamics model

Given state $\phi(s_t)$ and action $a_t$, predict the next state $\phi(s_{t+1})$

Where $\phi$ is the feature space, rather than the raw pixel input.

We have already merged the code for solving the optimal policy learning problem. We are using PPO.
We still need to build a learning algorithm for the inverse dynamics model and the forward dynamics model.
Since a PPOTrajectory already uses this information, I think we can re-use a lot of what has been built out for PPO. This probably means separating the running of the algorithm from PPO since we will now have to coordinate three different learning algorithms. The neural network can stay mostly the same, although it will require two new heads: inverse dynamics and forward dynamics. The inverse dynamics head will take in the output of the VisualPerception module run on both $s_t$ and $s_{t+1}$. I am not sure just yet if they will share parameters or not, but we should be able to process both of these in a single batch. The forward dynamics model will take as input $s_t$ and $a_t$, where $s_t$ will be encoded through the VisualPerception module and $a_t$ will be the full 10-action vector.
I won't have a good idea on how this will look in the code until I start implementing some of it. It will probably take me a few iterations to get right. It might also help to write this algorithm on a much simpler problem to start with, that way I am familiar with how the different learning algorithms fit together.

There are a few options for using ICM as I see it now:

Use ICM completely offline

Fill the trajectory buffer until full
Run ICM to compute the curiosity reward
Train the ICM forward and inverse dynamics models

Use ICM completely online

Run ICM at each environment step
Train ICM at each environment step

Use ICM online but train offline

Run ICM at each environment step to compute the reward
Train the ICM forward and inverse dynamics models after the trajectory buffer is full

With the PPO formulated as it is now, options 2 & 3 do not make sense. We are waiting until the trajectory buffer is full to update the policy, so there is no benefit to computing the curiosity reward any earlier. This means that we should be using option 1, where we compute the rewards and train the ICM module after the trajectory buffer is full.
Furthermore, I think the trajectory buffer size should be fairly small. It should only be large enough to store a few minutes of gameplay at most. This is to keep the updates frequent enough that the agent will actually learn to explore its environment using the curiosity reward. So if we are able to process game states at 60 frames per second and we want the models to update every minute, then we should be training every $60 * 60 = 3600$ frames per minute.
If we ever move away from policy gradient methods back towards TD-learning, then we can revisit options 2 & 3. Something like TD(0) could benefit a lot from having the curiosity reward computed at each step. I'm not sure that this will be necessary as long as we keep the trajectory buffer sufficiently small.
I do not have any ideas for how this will work once we add model-based planning methods, although we will figure that out when the time comes.,,

Using ICM offline will be the way we handle it going forward for now. Work on this ticket is blocked until #12 is closed.


Change create flaw related test cases, use relative locators

@qduanmu Should we merge this PR or wait for the bug fix.


State of the project...

Hi @altermo 👋🏻
I've noticed the updated readme and was wondering if you could elaborate what this means for the project? Does it mean that the plugin "as is" will be maintained and community PRs will be reviewed/merged? Or does it mean the project is no longer actively used by the maintainer and maybe people should think about switching to another plugin?
Maybe its just a language thing (I'm not a native English speaker), but I was a bit unsure how to read it 😊  In any case thanks for the efforts you have put into this plugin!
Best,
Sander

I will (try to) fix any bugs and PRs will be reviewed/merged. I plan to add a few quality-of-life features, but the plugin is mostly "as is".

Thanks for your reply! Keeping it "as is" but (best effort) maintained is more then enough for me to keep using the plugin (as I really like it) 👍🏻


nodejs distroless contains 14MB tar archive

In the nodejs distroless image, it seems that the extraced nodejs/ folder contains a (potentially) unnecessary .tar.gz.tgz archive that isn't in the original unpacked tar for the nodejs release.  Here are the commands I ran to verify that this .tar.gz.tgz is being added into the image:
$ docker save gcr.io/distroless/nodejs -o distroless-nodejs-latest.tar
$ mkdir tar-dir; cd tar-dir
$ tar -xvf ../distroless-nodejs-latest.tar
$ cd f3949351cf4b78aa05b57646d2d7da70 # the layer w/ nodejs
$ mkdir layer-tar; cd layer-tar
$ tar -xvf ../layer.tar
$ cd nodejs
$ ls -lh
total 14M
drwxr-x--- 2 aprindle eng 4.0K Dec 31  1969 bin
-r-xr-x--- 1 aprindle eng  287 Dec 31  1969 BUILD.bazel
-r-xr-x--- 1 aprindle eng  55K Dec 31  1969 CHANGELOG.md
drwxr-x--- 3 aprindle eng 4.0K Dec 31  1969 include
drwxr-x--- 3 aprindle eng 4.0K Dec 31  1969 lib
-r-xr-x--- 1 aprindle eng  59K Dec 31  1969 LICENSE
**-r-xr-x--- 1 aprindle eng  14M Dec 31  1969 node-v6.10.3-linux-x64.tar.gz.tgz**
-r-xr-x--- 1 aprindle eng  20K Dec 31  1969 README.md
drwxr-x--- 5 aprindle eng 4.0K Dec 31  1969 share
-r-xr-x--- 1 aprindle eng  107 Dec 31  1969 WORKSPACE

I'm also chasing down how to remove this (and potentially npm)... @aaron-prindle did you figure out where it's coming from, I'm struggling groking the bazel files so it's a slow journey


Mobile app

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
a mobile version of the app on Android, ios, etc.
Describe alternatives you've considered
have not found an alternative
Additional context
what to replace whatsapp and be able to communicate using this MS-tl app with internal as well as external Teams contacts

Hi @Zunade,
Thank you for your feature request. I will evaluate the feasibility of a mobile version. There's a number of functions that may not be possible using iOS or Android. There would also be UI changes required.
What mobile version would you be most interested in Android or iOS?
Using the current MS-TL, you can communicate with both internal and external Teams contacts. When adding an external Teams contact, you would use their email address then click Add user.
Thanks!

Hi @Zunade,
Chat with external Teams contacts is fixed in the latest version. You can add external users by using their email address, and they will have (External) after their name in the contact list, so you can identify those from your internal contacts vs external.
Cheers


Apply "Remove Immutable Tracks" after post-import.

Reimplements "Remove Immutable" in ResourceImportScene::_post_fix_animations by comparing to the skeleton rest.
The old implementation took a shortcut, effectively optimizing animation tracks before the animation tracks were even added to the AnimationPlayer. However, this optimization led to incorrect results in cases where the skeleton bone rest was not equal to the initial bone pose. Therefore, it is necessary to delay removing animation tracks until after the correct rest pose is calculated in rest-fixer.
I pass false into GLTFDocument / FBXDocument APIs in order to preserve the original implementation (which is available at runtime) for compatibility. The codepaths are too different to offer a replacement with the new implementation. The old implementation of "remove_immutable_tracks" rather chose which tracks to keep before adding them in the first place (a shortcut), while the new implementation detects which tracks are immutable and removes them in the post import flow. While it is sort of duplicate functionality in two places, the code is not duplicated, and after basically a day of thinking about it, I was unable to come up with an approach for reconciling the two features of the same name.
Fixes #90031 (See the test files I uploaded to that issue)
Note that the position offset is incorrect on the imported animation tracks. I chose to split that off into a separate issue. See also

#90065

CC @TokageItLab

Thanks!

how to fix this problem on godot 4.3.dev6 or godot4.2?my project can not import any new mixamo skeleton now...

when I click the import the animationplayer node on the import scene instance, the model disappear.And never occur on the scene

@yythlj My apologies for introducing the regression in this PR. We have solved the issue you describe in #92012
The fix was already merged and will be included in 4.3 beta which should be out shortly. Please be patient ;-)

such a big bug how to continue project's work ...
cannot wait a minutes

luckyly I has the backup.The bug will make all glb.import be fail and no fix forever

@yythlj You were already asked to be patient. If you can't use 4.3-dev6 due to this, stay on 4.2.2. Or build from the master branch to have the fix until a new snapshot is published.
Dev snapshots are what the name implies - snapshots from the development branch. If you start using them, you accept the risk that they might have bugs.
Please refer to the Code of Conduct for an overview of what kind of behavior is expected on this platform.

4.2.2stable has both the bug
---Original---
From: "Rémi @.>
Date: Wed, May 29, 2024 14:01 PM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [godotengine/godot] Apply "Remove Immutable Tracks" afterpost-import. (PR #90064)
@yythlj You were already asked to be patient. If you can't use 4.3-dev6 due to this, stay on 4.2.2. Or build from the master branch to have the fix until a new snapshot is published.
Dev snapshots are what the name implies - snapshots from the development branch. If you start using them, you accept the risk that they might have bugs.
Please refer to the Code of Conduct for an overview of what kind of behavior is expected on this platform.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

new proj on 4.2.1.stable maybe no problem.But my project now both error on the 4.2 and 4.3, because alreay use 4.3 open the proj and the tscn had changed.this state go back to 4.2 version take no use

@yythlj 4.3 beta is out. I would be interested to know if updating to 4.3 beta solves the issue.
(Note that if you have an existing .tscn, it might remember old values so double check with a new instanced scene or replay the animation.)


Pinot not ingesting realtime data from Apache Pulsar

I am working on a project for CDC from a MySQL database that stores each update in Pinot once it has been streamed. MySQL, Pulsar and Pinot have been run on Docker using the debezium mysql example 0.8 image, and docker compose files for both Pulsar 3.3.1 (in standalone mode) and Pinot 1.1.0 (with containers for Zookeeper, controller, broker and server). A debezium-mysql connector has been configured and mounted in Pulsar, and I am able to get messages into a topic every time a table in the mysql database is updated. I have also enabled the Pinot-Pulsar plugin in the Pinot compose file.
However, when I create a realtime table in Pinot using the configs mentioned in the 1.1.0 documentation and details like topic name, no segment is created and the data is not ingested. Since the json schema of the original topic is complex, I tried to set up ingestion for another topic with simple schema for testing. I created a Pulsar topic and produced messages using the message format with only primitive fields (int, float, string and a long for the timestamp). I created a temporary consumer to check the message format, and the topic was storing the messages correctly with the defined json schema. Even with a simpler schema, the issue persisted. I used JsonToPinotSchema to make sure there were no inconsistencies, and AddSchema and AddTable on the Pinot CLI. The table was visible on the controller port, but no data was ingested, neither was a segment created. The logs showed the error: [pinotHelixResourceManager] org.apache.pinot.pluging.inputformat.json.JsonMessageDecoder cannot be cast to class org.apache.pinot.spi.streamconsumerfactory.
This is a sample message sent by the producer:

Here is the schema:
{
"schemaName": "topic1",
"enableColumnBasedNullHandling": false,
"dimensionFieldSpecs": [
{
"name": "id",
"dataType": "INT",
"notNull": false
},
{
"name": "name",
"dataType": "STRING",
"notNull": false
},
{
"name": "price",
"dataType": "FLOAT",
"notNull": false
}
],
"dateTimeFieldSpecs": [
{
"name": "timestamp",
"dataType": "LONG",
"notNull": false,
"format": "1:MILLISECONDS:EPOCH",
"granularity": "1:MILLISECONDS"
}
]
}
And this is the table config:
{
"REALTIME": {
"tableName": "topic1_REALTIME",
"tableType": "REALTIME",
"segmentsConfig": {
"schemaName": "topic1",
"replication": "1",
"replicasPerPartition": "1",
"timeColumnName": "timestamp",
"minimizeDataMovement": false
},
"tenants": {
"broker": "DefaultTenant",
"server": "DefaultTenant",
"tagOverrideConfig": {}
},
"tableIndexConfig": {
"invertedIndexColumns": [],
"noDictionaryColumns": [],
"columnMajorSegmentBuilderEnabled": false,
"optimizeDictionary": false,
"optimizeDictionaryForMetrics": false,
"noDictionarySizeRatioThreshold": 0.85,
"rangeIndexColumns": [],
"rangeIndexVersion": 2,
"autoGeneratedInvertedIndex": false,
"createInvertedIndexDuringSegmentGeneration": false,
"sortedColumn": [],
"bloomFilterColumns": [],
"loadMode": "MMAP",
"streamConfigs": {
"streamType": "pulsar",
"stream.pulsar.topic.name": "persistent://public/default/topic1",
"stream.pulsar.bootstrap.servers": "pulsar://localhost:6650",
"stream.pulsar.consumer.type": "lowlevel",
"stream.pulsar.consumer.prop.auto.offset.reset": "smallest",
"stream.pulsar.consumer.factory.class.name": "org.apache.pinot.plugin.stream.pulsar.PulsarConsumerFactory",
"stream.pulsar.decoder.class.name": "org.apache.pinot.plugin.inputformat.json.JSONMessageDecoder",
"realtime.segment.flush.threshold.rows": "1000000",
"realtime.segment.flush.threshold.time": "6h",
"stream.pulsar.fetch.timeout.millis": "30000"
},
"onHeapDictionaryColumns": [],
"varLengthDictionaryColumns": [],
"enableDefaultStarTree": false,
"enableDynamicStarTreeCreation": false,
"aggregateMetrics": false,
"nullHandlingEnabled": false
},
"metadata": {},
"quota": {},
"routing": {},
"query": {},
"ingestionConfig": {
"segmentTimeValueCheck": true,
"continueOnError": false,
"rowTimeValueCheck": false
},
"isDimTable": false
}
}
When I created the schema and table directly on the controller port UI, they were both created without errors in the log but no ingestion is taking place. Another error: [DelayedAutoRebalancer] [HelixController-pipeline-default-PinotCluster-(b6629b4c_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [Controller_<IP_ADDRESS>_9000], liveInstances: [], activeInstances: [] is in the logs even with no table created.
I can't understand why messages are not being ingested into Pinot, and if it's an issue with the schema config, or with the stream configs of the table.

maybe you would like to give pinot 1.2 at try
It includes several updates also regarding Pulsar 3.3 https://github.com/apache/pinot/issues/13317

I have tried the same setup with Pinot 1.2, however the problem is still occurring. Which is the latest Pulsar version that Pinot 1.1 is fully compatible with?

Pinot 1.1 was upgrade to work with Pulsar 2.11. But aware of this version is EOL see https://github.com/apache/pinot/issues/12713

I see, thanks. If I use Pinot 1.2 and Pulsar 3.3, but the segment is not created even though the table is saved (I got the 500 error code when I checked for segment info), what other issues should I look into? The logs on docker aren't showing me any errors related to message decoding or ingestion once I enable the table.

Do you have access to the server log?

Yes. I've checked the server logs and found an error message.

The error message indicates the Helix cluster is not setup, and it has nothing to do with Pulsar.
Have you started a controller before starting server?

Yes. The compose file creates the controller container before the server. When I restart the server only after the controller is set up, this error message is no longer in the logs.


Use nicer colorbar for heatmap, mode genes

[ ] Additional function parameters, change functionality or change defaults?
[ ] New estimator in cr.tl.estimators?
[ ] New kernel in cr.tl.kernels?
[ ] New gene trend model in cr.ul.models?
[ ] New plotting function in cr.pl?
[x] Other?

...


Client Allocation Request for: getpancake

Client Allocation Questions
Core Information

Name: getpancake
Website / Social Media: https://ossolutions.ir, ([at]Pancakedatabase, Twitter)
Region: Iran
DataCap Requested: 2 TiB
Addresses to be Notarized: f1kctjbv4mxdcunderluqnjcyhnr3izs3qcb5tnia
Notary Requested: Tracy

Application created via filplus.storage

This user’s identity has been verified through filplus.storage


Bug Fix: Create failing for partition key values with DEL character

\u007F (DEL) also needs to be escaped. Our backend cannot accept that character in a header.

Closing in favor of #9822


valgrind invalid read of size 1 in the README toy example

There seems to be an illegal memory access in the "toy" example in the README. This happens under both clang++ and g++.
The test file test.cpp
#include "process.h"
#include <iostream>

using procxx::process;
using namespace std;

int main() {
    // construct a child process that runs `cat`
    procxx::process cat{"cat"};

    // construct a child process that runs `wc -c`
    procxx::process wc{"wc", "-c"};

    // set up the pipeline and execute the child processes
    (cat | wc).exec();

    // write "hello world" to the standard input of the cat child process
    cat << "hello world";

    // close the write end (stdin) of the cat child
    cat.close(procxx::pipe_t::write_end());

    // read from the `wc -c` process's stdout, line by line
    std::string line;
    while (std::getline(wc.output(), line))
        std::cout << line << std::endl;

    cout << line << endl;
}

Valgrind output:
clang++ -std=c++14 -g test.cpp`
valgrind ./a.out
==8694== Memcheck, a memory error detector
==8694== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==8694== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==8694== Command: ./a.out
==8694==
11
==8694== Invalid read of size 1
==8694==    at 0x4C2CF9C<EMAIL_ADDRESS>(in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8694==    by 0x4077A9: procxx::pipe_streambuf::underflow() (process.h:293)
==8694==    by 0x4EDAD79: sgetc (streambuf:344)
==8694==    by 0x4EDAD79: std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char) (istream-string.cc:145)
==8694==    by 0x402AB0: main (test.cpp:25)
==8694==  Address 0x5a801ff is 1 bytes before a block of size 520 alloc'd
==8694==    at 0x4C29118: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8694==    by 0x4089F6: __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*) (in /home/bp/workspace/procxx/include/a.out)
==8694==    by 0x40899B: std::allocator_traits<std::allocator<char> >::allocate(std::allocator<char>&, unsigned long) (in /home/bp/workspace/procxx/include/a.out)
==8694==    by 0x408942: std::_Vector_base<char, std::allocator<char> >::_M_allocate(unsigned long) (in /home/bp/workspace/procxx/include/a.out)
==8694==    by 0x4088EE: std::_Vector_base<char, std::allocator<char> >::_M_create_storage(unsigned long) (stl_vector.h:185)
==8694==    by 0x4087F3: std::_Vector_base<char, std::allocator<char> >::_Vector_base(unsigned long, std::allocator<char> const&) (in /home/bp/workspace/procxx/include/a.out)
==8694==    by 0x408742: std::vector<char, std::allocator<char> >::vector(unsigned long, std::allocator<char> const&) (stl_vector.h:278)
==8694==    by 0x4080B3: procxx::pipe_streambuf::pipe_streambuf(unsigned long, unsigned long) (process.h:261)
==8694==    by 0x403084: procxx::process::process<char const (&) [3]>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, char const (&) [3]) (process.h:402)
==8694==    by 0x4029D2: main (test.cpp:12)
==8694==

==8694==
==8694== HEAP SUMMARY:
==8694==     in use at exit: 72,704 bytes in 1 blocks
==8694==   total heap usage: 10 allocs, 9 frees, 74,906 bytes allocated
==8694==
==8694== LEAK SUMMARY:
==8694==    definitely lost: 0 bytes in 0 blocks
==8694==    indirectly lost: 0 bytes in 0 blocks
==8694==      possibly lost: 0 bytes in 0 blocks
==8694==    still reachable: 72,704 bytes in 1 blocks
==8694==         suppressed: 0 bytes in 0 blocks
==8694== Rerun with --leak-check=full to see details of leaked memory
==8694==
==8694== For counts of detected and suppressed errors, rerun with: -v
==8694== ERROR SUMMARY: 5 errors from 1 contexts (suppressed: 1 from 1)

ASAN output:
clang++ -std=c++14 -fsanitize=address -fsanitize=undefined -fsanitize=null -g test.cpp
ASAN_SYMBOLIZER_PATH='/usr/sbin/llvm-symbolizer' ./a.out
11
=================================================================
==31808==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61600000f67b at pc 0x00000049b148 bp 0x7fffd66a4e10 sp 0x7fffd66a45c0
READ of size 8 at 0x61600000f67b thread T0
    #0 0x49b147 in __asan_memmove (/home/bp/workspace/procxx/include/a.out+0x49b147)
    #1 0x503198 in procxx::pipe_streambuf::underflow() /home/bp/workspace/procxx/include/./process.h:293:13
    #2 0x7fa07fb8dd79 in std::basic_streambuf<char, std::char_traits<char> >::sgetc() /build/gcc-multilib/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/streambuf:344
    #3 0x7fa07fb8dd79 in std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char) /build/gcc-multilib/src/gcc-5.3.0/libstdc++-v3/src/c++98/istream-string.cc:145
    #4 0x4decab in main /home/bp/workspace/procxx/include/test.cpp:25:12
    #5 0x7fa07ec2660f in __libc_start_main (/usr/lib/libc.so.6+0x2060f)
    #6 0x419928 in _start (/home/bp/workspace/procxx/include/a.out+0x419928)

0x61600000f67b is located 5 bytes to the left of 520-byte region [0x61600000f680,0x61600000f888)
allocated by thread T0 here:
    #0 0x4db350 in operator new(unsigned long) (/home/bp/workspace/procxx/include/a.out+0x4db350)
    #1 0x50a3a9 in __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/ext/new_allocator.h:104:27
    #2 0x50a2f3 in std::allocator_traits<std::allocator<char> >::allocate(std::allocator<char>&, unsigned long) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/alloc_traits.h:360:16
    #3 0x50a206 in std::_Vector_base<char, std::allocator<char> >::_M_allocate(unsigned long) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/stl_vector.h:170:20
    #4 0x509b98 in std::_Vector_base<char, std::allocator<char> >::_M_create_storage(unsigned long) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/stl_vector.h:185:27
    #5 0x509553 in std::_Vector_base<char, std::allocator<char> >::_Vector_base(unsigned long, std::allocator<char> const&) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/stl_vector.h:136:9
    #6 0x509053 in std::vector<char, std::allocator<char> >::vector(unsigned long, std::allocator<char> const&) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/stl_vector.h:278:9
    #7 0x506a2d in procxx::pipe_streambuf::pipe_streambuf(unsigned long, unsigned long) /home/bp/workspace/procxx/include/./process.h:261:11
    #8 0x4e11a8 in procxx::process::process<char const (&) [3]>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, char const (&) [3]) /home/bp/workspace/procxx/include/./process.h:402:5
    #9 0x4de72a in main /home/bp/workspace/procxx/include/test.cpp:12:21
    #10 0x7fa07ec2660f in __libc_start_main (/usr/lib/libc.so.6+0x2060f)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/home/bp/workspace/procxx/include/a.out+0x49b147) in __asan_memmove
Shadow bytes around the buggy address:
  0x0c2c7fff9e70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9e90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9eb0: 01 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c2c7fff9ec0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa[fa]
  0x0c2c7fff9ed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9ef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9f10: 00 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==31808==ABORTING

There also seems to be a lot of implicit integer conversions going on, which may or may not be related to this issue:
[1] λ clang++ -std=c++14 -Wconversion -Wsign-conversion test.cpp
In file included from test.cpp:1:
./process.h:153:41: warning: implicit conversion changes signedness: 'long' to 'unsigned long' [-Wsign-conversion]
            write(buf + bytes, length - bytes);
                                      ~ ^~~~~
./process.h:183:19: warning: implicit conversion changes signedness: 'int' to 'size_type' (aka 'unsigned long') [-Wsign-conversion]
        if (pipe_[end] != -1)
            ~~~~~ ^~~
./process.h:185:27: warning: implicit conversion changes signedness: 'int' to 'size_type' (aka 'unsigned long') [-Wsign-conversion]
            ::close(pipe_[end]);
                    ~~~~~ ^~~
./process.h:186:19: warning: implicit conversion changes signedness: 'int' to 'size_type' (aka 'unsigned long') [-Wsign-conversion]
            pipe_[end] = -1;
            ~~~~~ ^~~
./process.h:195:22: warning: implicit conversion changes signedness: 'int' to 'size_type' (aka 'unsigned long') [-Wsign-conversion]
        return pipe_[end] != -1;
               ~~~~~ ^~~
./process.h:206:26: warning: implicit conversion changes signedness: 'int' to 'size_type' (aka 'unsigned long') [-Wsign-conversion]
        if (::dup2(pipe_[end], fd) == -1)
                   ~~~~~ ^~~
./process.h:221:30: warning: implicit conversion changes signedness: 'int' to 'size_type' (aka 'unsigned long') [-Wsign-conversion]
        dup(end, other.pipe_[end]);
                 ~~~~~       ^~~
./process.h:299:67: warning: implicit conversion changes signedness: 'long' to 'unsigned long' [-Wsign-conversion]
            = stdout_pipe_.read(start, in_buffer_.size() - (start - base));
                                                         ~  ~~~~~~^~~~~~
./process.h:319:23: warning: implicit conversion loses integer precision: 'int_type' (aka 'int') to 'char_type' (aka 'char') [-Wconversion]
            *pptr() = ch; // safe because of -1 in setp() in ctor
                    ~ ^~
./process.h:379:47: warning: implicit conversion changes signedness: 'long' to 'uint64_t' (aka 'unsigned long') [-Wsign-conversion]
            stdin_pipe_.write(pbase(), pptr() - pbase());
            ~~~~~~~~~~~                ~~~~~~~^~~~~~~~~
./process.h:380:19: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
            pbump(-(pptr() - pbase()));
            ~~~~~ ^~~~~~~~~~~~~~~~~~~
11 warnings generated.

EDIT:
Minimalist example:
#include "process.h"
#include <iostream>

using procxx::process;
using namespace std;

int main() {
    process p{ "nproc" };
    p.exec();
    p.wait();

    std::string line;
    while (std::getline(p.output(), line))
        std::cout << line << std::endl;

    cout << line << endl;
}

clang++ -std=c++14 -g test.cpp
valgrind ./a.out
==29029== Memcheck, a memory error detector
==29029== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==29029== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==29029== Command: ./a.out
==29029==
8
==29029== Invalid read of size 2
==29029==    at 0x4C2D0D8<EMAIL_ADDRESS>(in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29029==    by 0x405709: procxx::pipe_streambuf::underflow() (process.h:293)
==29029==    by 0x4EDAD79: sgetc (streambuf:344)
==29029==    by 0x4EDAD79: std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char) (istream-string.cc:145)
==29029==    by 0x40296F: main (test.cpp:13)
==29029==  Address 0x5a7fcde is 2 bytes before a block of size 520 alloc'd
==29029==    at 0x4C29118: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29029==    by 0x406956: __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*) (in /home/bp/workspace/procxx/include/a.out)
==29029==    by 0x4068FB: std::allocator_traits<std::allocator<char> >::allocate(std::allocator<char>&, unsigned long) (in /home/bp/workspace/procxx/include/a.out)
==29029==    by 0x4068A2: std::_Vector_base<char, std::allocator<char> >::_M_allocate(unsigned long) (in /home/bp/workspace/procxx/include/a.out)
==29029==    by 0x40684E: std::_Vector_base<char, std::allocator<char> >::_M_create_storage(unsigned long) (stl_vector.h:185)
==29029==    by 0x406753: std::_Vector_base<char, std::allocator<char> >::_Vector_base(unsigned long, std::allocator<char> const&) (in /home/bp/workspace/procxx/include/a.out)
==29029==    by 0x4066A2: std::vector<char, std::allocator<char> >::vector(unsigned long, std::allocator<char> const&) (stl_vector.h:278)
==29029==    by 0x406013: procxx::pipe_streambuf::pipe_streambuf(unsigned long, unsigned long) (process.h:261)
==29029==    by 0x402C0D: procxx::process::process<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) (process.h:402)
==29029==    by 0x4028F9: main (test.cpp:8)
==29029==
==29029== Invalid read of size 2
==29029==    at 0x4C2D0EC<EMAIL_ADDRESS>(in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29029==    by 0x405709: procxx::pipe_streambuf::underflow() (process.h:293)
==29029==    by 0x4EDAD79: sgetc (streambuf:344)
==29029==    by 0x4EDAD79: std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char) (istream-string.cc:145)
==29029==    by 0x40296F: main (test.cpp:13)
==29029==  Address 0x5a7fcdc is 4 bytes before a block of size 520 alloc'd
==29029==    at 0x4C29118: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29029==    by 0x406956: __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*) (in /home/bp/workspace/procxx/include/a.out)
==29029==    by 0x4068FB: std::allocator_traits<std::allocator<char> >::allocate(std::allocator<char>&, unsigned long) (in /home/bp/workspace/procxx/include/a.out)
==29029==    by 0x4068A2: std::_Vector_base<char, std::allocator<char> >::_M_allocate(unsigned long) (in /home/bp/workspace/procxx/include/a.out)
==29029==    by 0x40684E: std::_Vector_base<char, std::allocator<char> >::_M_create_storage(unsigned long) (stl_vector.h:185)
==29029==    by 0x406753: std::_Vector_base<char, std::allocator<char> >::_Vector_base(unsigned long, std::allocator<char> const&) (in /home/bp/workspace/procxx/include/a.out)
==29029==    by 0x4066A2: std::vector<char, std::allocator<char> >::vector(unsigned long, std::allocator<char> const&) (stl_vector.h:278)
==29029==    by 0x406013: procxx::pipe_streambuf::pipe_streambuf(unsigned long, unsigned long) (process.h:261)
==29029==    by 0x402C0D: procxx::process::process<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) (process.h:402)
==29029==    by 0x4028F9: main (test.cpp:8)
==29029==

==29029==
==29029== HEAP SUMMARY:
==29029==     in use at exit: 72,704 bytes in 1 blocks
==29029==   total heap usage: 4 allocs, 3 frees, 73,769 bytes allocated
==29029==
==29029== LEAK SUMMARY:
==29029==    definitely lost: 0 bytes in 0 blocks
==29029==    indirectly lost: 0 bytes in 0 blocks
==29029==      possibly lost: 0 bytes in 0 blocks
==29029==    still reachable: 72,704 bytes in 1 blocks
==29029==         suppressed: 0 bytes in 0 blocks
==29029== Rerun with --leak-check=full to see details of leaked memory
==29029==
==29029== For counts of detected and suppressed errors, rerun with: -v
==29029== ERROR SUMMARY: 3 errors from 2 contexts (suppressed: 1 from 1)

ASAN:
clang++ -std=c++14 -fsanitize=address -fsanitize=undefined -fsanitize=null -g test.cpp
ASAN_SYMBOLIZER_PATH='/usr/sbin/llvm-symbolizer' ./a.out
8
=================================================================
==14083==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61600000fc7a at pc 0x00000049b0a8 bp 0x7ffc0c71c330 sp 0x7ffc0c71bae0
READ of size 8 at 0x61600000fc7a thread T0
    #0 0x49b0a7 in __asan_memmove (/home/bp/workspace/procxx/include/a.out+0x49b0a7)
    #1 0x4f4528 in procxx::pipe_streambuf::underflow() /home/bp/workspace/procxx/include/./process.h:293:13
    #2 0x7f3f4b4c5d79 in std::basic_streambuf<char, std::char_traits<char> >::sgetc() /build/gcc-multilib/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/streambuf:344
    #3 0x7f3f4b4c5d79 in std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char) /build/gcc-multilib/src/gcc-5.3.0/libstdc++-v3/src/c++98/istream-string.cc:145
    #4 0x4de5df in main /home/bp/workspace/procxx/include/test.cpp:13:12
    #5 0x7f3f4a55e60f in __libc_start_main (/usr/lib/libc.so.6+0x2060f)
    #6 0x419888 in _start (/home/bp/workspace/procxx/include/a.out+0x419888)

0x61600000fc7a is located 6 bytes to the left of 520-byte region [0x61600000fc80,0x61600000fe88)
allocated by thread T0 here:
    #0 0x4db2b0 in operator new(unsigned long) (/home/bp/workspace/procxx/include/a.out+0x4db2b0)
    #1 0x4fb739 in __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/ext/new_allocator.h:104:27
    #2 0x4fb683 in std::allocator_traits<std::allocator<char> >::allocate(std::allocator<char>&, unsigned long) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/alloc_traits.h:360:16
    #3 0x4fb596 in std::_Vector_base<char, std::allocator<char> >::_M_allocate(unsigned long) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/stl_vector.h:170:20
    #4 0x4faf28 in std::_Vector_base<char, std::allocator<char> >::_M_create_storage(unsigned long) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/stl_vector.h:185:27
    #5 0x4fa8e3 in std::_Vector_base<char, std::allocator<char> >::_Vector_base(unsigned long, std::allocator<char> const&) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/stl_vector.h:136:9
    #6 0x4fa3e3 in std::vector<char, std::allocator<char> >::vector(unsigned long, std::allocator<char> const&) /usr/sbin/../lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/stl_vector.h:278:9
    #7 0x4f7dbd in procxx::pipe_streambuf::pipe_streambuf(unsigned long, unsigned long) /home/bp/workspace/procxx/include/./process.h:261:11
    #8 0x4df71d in procxx::process::process<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) /home/bp/workspace/procxx/include/./process.h:402:5
    #9 0x4de2dc in main /home/bp/workspace/procxx/include/test.cpp:8:13
    #10 0x7f3f4a55e60f in __libc_start_main (/usr/lib/libc.so.6+0x2060f)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/home/bp/workspace/procxx/include/a.out+0x49b0a7) in __asan_memmove
Shadow bytes around the buggy address:
  0x0c2c7fff9f30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9f40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9f50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9f60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9f70: 01 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c2c7fff9f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa[fa]
  0x0c2c7fff9f90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9fa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2c7fff9fd0: 00 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==14083==ABORTING

If we change line 293 to use memcpy instead of memmove:
std::memmove(base, egptr() - put_back_size_, put_back_size_);

to:
std::memcpy(base, egptr() - put_back_size_, put_back_size_);

then ASAN will report memcpy-param-overlap, which is likely the cause of the first problem, i.e. overlapping source and dest pointers.
==25235==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x61600000f680,0x61600000f688) and [0x61600000f67b, 0x61600000f683) overlap
    #0 0x49bce8 in __asan_memcpy (/home/bp/workspace/procxx/include/bake-build/target/debug/test+0x49bce8)
    #1 0x5057f7 in procxx::pipe_streambuf::underflow() /home/bp/workspace/procxx/include/./process.h:293:13
    #2 0x7f3b3481fd79 in std::basic_streambuf<char, std::char_traits<char> >::sgetc() /build/gcc-multilib/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/streambuf:344
    #3 0x7f3b3481fd79 in std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char) /build/gcc-multilib/src/gcc-5.3.0/libstdc++-v3/src/c++98/istream-string.cc:145
    #4 0x4dff6f in main /home/bp/workspace/procxx/include/./test.cpp:25:12
    #5 0x7f3b338b860f in __libc_start_main (/usr/lib/libc.so.6+0x2060f)
    #6 0x41ac28 in _start (/home/bp/workspace/procxx/include/bake-build/target/debug/test+0x41ac28)

The crash seems to happen when the external process's output length is less than put_back_size, which defaults to 8. If we change put_back_size to 1, then the invalid read error is gone in both cases.
Of course, we would want to find some way to keep being able to memmove in chunks of 8 bytes or so without running into that error.

Fixed by PR #5


Handling multiple request body Content-Type on one endpoint

We have a specification that has a single endpoint for PATCH but allows either standard JSON patch (application/json-patch+json) or JSON merge patch (application/merge-patch+json) as input in the request body.
I find that only the first one ends up generating contract tests.
I did see this issue about different content types (one being non-JSON) having some challenges getting handled, and this issue about handling JSON patch. They seem to slightly overlap with what I'm talking about, so I don't know if it's all connected or what.
Here's an example schema to show what I'm talking about:

schema.json (click to expand)
{
  "components": {
    "responses": {
      "400badrequest": {
        "description": "The request could not be processed by the server."
      },
      "401unauthorized": {
        "description": "The client has not authenticated to perform the operation."
      },
      "403forbidden": {
        "description": "The authenticated client is not authorized to perform the operation."
      },
      "404notfound": {
        "description": "The server has not found a resource matching the request URI."
      }
    },
    "schemas": {
      "jsonPatchDocument": {
        "description": "RFC 6902 JSON Patch document - http://json.schemastore.org/json-patch",
        "items": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "op": {
                  "description": "The operation to perform.",
                  "enum": [
                    "add",
                    "replace",
                    "test"
                  ],
                  "type": "string"
                },
                "path": {
                  "$ref": "#/components/schemas/jsonPatchPath"
                },
                "value": {
                  "description": "The value to add, replace or test."
                }
              },
              "required": [
                "value",
                "op",
                "path"
              ]
            },
            {
              "additionalProperties": false,
              "properties": {
                "op": {
                  "description": "The operation to perform.",
                  "enum": [
                    "remove"
                  ],
                  "type": "string"
                },
                "path": {
                  "$ref": "#/components/schemas/jsonPatchPath"
                }
              },
              "required": [
                "op",
                "path"
              ]
            },
            {
              "additionalProperties": false,
              "properties": {
                "from": {
                  "$ref": "#/components/schemas/jsonPatchPath"
                },
                "op": {
                  "description": "The operation to perform.",
                  "enum": [
                    "move",
                    "copy"
                  ],
                  "type": "string"
                },
                "path": {
                  "$ref": "#/components/schemas/jsonPatchPath"
                }
              },
              "required": [
                "from",
                "op",
                "path"
              ]
            }
          ]
        },
        "type": "array"
      },
      "jsonPatchPath": {
        "description": "A JSON Pointer path pointing to the location of the patch operation.",
        "type": "string"
      },
      "user": {
        "allOf": [
          {
            "$ref": "#/components/schemas/userPatch"
          },
          {
            "properties": {
              "id": {
                "$ref": "#/components/schemas/userId"
              }
            }
          }
        ],
        "description": "The identity for an individual person.",
        "required": [
          "id",
          "familyName",
          "givenName"
        ]
      },
      "userId": {
        "description": "A unique and immutable identifier used to identify a user resource.",
        "example": "214d9ca3-3aaf-4312-902d-03818fd0f4e6",
        "maxLength": 40,
        "minLength": 1,
        "type": "string"
      },
      "userPatch": {
        "description": "Base properties for a user.",
        "properties": {
          "familyName": {
            "description": "The family/last name for the user.",
            "example": "Smith",
            "type": "string"
          },
          "givenName": {
            "description": "The given/first name for the user.",
            "example": "Alice",
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "info": {
    "contact": {
      "name": "Demo"
    },
    "description": "Patch demo API.",
    "title": "Patch Demo",
    "version": "0.0.1"
  },
  "openapi": "3.0.3",
  "paths": {
    "/users/{id}": {
      "patch": {
        "description": "Makes changes to the profile of a user.",
        "operationId": "patch-user",
        "parameters": [
          {
            "description": "The identifier of the user to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/userId"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "example": [
                {
                  "op": "replace",
                  "path": "/givenName",
                  "value": "Alison"
                }
              ],
              "schema": {
                "$ref": "#/components/schemas/jsonPatchDocument"
              }
            },
            "application/merge-patch+json": {
              "example": {
                "givenName": "Alison"
              },
              "schema": {
                "$ref": "#/components/schemas/userPatch"
              }
            }
          },
          "description": "A JSON Patch document with the set of profile element updates.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/user"
                }
              }
            },
            "description": "All operations in the patch document succeeded. The response will contain the updated user profile."
          },
          "400": {
            "$ref": "#/components/responses/400badrequest"
          },
          "401": {
            "$ref": "#/components/responses/401unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/403forbidden"
          },
          "404": {
            "$ref": "#/components/responses/404notfound"
          }
        },
        "summary": "Update a user profile",
        "tags": [
          "resource-users"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Demo API",
      "url": "https://api.demo.com"
    }
  ],
  "tags": [
    {
      "description": "User/identity-related services.",
      "name": "resource-users"
    }
  ]
}

As the schema is now, it will generate tests for application/json-patch+json because that's the first one listed in the requestBody.content listing. If you reorder them so application/merge-patch+json is first, those are the tests you'll get.
How do I get both?

hi @tillig
Portman typically looks for the 1st JSON content type it comes across and uses that to generate the schema validation.
In your case, you would want to have tests generated for multiple content-types within a response?

Yeah, because each JSON type has a different schema associated - merge patch looks similar to the document getting patched, while JSON patch has a specific schema that specifies operations using JSONPath. Both are JSON, both have a JSON schema, but different schema per content type.

hi @tillig
Not sure if this is still relevant (if not feel free to close this issue).
But we made some improvement in the latest version of Portman with regards the request body & the schema validation.
You can specify as option, via the postman config --postmanConfigFile, with "preferredRequestBodyType", which request body content-type to take from OpenAPI. (typically: raw OR first-listed)
Example
{
  "folderStrategy": "Tags",
  "requestParametersResolution": "Example",
  "exampleParametersResolution": "Example",
  "keepImplicitHeaders": true,
  "enableOptionalParameters": false,
  "preferredRequestBodyType": "raw"
}

Is there a way to generate tests for all of the content types? That's really what I'm looking for with this issue - not just defaulting to one type, but actually generating tests based on all the types [assuming they're JSON compatible]. In this case, JSON patch vs. JSON merge patch - both are JSON, both are accepted, both have a schema associated, so it seems like both could get tests generated.

Using Variations and some new config that could be an option, that we could explore.
How would you expect to configure this? How would that variation config look like?

I mean, I guess I wouldn't really expect to configure it a lot, but I haven't really thought it through deeply. I guess I'd just figure it's a foreach over the set of content types and that's about it. Sort of the simplest thing that could possibly work. Perhaps I'm missing something or oversimplifying?

We have had the request to generate multiple variations for different responses but you are looking for the case to generate variations per request content-type?
something like this:
{
  "variationTests": [
    {
      "openApiOperationId": "leadsAdd",
      "openApiResponse": "200",
      "requestContentType": [
        "application/json",
        "application/x-www-form-urlencoded"
      ],
      "responseContentType": [
        "application/json",
        "application/xml"
      ],
      "variations": []
    }
  ]
}

@nicklloyd What would be your input on this idea?


There is a bug that the transaction cannot be completed in the testnet interaction

Describe the bug
There is a bug that the transaction cannot be completed in the testnet interaction
Steps to reproduce
When executing ETH/bull swap, the transaction cannot be completed immediately
Additional context
No response

please provide more information.
If you meant that executing ETH/BULL swap, this is intentionally as it is expected to fail 50% of time


add the line number for errors in V8 and NodeJS

Most ExecJS exceptions does not include the information about where the JavaScript error occurs.
This patch adds line numbers to NodeJS and V8 implementations to ease debugging, although the information includes some garbage like temporary filenames.

This repository has been deprecated and has moved to https://github.com/rails/execjs.


chore: remove variables from LinearAlgebra.FreeModule.Finite.Basic

The current setup with an unused variable (N) and one theorem overriding the ambient variables, as well as a namespace that's explicitly overridden in two of the three results within it, is confusing. It is clearer to explicitly spell out the arguments to each declaration.

Thanks :tada:
bors merge


Function overloads MIGHT  have unexpected behaviour

TypeScript Version:  3.4.5
Search Terms:
Function overload ,  function overload  optional parameters
Code
Working example

// Function overload
export function pipe<V0, T1, T2>(
  fn0: (x0?: V0) => T1,
  fn1: (x: T1) => T2
): (x0?: V0) => T2;
export function pipe<V0, T1, T2>(
  fn0: (x0: V0) => T1,
  fn1: (x: T1) => T2
): (x0: V0) => T2;

// function definition
export function pipe(...fns: Function[]) {
  return fns.reduce((accum, fn: Function) => (...args: any[]) =>
    fn(accum(...args))
  );
}

const sum = (a: number = 0) => "string";
const stringFn = (a: string) => 3;
const sumString = pipe(
  sum,
  stringFn
);

sumString(); // works great
sumString(3); // works great
sumString(undefined); // works great

non working example, note the order from overloads
// Function overload
export function pipe<V0, T1, T2>(
  fn0: (x0: V0) => T1,
  fn1: (x: T1) => T2
): (x0: V0) => T2;
export function pipe<V0, T1, T2>(
  fn0: (x0?: V0) => T1,
  fn1: (x: T1) => T2
): (x0?: V0) => T2;

// function definition
export function pipe(...fns: Function[]) {
  return fns.reduce((accum, fn: Function) => (...args: any[]) =>
    fn(accum(...args))
  );
}

const sum = (a: number = 0) => "string";
const stringFn = (a: string) => 3;
const sumString = pipe(
  sum,
  stringFn
);

sumString(); // Boom
sumString(3); // works great
sumString(undefined); // works great

Expected behavior:
The official documentation  about function overloads says:

In order for the compiler to pick the correct type check, it follows a similar process to the underlying JavaScript. It looks at the overload list and, proceeding with the first overload, attempts to call the function with the provided parameters. If it finds a match, it picks this overload as the correct overload. For this reason, it’s customary to order overloads from most specific to least specific.

It makes sense that the optional overload has to be before the required parameter, how ever, it might be difficult to notice, since the official documentation doesn't, explictly mention this case, this could cause some unexpected headaches.
Playground Link:
working fine
Not working

^

I'm not sure what the aim of this report is - as you noticed, the behavior is documented and acting according to its intended design. Programming is a subtle art 😉


chore(kubefed): updated version (0.3.1-banzai.1->)0.4.0

Q
A

Bug fix?
no

New feature?
no

API breaks?
no

Deprecations?
no

Related tickets
closes #3115

License
Apache 2.0

What's in this PR?

Replaced custom Banzai Cloud kubefed chart usage with the official one.
Why?

The official chart now supports Helm v3, so we discontinue the custom chart.
Additional context

Kubefed brought some other transitive dependency updates with itself. Checked the release notes, haven't seen potentially breaking changes.
This PR changed the official kubefed chart value handling by putting the common image values under a controller and webhook fields in the main values file to provide separated control over the two.

Previous
->
Current

controllermanager.image
->
controllermanager.controller.image

->
controllermanager.webhook.image

controllermanager.imagePullPolicy
->
controllermanager.controller.imagePullPolicy

->
controllermanager.webhook.imagePullPolicy

controllermanager.replicaCount
->
controllermanager.controller.replicaCount

->
controllermanager.webhook.replicaCount

controllermanager.repository
->
controllermanager.controller.repository

->
controllermanager.webhook.repository

controllermanager.tag
->
controllermanager.controller.tag

->
controllermanager.webhook.tag

Checklist

[ ] Implementation tested (with at least one cloud provider)
[X] Code meets the Developer Guide
~OpenAPI and Postman files updated (if needed)~
~User guide and development docs updated (if needed)~
~Related Helm chart(s) updated (if needed)~

Tested by creating 2 clusters and then creating a federation using those two, logged the path where the values and repository is added, seemed to work fine.


Issue discovered with eureka-client/src/main/java/com/netflix/discovery/AbstractAzToRegionMapper.java

Problem
Private method is used but removed.
Example diff
         }
         return null;
     }
-
-    private void populateDefaultAZToRegionMap() {
-        defaultRegionVsAzMap.put("us-east-1", "us-east-1a");
-        defaultRegionVsAzMap.put("us-east-1", "us-east-1c");
-        defaultRegionVsAzMap.put("us-east-1", "us-east-1d");
-        defaultRegionVsAzMap.put("us-east-1", "us-east-1e");
-
-        defaultRegionVsAzMap.put("us-west-1", "us-west-1a");
-        defaultRegionVsAzMap.put("us-west-1", "us-west-1c");
-
-        defaultRegionVsAzMap.put("us-west-2", "us-west-2a");
-        defaultRegionVsAzMap.put("us-west-2", "us-west-2b");
-        defaultRegionVsAzMap.put("us-west-2", "us-west-2c");
-
-        defaultRegionVsAzMap.put("eu-west-1", "eu-west-1a");
-        defaultRegionVsAzMap.put("eu-west-1", "eu-west-1b");
-        defaultRegionVsAzMap.put("eu-west-1", "eu-west-1c");
-    }
 }

Recipes in example diff:

org.openrewrite.java.cleanup.RemoveUnusedPrivateMethods
org.openrewrite.java.cleanup.UseDiamondOperator
org.openrewrite.java.cleanup.UseLambdaForFunctionalInterface

References:

Recipe ID: lF1C7
Recipe Name: "Common static analysis issues"
Repository: Netflix/eureka/master
Created at Thu Jan 20 2022 09:59:31 GMT-0800 (Pacific Standard Time)

I've confirmed that this method is no longer removed on latest openrewrite. The only private method that gets removed in eureka-client really is unused.


Inline style and computed style aren't equal

Hello - first of all, great work on react-motion .. seriously makes animations on the web a dream :)
I'm having trouble doing a height transition, where the on the react-motion side of things it appears to be working properly.. however the actual computed height doesn't reflect in the inline style..
Here is a video of the this happening here where you can pretty clearly see the DOM style and inline CSS value aren't equal.
Here is the code --
<Motion style={{height: spring(addressBar.open ? document.body.offsetHeight : 50)}}>
  {({ height }) => {
    return (
      <div className={style.addressBar} onClick={toggleAddressBar} style={{ height }}>
        {address.title}
      </div>
    )
  }}
</Motion>

Ahh, turns out that it's because this item is a in a flexbox column layout, where sibling elements are height: 100% ... so it appears that the browser is trying to compensate and fit things on the DOM 🤔


fix grid sort and header button tooltip

Description

The alignment button area of the grid and the tooltip position of the header move button have been adjusted.
Related Issue :

How Has This Been Tested?

Need additional checks?
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] I have read the CONTRIBUTING document.
[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have added tests to cover my changes.

Additional Context

deploy to 1

deploy to 1

deploy to 1


Fixes to make OSBS build working

This PR contains two commits - one is the actual change, other one is reformatting of the file.


Fixed a bug in two-state tomography

The Pauli operators were applied to the wrong qubits (i.e. the Pauli operator meant for first qubit was
applied to second qubit and vice versa). This is now fixed.

fixes #1679

Can you add a test that would have caught this?

Yes, I just added three more tests to the density matrix: state produced by (H, H), (X/2, Y/2), (Y/2, X/2). These should catch any mix-up in the ordering. In the future, if there is a need, I can add an even more rigorous test that checks for states produced by random gates from the Haar measure.


Fix Python 3 syntax error

% python3
>>> import .kitti_common as kitti
  File "<stdin>", line 1
    import .kitti_common as kitti

Thank you for the contribution.
I will close it since the codebase has been upgrated to a pretty new and better codebase.
Welcome to contribute to the new codebase.


Changing Admin Background Image problem

Version information

Laravel: v7.24
Voyager: v1.4
PHP: 7.3
Database: MySQL 5.7.24

Description
Changing Admin Background Image leads to Intervention\Image\Exception\NotSupportedException
Reading Exif data is not supported by this PHP installation
Steps To Reproduce
Steps to reproduce the behavior:

Go to admin
Click on settings
3.Click on admin
Scroll down to Admin Background Image
Click choose file
Select an image in my case a jpg image(2.32MB)

Expected behavior
To change the background image of admin login page.

As the error already suggests it's something you'll have to fix in your server configuration not a Voyager issue.
https://github.com/Intervention/image/issues/658


Could not reproduce Acceptance Length for Llama 2 7B Chat Model with chain drafts

Hello EAGLE authors,
Thanks for your great work! I am currently trying to reproduce EAGLEv1 results for Llama 2 7B Chat model, specifically in terms of acceptance length between chain and tree drafts. From the paper, I noticed that the $\tau$ is 3.0 for chain draft and 3.62 for tree draft. For chain drafts, I added this config to eagle/model/choices.py file: chain = [[0], [0, 0], [0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0, 0]]

However, when I try to reproduce using the v1 codebase and the provided checkpoint with temp=0 and dataset=mt_bench, I only got $\tau$ = 2.3 for chain draft instead of 3, which is a significant drop, though I did manage to reproduce $\tau$ = 3.68 for tree drafts. I wonder if you can obtain this reported result for chain draft using the v1 codebase, or there was any update to the codebase that was not committed. Thanks for your time and looking forward to your reply!

The average acceptance length includes the one token generated by the target model. Does your result include this? Other possible reasons may also include incorrect draft model weights or templates.

Hi Yuhui,
Thanks for your reply! It was actually due to a bug. For anyone else having trouble with this, note that we need to update the tree shape for both the base model and the eagle heads (as in cnet). When you want to use something other than the default tree, please remember to update it for both base and eagle model. Currently, the eagle model by default initializes to the default tree as in choices.py.

Thanks for sharing! I've been following along and noticed that for chain drafts, we need to add chain = [[0], [0, 0], [0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0, 0]] to the eagle/model/choices.py file. Could you clarify if there are additional changes required in cnets.py or other parts of the codebase to properly configure chain drafts? Thanks!

please make sure you initialize the tree with chain here https://github.com/SafeAILab/EAGLE/blob/v1/eagle/model/cnets.py#L498

Thanks! Just noticed we need to switch to the v1 branch to use chain draft.


infinite login loop in step 1

I followed the steps in A01 but end up with an infinite login loop here. I'm using the admin@ account. It has an employee ID and a manager. Any idea where I went wrong? I started ngrok with out --host-header because I don't have a paid subscription.

This is the error I'm getting:

{
    "errorCode": "interaction_required",
    "errorMessage": "AADSTS16000: Either multiple user identities are available for the current request or selected account is not supported for the scenario.\r\nTrace ID: 38ec1ec9-469e-43f6-81ca-b9464ec81600\r\nCorrelation ID: 14fe8ae9-a081-4c1c-9cbf-c9a52f73aed5\r\nTimestamp: 2022-04-20 13:33:08Z",
    "subError": "",
    "name": "InteractionRequiredAuthError",
    "correlationId": "14fe8ae9-a081-4c1c-9cbf-c9a52f73aed5"
}

I'm able to log in on a brand new Chrome profile. Must have been a problem with having my MS or my demo account logged in on the same Chrome profile.

Maybe add console.log() in the catch statement where I get the error so it's easier to see the problem in the debugger tools without stepping through a bunch of break points.

Hoping this is fixed? Please pull new source from the main branch or copy new copies of the files in /client/identity to test.
Thanks!

Thanks! It works on my profile with another account logged in as well.


juju config option port is not working properly

Bug Description
Changing the port config option will change k8s service, but not applied on kubeflow-dashboard container.


react-moralis in Next.js 14

New Bug Report
Checklist

[ ] I am not disclosing a vulnerability.
[ ] I have searched through existing issues and the Moralis Forum.
[ ] I can reproduce the issue with the latest react-moralis release, latest SDK release, and my server is updated to the latest version.

Issue Description

Steps + code to reproduce

Actual Outcome

Expected Outcome

Environment

Server

Moralis server version: FILL_THIS_OUT

Client

react-moralis version: FILL_THIS_OUT
Moralis SDK version: FILL_THIS_OUT
Operating system: FILL_THIS_OUT
Browser: FILL_THIS_OUT

Logs

Hello @ali0120 what is your actual issue please, I do not seem to understand


jszip module not found

Fairly new in serverless world and most of my early lessons have come from node.js side. Still packaging, especially when python is intertwined is a steep learning curve.
Trying this 3rd party repo which runs properly based on the author's hosted app.
https://github.com/monteno-m/job-scraper
Git cloned repo, installed serverless-python-requirements (the latest) and when I try to deploy, get the error:
Serverless plugin "serverless-python-requirements" initialization errored: Cannot find module 'jszip'
Tried omitting the module in serverless.yml to see if I could get further along but stops in same place. Also when I do a npm list, jszip is version 3.1.5. Googling around doesn't surface other cases.
Thanks for any trailheads!
Environment Information -----------------------------
OS: linux / Ubuntu 18.04
Node Version: 8.10.0
Serverless Version: 1.37.1

I updated all python requirements and can deploy now.
Using beautifulsoup4==4.7.1 and requests==2.21.0


Force log flushing

Standard Ruby logger buffers the messages before printing them out to STDOUT. For this reason, the logs are sometimes not seen in the container logs.
A quick fix for that is to include:
STDOUT.sync = true

which forces the logs to be printed immediately.
This is not optimal, though. We need to review the logging and probably do the sync periodically.

I could only reproduce this using docker and without specifying the --interactive option.


Make Field.assertLt & friends work outside the circuit

Currently, calling those functions at the top level throws:

Fixed!