adding some kind of message routing

Hello,
this is mostly a feature request , but before we add it to telepot we should discuss to see what would be the best way to add it.
so i saw this library today https://github.com/eternnoir/pyTelegramBotAPI .
while i prefer telepot there are some nice ideas implanted there. like the following :
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
    bot.reply_to(message, "Howdy, how are you doing?")

you can specify commands , content_types, a regex or a lambda to determine which handler to be called. i don't specifically like the decorator syntax , but i feel something similar is missing from telegram.
i was thinking maybe we can subclass delegator bot to make an alternative class based handling , where instead of only dividing by message flavor we can have on_audio_message kind of functions , the new class should check availability of on_{content_type}_message method , if it was not present useon_chat_message or if that wasn't present either on_message would get the message.
furthermore we can add a routing scheme for commands , with a naming convention . i would propose something like cmd_start , where if message content type was text , and text started with /start availability of cmd_X would be checked before other methods described above.
a class constant could be used to define an array of command starters for them to be customizable.
e.g.:
class MyBot(RouterBot):
    command_indicators = ['!','#','/']

with this class cmd_start would be callable by /start , !start and #start.
also it would be nice if we could override methods used for routing to add functionality and keep telepot extensible.
as for regex or lambda based routing , we can either have a new naming convention like handler_X which should return a tuple of (condition, callback) or some way of registering methods to the routing system. for example in the init of class.
class MyBot(RouterBot):
    def __init__(self):
        self.routes.append(condition, self.handler)

where condition would either be a regex (would be checked against text of message if available) or a lambda. or we can use decorators .
what is your opinion on this?
btw sorry for the long issue, i tried to write it briefly.

I prefer to use decorators, and possibility to specify commands, content types and lambdas - is great.
It is easy to implement and convenient to use

Currently, I use Django style: regexp with methods or simple dict with '/command': function

i prefer cherrypy style routing , with function names as command. this way we can also provide any additional text as parameters. for example for handling a deep link we can have the following method:
class MyBot(RoutingBot):
    def cmd_start(self):
        self.sender.send("welcome")

    def cmd_start(self, query):
        # do something with deep link query
        self.start()

so /start will call the first method while /start abc when bot is launched from telegram.me/botname?start=abc use the second method.
although decorators may be better suited for regex or lambda based routing but i personally prefer this over decorators for normal commands.

other than command based routing i also think an extra routing based on last sent keyboard would be nice. so we can define a method to handle keyboard responses and if user sends something from last sent keyboard that method would be called , we should be able to define such method while sending the keyboard to have different methods for each set of keys.
class MyBot(RoutingBot):
    def cmd_start(self):
        # calculate or hardcode some_keyboard
        self.sender.send("welcome", reply_markup=some_keyboard, markup_callback=self.start_keys)

    def start_keys(self, selected_key):
        # do something with the selected_key

when markup_callback is defined sender method should store keys in a list and check that list in the routing method. of course this would only work in per_chat_id and per_user_id delegator bots and won't function properly for a per_application setup.
alternatively we may use a separate parameter for markup with callback, which would take a list of tuples with (key_text, key_callback) to be able to define a separate callback for each key.

First of all, I don't prefer the decorator style in this case. It seems convenient, but I think it doesn't scale well to bigger applications - routing info scatters all over the places.
Second, thanks for bringing this up. You let me showcase the foresight/flexibility built into telepot. :smile: All routing scenarios you mentioned can be quite easily implemented within telepot's current structure. Let me explain.
Here is a Bot's handle() method. It just relays the message to an internal router's route() method (source):
def handle(self, msg):
    self._router.route(msg)

A ***Handler does it similarly, except the first point of contact is on_message() (source):
def on_message(self, msg):
    self._router.route(msg)

The key, as you can see, is the router, which is created this way (source):
self._router = Router(telepot.flavor, {'chat': lambda msg: self.on_chat_message(msg),
                                       'callback_query': lambda msg: self.on_callback_query(msg),
                                       'inline_query': lambda msg: self.on_inline_query(msg),
                                       'chosen_inline_result': lambda msg: self.on_chosen_inline_result(msg)})

The routing table is easy to understand. The reason I sandwich in a lambda is because I don't want to force subclasses to implement all on_*** methods. lambda basically delays evaluation to runtime, so those on_*** methods can be defined as needed.

Pay attention to the first argument, the function telepot.flavor in this case. It is a digest function which turns a message into a key.

So, the routing goes like this. First, the message goes through the digest function, which produces a key. The router then uses the key to look up the routing table and calls the resulting function.
The digest function does not have to return the key only. It can return a tuple, first element of which is the key, followed by additional arguments to be supplied to the destination function.
If you don't like the default settings, Router has the methods set_key_function() and set_routing_table() which allow you to change them. As you subclass the bot or some handlers, you may re-set the router to your liking:
self._router.set_key_function(...)
self._router.set_routing_table({...})

For example, if you want this:

If chat message is a photo, call on_photo
If chat message is a text and starts with !, #, or /, call on_command with the text behind as an argument
For text that does not start with special characters, call on_textwith the text as an argument
Ignore everything else.

Digest function would be:
def digest(msg):
    # get flavor and glance in one call
    f,g = telepot.flance(msg)

    if f != 'chat':
        return None

    content_type, chat_type, chat_id = g

    if content_type == 'photo':
        return 'photo'
    elif content_type == 'text':
        text = msg['text']
        if text.startswith(('!', '#', '/'))
            return ('command', text[1:])
        else:
            return ('text', text)

    return None

Routing table would be:
{'photo': lambda *args: self.on_photo(*args),
 'command': lambda *args: self.on_command(*args),
 'text': lambda *args: self.on_text(*args),
  None: lambda msg: 0,

Methods would be:
def on_photo(self, msg):
    ...

def on_command(self, msg, text):
    ...

def on_text(self, msg, text):
    ...

Haven't tested it, but should not be far off.
Yes, it takes some thinking, but it is so general that you can make up any kinds of routing imaginable.
Looking forward, if we want to include more forms of routing in telepot, all we need is to provide more digest functions and more routing tables. In fact, if you find any routing generally useful enough, I encourage you to just make it up and contribute to telepot if you don't mind.

I guess I was too eager to showcase the foresight/flexibility of telepot :smile: that I forgot to mention something very obvious.
An easier way to create your own routing scheme is simply to override the method handle() (for Bot) or on_message() (for ***Handler), like this:
def on_message(self, msg):
    if something:
        self.on_something(msg)
    else:
        self.on_everything_else(msg)

Isn't it? :smile:
The value of digest functions and routing tables is their capability to be packaged and distributed. But if all you want is a routing scheme for your own one-time use, overriding that first point of contact may be the way to go.

i have used the on_message method to implant my own routing logic (although a lot more complicated than a few if's with over 95 lines in 3 methods :-s) but didn't notice the built in Router class. it seems interesting but somehow limited.
i propose the following 3 changes
1.nested routing tables
currently only one digest method is allowed, which makes digest method unnecessarily complicated.
it should be able to route the method using a nested routing table, so instead of making one method that can return photo, cmd_start, cmd_help, cmd_about, inline_query we would have two digest methods.
first one would return photo, command, inline_query.
than if the value was command instead of just calling the end method , second routing table would be called to determine the final method.
so something like this:
{'photo': lambda *args: self.on_photo(*args),
 'command': (digest_method, {
     'start': self.cmd_start,
     'help': self.cmd_help,
     None: lambda msg: 0,
 }),
 'text': lambda *args: self.on_text(*args),
 None: lambda msg: 0}

where second digest method would be something like:
lambda msg: re.split('[@\s]', msg['text'][1:])[0]

this can even go one lever further so we would first do flavor, than content_type than command.
to implant it we can add a check to see if fn is callable if it was not we can assume its a nested routing table, and call route method recursively.
2.dynamic routing table
the second limitation is that routing table is static. i would like to use a callable that returns a dict instead of a static dict.
assume that i have a bot that has my username hard coded in , and has two extra commands only for use by admin. in the current system i have to put a check in every single method accessible only to admin to check if user is admin. while with a dynamic system i could do this:
self._router.set_routing_table({
    'text': self.on_chat_message,
    'command':(lambda msg: re.split('[@\s]', msg['text'][1:])[0], command_routes)
})

def command_routes(self, msg):
    routes = {
        'start': self.cmd_start,
        'help': self.cmd_help,
    }
    if msg['from']['id'] == self.admin:
        routes.update({
            'restart': self.cmd_restart,
            'block_user': self.cmd_blockusr,
        })
    return routes

any routing table regardless of nested level of it (whether the root one or just a sub table) should be able to have a callable instead of a dict.
3.ability to route keyboard commands
my last bot supports internationalization so the text for keyboard keys can't be hard coded and i don't know what they may be when coding. i would like to define a callback alongside the reply_markup to the sender helper function which would be called instead of normal routes if a key was chosen from keyboard (examples above in last post). for that to work we need the routing function to have a list alongside the routing table to check the response text against.
but since this feature also requires changes to sender class i suggest we focus on the first two for now. having nested dynamic routes allow this to implanted easily on the router side.

full example of a routing table that i would want to work:
(lambda msg: flavor(msg), {
    'chat': (lambda msg: glance(msg)[0], {
        'text': (lambda msg: 'keyboard' if msg['text'] in self.last_sent_keys else 'other',{
            'keyboard': self.on_keyboard,
            'other': (lambda msg: 'command' if msg['text'][0] in ['#', '!', '/'] else 'text',{
                'command': (lambda msg: re.split('[@\s]', msg['text'][1:])[0], {
                    'start': self.cmd_start,
                    'help': self.cmd_help,
                    # or we can even supply a function here that dynamically generates this
                    # based on list of methods in class starting with cmd_X
                    # this method can be in included in helper class of telepot
                }),
                'text': self.on_chat_message
            })
        }),
        'photo': self.on_photo,
        None: self.on_other,
    })
    'inline': self.handle_inline,
})

so to summarize:

instead of two methods taking digest method and routing separately , we should get (digest, routing_table) as tuple
each route can itself be another tuple of (digest, routing_table)
each routing_table may be a callable returning a dict instead of a dict

if you apply all these and than add some extra logic to it covering different states of bot (sub menus) and accept strings instead of callable as route (which is name of a text stored in db to be sent) also accept lists of tuples for routes (can_handle*, callback**) where instead of a centralized digest method you let each route decide whether it can handle the route or not , you get something near my current 95+ line routing method.
*each can_hanle  can be a string, a regex, or a callable
**each callback can itself be another nested route table , a string (to get from db and send) or a callable
P.S. i'm not asking you to include my routing method in telepot (its a mess and extremely complicated , and not useful for all but very specific bots) but those three points can help a lot to make the routing more extensible.

i made a routing class based on my idea , please review it here:
https://gist.github.com/zumoshi/79b2bd5827aaa345d3f8cfcd4ad8fec9
the proposed_router.py file is backward compatible with current router.
please tell me of any bugs you find , or concerns that you have about it , also if you think i can improve it in any way. when it got good enough to get approved by you i'll make a pull request to replace telepot router with it.
i also suggest that we embed another router with pre-configured routes for a naming scheme similar to the one described in my first post in this issue. an example of such router is available in the same gist in  example_extended_router.py. although the extended router still has room for improvement.

I admit I have not fully grasped the rationale behind your suggestions. That being said, here is what I think.
The essence of your suggestions revolve around two things:

Nested routing
Changing routing scheme on the fly

In my opinion, telepot already supports what you request, and it is not more complicated than what you have made. For example, nested routing can be accomplished like this, easily:
sub_router = Router(...)

top_router = Router(digest, {'key1': ...,
                             'key2': sub_router.route})

Coupled with the methods set_key_function() and set_routing_table(), routing at all levels can be changed on the fly.
Another thing is, I find that you are too object-oriented :smile: Not everything has to be built into a class. If we want to include more routing schemes in telepot, all we need is more digest functions and more routing tables, and probably some functions to generate pairs of them. You don't have to put them in a subclass of Router, and then embed that new type of router in a Mixin, and then subclass that Mixin to make another type of handler, which I am expected to subclass from.
Imagine a module called telepot.routing, in which there are every exotic kind of digest functions and routing tables (generators) you can think of, two of which are:
def chat_content_type(msg):
    content_type = telepot.glance(msg)[0]
    return content_type

def generate_content_type_routing_table(obj):
    return {
        'photo': lambda msg: obj.on_photo(msg),
        'text': lambda msg: obj.on_text(msg),
        ...,
        ...,
    }

When you want to route by content type, just do:
routing_table = telepot.routing.generate_content_type_routing_table(self)

self._router.set_key_function(telepot.routing.chat_content_type)
self._router.set_routing_table(routing_table)

If a routing table does not fit your requirements exactly, change it:
routing_table['text'] = my_router.route  # nested routing accomplished

self._router.set_routing_table(routing_table)

Imagine a plethora of digest function and routing tables floating around, you grab whatever you need to make a router, and nest the routers however you want.
Really, there is no need to create any more classes. It may still not fit your exact requirements, but I think it's flexible enough, if only you know how to use it. The only things that are worth adding, as I said, is more digest functions and more routing tables, and some functions that generate them (pairs of them, or classes of them).
Seriously, your content-type routing and command-routing are good suggestions. They would be a worthy addition to telepot.routing module. But one does not have to be embedded within the other (that is, the nesting does not have to be built in). They should be "on the same level". Let the developer nest them as he wants.
As of now, I think I WILL add the module telepot.routing encapsulating all kinds of fancy routing schemes. My priority is on some other issues right now. When I have time, I will try to replicate your suggestions in the way described above, if you haven't done that by then.

making things simple is usually harder. it would seem you have more skill than i do at that. while i may be able to accomplish the same task it usually results in a really complicated piece of code. so i usually like to hide the complicated part somewhere else and have code that does the important part visible only (hence why in my example i've created a complex and rather lengthy routing to get a readable and short usage code)
since telepot is very cleverly designed i was able to use my own routing class in my project without any patching to telepot being necessary so i'm not in a hurry but i would really like it to have pre-made routings similar to digest methods available for delegator bot in telepot itself.
i'm going to leave the design up to you since you outdid my expectations in both custom exceptions and the routing class that was embedded (and i've missed it :-s), but some suggestions for things to route based on:

message mode (plain, replied message, forwarded message)
message content_type
message command (in case it included / as the first letter), this would preferably also send command and parameters (separated by space from command) as extra args
message flavor

but the sending files with utf-8 in file name is a priority over this even for me, so no rush on this before that is solved.
as a side note, two extra things that my example did that was not addressed in your suggestion:

letting the upper level handle the route if it was not handled in nested table, e.g. if message is a command, but cmd_command is not implanted, and there is no None key in the nested table for commands, None key in upper level would be called. but having another instance of routing class won't do this
handling keyboard commands. you didn't really commented on the idea to add an option to sender class that would remember the last sent markup and signal the router to route differently if a key from keyboard was used.

@zumoshi, just to give you a timeline, expect the new module telepot.routing on or before May 17th, 2016.
As for your two extra points:

You want "error bubbling"? Here is a simple solution. In the sub-routing table, you can just include a None key which points to your top error handler. I am sure you can think of some situations where this simple solution may not be adequate, but for now, please just accept it as a solution. Telepot can't do everything for you.
Recognize commands from the last custom keyboard? Solution: Why don't you just re-set the key function and routing table as you send the custom keyboard?

i'm using the custom router i gave in the gist for that particular project, most of my other projects won't need something as complicated and your solutions would be more than enough for them. thanks for considering my suggestions and working on them.

New module telepot.routing and telepot.async.routingis now out, in 8.0.  Please see reference.


Fee estimation returns 0 in StratisRegTest network

Request:
curl -X GET "http://<IP_ADDRESS>:37221/api/Wallet/estimate-txfee?WalletName=Wallet-AAA&AccountName=account 0&DestinationAddress=TWhr5DhynqZXiGt88BcUJmoYh4UpDDCpQN&Amount=100000&FeeType=Medium&AllowUnconfirmed=true&ShuffleOutputs=true" -H "accept: application/json"
Response:
0

Maybe I shouldn't closed that automatically.
@maciejzaleski @ArcSin2000X please retest this.
I have the suspicion that https://github.com/stratisproject/StratisBitcoinFullNode/issues/2416 will also get fixed with this. Can you please retest that as well?

I can confirm that this functionality now works for StratisRegTest network


Make GraphQL operation alias unique from HOC name

The use of the same name for an HOC operation and its alias (i.e. withCreateAppointment) causes a shadowed variable problem when trying to call the alias function from props and requires an additional alias to be assigned under the name property of an operation like below:

export default withCreateAppointment({
  name: 'createAppointment',
})(MyComponent);

This PR changes HOC aliases to the camel-cased version of their operation name to make them usable as intended

That's correct. Thank you for this PR, @uhLeeshUh !


Use sqlds updated-time-based cache keys

This updates the aws sdk to use the new caching mechanism in sqlds that includes the dataource updated timestamp in the cache key, to address https://github.com/grafana/athena-datasource/issues/264. Any other awsds- or sqlds-based could be affected by the same problem.
See the associated PR in sqlds (https://github.com/grafana/sqlds/111) for more details; this PR should not be merged until that one is released and the replace directive in go.mod is removed.

I've closed the sqlds PR - that fix worked but was unnecessarily deep. The problem is confined to aws datasources (ab)using AsyncAWSDatasource.NewDatasource. Closing this one too.


Exception when trying to update container with complex compose networks

Whilst testing the latest improvement to networking on the develop branch, I observed this error
2019-02-09 23:47:45 : INFO : dockerclient : media_plex_1 will be updated
2019-02-09 23:47:48 : ERROR : base : Job "Interval container update for unix://var/run/docker.sock (trigger: interval[0:05:00], next run at: 2019-02-09 23:52:41 GMT)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 256, in _raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.35/networks/media_backend/connect

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/usr/local/lib/python3.7/site-packages/pyouroboros/dockerclient.py", line 270, in update
    ipv6_address=container.attrs['NetworkSettings']['Networks'][network]['GlobalIPv6Address']
  File "/usr/local/lib/python3.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/docker/api/network.py", line 248, in connect_container_to_network
    self._raise_for_status(res)
  File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 258, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/local/lib/python3.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 400 Client Error: Bad Request ("user specified IP address is supported only when connecting to networks with user configured subnets")

docker-compose.yml:
services:
  plex:
<snip>
    hostname: plex.domain.name
    networks:
      public:
        ipv4_address: '<IP_ADDRESS>'
        ipv6_address: 'ffff:ffff:ffff:9::4'
      backend:
        aliases:
        - plex.domain.name
    restart: unless-stopped

networks:
  backend:
  public:
    external: true

Both networks are bridge networks, defined with no strange arguments. The public network is defined as follows:
docker network create --ipv6 --attachable --driver bridge --subnet <IP_ADDRESS>/24 --gateway <IP_ADDRESS> --subnet ffff:ffff:ffff:9::/64 --gateway ffff:ffff:ffff:9::1 public

looks like an ipv6 specific issue.

I'm happy to test with any device builds you may want to throw at me

can you try specifying your subnet as well in your compose? it looks like this is intended per https://github.com/moby/moby/issues/20547

Specifying addresses with the CIDR is invalid according to docker/compose. It is recognised as an invalid IP address

hmmm... can i get the output of docker network inspect public

docker inspect plex might also be useful here..

@frebib Is the IPv6 network link-local or global?
Might be an issue with link_local_ips vs. ipv6_address in connect_container_to_network

It's a global address. Inspect output pending

container: https://gist.githubusercontent.com/frebib/1a053cb894603a7fed246180ed445b5c/raw/db4a8a2c57a53c3bd068f3c682d9a94cdd76dda6/media_plex_1.json
network: https://gist.githubusercontent.com/frebib/da8479788e3042b6f8a33146bb745bc5/raw/eff899b1a9fbc47eb0e83a97ed0e3bc7c33be35c/public.json
I've snipped some unrelated information out but lmk if there is anything missing

Out of curiosity, I checked the code from Watchtower for comparison and it appears the Go library for connecting a container to a network takes the entire network object, encodes it, and posts it to the Docker daemon. I'm not sure why the Python library differs in that regard

https://github.com/docker/go-docker/blob/4daae26030ad00e348edddff9767924ae57a3b82/network_connect.go#L11-L15
https://github.com/docker/go-docker/blob/4daae26030ad00e348edddff9767924ae57a3b82/request.go#L41-L46

I've reverse-engineered the go-docker library and implemented the same functionality directly into ouroboros. Admittedly it's a hack, but it seems to work
diff --git a/pyouroboros/dockerclient.py b/pyouroboros/dockerclient.py
index a57bda9..230186c 100644
--- a/pyouroboros/dockerclient.py
+++ b/pyouroboros/dockerclient.py
@@ -250,25 +250,26 @@ class Container(object):
                 # connect the new container to all networks of the old container
                 for network in container.attrs['NetworkSettings']['Networks']:
                     host_net = self.client.networks.get(network_id=network)
+                    net_obj = container.attrs['NetworkSettings']['Networks'][network]
                     if host_net.attrs.get('Options', {}).get('com.docker.network.bridge.default_bridge') == 'true':
                         # default network
                         # User specified IP address is supported on user defined networks only
                         self.client.api.connect_container_to_network(
                             container=new_container.attrs['Id'],
                             net_id=network,
-                            aliases=container.attrs['NetworkSettings']['Networks'][network]['Aliases'],
-                            links=container.attrs['NetworkSettings']['Networks'][network]['Links']
+                            aliases=net_obj['Aliases'],
+                            links=net_obj['Links']
                         )
                     else:
                         # user defined network
-                        self.client.api.connect_container_to_network(
-                            container=new_container.attrs['Id'],
-                            net_id=network,
-                            aliases=container.attrs['NetworkSettings']['Networks'][network]['Aliases'],
-                            links=container.attrs['NetworkSettings']['Networks'][network]['Links'],
-                            ipv4_address=container.attrs['NetworkSettings']['Networks'][network]['IPAddress'],
-                            ipv6_address=container.attrs['NetworkSettings']['Networks'][network]['GlobalIPv6Address']
-                        )
+                        data = {
+                                "Container": new_container.attrs['Id'],
+                                "EndpointConfig": net_obj,
+                                }
+
+                        url = self.client.api._url("/networks/{0}/connect", network)
+                        res = self.client.api._post_json(url, data=data)
+                        self.client.api._raise_for_status(res)

                 new_container.start()

After some debugging I can say, that this is not an issue because of IPv6 and neither because of the different implementation of the docker-py library comparing to the go version.
I simple made a mistake in differentiating when to carry-over the IPv4/6 addresses. I only looked at the com.docker.network.bridge.default_bridge label, but of course all user defined networks (without a subnet assigned) are lacking this label. Thus the current implementation assumed it's a network with a user defined subnet (which is wrong).
@frebib I pushed a fix to my fork, would be great if you could test whether it fixes this error: sudo docker build -t ouroboros:local-build https://github.com/nightvisi0n/ouroboros.git#fix_user-defined-network-detection.
I will create a PR afterwards.

ill keep my eyes peeled for that PR ;)

above merge fixes this one. Closing


update documentation - MeshTxBuilder - All API Endpoints

General improvements to grammar and clarity

@Zagita21 Thanks so much for your help for the docs! Above I made some comments on some changes I have second thoughts with. Maybe we can have some more slight discussion on them before merging.

Thanks for your comments. As I wrote above:
"My suggestions are based on grammar and clarity, leaning more towards explicit description, while it seems your preference is for "short, snappy and blunt" imperatives. In some sense it is a style-choice, so I'm fine as you prefer it."
So feel free to make the changes you want/need.

@Zagita21 Can you grant permission to me for your fork? I want to update other docs and merge it together with this PR


Create Quick Start for multicluster switcher

https://github.com/stolostron/backlog/issues/18758

/cc @dockerymick

/cc @showeimer

/cc @heyethankim

The first page of the Quick Start should have the following description replacing the top.
This quick start will guide you through enabling the Red Hat Advanced Cluster Management and multicluster engine for Kubernetes dynamic plugins, the multicluster context switcher in OpenShift Container Platform, and deploying the identity configuration management for Kubernetes operator.

At the end of the screen, instead of "Not available," say "Congratulations! Multicluster switcher is ready to use."

Please update the "dynamic" to "console."

The Quick Start duration minutes were estimated. We can certainly change it.

FYI. Posted a question regarding the operator letter casing on the OpenShift-design channel.

@heyethankim Are you sure about this change? The text "In this quick start, you will complete 3 tasks:" is automatically generated, so essentially you are just describing the 3 tasks twice. The original text actually gave the user an idea of why they might want to follow the steps in this quick start.

The first page of the Quick Start should have the following description replacing the top.
This quick start will guide you through enabling the Red Hat Advanced Cluster Management and multicluster engine for Kubernetes dynamic plugins, the multicluster context switcher in OpenShift Container Platform, and deploying the identity configuration management for Kubernetes operator.

@heyethankim Are you sure about this change? The text "In this quick start, you will complete 3 tasks:" is automatically generated, so essentially you are just describing the 3 tasks twice. The original text actually gave the user an idea of why they might want to follow the steps in this quick start.

The first page of the Quick Start should have the following description replacing the top.
This quick start will guide you through enabling the Red Hat Advanced Cluster Management and multicluster engine for Kubernetes dynamic plugins, the multicluster context switcher in OpenShift Container Platform, and deploying the identity configuration management for Kubernetes operator.

You have a point. Thanks, @KevinFCormier

Plan to file a couple of PF Github issues to address some of the UI components we would like to use in the Quick Start.

@KevinFCormier This PR has a lot of past activity to it. Is it still something we want to add in 2.0?

/cc @zkayyali812

/uncc @zkayyali812

/cc @JakobGray

/assign @JakobGray


Bump kratos version to 1.0.0

IAM-395:

Bump Kratos version to 1.0.0

Right now the bundle tests do not work due to TLS issues unrelated to this, but I tried running them with trusting insecure TLS in the login-ui and they passed with this change.

Do we have company wide, or team standards for versioning? Is bumping the current version of Kratos something we want regardless the bundle tests?


Add support for LE Secure Connection authentication using OOB for Central role

Add support for LE Secure Connection authentication using OOB for Central role.
Also move duplicated code to common area for re-use

@jhedberg Could you have another look at this?
@nashif @andyross @andrewboie Could you give the hex2bin/bin2hex part of this PR a look?

@joerchan the changes to Bluetooth SMP seem fine to me. @sjanc would you have a chance to look at those as well?

@joerchan is work listed (or is to be listed) for 2.0 release?

@joerchan is work listed (or is to be listed) for 2.0 release?

@ioannisg It should be listed for the 2.0 release (Bluetooth Qualification also).


Cannot Hide custom modules from dashboard admin panel

i have several roles, each role has some access, eg : superadmin can see all the modules , but HR can see only some modules ,so hiding of default modules is possible ,by giving permissions but custom modules is not getting hidden even if i set "manage" permission as disabled.
any help is appreciated
@sebastienros
@Piedone

I'm not sure I understand, where exactly do you want those modules to get hidden? Their permissions under a role screen? Under Features? Else?

Thankyou for your help ,ill look at it right away!

Thanks The logic was to add the permission to access or not in Admin Menu Page,

Great then!


Camera - FileNotFoundException

I have commented this on a closed issue so just in case I open a new one.
I'm having issues with this library if the image comes from the camera. This is what I'm doing:
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);         File f = ImageUtils.createImageFile(ImageUtils.getPackageName(ActNuevoproducto.this));         if ((f != null) && f.exists()) {             mImagePair = new ImageIntentHandler.ImagePair((ImageView)findViewById(nowViewID), f.getAbsolutePath());             takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(f));             startActivityForResult(takePictureIntent, ImageIntentHandler.REQUEST_CAPTURE);         }
That creates a File, the image gets taken and saved. I have checked that the image is actually there and it is.
Then I do this:
case ImageIntentHandler.REQUEST_CAPTURE:                 if(mImagePair.imagePath!=null){                     File file = new File(mImagePair.imagePath);                     CropImage.activity(Uri.parse(file.getAbsolutePath()))                     .setGuidelines(CropImageView.Guidelines.ON)                     .start(this);                 }                 break;
I just create the file to check that actually is there (testing only) and it is.
This is the error I'm getting:
java.lang.RuntimeException: Failed to load sampled bitmap: /storage/emulated/0/com.raceballos.playmobil/IMG_1485511489188715984043.jpg
Caused by: java.io.FileNotFoundException: No content provider: /storage/emulated/0/com.raceballos.playmobil/IMG_1485511489188715984043.jpg
Why when you open this File it says not found when I can find it? Very strange.

I've found the solution:
I needed to add file:// before that path. It opens now.


CHORE: Update dark mode develop theme

About these changes
I have made the side-bar on develop a dark green to fit in with the dark mode - this is so that the editors can tell the difference between develop and main.
How to check these changes
Delete the conditional statement in the wagtail_hooks.py, and it will load the CSS that is on develop only
Before assigning to reviewer, please make sure you have

[x] Checked things thoroughly before handing over to reviewer.
[x] Checked PR title starts with ticket number as per project conventions to help us keep track of changes.
[x] Ensured that PR includes only commits relevant to the ticket.
[x] Waited for all CI jobs to pass before requesting a review.
[x] Added/updated tests and documentation where relevant.

Merging PR guidance
Follow docs\developer-guide\contributing.md
Deployment guidance
Follow docs\infra\environments.md

@james
Re:

How to check these changes
Delete the conditional statement in the wagtail_hooks.py, and it will load the CSS that is on develop only

Wanted to avoid any physical changes for testing. Would the below help instead ?

An alternative is keep the var in local setup to run locally.
Below change - still better, I think, as it would severe the purpose of all environments production, develop and even local - and the intention may be so?

https://github.com/nationalarchives/ds-wagtail/blob/014a64a943aac6193c2c8c4865e796b6c4e5206f/config/settings/base.py#L396
Change to
FEATURE_PLATFORM_ENVIRONMENT_TYPE = os.getenv("PLATFORM_ENVIRONMENT_TYPE", "any-other-environment")

Yes you could do that on your local :) However you can display the difference in "environments" is fine. This is already on develop, but only has styles for light-mode so this change was just for dark mode - the difference between develop/main (develop/prod env) is already tested + working :)

@TNA-Allan 1. okay :)
2. I'm not entirely sure what you meant by this, but I think having it default to production is okay :)

@TNA-Allan 1. okay :) 2. I'm not entirely sure what you meant by this, but I think having it default to production is okay :)

Re:

Below change - still better, I think, as it would severe the purpose of all environments production, develop and even local - and the intention may be so

If we don't have a local var FEATURE_PLATFORM_ENVIRONMENT_TYPE, the settings will go with "production". This update will take care of that. Also when deployed to platform sh, it will still respect the PLATFORM_ENVIRONMENT_TYPE
Currently we don't have a documentation for setting this on local, this would make a production like setting. A step in developer setup will be helpful. if we're retaining the default "production".

Thanks for updating 1) - I'm going with this for this PR.


python312Packages.aiokafka: 0.10.0 -> 0.11.0

Diff: https://github.com/aio-libs/aiokafka/compare/refs/tags/v0.10.0...v0.11.0
Changelog: https://github.com/aio-libs/aiokafka/releases/tag/v0.11.0
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 338449 run on x86_64-linux 1

5 packages built:

home-assistant-component-tests.apache_kafka
python311Packages.aiokafka
python311Packages.aiokafka.dist
python312Packages.aiokafka
python312Packages.aiokafka.dist


Get free diskspace on Windows

Current get diskspace info implementation only supports *nix system.
See agent/diskspace.go

This is fixed with #26


Import an existing schema

Feature request
Is your feature request related to a problem? Please describe.
I would like to load an existing schema into the tool in order to work on it
Describe the solution you'd like
Upload a sql file that contains the schema of my database
Describe alternatives you've considered
the LLM suggests using the importCsv and exportCsv methods, but the csv uplaod functionality is to create a new database
Additional context
I would love to be able to talk about advanced use cases like pg functions, triggers, vectors etc.

ok, when i export on supabase as csv using:

SELECT
    table_schema,
    table_name,
    column_name,
    ordinal_position AS position,
    data_type,
    is_nullable,
    column_default
FROM
    information_schema.columns
WHERE
    table_schema = 'public'
ORDER BY
    table_name, ordinal_position;

Say that is an excel file (and is not an xls or xlsm, etc)

No way that i can talk with AI using my existing db arquitecture lloking for features and optimization.
It would be great to be able to load this CSV with the schema (as I’ve shown) to populate it with 5 or 10 example data entries, run some tests, explore alternative relationships, and so on.

With all the code, categories, roles, relationships, schemas, functions, triggers, etc., it becomes difficult to spot optimization errors or relationships, search for features, etc.
Especially when working alone.
I am currently working with a group of social workers, aiming to map the multiple dimensions of a social group, family, and the individual situation of each member. The goal is to create new studies and projects that help improve the quality of life for people in vulnerable situations with limited resources and members with disabilities.

So, what I'm hoping to do is actually embed postgres-new into my development workflow. I want it to be able to look at my current supabase schema for whatever branch I have checked out. I then want to be able to iterate on a new feature quickly within a local running copy of postgres-new. Then when I'm satisfied with the schema, I want to just export the "diff" as a migration and commit the change. This is why it would be important for me to be able to load an existing schema (and even test data).

ok, when i export on supabase as csv using:
SELECT
    table_schema,
    table_name,
    column_name,
    ordinal_position AS position,
    data_type,
    is_nullable,
    column_default
FROM
    information_schema.columns
WHERE
    table_schema = 'public'
ORDER BY
    table_name, ordinal_position;

* Say that is an excel file (and is not an xls or xlsm, etc)

I think CSV upload is only meant to have you upload tabular data and postgres.new will create a database schema from it.
It's not clear enough from the UI or from the docs IMHO....

Okay, I kept trying different options to see if I could achieve what I needed. The first attempt was to ask Mr. Postrgre (that's what I affectionately call it) if it accepted Markdown notation, to which it responded yes. Then I created a function with SELECT so that it could perform the query and I could copy it in Markdown.
However, when I used the prompt 'create all those tables and their relationships', it threw an error because the order of the tables was not correct (without relationships first and then the ones with relationships).

CREATE OR REPLACE FUNCTION get_schema_info()
RETURNS TABLE (
    schema_name TEXT,
    table_name TEXT,
    column_name TEXT,
    ordinal_position INTEGER,
    data_type TEXT,
    is_nullable BOOLEAN,
    foreign_key_info TEXT
) AS $$
BEGIN
    RETURN QUERY
    SELECT
        c.table_schema::TEXT AS schema_name,
        c.table_name::TEXT,
        c.column_name::TEXT,
        c.ordinal_position::INTEGER,
        c.data_type::TEXT,
        (c.is_nullable = 'YES')::BOOLEAN AS is_nullable,
        COALESCE(
            'REFERENCES ' || fk.foreign_table_name || '(' || fk.foreign_column_name || ')',
            NULL
        ) AS foreign_key_info
    FROM
        information_schema.columns c
    LEFT JOIN (
        SELECT
            kcu.table_schema,
            kcu.table_name,
            kcu.column_name,
            ccu.table_name AS foreign_table_name,
            ccu.column_name AS foreign_column_name
        FROM
            information_schema.key_column_usage kcu
        JOIN
            information_schema.constraint_column_usage ccu
            ON kcu.constraint_name = ccu.constraint_name
            AND kcu.constraint_schema = ccu.constraint_schema
        WHERE
            kcu.table_schema = 'public'
    ) fk ON c.table_schema = fk.table_schema
        AND c.table_name = fk.table_name
        AND c.column_name = fk.column_name
    WHERE
        c.table_schema = 'public'
    ORDER BY
        c.table_name,
        c.ordinal_position;
END;
$$ LANGUAGE plpgsql;
SELECT * FROM get_schema_info();

The second attempt involved ordering the function to display tables without relationships first.
However, I forgot that some tables are purely relationships themselves, and an error message appeared. So, until the ban is lifted, I won’t be able to contribute further to the cause.

Next time, I'll try adding another level of ordering to the function. For example:

The barrios table has a foreign key referencing the localidad table, which in turn has a foreign key referencing the provincia table.

The creation order should be specified in Markdown so that Mr. Postgre.new doesn’t encounter issues during SQL execution.

Therefore, the provincia table should be created before the localidad table, and the localidad table should be created before the barrios table.
I hope this information helps others to know 'how not to do it,' which is just as important, if not more so, than 'how to do it right.'

Okay, the ban is gone, and I tested it with this function  and SELECT statement.
It ran perfectly, returned the table as expected, I copied it as Markdown, and Mr. Postgre ran the code without any issues or problems.
So i promt; 'Create all the tables and relations' (then paste de MarkDown in the same prompt)
CREATE OR REPLACE FUNCTION get_schema_info()
RETURNS TABLE (
    schema_name TEXT,
    table_name TEXT,
    column_name TEXT,
    ordinal_position INTEGER,
    data_type TEXT,
    is_nullable BOOLEAN,
    foreign_key_info TEXT
) AS $$
BEGIN
    -- Create a temporary table to store the dependency information
    CREATE TEMPORARY TABLE IF NOT EXISTS temp_table_dependencies (
        tbl_name TEXT,
        depends_on TEXT,
        dependency_level INTEGER
    );

    -- Populate the temporary table with initial dependency information
    INSERT INTO temp_table_dependencies (tbl_name, depends_on)
    SELECT DISTINCT
        kcu.table_name AS tbl_name,
        ccu.table_name AS depends_on
    FROM
        information_schema.key_column_usage kcu
    JOIN
        information_schema.constraint_column_usage ccu
        ON kcu.constraint_name = ccu.constraint_name
        AND kcu.constraint_schema = ccu.constraint_schema
    WHERE
        kcu.table_schema = 'public'
    AND kcu.table_name != ccu.table_name;  -- Exclude self-references

    -- Calculate dependency levels
    WITH RECURSIVE dependency_cte AS (
        SELECT
            td.tbl_name,
            td.depends_on,
            1 AS level
        FROM
            temp_table_dependencies td
        UNION ALL
        SELECT
            d.tbl_name,
            cte.depends_on,
            cte.level + 1
        FROM
            temp_table_dependencies d
        JOIN
            dependency_cte cte ON d.depends_on = cte.tbl_name
    )
    UPDATE temp_table_dependencies td
    SET dependency_level = subquery.max_level
    FROM (
        SELECT tbl_name, MAX(level) AS max_level
        FROM dependency_cte
        GROUP BY tbl_name
    ) AS subquery
    WHERE td.tbl_name = subquery.tbl_name;

    -- Set dependency_level to 0 for tables not in the dependency chain
    UPDATE temp_table_dependencies
    SET dependency_level = 0
    WHERE dependency_level IS NULL;

    -- Return the query result
    RETURN QUERY
    SELECT
        c.table_schema::TEXT AS schema_name,
        c.table_name::TEXT AS table_name,
        c.column_name::TEXT AS column_name,
        c.ordinal_position::INTEGER AS ordinal_position,
        c.data_type::TEXT AS data_type,
        (c.is_nullable = 'YES')::BOOLEAN AS is_nullable,
        COALESCE(
            'REFERENCES ' || fk.foreign_table_name || '(' || fk.foreign_column_name || ')',
            NULL
        ) AS foreign_key_info
    FROM
        information_schema.columns c
    LEFT JOIN (
        SELECT
            kcu.table_schema,
            kcu.table_name,
            kcu.column_name,
            ccu.table_name AS foreign_table_name,
            ccu.column_name AS foreign_column_name
        FROM
            information_schema.key_column_usage kcu
        JOIN
            information_schema.constraint_column_usage ccu
            ON kcu.constraint_name = ccu.constraint_name
            AND kcu.constraint_schema = ccu.constraint_schema
        WHERE
            kcu.table_schema = 'public'
    ) fk ON c.table_schema = fk.table_schema
        AND c.table_name = fk.table_name
        AND c.column_name = fk.column_name
    LEFT JOIN
        temp_table_dependencies td ON c.table_name = td.tbl_name
    WHERE
        c.table_schema = 'public'
    ORDER BY
        COALESCE(td.dependency_level, 0),
        c.table_name,
        c.ordinal_position;

    -- Clean up: drop the temporary table
    DROP TABLE IF EXISTS temp_table_dependencies;
END;
$$ LANGUAGE plpgsql;

-- Execute the function to see the results
SELECT * FROM get_schema_info();

Obviously, it will all depend on the number of tables and columns within them, as I don't know how many characters can be included in a single prompt.

In this example, the function returned 147 rows, and as you can see, there are 7 columns in the resulting table.

All the material shared here by me (code and intellectual property) is made under the 'programmer with 2 coffees and three hands' agreement; (MIT, Apache, and blah, blah, blah... the things you like so much).

I don’t need a law to do what’s right… and you?

Mr. Postgre image looks like:

(With Dalle-2)
"...You better wait, wait a minute (Wait, wait a minute, Mr. Postgre)
Wait a minute, wait a minute, wait a minute (Wait, wait a minute, Mr. Postgre)
Please, Mr. Postgre (Wait, wait a minute, Mr. Postgre)
[{Deliver the Json, the sooner the better}]..."
The marvelettes: Please Mr postman


Fix a tiny typo in tutorial.

@biddisco Do you mean combining two commits into one commit? Or combining two PRs into one PR?

Either two commits in one PR, or just merge the commits into one. I suspect you'll find more typos, so feel free to add more!

This PR will be combined with #2637.


R.A.W 4 & 4½ + 6-9 missing

Maybe they are trackloaders? Must investigate 😊

I'll remove all the trackloader content issues. Stingray is our only hope for those.


Update all unit-test with @covers annotation, add custom recordedOn test for AggregateChanged, use assertSame where possible, update infection config & badge

fix #160

Not sure what psalm wants here:
ERROR: DocblockTypeContradiction - tests/Unit/Aggregate/AggregateRootTest.php:63:15 - Docblock-defined type 1 for $profile->playhead() is never int(2) (see https://psalm.dev/155)
        self::assertSame(2, $profile->playhead());

Not sure what psalm wants here:
ERROR: DocblockTypeContradiction - tests/Unit/Aggregate/AggregateRootTest.php:63:15 - Docblock-defined type 1 for $profile->playhead() is never int(2) (see https://psalm.dev/155)
        self::assertSame(2, $profile->playhead());

I don't know, maybe we should add this in the psalm baseline

Maybe because playhead is readonly and already resutled in 1? I want to check it one more time before adding it to the baseline

on the aggregate, playhead is internal not readonly. on the aggregateChange it is readonly, but this is not used here.


[WIP] Add subunit reporting from CI

Summary
Now that we're using stestr to run results we can start tracking the ci
results over time so we can see various trends in what we're developing.
This includes things like failure rates, and individual test run times.
This works by leveraging the subunit2sql project to store results.
Details and comments

Hmm, it looks like travis is probably mangling the secret key for the DB_URI and subunit2sql is not able to use it. In the meantime if people want to play with the instance I setup for this here is the link (dns will come after we get it working):
http://<IP_ADDRESS>/#/?duration=P1D&resolutionKey=min&end=2018-12-22T02:00:00.000Z
http://<IP_ADDRESS>/#/test/test.python.test_mapper.TestMapper.test_move_measurements?end=2018-12-22T02:00:00.000Z&resolutionKey=min&duration=P1D
(the only data in there is test data from running unit tests on my desktop)
If people want to see this in use for a project with a lot more data you can check out:
http://status.openstack.org/openstack-health/#/
http://status.openstack.org/openstack-health/#/test/tempest.api.compute.volumes.test_attach_volume.AttachVolumeShelveTestJSON.test_attach_volume_shelved_or_offload_server

@mtreinish still in your radar?

It is still on my radar, but it's a lower priority and keeps getting pushed down as more important things come up. It's not blocking anything it's just about aggregating data on how things perform in CI testing.

I'm abandoning this since it requires running an additional service outside of our normal ci environment. I have found an alternative built in to azure pipelines that provides a subset of the functionality that using subunit2sql would enable (it's enabled in https://github.com/Qiskit/qiskit-terra/pull/2927 ). While this doesn't provide everything that this patch would have provided (like run time analysis over time), it provides enough and also doesn't require us to maintain an additional service. Which is a big win.


[W4.4h][W13-2] Terrence Tan

Added use case: Renaming of an existing tag

@TTTaus
Some comments added. Please take note and close the pull request.


BusinessChartBuffer.Update cannot convert CurrPage.Chart

Hello,
Now that I installed container with latest image and new AL extension from .vsix, I have an error for chart that wasn't there earlier:

Argument 1: cannot convert from 'UserControl Chart: "Microsoft.Dynamics.Nav.Client.BusinessChart"' to 'MissingTypeSymbol'

This is where this functions is being called:
local procedure UpdateChart();
    begin
        ActualBudgetChartMgt.GenerateData(BusinessChartBuffer);
        BusinessChartBuffer.Update(CurrPage.Chart);
    end;

And this is how Chart usercontrol is declared:
usercontrol(Chart;"Microsoft.Dynamics.Nav.Client.BusinessChart")
AL extension versions is 0.17.19506.
Any input is welcome.
Thanks!

Hi! I am guessing you are using the latest docker drop. The quick solution is to set the following setting:
'al.assemblyProbingPaths':[{PathToAddInsFolder}]
where PathToAddInsFolder is the path to your server's Add-ins folder. I am working on docs for this feature.

I can't see server add ins folder, only client.
I tried mapping this folder to my folder using additional parameter during creation of new container by adding following parameter to new-navcontainer command :

-additionalParameters @('-v "c:\myaddins:c:\program files\microsoft Dynamics NAV\110\Service\Add-ins"')
but I kept getting some errors. Maybe my syntax is wrong? Or if you have some other idea on how I can get access to server addins folder.
Thanks!

This is a bug. We started the work on fixing it


fixes infinite wallet rest calls when the transaction is sent to expired namespace alias

fix #1695

@bassemmagdy there is no infinite calls now but each time there is 5 calls to rest made: https://www.loom.com/share/0dd6460a1576483bb464e067ad1b7cc6

Not sure why but now I got only single calls. So looks correctly now.


Validate ID of a relationship

There's a resource commissions which has a currency relationship. In my Validators class I have something like this:
protected function rules($record, array $data): array
{
    return [
        ...

        'currency' => new HasOne('currencies'),
    ];
}

My Currency model has a primary key of UUID type. I also set an ID constraint when registering a currencies resource.
Everything works fine unless I try to pass an invalid currency ID when creating a commissions resource:
POST /api/v1/commissions
{
    "type": "commissions",
    "attributes": {},
    "relationships": {
        "currency": {
            "data": {
                "type": "currencies",
                "id": "123"
            }
        }
    }
}

I expect to get a 422 response but get 500 with the following error:
testing.ERROR: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for type uuid: "123" (SQL: select exists(select * from "currencies" where "currencies"."id" = 123 and "currencies"."deleted_at" is null and "is_disabled" = 0) as "exists")
Well, as I can see, the currency is fetched first and then validation is applied. How can I validate raw data first and fetch the row from DB after this only?
I tried to add
'currency.id' => 'uuid',

to my validator, but it didn't work.
Thanks in advance!

Hi!
This is because the id is checked when parsing the document for compliance with the JSON:API specification. The currency adapter's exists() method is called:
https://github.com/cloudcreativity/laravel-json-api/blob/develop/src/Eloquent/AbstractAdapter.php#L208-L211
So to fix this, you need to overload the method on your currencies adapter to check the format of the id, for example:
public function exists(string $resourceId): bool
{
    if (1 === preg_match(/** */, $resourceId) {
        return parent::exists($resourceId);
    }

    return false;
}

As a side note, we've actually fix this in the rewrite of the package. In the new package it's dealt with here:
https://laraveljsonapi.io/docs/1.0/schemas/identifier.html#pattern


Consents will be displayed in the dashboard only after logging into the app

Steps

Register the travelocity app
Check the consents in the dahsboard

The app will not be displayed under consent management. Even though the user has not logged into the app, we can show all the apps the user has access to so that the user can update the consent details before logging into the app in the dashboard itself.

This is the expected behavior. User gives consent to the Application during the authhentication flow. In the user dashboard we list available consent receipts[1] for a particular user. We have special cased the System consent which is collected by the resident IDP. System consent can be given during self signup and for already on-boarded users, it can be accepted from the user Dashboard.
[1] https://docs.wso2.com/display/IS550/Using+the+End+User+Dashboard#UsingtheEndUserDashboard-Configuringconsentforservices


please support aarch64 Linux with binaries

This is useful as most of the LSP-supporting editors, including Emacs, Vim, and various VSCode builds, all work on the platform, and would allow either cheap cloud instances or Raspberry Pi >=4 boards to be useful Rust development hardware.

See #4746, github actions don't provide native arm hosted runners, we have to setup cross-compilation for this

This is out of scope for build process in this repository. You can, however, do
 rustup component add --toolchain nightly rust-analyzer-preview

with today's nightly, and that should have more platforms (I think).

Since aarch64 is on track to be a Tier 1 target, this should be something that the repo re-considers. Particularly since it's your own error message that directs people to come here and file issues about additional platforms to support.
I did try the rustup command you suggested, and it did not seem to provide a rust-analyzer binary that the rust-analyzer VS Code plugin recognized.

You need to explicitly specify the path to the rust-analyzer binary using rust-analyzer.serverPath if you want to use the rustup component. It should be somewhere in ~/.rustup/toolchains/nightly-*.


don't analyze all calculations in a query for views if there are no v…

…iews contained in the query

http://jenkins01.arangodb.biz:8080/view/PR/job/arangodb-matrix-pr/4014/


Audio bitrate of downloaded files is not accurate

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=k9mhsWKhqp0', '-x', '-f', '22']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.11.28
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-88514-gd5995c531d, ffprobe N-88514-gd5995c531d
[debug] Proxy map: {}

I have tried to get the highest possible audio bitrate from this YouTube video, in this case format 22 being 22           mp4        1280x720   720p  359k , avc1.64001F, mp4a.40.2@192k (44100Hz) (best) or 192k audio, and the resulting file is 128k. Same with format 251 on the same video, which is 251          webm       audio only DASH audio  102k , webm_dash container, opus @160k (48000Hz) with the resulting file being much lower bitrate than 160k (different bitrates reported in different programs, ranging from 64k-99k, but never 160k). Can somebody please help me by telling me if I am doing something wrong? I recently redownloaded youtube-dl (weird update issue idk) from ytdl.org, so that couldn't be the problem.

Blame Youtube for providing wrong bitrate metadata.


Add OpenBSD support

I was curious about supporting other platforms with the help of cross-platform-actions, and it turned out not too hard to add OpenBSD. It still lacks part of the metrics, hopefully OpenBSD uses will improve it (I myself don't have OpenBSD installed).
This PR also makes cross-platform testing more flexible and allows add support for more platforms in the future.

Summary by CodeRabbit

New Features

Introduced support for OpenBSD, enhancing cross-platform compatibility.
Added new metrics collection functionality specific to OpenBSD.
Updated testing capabilities to include OpenBSD in the cross-platform test suite.

Bug Fixes

Adjusted compilation conditions to ensure compatibility with OpenBSD.

Documentation

Updated README to reflect OpenBSD as a supported platform and its corresponding metrics.
Revised dependency management to include OpenBSD requirements in project configuration.

Could you update README as well?

Oops, forgot to push

Thanks a lot 🎉


Enable staking notifications by default

#8694e6r8n

Task linked: CU-8694e6r8n Android. Enable All Staking Push notifications by default


Feature/#71 save app at each step in app editor

Description
This PR includes code that saves the edited app at each step.
AB#71
Motivation and Context
As a user I want my entries to be saved at each step to avoid data loss
How has this been tested?
Screenshots (if appropriate):
Types of changes

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

Checklist:

[X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

Please merge #215 first


Make absent use a generated postings list | New Matcher interface

Right now we have absent selector, which just selects all the series without that selector and then removes the series that have the label set. This is ugly and can select ALL series if the query is just consisting of absent selectors.
https://github.com/prometheus/tsdb/blob/master/querier.go#L214 and https://github.com/prometheus/tsdb/blob/master/querier.go#L483-L487
Instead can we use a generated PostingsList for the series w/o the labels? This could just get the allPostings list and then remove the series that contain the label. As the evaluation is lazy, it should not be too hard.

This comes in the wake of https://github.com/prometheus/prometheus/issues/3575 and the Matcher interface we have doesn't let us have matchers which are not bound to a label. Can we change the interface to make it more powerful?

Such a selector is invalid, as it's too easy to do that by accident.

Closed by #228


Unable to connect to Jira cloud

I've completed the installation steps but am not able to connect to Jira (cloud):
According to healthcheck:
...
"jira": {
        "healthy": false,
        "message": "Unable to contact JIRA server, HTTP code received <401>"
    }
...

It is connecting to gitlab fine (i.e. "healthy": true). I've tried my personal jira cloud username and both my password and an API token (following https://confluence.atlassian.com/cloud/api-tokens-938839638.html) - neither works.
Since it's Jira cloud, I'm just putting "https://jira-instance-name.atlassian.net/" - not the project name. (If I should use the project name, what would the URL look like?)
Many thanks for making this available. I look forward to getting it up and running!
John

Jira took some time to refresh a password change - like 30 minutes... It connects to Jira now.


Error: @react-native-community/react-native-device-info: NativeModule.RNDeviceInfo is null.

I also got the same error

@Hoai-Phong  please follow these steps it may help you.

remove node_modules
reinstall node_modules
cd ios && pod install
take rebuild


Translated multipleParents.js into Korean

Now all "main" levels are translated into Korean.
"remote" to go

:tada: :tada: :tada: :tada:  woohoo! awesome man

pushing the site now...

btw there have been almost 400 sessions of korean users on the website this month!


Display test result info in XmlView

When a test has been run, the xml displayed should be that for the result rather than simply for the test exploration. The model method GetResultForTest will return it if available.
One tricky bit: the results are isolated - that is the child results are not included but must be fetched separately. This may make it harder than I originally imagined, in which case it can be delayed.

Ok, I think the present need to build the xml from each testnode/resultnode and manually add children as needed. This means that xml-elements can show results, while others will not, depending on which testcases have been run.

Let me know if I can give any help or advice.
Do you think this should this be handled entirely in the presenter? Or should the model include a linked set of results rather than just individual results?

I am not really sure if it should be placed in the model or the presenter. I think the presenter is the right place to modify model data for viewing purposes, and I am combining both TestNodes and ResultNodes into one big xml structure. The fact that I combine the two might suggest it should be left out of the model?
My code seems to work - I can publish what I've got so far. It is not extensively tested and it is close to bedtime, so there might be some blunders hidden in there.

It sounds like it belongs in the presenter at least for now. I never try to get things right "the first time" anyway - usually turns out to be less efficient. :-)
It's normal for us to create a merge request even when the work is not finished because that's the easiest way for the rest of the team to look at the code, make line-by-line comments, etc.
Regarding pushing... did you clone our repo locally? You have to do that rather than cloning your fork as you probably did originally. Just do
git clone https://github.com/nunit/nunit-gui.git some-directory

Next, create a branch in that directory, called  "issue-85"
git checkout -b issue-85

Copy your change files over the files in your new directory and work on them there.
When you are ready to push, do
git push -u origin issue-85

and your branch will be created in the nunit repo.
Alternatively, if it is easier, use your fork for now. However, using the nunit repo has the advantage that others can collaborate with you more easily.

When I try to do the last push I get:
remote: Permission to nunit/nunit-gui.git denied to iCodeIT. fatal: unable to access 'https://github.com/nunit/nunit-gui.git/': The requested URL returned error: 403
It would seem that I haven't been completely upgraded ;-)
For now I will use my fork instead. PR coming up.

I believe I fixed it. Gui team only had write access to that repository.

Yes, you fixed it - I pushed the branch to nunit-gui.
I should close the PR on the fork, right?

Right - and create a new PR on the new branch under NUnit-gui.

Done


Update main.go

This is not found package error

fixed in the following release https://github.com/go-playground/universal-translator/releases/tag/v0.17.0


Deleting a large valueset fails with transaction timeout because foreign key is not indexed

Describe the bug
Deleting a large valueset fails with transaction timeout because foreign key is not indexed.
To Reproduce
Steps to reproduce the behavior:

Create a valueset that includes a large codesystem, eg:
 "compose": {  "include": [    {      "system": "http://snomed.info/sct"    } }

Wait for terminology to expand the valueset
.ValueSetConceptAccumulator     : Have pre-expanded ##### concepts in ValueSet

Delete the valueset

See error
 .BaseTermReadSvcImpl            : Deleting existing TermValueSet[12954] and its children...
Transaction times out (after 60 minutes)

Expected behavior
The transaction should be much faster.
Investigation reveals the following SQL statement:
DELETE TRM_VALUESET_CONCEPT WHERE VALUESET_PID=?
The problem is that the table TRM_VALUESET_C_DESIGNATION has a FK constraint:
CONSTRAINT fk_trm_valueset_concept_pid FOREIGN KEY (valueset_concept_pid)         REFERENCES public.trm_valueset_concept (pid)
But there is no corresponding index and the FK requires that the database checks for detail rows when deleting master.
If I create an index:
CREATE INDEX idx_trmvaluesetcd_vsconceptpid     ON public.trm_valueset_c_designation USING btree     (valueset_concept_pid ASC NULLS LAST)
Then the transaction done in seconds (instead of hours).
Environment (please complete the following information):

HAPI FHIR Version: 5.4.0
OS: [e.g. iOS]: Linux/K8S

Additional context
See also: https://github.com/hapifhir/hapi-fhir/issues/2959

This appears to be a duplicate of #3108 - Please test on current snapshot builds and feel free to reopen if it is not fixed

@jmarchionatto

Please add DB engine

DB: Amazon Aurora PostgreSQL 10.14

Definitely not a duplication of #3108, which fixed terminology deletion use case. Note that terminology deletion does not delete ValueSet(s).

Can't reproduce the problem in my local postgres 13. (Complete SNOMED loaded, over 300K concepts ins ValueSet). Maybe because my trm_valueset_c_designation table is empty.
Could you please post the number of rows in your trm_valueset_c_designation table?

`
select count(*), count(distinct valueset_pid), count(distinct valueset_concept_pid) from trm_valueset_c_designation;
209934	6791	209907
select count(*), count(distinct valueset_pid) from trm_valueset_concept;
432583	10840
select count(), cnt from (select count() cnt , valueset_pid from trm_valueset_concept group by valueset_pid) x group by cnt order by cnt desc limit 10;
1	226740
1	114304
1	4475
1	3699
1	3116
1	2712
1	1920
1	1916
1	1749
1	1742
`

Thank you @tyfoni-systematic

Fixed by: https://github.com/hapifhir/hapi-fhir/pull/3416


Documentation for operator BETWEEN precedence is incorrect

Related: https://github.com/AnyhowStep/sql-compiler/issues/27
https://www.db-fiddle.com/f/eLqMAKQHmfzCVFKMB9raFn/0
https://dev.mysql.com/doc/refman/5.7/en/operator-precedence.html
https://github.com/mysql/mysql-server/blob/5c8c085ba96d30d697d0baa54d67b102c232116b/sql/sql_yacc.yy#L9360
predicate:
    ...
    | bit_expr BETWEEN_SYM bit_expr AND_SYM predicate
    ....
    | bit_expr

Given this,
SELECT a BETWEEN b AND c BETWEEN d AND e

We can have,
SELECT (a BETWEEN b AND c) BETWEEN d AND e

Or,
SELECT a BETWEEN b AND (c BETWEEN d AND e)

According to the documentation, it should parse from left to right. So, the first choice.
But the grammar rules are written such that it parses from right to left.

The same problem for equality operator precedence,
https://www.db-fiddle.com/f/9F9ZCGV3QDs6fPysLMQ7Yh/0
SELECT
	1 = 2 BETWEEN 0 AND 1,
	(1 = 2) BETWEEN 0 AND 1,
	1 = (2 BETWEEN 0 AND 1);

1 = 2 BETWEEN 0 AND 1
(1 = 2) BETWEEN 0 AND 1
1 = (2 BETWEEN 0 AND 1)

0
1
0


Warpd hangs in macos with non latin input

Hi @rvaiya,
I noticed that when I have the RU keyboard layout in MacOS, warpd sometimes hangs, and I need to either:

kill the process via mouse cause keyboard input is taken by warpd
switch to EN and active any warpd mode again, then it continues working

Sometimes, the RU layout works just fine, but eventually, it hangs. I've also noticed that if I try to start warpd -f with the RU layout, it logs config parsing errors
ERROR: A-M-x is not a valid key name
ERROR: A-M-X is not a valid key name
ERROR: A-M-g is not a valid key name
ERROR: A-M-h is not a valid key name
ERROR: A-M-s is not a valid key name
ERROR: A-M-c is not a valid key name
ERROR: A-M-l is not a valid key name
ERROR: A-M-L is not a valid key name
.....
ERROR: q is not a valid key name
ERROR: u is not a valid key name
ERROR: w is not a valid key name
ERROR: g is not a valid key name
ERROR: a is not a valid key name
ERROR: z is not a valid key name

When warpd hangs, here is the log of the event name resolves to (null), and the mode is 0 (reserved)

Seems to be a dupe of https://github.com/rvaiya/warpd/issues/214


adding Diane M. as a Tech lead for Mentoring WG

As per our Mentoring WG meeting on July 11, 2023, adding @dmueller2001 to the Mentoring WG charter as a Tech Lead.
We're adding her here as there is actually no spot in  the cncf/mentoring repo where we list the Mentoring WG leadership, in that repo we just link to this charter.
Since I'm making updates to the charter, I'm also updating:

current meeting minutes link
meeting cadence

+1

+1 from me

1

Liaison @TheFoxAtWork has approved this on slack.


Bb 275 addingtoolhelp

Added tool help to the Visibility tools in the PYT.

@csmoore - please review and merge. Visibility toolset doc done.

Looks good/equivalent -ex:


Use metadata endpoint

Fixes #45

@mpasternacki please update this PR to merge to develop branch.

This has been updated in master already and this PR hasn't been rebased and is against master instead of develop. Closing.
https://github.com/hw-cookbooks/omnibus_updater/blob/develop/libraries/omnitrucker.rb#L51


Chore: Deploy PlinyProject using uwsgi in emperor mode

PlinyProject currently runs through gunicorn web application proxied through Nginx. I would like it to be managed by wsgi in emperor mode to ensure it restarts successfully, especially since the Fedora server it is on needs more frequent updates than some enterprise linux deploys.

Done! Finally (remembering to set nginx to have uwsgi's group)


Cwa/revert pydantic 2 false support

Description:

Fixes #341
Reverts the commit (and PR) that implemented support for both major versions of pydantic.
It then re-adds the non-pydantic changes mentioned in this commit message.
Type of change:

[x] Bug fix.
[ ] New feature.
[ ] Documentation update.

Checklist for the reviewer:

This checklist should be used as a help for the reviewer.

[ ] Is the change limited to one issue?
[ ] Does this PR close the issue?
[ ] Is the code easy to read and understand?
[ ] Do all new feature have an accompanying new test?
[ ] Has the documentation been updated as necessary?

Codecov Report
All modified lines are covered by tests :white_check_mark:

Comparison is base (38e03ab) 82.12% compared to head (b70ed50) 82.08%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #343      +/-   ##
==========================================
- Coverage   82.12%   82.08%   -0.05%
==========================================
  Files          45       44       -1
  Lines        1225     1211      -14
==========================================
- Hits         1006      994      -12
+ Misses        219      217       -2

Flag
Coverage Δ

linux
82.08% <100.00%> (+0.04%)
:arrow_up:

linux-strategies
84.75% <100.00%> (-0.11%)
:arrow_down:

windows
?

windows-strategies
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files
Coverage Δ

oteapi/models/datacacheconfig.py
100.00% <100.00%> (ø)

oteapi/models/filterconfig.py
100.00% <100.00%> (ø)

oteapi/models/functionconfig.py
100.00% <100.00%> (ø)

oteapi/models/genericconfig.py
87.01% <100.00%> (+0.17%)
:arrow_up:

oteapi/models/mappingconfig.py
100.00% <100.00%> (ø)

oteapi/models/parserconfig.py
100.00% <100.00%> (ø)

oteapi/models/resourceconfig.py
100.00% <100.00%> (ø)

oteapi/models/secretconfig.py
100.00% <100.00%> (ø)

oteapi/models/transformationconfig.py
100.00% <100.00%> (ø)

oteapi/models/triplestoreconfig.py
100.00% <100.00%> (ø)

... and 15 more

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Setting connectionMode to loose prevents self-connections from handles rendered in the same CustomNode

Describe the Bug
Using the Easy Connect example, setting the connectionMode prop to "loose" somehow disables the ability for the source handle to connect to a target handle rendered in the same node.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue

Open Easy Connect in the code sandbox
Set connectionMode={ConnectionMode.Loose}
Observe that the connection line no longer "snaps" when the source node and target node are the same

Expected behavior
As a user, I would expect that the ConnectionMode.Loose would not prevent self-connection
Screenshots or Videos
With default strict settings:
https://github.com/xyflow/xyflow/assets/8312367/4c9c748a-cb22-4e0c-b770-f13a75c6d9fa
And with loose:
https://github.com/xyflow/xyflow/assets/8312367/a1f45f22-fcb1-46df-8959-86592419168d
Platform

OS: macOS 14.2.1 [arm64]
Browser: Chrome 123.0.6312.122
Reactflow: 11.11.1

Additional context
No response

You need to set handle ids if you want to use ConnectionMode.Loose because it ignores handle types and there is nothing left to distinguish the source and target handles on the same node.
However, this issue uncovered another bug, so thanks for raising it non-the-less!


[WIP] playing around with structure of spiceypy, I would like to have tests…

… to be importable to simplify conda builds

Coverage decreased (-67.5%) to 32.289% when pulling 9c4dd1602222e452ba62a7056b8144be1534ea14 on restructuring_ideas into 24505ecf97d9e43cf10b1dd7d8ded6ae0f4de6f0 on master.


Improve update position function

I rewrote the radix sort function to optimise for the case of 1 bit keys (instances either go to the left node or right node). This is much faster, although impact on total program run-time is not very high. It also saves about 8 bytes per row of memory.

Codecov Report

Merging #3895 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #3895   +/-   ##
=========================================
  Coverage     56.34%   56.34%
  Complexity      203      203
=========================================
  Files           185      185
  Lines         14679    14679
  Branches        495      495
=========================================
  Hits           8271     8271
  Misses         6170     6170
  Partials        238      238

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 143475b...f9b4753. Read the comment docs.


Mutable value in onTextChanged

I wanted to know if there was any possibility to use the value inside the onTextChanged handler as a variable ?
For example I want to automatically add a point after the user entered a specific character.
I cannot figure out any way of doing this with Former… but maybe someone has an idea ?

Ok this was pretty obvious…
Simply setup an addTarget action for .editingChanged in TextFieldRowFormer<FormTextFieldCell>() configuration handler.


image/jpeg: excessive memory usage

The following program consumes 1.3GB of memory to produce:
decode failed: invalid JPEG format: bad Huffman code
Not sure whether it is OK or not, since the format is compressed probably the image bounds are large. But still it is suspicious for the tiny input file.
package main

import (
	"bytes"
	"encoding/hex"
	"fmt"
	"image/jpeg"
)

func main() {
	data, _ := hex.DecodeString(input)
	img, err := jpeg.Decode(bytes.NewReader(data))
	if err != nil {
		fmt.Printf("decode failed: %v\n", err)
		return
	}
	fmt.Printf("bounds: %+v\n", img.Bounds())
	var w bytes.Buffer
	err = jpeg.Encode(&w, img, nil)
	if err != nil {
		panic(err)
	}
}

var input = "ffd8ffe000104a46494600010100000100010000ffdb004300100b0c0e0c0a10" +
	"0e0d0e121110131828de1816161834363125000000fe3c3c3933383440485c4e" +
	"17116df646ddaa1cd09c404457453738506d51575f626768673e4d7179706478" +
	"5c656763ffc2000b08ff80fe9501011100ffc4001a0000020301010000000000" +
	"00000000000003040102050006ffda00080101000000011badd2b348270c4c0c" +
	"3c2232968cf52a22aa801c6415211cb2ef440c4100000064a18f7f424ea33141" +
	"2f2aa1a26caaaf11bda026af5028b19365cec317116df646ddaa1cd09cc952bd" +
	"5882346354852873acc677067ae20e80236cddcb32a9427124aeac67eca68ec9" +
	"42551460c5e81674c53759f8eb03"

go version devel +87054c4 Wed Apr 22 02:50:48 2015 +0000 linux/amd64

The image bounds are large. The fragment "ffc2000b08ff80fe95" means a Start-Of-Frame marker "ffc2" whose height and width are 0xff80 and 0xfe95. In other words, the image claims to be 65173 x 65408, or over 4 billion pixels.
See also issue #5050.
Closing as WAI.

I am very sad that this issue is not taken seriously and closed as WAI. It is a real security threat and can easily be used for DoS attacks. For example, https://hackerone.com/reports/390
I understand that the API cannot distinguish between a legitimate or malicious image in this case. There should be an option to pass the max image dimensions or max memory size to prevent DoS attacks.
As it stands now, we have no way of protecting our servers against malicious images.

As it stands now, we have no way of protecting our servers against malicious images.

@roustem, yes you do: https://golang.org/pkg/image/jpeg/#DecodeConfig
Read the header to calculate its dimensions first. Use a https://golang.org/pkg/io/#TeeReader to save the bytes read into a https://golang.org/pkg/bytes/#Buffer and then if you're happy with the dimensions, use https://golang.org/pkg/io/#MultiReader to stitch together the saved header buffer with the remaining jpeg io.Reader. It all takes a few lines and is the natural Go composable way. See Camlistore's codebase for an example.

(Of course, that's only necessary if you can't rewind the stream. If it's just a file or something, you can seek back to the beginning)

That will work. Thank you, @bradfitz !


Upgrade to Go v1.17 and upgrade packages

Seemed like a good thing to do since Go v1.16 is EOL.
This new replace statement is because the gnostic package recently switched paths from googleapis/gnostic to google/gnostic and the latest commit of kube-openapi picked up the change but we can't update to it yet as far as I can tell:
	k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20220310132336-3f90b8c54bbb

/approve
/lgtm


[Error] missing a file at start-up

What did you do?
I runed Prometheus + nodeexporter + cAdvisor + AlertManager on Docker
What did you expect to see?
My containers running
What did you see instead? Under which circumstances?
I see the Prometheus container restarting in loop
Environment

System information:
  Darwin 16.4.0 x86_64

Prometheus version:
latest

Logs:

time="2017-02-17T08:08:03Z" level=info msg="Starting prometheus (version=1.5.2, branch=master, revision=bd1182d29f462c39544f94cc822830e1c64cf55b)" source="main.go:75"
time="2017-02-17T08:08:03Z" level=info msg="Build context (go=go1.7.5, user=root@1a01c5f68840, date=20170210-16:23:28)" source="main.go:76"
time="2017-02-17T08:08:03Z" level=info msg="Loading configuration file /etc/prometheus/prometheus.yml" source="main.go:248"
time="2017-02-17T08:08:03Z" level=error msg="Error opening memory series storage: leveldb: manifest corrupted (field 'comparer'): missing [file=MANIFEST-000009]" source="main.go:182"

I have tried to remove all the containers + images and made the docker-compose again and nothing has changed.

docker-compose.yml
version: '2'

networks:
  monitor-net:
    driver: bridge

volumes:
    prometheus_data: {}

services:

  prometheus:
    image: prom/prometheus
    container_name: prometheus
    volumes:
      - ./prometheus/:/etc/prometheus/
      - prometheus_data:/prometheus
    command:
      - '-config.file=/etc/prometheus/prometheus.yml'
      - '-storage.local.path=/prometheus'
      - '-alertmanager.url=http://alertmanager:9093'
      - '-storage.local.memory-chunks=100000'
    restart: unless-stopped
    expose:
      - 9090
    ports:
      - 9090:9090
    networks:
      - monitor-net
    labels:
      org.label-schema.group: "monitoring"

  alertmanager:
    image: prom/alertmanager
    container_name: alertmanager
    volumes:
      - ./alertmanager/:/etc/alertmanager/
    command:
      - '-config.file=/etc/alertmanager/config.yml'
      - '-storage.path=/alertmanager'
    restart: unless-stopped
    expose:
      - 9093
    ports:
      - 9093:9093
    networks:
      - monitor-net
    labels:
      org.label-schema.group: "monitoring"

  nodeexporter:
    image: prom/node-exporter
    container_name: nodeexporter
    restart: unless-stopped
    expose:
      - 9100
    networks:
      - monitor-net
    labels:
      org.label-schema.group: "monitoring"

  cadvisor:
    image: google/cadvisor:v0.24.1
    container_name: cadvisor
    volumes:
      - /:/rootfs:ro
      - /var/run:/var/run:rw
      - /sys:/sys:ro
      - /var/lib/docker/:/var/lib/docker:ro
    restart: unless-stopped
    expose:
      - 8080
    networks:
      - monitor-net
    labels:
      org.label-schema.group: "monitoring"

prometheus.yml
global:
  scrape_interval:     15s
  evaluation_interval: 15s

  external_labels:
      monitor: 'docker-host-alpha'

rule_files:
  - "targets.rules"
  - "host.rules"
  - "containers.rules"

scrape_configs:
  - job_name: 'nodeexporter'
    scrape_interval: 5s
    static_configs:
      - targets: ['nodeexporter:9100']

  - job_name: 'cadvisor'
    scrape_interval: 5s
    static_configs:
      - targets: ['cadvisor:8080']

  - job_name: 'prometheus'
    scrape_interval: 10s
    static_configs:
      - targets: ['localhost:9090']

You database got corrupted. Blow it away.

It changed nothing I said I have removed all the containers + images @brian-brazil

Your setup must corrupt the database then. Perhaps some accidental read-only or "clean up on restart" thing? Or you mapped two things to the same location?
I'm not an expert in parsing docker-compose config, but this is almost certainly an external setup problem rather than a Prometheus problem.

So I think the problem comes from my vbox machine who run Prometheus. Thank you for the help


This product provokes an error in the app

What

https://world.openfoodfacts.org/product/0804531111606/coconut-drink-taste-of-inspirationstas-brandvara-rood-drink-co-ltd
Link for a scannable barcode: barcode-804531111606 (in our case, the initial 0 was dropped)

I'm able to reproduce it only by scanning the barcode. It's not a search issue


Update recipe

This is a placeholder/reminder to have a look at this recipe, re: https://github.com/conda-forge/staged-recipes/issues/27507.
Please ping me if I don't check back in on this within a week.

I used grayskull to create the recipe but I don't see any changes. I'm not sure if this PR is in the correct place.
https://github.com/arturdaraujo/staged-recipes/commit/eb1073099e097e262f0a1995d8e5d7ac16030a52

I think I got it now. I updated the recipe directly in featurewiz-feedstock

it should be fixed with #39

Just merged! Thank you guys so much!

Sorry, I will wait

This first needs https://github.com/conda-forge/lazytransform-feedstock/pull/19.

Is there anything that I can do on my end now that lazytransform is updated?

@arturdaraujo as a first attempt, there should be a "Re-run" button/link that you can click on the previous failed build attempt: https://github.com/conda-forge/featurewiz-feedstock/runs/32164285178

If that doesn't work, then we might need a new PR to make further adjustments.


innerRef does not work as expected

As rightfully pointed out in https://github.com/jxnblk/rebass/issues/72#issuecomment-315534122, since 1.0.0 we should start using innerRef to get the reference as that's the way it's done in styled-components.
However innerRef doesn't actually work as expected. I suspect this has to do with the fact that in src/create-component.js and src/hoc.js components are wrapped in a way that innerRef doesn't get passed down to the children. Some details about this are explained in here: https://github.com/styled-components/styled-components/issues/927#issuecomment-309140340.
A minimal reproducible test case for this issue can be seen here:
import { Input, Button } from 'rebass'

class InputWrapper extends React.Component {

  constructor(props) {
    super(props)
    this.inputRef = null
  }

  render() {
    return (
      <div>
      <Input innerRef={ c => this.inputRef = c } />
      <Button onClick={() => this.inputRef.focus()}>Focus</Button>
      </div>
    )
  }

}

@jxnblk Any ideas on how to get around this?

any updates on this?

nope. Unless you tweak the way the HOC creates the components, there's no other way to fix this

I haven't been able to get innerRef working with 2.0 either yet.
However, using the <Ref /> component from Semantic UI React has solved this (at least temporarily) for me.
import { Ref } from 'semantic-ui-react';
import { Input, Button} from 'rebass';
/* ... */
<Button onClick={() => console.log(this.InputRef.value)}>Log Value</Button>
<Ref innerRef={(node) => { this.InputRef = node }}>
  <Input />
</Ref>

Perhaps a similar helper could be added to Rebass.
https://github.com/Semantic-Org/Semantic-UI-React/tree/5a37f2899fcb048a01a6a51d078455f5eb9219df/src/addons/Ref

I've been digging through the code for Input a bit and followed its execution.
The problem appears to be that here
https://github.com/jxnblk/styled-system/blob/1303da49ebf82f9d5db49ba9a816ceddac58a4a6/system-components/src/System.js#L52
system-components uses clean-tag to insert another component-layer.
The call to createComponent here should create a styled('input'), but it creates a styled(Clean.tag)
One solution would be to make the render function of BaseStyledComponent smarter.

Actually, I see now that there's already a hack in place to make this work when styling a clean-tag component directly...
But in this case, the clean-tag thing is wrapped in another component here
So, what needs to happen is that system-components adds that same hack:
const div = props => React.createElement(tag, props)
div.defaultProps = {
  blacklist: Object.keys(propTypes)
}
// Trick styled-components into passing innerRef
div.styledComponentId = 'lol'

Closing this since I think #188 addresses this. Please open a new issue if not


Removed the hard-coded /wiki and send wiki-data when type is wiki

Heb de /wiki folder eruit gesloopt en heb in de getServersideprops aangegeven:
als wikipage > stuur alle wikipages met title/url mee om het menu aan de zijkant te genereren.

@antw Did you create a Wikipage first in the admin? When you navigate to localhost:8000/wt/cms and login with admin/admin, you can create a Wikipage by clicking on: Pages > Home Page > 3 dots at the top > Add Child Page. If you add a page called 'testpage' for example, you can navigate to localhost:3000/testpage.
If have done this, does it work?

If have done this, does it work?

That worked, thanks! It works fine.
I've not used Wagtail before and the readme mentions visiting /admin, but that didn't work (404). I eventually found /wt/admin but that didn't have the option to create a page. Could we add something about this to the readme?


Add "NULLS NOT DISTINCT" support

PostgreSQL v15 supports NULLS NOT DISTINCT statement. Please add it (as optional) when creating unique constraints or indexes.

We should probably add two methods nullsNotdDistinct() and nullsDistinct().

Hi all, started researching this one. I'd like to implement it.


Splash page: Looks broken on IOS, there is no login/join part at the bottom

Any updates on this?

It doesn’t seem to be fixed.

@timburleigh did you check on https://ci.una.io/test ?

I just checked. The splash page isn’t activated on that site so I can’t check. So the fix is not in an update yet?

Ouch! My mistake - mixed this up with homepage cover. Splash issues are simple HTML/CSS updates, but still need attention from @AlexTr


axios.create() does not export the same API as axios

I am using axios.create() to create new instances of axios and thereby avoid adding interceptors to the global axios object.  Unfortunately, I had to spend a bit too much time discovering that axios.create() does not return a function, like require('axios') does.
This means that I cannot use the following way of invoking my axios instance:
var axios = require('axios');
var instance = axios.create({ foo: 123 });

instance({ //this needs to be `instance.request` in order for it to work
  url: '...',
})
  .then(handler)
  .catch(errHandler);

I am fine using instance.request instead of just instance, but it is inconsistent with the API exposed by the default axios object.
Solutions:

Modify axios.create to return a bound function call to Axios.prototype.request() instead of the plain axios instance object. This is the same thing that is exported by axios.js.
If you're not up for doing that, maybe we can just document this behavior in the README under axios.create.

I would love to implement either solution: just let me know which you prefer (if any).

I don't like the idea of creating an instance of something and then using that instance as a function, but I would be happy to merge a PR that updates the README. Thank you!

when i do this
// config/axios.js
import axios from 'axios';

import ApiHelper from '../helper/ApiHelper';
import InterceptorHelper from './../helper/InterceptorHelper';

export const interceptorHelper = new InterceptorHelper();
export const apiClient = axios.create({
   baseURL: ApiHelper.getUrl()
});

and then in another file i try to
import { apiClient, interceptorHelper } from './axios';

const interceptor = apiClient.interceptors.request.use((config) => {
        console.log(config);
});

then i don't get this console.log and interceptor variable is 0
solution for now:
// config/axios.js
import axios from 'axios';

import ApiHelper from '../helper/ApiHelper';
import InterceptorHelper from './../helper/InterceptorHelper';

axios.defaults.baseURL = ApiHelper.getUrl();

export const interceptorHelper = new InterceptorHelper();
export const apiClient = axios;


Let user fill in end-questionnaire even without gps location.

Comment from client 5mins ago: "Good morning! I am trying the version you sent me yesterday, and I have a small problem to finish the tracking. When I try to end the trip and go to the questionnaire it asks for a GPS location, which it does not find, so therefore I can't go to the survey. Would it be possible to continue to the questionnaire eventhough it does not reach GPS signal?"

Audrius, there will be small bug fixes and changes during this and next week when the client is testing the app in Jotunheimen.

Hi, Nicklas. Committed.

Ok, Let me know during testing with client.

Checked