feat: init ApisixPluginConfig crd #4  (#638)

Please answer these questions before submitting a pull request

Why submit this pull request?

[ ] Bugfix

[x] New feature provided

[ ] Improve performance

[ ] Backport patches

Related issues
#638
#689

Bugfix

Description

How to fix?

New feature or improvement

Describe the details and related test reports.

Backport patches

Why need to backport?

Source branch

Related commits and pull requests

Target branch

@tao12345666333

Just run make codegen

@tao12345666333  hi, i had run the make codegen and make lint

[x] Add ApisixPluginConfig custom resource. Only need to modify YAML.
[x] Add ApisixPluginConfig data structures.
[ ] Add client implementation to interact with Apache APISIX.
[ ] Add ApisixPluginConfig translator, it can convert ApisixPluginConfig data structure into APISIX.
[ ] Add ApisixPluginConfig controller loop, It watches the ApisixPluginConfig resource in the Kubernetes cluster and converts it to the ApisixPluginConfig data structure.
[ ] Add docs to describe it.

I will add client implementation to interact with Apache APISIX later.

Codecov Report

Merging #694 (e84d7d4) into master (9f2cd7f) will decrease coverage by 0.00%.
The diff coverage is n/a.

:exclamation: Current head e84d7d4 differs from pull request most recent head b34b001. Consider uploading reports for the commit b34b001 to get more accurate results

@@            Coverage Diff             @@
##           master     #694      +/-   ##
==========================================
- Coverage   32.59%   32.58%   -0.01%
==========================================
  Files          66       65       -1
  Lines        6780     6779       -1
==========================================
- Hits         2210     2209       -1
  Misses       4321     4321
  Partials      249      249

Impacted Files
Coverage Δ

test/e2e/e2e.go

Continue to review full report at Codecov.

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

I forget the license header, lol.

@tao12345666333
plz review it once again

In #707, we discussed that we want to use a unified version for all resource management, so here could you add it to the v2beta2 version?
I'm sorry that this is inconsistent with our initial expectations.

Never mind.
I will update right now

@tao12345666333
plz review it

@tao12345666333
hi, plz review it

#746 is deleting v1 and v2alpha1, so we don't need to keep these two versions in the CRD definition.
In addition, please fix the lint error. Thanks!

@tao12345666333
I had fixed the lint error about my commits
golangci-lint run
pkg/kube/apisix/apis/config/v2beta2/types.go:211: File is not `gofmt`-ed with `-s` (gofmt)
	Status ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`
pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"
pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"

But there were still some errors left:
golangci-lint run
pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"
pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"

Maybe this caused by my latest golangci-lint
golangci-lint has version 1.42.1 built from 54f4301 on 2021-09-04T14:39:09Z
so what could I do to fix it or just ignore it

@tao12345666333 I had fixed the lint error about my commits
golangci-lint run
pkg/kube/apisix/apis/config/v2beta2/types.go:211: File is not `gofmt`-ed with `-s` (gofmt)
	Status ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`
pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"
pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"

But there were still some errors left:
golangci-lint run
pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"
pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"

Maybe this caused by my latest golangci-lint golangci-lint has version 1.42.1 built from 54f4301 on 2021-09-04T14:39:09Z so what could I do to fix it or just ignore it

If it's reported by the lint tool, let's fix it.

@tao12345666333 @tokers
Now, what could I do next

ping @gxthrj

@neverCase  There is no problem overall, please delete the desc field and run make codegen again. Then we can merge this PR. Thanks!

@neverCase There is no problem overall, please delete the desc field and run make codegen again. Then we can merge this PR. Thanks!

ok, one minute

@tokers
hi，i'm ready.

wait for CI


GW2 crashes at start due to shader compilation failure on Arch.

Describe the bug
Well, the title pretty much says it. Running via Steam with GE-Proton (Experimental doesent work either).
To Reproduce
Steps to reproduce the behavior:
Happens everytime on launch.
Screenshots

System configuration (please fill in):

OS: Arch Linux
GPU: rx580
Chainloading, arcdps -> GW2Radial

Please consult https://github.com/Friendly0Fire/GW2Radial/discussions/281 for help with this issue.

Same thing with Proton Experimental, which "used" to work fine. Guess some ARC update isnt playing nicely.
Cant test Lutris, since GW2 Steam accounts arent compatible with the standalone client.

Sorry, your initial post mentions chainloading?
That hasn't been supported for ages, are you on the latest version?

First of all, that protontricks fix worked for GE-Proton9-5, so hooray. Weird that experimental wont budge...
So, big thanks! And secondly, i use the UOAOM and am on whatever version they push, but i had no idea CL isnt a thing.
Pretty much all games i play are VERY picky about the order in whick you load addons or mods, good lesson in not jumping to conclusions.

Sounds good, glad to hear you got it fixed!


Remove extra argument from six.u function call

It looks like six.u only takes one argument but it was being called with two.
text = six.u(text, 'utf-8')

six.u(text)
>>> import six
>>> text = 'test_str'
>>> six.u(text)
'test_str'
>>> six.u(text, 'utf-8')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: u() takes 1 positional argument but 2 were given

Nice catch, thanks!


Invalid spirv from ark's CI server.

See: https://github.com/EmbarkStudios/ark/pull/3132
error: invalid data:0:0 - Reached non-composite type while indexes still remain to be traversed.
--
  | %2926 = OpCompositeExtract %float %in_pos 0
  |
  | \|
  | = note: spirv-val failed
  | = note: module "/var/buildkite/builds/target/spirv-unknown-unknown/release/deps/ark_shaders.spv"
  ```

Closing as no one AFAIR was able to reproduce this, and might have been an issue with the target folder.

This likely has to do with the fact that we don't support debug symbols.


Setup Kanban Board

This project consists of an app where you can schedule an appointment with a billionaire.
We are going to use two stand-alone apps:

Back-end: Rails API
Front-end: ReactJS/Redux

front-end repo: https://github.com/rachidelaid/billionaire-appointment-front-end
The team responsible for this project is made of four members:
@rachidelaid
@matovu-farid
@guerreiropedr0
@orozCoding

Hi @rachidelaid, @matovu-farid, @guerreiropedr0, @orozCoding,
Good job so far!
There are some issues that you still need to work on but you are almost there!
Suggested changes

[ ] Please put a screenshot of your Kanban board in this issue's description, just like it's mentioned in the requirements.

You can use as many of my suggestions as you want. If there is anything you would like to skip - feel free to do that. However, I strongly recommend you to take them into account as they can make your code better.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the issue thread if something is not 100% clear.
Please, do not open a new Issue for re-reviews. You should use the same Issue submitted for the first review, either valid or invalid unless it is requested otherwise.


[Python] Only auto re-subscribe after initial subscription

The subscription logic waits for the first successful subscription before the Read() call is being returned (the future is awaited which is only released on handleSubscriptionEstablished). If the first subscription attempt fails (e.g. because the CASE session doesn't establish) the Read() never returns, not with an error but also not with a subscription transaction. And since the Python side has no access to the SubscriptionTransaction object at this point yet, there is also no way to stop this subscription attempt.
With this change, we only resubscribe if the initial subscription was successful. This changes semantics slightly, but really allows the caller to decide if it wants to continue try to establish the subscription.

Stefan - if you have some time, would you mind adding that description into the function docstring around the autoResubscribe parameter?

Stefan - if you have some time, would you mind adding that description into the function docstring around the autoResubscribe parameter?

Yeah good point. I've created a new PR with some other missing parameters: https://github.com/project-chip/connectedhomeip/pull/34380.


Update external link to monitoring post

The original link redirects with a 308, but redirects to the same URL
This commit updates the URL to the accessible version of the post available on dev.to

📝 Docs preview for commit c0c248013bbab39b0727ab82f82af7e49d0bcd39 at: https://64a7982f1a1303294be99b8e--fastapi.netlify.app

It seems it's not redirecting now, maybe it was updated or maybe I'm missing something 🤔

Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs.

I guess so! If it's good now, we are good. As long as it works!


incompatible type for argument 4 of 'cvRectangle'

yolo2_light: 5e5f9408cc9033e9043b25b00277924afc91c01f
OpenCV: 3.4.3
Cuda: 9.2
cudnn: 7
gcc  -DOPENCV `pkg-config --cflags opencv`  -DGPU -I/usr/local/cuda/include/ -DCUDNN  -Wall -Wfatal-errors -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/yolov2_forward_network_quantized.c -o obj/yolov2_forward_network_quantized.o
./src/yolov2_forward_network_quantized.c: In function 'get_distribution':
./src/yolov2_forward_network_quantized.c:40:28: warning: unused variable 'max_val' [-Wunused-variable]
     float min_val = 10000, max_val = 0;
                            ^
./src/yolov2_forward_network_quantized.c:40:11: warning: unused variable 'min_val' [-Wunused-variable]
     float min_val = 10000, max_val = 0;
           ^
./src/yolov2_forward_network_quantized.c: In function 'draw_distribution':
./src/yolov2_forward_network_quantized.c:132:40: warning: implicit declaration of function 'CV_RGB' [-Wimplicit-function-declaration]
             cvRectangle(img, pt1, pt2, CV_RGB(128, 64, 32), CV_FILLED, 8, 0);
                                        ^
./src/yolov2_forward_network_quantized.c:132:40: error: incompatible type for argument 4 of 'cvRectangle'
compilation terminated due to -Wfatal-errors.
Makefile:103: recipe for target 'obj/yolov2_forward_network_quantized.o' failed
make: *** [obj/yolov2_forward_network_quantized.o] Error 1

I have to comment out quite a few lines from src/yolov2_forward_network_quantized.c to get it to compile. Basically everywhere CV_RGB is used. OpenCV appears to be dropping all C support, any thoughts about making this a C++ library instead? I've done a little wrapper and see you have added extern "C" { in a few of the headers already.
Edit: I'm aware you state OpenCV <= 3.3.0 in the readme, commenting out all the lines with CV_RGB allows you to compile for 3.4.3.

Easy for me to work around and assuming this isn't an issue for anyone else so I'll close it to clean up the list of outstanding issues.

@sberryman I added fix for compiling with OpenCV >= 3.4.0: https://github.com/AlexeyAB/yolo2_light/commit/1bc3ba78c45d0e7a17fa6f021f060bd4b7e23193#diff-4ddab5e6b8ac21eaed4f422abc8a0f09R94
Maybe it will work )


Spout Receiver flips the texture by default

Hello!
I found out that KlakSpout flips the texture internally by default somewhere in the KlakSpout.dll by both X and Y axes.
To reproduce, just launch a SpoutSender.exe demo and observe the texture getting flipped in the Unity project.
Could you please remove it? This doesn't seem to be required for every use case.
Thanks!

Which version are you using?
If I remember correctly, it's fixed in v2.0.0.

Thank you for a quick reply. My manifest.json says "jp.keijiro.klak.spout": "2.0.3"

Thanks for the clarification.
That issue doesn't reproduce on my side. Could you provide a minimal project that reproduces the issue on your side?

Yes sure, where should I send it to you?

Zip and attach it to a reply.
Exclude the Library folder when zipping it. Then you can make the file small enough, like <1MB.

Test.zip
Here you go, thank you!

I checked your setup and found that your "Plane" object is placed upside down.
Rotate it correctly, or simply use the Quad mesh.

I'm closing this issue. Please feel free to reopen it for further problems.


Fix createByteLength for protobuf6 objects.

Unlike longrunning we are calling encode on the message itself so we will not need to bind the method. Closing.


Ag grid boolean inference turned off for mixed type column

Pull Request Description
If one value in a column is a boolean ag-grid renders all values in the column as a checkbox when cellDataTypes is true. This becomes a problem when getting a row of mixed type, so in this situation cellDataType will be set to false.
Bug:

Fix:

Important Notes

Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:

[ ] The documentation has been updated, if necessary.
[ ] Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
[ ] All code follows the
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
[ ] Unit tests have been written where possible.

Looking at the recordings I'm wondering - in the visualization of the single row (both before and after) - why are the Columns reordered (Column 3 appears first etc)?


Make PresentationSession optional.

With PresentationSession now in the 'legacy' package it would be helpful if an application could just pass a KeyPair and PublicKey which can be used for mdoc session authentication.
Also remove EC Curve constants from Constants class since these are already available in KeystoreEngine interface
Test: All unit tests pass.
Test: Manually tested.

Had some spare time in today's ISO meeting so latest patch also includes docs for NfcEngagementHelper and QrEngagementHelper.


Add a Community Images page. #217

Resolves #217

Looks good. The Documentation header in the table seems a bit redundant. Can we change it to something else? Like Links or More details or something? Or we can change the link to README or something?

Looks good. The Documentation header in the table seems a bit redundant. Can we change it to something else? Like Links or More details or something? Or we can change the link to README or something?

Fair point; changed the link to README. Merge away, if this works for you, @q0rban !


Cache Brush creation under Direct2D

At the moment, brushes are created and disposed during drawing using the C# "using" pattern, don't know how Direct2D manages creation and dispose of Direct2D resource, would be good to cache brushes per render target and dispose all of them when target or Brush gets disposed.

Thanks for submitting this issue, I've been meaning to log it for a long time!
Yes, this definitely needs doing. There are a few techniques we could consider so I've been putting it off until we have a decent-size app with which to test.

Nope, I'll try to implement this and report pull request.

Ok, a few thoughts on this:

Brushes don't hold a reference to their platform-specific impl
Even if they did, it's not feasable to expect all brushes to be destroyed when they're no longer needed
The cache policy for different brushes will be different - i.e. we could use the same brush for all solid color brushes with the color #ff808080, the impl for VisualBrush will only be removed from the cache when the Visual is updated etc etc

FYI @ncarrillo is currently working on this, so I'd speak to him before starting anything if you've not already started.

I've been looking into using a MemoizingMRUCache from Splat in order to cache SolidColorBrush and potentially LinearGradientBrush.
An article on MemoizingMRUCache is here.


Implement co-axial rotors

I am opening this issue so we can discuss the implementation of co-axial rotors.
Discussion for this started on issue #245 , since it involves linking rotors together.
Some points regarding the implementation:

We will need to discuss the best command interface to the user regarding this. I was thinking on the following options:

Implement a new CoAxialRotor class that would inherit from Rotor. To create the co-axial rotor, the user would give the different rotors already assembled and the correspondent links.
Change the current Rotor class to receive more than one shaft. To implement this, we would need to have a way to differentiate the shafts (XLTRC2 has a ‘shaft’ number for that).

Right now I am leaning towards the first option. It looks like it will be easier to implement and we won’t need to change code that is already working.
As a reference, Friswell's example 6.6.1 uses a co-axial rotor.

I'm trying to work with a new class like you said. However, that's a lot of data to adjust to make things work. For example:
If I instantiate 2 rotors:
rotor1 = rotor_example1()
rotor2 = rotor_example2()
and I use both as input to CoAxialRotor, then, for at least one of these rotors I must modify the nodes, nodes_pos, dof_global_index and all the others attributes related to their nodes, including all DataFrames (df, df_shaft, df_disks, ...). And we'll need to modify the methods that calculate the rotor matrices.
On the other hand, changing the current Rotor class to receive more than one shaft would be simpler. We could adapt it to receive the shafts and the starting point position for each one. The links between them could be done through a BearingElement with a n_link. Thus, we wouldn't need to change the other methods, once everything else is calculated based on the geometry (nodes and nodes positions, ...).

I've managed to implement the coaxial rotor code modifying the Rotor class. Take a look at the class structure now:
class Rotor(object):
    r"""A rotor object.

    This class will create a rotor with the shaft,
    disk, bearing and seal elements provided.

    Parameters
    ----------
    axial_shaft : list
        List with the shaft elements (main shaft)
    disk_elements : list
        List with the disk elements
    bearing_seal_elements : list
        List with the bearing elements
    point_mass_elements: list
        List with the point mass elements
    coaxial_shaft : list
        List with the shaft elements of a co-axial shaft.
    shaft_start_pos : list
        List indicating the initial node position for each shaft.
        Default is zero for each shaft created.
    sparse : bool, optional
        If sparse, eigenvalues will be calculated with arpack.
        Default is True.
    n_eigen : int, optional
        Number of eigenvalues calculated by arpack.
        Default is 12.
    tag : str
        A tag for the rotor

    Returns
    -------
    A rotor object.

    Attributes
    ----------
    evalues : array
        Rotor's eigenvalues.
    evectors : array
        Rotor's eigenvectors.
    wn : array
        Rotor's natural frequencies in rad/s.
    wd : array
        Rotor's damped natural frequencies in rad/s.

    Examples
    --------
    >>> #  Rotor without damping with 2 shaft elements 1 disk and 2 bearings
    >>> import ross as rs
    >>> steel = rs.materials.steel
    >>> z = 0
    >>> le = 0.25
    >>> i_d = 0
    >>> o_d = 0.05
    >>> tim0 = rs.ShaftElement(le, i_d, o_d,
    ...                        material=steel,
    ...                        shear_effects=True,
    ...                        rotary_inertia=True,
    ...                        gyroscopic=True)
    >>> tim1 = rs.ShaftElement(le, i_d, o_d,
    ...                        material=steel,
    ...                        shear_effects=True,
    ...                        rotary_inertia=True,
    ...                        gyroscopic=True)
    >>> shaft_elm = [tim0, tim1]
    >>> disk0 = rs.DiskElement.from_geometry(1, steel, 0.07, 0.05, 0.28)
    >>> stf = 1e6
    >>> bearing0 = rs.BearingElement(0, kxx=stf, cxx=0)
    >>> bearing1 = rs.BearingElement(2, kxx=stf, cxx=0)
    >>> rotor = rs.Rotor(shaft_elm, [disk0], [bearing0, bearing1])
    >>> modal = rotor.run_modal(speed=0)
    >>> modal.wd[0] # doctest: +ELLIPSIS
    215.3707...
    """

    def __init__(
        self,
        axial_shaft,
        disk_elements=None,
        bearing_seal_elements=None,
        point_mass_elements=None,
        coaxial_shaft=None,
        shaft_start_pos=[0.0, 0.0],
        sparse=True,
        n_eigen=12,
        min_w=None,
        max_w=None,
        rated_w=None,
        tag=None,
    ):

I did for 2 shafts only. I don't know if there is a system with more co-axial shafts. Anyway, it can be adapted to more than 2 shafts if needed.
Basically, I've changed the __init__() to recognize 2 different shafts: an rotor.axial_shaft and a rotor.coaxial_shaft. There's no need to point out the nodes range. The only thing here is that the user must input the axis starting points (shaft_start_pos) to define the shafts' positions.
Here is an example:
def rotor_example():
    i_d = 0
    o_d = 0.05
    n = 10
    L = [0.25 for _ in range(n)]

    axial_shaft = [
        ShaftElement(
            l, i_d, o_d, material=steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
        )
        for l in L
    ]

    i_d = 0.15
    o_d = 0.20
    n = 6
    L = [0.25 for _ in range(n)]

    coaxial_shaft = [
        ShaftElement(
            l, i_d, o_d, material=steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
        )
        for l in L
    ]

    disk0 = DiskElement.from_geometry(
        n=1, material=steel, width=0.07, i_d=0.05, o_d=0.28
    )
    disk1 = DiskElement.from_geometry(
        n=9, material=steel, width=0.07, i_d=0.05, o_d=0.28
    )
    disk2 = DiskElement.from_geometry(
        n=13, material=steel, width=0.07, i_d=0.20, o_d=0.48
    )
    disk3 = DiskElement.from_geometry(
        n=15, material=steel, width=0.07, i_d=0.20, o_d=0.48
    )

    stfx = 1e6
    stfy = 0.8e6
    bearing0 = BearingElement(0, kxx=stfx, kyy=stfy, cxx=0)
    bearing1 = BearingElement(10, kxx=stfx, kyy=stfy, cxx=0)
    bearing2 = BearingElement(11, kxx=stfx, kyy=stfy, cxx=0)
    bearing3 = BearingElement(8, n_link=17, kxx=stfx, kyy=stfy, cxx=0)

    return Rotor(axial_shaft, [disk0, disk1, disk2, disk3], [bearing0, bearing1, bearing2, bearing3],
                 coaxial_shaft=coaxial_shaft, shaft_start_pos=[0.0, 0.5])

>>> rotor = rotor_example()
>>> show(rotor.plot_rotor())

Of course the representation of the bearing that connects the 2 shafts are not good. We have to think in another way to draw this specific bearing.
Another problem is the node numbers representation. We need to change how it's displayed to avoid overlapping.

I didn't open a PR for this yet because I found a bug while plotting co-axial rotors with bearings in the same axial position.
The bearings should be drawn at node 2 and 11 respectively. But the second bearing appears at the top of the first bearing, like they were linked.

The problem is solved. Now bearing icons are plotted respecting the diameters from both shafts they connect.
(generic example below)

Nice! When you have the tests + PR completed we can merge this.

@rodrigomoliveira1 , check if your code is working for the following example:
import ross as rs
from bokeh.plotting import show
steel = rs.materials.steel

def rotor_example():
    i_d = 0
    o_d = 0.05
    n = 6
    L = [0.25 for _ in range(n)]

    shaft_elem = [
        rs.ShaftElement(
            l, i_d, o_d, material=steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
        )
        for l in L
    ]

    disk0 = rs.DiskElement.from_geometry(
        n=2, material=steel, width=0.07, i_d=0.05, o_d=0.28
    )
    disk1 = rs.DiskElement.from_geometry(
        n=4, material=steel, width=0.07, i_d=0.05, o_d=0.28
    )

    stfx = 1e6
    stfy = 0.8e6
    bearing0 = rs.BearingElement(0, n_link=7, kxx=stfx, kyy=stfy, cxx=0, scale_factor=1)
    support0 = rs.BearingElement(7, kxx=stfx, kyy=stfy, cxx=0, tag="Support", scale_factor=1)
    bearing1 = rs.BearingElement(6, n_link=8, kxx=stfx, kyy=stfy, cxx=0, scale_factor=1)
    support1 = rs.BearingElement(8, kxx=stfx, kyy=stfy, cxx=0, tag="Support", scale_factor=1)

    point_mass0 = rs.PointMass(7, m=1.0)
    point_mass1 = rs.PointMass(8, m=1.0)

    return rs.Rotor(shaft_elem, [disk0, disk1], [bearing0, support0, support1, bearing1],
                 [point_mass0, point_mass1])

rotor = rotor_example()
show(rotor.plot_rotor())

For now I am getting the following plot:

It's odd. I tried the same code than you, but did a minor change:
import ross as rs
from bokeh.plotting import show
steel = rs.materials.steel

def rotor_example():
    i_d = 0
    o_d = 0.05
    n = 6
    L = [0.25 for _ in range(n)]

    shaft_elem = [
        rs.ShaftElement(
            l, i_d, o_d, material=steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
        )
        for l in L
    ]

    disk0 = rs.DiskElement.from_geometry(
        n=2, material=steel, width=0.07, i_d=0.05, o_d=0.28
    )
    disk1 = rs.DiskElement.from_geometry(
        n=4, material=steel, width=0.07, i_d=0.05, o_d=0.28
    )

    stfx = 1e6
    stfy = 0.8e6
    bearing0 = rs.BearingElement(0, n_link=7, kxx=stfx, kyy=stfy, cxx=0, scale_factor=1)
    support0 = rs.BearingElement(7, kxx=stfx, kyy=stfy, cxx=0, tag="Support", scale_factor=1)
    bearing1 = rs.BearingElement(6, n_link=8, kxx=stfx, kyy=stfy, cxx=0, scale_factor=1)
    support1 = rs.BearingElement(8, kxx=stfx, kyy=stfy, cxx=0, tag="Support", scale_factor=1)

    point_mass0 = rs.PointMass(7, m=1.0)
    point_mass1 = rs.PointMass(8, m=1.0)

    # here I did [bearing0, bearing1, support0, support1] instead of
    # [bearing0, support0, support1, bearing1]
    return rs.Rotor(shaft_elem, [disk0, disk1], [bearing0, bearing1, support0, support1],
                 [point_mass0, point_mass1])

rotor = rotor_example()
show(rotor.plot_rotor())

and got this:

I'm investigatig why the arguments position causes this issue

I've solved this problem.
I've just had to sort the bearing_seal_elements by the element node, just like it's done to shaft_elements
And while cycling through the bearing without z_pos, I replaced bearing_seal_elements by self.bearing_seal_elements
self.bearing_seal_elements = sorted(bearing_seal_elements, key=lambda el: el.n)

I'm just waiting PRs #432 and #433 to be merged and I upload the modifications. If I open anything new now, it's getting a conflict.

While it is still unviable to create a PR to add this class, I working on adapting the other methods to the CoAxialRotor.
I thought it would be simpler to do it. I'm trying to make it possible to plot a result for each shaft. But since the results are stored in simple lists, the data for each axis are mixed, which makes the visualization of the graphs confusing and the results presented wrong.
So, I decided to open a new column on the pd.DataFrame (df["shaft_number"]). It defines which shaft each element belongs to. However some BearingElements would belong to more the one shaft, due the connections between them, and this can be a little tricky to the DataFrame.
Look the example below:

For now df["shaft_number"] returns a Series of floats. (check the last column below)
>>> rotor.df[["type", "n_l", "n_link", "shaft_number"]]

              type   n_l  n_link  shaft_number
0     ShaftElement   0.0     NaN           0.0
1   BearingElement   0.0    18.0           0.0
2     ShaftElement   1.0     NaN           0.0
3      DiskElement   1.0     NaN           0.0
4     ShaftElement   2.0     NaN           0.0
5     ShaftElement   3.0     NaN           0.0
6     ShaftElement   4.0     NaN           0.0
7     ShaftElement   5.0     NaN           0.0
8     ShaftElement   6.0     NaN           0.0
9     ShaftElement   7.0     NaN           0.0
10  BearingElement   8.0    17.0           0.0
11    ShaftElement   8.0     NaN           0.0
12    ShaftElement   9.0     NaN           0.0
13     DiskElement   9.0     NaN           0.0
14  BearingElement  10.0     NaN           0.0
15  BearingElement  11.0    19.0           1.0
16    ShaftElement  11.0     NaN           1.0
17    ShaftElement  12.0     NaN           1.0
18    ShaftElement  13.0     NaN           1.0
19     DiskElement  13.0     NaN           1.0
20    ShaftElement  14.0     NaN           1.0
21     DiskElement  15.0     NaN           1.0
22    ShaftElement  15.0     NaN           1.0
23    ShaftElement  16.0     NaN           1.0
24  BearingElement  18.0     NaN           0.0
25  BearingElement  19.0     NaN           1.0
26       PointMass   NaN     NaN           0.0
27       PointMass   NaN     NaN           1.0

Notice that the BearingElement in the position 10 belongs to the shaft number 0 because BearingElement.n == 8 (node 8 belongs to the inner shaft). But it also should belong to the shaft number 1, because BearingElement.n_link == 17 (node 17 belongs to the outer shaft).
I tried making it a list, so in the index 10 of the DataFrame we would get this:
10  BearingElement   8.0    17.0           list(0.0, 1.0)
But this way, it's difficult to iterate over this column because we would have something like:
[0.0, ... , 0.0, list(0.0, 1.0), 1.0, ... , 1.0]
If you guys have any idea to overcome this situation, I'm open.

I thought of maybe having two different rotor objects within a coaxial rotor object, this way we could have all the methods that we already have for each rotor, and we would also need some code to link the rotor when needed (getting global matrices for example).

I thought of maybe having two different rotor objects within a coaxial rotor object, this way we could have all the methods that we already have for each rotor, and we would also need some code to link the rotor when needed (getting global matrices for example).

So, I'm thinking of the instances for the class.

a list of rotors
e.g: [rotor1, rotor2]

a list of nodes to connect the rotors
e.g: [[rotor1.nodes[2], rotor2.nodes[3]], [rotor1.nodes[5], rotor2.nodes[6]]]

a list to indicating the initial position of each rotor
e.g: [0.0, 0.5]

Maybe, we have to renumerate the nodes, for following rotors, to build the global matrices and set the DoF's in the right location.
class CoAxialRotor(Rotor):
    r"""A co-axial rotor object.

    This class will create a system of co-axial rotors with a system of rotors provided.

    Parameters
    ----------
    rotors: list
        List of rotors
    nodes_connection: list
        List indicating the rotor nodes to be connected
    shaft_start_pos : list
        List indicating the initial node position for each rotor.
    tag : str
        A tag for the co-axial rotor
    """

    def __init__(
        self,
        rotors,
        nodes_connection,
        shaft_start_pos,
        tag=None,
    ):

class CoAxialRotor(Rotor):
…
    nodes_connection: list
        List indicating the rotor nodes to be connected
    shaft_start_pos : list
        List indicating the initial node position for each rotor.
…

Are these two parameters needed? If the user is providing bearings with their corresponding links, these would already have the “nodes_connection” and from that I think we could also get the “shaft_start_pos” (although it might be complicated to do it). Here the user would have to provide shaft lists with nodes already defined.

Actually, I just removed shaft_start_pos. I was trying to do like you said before but wasn't successful. But I did it now.
It'll work better for a single connection. For multiple connections the user has to make sure the nodal positions match (just by plotting it's possible to check), or the code will place the coaxial rotor based on the bearing with the greatest n value

If the user is providing bearings with their corresponding links, these would already have the “nodes_connection”

I agree, but for multiple connections (e.g. 2 rotors with 2 n_link each), maybe the code would need more information. Or we could assume an increasing order (based on bearing.n) to link the rotors.

I would go with the option two for the coaxial object.
If the user wants a separated plot for each rotor he should be able to get that by accessing each rotor. Something like:
results = coaxial_rotor.rotors[0].run_static()

@raphaeltimbo, I've thinking of what you said in the Issue #443, and I don't think it's going to work.
Running a simulation for each rotor separately would result in loss of information, because the rotors would no longer be coupled. Besides, a single rotor would have mismatched matrices shapes due the bearing.n_link (.K() would return a matrix larger than .M())
In my opinion, we could instantiate the CoAxialRotor class with rotors object, but without the option to run them individually


Generate a Doxygen TAG file

From #24.

What do you mean with TAG, to handle the project version?

What do you mean with TAG, to handle the project version?

cc @traversaro

See the Doxytag docs for more info. Basically are useful to ensure cross-projects links in Doxygen documentation.

I remember now that we discussed on this super cool feature long time ago. Since all our documentation is based on doxygen it would be great having a simple example running.

Do we have some sample code about this?

See usage of YARP_DOXYGEN_TAGFILE and DOX_GENERATE_TAGFILE in https://github.com/robotology/yarp/blob/master/cmake/YarpDoc.cmake#L43 .

Not sure if they do something similar in ignition-cmake, but I just saw that they have this supercool file that I guess make sure that std doxygen objects are linked to cppreference.com : https://bitbucket.org/ignitionrobotics/ign-cmake/src/default/doc/doxygen/cppreference.tag.xml .

See also https://en.cppreference.com/w/Cppreference:Archives#Doxygen_tag_file .

Well, there is some work here to do. I reckon if we can make a standard template project for this it will be really super useful!

Relevant ign-cmake PR: https://bitbucket.org/ignitionrobotics/ign-cmake/pull-requests/65/doxygen-macro-for-downstream-packages-30/diff .


Repository URL not appearing because "git@" or "http(s)" is hardcoded in matching logic

If the repository URL isn't formatted to a very hardcoded format, the "View repository" button won't appear.
The issue is around here in utils.ts:

		const matched =
			/^(?:git@|https?:\/\/)(?<provider>[a-zA-Z_.~-]+\.[a-z]{2,})(?::|\/)(?<user>.*?)\/(?<repo>.*)$/.exec(
				remoteUrl.stdout.trim()
			);

It is not always applicable that the SSH user is git, or that the SSH user is specified in the URL on the machine. Namely, you can configure in your SSH config:
Host mygithost.com
   HostName mygithost.com
   User gitolite
   Port 4022

and then use mygithost.com:user/repo (or /repo.git) in the config of the local repository.
It is still highly likely that http://mygithost.com/user/repo is still valid in this context and leads to the repository.
Alternatively, a config option (on a per-repo level) where you could specify which URL to open, side-stepping the entire problem.

Fixed. https://github.com/LeonardSSH/coc-discord-rpc/commit/983ed00a785df7f44d91f7d72efb91d2499a7e0f
Please update the extension and let me know if the problem is solved.

Not fixed yet.
I've updated to<EMAIL_ADDRESS>The button now appears! However, for some reason, it does not react to clicks, as if no action was attached to it.
Inside Discord, the DOM is the following:
<button
  type="button"
  class="button-2IFFQ4
    button-38aScr
    lookFilled-1Gx00P
    colorGrey-2DXtkV
    buttonSize-AQY2mE
    grow-q77ONN"
  >
    <div class="contents-18-Yxp">
        View Repository
    </div>
</button>

In 983ed00a785df7f44d91f7d72efb91d2499a7e0f you are replacing git@ which is not necessarily part of the remote URL set in Git. It is not mandated that the remote SSH username must be git on the remote server — e.g. when the server uses Gitolite, it is more often than not gitolite in a standard installation. Similarly, gerrit for Gerrit.
That's why you usually use the User variable in ~/.ssh/config. You give a hostname (any hostname, but conventionally the actual hostname) which SSH connections (including Git remote URL specifiers) can use, but everything else, like the remote username, the port used (which might not be the standard 22 port!), the key to use for authentication, port forwards, etc., is configured in the config file for your account.
I think the issue is because the URL set in the RPC call isn't a website, but a bare protocol-less URI. In the debugger view, the following appears in the log:
[RPCServer:IPC] Socket Message: 13
{
  "cmd": "SET_ACTIVITY",
  "data": {
    "application_id": "768090036633206815",
    "assets": {
      "large_image": "811014712325439508",
      "large_text": "Editing a CPP file",
      "small_image": "799113198741094442",
      "small_text": "NeoVim v0.6.0"
    },
    "buttons": ["View Repository"],
    "details": "In Dummy - 0 problems found",
    "metadata": {
      "button_urls": ["github.com:username/project"],
      "__proto__": Object
    },
    "name": "NeoVim",
    "state": "Viewing dummy.cpp",
    "type": 0,
    "__proto__": Object,
    },
  "evt": null,
  "nonce": "0123457-abcd-abcd-abcd-0123456789abc",
  "__proto__": Object,
}

The URL sent to Discord at data.metadata.button_urls[0] should be http://github.com/username/project.

I've updated to<EMAIL_ADDRESS>The button now appears! However, for some reason, it does not react to clicks, as if no action was attached to it.

See https://github.com/LeonardSSH/vscord/issues/20#issuecomment-901091316

The URL sent to Discord at data.metadata.button_urls[0] should be http://github.com/username/project

What I send to discord, is the proper link, I don't know why discord doesn't set it properly.

You are getting an https:// from somewhere and sending it. That's different from what I can see. For me, the : separator after the hostname remains in the URL that appears...
What is your git config --get remote.origin.url? Because based on the logic I can see in the source code, I don't see what or where the proper http:// is getting applied.
For me, git config --get remote.origin.url is the following: github.com:username/project.git. There is no git@! There is no ssh://! Your code in the fix begins with:
if (remoteUrl.stdout.startsWith('git@') || remoteUrl.stdout.startsWith('ssh://')) {

This is FALSE and the branch is not taken in case of the remoteURL is set up in a way that is set up for me, and how it is explained in the original ticket.

I'm not knowledgeable much about TypeScript and don't have the appropriate execution environment, but I've rewritten the code in the proposed fix to Python for ease of debugging:
import re

def rewrite(url):
    if url.startswith("ssh://") or url.startswith("git@"):
        url = url.replace("ssh://", "") \
            .replace(":", "/") \
            .replace("git@", "https://") \
            .replace(".git", "") \
            .replace("\n", "")
        return url
    else:
        regexp = re.compile(r"(https:\/\/)([^@]*)@(.*?$)")
        url = re.sub(regexp, r"\1\3", url) \
            .replace(".git", "") \
            .replace("\n", "")
        return url

Now, running the following test code:
print(rewrite("http://github.com/foo/bar.git"))
print(rewrite("http://github.com/foo/bar"))
print(rewrite("git@github.com:foo/bar.git"))
print(rewrite("git@github.com:foo/bar"))
print(rewrite("github.com:foo/bar.git"))
print(rewrite("github.com:foo/bar"))

When running, I get
http://github.com/foo/bar
http://github.com/foo/bar
https://github.com/foo/bar
https://github.com/foo/bar
github.com:foo/bar
github.com:foo/bar

instead of the last two lines being http://github.com/foo/bar.

I've found this library, written in pure JavaScript: https://github.com/IonicaBizau/git-url-parse. Perhaps you could use this to parse all the components of the remote URL in a portable way, and use the resulting struct to build the URL sent to Discord.

See what I can do. Thanks mate.

You can add me on discord Leonard#6666? I want to discuss in more detail about this.

I tested the library you showed me, and it really works.
Input:
JSON.stringify({
    1: gitUrlParse('http://github.com/foo/bar.git').toString('https').replace('.git', ''),
    2: gitUrlParse('http://github.com/foo/bar').toString('https'),
    3: gitUrlParse('git@github.com:foo/bar.git').toString('https').replace('.git', ''),
    4: gitUrlParse('git@github.com:foo/bar').toString('https'),
    5: gitUrlParse('github.com:foo/bar.git').toString('https').replace('.git', ''),
    6: gitUrlParse('github.com:foo/bar').toString('https')
}, null, 4);

Output:
{
    "1": "https://github.com/foo/bar",
    "2": "https://github.com/foo/bar",
    "3": "https://github.com/foo/bar",
    "4": "https://github.com/foo/bar",
    "5": "https://github.com/foo/bar",
    "6": "https://github.com/foo/bar"
}

I think I'll replace it with what I hardcoded.

But the button still cannot be clicked by yourself. I logged in from another discord account, and I can click the button on my profile.
¯\_(ツ)_/¯

https://user-images.githubusercontent.com/35312043/130327617-dad278a8-76b1-443d-ae9c-687af1fbfa3d.mp4

Alright, that I understand (it's weird and very well could be a Discord bug), but that does not change the fact that the fix shown is not a fix, because it does not rewrite the URLs correctly. If git@ or ssh:// isn't in the URL, it's handled in the exact same broken way as before.

🙄


No permission handler detected when using Expo SDK 44

Bug summary
Thanks for the great library!
I have a react native app created using react-native CLI and have been successfully using this library in the past months. I'm also using Expo in my app (bare workflow). Everything's been working fine up until Expo released SDK 44. In this version of the SDK, they enforce the #import <React/*.h> import style for the React header imports. See this discussion for more information. There's a proposed workaround for libraries that haven't been updated yet for compatibility with Expo SDK 44. However, when I try to apply the said workaround, after launching my app in the console I get the error that the permission handler's haven't been set up, even though I have them properly set up as per the instructions. Could this have anything to do with the changes introduced in SDK 44?
Library version
3.2.0
Environment info
info Fetching system and libraries information...
System:
    OS: macOS 12.1
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 1.39 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.2.0 - /usr/local/bin/node
    Yarn: 3.1.0 - ~/.yarn/bin/yarn
    npm: 8.1.4 - /usr/local/bin/npm
    Watchman: 2<IP_ADDRESS> - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7784292
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: 15.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: ^0.64.3 => 0.64.3
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Create a react native project
Add Expo to the project and set up Expo modules (SDK 44)
Add a permission handler using this library
Apply the proposed workaround.
The "No permission handler detected" error should pop up when running the debug build

Reproducible sample code
See above, steps to reproduce

@fobos531 This library doesn't support Expo, use their Permissions module instead: https://docs.expo.dev/guides/permissions/

@fobos531 Did you find any solution or opt in for Expo permissions?

@Yandamuri It depends on which permission you need - most Expo packages nowadays include mechanisms to check/request permissions out of the box

Just a note that you can use this library with expo eas
"eas-build-post-install": "npx react-native setup-ios-permissions && npx pod-install"
does the trick :)

@tomeq93 BTW, Did you mean managed workflow or bare work flow?

@Yandamuri managed

Hey everyone,
In the updated version of react-native-permissions they have removed setup-ios-permissions. The process now involves executing a .sh script that contains the necessary commands to modify the files specified in the RNPermissions documentation. Here's how my eas-build-post-install command is configured in my package.json:
"eas-build-post-install":"sh ./prep-RNPermissions.sh"

I've placed a file named prep-RNPermissions.sh in the same directory as my package.json. Here are the commands contained within that script:
cd ios && perl -pi -e 's|(native_modules"\))|$1\n  require_relative '\''../node_modules/react-native-permissions/scripts/setup'\''|g' Podfile && perl -pi -e 's|(prepare_react_native_project!)|$1\n  setup_permissions([ '\''Bluetooth'\'',])|g' Podfile
cat Podfile
pod install
cd *folder name similar to your app's name*
perl -i -pe 's|(<string>SplashScreen</string>)|$1\n\t\t<key>NSBluetoothAlwaysUsageDescription</key><string>YOUR TEXT</string>\n\t\t<key>NSBluetoothPeripheralUsageDescription</key><string>YOUR TEXT</string>|g' Info.plist
cat Info.plist

@ismith98 There's an expo plugin since 4.1.0


grpc.FutureTimeoutError()

Hi @akarneliuk ,
This could quite possibly be me doing something wrong as I am new to gNMI configuration. Nevertheless, I get the following error upon trying a basic get request using pygnmi. Here are some of my details.
`Target: Nokia SR Linux which supports gNMI.
local host :
(gnmi) [root@grpc gnmi]# python3 --version
Python 3.6.8
(gnmi) [root@grpc gnmi]# python3 -m pip list
Package                  Version

cachetools               4.2.1
certifi                  2020.12.5
chardet                  4.0.0
google                   3.0.0
google-api-core          1.26.2
google-api-python-client 2.0.2
google-auth              1.28.0
google-auth-httplib2     0.1.0
googleapis-common-protos 1.53.0
grpcio                   1.36.1
grpcio-tools             1.36.1
httplib2                 0.19.0
idna                     2.10
packaging                20.9
pip                      21.0.1
protobuf                 3.15.6
pyasn1                   0.4.8
pyasn1-modules           0.2.8
pygnmi                   0.4.5
pyparsing                2.4.7
pytz                     2021.1
requests                 2.25.1
rsa                      4.7.2
setuptools               54.1.2
six                      1.15.0
soupsieve                2.2.1
uritemplate              3.0.1
urllib3                  1.26.4
wheel                    0.36.2`
The error is as follows:-
`(gnmi) [root@grpc gnmi]# python3
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.

from pygnmi.client import gNMIclient
host = ('<IP_ADDRESS>', '57400')
with gNMIclient(target=host, username='admin', password='admin', insecure=True) as gc:
...     result = gc.get(path=['interface'])
...
Traceback (most recent call last):
File "", line 1, in
File "/root/gnmi/lib/python3.6/site-packages/pygnmi/client.py", line 51, in enter
grpc.channel_ready_future(self.__channel).result(timeout=self.__gnmi_timeout)
File "/root/gnmi/lib64/python3.6/site-packages/grpc/_utilities.py", line 140, in result
self._block(timeout)
File "/root/gnmi/lib64/python3.6/site-packages/grpc/_utilities.py", line 86, in _block
raise grpc.FutureTimeoutError()
grpc.FutureTimeoutError`

I can hit the same target using the openconfig gnmi_get cli which is written in go.

Hello @baijuw,
the grpc.FutureTimeoutError means that the host doesn't respond or respond in the suitable format. The implementation of grpc libraries in Go and in Python are different, but before to figure that out, could you please share the configuration from SR Linux related to the gNMI (e.g., where you enable that)?
Thanks,
Anton

Hello @baijuw,
the grpc.FutureTimeoutError means that the host doesn't respond or respond in the suitable format. The implementation of grpc libraries in Go and in Python are different, but before to figure that out, could you please share the configuration from SR Linux related to the gNMI (e.g., where you enable that)?
Thanks,
Anton

Here is the configuration for GNMI:-
info from state system gnmi-server
system {
    gnmi-server {
        admin-state enable
        timeout 7200
        rate-limit 60
        session-limit 20
        commit-confirmed-timeout 0
        include-defaults-in-config-only-responses false
        network-instance mgmt {
            admin-state enable
            oper-state up
            use-authentication true
            port 57400
            tls-profile gnmi
            source-address [
                ::
            ]
        }
        unix-socket {
            admin-state disable
            oper-state down
            use-authentication true
            socket-path ""
        }
    }
}

Hello @baijuw,
the grpc.FutureTimeoutError means that the host doesn't respond or respond in the suitable format. The implementation of grpc libraries in Go and in Python are different, but before to figure that out, could you please share the configuration from SR Linux related to the gNMI (e.g., where you enable that)?
Thanks,
Anton

Here is the configuration for GNMI:-
leaf# info from state system gnmi-server
    system {
        gnmi-server {
            admin-state enable
            timeout 7200
            rate-limit 60
            session-limit 20
            commit-confirmed-timeout 0
            include-defaults-in-config-only-responses false
            network-instance mgmt {
                admin-state enable
                oper-state up
                use-authentication true
                port 57400
                tls-profile gnmi
                source-address [
                    ::
                ]
            }
            unix-socket {
                admin-state disable
                oper-state down
                use-authentication true
                socket-path ""
            }
        }
    }

Right, could show please tls-profile gnmi?

Hi @akarneliuk ,
You could close this for now. SRL does not offer insecure connection as of now. Thanks for your help.
Regards
Baiju


[Question]  Inquiry about Model Weight Sharding for Handling Large Models on Limited Memory Systems

Required prerequisites

[X] I have read the documentation https://safe-rlhf.readthedocs.io.
[X] I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
[X] Consider asking first in a Discussion.

Questions
Hello,
I am currently encountering an issue with loading trained models on a machine with limited memory (16GB). The current training code saves weights in a non-sharded format, which leads to memory errors when loading the model on the mentioned system. To address this, I attempted manual sharding with the following code:
`model_name = "/home/local_model_weights/xx"
save_folder = "/home/local_model_weights/xx-sharded"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map='auto', torch_dtype='auto')
print("Model loaded!")

tokenizer.save_pretrained(save_directory=save_folder)
model.save_pretrained(save_directory=save_folder, max_shard_size="7GB", safe_serialization=False)

print("Model Sharded and Saved!")`

. However, this approach results in errors after loading the sharded weights:

next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
RuntimeError: probability tensor contains either inf, nan or element < 0

Could you please advise on how to save model weights in a sharded format? Will there be an option in upcoming versions to save weights with sharding enabled, or could you suggest the correct method to shard weights for an already trained model?
Thank you for your time!
Checklist

[X] I have made every effort to write this issue in English, including all comments, the title, and the description.
[X] I have provided all relevant and necessary information above.
[X] I have chosen a suitable title for this issue.

Hi @jc-ryan! We've tried to replicate your issue, but everything seems to be working fine.

It might be helpful if you could provide us with some more details.


KAFKA-17801: RemoteLogManager may compute inaccurate upperBoundOffset for aborted txns

This is a cherry-pick of 324a74d4fd179614df648009fc294dfbf225c775 commit
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

@kamalcph : Thanks for the PR. The code LGTM. Are the test failures related?

Test failures are unrelated. There were 1 flaky TransactionsWithTieredStoreTest, ensured that it passes locally:
Gradle Test Run :storage:test > Gradle Test Executor 1 > TransactionsWithTieredStoreTest > testInitTransactionsTimeout(String) > "testInitTransactionsTimeout(String).quorum=zk" PASSED
Gradle Test Run :storage:test > Gradle Test Executor 1 > TransactionsWithTieredStoreTest > testInitTransactionsTimeout(String) > "testInitTransactionsTimeout(String).quorum=kraft" PASSED
Gradle Test Run :storage:test > Gradle Test Executor 1 > TransactionsWithTieredStoreTest > testInitTransactionsTimeout(String) > "testInitTransactionsTimeout(String).quorum=kraft+kip848" PASSED


@vue/compat and VTU 2.0 incompatilibity

Problem:
When trying to port an application from Vue 2 to Vue 3.1 compat VTU throws errors.
Example:
With the following package.json:
{
  "name": "vue31vtu",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "test:unit": "vue-cli-service test:unit",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "@vue/compat": "^3.1.0",
    "core-js": "^3.6.5",
    "vue": "^3.1.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-plugin-unit-jest": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.1.0",
    "@vue/test-utils": "^2.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0",
    "typescript": "~3.9.3",
    "vue-jest": "^5.0.0-0"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/vue3-essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "babel-eslint"
    },
    "rules": {},
    "overrides": [
      {
        "files": [
          "**/__tests__/*.{j,t}s?(x)",
          "**/tests/unit/**/*.spec.{j,t}s?(x)"
        ],
        "env": {
          "jest": true
        }
      }
    ]
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}

Consider the following component:
export default {
    props: {
        chevron: { type: Boolean, default: false }
    },
    render (h) {
        const icon = this.chevron
            ? h('BaseIcon', {
                props: {
                    color: 'text-grey-900',
                    icon: 'fas fa-chevron-right'
                },
                class: ['ml-2']
            })
            : null

        return h(
            'a',
            {
                class: [
                    'hover:text-orange-700 font-bold cursor-pointer text-teal-600',
                    { 'flex items-center': this.chevron },
                    this.$options.class
                ],
                on: this.$listeners,
                attrs: this.$attrs
            },
            [this.$slots.default, icon]
        )
    }
}

When serving the application with Vue 3 compat enabled, Vue will render the component correctly and issue a warning:
[Vue warn]: (deprecation RENDER_FUNCTION) Vue 3's render function API has changed. You can opt-in to the new API with:

  configureCompat({ RENDER_FUNCTION: false })

When trying to run the related unit tests for this component we get errors:

A similar problem occurs when porting components using v-model, where VTU will fail because it is expecting update:modelValue instead of input even though the component is not yet set for that compat configuration yet.
Expected behavior:
VTU should use the vue/compat build and not issue an error, but a console warning.
I havent' seen any particular documentation on how to tell VTU 2.0 to use a specific build of Vue.
In the migration docs a webpack config aliasing vue to @vue/compat is suggested as so:
config.resolve.alias.set('vue', '@vue/compat')

    config.module
      .rule('vue')
      .use('vue-loader')
      .tap(options => {
        return {
          ...options,
          compilerOptions: {
            compatConfig: {
              MODE: 2
            }
          }
        }
      })

If we could have a way to alias the vue package that VTU is using this may clear up the issue.
Any suggestions?

Hi Marina!
I have not tried this yet, but @xanf has been doing a ton of work around VTU and Vue compat - most of which was merged in the last few days and has not been released. Here is a list of the recent PRs.
I am going to do a release in the next hour or so, maybe some of these fixes will help. Also @xanf might have some ideas, I heard he is working on a small project with VTU + Vue 3 + compat build.

@lmiller1990 the project size quickly goes out of control
What I've actually done - I've written a pretty thin "compat" layer which serves as a bridge for making VTU 1.x code to work in VTU2
@lmiller1990, WDYT of introducing compat flags similar to Vue to @vue/test-utils
Something like
import { configureCompat } from '@vue/test-utils'

configureCompat({
  DESTROY_INSTANCE: true, // support calling wrapper.$destroy()
  FIND_ALL_WRAPPERS: true, // return wrapper instead of array of instances
...
})

with each compat documented in VTU. This will greatly help people in Vue2 -> Vue3 migration because while Vue3 now has a compat build, VTU silently forcing to rewrite all tests in one time (neither VTU1 works with compat build obviously, nor VTU2 works with VTU1 tests codebase)

We could, my only concern is complexity - right now master is broken for some use cases for shallowMount and <script setup>, and I'm not sure why - adding another layer could make things really difficult to maintain, since we have a huge number of combinations of flags to test.
I personally haven't got any large Vue 2 apps I am upgrading, so I don't have a lot of context on the difficult of migrating - you'd definitely have a better perspective than me.
I wonder if it would make more sense to back-port some of the new API/changes to VTU v1, instead of re-implementing them here? A
lternatively, just asking people to update their code for simple cases (like the changes to find) might not be the worst - they likely have more resources to work on their app than we do to work on Test Utils (only a handful of unpaid volunteers).

For example, things like the wrapper.find API changes are pretty easy to do by hand - my main concern is around some of the more complex ones, that are difficult to understand unless you know Vue extremely well.
If you want have some ideas @xanf happy to consider! A huge code-base like GitLab will probably have the strongest use case for this kind of feature. I don't have enough perspective on the breaking changes (all the apps I work on are either staying Vue 2 - no benefit to update - or new Vue 2 apps).

@marina-mosti can you try the latest version (rc.10) https://github.com/vuejs/vue-test-utils-next/releases/tag/v2.0.0-rc.10.
It might work better for you - lots of fixes around compat in this release.

Hey @lmiller1990 @xanf thanks, ill check out the PRs and try the build

Hey @lmiller1990 sad to report its still broken :(
I've uploaded the code to this repo for easier repro on your end: https://github.com/marina-mosti/vtu-compat-tests
The test is still breaking with the same error:
TypeError: h is not a function

Additionally, I've found a new problem with the compat build with stubs. (or at least with VTU 2 not sure if its compat related).
When I stub out a component and try to findAllComponents(stub) like this:
const linkStub = {
  template: '<a/>'
}

describe('HelloWorld.vue', () => {
  it('renders props.msg when passed', () => {
    const msg = 'new message'
    const wrapper = shallowMount(HelloWorld, {
      props: { msg },
      global: {
        stubs: {
          BaseLink: linkStub
        }
      }
    })

    const links = wrapper.findAllComponents(linkStub)
    expect(links).toHaveLength(1)
  })
})

VTU can not find any. If I add a name property to the linkStub:
const linkStub = {
  template: '<a/>',
  name: 'LinkStub'
}

Then it works, I'm guessing because something is checking for a name to exist and then identifying it as an actual component. Its not a problem, but I don't think/havent found this documented anywhere if is working as intended.
This bug is also on the repo above if you want to check it out just remove the name

@marina-mosti you need to add to your jest.config.js
moduleNameMapper: { '^vue$': '@vue/compat', }
to tell your test-environment about compat build
Regarding findAllComponents - IMO it is worth separate issue. Frankly speaking I find it a bit... wrong... finding stub instead of stubbed component (findAllComponents(BaseLink) should work), but this is point of separate discussion

Thanks @xanf 👍🏻 that clarifies. I'll open a new issue then for the other

If you found a bug, you should definitely open an issue, thanks @marina-mosti!
I'll reply in that issue if/when you open it. 👍
In general stubs are probably the mosts complex part of VTU. I am sure there are going to be some slight breaking changes between v1 and v2, but we should definitely match the old behavior as much as possible. If something worked in VTU v1, ideally it should work here, too.


How to exclude test classifier deps

I would have thought that this would have done it, but does not:
mvn com.github.ferstl:depgraph-maven-plugin:aggregate -Dincludes="com.mycompany:*:*:compile"

I can't see a close example in the wiki :-(

You could try -Dscope=compile. You can find a detailed description of this option in the plugin documentation.
The includes and excludes options do only work for dependencies where you have an explicit test classifier, e.g.
<dependency>
  <groupId>com.mycompany</groupId>
  <artifactId>my-test-dependency</artifactId>
  <classifier>tests</classifier>
</dependeny>

HTH

Thanks - that makes sense, sorry for over focussing on whether includes could do it.


HTTP2 FlowControl Window depleted

Given several minutes streaming data to a client, Helidon 4.x Http2 Outbound Flow Control always ends up with a negative remainingWindowSize and the thread will remain trapped in an infinite loop waiting for WINDOW_UPDATEs from the client
This happens on an outbound grpc stream, for easy replication we modified one of your examples for a gRPC WebServer with the following changes.

The Split stream will stream the first word indefinitively.
We commented out the test for such method, since we changed the behaviour of the method to showcase the bug.

You can see the full source code here --> https://github.com/AlfredoG87/helidon-examples/tree/helidon-4.x/examples/webserver/grpc
Environment Details

Helidon Version: 4.1.4
Helidon SE
JDK version: 21
OS: MacOs

Problem Description
The WebServer (gRPC) stops streaming after a short amount of time.
Does not appears to happen always in the same way, sometimes it takes longer to happen, but does always happens, only precondition is for outbound stream messages to be large and sustained.
You can see a video showing how the window size becomes negative, never recovers and the server stops streaming on the attached video.
https://github.com/user-attachments/assets/3afd9493-d9ce-4515-acfc-9f1d1be5395f

Steps to reproduce
Fork the following project: https://github.com/AlfredoG87/helidon-examples/tree/helidon-4.x/examples/webserver/grpc
Or apply the following commit or changes to your own copy of helidon-examples repo.
Run application, consume Split method with at least 2 words as input, the first one a large amount of lenght.

Hi, @AlfredoG87, can you please share what client you have used for the step:
consume Split method with at least 2 words as input, the first one a large amount of lenght. ?

Hi, @AlfredoG87, can you please share what client you have used for the step: consume Split method with at least 2 words as input, the first one a large amount of lenght. ?

In the video shared you can see I used Postman however we have also encountered this issue with grpcurl and netty shade

Sorry I can't download the video

Sorry I can't download the video

np, let me know if you know any more info. should be really straight forward to replicate. do you want me to convert the video to a gif or something else?

I can reproduce it now with postman, thx for the video. Good news is that it is already fixed by #9520 (splitting large frames) issue. Bad news is it is not released yet.

Sorry I can't download the video

np, let me know if you know any more info. should be really straight forward to replicate. do you want me to convert the video to a gif or something else?

ohh no worries, just knowing that is already fixed is great news!! 💯
just to plan accordingly, do you have an approximate ETA of when we can see that fix released?
Lastly, want me to close the issue?

Keep it open, I have added it to 4.2.0 milestone, and we will consult internally if we can release 4.1.x bugfix earlier

Any chance you could try out the fix from a snapshot build?

Yes, I can, can you provide the link to the snapshot build? please

I don't think we have such snapshot build(4.2.0-SNAPSHOT), but it should be easy to build with JDK21+
cd /tmp && git clone git@github.com:helidon-io/helidon.git && cd helidon && mvn install -DskipTests

I don't think we have such snapshot build(4.2.0-SNAPSHOT), but it should be easy to build with JDK21+

Perfect, I can manage that!

Hi @danielkec, I've been working with @AlfredoG87 to troubleshoot this issue on our side. I was able to confirm the inbound fixes in 4.2.0-SNAPSHOT with our server implementation. Thanks for pointing us to that PR and for all the changes. This helps unblock our project. :) We're eagerly awaiting 4.2.0!

@danielkec Thank you for your help!! 💯

@m0mus just one question, has this already been release? 4.1.5 or when is it scheduled to be released in 4.1.6?

Hi, sorry for not notifying you earlier. It will be part of 4.1.6 possibly tomorrow

No problem, I just asked since saw it was closed! 👍
TYVM


[ruyi-reimu] Board image buildroot-sdk-milkv-duo need update

Description

In upstream repo milkv-duo/duo-buildroot-sdk, the latest version is Duo-V1.1.1

Need update https://github.com/milkv-duo/duo-buildroot-sdk/releases/tag/Duo-V1.1.1


Update all mentions of Gitter to point to new community Slack instance

Currently on pages like Troubleshoot query behavior, we link to the old Gitter chat room.  We should update all such links to point to the new community Slack instance.

I no longer see a Gitter link on the Troubleshoot page so closing this


upload: Replace deprecated PIL.PngImagePlugin.APNG_DISPOSE_OP_NONE

https://pillow.readthedocs.io/en/stable/deprecations.html#constants
I also submitted python/typeshed#9698 for the missing stubs.

Nice, merged, thanks @andersk!


calibrateRobotWorldHandEye method did not found in opencvsharp4.5

Summary of your issue

Environment
netframework472,netcore31
What did you do when you faced the problem?
I have a question : in opencv4.5 a feature  calibrateRobotWorldHandEye was added in calib3d mudule,but I did'nt found this in opencvsharp4.5

Thank you. It was added by #1127


Pass cwd to jobstart

When a maker has a cwd argument, we can pass that to jobstart with Neovim directly.
This is not yet possible in Vim: https://github.com/vim/vim/issues/1024.
Should be done after https://github.com/neomake/neomake/pull/575 to avoid conflicts.

It gets handled better by now, closing.
IIRC passing in cwd would be the same as cding manually before/after (what we're doing now).

@blueyed cd will change the current dir of vim, I think it does not good enough.

@wsdjeg
We're cd'ing back of course.
Do you mean something else?


Zod generate big files

What are the steps to reproduce this issue?

have big API documentation
run zod output to generate schema
files generated bigger than 1MB

What happens?
Running lint and project performance decrease
What were you expecting to happen?
Use zod objects for relation data
Any logs, error output, etc?
/src/api/schemas/xyz.ts lint ━━━━━━━━━━

  × Size of src/api/schemas/xyz.ts is 1.2 MiB which exceeds configured maximum of 1.0 MiB for this project.
    The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
    Use the `files.maxSize` configuration to change the maximum size of files processed.

Any other comments?
Add ability to exclude some type of generations
for example I don't need to generate zod validation for responses
What versions are you using?

What versions are you using?

 They are generated code so they really don't need to be linted do they?

Can you just ignore these files in your lint setup? They are generated code so they really don't need to be linted do they?

Actually, the main problem is performance issues, files are so big

Understood


fixed typos in doc

Related Issues
fixes #3430

Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).

[[x]] I have updated the CHANGELOG.md of the relevant packages.
Changelog files must be edited under the form:
## Unreleased fix/major/minor

- Description of your change. (thanks to @yourGithubId)

[ ] If this contains new features or behavior changes,
I have updated the documentation to match those changes.

Thanks!


Adding instructions on how to run CMSIS-NN opt kernels using mbed

Change-Id: I31812627f95de1f8dea5704d5880cc1ffcd132cc

@freddan80 Did you get a chance to look on reviewer comments? Please let us know on the update. Thanks!

Hi Nat!
Thanks for the comments, and sorry for the late reply. I've been ooo for a few weeks.
Regarding the line length I was trying to follow the existing style in the readme file. Some existing examples:
make -f tensorflow/lite/experimental/micro/tools/make/Makefile TARGET=mbed TAGS="CMSIS disco_f746ng" generate_micro_speech_mbed_project
and
make -f tensorflow/lite/experimental/micro/tools/make/Makefile TARGET=arduino TAGS="" generate_micro_speech_mock_arduino_library_zip
where command line instructions don't break line. Was this what you were referring to?
Regards
Fredrik

@njeffrie , did you have a chance to look at my comment?

Can one of the admins verify this patch?

When I run our markdown linter, it breaks those commands into multiple lines.  The style guide indicates to follow line limits "when possible" and it's possible here.  Not a huge deal either way - I understand that we break that rule in other places, but unless there's a reason to exceed the line limit I slightly prefer to follow the style guide.

Thanks @njeffrie! I will leave it like it is for now to be consistent with the other command line commands in that readme file. Is the markdown linter you refer to publicly accessible?

I don't know of a publicly available version, unfortunately.

Is it possible to get the test restarted. This PR has only textual changes.


Flutter engine crashed (SIGSEGV) on GPU thread calling PlatformViewAndroid::CreateRenderingSurface()

It seems the engine try creating rendering surface and calling  AndroidSurfaceGL::GLContextMakeCurrent() but unfortunately the onscreen_context_ was null due to eglCreateWindowSurface fails, see
shell/platform/android/android_surface_gl.cc:100, shell/platform/android/android_surface_gl.cc:109, and PlatformViewAndroid::NotifyCreated().
backtrace:

1.gpu SIGSEGV(SEGV_MAPERR)

********** Crash dump: **********
#00 0x00133c3e /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
fml::RefPtr::operator->() const
    ../../flutter/fml/memory/ref_ptr.h:0:12
flutter::AndroidSurfaceGL::GLContextMakeCurrent()
    ../../flutter/shell/platform/android/android_surface_gl.cc:109:0
#01 0x003af65b /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
flutter::GPUSurfaceGL::GPUSurfaceGL(flutter::GPUSurfaceGLDelegate*, bool)
    ../../flutter/shell/gpu/gpu_surface_gl.cc:42:19
#02 0x00133cdb /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
std::__1::__unique_if::__unique_single std::__1::make_unique(flutter::AndroidSurfaceGL*&&, bool&&)
    ../../third_party/libcxx/include/memory:3003:32
flutter::AndroidSurfaceGL::CreateGPUSurface()
    ../../flutter/shell/platform/android/android_surface_gl.cc:59:0
#03 0x00133f15 /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
non-virtual thunk to flutter::AndroidSurfaceGL::CreateGPUSurface()
    ../../flutter/shell/platform/android/android_surface_gl.cc:0:0
#04 0x0013b0b3 /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
flutter::PlatformViewAndroid::CreateRenderingSurface()
    ../../flutter/shell/platform/android/platform_view_android.cc:391:28
#05 0x001681b9 /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
flutter::PlatformView::NotifyCreated()::$_0::operator()() const
    ../../flutter/shell/common/platform_view.cc:73:34
decltype(std::__1::forward(fp)()) std::__1::__invoke(flutter::PlatformView::NotifyCreated()::$_0&)
    ../../third_party/libcxx/include/type_traits:3530:0
void std::__1::__invoke_void_return_wrapper::__call(flutter::PlatformView::NotifyCreated()::$_0&)
    ../../third_party/libcxx/include/__functional_base:348:0
std::__1::__function::__alloc_func, void ()>::operator()()
    ../../third_party/libcxx/include/functional:1533:0
std::__1::__function::__func, void ()>::operator()()
    ../../third_party/libcxx/include/functional:1707:0
#06 0x0014678d /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
std::__1::function::operator()() const
    ../../third_party/libcxx/include/functional:2419:12
fml::MessageLoopImpl::FlushTasks(fml::FlushType)
    ../../flutter/fml/message_loop_impl.cc:123:0
fml::MessageLoopImpl::RunExpiredTasksNow()
    ../../flutter/fml/message_loop_impl.cc:133:0
#07 0x001484c1 /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
fml::MessageLoopAndroid::OnEventFired()
    ../../flutter/fml/platform/android/message_loop_android.cc:92:5
fml::MessageLoopAndroid::MessageLoopAndroid()::$_0::operator()(int, int, void*) const
    ../../flutter/fml/platform/android/message_loop_android.cc:42:0
fml::MessageLoopAndroid::MessageLoopAndroid()::$_0::__invoke(int, int, void*)
    ../../flutter/fml/platform/android/message_loop_android.cc:40:0
#08 0x0000fccd /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+632) [armeabi-v7a::3ce239b524f0fec8f8496e47d7358de4]
#09 0x0000f9d3 /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+26) [armeabi-v7a::3ce239b524f0fec8f8496e47d7358de4]
#10 0x0000c6b5 /system/lib/libandroid.so (ALooper_pollOnce+56) [armeabi-v7a::477cea91c9479647f5eddb27bbf07189]
#11 0x00148599 /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
fml::MessageLoopAndroid::Run()
    ../../flutter/fml/platform/android/message_loop_android.cc:68:18
#12 0x00145b17 /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
fml::MessageLoopImpl::DoRun()
    ../../flutter/fml/message_loop_impl.cc:92:3
fml::MessageLoop::Run()
    ../../flutter/fml/message_loop.cc:49:0
#13 0x001474d9 /data/app/com.bilibili.comic-K6FPBLH-bxa1TioYtEcBnA==/lib/arm/libflutter.so
fml::Thread::Thread(std::__1::basic_string, std::__1::allocator > const&)::$_0::operator()() const
    ../../flutter/fml/thread.cc:34:10
decltype(std::__1::forward, std::__1::allocator > const&)::$_0>(fp)()) std::__1::__invoke, std::__1::allocator > const&)::$_0>(fml::Thread::Thread(std::__1::basic_string, std::__1::allocator > const&)::$_0&&)
    ../../third_party/libcxx/include/type_traits:3530:0
void std::__1::__thread_execute >, fml::Thread::Thread(std::__1::basic_string, std::__1::allocator > const&)::$_0>(std::__1::tuple >, fml::Thread::Thread(std::__1::basic_string, std::__1::allocator > const&)::$_0>&, std::__1::__tuple_indices<>)
    ../../third_party/libcxx/include/thread:341:0
void* std::__1::__thread_proxy >, fml::Thread::Thread(std::__1::basic_string, std::__1::allocator > const&)::$_0> >(void*)
    ../../third_party/libcxx/include/thread:351:0
#14 0x0007342d /system/lib/libc.so (_ZL15__pthread_startPv+22) [armeabi-v7a::21cd61a810457179735b887fd6c4043c]
#15 0x0001e0e1 /system/lib/libc.so (__start_thread+22) [armeabi-v7a::21cd61a810457179735b887fd6c4043c]

Logcat:
04-07 11:26:16.736 25329 25329 D HMSAgent: onStarted:com.bilibili.comic.home.view.FlutterMainActivity@42c4b56
04-07 11:26:16.740 25329 25329 D HMSAgent: onResumed:com.bilibili.comic.home.view.FlutterMainActivity@42c4b56
04-07 11:26:16.763 25329 25540 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
04-07 11:26:16.766 25329 25506 E libEGL : eglCreateWindowSurface: native_window_api_connect (win=0xb27b7808) failed (0xffffffed) (already connected to another API?)
04-07 11:26:16.766 25329 25506 E libEGL : eglCreateWindowSurface:814 error 3003 (EGL_BAD_ALLOC)

04-07 08:02:02.330 27908 28344 I OpenGLRenderer: Initialized EGL, version 1.4
04-07 08:02:02.330 27908 28344 D OpenGLRenderer: Swap behavior 2
04-07 08:02:02.332 27908 27908 W FlutterView: Tried to send viewport metrics from Android to Flutter but this FlutterView was not attached to a FlutterEngine.
04-07 08:02:02.335 27908 28185 I flutter : main() executed
04-07 08:02:02.342 27908 28185 I flutter : [Beta] push MaterialPageRoute<dynamic>-/
04-07 08:02:02.479 27908 28187 E libEGL : eglCreateWindowSurface: native_window_api_connect (win=0xcb99a808) failed (0xffffffed) (already connected to another API?)
04-07 08:02:02.479 27908 28187 E libEGL : eglCreateWindowSurface:720 error 3003 (EGL_BAD_ALLOC)

The issue was reported by users of my app and it's hard to reproduce it.
Flutter version:
Flutter 1.12.13+hotfix.9
Framework  f139b11009
Engine  af51afceb8

Crashed phones:

Huawei P6-C00
Huawei P6-T00
Huawei JKM-AL00b
VIVO V1914A
VIVO V1831A
VIVO X21I A
REDMI NOTE 7

Android versions: 9, 8.1.0, 8.0.0  ...

@yrom  你这个问题基本就是这个原因了 https://github.com/flutter/flutter/issues/47804

@yy1300326388 These two are totally different.

cc @gaaclarke

How is this app using Flutter?  Is this is a Flutter module?  Does it make sense why you might have a FlutterView that doesn't have an attached FlutterEngine?
What is happening when this crash happens, is this at app launching?
Did this happen 100% of the time for the customer, or sporadically?
This SO article makes it sound like maybe app lifecycle isn't being managed correctly.  When trying to reproduce the bug I recommend backgrounding and foregrounding the app and putting the device to sleep to see if you can reproduce. it.

@gaaclarke
Flutter is embedded to my app through a module, following the add-to-app (use-a-cached-flutterengine) guide.
This crash is not 100%, and about 1% of customers have crashed 1.2 times on average up to now.
I investegate the logs from customer, some of them occur on FlutterActivity resumed but has not been fully drawn before. The activity stack is NativeActivity-> FlutterActivity. FlutterActivity lifecycle is: created -> resumed -> (imediatly) paused  -> (after few seconds) -> resumed.
In this case, the lifecycle of the engine seems to be messed up.
Some of them occur when FlutterActivity starts. The activity stack is NativeActivity-> FlutterActivity. FlutterActivity lifecycle is: created -> resumed.
In this case, this crash is incredible because the engine was created for the first time.
I will try to reproduce it as much as possible.

@yrom, @zsunkun
I know both of you encountered this issue? For us to look into this further, would you both please help supply repro steps? Thanks!

@zoeyfan I don't know how to reproduce it yet, I will try to find a way to reproduce it

@zoeyfan does our customer: bytedance have any repro steps for this issue?

@xster, unfortunately not yet. @zsunkun is from bytedance, he indicated in the last comment that he is working on a repro.

I highly suspect that it is caused by the FlutterEngine being asynchronously attached to FlutterView.
void onStart() {
    ...
    new Handler().post(new Runnable() {
      @Override
      public void run() {
        Log.v(TAG, "Attaching FlutterEngine to FlutterView.");
        flutterView.attachToFlutterEngine(flutterEngine);

        doInitialFlutterViewRun();
      }
    });
}

See https://github.com/flutter/engine/blob/v1.12.13-hotfixes/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java#L290-L298
Activity lifecycle:
2020-04-23 22:19:05 .flutter.ui.FlutterPageActivity onCreated
2020-04-23 22:19:05 .flutter.ui.FlutterPageActivity onResumed
2020-04-23 22:19:06 .flutter.ui.FlutterPageActivity onPaused
2020-04-23 22:19:08 .flutter.ui.FlutterPageActivity onResumed
2020-04-23 22:19:08 .flutter.ui.FlutterPageActivity onPaused

Stacktrace of main thread:
1 io.flutter.embedding.engine.FlutterJNI.nativeSurfaceCreated(Native Method)
2 io.flutter.embedding.engine.FlutterJNI.void onSurfaceCreated(android.view.Surface)(bm:3)
3 io.flutter.embedding.engine.renderer.FlutterRenderer.void startRenderingToSurface(android.view.Surface)(bm:16)
4 io.flutter.embedding.android.FlutterSurfaceView.void connectSurfaceToRenderer()(bm:3)
5 io.flutter.embedding.android.FlutterSurfaceView.void attachToRenderer(io.flutter.embedding.engine.renderer.FlutterRenderer)(bm:14)
6 io.flutter.embedding.android.FlutterView.void attachToFlutterEngine(io.flutter.embedding.engine.FlutterEngine)(bm:17)
7 io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2.void run()(bm:3)
8 android.os.Handler.handleCallback(Handler.java:907)
9 android.os.Handler.dispatchMessage(Handler.java:105)
10 android.os.Looper.loop(Looper.java:216)
11 android.app.ActivityThread.main(ActivityThread.java:7625)
12 java.lang.reflect.Method.invoke(Native Method)
13 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
14 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

Logcat:
04-23 22:19:05.308 10888 10888 D HMSAgent: onCreated:com.bilibili.comic.bilicomic.flutter.ui.FlutterPageActivity@6b76ef6
04-23 22:19:06.161 10888 10888 D HMSAgent: onPaused:com.bilibili.comic.bilicomic.flutter.ui.FlutterPageActivity@6b76ef6
04-23 22:19:07.986 10888 10888 D HMSAgent: onStopped:com.bilibili.comic.bilicomic.flutter.ui.FlutterPageActivity@6b76ef6
04-23 22:19:08.075 10888 10888 D HMSAgent: onStarted:com.bilibili.comic.bilicomic.flutter.ui.FlutterPageActivity@6b76ef6
04-23 22:19:08.134 10888 10888 D HMSAgent: onResumed:com.bilibili.comic.bilicomic.flutter.ui.FlutterPageActivity@6b76ef6
04-23 22:19:08.294 10888 10888 D HMSAgent: onPaused:com.bilibili.comic.bilicomic.flutter.ui.FlutterPageActivity@6b76ef6
04-23 22:19:08.378 10888 10888 D HMSAgent: onStopped:com.bilibili.comic.bilicomic.flutter.ui.FlutterPageActivity@6b76ef6
04-23 22:19:08.400 10888 11100 E libEGL : eglCreateWindowSurface: native_window_api_connect (win=0xcd14e008) failed (0xffffffed) (already connected to another API?)
04-23 22:19:08.400 10888 11100 E libEGL : eglCreateWindowSurface:814 error 3003 (EGL_BAD_ALLOC)

Ah, that's a very sensible guess since that code doesn't look very defensive. Do you have any way of testing a newer version since the suspected code is now no longer present? https://github.com/flutter/engine/pull/16527

I'll try that patch on my local engine to release the next version of my app. It may take some days to verify whether the crash still exists. Hope the guess is correct..

Connected with the customer who indicated that it may take a while for them to repro. Set expectation that this issue may be auto closed if no response is received, but they are welcome to reopen any time if a repro is identified.

Good news. After applying flutter/engine#16527, this crash no longer appers in new version of my APP. I think this issue has been resolved after that PR.

Excellent. Glad to hear. Thanks for testing!


Project Gallery Filters Have To Be Hooked Up

The project gallery filters have to be hooked up (see circled part below), which includes:

Writing some backend code that associates primary keywords with each project
Auto-filling the area and technology sidebar
Hooking up the filter so that when selected, the list of projects is auto-filtered. We should use isotope for filtering imo: https://isotope.metafizzy.co/filtering.html

For this:

Writing some backend code that associates primary keywords with each project
can we pull something from the publications page? That seems to be working okay.

Also, I think we need to make it consistent with the publications page too. Why not just have this? The Area, Technology etc. can appear under "group by"

For many reasons including that I like filtering more than the grouping and it's far more interactive--plus, I want to support hover filtering (e.g., it immediately shows you filter effect when you hover over the menu item).

In order for this to work, we actually need to update stuff in models.py, so removing this from Hackathon for now.

This is fixed in #508.


Browser waste time when load extension

Current state
The UI is blank when the first time load
Reason

UI requires some required data to display
When the network is slow, some services need loading data from the network will be delayed

Solution

Recheck required data to display on ROOT
Handle some services that may be delayed when low network

Reproduction

Open background page
In network tab:

Disable cache
Adjust network speed (on the right side of Disable cache)

Version test: http://<IP_ADDRESS>:8900/s/p246GknzxR3kMtN
Validation passed in cases:

Install
Upgrade version

Validation record: https://konistudio-my.sharepoint.com/:i:/g/personal/nhungphung_koni_studio/EcEBlQ9cIttEqP3jUREfntABZtdnNTLzQTSzNZQmXK-43A?e=lJrkUf

Improve UX: resolve later in https://github.com/Koniverse/SubWallet-Extension/issues/2228


[FEAT] Convert resolvers that return many items to the connection/edge model.

Is your feature request related to a problem? Please describe.
Currently when retrieving multiple items it's hard to paginate data due to no information being provided for the current result set.
Describe the solution you'd like
The ideal solution would return metadata about the paginated set such as results, page, totalItems, etc. which can then be used for meaningful pagination.
Describe alternatives you've considered
No alternatives have been considered as this is a deficiency in the current system.
Additional context
N/A.

There are two main options for pagination both of which are commonly seen in GraphQL Schemas.
The first and most GraphQL native is the edge based result-set for multiple items which follows the Graph theory that GraphQL is built on, an example of the shape of an object following this pattern would be:
interface EdgeNode<T> {
  node: T;
}

interface ConnectionEdge<T> {
  edges: EdgeNode<T>[];

  pageInfo: {
    pageNumber: number;
    totalPages: number;
    hasNextPage: boolean;
    endCursor: string;
  };
}

Alternatively a simpler pattern would be to use the common pagination fields along with a data or result field which contain the result-set. The shape of such pattern would be similar to below:
interface RetrieveManyResult<T> {
  results: T[];
  page: number;
  totalItems: number;
  totalPages: number;
}

Whilst the former is more robust particularly for pagination where data may be constantly changing, the latter is simpler to implement a follows a more RDMS standard approach.


Added: Support for -[UITableView canEditRowAtIndexPath]

Adds support for -[UITableView canEditRowAtIndexPath].

There are a few problems I see with this PR. First off, it cancels all gestures if you are interacting with a tableview, not just if you are interacting with a swipable cell.
Second, this should be solvable with the setGestureShouldRecognizeTouchBlock method. Just look at the gesture, and if gesture is interacting with a table view cell, return no. That should prevent it from being picked up, and the swipe to delete gesture should work on the cell.


Partition Expiration Setting

How to set partition expiration to the table created by this extension?

I had created a table using this extension with default partition set to MONTH and by TIMESTAMP. However, I would like to delete old partitions after a certain time period.
I know that by default Big Query moves the inactive partitions to long term storage.

Is this a feature we need to add to the extension? Currently I can't edit the Partition settings via the Big Query UI.
Thank you for your help.

hi @sabinayakc
This looks to be another parameter we could add to the configuration options.
Adding to our project board for consideration.
Source: https://github.com/googleapis/nodejs-bigquery/blob/main/samples/createTablePartitioned.js


404 Client Error

[ ] I am using the latest version of PyInstaLive: 3.1.0.
[x] I have installed either Python 2.7.x or 3.5+: YOUR VERSION HERE
[x] I have read the README.
[x] I have read the FAQ.
[x] I have checked all existing issues, none of which could solve my issue.

I am using:

[ ] Windows 10
[ ] Windows 8.1
[ ] Windows 8
[ ] Windows 7
[x] Linux (Ubuntu 19.04)
[ ] macOS (version: )
[ ] Other (device & OS name: )

PyInstaLive information
sudo -H pip3 install<EMAIL_ADDRESS>--process-dependency-links
Collecting<EMAIL_ADDRESS>  Cloning https://github.com/notcammy/PyInstaLive.git (to revision 3.1.0) to /tmp/pip-req-build-fg6hnyrd
DEPRECATION: Dependency Links processing has been deprecated and will be removed in a future release. A possible replacement is PEP 508 URL dependencies. You can find discussion regarding this at https://github.com/pypa/pip/issues/4187.
Collecting argparse (from pyinstalive==3.1.0)
  Downloading https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Collecting configparser (from pyinstalive==3.1.0)
  Downloading https://files.pythonhosted.org/packages/ba/05/6c96328e92e625fc31445d24d75a2c92ef9ba34fc5b037fe69693c362a0d/configparser-3.7.4-py2.py3-none-any.whl
Requirement already satisfied: instagram_private_api>=1.5.7 in /usr/local/lib/python3.7/dist-packages (from pyinstalive==3.1.0) (1.6.0)
Collecting instagram_private_api_extensions>=0.3.8 (from pyinstalive==3.1.0)
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/instagram-private-api-extensions/

Unsure why pip tries to pull the dependency from pypi since they're not on there, but you can install the API dependencies manually from here:
https://github.com/ping/instagram_private_api
https://github.com/ping/instagram_private_api_extensions

Yep this is what I just done, thanks very much.


jakttest: Spins at ~100% CPU on Linux while tests are running

A quick strace shows us that we're aggressively doing wait syscalls:
wait4(-1, 0x7ffcf9e0658c, WNOHANG, NULL) = 0
wait4(-1, 0x7ffcf9e0658c, WNOHANG, NULL) = 0
wait4(-1, 0x7ffcf9e0658c, WNOHANG, NULL) = 0
wait4(-1, 0x7ffcf9e0658c, WNOHANG, NULL) = 0
wait4(-1, 0x7ffcf9e0658c, WNOHANG, NULL) = 0
wait4(-1, 0x7ffcf9e0658c, WNOHANG, NULL) = 0
wait4(-1, 0x7ffcf9e0658c, WNOHANG, NULL) = 0
wait4(-1, 0x7ffcf9e0658c, WNOHANG, NULL) = 0
...

This should definitely not be necessary, so something here needs a rework.

These wait calls are from python subprocess.communicate() which is used by run_one.py to make the test pipeline of "jakt -> clang -> check test output" portable and easier to maintain (I imagine).
The very last test of a no-arg jakttest run is build testing the selfhost compiler. The long delay at the end (and the barrage of wait calls) is python waiting for the jakt compiler to compile selfhost.
Adding /// Expect: Skip in selfhost/main.jakt fixes the problem of the long wait (and ridiculous amount of syscalls), but doesn't eliminate it entirely.

Taking a look at this now. Looks like the barrage of wait syscalls comes from Jakttest, not from python. This is a frame from strace -k build/bin/jakttest selfhost.jakt:


Screenshots: "Ask" for auto-action, "Always Ask" option for the share key.

So people don't accidentally share screenshots they don't want to share.

Nevermind, it's not my problem that modpacks set the autoAction to UploadAndShare. Adding an Ask option is silly since the Share key is basically already just that, so it wouldn't solve anything.


List datatype

This is a basic implementation of lists for Numbat. We construct lists using […] notation and the type of lists is specified as List<T> where T can be any type.
>>> [1, 2, 3]

    = [1, 2, 3]    [List<Scalar>]

>>> [1m, 30cm]

    = [1 m, 30 cm]    [List<Length>]

>>> [["foo", "bar"], ["baz"]]

    = [[foo, bar], [baz]]    [List<List<String>>]

Operationally, they work just fine. For example, we can add the functional-programming style primitives head, tail and cons:
fn head(xs: List) -> A
fn tail(xs: List) -> List
fn cons(x: A, xs: List) -> List

and they work as expected:
>>> cons(0, [1, 2, 3])

    = [0, 1, 2, 3]    [List<Scalar>]

We can even write some useful functions like
>>> fn generate(n: Scalar, f: Fn[() -> Scalar]) -> List<Scalar> =
  if n == 1
    then [f()]
    else cons(f(), generate(n - 1, f))

>>> generate(10, random)

    = [0.372604, 0.123614, 0.297907, 0.966904, 0.296039, 0.351666, 0.923613, 0.0140005, 0.254682, 0.518355]    [List<Scalar>]

Type checking of list construction also works fine:
>>> [1 m, 40 cm, 3 kg, 2 m]
error: while type checking
  ┌─ <input:3>:1:2
  │
1 │ [1 m, 40 cm, 3 kg, 2 m]
  │  ^^^         ---- Mass
  │  │
  │  Length
  │
  = Incompatible types in list: expected 'Length', got 'Mass' instead

However, there are a number of open questions / issues regarding the handling of lists in the type checker:

We don't have polymorphic values yet. So we can't type the empty list [], which should have the type ∀D. List<D>. We have a similar problem with typing 0, NaN and inf, see #37.
Almost all useful functions on lists will be generic over the element type. Very basic things (like len, head, tail, cons) work fine when implemented via the FFI. But if we want to use those functions to implement map, filter, etc., we are running into type inference problems (already reported as https://github.com/sharkdp/numbat/issues/166).
Polymorphism in Numbat only works for dimension types (Scalar, Length, Length^2, Length / Time, etc). But so far, we can't be generic over all types, which means we can not give a type to a function that works on all lists, only on lists of arbitrary dimension types. So we can create things like List<Bool>,List<String> or List<List<Length>>, but we can't run cons, head, tail on them.

related ticket: #261

see follow up: #443


set pvc namespace same as pod

Hi @recall704
Thanks for the PR.
But please make the PR against github.com/rancher/longhorn-manager/examples instead. This repo's yaml was synced from longhorn-manager.
Also, the commit title is ambiguous. Please add examples: at the beginning of the title, to make sure that the developers read the commit message can understand what's in the commit when reading the commit message.

Please make PR against longhorn-manager instead.


Bump Api library to 2.1.2

Checklist

[X] I have filled out the template to the best of my ability.
[X] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
[X] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Bump Api library to 2.1.2
Describe alternatives you've considered
None
Additional context
None

Included Api library 2.1.2 to release 2.1.2


SUBMARINE-1028. Extend timeout for integration tests

What is this PR for?
Sometimes GitHub Actions' server is not stable, then it will take around 20 minutes and lead to timeout of integration tests.
What type of PR is it?
[Improvement]
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-1028
How should this be tested?
Screenshots (if appropriate)
Questions:

Do the license files need updating? No
Are there breaking changes for older versions? No
Does this need new documentation? No

Overall LGTM, just one question from my side.
Could you please share the reason that setting the new timeout-minutes to 60 instead of other time ?

@cxorm If there isn't a restart happen, test-k8s needs around 14 minutes, and test-e2e needs around 9 minutes. Usually restart will take 20~30 minutes therefore I think 60 minutes is a proper setting. Additionally, the integration test in python workflow is also using 60 minutes for the timeout.