Expose destination router name to ForwardAuth middleware

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you expect to see?
Hi, we are currently building a ForwardAuth middleware to authenticate users.
We want to restrict the access to routers per user (and or user groups). Currently, we cannot get the destination router in the ForwardAuth middleware.

Let's say the user wants to connect to D here. Our middleware (FA) would need to know that the user tries to visit D. The current request headers only show the current Host (which is the domain of FA). As it seems, we have no information about D inside of FA.
The proposal now, would be that Traefik (RP) could add information about D to the header send to FA. The header could contain the router name (e.g.: web-server@docker)  of D to make D identifiable to FA. This would allow ForwardAuth middlewares, to decide if the user has access to a specific router.
Since the router name is probably unsecure to expose (even if it's just between RP and FA), a flag could be added to enable this behavior, similar to the trustForwardHeader flag. trustForwardRouterName would be my first thought.
EDIT: The container ID would also be quite useful to know. With that, we could add labels to our containers to specify which groups have access to it.
Feedback is very welcome, and if there is a way, that we couldn't find, to get information about D, please let us know!
Thanks in advance.

Hello,
You have the real Host inside the X-Forwarded-Host header.
https://doc.traefik.io/traefik/middlewares/http/forwardauth/#forward-request-headers

Hi @ldez, thanks for the quick response! I am aware of the forwarded headers, but in my opinion they are not enough to easily identify the container / router. Multiple routers can rely on the same hostname, if used with Path rule, for example. Even with the forwarded Host and URI, there could still be a Headers rule in use, which directs the traffic to hostname.local/some/path to different routers, depending on the Headers. Then there are also query parameters etc. that can change the used router.
To get a container id / router name with this information, it would at least require access to the docker socket and then parsing the Traefik rules for every container to find a match. This step would be very inefficient, as Traefik did the rule matching already. Also, parsing the rules yourself would be quite error-prone.

From memory, in the X-Forwarded-Uri  you have the path and query parameters.
If you want to also send specific headers you can use authrequestheaders.
https://doc.traefik.io/traefik/middlewares/http/forwardauth/#authrequestheaders

I don't want to send specific headers. But maybe the client is doing so, and the router has a Headers rule.

As an example:

Host
URI
Rules
Headers
Router Name

hostname.local
/hello/world
Host(hostname.local) && Path(hello/world) && Headers(SomeUserDefinedHeader1)
SomeUserDefinedHeader1=asd
router1

hostname.local
/hello/world
Host(hostname.local) && Path(hello/world) && Headers(SomeUserDefinedHeader2)
SomeUserDefinedHeader2=asd2
router2

hostname.local
/hello/world
Host(hostname.local) && Path(hello/world) && Headers(SomeUserDefinedHeader3)
SomeUserDefinedHeader3=asd3
router3

As you can see, the forwarded Host and Uri are the same, but the responding router is different.
We have access to this information, but we would have to replicate the Traefik routing algorithm exactly to identify the responding container / router.
If multiple router rules match, Traefik supports priorities. Those are also not exposed to FA. In the case that multiple router rules match, FA could not identify a router / container, but Traefik could.
A rule like PathPrefix("/") would match every router, if not overwritten by another rule with a higher priority.

As you can see, the forwarded Host and Uri are the same, but the responding router is different.

Yes but the rules are not the same because of the headers.

If multiple router rules match, Traefik supports priorities.

As you know priorities, you also know that priorities are not conditional, so you will never have several of those identical routers that work at the same time.
Is your concrete use case based on this? Can you explain it?
I think (I hope) it's a edge case even in your infrastructure and this pattern is used only on a few testing routes.
If it's the case, you can set a headers middleware on those routers to add a specific header and forward this header by using the authrequestheaders option of the forwardauth middleware.

Hi! I'm Træfiker :robot: the bot in charge of tidying up the issues.
I have to close this one because of its lack of activity :disappointed:
Feel free to re-open it or join our Community Forum.


Requests connexion error BadStatusLine

Hi,
When I try to use your sdk via navi, or when I try to launch the sample:
$ PYTHONPATH=. python samples/SimpleChatClient.py
I provide my host, the username and password, and I get the following error:
Traceback (most recent call last):
  File "samples/SimpleChatClient.py", line 84, in <module>
    main(host, username, password, room_id_alias)
  File "samples/SimpleChatClient.py", line 39, in main
    client.login_with_password(username, password)
  File "/matrix-python-sdk/matrix_client/client.py", line 179, in login_with_password
    token = self.login_with_password_no_sync(username, password)
  File "/navi/navi/navi/matrix-python-sdk/matrix_client/client.py", line 156, in login_with_password_no_sync
    "m.login.password", user=username, password=password
  File "/navi/navi/matrix-python-sdk/matrix_client/api.py", line 128, in login
    return self._send("POST", "/login", content)
  File "/navi/navi/navi/matrix-python-sdk/matrix_client/api.py", line 545, in _send
    verify=self.validate_cert
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 57, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 453, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))

Is there anything special that needs to be done in my matrix configuration to avoid this ? I have created a normal user to be used has bot. I can login via Riot without issue with this user.
Thanks for your help !

Hi @Linuxine. That traceback doesn't look like it's a bug in this sdk to me. Could you try sending some https requests from the repl using the requests library and see if you get a similar error?

Closing until more information is provided.

Hi, sorry I have been a little busy, forgot to check my emails for github. The issue was that my attempt to connect to the matrix server were failling when using
       verify=self.validate_cert

in matrix_client/api.py, ligne 546, in def _send
If I remember correctly, this was due to an issue checking my lLt'sencrypt certificate. I had to manually edit the CA.cert to add the root CA to make it work, but this was not a very good solution, since I would have needed to edit it on every certificate renewal ? For now, I have set this setting to "verify=False" to allow my bot to connect to my matrix using the api.


Add support to handle any type of objects .

@mandreyel  ..Currently i can access only char (or any type of same width of char) by index but there should be option to specify any data type including user defined Classes to access via index from mapped file.

In a pointer-wrapper utility class I implemented a while ago for a project I had added a templated "data()" method that allows you to pass the type of the pointer you want it to cast into:
data<MyStruct>()[5] = MyStruct( 0xbeef, true, "blah" );

Maybe something like this can be added to the already-existing method?
    // Untested code, just to illustrate
    template<
        typename cast_type = value_type,
        access_mode A = AccessMode,
        typename = typename std::enable_if<A == access_mode::write>::type
    > cast_type* data() noexcept { return reinterpret_cast<cast_type*>(data_); }


Misplaced RBAC section under CMK setup steps

Hello Microsoft,
-I infer that the section here should come AFTER the creation of the Disk Encryption Set.
Because, only once DES is created, the managed identity would get created in Azure portal.
-Since IAM requires 3 things- who need what access to what scope,
It may help to clarify explicitly
Who=managed Identity for DES
Scope=KV or higher than it(eg.RG or subscription or mgmt group works too)
Role=(as mentioned in article)Key Vault Administrator, Owner, or Contributor roles
-Further, it may need to add the Key Vault Crypto Service Encryption User role which may work as well(this happens if using User Assigned identity-automatically done by Azure)
2.Further,the section here needs to be updated:
i.Portal is now updated to choose a user assigned identity(which can be skipped if one wants system assigned identity).
Article needs to update same as well as the image.
ii.The last step 10 on granting permissions lacks clarity though I do see a NOTE on Managed identity at bottom.
It must clarify what the portal does in back end-
Assign the Key Vault Crypto Service Encryption User  Role to the newly created Managed Identity for the DES(which will be attached to VM disk) at the scope of the Key Vault which was created for the DES.
Kind regards,
Aditya Garg
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 74498b4e-35a0-c63b-6b67-3cbe0cf9d555
Version Independent ID: bb34519d-8f56-3d89-ae30-10cc59d712b7
Content: Azure portal - Enable customer-managed keys with SSE - managed disks - Azure Virtual Machines
Content Source: articles/virtual-machines/disks-enable-customer-managed-keys-portal.md
Service: storage
Sub-service: disks
GitHub Login: @roygara
Microsoft Alias: rogarana

@adi-garg
Thanks for your feedback! We will investigate and update as appropriate.

@roygara
Can you please check and add your comments on this doc update request as applicable.

@adi-garg
I'm going to assign this to the document author so they can take a look at it accordingly.

@adi-garg Thanks for reaching out.
The placement of the section is accurate, since this article is written for the system assigned identity rather than user assigned identities. Permissions get assigned to the system identity when step 9 of "Set up your disk encryption set" is completed. You raise a good point that user assigned identity instructions would be beneficial, so I've added this to our backlog.
Thanks for bringing this to our attention, we appreciate it. :)
Since this is now in our backlog, I'm closing out this issue.
#please-close


Cannot read property 'prototype' of undefined error

https://github.com/nodejitsu/node-http-proxy/issues/809
Haven't looked at why this happened but its a good thing version was pinned and you guys bumped to 1.0.0 :). People only ran into this issue because they were on an old version of http-proxy.

Ah its because there is no longer a require('eventemitter3').EventEmitter

Yes, root cause of that issue was because of * in the dependencies. Anyways, I'm add some release notes stating the breaking changes ;p


pdf.verify throws an UnicodeDecodeError on files modified with PyMuPDF

I experimented with PyMuPDF, endesive and some signed PDFs and noticed that endesive's verify function works on various modified PDFs at all (I first discovered it on PDF's with financial data, and then reproduced it on something generic as seen below)
For example, using pdf-acrobat.pdf from endesive repo saved in the same directory as the script:
import pymupdf
doc = pymupdf.open('pdf-acrobat.pdf')
print(doc.get_sigflags())
page = doc[0]
rects = page.search_for("world")
page.add_highlight_annot(rects)
doc.save("output.pdf")

And then trying to verify it:
from endesive import pdf
data = open("output.pdf", "rb").read()
(hashok, signatureok, certok)= pdf.verify(data, None, None)
print("signature ok?", signatureok)
print("hash ok?", hashok)
print("cert ok?", certok)

Leaves a traceback:
UnicodeDecodeError                        Traceback (most recent call last)
Cell In[8], line 3
      1 from endesive import pdf
      2 data = open("output.pdf", "rb").read()
----> 3 (hashok, signatureok, certok)= pdf.verify(data, None, None)
      4 print("signature ok?", signatureok)
      5 print("hash ok?", hashok)

File ~/playground/.venv/lib/python3.12/site-packages/endesive/pdf/verify.py:14, in verify(pdfdata, certs, systemCertsPath)
     12 br = [int(i, 10) for i in pdfdata[start + 1 : stop].split()]
     13 contents = pdfdata[br[0] + br[1] + 1 : br[2] - 1]
---> 14 bcontents = bytes.fromhex(contents.decode("utf8"))
     15 data1 = pdfdata[br[0] : br[0] + br[1]]
     16 data2 = pdfdata[br[2] : br[2] + br[3]]

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8e in position 0: invalid start byte

Verification of the correctness of PDFs is very naive, in fact it does not exist, e.g. there is no check whether the given range covers the entire document, .....
If no error occurred then everything "should" be ok, but any error should be treated as fatal.
If you have time and desire, please add as many checks as you can - PR is welcome

I changed the verify function, what you wrote won't happen anymore.
I also added the PDFVierifier class which gives better control over the signature verification process (including signature verification in CSP and TSP)


InvalidProgramException when returning task with nullable struct

Unhandled exception. System.InvalidProgramException: Common Language Runtime detected an invalid program.
   at FodyTest.Program.DoSomethingAsync()
   at FodyTest.Program.Main(String[] args) in /home/andrii/development/FodyTest/FodyTest/Program.cs:line 9
   at FodyTest.Program.<Main>(String[] args)

using System.Threading.Tasks;

namespace FodyTest
{
    class Program
    {
        static Task Main(string[] args)
        {
            return DoSomethingAsync();
        }

        // Works fine with reference types (e.g. string)
        // But throws the exception with value types (e.g. bool)
        static Task<bool?> DoSomethingAsync()
        {
            return Task.FromResult((bool?) null);
        }
    }
}

This is the same underlying issue as the previous issue filed, will be fixed shortly! :)

This is the same underlying issue as the previous issue filed, will be fixed shortly! :)

P.S. If you want a quick fix you can annotate the method with [return: NullChecks(false)] but I will have a new version posted very shortly.

P.S. If you want a quick fix you can annotate the method with [return: NullChecks(false)] but I will have a new version posted very shortly.

Fixed via https://github.com/Singulink/RuntimeNullables/commit/4bd7513b5b111033278c94b3f2a01026ddd683db

Fixed via https://github.com/Singulink/RuntimeNullables/commit/4bd7513b5b111033278c94b3f2a01026ddd683db


support ABI 0.2.1

by following C++ SDK

skip 0.2.1 and wait for 1.0.0 to come

skip 0.2.1 and wait for 1.0.0 to come


Adding deprecation message for token based discovery.

Token based discovery, which is the default discovery mechanism, will be
deprecated in release 1.2.8, and replaced by a new mechanism that is
backed by Docker Swarm mode.
Fix https://github.com/docker/swarm/issues/2688.
Signed-off-by: Nishant Totla<EMAIL_ADDRESS>

PIng @aluzzardi

Should wait to rebase on top of https://github.com/docker/swarm/pull/2743

Rebased.


Support gradle properties for Liberty configuration

See ci.maven equivalent issue here for more info: https://github.com/OpenLiberty/ci.maven/issues/534

In researching various ways to specify properties for a gradle build, I have found the following:
You can specify project properties in the build.gradle as follows:
ext{     myFirstProperty = 'myCustomPropertyValue' }
Those can be overridden or added from the command line using -PmyFirstProperty=myNewCustomPropertyValue
Project properties can also be specified in a gradle.properties file in the same folder as the build.gradle file.

System properties can be specified from the command line with -D, and can also be specified in gradle.properties with format:
systemProp.myFirstProperty=myCustomPropertyValue
Project properties can also be specified as command line system properties with format -Dorg.gradle.project.myFirstProperty=myCustomPropertyValue
These can be retrieved in the code with System.getProperty("myFirstProperty").

Good resource: https://dzone.com/articles/specifying-gradle-build
Summary from that article:

Command-line -P properties are "project properties"
Command-line -D properties are, with one exception, "system properties"
Command-line -D properties that begin with org.gradle.project. are "project properties"
Properties specified in gradle.properties are, with one exception, "project properties"
Properties specified in gradle.properties that begin with systemProp. are "system properties"
Properties specified via environment variable are, with one exception, "system properties"
Properties specified via environment variables that begin with ORG_GRADLE_PROJECT_ are "project properties"


Conda Installation Failed Two Tests

Hello, I installed phonopy via conda, and first ran pytest to check everything out. It had a couple warnings but also failed two tests: test_get_supercell_Cr and test_get_primitive_convcell_Cr. I'm curious if these failures are significant as I am still learning about this program and the documentation. The output from the test is pasted below. I ran this on a MacBook 2019 i9 Processor.

        The tolerance values are positive, typically very small numbers.  The
        relative difference (`rtol` * abs(`b`)) and the absolute difference
        `atol` are added together to compare against the absolute difference
        between `a` and `b`.

        .. warning:: The default `atol` is not appropriate for comparing numbers
                     that are much smaller than one (see Notes).

        Parameters
        ----------
        a, b : array_like
            Input arrays to compare.
        rtol : float
            The relative tolerance parameter (see Notes).
        atol : float
            The absolute tolerance parameter (see Notes).
        equal_nan : bool
            Whether to compare NaN's as equal.  If True, NaN's in `a` will be
            considered equal to NaN's in `b` in the output array.

        Returns
        -------
        y : array_like
            Returns a boolean array of where `a` and `b` are equal within the
            given tolerance. If both `a` and `b` are scalars, returns a single
            boolean value.

        See Also
        --------
        allclose
        math.isclose

        Notes
        -----
        .. versionadded:: 1.7.0

        For finite values, isclose uses the following equation to test whether
        two floating point values are equivalent.

         absolute(`a` - `b`) <= (`atol` + `rtol` * absolute(`b`))

        Unlike the built-in `math.isclose`, the above equation is not symmetric
        in `a` and `b` -- it assumes `b` is the reference value -- so that
        `isclose(a, b)` might be different from `isclose(b, a)`. Furthermore,
        the default value of atol is not zero, and is used to determine what
        small values should be considered close to zero. The default value is
        appropriate for expected values of order unity: if the expected values
        are significantly smaller than one, it can result in false positives.
        `atol` should be carefully selected for the use case at hand. A zero value
        for `atol` will result in `False` if either `a` or `b` is zero.

        `isclose` is not defined for non-numeric data types.
        `bool` is considered a numeric data-type for this purpose.

        Examples
        --------
        >>> np.isclose([1e10,1e-7], [1.00001e10,1e-8])
        array([ True, False])
        >>> np.isclose([1e10,1e-8], [1.00001e10,1e-9])
        array([ True, True])
        >>> np.isclose([1e10,1e-8], [1.0001e10,1e-9])
        array([False,  True])
        >>> np.isclose([1.0, np.nan], [1.0, np.nan])
        array([ True, False])
        >>> np.isclose([1.0, np.nan], [1.0, np.nan], equal_nan=True)
        array([ True, True])
        >>> np.isclose([1e-8, 1e-7], [0.0, 0.0])
        array([ True, False])
        >>> np.isclose([1e-100, 1e-7], [0.0, 0.0], atol=0.0)
        array([False, False])
        >>> np.isclose([1e-10, 1e-10], [1e-20, 0.0])
        array([ True,  True])
        >>> np.isclose([1e-10, 1e-10], [1e-20, 0.999999e-10], atol=0.0)
        array([False,  True])
        """
        def within_tol(x, y, atol, rtol):
            with errstate(invalid='ignore'):
                return less_equal(abs(x-y), atol + rtol * abs(y))

        x = asanyarray(a)
        y = asanyarray(b)

        # Make sure y is an inexact type to avoid bad behavior on abs(MIN_INT).
        # This will cause casting of x later. Also, make sure to allow subclasses
        # (e.g., for numpy.ma).
        # NOTE: We explicitly allow timedelta, which used to work. This could
        #       possibly be deprecated. See also gh-18286.
        #       timedelta works if `atol` is an integer or also a timedelta.
         Use cell attribute instead.
    warnings.warn(

test/phonon/test_group_velocity.py::test_gv_si
  /Users/djames/opt/miniconda3/lib/python3.9/site-packages/phonopy/harmonic/derivative_dynmat.py:124: DeprecationWarning: DerivativeOfDynamicalMatrix.get_derivative_of_dynamical_matrix() is deprecated. Use d_dynamical_matrix attribute instead.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED test/structure/test_cells.py::test_get_supercell_Cr - TypeError: ufunc...
FAILED test/structure/test_cells.py::test_get_primitive_convcell_Cr - TypeErr...
============ 2 failed, 150 passed, 1 skipped, 7 warnings in 36.99s =============

Thanks for your report. Could you run pytest on the develop branch if you didn't?

It seems like I'm already on develop when I used git checkout develop but ran pytest after and got the same results as above.

On my mac of both of intel and arm, pytest passes. I can not see why your pytest fails. I guess it is due to dependency library. Do you mind to create new conda env with conda-packages and run pytest on it?

Followed the steps on the website
% conda create -n phonopy -c conda-forge
% conda activate phonopy
% conda install -c conda-forge phonopy

Followed by running the test again while in the phonopy environment
pip install pytest
cd phonopy             # github repo
pytest

and got the same fails on my test.

        The tolerance values are positive, typically very small numbers.  The
        relative difference (`rtol` * abs(`b`)) and the absolute difference
        `atol` are added together to compare against the absolute difference
        between `a` and `b`.

        .. warning:: The default `atol` is not appropriate for comparing numbers
                     that are much smaller than one (see Notes).

        Parameters
        ----------
        a, b : array_like
            Input arrays to compare.
        rtol : float
            The relative tolerance parameter (see Notes).
        atol : float
            The absolute tolerance parameter (see Notes).
        equal_nan : bool
            Whether to compare NaN's as equal.  If True, NaN's in `a` will be
            considered equal to NaN's in `b` in the output array.

        Returns
        -------
        y : array_like
            Returns a boolean array of where `a` and `b` are equal within the
            given tolerance. If both `a` and `b` are scalars, returns a single
            boolean value.

        See Also
        --------
        allclose
        math.isclose

        Notes
        -----
        .. versionadded:: 1.7.0

        For finite values, isclose uses the following equation to test whether
        two floating point values are equivalent.

         absolute(`a` - `b`) <= (`atol` + `rtol` * absolute(`b`))

        Unlike the built-in `math.isclose`, the above equation is not symmetric
        in `a` and `b` -- it assumes `b` is the reference value -- so that
        `isclose(a, b)` might be different from `isclose(b, a)`. Furthermore,
        the default value of atol is not zero, and is used to determine what
        small values should be considered close to zero. The default value is
        appropriate for expected values of order unity: if the expected values
        are significantly smaller than one, it can result in false positives.
        `atol` should be carefully selected for the use case at hand. A zero value
        for `atol` will result in `False` if either `a` or `b` is zero.

        `isclose` is not defined for non-numeric data types.
        `bool` is considered a numeric data-type for this purpose.

        Examples
        --------
        >>> np.isclose([1e10,1e-7], [1.00001e10,1e-8])
        array([ True, False])
        >>> np.isclose([1e10,1e-8], [1.00001e10,1e-9])
        array([ True, True])
        >>> np.isclose([1e10,1e-8], [1.0001e10,1e-9])
        array([False,  True])
        >>> np.isclose([1.0, np.nan], [1.0, np.nan])
        array([ True, False])
        >>> np.isclose([1.0, np.nan], [1.0, np.nan], equal_nan=True)
        array([ True, True])
        >>> np.isclose([1e-8, 1e-7], [0.0, 0.0])
        array([ True, False])
        >>> np.isclose([1e-100, 1e-7], [0.0, 0.0], atol=0.0)
        array([False, False])
        >>> np.isclose([1e-10, 1e-10], [1e-20, 0.0])
        array([ True,  True])
        >>> np.isclose([1e-10, 1e-10], [1e-20, 0.999999e-10], atol=0.0)
        array([False,  True])
        """
        def within_tol(x, y, atol, rtol):
            with errstate(invalid='ignore'):
                return less_equal(abs(x-y), atol + rtol * abs(y))

        x = asanyarray(a)
        y = asanyarray(b)

        # Make sure y is an inexact type to avoid bad behavior on abs(MIN_INT).
        # This will cause casting of x later. Also, make sure to allow subclasses
        # (e.g., for numpy.ma).
        # NOTE: We explicitly allow timedelta, which used to work. This could
        #       possibly be deprecated. See also gh-18286.
        #       timedelta works if `atol` is an integer or also a timedelta.
         Use packaging.version instead.
    if StrictVersion(np.__version__) >= StrictVersion("1.13.0"):

test/harmonic/test_displacements.py::test_nacl
test/harmonic/test_displacements.py::test_si
test/harmonic/test_displacements.py::test_sno2
test/harmonic/test_displacements.py::test_tio2
test/harmonic/test_displacements.py::test_zr3n4
test/harmonic/test_displacements.py::test_tipn3
  /Users/djames/opt/miniconda3/envs/phonopy/lib/python3.10/site-packages/phonopy/structure/atoms.py:163: DeprecationWarning: PhonopyAtoms.get_cell() is deprecated. Use cell attribute instead.
    warnings.warn(

test/phonon/test_group_velocity.py::test_gv_si
  /Users/djames/opt/miniconda3/envs/phonopy/lib/python3.10/site-packages/phonopy/harmonic/derivative_dynmat.py:124: DeprecationWarning: DerivativeOfDynamicalMatrix.get_derivative_of_dynamical_matrix() is deprecated. Use d_dynamical_matrix attribute instead.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED test/structure/test_cells.py::test_get_supercell_Cr - TypeError: ufunc...
 This seems something wrong. Do you see what I mean?

Running tests from the conda package is not directly supported, but possible.
To test the package, you need to get the test directory from the same release as the package (you should not use tests from different version). Enter this directory and run:
 python -m unittest discover -b

This replicates what the conda package build script is running. This should pass without any errors.

That makes sense. I ran pytest for when I installed phono3py via conda and it passed without an issue, so I didn't think anything of it when I did the same for phonopy. I would also comment that running the above command in the test directory of v2.12.0 outputs the below block. From reading it, it seems that none of the tests ran
----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

I close this issue because it is considered fixed. See #183.


Create please-read-message

please-read-message

We need to talk about something very important.
I looked for ways to contact you, but I couldn't find it.
This is my last try
My discord: kn#6972


pdfDocument.getOpenAction is not a function

Attach (recommended) or Link to PDF file here: Any PDF file
Configuration:

Web browser and its version: Microsoft Edge - 84.0.522.40
Operating system and its version: Windows 10 - Version 10.0.19041 Build 19041
PDF.js version: 2.4.456
Is a browser extension: No

Steps to reproduce the problem:

Just trying to render a PDF using PDF.js

What is the expected behavior?
That the PDF is rendered inside the iframe
What went wrong? (add screenshot)
I am able to see the PDF when I run it locally in my dev environment but in production it is logging these errors to the console. The last picture is what the PDF viewer looks like after it's "rendered"

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

I am able to see the PDF when I run it locally in my dev environment but in production it is logging these errors to the console.

That'd suggest a problem in your environment, rather than in the PDF.js default viewer, since otherwise you'd really expect it to be consistently broken everywhere; hence please see https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):

If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem.


Handle both logback 1.1.3 and 1.0.13 versions of DefaultSocketConnector

Not sure how to create a test for this unfortunately.

Hi @colsson11, thanks for doing this work and filling out the contributor agreement! The changes look reasonable.
Please let us know if you need this released relatively soon.

Thanks @shakeelmohamed , it's not urgent at this point. - Christian


Batch Verification

We need not do this by polkadot's launch, but we should aim to eventually support batch signature verification for both ed25519 and sr25519, which likely improves signature verification time by like 40%.
In essence, the execute block flow should go: (1) parse the block, (2) extract all the signatures whose failure forces rejecting the whole block, including fetching anything from storage required for verification, (3) batch verify all those signatures, and (4) finally continue executing the logic for each transaction.  Any signatures whose failure does not require rejecting the whole block should be verified in either step (1) or (4).
At first blush, there is a pretty radical transformation required for this workflow, but Rust's unstable generators might greatly simplify this.  In other words, all transaction processing functions become #[async] so they can first collect all appropriate signatures ala (2), and then yield returning how much of the block they consumed and a set of signatures they want verified.  After all transactions complete or yield, then execute block runs batch verification across all signatures from all transactions.  Assuming the batch verifications passes them all, then we resume each yielded transaction.
I'm sure this increases the memory footprint, so issues like cache efficiency impact this too. Also, batch verification efficiency caps out just under 96 signatures, so you need not collect the whole block, just enough transaction so that enough signatures can be batch verified together.

We've no need for generators here because we postpone all writes until the full block passes anyways.  We simply accumulate signatures that require verification, but continue the evaluate block logic temporarily assuming the signatures verify, much like we accumulate writes.  We then batch verify all signatures after all transactions conclude, or only after we accumulate 96ish signatures.  If any signature fails, then we abort the block, but if all succeed then we proceed onto the final write phase.

@burdges I think we would want to do verification first, otherwise transactions may do an unbounded amount of work without substantiation.

Yes, there might be transactions that should still do conventional verification, maybe either gossip/mempool or block production should do conventional verification too before including transactions.  And scripts or smart contracts could be quite messy.
Yet, I doubt polkadot itself has any tricky transactions, outside validator and council elections, but even those might exploit batch verification internally, not sure.


[Debugger] Improve loading time of debug variables and evaluation results

Purpose
This PR improves the debugger variable loading time using asynchronous APIs and making the variable loading logic concurrent-safe. The new mechanism will improve the variable loading time by 10x - 50x. This PR also improves the evaluation request handling for better performance.
Fixes https://github.com/ballerina-platform/ballerina-lang/issues/33289
Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[x] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[x] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Closing temporarily, due to the intermittent integration test failures which are not reproducible when running locally. Hence de-prioritising for the next release.


bypy list recursively?

how list recursively?  like  bash "tree -L 2"

Good suggestion. Pity that currently this is not supported/implemented (and I've put this project into maintenance mode)...


HBASE-28432 Refactor tools which are under test packaging to a new mo…

…dule hbase-diagnostics
The purpose of this task is to refactor and move certain tools currently located under the test packaging to a new module, named 'hbase-diagnostics'.
The following tools have been initially identified for relocation(will add more as and when identified):

PerformanceEvaluation
LoadTestTool
HFilePerformanceEvaluation
ScanPerformanceEvaluation
LoadBalancerPerformanceEvaluation

These tools are valuable beyond the scope of testing and should be accessible in the binary distribution of HBase. However, their current location within the test jars adds unnecessary bloat to the assembly and classpath, and potentially introduces CVE-prone JARs into the binary assemblies. We plan to remove all test jars from assembly with HBASE-28433.
This task involves creating the new 'hbase-diagnostics' module, and moving the identified tools into this module. It also includes ensuring that these tools function correctly in their new location and that their relocation does not negatively impact any existing functionality or dependencies.
Also see draft patch without this change for follow up work HBASE-28433 at https://github.com/apache/hbase/pull/6184

very rough change. lot of things to handle:

code duplication
cleanup
organising methods into proper files
testing
also seems i didnot pull code before working here, so need to resolve those as well

Will post a summary of changes and things to be take care of later tomorrow

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 41s

Docker mode activated.

-0 :warning:
yetus
0m  3s

Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck

_ Prechecks _

_ master Compile Tests _

+0 :ok:
mvndep
0m 16s

Maven dependency ordering for branch

+1 :green_heart:
mvninstall
3m  3s

master passed

+1 :green_heart:
compile
2m  6s

master passed

+1 :green_heart:
javadoc
4m  8s

master passed

+1 :green_heart:
shadedjars
5m 13s

branch has no errors when building our shaded downstream artifacts.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 15s

Maven dependency ordering for patch

-1 :x:
mvninstall
1m 32s
/patch-mvninstall-root.txt
root in the patch failed.

-1 :x:
compile
1m 22s
/patch-compile-root.txt
root in the patch failed.

-0 :warning:
javac
1m 22s
/patch-compile-root.txt
root in the patch failed.

-0 :warning:
javadoc
0m 13s
/results-javadoc-javadoc-hbase-diagnostics.txt
hbase-diagnostics generated 3 new + 0 unchanged - 0 fixed = 3 total (was 0)

-0 :warning:
javadoc
2m  6s
/results-javadoc-javadoc-root.txt
root generated 3 new + 91 unchanged - 0 fixed = 94 total (was 91)

-1 :x:
shadedjars
3m 51s

patch has 16 errors when building our shaded downstream artifacts.

_ Other Tests _

-1 :x:
unit
16m  9s
/patch-unit-root.txt
root in the patch failed.

45m 44s

Subsystem
Report/Notes

Docker
ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/6249

Optional Tests
javac javadoc unit compile shadedjars

uname
Linux 1e96014cbaf4 5.4.0-195-generic #215-Ubuntu SMP Fri Aug 2 18:28:05 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / da6b8396d5e83f6bc7acf3e81a8d2ef5a8dbf3ce

Default Java
Eclipse Adoptium-17.0.11+9

shadedjars
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/1/artifact/yetus-jdk17-hadoop3-check/output/patch-shadedjars.txt

Test Results
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/1/testReport/

Max. process+thread count
1495 (vs. ulimit of 30000)

modules
C: hbase-common hbase-client hbase-balancer hbase-asyncfs hbase-server hbase-mapreduce hbase-diagnostics . hbase-assembly hbase-it U: .

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/1/console

versions
git=2.34.1 maven=3.9.8

Powered by
Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
1m 36s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  1s

codespell was not available.

+0 :ok:
detsecrets
0m  1s

detect-secrets was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
hbaseanti
0m  0s

Patch does not have any anti-patterns.

_ master Compile Tests _

+0 :ok:
mvndep
0m 16s

Maven dependency ordering for branch

+1 :green_heart:
mvninstall
3m  3s

master passed

+1 :green_heart:
compile
8m 10s

master passed

+1 :green_heart:
checkstyle
1m 13s

master passed

+1 :green_heart:
spotbugs
12m 13s

master passed

+1 :green_heart:
spotless
0m 44s

branch has no errors when running spotless:check.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 16s

Maven dependency ordering for patch

-1 :x:
mvninstall
1m 33s
/patch-mvninstall-root.txt
root in the patch failed.

-1 :x:
compile
4m 17s
/patch-compile-root.txt
root in the patch failed.

-0 :warning:
javac
4m 17s
/patch-compile-root.txt
root in the patch failed.

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
1m  7s
/results-checkstyle-root.txt
root: The patch generated 45 new + 49 unchanged - 36 fixed = 94 total (was 85)

+1 :green_heart:
xmllint
0m  0s

No new issues.

-1 :x:
spotbugs
0m 34s
/patch-spotbugs-hbase-server.txt
hbase-server in the patch failed.

-1 :x:
spotbugs
4m 12s
/patch-spotbugs-root.txt
root in the patch failed.

-1 :x:
spotbugs
0m  7s
/patch-spotbugs-hbase-it.txt
hbase-it in the patch failed.

-1 :x:
hadoopcheck
1m 50s

The patch causes 16 errors with Hadoop v3.3.6.

-1 :x:
hadoopcheck
3m 41s

The patch causes 16 errors with Hadoop v3.4.0.

-1 :x:
spotless
0m 37s

patch has 24 errors when running spotless:check, run spotless:apply to fix.

_ Other Tests _

-1 :x:
asflicense
1m 26s
/results-asflicense.txt
The patch generated 2 ASF License warnings.

52m  3s

Subsystem
Report/Notes

Docker
ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/1/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/6249

Optional Tests
dupname asflicense javac codespell detsecrets xmllint spotless spotbugs checkstyle compile hadoopcheck hbaseanti

uname
Linux 9208861a2112 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / da6b8396d5e83f6bc7acf3e81a8d2ef5a8dbf3ce

Default Java
Eclipse Adoptium-17.0.11+9

hadoopcheck
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/1/artifact/yetus-general-check/output/patch-javac-3.3.6.txt

hadoopcheck
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/1/artifact/yetus-general-check/output/patch-javac-3.4.0.txt

spotless
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/1/artifact/yetus-general-check/output/patch-spotless.txt

Max. process+thread count
192 (vs. ulimit of 30000)

modules
C: hbase-common hbase-client hbase-balancer hbase-asyncfs hbase-server hbase-mapreduce hbase-diagnostics . hbase-assembly hbase-it U: .

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/1/console

versions
git=2.34.1 maven=3.9.8 spotbugs=4.7.3 xmllint=20913

Powered by
Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Change Summary

Added a new module called hbase-diagnostics (as suggested by Istvan)

Question: Any better names?

Created a copy just to bring out the all the usages of the class to help decide where we move this in final patch:

RandomDistribution
KeyProviderForTesting
LoadTestKVGenerator

Added a new util DiagnosticToolsCommonUtils.java and moved method required to loginAndReturnUGI from HBaseKerberosUtils.java
Added a new util LoadTestUtil and moved all load test related code from HFileTestUtil and HBaseTestingUtil to here

Question: Should we merge this to DiagnosticToolsCommonUtils?

Copied generateData() from PerformanceEvaluation.java in TestHFileOutputFormat2.java to break cyclic dependency
Added @InterfaceAudience.Private to all classes moved from test code to main
Replaced UTIL.getConfiguration() with HBaseConfiguration.create() in LoadBalancerPerformanceEvaluation.java

TODO

Need to handle testHBASE14489() in hbase-server tests which depends on FilterAllFilter(), should we move this class to main of hbase-server or hbase-common?
TODO: How to deal with copied classes which have cyclic dependencies, should copy to main of hbase-server or hbase-common?
Some manual Testing
Anything else which we need to handle?

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 38s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  1s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+0 :ok:
detsecrets
0m  0s

detect-secrets was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
hbaseanti
0m  0s

Patch does not have any anti-patterns.

_ master Compile Tests _

+0 :ok:
mvndep
0m 23s

Maven dependency ordering for branch

+1 :green_heart:
mvninstall
4m 43s

master passed

+1 :green_heart:
compile
12m 38s

master passed

+1 :green_heart:
checkstyle
1m 41s

master passed

+1 :green_heart:
spotbugs
18m 13s

master passed

+1 :green_heart:
spotless
0m 52s

branch has no errors when running spotless:check.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 16s

Maven dependency ordering for patch

+1 :green_heart:
mvninstall
3m 32s

the patch passed

+1 :green_heart:
compile
8m 15s

the patch passed

-0 :warning:
javac
8m 15s
/results-compile-javac-root.txt
root generated 61 new + 1207 unchanged - 4 fixed = 1268 total (was 1211)

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
1m 12s
/results-checkstyle-root.txt
root: The patch generated 43 new + 58 unchanged - 36 fixed = 101 total (was 94)

+1 :green_heart:
xmllint
0m  2s

No new issues.

-1 :x:
spotbugs
7m 44s
/new-spotbugs-root.html
root generated 11 new + 0 unchanged - 0 fixed = 11 total (was 0)

+1 :green_heart:
hadoopcheck
11m 47s

Patch does not cause any errors with Hadoop 3.3.6 3.4.0.

+1 :green_heart:
spotless
0m 45s

patch has no errors when running spotless:check.

_ Other Tests _

+1 :green_heart:
asflicense
1m 33s

The patch does not generate ASF License warnings.

90m  9s

Reason
Tests

SpotBugs
module:root

Integral division result cast to double or float in org.apache.hadoop.hbase.PerformanceEvaluation.calculateRowsAndSize(PerformanceEvaluation$TestOptions)  At PerformanceEvaluation.java:double or float in org.apache.hadoop.hbase.PerformanceEvaluation.calculateRowsAndSize(PerformanceEvaluation$TestOptions)  At PerformanceEvaluation.java:[line 3154]

org.apache.hadoop.hbase.PerformanceEvaluation$RunResult defines compareTo(PerformanceEvaluation$RunResult) and uses Object.equals()  At PerformanceEvaluation.java:Object.equals()  At PerformanceEvaluation.java:[line 250]

Random object created and used only once in org.apache.hadoop.hbase.util.LoadTestKVGenerator.getValueForRowColumn(int, byte[][])  At LoadTestKVGenerator.java:only once in org.apache.hadoop.hbase.util.LoadTestKVGenerator.getValueForRowColumn(int, byte[][])  At LoadTestKVGenerator.java:[line 111]

org.apache.hadoop.hbase.util.LoadTestTool.DEFAULT_NUM_REGIONS_PER_SERVER isn't final but should be  At LoadTestTool.java:be  At LoadTestTool.java:[line 163]

org.apache.hadoop.hbase.util.LoadTestUtil.DEFAULT_COLUMN_FAMILY should be both final and package protected  At LoadTestUtil.java:and package protected  At LoadTestUtil.java:[line 48]

org.apache.hadoop.hbase.util.MultiThreadedAction.verifyResultAgainstDataGenerator(Result, boolean, boolean) concatenates strings using + in a loop  At MultiThreadedAction.java:using + in a loop  At MultiThreadedAction.java:[line 414]

Integral division result cast to double or float in org.apache.hadoop.hbase.util.MultiThreadedAction$ProgressReporter.run()  At MultiThreadedAction.java:double or float in org.apache.hadoop.hbase.util.MultiThreadedAction$ProgressReporter.run()  At MultiThreadedAction.java:[line 203]

org.apache.hadoop.hbase.util.MultiThreadedReader$HBaseReaderThread.createGet(long) concatenates strings using + in a loop  At MultiThreadedReader.java:in a loop  At MultiThreadedReader.java:[line 318]

Dead store to rowKey in org.apache.hadoop.hbase.util.MultiThreadedReaderWithACL$HBaseReaderThreadWithACL.queryKey(Get, boolean, long)  At MultiThreadedReaderWithACL.java:org.apache.hadoop.hbase.util.MultiThreadedReaderWithACL$HBaseReaderThreadWithACL.queryKey(Get, boolean, long)  At MultiThreadedReaderWithACL.java:[line 91]

Inconsistent synchronization of org.apache.hadoop.hbase.util.MultiThreadedUpdater.writer; locked 75% of time  Unsynchronized access at MultiThreadedUpdater.java:75% of time  Unsynchronized access at MultiThreadedUpdater.java:[line 80]

Unwritten field:MultiThreadedUpdaterWithACL.java:[line 94]

Subsystem
Report/Notes

Docker
ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/2/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/6249

Optional Tests
dupname asflicense javac codespell detsecrets xmllint spotless spotbugs checkstyle compile hadoopcheck hbaseanti

uname
Linux 80ed0d4779d0 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 469be3d3d2e106f41c28d10938b296e9fb673ec6

Default Java
Eclipse Adoptium-17.0.11+9

Max. process+thread count
190 (vs. ulimit of 30000)

modules
C: hbase-common hbase-client hbase-balancer hbase-asyncfs hbase-server hbase-mapreduce hbase-diagnostics hbase-compression/hbase-compression-zstd . hbase-assembly hbase-it U: .

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 16s

Maven dependency ordering for patch

+1 :green_heart:
mvninstall
2m 55s

the patch passed

+1 :green_heart:
compile
2m  8s

the patch passed

+1 :green_heart:
javac
2m  8s

the patch passed

-0 :warning:
javadoc
0m 12s
/results-javadoc-javadoc-hbase-diagnostics.txt
hbase-diagnostics generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)

-0 :warning:
javadoc
1m 57s
/results-javadoc-javadoc-root.txt
root generated 2 new + 91 unchanged - 0 fixed = 93 total (was 91)

+1 :green_heart:
shadedjars
5m 33s

patch has no errors when building our shaded downstream artifacts.

_ Other Tests _

-1 :x:
unit
245m 15s
/patch-unit-root.txt
root in the patch failed.

282m 15s

Subsystem
Report/Notes

Docker
ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/6249

Optional Tests
javac javadoc unit compile shadedjars

uname
Linux 633e00b5ce0a 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 469be3d3d2e106f41c28d10938b296e9fb673ec6

Default Java
Eclipse Adoptium-17.0.11+9

Test Results
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/2/testReport/

Max. process+thread count
6078 (vs. ulimit of 30000)

modules
C: hbase-common hbase-client hbase-balancer hbase-asyncfs hbase-server hbase-mapreduce hbase-diagnostics hbase-compression/hbase-compression-zstd . hbase-assembly hbase-it U: .

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/2/console

versions
git=2.34.1 maven=3.9.8

Powered by
Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
2m 25s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  1s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+0 :ok:
detsecrets
0m  0s

detect-secrets was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
hbaseanti
0m  0s

Patch does not have any anti-patterns.

_ master Compile Tests _

+0 :ok:
mvndep
0m 23s

Maven dependency ordering for branch

+1 :green_heart:
mvninstall
3m  2s

master passed

+1 :green_heart:
compile
7m 56s

master passed

+1 :green_heart:
checkstyle
1m 13s

master passed

+1 :green_heart:
spotbugs
12m  0s

master passed

+1 :green_heart:
spotless
0m 44s

branch has no errors when running spotless:check.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 16s

Maven dependency ordering for patch

+1 :green_heart:
mvninstall
3m  3s

the patch passed

+1 :green_heart:
compile
8m  1s

the patch passed

-0 :warning:
javac
8m  1s
/results-compile-javac-root.txt
root generated 61 new + 1207 unchanged - 4 fixed = 1268 total (was 1211)

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
1m 13s
/results-checkstyle-root.txt
root: The patch generated 43 new + 58 unchanged - 36 fixed = 101 total (was 94)

+1 :green_heart:
xmllint
0m  0s

No new issues.

-1 :x:
spotbugs
7m 42s
/new-spotbugs-root.html
root generated 11 new + 0 unchanged - 0 fixed = 11 total (was 0)

+1 :green_heart:
hadoopcheck
11m 33s

Patch does not cause any errors with Hadoop 3.3.6 3.4.0.

+1 :green_heart:
spotless
0m 43s

patch has no errors when running spotless:check.

_ Other Tests _

+1 :green_heart:
asflicense
1m 34s

The patch does not generate ASF License warnings.

77m 17s

Reason
Tests

SpotBugs
module:root

Integral division result cast to double or float in org.apache.hadoop.hbase.PerformanceEvaluation.calculateRowsAndSize(PerformanceEvaluation$TestOptions)  At PerformanceEvaluation.java:double or float in org.apache.hadoop.hbase.PerformanceEvaluation.calculateRowsAndSize(PerformanceEvaluation$TestOptions)  At PerformanceEvaluation.java:[line 3154]

org.apache.hadoop.hbase.PerformanceEvaluation$RunResult defines compareTo(PerformanceEvaluation$RunResult) and uses Object.equals()  At PerformanceEvaluation.java:Object.equals()  At PerformanceEvaluation.java:[line 250]

Random object created and used only once in org.apache.hadoop.hbase.util.LoadTestKVGenerator.getValueForRowColumn(int, byte[][])  At LoadTestKVGenerator.java:only once in org.apache.hadoop.hbase.util.LoadTestKVGenerator.getValueForRowColumn(int, byte[][])  At LoadTestKVGenerator.java:[line 111]

org.apache.hadoop.hbase.util.LoadTestTool.DEFAULT_NUM_REGIONS_PER_SERVER isn't final but should be  At LoadTestTool.java:be  At LoadTestTool.java:[line 163]

org.apache.hadoop.hbase.util.LoadTestUtil.DEFAULT_COLUMN_FAMILY should be both final and package protected  At LoadTestUtil.java:and package protected  At LoadTestUtil.java:[line 50]

org.apache.hadoop.hbase.util.MultiThreadedAction.verifyResultAgainstDataGenerator(Result, boolean, boolean) concatenates strings using + in a loop  At MultiThreadedAction.java:using + in a loop  At MultiThreadedAction.java:[line 415]

Integral division result cast to double or float in org.apache.hadoop.hbase.util.MultiThreadedAction$ProgressReporter.run()  At MultiThreadedAction.java:double or float in org.apache.hadoop.hbase.util.MultiThreadedAction$ProgressReporter.run()  At MultiThreadedAction.java:[line 206]

org.apache.hadoop.hbase.util.MultiThreadedReader$HBaseReaderThread.createGet(long) concatenates strings using + in a loop  At MultiThreadedReader.java:in a loop  At MultiThreadedReader.java:[line 318]

Dead store to rowKey in org.apache.hadoop.hbase.util.MultiThreadedReaderWithACL$HBaseReaderThreadWithACL.queryKey(Get, boolean, long)  At MultiThreadedReaderWithACL.java:org.apache.hadoop.hbase.util.MultiThreadedReaderWithACL$HBaseReaderThreadWithACL.queryKey(Get, boolean, long)  At MultiThreadedReaderWithACL.java:[line 91]

Inconsistent synchronization of org.apache.hadoop.hbase.util.MultiThreadedUpdater.writer; locked 75% of time  Unsynchronized access at MultiThreadedUpdater.java:75% of time  Unsynchronized access at MultiThreadedUpdater.java:[line 80]

Unwritten field:MultiThreadedUpdaterWithACL.java:[line 94]

Subsystem
Report/Notes

Docker
ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/3/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/6249

Optional Tests
dupname asflicense javac codespell detsecrets xmllint spotless spotbugs checkstyle compile hadoopcheck hbaseanti

uname
Linux 162b34e96fd4 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 167c153ab498904c9361cc7d3b4a408ce45267b7

Default Java
Eclipse Adoptium-17.0.11+9

Max. process+thread count
192 (vs. ulimit of 30000)

modules
C: hbase-common hbase-client hbase-balancer hbase-asyncfs hbase-server hbase-mapreduce hbase-diagnostics hbase-it hbase-compression/hbase-compression-zstd hbase-assembly . U: .

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 15s

Maven dependency ordering for patch

+1 :green_heart:
mvninstall
2m 52s

the patch passed

+1 :green_heart:
compile
2m  5s

the patch passed

+1 :green_heart:
javac
2m  5s

the patch passed

-0 :warning:
javadoc
0m 12s
/results-javadoc-javadoc-hbase-diagnostics.txt
hbase-diagnostics generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)

-0 :warning:
javadoc
2m  4s
/results-javadoc-javadoc-root.txt
root generated 2 new + 91 unchanged - 0 fixed = 93 total (was 91)

+1 :green_heart:
shadedjars
6m  7s

patch has no errors when building our shaded downstream artifacts.

_ Other Tests _

-1 :x:
unit
244m  9s
/patch-unit-root.txt
root in the patch failed.

283m 48s

Subsystem
Report/Notes

Docker
ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/3/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/6249

Optional Tests
javac javadoc unit compile shadedjars

uname
Linux 75c2ec15443b 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 167c153ab498904c9361cc7d3b4a408ce45267b7

Default Java
Eclipse Adoptium-17.0.11+9

Test Results
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/3/testReport/

Max. process+thread count
5110 (vs. ulimit of 30000)

modules
C: hbase-common hbase-client hbase-balancer hbase-asyncfs hbase-server hbase-mapreduce hbase-diagnostics hbase-it hbase-compression/hbase-compression-zstd hbase-assembly . U: .

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6249/3/console

versions
git=2.34.1 maven=3.9.8

Powered by
Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Sorry I did not read your comments @NihalJain .

Sorry I did not read your comments @NihalJain .

Hey @stoty no problem at all. I have raised a new PR with suggested changes where I will continue rest of the work, will close this one soon


[BUG]: Type of returned data is too lax and can lead to invalid property access without typescript warnings

What version of drizzle-orm are you using?
0.30.1
What version of drizzle-kit are you using?
No response
Describe the Bug
Typings for the data returned by select or returning queries assume rows will always be returned, which seems like a touchy assumption since it obviously can't be guaranteed just based on application code. For example, take this simple pseudo-code case:
async function handle(request) {
  const [{id}] = await db
    .select({id: users.id})
    .from(users)
    .where(eq(users.email, request.email))
    .limit(1);
  if (!id) {
    redirect(...)
  }
  setUserSession(id) // Keep rolling...
}

Here the application can encounter an unexpected error if no user with matching email is returned since we are trying to access property id of undefined. But with the current typings, this potential error is not spotted by typescript, something that could be solved by simply uniting the current return type with an empty array type, something like Selection[] | [never].
This isn't necessarily a bug per-se, but it does feel like an intrinsically wrong typing strategy that can lead to application errors without first triggering typescript warnings or errors.
Expected behavior
Have stricter typing to be more representative of potentially empty returns and help identify risky property accesses.
Environment & setup
No response

The return type in this case is {id: number}[] which properly aligns with what is returned. The type doesn't (and cannot) have information of the size of the array. Returning Selection[] | [never] is not correct because it doesn't return a never tuple.
De-structuring the return with const [{id}] = ... is equivalent to do result[0].id so it should show a type error.
If it doesn't, it's either a typescript limitation or you might not have "strickNullChecks": true in your tsconfig.
There is another tsconfig "noUncheckedIndexedAccess": true that you might also want to check if its set.

Ah "noUncheckedIndexedAccess": true does fix it. My bad I forgot Next's default tsconfig isn't that complete.


feat: a currency converter that converts local currency to usd

Description
this will people be able to convert the currency and be able to know the exchange rates it will use this endpoints
convert local currency amount to USD.
GET
https://api.chimoney.io/v0.2/info/local-amount-in-usd
get exchange rates.
GET
https://api.chimoney.io/v0.2/info/exchange-rates
Screenshots
No response
Ready to Work?

[X] I want to work on this issue

Hi @Davidongora Please assign it to me. I like to work on following issue and it will completed by EOD.


introduce the config option --disable-version-checking

This allows to disable the version checking for externally managed fluttter installations.
fixes https://github.com/flutter/flutter/issues/129143
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[ ] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making, or this PR is test-exempt.
[ ] All existing and new tests are passing.

I expect to tick more boxes once I got some review on the design here :smile:

@christian-heusel Thanks for your contribution. After some discussion, we're concluded this is not a use case we wish to support, so I'm going to close this PR.


Creating Backup of a pod in namespace test-ns1, test-ns2 and then restoring by excluding the namespace test-ns1

Issue/Feature Description:
Testcase Precondition:

Kahu project installed in given name-space (test-kahu)
All below pods should be up and running:
a. backup service
b. Meta service with nfs provider
c. nfs-server
Metadata location is created already.
Namespace test-ns1, test-ns2 is created and contains some of the kubernetes resources
Namespace restore-ns is created

Testcase steps:

Create below backup CR using kubectl command
(use kubectl create -f <backup.yaml>)
apiVersion: kahu.io/v1
kind: Backup
metadata:
name: backup-Kahu-0001
spec:
includeNamespaces: [test-ns1, test-ns2]
metadataLocation: nfs
includeResources:
-name:
kind: Pod
isRegex: true

Use kubectl describe backup  -n test-kahu

Get inside nfs server pod and check for the content inside mount path given
(use command kubectl exec -ti  -n test-kahu /bin/sh)

Create a restore CR on new namespace (restore-ns)
apiVersion: kahu.io/v1
kind: Restore
metadata:
name: restore-Kahu-0001
Spec:
backupName: backup-Kahu-0001
excludeNamespaces: [test-ns1]
namespaceMapping:
test-ns2 : restore-ns

Expected Result:

In step 2,
a) Verify that backup stage is Finished and State is Completed
b) Verify the resource list in status shows all the required resources
In step 3, verify that
a) tar file is created with name of backup
b) After untar file, All deployments and pods are backuped. but point to note, the pod which
has owner reference will not be backuped
In step4, verify that
a) No pods of test-ns1 are restored

Why this issue to fixed / feature is needed (give scenarios or use cases):
This is a testcase which is to be automated to make sure deployment is properly backed up and
restored
How to reproduce, in case of a bug:

Issues faced while installing Ginkgo with the latest version and go (package already installed) displays the message,
Try 'go install github.com/onsi/ginkgo/v2/ginkgo@latest' to install the latest version

Other Notes / Environment Information: (Please give the env information, log link or any useful information for this issue):
Link where you get the commands to get the ginkgo installed:
https://github.com/soda-cdm/kahu/tree/main/test/e2e#installing-ginkgo

Issue created @kalaiselvikks76 ma'am!...