Add support for EXECUTOR_RESET_VARS

Changes proposed in this PR

Add support for specifying a list of environment variables to clear in cook executor with EXECUTOR_RESET_VARS

Why are we making these changes?
Some environment variables may be set as part of starting the cook executor itself, which we would prefer not to propagate to the child process. This environment variable allows setting a list of environment variables to clear.

Awaiting green build


MINIFI-41 - CLI utility for template.xml -> YAML and YAML validation

The CLI utility should not be in the bootstrap module. The bootstrap module is specifically for things that get run as part of the bootstrap process. This CLI utility is unlike any other portion of the project and should be moved into it's module.
In order for it to access the Schema pojo's it may be best to bring those out into another module as well.

@JPercivall we wouldn't need to move things around that much if we put lib/bootstrap/* on the template cli's classpath, is that an acceptable approach?

@brosander its not just the functionality we need to take into account, it's putting the classes in logic places for further development. If the schema pojos are no longer just used in the bootstrap then it doesn't make sense to leave them in there (and make any module that wants to use them depend on the entire bootstrap module).
Also, since this is a CLI utility that is not dependent on an instance being deployed I don't think it makes sense to bundle this in a distribution. When thinking specifically in terms of Design and Deploy, the template will be created and transformed (using this CLI) in one location and then distributed to many MiNiFi instances.
@apiri may want to weigh in as well.

@JPercivall I moved out all of the schema logic to minifi-commons/minifi-commons-schema.  Then I pulled out the config main and supporting classes into minifi-toolkit/minifi-toolkit-configuration.  Finally I created an assembly in minifi-toolkit/minifi-toolkit-assembly.

In the schema module, all of those classes extending BaseSchema are in the same package as the utility classes (like SchemaLoader, SchemaSaver, etc.) and it makes it a bit hard to digest. I would prefer them to be separate.

Unless if I'm missing them, validation issues are not created in Schemas created by DTOs. I don't think we can assume the template will always contain valid values.

You're right, my mistake

@JPercivall I think I've addressed your feedback

working on tests for validation now

The packaging being separate certainly makes sense.  The utility is kind of similar in context as that of the "externals" in the core NiFi project.  Seems fair to keep it distinct given how instances would likely be established.  We can evaluate including it in the resulting assembly as we move forward.  May make sense to include it in these early stages to get people running.

Probably outside the scope of this PR/Ticket but the ConfigSchema should raise a validation issue when multiple components have the same name. It will be pretty common in templates to have multiple processors with the same name (ie. LogAttribute).

@brosander did you get a template/config working that didn't include a queue prioritizer? When I run with '' for the queue prioritizer field in the config.yml I see the error below. I cross referenced with the flow xml as it appears in the NiFi instance I made the template in and I think there should be an if statement on line 541 of ConfigTransformer where it won't add the "queuePrioritizerClass" element at all if it's empty.
org.apache.nifi.controller.FlowSynchronizationException: java.lang.IllegalArgumentException: Unable to set prioritizer : java.lang.ClassNotFoundException:
at org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:317) ~[nifi-framework-core-0.6.0.jar:0.6.0]
at org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1287) ~[nifi-framework-core-0.6.0.jar:0.6.0]
at org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:72) ~[nifi-framework-core-0.6.0.jar:0.6.0]
at org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:629) ~[nifi-framework-core-0.6.0.jar:0.6.0]
at org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:479) ~[nifi-framework-core-0.6.0.jar:0.6.0]
at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:79) ~[na:na]
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800) ~[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444) ~[jetty-servlet-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791) ~[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294) ~[jetty-servlet-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349) ~[jetty-webapp-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342) ~[jetty-webapp-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) ~[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) ~[jetty-webapp-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.server.Server.start(Server.java:387) [jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.server.Server.doStart(Server.java:354) [jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:662) [nifi-jetty-0.6.0.jar:0.6.0]
at org.apache.nifi.minifi.MiNiFi.(MiNiFi.java:138) [minifi-runtime-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.apache.nifi.minifi.MiNiFi.main(MiNiFi.java:233) [minifi-runtime-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
Caused by: java.lang.IllegalArgumentException: Unable to set prioritizer : java.lang.ClassNotFoundException:
at org.apache.nifi.controller.StandardFlowSynchronizer.addProcessGroup(StandardFlowSynchronizer.java:1009) ~[nifi-framework-core-0.6.0.jar:0.6.0]
at org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:271) ~[nifi-framework-core-0.6.0.jar:0.6.0]
... 27 common frames omitted

@brosander were you able to get a flow running using a flow that was transformed from a template that uses an SSL context service? I'm looking at the config and code and I believe there are going to be problems. When the template is exported the properties that "Identify Controller service" have the value of the ID. This causes problems for us because we use Names as our IDs and the SSL context service will have the name "SSL-Context-Service".
We would either need to scan through every property to determine if it was referring to the SSL context and then change it to the proper name; or implement a way to set the ID of the SSL context service. I dislike both options: option 1 would require knowledge/parsing of arbitrary processor properties, option 2 would be implementing ID just for this one purpose.
It may be better to hold back the commit adding SSL controller service support and create an improvement jira that you can use that commit towards later.

@JPercivall the Queue Prioritizer field defaults to empty string if it's not set, meaning it shouldn't matter whether the field is in the yaml or not, it will still wind up being the same empty string when parsed (https://github.com/apache/nifi-minifi/blob/master/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/ConnectionSchema.java#L56)

@JPercivall Removing the ssl context service code for now.

Right it'll be an empty field but I think from the flow.xml side, there is a difference between "" and it not being there. When I ran it without a prioritizer I observed that error, can you run it properly as it currently is?

I see what you're saying now, I was just surprised that that would be different than a hand-edited YAML with an empty or nonexistent queue prioritizer field.  I can change that but I don't think it's really within the scope of this jira.

I don't think it is different than with hand-edited YAML and you're probably right about it being outside the scope of this Jira. Either it was just overlooked, I forgot that that was a limitation or I messed up thing when configuring it.

For RemoteProcessGroups, you need to set the destination name of the connection to be the id of the port (not the name of it). Check out this config file (just rename to yaml, Github doesn't let me upload yaml files). It was generate using the toolkit script and it produces the error:
org.apache.nifi.controller.FlowSynchronizationException: java.lang.RuntimeException: Found Invalid Connectable ID for Destination: response
Once the destination name is properly set to the id of the port (b23a4621-cf19-42e6-967c-ffd3716e6a24) it properly runs.
invalidDestintationName.txt

+1
Did a contrib-check build, reviewed code and all comments were addressed, tested functionality and it all looks good. Thanks for the contribution @brosander I will squash it and merge it in.


OpenAPI support (as base or as export)

Is your feature request related to a problem? Please describe.
While the flutter first approach is appealing I am afraid that exposing the server for other (web/other) clients is only possible with a lot of extra work that feels like duplicating the same thing. The models are already in yaml format and I'd have to write an additional OpenAPI/ swagger file and keep it up to date manually.
Describe the solution you'd like
serverpod could be built up based on an OpenAPI definition as single source of truth: models and routes are generated based on the swagger definition instead of the custom yaml format. OpenAPI definitions are the most widely used definition in backend development and creating another yaml definition seems a lot.
Doing so makes it easy to expose the API definitions to other clients.
Alternatively an option could be provided to easily export compliant OpenAPI definition.
Describe alternatives you've considered
Additional context

Generating an OpenAPI definition should be (easily) possible.
But I don't really know, how using OpenAPI as a single source of truth would work. Especially since Serverpod also manages the database connection.

Database definitions is a very different case indeed and OpenAPI in itself is unrelated to database entities anyway. Only the public facing models (and routes) are part of it.
In regards to single source of truth: the definition of the returned models via yaml seems veeeery similar to what an OpenAPI definition offers. It also defines e.g. model names, attribute names and types (int, string etc) and supports types probably not covered yet (I may be wrong) by serverpod such as enums. So imo it makes sense to reuse the popular structure from OpenAPI instead of creating a new one.
You'd end up with a OpenAPI server (serverpod) and client generator with the added benefit of building up on a well supported, documented and popular API definition system and be able to reuse all of its tools.

I got a feel that you only had a superficial look at Serverpod.
Serverpod strips away a couple of steps compared to other API generators. Serverpod will actually analyze your server code and add the corresponding methods in a generated client library. It supports things like null safety, optional and named parameters and passing of native Dart objects between the client and the server.
Having generated bindings to the database is super useful. You can use native Dart types to access records and send them directly to the client without any manual transformation. (If needed, you can specify columns that should be stripped out if they are internal to the server.) It also allows you to add these objects straight the cache, simplifying another common task.
There are obviously pros and cons when it comes to building your own API structure. This is the route we choose for now, but we may reconsider in future versions if we are able to achieve the same type of functionality through other solutions. A benefit there would be to easier support other client platforms, for instance.

Thanks for the clarification. Indeed I only took a deeper look in the approach of how serverpod works, less into the internals.
The first thought that crossed my mind was "oh, how can other non flutter clients talk to the server" and offered my thoughts here.
I was a fan of reusing database entities for the API models as well, but having separated DTOs was ultimately the winner: more duplications, yet way higher flexibility as the API models will diverge soon enoguh. This is where OpenAPI as layer in between could help.
To solve the issue from my first thought a simple OpenAPI export would be enough for sure.

I can definitely see how OpenAPI export would be beneficial! We will keep that in mind for the future.

Just had look at it...
Please correct me if I'm wrong.
Serverpod has a single path for each endpoint. All method calls use POST requests. The name of the called method is specified in the request body.
Overall, this is not an ideal scenario, to represent in the OpenAPI Standard. But it is possible.

Example
openapi: "3.0.3"
info:
  title: "TEST"
  version: 1.2.3
tags:
  - name: TESTTAG
paths:
  /testEntpoint:
    post:
      tags:
        - TESTTAG
      summary: TEST
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/TestEndpointTestMethodCall'
                - $ref: '#/components/schemas/TestEndpointOtherMethodCall'
              discriminator:
                propertyName: method
                mapping:
                  TestMethod: '#/components/schemas/TestEndpointTestMethodCall'
                  OtherMethod: '#/components/schemas/TestEndpointOtherMethodCall'
      responses:
        "200":
          description: "TEST"
components:
  schemas:
    TestEndpointTestMethodCall:
      type: object
      description: Indicate the endpoint to call the TestMethod
      properties:
        arg1:
          type: string
    TestEndpointOtherMethodCall:
      type: object
      description: Indicate the endpoint to call the TestMethod
      properties:
        arg2:
          type: string

But a documentation like this probably wont be useful, since many editors / UIs (every one I tested) don't seem to support this (edge) case. Maybe my example is wrong, but that's, how I understood the standard and the swagger editor doesn't show me a warning.
In addition. It might be hard to add modules to the documentation. (It's the same problem we have when creating the sql commands for the database.)
One solution might be to generate the documentation at runtime. This would allow us to include all modules and the core package easily.

Want that feature too. It would make serverpod much better and it would enable developers not using dart/flutter frontends to generate their Api Client from those specs ( with openapi-generator ).

OpenApi support custom fields,  so adding some to support database bindings.
So will still be yaml for you but less work for people to onboard with serverpod as definition will be a standard.
I dream of a design first approach framework for dart since a while ^^ even try some prototypes. That's definitely doable.

is it fixed ?  https://github.com/serverpod/serverpod/pull/1454 not yet work


Add slackbot support

Note to reviewer, I think due to squashing, lots of commits are listed here that aren't actually changing anything, really only consider anything after merging main into develop


feat: add download count field and unit testing for attachment.

Add download count field in attachment table. See GitHub API
Add unit testing.

It takes a migration to add that new field, right ?

@strk Yes.

LGTM

isn't this still lacking a migration ?

LGTM


Upgrade to PHPStan 0.12

PHPStan\Analyser\Scope is now an interface. And it's only implementation MutatingScope is marked as @internal So I removed our scope class. It didn't affect any tests. If we find any error, we can try to fix it in another way.

Currently, the biggest issue is in the OptionsResolver class. We are getting errors like Parameter #1 $option of method                                                   _HumbugBox06db9be5fe9f\Symfony\Component\Console\Input\InputDefinition:          :addOption() expects                                                             _HumbugBox06db9be5fe9f\Symfony\Component\Console\Input\InputOption,              Symfony\Component\Console\Input\InputOption given. because PHPStan now distrubuted as PHAR file. (IMO we can drop providing a Laravel specific command and just let the users run PHPStan normally)

ModelTypeHelper and RelationCreateExtension classes still needs some work.

Closes #381

This is a work in progress or is already stable?

Like I wrote, there are still some errors to solve. Need some ideas for how to solve them.

Thanks!

Another error: analyzing tests/Features/Methods/ModelExtension with the latest PHPStan master, results in a segmentation fault.

Do you would like to continue this work of the upgrade?

Some parts, yes I'd like to fix. But for other parts solution is not easy. So I need help, or we need to discuss it.

I am using the bare phpstan command in my Github Actions instead of the laravel-specific command (not sure why that is the case anymore). Didn't seem to make a difference, so dropping it got my personal vote (if it helps at all).

Hummm, how about some default options? We need to make sure they are somehow ported.

The problem is, we are cloning the command definition here, and this has a different namespace because of PHAR. So later when we want to add options, it fails. So, we can just manually  add every option that PHPStan defines. But don't know that's a good idea :smile:

I fixed some more errors. There are still some small errors left, but the biggest one (one about the OptionsResolver class) still remains.

PHPStan 0.12 is gonna be released this week. (probably tomorrow)
Currently, we only have the OptionsResolver issue. Other than that, I think we are good to upgrade.
I'm writing the error here also so maybe other people can provide a solution too.
------ -------------------------------------------------------------------------
  Line   Console/OptionsResolver.php
 ------ -------------------------------------------------------------------------
  75     Parameter #1 $option of method
         _HumbugBox74420952e3e6\Symfony\Component\Console\Input\InputDefinition:
         :addOption() expects
         _HumbugBox74420952e3e6\Symfony\Component\Console\Input\InputOption,
         Symfony\Component\Console\Input\InputOption given.
  81     Parameter #1 $option of method
         _HumbugBox74420952e3e6\Symfony\Component\Console\Input\InputDefinition:
         :addOption() expects
         _HumbugBox74420952e3e6\Symfony\Component\Console\Input\InputOption,
         Symfony\Component\Console\Input\InputOption given.
  87     Parameter #1 $option of method
         _HumbugBox74420952e3e6\Symfony\Component\Console\Input\InputDefinition:
         :addOption() expects
         _HumbugBox74420952e3e6\Symfony\Component\Console\Input\InputOption,
         Symfony\Component\Console\Input\InputOption given.
  93     Method NunoMaduro\Larastan\Console\OptionsResolver::getDefinition()
         should return Symfony\Component\Console\Input\InputDefinition but
         returns
         _HumbugBox74420952e3e6\Symfony\Component\Console\Input\InputDefinition.
  93     Property NunoMaduro\Larastan\Console\OptionsResolver::$definition
         (Symfony\Component\Console\Input\InputDefinition) does not accept
         _HumbugBox74420952e3e6\Symfony\Component\Console\Input\InputDefinition.
 ------ -------------------------------------------------------------------------

Have I resolved it right?

Since there was some silence about this issue, I went ahead and removed the Laravel specific command we provide. In my opinion, this is a better solution. People will just use PHPStan like they normally would. And it's one less thing to maintain. In the past I see this command cause some issues.
Also, I introduced a new phpstan-baseline file. This was about a bug in PHPStan. But thanks to this new baseline future, we don't need to wait for it to be resolved.
And of course in the other branch (feat/adds-support-to-laravel-7)  we should change the README to reflect this changes.

People will just use PHPStan like they normally would.

+1

Please use spaces in phpstan-baseline.neon

I went ahead and removed the Laravel specific command we provide

Thanks, that was a PITA especially for people who've already worked with phpstan before 👍

Thanks for your work on this, can you double check why tests are passing?
I would like to re-discuss the php artisan code:analyse. I think it's important to keep this command, for new comers, and for default options.

Made a tweet about this to collect some feedback: https://twitter.com/enunomaduro/status/1203956328714117121.

Hi, MutatingScope is no longer marked as @internal, you were looking at some old dev-master code. The child class in Larastan was used for some hacks around array access I think. You should definitely test this on a real-world project to be sure. I'm fine with your Scope extending MutatingScope, that's why I made it overridable.

Currently, the biggest issue is in the OptionsResolver class.

PHPStan no longer allows using its dependencies directly in consumer code. The class should be rewritten - you can hardcode current PHPStan options and arguments, seems like the easiest approach.

Anyway, please include me in this kind of discussion next time so you don't have to speculate how to solve something, it's valuable feedback for me to... Thanks.

Funny results so far:

It definitely shouldn't be dropped for technical reasons. The PHPStan CLI options are stable and do not change that often. They could be hardcoded instead of asking Symfony for them.

This is essentially a PHPStan extension. So users just install and use the PHPStan like they normally would. Like phpstan-mockery or phpstan-doctrine I think there is no value to introduce another abstraction layer on top of that. And in the past, we had many problems related to that command.
About MutatingScope, I tested it after removing our Scope implementation. (In two of my personal projects, also in work projects) And everything seems fine :+1:

Travis build is failing because we are running PHPStan on a fresh Laravel instance. And that code has some issues.
We can either reduce the level we are running (currently at maximum) or we can try to find another way to test.

I think there is no value to introduce another abstraction layer on top of that.

Let me share some of the values why we had this from the first place:

Easy introduction of static analysis for Laravel developers: some Laravel developers don't even know what vendor/bin is, or what phpstan is. But they know what php artisan is, so it's just easy for them this way.
It's more elegant calling php artisan code:analyse than ./vendor/bin/phpstan --options.
Default parameters, like memory limit, folders, default configuration file, and others. ( maybe this can be different way now )
Opens the door on having config/larastan.php under the config folder of an Laravel app. And this is the place where all configurations files of laravel packages lives. Those options would eventually be proxied down to the options on the phpstan cli.

I agree with this, the decision to drop artisan command should not be coupled with PHPStan 0.12 support, so that as many people as possible can use the latest version.

Thanks for helping here @ondrejmirtes! Let me know what do you think @canvural 👍

Question: If all that's left is support for the command again, can I use this branch to work with PHPStan 0.12 already? Would love to be able to upgrade already.

I think there is no value to introduce another abstraction layer on top of that.
Let me share some of the values why we had this from the first place:

Easy introduction of static analysis for Laravel developers: some Laravel developers don't even know what vendor/bin is, or what phpstan is. But they know what php artisan is, so it's just easy for them this way.

It's more elegant calling php artisan code:analyse than ./vendor/bin/phpstan --options.

Default parameters, like memory limit, folders, default configuration file, and others. ( maybe this can be different way now )

Opens the door on having config/larastan.php under the config folder of an Laravel app. And this is the place where all configurations files of laravel packages lives. Those options would eventually be proxied down to the options on the phpstan cli.

Default Laravel application ships with PHPUnit. And one of the recommended ways to run tests is running vendor/bin/phpunit So I'm pretty sure most of the devs are familiar with running binaries from Composer dependencies. There is no artisan command provided to run the PHPUnit tests.
By running /vendor/bin/phpstan people will know they are using a tool called PHPStan. I think this is important to give credit.
Like I said default Laravel application ships with phpunit.xml configuration file. Maybe we can also provide a default phpstan.neon file, with configured defaults. Would this be possible? @ondrejmirtes, @nunomaduro
One other benefit is, it's one less thing to maintain. It caused a lot of issues in the past. And there are still some open issues about the command.
@ondrejmirtes

I agree with this, the decision to drop artisan command should not be coupled with PHPStan 0.12 support, so that as many people as possible can use the latest version.

We have to change the command anyway. To either fix it or remove it. So I think this is a good place to discuss it.

It’s easy to make the command work and more people will be able to upgrade thanks to that. You won’t have to release a new major version...

And one of the recommended ways to run tests is running vendor/bin/phpunit So I'm pretty sure most of the devs are familiar with running binaries

I wouldn’t be so optimistic to state that most devs write tests.

I don't think they know what static analysis is if they even don't write tests.

It's exactly the opposite - even without tests or even testable code, you can still use static analysis for finding bugs, because it's basically free.

That's right. But if a person doesn't even know what is testing or doesn't write tests, chances are they never heard of what is static analysis. Even if you search in general about testing, unit tests have more information than static analysis.
We can put a default configuration file to the users' directory. And then write in readme all they have to do is to run vendor/bin/phpstan analyse Its not much different than writing php artisan code:analyse So I can't see what is the problem here.

We can put a default configuration file to the users' directory.

How would you put it there?
My final stance is that discussion about removing php artisan code:analyse should be separate from upgrading to PHPStan 0.12. Decoupling unrelated things is good practice. We're stuck here for no reason.

@canvural I trust you for taking the best decision here. Keep in mind, that removing a command is also a breaking change, and we would need to target v0.5.
If we move in that direction, here are the actions:

[ ] Remove all the code of the command, and leave a deprecated warning that they should use ./vendor/bin/phpstan analyse and copy/paste the config from the given url.
[ ] Update the config on the root of the project to have the default options provided by the command.
[ ] Write an upgrade guide

Would it make sense to make a 0.4.4 release with PHPStan 0.12 support and deprecation notice of the Artisan command? And at the same time make 0.5 release with the command removed?

It doesn't have to be exactly at the same time, you can wait a week or two :) But I'm fine with the 0.4.4 and the deprecation notice. How exactly would it look like?

Are you asking about the deprecation message? We can put it in the release notes and also in the README. Also in code with phpdoc maybe. And then for 0.5 we can provide a simple upgrade guide.

@canvural what about adding a warning to the output ?

That might break something if people are using it in CI or some automated tools.

That might break something if people are using it in CI or some automated tools.

I agree, only if they are parsing the output.
Not changing the exit code and printing a line seems okay ?

Outputting the notice to stderr should be fine.

I updated the PR.
But I'm not sure why Travis fails. And ideas?

@canvural I think that I saw that phpstan removed orchestra dependencies
cc @ondrejmirtes

PHPStan never depended on orchestra.

It was removed from Larastan in August: https://github.com/nunomaduro/larastan/commit/457af86e6884c18010cb40b279ca8b00b390b0c2

No. It's still there :smile:

There is one error left in Travis build. It's about an error in the Laravel code itself. I sent a PR to fix it, but we are also testing on 5.8 and that fix will not be included there.
It's hacky but maybe we need another sed command like this one?

PHPStan now supports stub files where you can override phpDocs from 3rd party code if they’re wrong or if you for example want to add generics.

I created a stub like this
<?php

namespace App\Http\Middleware;

use Illuminate\Auth\Middleware\Authenticate as Middleware;

class Authenticate extends Middleware
{
    /**
     * @param  \Illuminate\Http\Request  $request
     * @return string|null
     */
    protected function redirectTo($request);
}

and registered in extension.neon
But the error is still there. Also tried with @phpstan-return string|null in stub.

The sed command you linked is doing something different. I don't know what are you trying to achieve. The stub you showed is overriding phpDoc for App\Http\Middleware\Authenticate::redirectTo() method. You can try to debug StubPhpDocProvider to see if it sees what you expect it to see.
Did you add the stub to stubFiles?

That sed command I linked was an example. It changes some doc block in the file to correct one. I was asking if we should do the same again.
Yes, I'm trying to change the App\Http\Middleware\Authenticate::redirectTo() return type with the stubs. But it seems it doesn't have any effect. It is registered in stubFiles. I'll try to debug.

That sed command I linked was an example. It changes some doc block in the file to correct one. I was asking if we should do the same again.

You could do something like sed -e 's/string/string|null/' -i app/Http/Middleware/Authenticate.php which would likely do the job just fine. Whether we should do that  though is not my question to answer.
For the record, while I missed the Twitter poll I would also be in favour of removing the Artisan command—or at least making it optional. I use multiple testing & SA tools, none of which operate via artisan. Instead I use make phpstan for example, with all tools added as Makefile targets.

The artisan command has always been optional. You can run PHPStan directly. If you use phpstan/extension-installer, you don’t even have to include Larastan’s extension.neon manually.

Sorry @ondrejmirtes, I should have clarified. While it's always been optional in the sense that you don't need to run it, when things do go wrong it can prevent any other artisan commands from being run (as was the case here before it was fixed).
If we can't remove it entirely, it'd be nice if there was a way to prevent it being auto-loaded to avoid these issues in future for those that use phpstan directly. Just my two cents though of course—command or not, this package has still saved a ton of time with all the custom rules, so thanks for everything you folks have done for Larastan!

@ondrejmirtes makes any sense we require phpstan/extension-installer?

@nunomaduro No it doesn't. This package is for "happy path" users only. It should always be installed only by the end user. It's possible that someone wouldn't want it - for example when they want to cherrypick enabled rules from other extensions or that they cannot use it for some other reason.

I guess this is ready to merge. @nunomaduro
I'll update the changelog in a seperate PR. Maybe after nunomaduro:feat/adds-support-to-laravel-7 is merged.

I would like to review it and prepare some media content about it. What’s new, etc. can you give me one two extra days? @canvural
Ps: thousands of developers are grateful for your work on this.

This PR just upgrades PHPStan to 0.12, nothing new. But there are already some small changes in master

Running a couple tests now on the branch nunomaduro:feat/adds-support-to-laravel-7.


Order by sortable field inside nested list.

Hello
I have this schema:

[Document(StorageType = StorageType.Json, Prefixes = new string[] { "product" }, IndexName = "product-idx")]
public class ProductCache
{
      [RedisIdField][Indexed] public required string Id { get; set; }
      [Searchable(Sortable = true)] public required string Name { get; set; }

     [Indexed(JsonPath = "$.Id")]
     [Indexed(JsonPath = "$.Sku")]
     [Indexed(JsonPath = "$.Price", Sortable = true)]
     public List<VariantCache> Variants { get; set; } = new List<VariantCache>();
  }

public class VariantCache
{
      [Indexed] public required string Id { get; set; }
      [Indexed] public string? Sku { get; set; }
      [Indexed(Sortable = true)] public double Price { get; set; }
}

I need to sort products by the price inside list of VariantCache
How we can do this?
I try this:
query.OrderBy(p => p.Variants.Max(v=> v.Price))
and this:
query.OrderBy(p => p.Variants.Min(v=> v.Price))
and this:
query.OrderBy(p => p.Variants.First(v=> v.Price))
and this:
query.OrderBy(p => p.Variants.Select(v=> v.Price))
All the previous states didn't work and I got this error:
Unable to cast object of type 'System.Linq.Expressions.MethodCallExpression2' to type

'System.Linq.Expressions.MemberExpression'.
System.InvalidCastException: Unable to cast object of type 'System.Linq.Expressions.MethodCallExpression2' to type 'System.Linq.Expressions.MemberExpression'.

Please, can you help me URGENTLY?

What you are looking to do(use collection functions on a JSON array in an index) is not supported by Redis, hence Redis OM can't support those semantics. You can work around this limitation with smart properties:
var res = collection.OrderBy(x => x.MaxPrice).ToList();

Console.WriteLine(res.First());

[Document(StorageType = StorageType.Json, Prefixes = new string[] { "product" }, IndexName = "product-idx")]
public class ProductCache
{
   [RedisIdField][Indexed] public required string Id { get; set; }
   [Searchable(Sortable = true)] public required string Name { get; set; }

   [Indexed] public double? MaxPrice => Variants.Max(x => x.Price);
   [Indexed] public double? MinPrice => Variants.Min(x => x.Price);

   [Indexed(JsonPath = "$.Id")]
   [Indexed(JsonPath = "$.Sku")]
   [Indexed(JsonPath = "$.Price", Sortable = true)]
   public List<VariantCache> Variants { get; set; } = new List<VariantCache>();
}

public class VariantCache
{
   [Indexed] public required string Id { get; set; }
   [Indexed] public string? Sku { get; set; }
   [Indexed(Sortable = true)] public double Price { get; set; }
}

The downside of course is that this will lead to some denormilization.

@slorello89 It's worked very well, thank alot.

Great to hear @PioneerOfProgramming, closing.


ci for ghpages

We'd like to publish a simple gh page for this for internal communication. This should kick off a build every time the branch is updated.

Done, see website linked on main page


[TW#14029] JTAG docs not reference correct location/place for esp32.cfg

On page 8 bullet 3 of the jtag_debugging_for_esp32_en.pdf, there is a statement that reads:
Copy esp32.cfg in esp-idf/docs to the openocd-esp32 directory;

Unfortunately, this files does not exist there.  It does seem to exist at:
esp-idf/docs/api-guides
I'm not sure if the doc is in error or the project path.

JTAG debugging document has been updated and moved to http://esp-idf.readthedocs.io/en/latest/api-guides/jtag-debugging/index.html.


Add more content types to extractData

extractData currently only handles "application/json", otherwise it returns plain text. This PR adds support for "multipart/form-data", "text/event-stream", and "application/x-www-form-urlencoded".
Q: is there an easy way to share this function between client and server?

This is actually not where you want this functionality. extractData is only used for extracting JSON loader data for serialization in the HTML response for hydration. It doesn't make sense to extract and serialize form data and other types.


Hover outline

Closes #599

Can you also please make it so that selected layers (in addition to their transform cage bounding box) always display the outline (regardless of whether they're hovered)?


template_synology_diskstation_snmpv3/6.0 - SNMPv3 issues

Hello,
I am having major issues getting SNMPv3 to work with the mentioned template. It seems that Zabbix is having issues connecting to the Synology machine and either get 404 or wrong password, key or community.
Environment
Synology D920+
DSM 7.2-64570 Update 1
Zabbix 6.4.1
Running on Ubuntu Server 22.04 LTS (recently installed)
Both machines are on the same network.
The Issue trying to use SNMPv3
When trying to setup Zabbix to use SNMPv3 with both AuthPriv however I am getting the error:
Cannot connect to "xx.xx.1.16:161": Authentication failure (incorrect password, community or key).
Where as the logs of Zabbix gives little help
16845:20230717:093358.887 SNMP agent item "synoSystem.laLoadInt.3" on host "SynologyStorage" failed: first network error, wait for 15 seconds  16845:20230717:093413.910 SNMP agent item "synoSystem.ssCpuSystem" on host "SynologyStorage" failed: another network error, wait for 15 seconds  16845:20230717:093428.937 SNMP agent item "synoSystem.ssCpuIdle" on host "SynologyStorage" failed: another network error, wait for 15 seconds  16845:20230717:093443.961 temporarily disabling SNMP agent checks on host "SynologyStorage": interface unavailable  16842:20230717:093730.165 SNMP agent item "synoSystem.ssCpuUser" on host "SynologyStorage" failed: first network error, wait for 15 seconds  16845:20230717:093745.149 SNMP agent item "synoSystem.laLoadInt.3" on host "SynologyStorage" failed: another network error, wait for 15 seconds  16845:20230717:093800.183 SNMP agent item "synoSystem.laLoadInt.2" on host "SynologyStorage" failed: another network error, wait for 15 seconds
The Synology logs dosent even mention any tries on the SNMP service.
Do note that SNMPv2 does work.
Tried so far
So far Ive tried doing what is recomended in the readme;

If you receive authentication errors, try tos set the Authentication / Privacy protocols to MD5+DES and if this works, then try to upgrade the encrypption step-by-step, changing only one attribute at a time. The choices what Zabbix can support and what is supported in a given version of DSM can be different. Find a common ground with the most strongest crypto. DES, SHA1 and MD5 are not considered cryptographically secure anymore.

That is trying each and every Auth and Pirv combination. From Auth MD5 to AuthPriv SHA512/AES265C.
between each try doing an disable/re-enable of the host just to ensure Zabbix re-tries.
This along with some restarts of the Zabbix server itself..
Anyone has any idea what to try next or experiencing the same issues?

I am in the same boat.

Hello!
Thank you for a request!
Unfortunately, your question is out of scope


Support reversing bool sequence.

This PR tries to fix issue #13717.

Can one of the admins verify this patch?

@tensorflow-jenkins test this please

@ebrevdo
I had made some changes according to your comments.

@tensorflow-jenkins test this please


Update KEEP token doashboar to the latest changes to smart contracts

This PR fixes:

subscription to the Staked event. Staked event's params have changed. Currently, a Staked event emits: owner, operator, beneficiary, value, instead of from, value.

Delegation and undelegation went trough

Converted to draft since the event subscription does not work with MetaMask 8.0.2. Works with 7.7.9. I'm trying to figure out what's wrong.

It seems like an error on the Metmask side https://github.com/MetaMask/metamask-extension/issues/8894. Event subscription works like a charm in 8.0.3.


Adding wiki-images directory.

Current coverage is 37.46%

Merging #39 into master will increase coverage by +0.06% as of 786d230

@@            master     #39   diff @@
======================================
  Files          205     205
  Stmts        11056   11056
  Branches      1939    1939
  Methods          0       0
======================================
+ Hit           4136    4142     +6
  Partial        537     537
+ Missed        6383    6377     -6

Review entire Coverage Diff as of 786d230

Powered by Codecov. Updated on successful CI builds.


Cleanup and add travis/tox testing

Need to clean up yamllint errors and fix problem with the errors not being reported.

@cooktheryan if this PR gets merged, we'll probably want to update the master branch to be a protected branch and require travis tests to pass prior to merging.

That sounds fine. Ping me tomorrow I just want to understand the impact against the rest of the items in the repo


'set_text_overlay' service does not allow Jinja2 templates / sensor values

dahua.set_text_overlay service does not allow Jinja2 templates. For example;
tap_action:
  action: call-service
  service: dahua.set_custom_overlay
  target:
    entity_id:
      - camera.street_main
  data:
    group: 0
    text1: Cars {{ states('sensor.smart_motion_vehicle') }}
    text2: People {{ states('sensor.smart_motion_human') }}

When the automation/script is committed it nulls the template - example below
tap_action:
  action: call-service
  service: dahua.set_custom_overlay
  target:
    entity_id:
      - camera.street_main
  data:
    group: 0
    text1:  '[object Object]': null
    text2:  '[object Object]': null
name: Custom Overlay

The above Jinja2 template works correctly in the developer tools.
dahua.set_text_overlay service should be able to consume sensor data / templates for it to be useful. Using a static text string works but as mentioned, not very useful.

You need to put single-line templates between (double) quotes:
text1: "Cars {{ states('sensor.smart_motion_vehicle') }}"

You need to put single-line templates between (double) quotes:
text1: "Cars {{ states('sensor.smart_motion_vehicle') }}"

That just converts the Jinja template into a static string and doesn't pull in the values...

Thus the error is gone but the template it's processed :-(
Strange to see '+' signs instead of spaces anyway.
Honestly I don't now whether a template is accepted for text1.
Did try that via Developer tools?
But I think the problem is due to the service call in lovelace.
See: https://community.home-assistant.io/t/how-to-use-service-template-with-tap-action/192638

But I think the problem is due to the service call in Lovelace. See: https://community.home-assistant.io/t/how-to-use-service-template-with-tap-action/192638

Thank you, that was the problem, the service call doesn't work from the Lovelace card. If I use the same method an automation it works, weird. Clearly a bug with HA Lovelace.
Note, I had to insert underscores _ to get rid of the + that replaced the spaces. I think from Dahua is not accepting spaces.

just a related note, if you want to put in a space character, use %20


Priority Features

[ ] #281
[ ] system method explicit void enforcement https://github.com/demergent-labs/kybra/issues/123
[ ] #301
[ ] #302
[ ] #306
[ ] #284
[ ] #285
[ ] #286
[ ] #287
[ ] #303
[ ] #304
[ ] #305

This summary ticket has been moved to Zenhub as an Epic. The work still needs to be done, but this issue can be closed.


Deleted agenda items are still displayed in list when navigation back

Create two topic items
Delete one of the created items
Open the other topic item
Navigate back

The deleted topic item is in the topic list again. When reloading the page the deleted entry disappears.

In my pull request (#2563) I wrote this:

The problem is the following:

Open agenda item list => agenda_list subscription is open
Delete one item => The autoupdate sends a single-field update with the new value for the meetings agenda_item_ids, which will cause the client to consider these fields to be deleted, but NOT the autoupdate shared worker, which will continue to store them
Go to the topic detail view
Go back from the topic detail view => In the short moment where the parameters change, the detailview doesn't have an id and therefore subscribes to the agenda_list_minimal (as it now believes itself to be the new topic form, which needs the agenda list information) The shared worker will send the already stored data (see point two: it includes the deleted models) as the initial data for the subscription which will then be used by the client completely unfiltered
See that the deleted models seem to have returned

Honestly we should do something about this quirk of our autoupdate handling system, but I didn't really have any idea what exactly can be done so I "fixed" it this way for now

We may need a follow up issue
@bastianjoel  what is your opinion on this

I would consider #2563 a hotfix and therefore reopen this issue.
I think the best way to fix this is by removing deleted elements from the autoupdate cache.

It is still possible for the removed agenda items to be displayed in the agenda.

add an election to the agenda, then remove it and then add it again
you immediately go to motions and via multi-select add a motion to agenda
the election you removed and added is displayed twice in the agenda list and if you saw the agenda-list with too many items then the items will also be displayed in the agenda itself

My approach solving this within the shared worker does not work as expected. We need to solve this somewhere else.


RedisClusterNode.hasSameSlotsAs() is unreliable

Bug Report
Current Behavior
When using the RedisClusterNode::hasSameSlotsAs() function to compare nodes retrieved from RedisClusterClient::getPartitions() against nodes from ClusterPartitionParser::parse (via RedisClusterCommands::clusterNodes) it incorrectly returns false.
This is because the nodes in the client partitions table have a slot range of null whereas the parsed nodes have a non null but empty slot range.
The parsed nodes are created with a non-null BitSet even if they have no slots:
https://github.com/lettuce-io/lettuce-core/blob/fc6630e0fdd46e175e1d51a2491732092bb683ff/src/main/java/io/lettuce/core/cluster/models/partitions/RedisClusterNode.java#L102-L103
Whereas cloned nodes are created with a null BitSet if the slots are empty:
https://github.com/lettuce-io/lettuce-core/blob/fc6630e0fdd46e175e1d51a2491732092bb683ff/src/main/java/io/lettuce/core/cluster/models/partitions/RedisClusterNode.java#L122-L125
Updating the slots also leaves the value as null if the new range is empty:
https://github.com/lettuce-io/lettuce-core/blob/fc6630e0fdd46e175e1d51a2491732092bb683ff/src/main/java/io/lettuce/core/cluster/models/partitions/RedisClusterNode.java#L332-L334
Environment

Lettuce version(s): 6.2.3.RELEASE
Redis version: 7.0.8

Additional context
Similar / related to:
https://github.com/lettuce-io/lettuce-core/issues/1091
https://github.com/lettuce-io/lettuce-core/issues/1089

It makes sense to fix this problem. Since you've looked already into it, do you want to submit a pull request along with a few unit test cases?

On second thought🤔🤔🤔, don't need to check the conditions to assigned a slot when creating a node. Just check if it's slot.empty().
What do you think of my opinion? Please review it.🙇🏻🙇🏻🙇🏻


static element is still moved when other elements drag over

Software version (please complete the following information):

Browser [chrome]
Vue Version [2.6.12]
vue-grid-layout Version: [2.3.11]

Describe the bug
static element is still moved when other elements drag over，the grid-layout's layouts data is not from data，is from vuex store and is dynamic.The layouts can be added and removed.
Please use the CodeSandbox Template to demonstrate your bug. It is much easier for us to help you if you do.
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.

The parameter name must be static


Execution API vs Ethereum JSON-RCP API

It's been some time since I don't use JSON-RPC in Ethereum and just found this Execution API (and the Beacon API).
I tried the new methods present in this API (i.e., debug_* and engine_* ) against a geth and Infura and they are not recognized. However, they recognize the classical ones I was used to (i.e., web3_* , net_* , ...). Also, I found out these methods are still referenced at Ethereum
So, can anyone explain me what is the purpose of this Execution API? Will it replace the existing API in the future?
Thanks

you need to enable those apis since debug and engine are not exposed via JSON-RPC by default:
geth --http --http.api eth,net,web3,debug,engine

source: https://geth.ethereum.org/docs/interacting-with-geth/rpc

Thank you for the reply but I am still a bit confused by the fact that at the end of the source you point out it claims: "The Engine API is enabled by default - the user is not required to pass any instruction to Geth to enable these methods." So, maybe the endpoints I tried could have disabled engine and not enabled debug?

engine is only for talking from a beacon node like teku and an execution node like geth, most JSON-RPC apis will not enable this publicly.


Is this support Laravel 5.3?

Is this support different table for admin and user?

I have changed some code to make it work with 5.3 and multi auth with multi user's roles and permission.
https://github.com/klaravel/ntrust


first review

Description
This is a component review of frontend migration on OnTrack.
Ontrack Component Review
Team Member Name
Xin Huang
Student ID:218161625
Component review
group-member-contributor-assigner Component
Files in this Component:

group-member-contribution-assigner.coffee
group-member-contribution-assigner.scss
group-member-contribution-assigner.tpl.html

Component Purpose
The primary purpose of the GradeTaskModalComponent is to provide a user interface for grading their contribution in this group task within a modal dialog. It includes features such as hovering over ratings, confirming selections, and closing the modal with the selected data.
ScreenShots:

Component Outcomes and Interactions:
Expected Outcomes:

Users can rate the contribution effort of each team member using icons
Users can hover over rating human modals to see the effect before selecting.

Interactions:
Inputs:

task: Object containing task details (e.g., current submission status, contribution ratings, team member information).
data: Object to store user inputs (selected submission status, contribution ratings, confirmation of actions like submission or cancellation).

Outputs:

The component outputs the selected submission status and contribution ratings upon completion.
Interaction with ContributionService to fetch available contribution levels and submit the final ratings.

Component Migration Plan
I will follow the steps on Migration-Guide.

Analyze Existing Component:

Review the current implementation in AngularJS.
Identify key functionalities and dependencies.

2.Setup Angular Environment:

Ensure the Angular project is properly set up.
Install necessary dependencies (e.g., Angular Material)

3.Create Angular Component:

Generate a new Angular component.
Transfer the HTML template, styles, and logic from AngularJS to Angular.

4.Integrate Services:

Migrate and integrate ContributionService into the new Angular component.

5.Downgrade Component:

Use UpgradeModule to downgrade the Angular component for use in the AngularJS app.

6.Testing:

Test the new component to ensure it replicates the behavior of the old one.
Fix any issues that arise during testing.

Component Review Checklist

[x] Ability to collect details from the user
[x] Succeeds when data is valid
[x] Handles errors
[x] Created unit is shown on success

Great jobs, Charles!   You have reviewed all the elements that related with group-member-contribution-assigner.  It looks like you have full understanding on what you are going to do next. Keep going with the next code migration.

Hi, Charles. You have reviewed all the elements that related with group-member-contribution-assigner. Also for this component review, I pretty sure it has a nested component  is not compatible with Angular17.Keep going with the next code migration. This repo should only upload a markdown file, might fix the changed files.


Update fs2-kafka to 1.2.0

Updates com.github.fd4s:fs2-kafka from 1.0.0 to 1.2.0.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.github.fd4s", artifactId = "fs2-kafka" } ]

labels: library-update, semver-minor

Superseded by #113.

Superseded by #113.


Leader Board

The benefit of this leaderboard is not only to motivate people to do more work, but for the first time it allows us to actually see who is carrying the weight of the phone operation.  Most of the time we dont actually know who is doing all the calling...
The back end of this id outline briefly in https://github.com/CrisisCleanup/crisiscleanup-3-api/issues/100

Note, code has already been built in staging where you can link the phone number.  Chat will come later hopefully.

looks good from screen shot,   will approve when I can actually see it on the page.    is the individual item re-usable so it is easy in code to load up 5 or 20 people on the board with a scroll bar?

looks good from screen shot, will approve when I can actually see it on the page. is the individual item re-usable so it is easy in code to load up 5 or 20 people on the board with a scroll bar?

Yes, the I made a vue component "LeaderboardProfileCard" which has the layout of the individual profile itself, so it can be easily re-used


How to generate an array of a specific size?

If I want an array of a random size that contains integers between 1 and 100 I can do:
  jsc.array(js.integer(1, 100))

but in my case I want a specific number of random integers between 1 and 100. I am having trouble seeing a way to do that. It doesn't look like jsc.array accepts a max/min size parameter.
Should I instead loop within the property function and call random(1, 100) the desired number of times?
It looks like smap and/or bless are capable of creating something that does this but I don't think I quite understand them well enough to figure it out.
Any help would be much appreciated!

I'd happy to take accept PR adding min/max arguments to jsc.array

Do you need the array to be of a fixed size every time?
In scenarios so far where I have needed this I have used tuple, but that is really only practical if you need a fixed size that is relatively small, and not if you need arrays that have say, a length of between 20 and 40.

@Koleok no, I'm looking for one that could be within a range, and ideally bigger than smaller. Thanks though :)
@phadej Good to know, thanks. I took a brief look at the code and understood parts of it, so maybe sometime in the next few weeks I'll try my hand at adding that.

I use this:
function replicate<A>(n: number, g: jsc.Arbitrary<A>): jsc.Arbitrary<A[]> {
  const gs = [] as jsc.Arbitrary<A>[]
  for(let i=0; i<n; ++i) {
    gs.push(g)
  }
  return jsc.tuple(gs) as jsc.Arbitrary<A[]>
}

@phadej did you have a specific api/implementation in mind for this? I've been using this for some tests https://github.com/leesio/jsverify/commit/2b7c35348c0c533e8d0f303a39c98c35077bf96a
I'd be happy to tidy it up and create a PR. Alternatively, if there's a better way, I'd love to hear your thoughts.

One-liner alternative of @danr's solution:
const replicate = (n, g) => jsc.tuple(Array.from(new Array(n)).map(() => g))

One small addition to the short version(s) by @ben-eb / @StoneCypher. If you need to support empty array generation, you can switch to jsc.constant:
const arrayOfLength =
    (length, arb) =>
        length === 0
            ? jsc.constant([]) // tuple disallows 0-len
            : jsc.tuple(Array(length).fill(arb))


Confusion with refresh/access tokens

What is your question?
I'm creating a nodejs application that only needs to make API calls on my behalf. I generated an access token, but it expires after 4 hours. I don't know how to create a refresh token without a redirect URL. Also, when inputting the refresh and access token into the SDK, wouldn't I also need to update it in a json file or similar everytime it changes? Even if it's regenerated and stored in memory, so it can be persisted if I restart the application.
Thanks!
Versions

What version of the SDK are you using? 10.34.0
What version of the language are you using? 4.5.2
Are you using Javascript or Typescript? Typescript
What platform are you using? (if applicable)

Dropbox is no longer offering the option for creating new long-lived access tokens. Dropbox is now issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find more information on this migration here.
Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example. Use of a redirect URI is not required, whether or not you're requesting a refresh token.
For examples of implementing this with the Dropbox JavaScript SDK, please refer to the examples included in the "examples" folder in the SDK. As long as you set the app key (a.k.a. client ID) and refresh token, like shown in this example for the JavaScript SDK, the SDK will actually handle refresh process for you automatically. The SDK will automatically catch expired access token errors and call the API to get a new short-lived access token when needed. Refresh tokens don't expire (though they can be revoked on demand), so it doesn't need to be replaced/updated each time; you can re-use the same refresh token repeatedly. So, if this is only for your own account, you would only need to get a refresh token for your own account once and could re-use that.

Thanks, I didn't realize that refresh tokens didn't expire <3

@greg-db I'm still having issues. Even though I provided both an access token and refresh token, I keep getting "expired_access_token"

Please share the code you're running that isn't working as expected so we can take a look. Please redact the app secret and token values themselves though.

const dbx = new Dropbox({
	accessToken: '...',
	refreshToken: '...',
	pathRoot: JSON.stringify({ '.tag': 'root', root: '...' }),
	selectUser: '...'
});

export const myFunc = async () => {
	// ...
	const { result } = await dbx.filesListFolder({ path, recursive: false });
	// ...
}

The refresh process requires the app key (a.k.a. client ID), and if the refresh token wasn't retrieved using PKCE, the app secret (a.k.a. client secret) as well. So, when constructing the Dropbox object, make sure you supply the clientId, and if needed clientSecret.

Thanks!


Conflicting JSON Files

For every commit, our file paths for our JSON files will be different depending on each machine
Find way around it

Fixed


Avoid mongo operation to fail

Should we wrapper the plugin to avoid an error that would explode the operation/query? Just wondering.

Hey @marcioviegas can you be more specific?  Are you concerned that a failure in the middleware would interfere with Mongo?  I haven't encountered this myself, but I suppose it's always possible.

Oi @marcioviegas, can you respond to the question above?

So basically I was afraid of using this plugin because if something failed during the open/close segments the actual query to the database would fail and that would put my whole service down.

That should not be the case, the error handling built into the underling xray mechanisms will not prevent the query from running if something fails in the open/close.


Mcs new

The real changes are actually in the two submodules efmtool_link and optlang_enumerator.

The commit history looks pretty scrambled. Should I clean this up or do you want to do it?

The commit history looks pretty scrambled. Should I clean this up or do you want to do it?

I wasn't aware that it is possible to modify the commit history. Perhaps you can do it before I mess it up even further ;-)

Ok, can you double check if this is Ok https://github.com/klamt-lab/cnapy/compare/st/mcs_new?expand=1
If yes create a new  PR from branch and I suggest that we squash the commits

OK, I have made the pull request for the other branch and am closing this one.


[release-1.11] Fix Kubernetes Ingress and Gateway prefix match

Manual cherry-pick of #34295
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Pull Request Attributes
Please check any characteristics that apply to this pull request.
[ ] Does not have any user-facing changes. This may include CLI changes, API changes, behavior changes, performance improvements, etc.

@Monkeyanator: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio_release-1.11
0c222487e230b8c8f4540d95236fc97221c59703
link
/test unit-tests_istio_release-1.11

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Multiselect design update

Status :
Ready

Description :
Minor design updates.
Bug fix.

Related Issues :
#287
Todos

[x] Tests
[x] Documentation

:tada: This PR is included in version 1.0.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


KAFKA-6983: Error while deleting segments - The process cannot access the file because it is being used by another process

Jira ticket for this: https://issues.apache.org/jira/browse/KAFKA-6983

Some comments of the 2 failing check above:
I ran gradle test to run all the unit tests, and getting 6 fails:
ConsumerCoordinatorTest. testCloseCoordinatorNotKnownWithCommits
BufferPoolTest. testBlockTimeout
SaslAuthenticatorTest. testAuthenticateCallbackHandlerMechanisms
SaslAuthenticatorTest. testMechanismPluggability
SaslAuthenticatorTest. testMultipleServerMechanisms
LoggingSignalHandlerTest. testRegister
They're not related to the this pull request. The errors are caused by timeout, it should be caused by the setup of the unit tests, and it should behave different on different machines/systems.


only load the last 20 versions for a gem

The show page for a gem is pretty expensive. It has to unzip+unmarshal the gemspec file for every version of the gem being views. It also makes a few SQL queries for every version.  This causes timeouts for gems with a lot of versions.
This is the dumb, simple fix to only show the last 20.  I'm playing around with the idea of adding a "load more" button, but that will involve a new endpoint to fetch the "more" from the server. Not sure if its worth the effort.
/cc @grosser @jcheatham @waferbaby

👍 as hotfix ...
ideally add some flag to show all ... but then it would timeout again ... maybe it should cache the gemspecs into a db column ?

👍

Also, maybe we can break out the versions into their own 'pages', instead of trying to show them all?

maybe we can show all versions and have details link if that is cheaper ?
On Mon, Jan 2, 2017 at 6:54 PM, Daniel Bogan<EMAIL_ADDRESS>wrote:

Also, maybe we can break out the versions into their own 'pages', instead
of trying to show them all?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zendesk/geminastrongbox/pull/29#issuecomment-270044885,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAsZ96vV4m8Z0BkFNDQyLI3oE3SZYJnks5rObhdgaJpZM4LZSFV
.

That would probably be cheaper. The expensive part is looking up the spec_for for each version, so if we can not do that in the loop then it should not be an issue. I'll look at adding a details page.

possibly PR to geminabox for that ... might already have fixed that ... not
sure how much we override
On Mon, Jan 2, 2017 at 10:01 PM, Craig Day<EMAIL_ADDRESS>wrote:

That would probably be cheaper. The expensive part is looking up the
spec_for for each version, so if we can not do that in the loop then it
should not be an issue. I'll look at adding a details page.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zendesk/geminastrongbox/pull/29#issuecomment-270055903,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAsZ4d12SZCnWBoiNkNlpFCjrxDLzt2ks5rOeQkgaJpZM4LZSFV
.

It doesn't look like they've fixed that. They don't use spec_for in their gem show page because they aren't displaying as much detail.
The last commit does some hacky stuff, but I think it is a decent fix. Maybe more complicated than we need, but seems nice. It loads the most recent 20 versions and displays them as normal, than anything other than that just becomes a link to a details page.
Like this

and the details page then looks like this

I tried to reuse code, but some of the things are erb templates rendered by sinatra, and others are erb templates rendered by rails so all of the helper methods are different :(

looks like the right direction!


Testing instructions

Is there a quick way to test my installation to ensure that tensorflow is using the GPU and OpenCL as desired?

Yes, if you do for example with tf.device('/gpu:0'):, then it forces everything under that to be on gpu0, or else crash.  You can also turn on device placement logging with with tf.Session(config=tf.ConfigProto(log_device_placement=False)) as sess:


As a developer, I want tests to run for each PR using Github Actions

Currently blocked by test suite not running. See https://github.com/arielj/jeopardixir/issues/14.

Noted that https://github.com/arielj/jeopardixir/pull/23 has resolved the broke tests. Will attempt to add GitHub Actions.


Application language is discarded when opening webview

When having single activity application (but it's not a must) and forcing locale change, when entering a fragment/activity with webview, the language is changed to the default .
This is the case described in stack overflow post - https://stackoverflow.com/questions/40398528/android-webview-language-changes-abruptly-on-android-7-0-and-above/40480347#40480347
It would be nice to add it to your project

Hi @dima-zemingo !
Thanks for the contribution. I'll investigate that and check what I can do. Stay tuned.


unauthorized access to resource (http 401)

Hi Team
When i try to commit ABAP git into the repository i get a error as
unauthorized access to resource (http 401).  check your credentials
Have recheck the all the details and there is no issue . How to fix the same .

check your credentials, does it work on command line using classic git?

Did you get it to work?

Did you get it to work?

yes just created the personnel access token and it worked fine . thanks

👍 closing

I am also facing the same issue, even after creating the personal access token, could you please help me? Thanks

@mohan-dandu please review the docs and test program. If this does not help, create a new issue
https://docs.abapgit.org/guide-ssl-setup.html
https://docs.abapgit.org/guide-ssl-test.html


Update to Swift 4.1

Update code and project to Swift 4.1 requirements.
I've also avoided crashes when creating versions and dot separated values with incorrect string literals by creating empty ones.
@lxcid, I will complete the other one as soon as this would be approved and merged.

@OmarPedraza Thanks so much for the contribution! It looks great! I have merged in on #8. I only upgrade the Travis CI image and revert back some file permission changes!

FYI v3.0.0 is deployed with the following changes
https://cocoapods.org/pods/LXSemVer


ProjectView should not be part of the project file

Expected Behavior
The ProjectView element is part of a user-specific file, e.g. *.njsproj.user, which can be excluded from source control.
Actual Behavior
The ProjectView element appears in the *.njsproj file, so any time someone changes the view on their local machine it becomes part of a Git commit.

NTVS Version: 1.2.40726.00
Visual Studio Version: 14.0.25425.01 Update 3
Node.js Version: 3.10.3

Steps to Reproduce

Open a *.njsproj project in Visual Studio
Select the project node in Solution Explorer
Click Show All Files on the Solution Explorer toolbar
Save the project

Thanks. This looks like the same problem as #250 . Let me take a quick look to see if we just need to update the project templates as the comment in #250 describes, or if the fix is more involved.

@mjbvz It is the same issue, and simply deleting the line from our project resolved the issue!


Showcase Submission for challenges/77-recursion

Thank you Kathy McGuiness for your contribution! A member of the Coding Train team will review it shortly.

Recursive chains
Kathy McGuiness

Beautiful @kfahn22!


[Gssoc'21] show password button on login and signup

Feature request:
I want to add a show password button because its very frustrating to remove whole password if by mistake any wrong key got pressed.
Is your feature request related to a problem? Please describe. (optional):
A clear and concise description of what the problem is.
Describe the solution you'd like:
A clear and concise description of what you want to happen.
Describe alternatives you've considered:
A clear and concise description of any alternative solutions or features you've considered.
Describe how this feature will be useful to our readers:
A clear and concise description of how this feature will be useful for our  other readers.
Additional context:
Add any other context or screenshots about the feature request here.

Note:

If you want to work on an issue, you should check if it has already been assigned to anyone.

Sorry, this issue has already been already worked on.


Looks like This is inside of Android Studio 1.4 now

Check here: https://youtu.be/ssayKH0tudk?t=27m59s

Wow! But does this function not have incremental search?
For example, when I want to search 'star' icons, I can not search by the keyword.

The built in version is in my opinion really crappy. This plugin is still AFAIK the best solution out there.

@vanniktech Thanks so much!


Binance "Last completed order" bug

var LastCompletedTrade = Api.GetCompletedOrderDetailsAsync(Pair).Sync().First();
Doesn't seem to work for Binance. Just getting 0 back, even though a trade was filled recently.(within an hour)
The same code works on Cryptopia.
Any clue why?
Update:
Ok I've experimented some more, and it shows that all last trades are retrieved, but the .AveragePrice is always 0, but instead .Price has the value I'm looking for. Inconsistent I guess to Cryptopia. But if that is an exchange thing or a thing that should be changed in this library. I don't know.
Secondly, it doesn't return only filled orders, it also returns cancelled orders, which is not what the function name implies.

Return data is not something ExchangeSharp generate, it is based on the Exchange API.
Other than that, you can easily LINQ to filter the results where the OrderType is Canceled probably.
Paste a copy of your code sample maybe I could help you. (Even thought I dont see in binance API that they return if it was canceled or not)
I'm implementing the UserDataWebSocket so you can get the actions that are happening right away. and you could stack it up in a list or something to have previous deals (in the current session)

This is the code I'm using to get the latest orders. I figured a away to filter out non filled orders.
But for some reason I can not get the api to give me the latest trades. Sometimes the latest trade is many days old. https://1drv.ms/u/s!ArAeE5D8G2U5gupUUd91hWdb-s4AVQ
`
private decimal GetLastTrade()
{
var ViewOrdersAfterThisTime = DateTime.Now.AddDays(-10);
var LastTrades = Api.GetCompletedOrderDetailsAsync(Pair, ViewOrdersAfterThisTime).Sync();
        //Create a new list for filled orders
        List<ExchangeOrderResult> LastCompletedTrades = new List<ExchangeOrderResult>();

       //Since api returns all last orders inclusive cancelled. Filtering needs to be done.
       foreach (var Trades in LastTrades)
              if (Trades.Result == ExchangeAPIOrderResult.Filled)
                      LastCompletedTrades.Add(Trades);

//If nothing is received, make an empty place in the list.
if (LastCompletedTrades.Count == 0)  LastCompletedTrades.Add(new ExchangeOrderResult {Price= 0.0m});
        //Binance only returns a price if it was a limit order.
        Console.Write($"\n{LastCompletedTrades.Last()} Price:{LastCompletedTrades.Last().Price} Avg:{LastCompletedTrades.Last().AveragePrice} ");

        //RETURN THE PRICE THAT HAS A VALUE
        if (LastCompletedTrades.Last().Price > 0) return (LastCompletedTrades.Last().Price);
        if (LastCompletedTrades.Last().AveragePrice > 0) return(LastCompletedTrades.Last().AveragePrice);
        else return (0m);
    }`

Issue solved.
It seems all the issues I had were related to the Nuget package version.
The problem was that I was trying to print the orders from the last 10 days, and if that were more than a certain number, it would just stop returning the last ones.
Most people are on Binance I guess, so this update is an urgent one to push out as a package.


nixos/isync: init

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

This pull request has been mentioned on Nix community. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/34

I am kind of torn about this one because home-manager already has a module and a config generator for isync.

so, anything going on here? maybe an alternate name to install would be sufficient?

Closing due to inactivity. Feel free to reopen the discussion.

Closing due to inactivity. Feel free to reopen the discussion.


Update all dispatch('change') to not fire unless value changed

[ ] DateField
[ ] DatePickerField
[ ] DateRangeField
[ ] Input
[ ] Form
[ ] Collapse
[ ] Drawer
[ ] TextField
[x] ToggleGroup
[ ] SelectField

https://github.com/techniq/svelte-ux/commit/de6f9a2018bb11c65f73fd5df1353e98dabd834b

For most cases, no change will be needed (just need to verify).  All the $: dispatch('change', { value }) should be fine (see REPL)


Crashing

Hello. I have downloaded the latest version of this plugin and did all the steps to make it work on android. The problem is, as soon as i try to login with Google Drive, my app jus crashes. I don't know what to do. Thanks in advance!

Make sure you've downloaded all the native dependencies. Your Plugins/Android folder should look like that:

If it won't help, please provide android log at the moment when the app crashes. You can access the log with adb utility.

Alight, I downloaded the missing files, but now i get this error when i try to build the app.
CommandInvokationFailure: Unable to convert classes into dex format.
C:\Program Files\Java\jdk1.8.0_171\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:\Users\Vartotojas\AppData\Local\Android\sdk\tools" -Dfile.encoding=UTF8 -jar "D:\2018.2.6f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatJellyBeanMr2;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorCompatHelper;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorListenerCompat;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorProvider;

Sorry, my mistake. I deleted some other plugin that caused this. Now the authentication starts on android, but when it finishes, it redirects to google.com. When i get back to my app, nothing has changed. It means that the request wasn't done?

Most likely the custom URI scheme is not mapped correctly. Make sure your application ID is all lower cased and equals to the one you've set as a bundle ID in the console app settings.

In Unity my bundle ID has uppercase letters. Should i make that lowercase or is it enough to make it lowercase just in credentials?

One more question though, does it matter what build system i use? (Internal/Gradle)

The app id should be lower cased both in the editor and in the credentials; guess I should update the FAQ to make it clear. The build system shouldn't matter, though I've only tested it on Gradle.

When i set my editor bundle ID to lowercased, my phone detects it as an entirely different application. Is there a way to use this plugin without changing my original ID (lowercased and uppercased)?

Currently not (at least, for Android), but I'll try to think something out.

Thank you really much :)

As a temporary workaround you can try to set the app id manually in UnityGoogleDrive/Plugins/com.elringus.unitygoogledriveandroid.aar (unzip it) /AndroidManifest.xml. Just replace ${applicationId} with your application ID (lower cased).

Thanks for the support. I got it working and oh my god it even redirects back to my application when authentication is finished. You sir did a really good job on this. :)


Removed extra indexing on schema removal

This PR removes a second instance of array indexing in the base_table_builder, which was causing us to search only the first character of a potential string for a name like "schema"."table"
This is currently only an issue when we are creating a completely empty table.
Checklist

[X] Consider if documentation (like in docs/) needs to be updated
[X] Consider if tests should be added
[X] Run pylint if you're making changes beyond adding studies
[X] Update template repo if there are changes to study configuration

Since this is affecting sites right now, I'm electing to not write a unit test this second, but am tracking the need for catching this case at https://github.com/smart-on-fhir/cumulus-library/issues/120


FR for keras.preprocessing.image_dataset_from_directory label_mode parameter to accept enum as input

System information

TensorFlow version (you are using): 2.4.1
Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.
When calling the tf.keras.preprocessing.image_dataset_from_directory() function, the parameter label_mode= accepts 3 values: int, categorical and binary. However, the string object is not deterministic: for that, I propose to add another option, which would be to specify the value using an enumeration which IS deterministic.
Will this change the current api? How?
No
Who will benefit with this feature?
Users who want more structured code.
Any Other info.
This behavior is, as far as I know, already available for some features in Keras.

However, the string object is not deterministic: for that, I propose to add another option, which would be to specify the value using an enumeration which IS deterministic.

What does that mean?

However, the string object is not deterministic: for that, I propose to add another option, which would be to specify the value using an enumeration which IS deterministic.

What does that mean?

However, the string object is not deterministic: for that, I propose to add another option, which would be to specify the value using an enumeration which IS deterministic.

What does that mean?

By accepting a string as input, typos can be made and no autocompletion can be offered by the IDE, which is the case when using an enum.

However, the string object is not deterministic: for that, I propose to add another option, which would be to specify the value using an enumeration which IS deterministic.

What does that mean?

By accepting a string as input, typos can be made and no autocompletion can be offered by the IDE, which is the case when using an enum.

tf.keras.preprocessing.image_dataset_from_directory will be deprecated in future Tensorflow version, prefer loading data with tf.keras.utils.image_dataset_from_directory, and then transforming the output tf.data.Dataset with preprocessing layers.
Let us know if you still face an issue. Thanks!


Fix description typo

Thanks @nicolasiensen!

You are welcome.
Very nice project btw
On Feb 21, 2016 15:08, "Mayank Chandola"<EMAIL_ADDRESS>wrote:

Thanks @nicolasiensen https://github.com/nicolasiensen!
—
Reply to this email directly or view it on GitHub
https://github.com/Hashnode/mern-starter/pull/53#issuecomment-186828124.


flow_option over options with multiple=True breaks when multiple options are passed

Using this small example you can reproduce the issue:
from clk.decorators import command, option

@command()
@option("-o", "--option", "o", multiple=True)
def working_cmd(o):
    """Calling this command with -o A -o B does not break"""
    print(o)

from clk.decorators import flow_command
from clk.overloads import get_command

work = get_command("working-cmd")

@flow_command()
@work.flow_option("o")
def flow_bug(**options):
    """Calling this command with -o A -o B breaks"""

Calling working-cmd -o A -o B will work, while calling flow-bug -o A -o B will break
The issue seems to come from either clk.flow.get_flow_wrapper where the function clk.lib.flat_map is called with a generator of tuples as a parameter, or directly in the clk.lib.flat_map function that does not check if it content are lists.
A simple correction would be to replace the line elem = list(elem) by elem = list(map(list, elem)) but it could have effect elsewhere in the code base so I only put it as a proposition here.

Thank you for this issue. It is very appreciated. Can you provide a pull request with the correction?

See #23


OCM-2537 | fix: show and choose default version first

https://issues.redhat.com/browse/OCM-2537

Just to confirm my understanding on this PR

This changes operatorroles to always use the latest version? (this is a good thing!)
This changes the version used for cluster installation to use the default automatically in both interactive and non-interactive modes?
This shows the latest version to nodepools?

I'm just guessing with limited context, but I saw "latest" being used somewhere in NodePools. Is this a contextual latest, meaning the latest for a NodePool that matches all the constraints, like not being higher than the control plane version?

╭─croche@fedora ~/Work/ocm/rosa ‹2373-default-version›
╰─$ rosa create cluster
I: Enabling interactive mode
? Cluster name: croche-test
? Deploy cluster with Hosted Control Plane (optional): No
? Create cluster admin user: No
? Deploy cluster using AWS STS: No
W: In a future release STS will be the default mode.
W: --sts flag won't be necessary if you wish to use STS.
W: --non-sts/--mint-mode flag will be necessary if you do not wish to use STS.
? OpenShift version:  [Use arrows to move, type to filter, ? for more help]
> 4.12.22
  4.13.4
  4.13.3
  4.13.2
  4.13.1
  4.13.0
  4.12.21
E: Expected a valid OpenShift version: interrupt
╭─croche@fedora ~/Work/ocm/rosa ‹2373-default-version›
╰─$ rosa create cluster                                                                                1 ↵
I: Enabling interactive mode
? Cluster name: croche-test
? Deploy cluster with Hosted Control Plane (optional): Yes
I: NOTE: Hosted control planes are currently in Technology Preview (https://access.redhat.com/support/offerings/techpreview). Any Technology Preview clusters will need to be destroyed and recreated prior to general availability.
? OpenShift version:  [Use arrows to move, type to filter, ? for more help]
> 4.12.22
  4.13.4
  4.13.3
  4.13.2
  4.13.1
  4.13.0
  4.12.21
E: Expected a valid OpenShift version: interrupt

/lgtm


fix: float to int conversion and testing

Added conversion logic to convert integers to float and floats to integers.
Created two in process resolver tests to check conversions
un-commented float/double in Step definitions

Fixes: https://github.com/open-feature/java-sdk-contrib/issues/470

LGTM
@toddbaert feel free to go ahead with the merge :)

Sure I'll wait a bit for @DBlanchard88 to check out your suggestion.


Replace nosetests with pytest

see https://pytest.org/latest/index.html for good reasons to use pytest

@lepture any comments?

The link does not give any reason why using pytest if you already have nose set-up and working.
It even says it can run nose, so you end-up with a wrapper around a library which you already used, seems odd to me.
The list of arguments is compelling to me, but only if the work had not been done before, otherwise I do not see the gain.
My 2cts.

@Turbo87 Thanks. I'd like to keep using nose. There is nothing wrong with nose.
FYI, I have other libraries that running py.test.


⚠ Bofrost.be has degraded performance

In f578042, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1793 ms

Resolved: Bofrost.be performance has improved in 09a201c after 9 minutes.


Possible fix for #381

Possible fix for #381
I modified the code so that it precisely controls the expected tag (and relative tests)

Thanks a lot for the contribution did not new about the difference.
Have you tested the changes you did yourself? Did you encounter any side effects?
If everything is fine I’m gonna merge this and create a new release, I currently don’t have the time to test

No it seems to be fine from code side, thanks a lot for the contribution.

No it seems to be fine from code side, thanks a lot for the contribution.

do you find the other changes I wrote useful or do I avoid continuing them?
these 👇

I'm also working on preventing the service from restarting when it doesn't find a container and/or an image by having it handle the error (maybe removing the corresponding entry), on post-update operations (so that it restarts the container if it's found turned on and vice versa), and on a way to exclude some containers from the check (so that local ones created with dockerfile or other are ignored).

I think it would make sense implementing all of that.
Especially the functionality to ignore specific defined containers.

Nice, Then I give it priority 👌


Write a TypeScript program to find the sum of all numbers in an array

Description
Write a TypeScript program to find the sum of all numbers in an array
Input  : [1, 2, 3, 4, 5]
Output : 15

How to contribute

Save the solution in program/FindTheSumOfAllNumbersInAnArray.ts file
Add FindTheSumOfAllNumbersInAnArray.ts file in find-the-sum-of-all-numbers-in-an-array folder

@harshraj8843 ,Sir would you please assign this to me?

!assign


Reposition mylocation button

I'm submitting a ...  (check one with "x")

[x] question
[ ] any problem or bug report
[ ] feature request

If you choose 'problem or bug report', please select OS:  (check one with "x")

[ ] Android
[x] iOS  -> iPhone X only

Current behavior:
In my iPhone X the location button is just bearly not clickable (we have stretched the app over the full screen) and the button is rendered in the unclickable area of the iPhone screen.
Is there a way i can move the button to a better/different position?
thanks in advance

Hi @TimothyFehr, I use the padding option of the map to do this in Android. I do not know if this works in IOS. The map padding pushes in the Google logo at the bottom, the compass, and the myLocationButton. I use this to push the compass and button down from the top of the screen.
        map.setOptions({

              'padding':{
                'left':0,
                'top':25,
                'bottom':0,
                'right':0
              }
          });

The my location button comes from native side, not this plugin. Thus, we can't move it.

@TimothyFehr, I used an incorrect format for the options earlier. I changed it in the post up above. In Android at least, this is the difference between 25px top padding (first image), and a 75px top padding as well as a 200 px bottom padding (the bottom image, see the Google logo way up from the bottom).
I have never had any weird things happen either, like with a marker not showing up because it was in the padding or anything like that.

Well, there is also map.setPadding() method.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/Map/setPadding/README.md

I guess @TimothyFehr wants to just move the mylocation button to where he wants.
In that case, you need to create a button using html element.
This is the best way.

ping @TimothyFehr


An error is reported in minikube kubectl

I use this command in Ubuntu in a virtual machine in an ARM MAC:
minikube kubectl
Report the following error:
Error caching kubectl: download failed: https://storage.googleapis.com/kubernetes-release/release/v1.23.3/bin/linux/arm64/kubectl?checksum=file:https://storage.googleapis.com/kubernetes-release/release/v1.23.3/bin/linux/arm64/kubectl.sha256: getter: &{Ctx:context.Background Src:https://storage.googleapis.com/kubernetes-release/release/v1.23.3/bin/linux/arm64/kubectl?checksum=file:https://storage.googleapis.com/kubernetes-release/release/v1.23.3/bin/linux/arm64/kubectl.sha256 Dst:/home/hwx/.minikube/cache/linux/arm64/v1.23.3/kubectl.download Pwd: Mode:2 Umask:---------- Detectors:[0x32bff88 0x32bff88 0x32bff88 0x32bff88 0x32bff88 0x32bff88 0x32bff88] Decompressors:map[bz2:0x32bff88 gz:0x32bff88 tar:0x32bff88 tar.bz2:0x32bff88 tar.gz:0x32bff88 tar.xz:0x32bff88 tar.zst:0x32bff88 tbz2:0x32bff88 tgz:0x32bff88 txz:0x32bff88 tzst:0x32bff88 xz:0x32bff88 zip:0x32bff88 zst:0x32bff88] Getters:map[file:0x4000be2ee0 http:0x4000385620 https:0x4000385640] Dir:false ProgressListener:0x327f4f0 Insecure:false Options:[0x1522f90]}: invalid checksum: Error downloading checksum file: Get "https://storage.googleapis.com/kubernetes-release/release/v1.23.3/bin/linux/arm64/kubectl.sha256": x509: certificate has expired or is not yet valid: current time 2022-07-04T06:35:43Z is before 2022-09-26T08:28:33Z
Please provide a solution.

Thanks for the issue.
Maybe you want to to check your local time, because this error seems weird current time 2022-07-04T06:35:43Z is before 2022-09-26T08:28:33Z.
/kind support

Stack Overflow is a better place for this question. You can also post your question on the Kubernetes Slack or the Discuss Kubernetes forum.
/close


Basketball logo isn't actually a basketball

The logo is missing a line that would make it a basketball.

+1


Add unit test for nested interactions and evaluations

(covers https://github.com/Microsoft/RTVS/issues/1701)

Ping?

:+1:

:+1:


expression: add builtin tan

What have you changed? (mandatory)
This PR implements the scalar function Tan.
What are the type of the changes? (mandatory)

New feature (non-breaking change which adds functionality)

How has this PR been tested? (mandatory)
unit test
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
no
Does this PR affect tidb-ansible update? (mandatory)
no
Refer to a related PR or issue link (optional)
#3275

Ugh, sorry about this. Will close branch, and fix sign-off commits.