Summing together different currencies

Yes, I want to sum the totals of multiple currencies. Actually, I don't, by the ISO20022 PAIN.001 file format does!
The ISO20022 pain.001 file contain a CtrlSum field in the header that sums up all amounts that the batch file contains, and that can be a mix of any currencies. They are to be summed as major units, with the decimals handled appropriately.
In effect, this is like a currency-less Money amount, with a fluid decimals amount rather than a currency. Adding $1.23 to €2.00 should give an amount of ¤3.23 (no currency, but decimals of 2). Adding on BHD 1.009 should result in ¤3.239, which now has decimals of 3.
Does this library have a solution that would solve this? Or is this totally out of scope of what this library is trying to achieve?

@judgej not only this library has no solution, everywhere two money objects interact the currency must be the same. 😄
Jokes aside: It seems to me that this is a quite specific use case and we are trying to keep the library as minimal as possible. That being said, I'm not against collecting knowledge for specific use cases somewhere in the MoneyPHP ecosystem.
If you come up with a decent solution, I'm more than happy to provide some space to host it:

documentation page
separate repo as an example (I guess writing code for the above problem wouldn't count as a whole package, would it?)
this issue
etc

As for the solution: I guess you would have to use one of the Calculators (or convert to int) and manually add the values together. You can use the Currency to determine the subunit for each of them.

Yes, it is a bit of a unique case. What I have is the guts of the Money class copied and pasted into a custom class to do the calculations. Because Money is marked as final, it puts a walled garden around what it contains, so nothing inside it can be put to use for other purposes. Also because Money does not have an interface, I'm resorting to duck-typing when summing a Money object with a MixedMoney object, which does not feel ideal.
I'll see what I can do to tidy up and maybe simplify what I have and link/post it here to see if it will be of any use to others.


bug: FluentBit pod stops sending logs to the configured outputs without showing any error

Describe the issue
I noticed this behaviour: sometimes fluentbit pods (usually one) just stop sending logs to the configured outputs (Elasticsearch in this case).
There is no error message or any weird log appearing, besides the logline that informs that the config file changed (level=info time=2024-09-03T09:57:40Z msg="Config file changed, reloading...").
I configured fluentbit via namespace-scoped CRDs (FluentBitConfig, Output, but I have the ClusterFilter, ClusterInput, ClusterFluentBitConfig cluster-wide CRDs as well), and I noticed that the fluent-bit-config configmap changes the order of the configured CRDs (e.g., the order of the configured outputs changes from time to time, although the overall content remains the same).
The underlying idea is to create an elasticsearch index per kubernetes namespace and forward all the namespace's traffic there.
The generated configuration (configured entirely via the operator CRDs) looks like this:
[Service]
    Http_Server    true
    Log_Level    debug
    Parsers_File    /fluent-bit/config/parsers.conf
    Parsers_File    /fluent-bit/config/parsers_multiline.conf
[Input]
    Name    tail
    Path    /var/log/containers/*.log
    Read_from_Head    false
    Refresh_Interval    10
    Skip_Long_Lines    true
    DB    /fluent-bit/tail/pos.db
    DB.Sync    Normal
    Mem_Buf_Limit    100MB
    Parser    cri
    Tag    kube.*
    storage.type    memory
[Filter]
    Name    kubernetes
    Match    kube.*
    Kube_URL    https://kubernetes.default.svc:443
    Kube_CA_File    /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
    Kube_Token_File    /var/run/secrets/kubernetes.io/serviceaccount/token
    Labels    false
    Annotations    false
[Filter]
    Name    nest
    Match    kube.*
    Operation    lift
    Nested_under    kubernetes
    Add_prefix    kubernetes_
[Filter]
    Name    modify
    Match    kube.*
    Remove    stream
    Remove    kubernetes_pod_id
    Remove    kubernetes_host
    Remove    kubernetes_container_hash
[Filter]
    Name    nest
    Match    kube.*
    Operation    nest
    Wildcard    kubernetes_*
    Nest_under    kubernetes
    Remove_prefix    kubernetes_
[Filter]
    Name    rewrite_tag
    Match    kube.*
    Rule    $kubernetes['namespace_name'] ^(NAMESPACE1)$ 977c7a0a4554b6071fdf7e33484f3853.$TAG false
    Emitter_Name    re_emitted_977c7a0a4554b6071fdf7e33484f3853
[Filter]
    Name    rewrite_tag
    Match    kube.*
    Rule    $kubernetes['namespace_name'] ^(NAMESPACE2)$ a692cd3035eea3e14eae8ab89d9aed1b.$TAG false
    Emitter_Name    re_emitted_a692cd3035eea3e14eae8ab89d9aed1b
...
...
[Output]
    Name    es
    Match_Regex    ^977c7a0a4554b6071fdf7e33484f3853\.(?:kube|service)\.(.*)
    Host    ELASTICSEARCH_HOST
    Port    9200
    HTTP_User    admin
    HTTP_Passwd    password
    Index    index-namespace1
    Logstash_Format    false
    Time_Key    @timestamp
    Generate_ID    false
    Suppress_Type_Name    On
    tls    On
    tls.verify    false
[Output]
    Name    es
    Match_Regex    ^a692cd3035eea3e14eae8ab89d9aed1b\.(?:kube|service)\.(.*)
    Host    ELASTICSEARCH_HOST
    Port    9200
    HTTP_User    admin
    HTTP_Passwd    password
    Index    index-namespace2
    Logstash_Format    false
    Time_Key    @timestamp
    Generate_ID    false
    Suppress_Type_Name    On
    tls    On
    tls.verify    false

I noticed that if I check the prometheus targets, that pod results in the DOWN state:
Get "http://<IP_ADDRESS>:2020/api/v2/metrics/prometheus": context deadline exceeded

I also tried to manually curl the pod (from another pod) and, indeed, it is not reachable (while all the others belonging to the same daemonset are reachable and they keep sending the logs to the intended outputs).
Any idea about what is going on? I also tried to check whether there could be resources (in terms of cpu/ram) issues (via kubectl describe and kubectl get pods -o yaml) but nothing obvious appeared. The pod is not failing nor getting restarted.
Once the pod is restarted, everything works again as intended.
To Reproduce
I can't really reproduce the issue, since it happens randomly and it's "solved" once the pod is killed (and a new one is created)
Expected behavior
The logs are sent to the intended output or at least there is a "talking" error message that highlights the cause of this behavior.
Your Environment
- Fluent Operator version: 2.9.0
- Container Runtime: containerd://1.7.17-k3s1
- Operating system: SUSE Linux Enterprise Server 15 SP4
- Kernel version: 5.14.21-150400.24.74-default

How did you install fluent operator?
Via helm chart (with argocd, from the https://fluent.github.io/helm-charts/ repository), with the following parameters:
containerRuntime: containerd
# fluentd:
#   crdsEnable: false
fluentbit:
  logLevel: debug
  resources:
    limits:
      cpu: 1500m
      memory: 1000Mi
    requests:
      cpu: 500m
      memory: 201Mi
  serviceMonitor:
    enable: true
  input:
    tail:
      enable: false
    systemd:
      enable: false
  filter:
    kubernetes:
      enable: false
    containerd:
      enable: false
    systemd:
      enable: false
operator:
  resources:
    limits:
      cpu: 500m
      memory: 600Mi
    requests:
      cpu: 100m
      memory: 20Mi

I disabled the inputs and filter because I configured them by myself in order to use namespace-wide CRDs.
Additional context
No response

Seems we run into the same issue. This happens randomly on random nodes. For me, it seems, fluent-bit just starts to hang sometimes when a reload (or multiple reloads in a short period) happening.


Fixes issue when settings values are null

Fixes issue when settings values for language and region are null

I'm sorry, I had old version of config file after update.


Problem with hash predicate logic in array field

Describe the bug
Problem during schema validation: On the prerequisites field of the example I want validate that this array contain only hash describe by the previous schemas. Every schema contain a name with a specifig value. When all hashes match with "pictures" or "scan_barcode" everything is ok. But when an I put anything else in the name field of a hash the errors method on result return an exception

To Reproduce
This is my code:
class Pictures < Dry::Schema::Params
  define do
    required(:name).filled(:string, eql?: 'pictures')
  end
end

class ScanBarcode < Dry::Schema::Params
  define do
    required(:name).filled(:string, eql?: 'scan_barcode')
  end
end

class MissionActionTypeSchema < Dry::Schema::Params
  define do
    optional(:id).filled(:string)
    required(:previous_mission_status_type_reference).filled(:string)
    required(:next_mission_status_type_reference).filled(:string)
    optional(:mission_event_type_references).array(:str?)
    optional(:hidden).maybe(:bool)
    optional(:prerequisites).value(:array).each do
      schema(Pictures.new|ScanBarcode.new)
    end
  end
end

s = MissionActionTypeSchema.new
res = s.call({ id: '1', previous_mission_status_type_reference: 'a', next_mission_status_type_reference: 'b', prerequisites: [{name: 'pictu'}]})
res.errors

Expected behavior
I think in normal case res.errors should return an error relative to the index of hash who fail to correpsond of one of the schemas.
My environment

Using dry-schema 1.5.5
Affects my production application: YES
Ruby version: ruby 2.4.0
OS: ubuntu 18.04

This fixes the crash but it's hard to say whether it can be treated as THE fix:
diff --git lib/dry/schema/message/or.rb lib/dry/schema/message/or.rb
index f8d4736..c73fcc1 100644
--- lib/dry/schema/message/or.rb
+++ lib/dry/schema/message/or.rb
@@ -15,14 +15,20 @@ module Dry
           msgs = [left, right].flatten
           paths = msgs.map(&:path)

-          if paths.uniq.size == 1
-            SinglePath.new(left, right, messages)
+          if left.is_a?(Array)
+            if right.is_a?(Array) && paths.uniq.size > 1
+              MultiPath.new(left, right)
+            else
+              left
+            end
           elsif right.is_a?(Array)
             if left.is_a?(Array) && paths.uniq.size > 1
               MultiPath.new(left, right)
             else
               right
             end
+          elsif paths.uniq.size == 1
+            SinglePath.new(left, right, messages)
           else
             msgs.max
           end

Then with your example slightly tweaked:
require 'dry/validation'
require 'byebug'

class Pictures < Dry::Schema::Params
  define do
    required(:name).filled(:string, eql?: 'pictures')
  end
end

class ScanBarcode < Dry::Schema::Params
  define do
    required(:name).filled(:string, eql?: 'scan_barcode')
  end
end

class MissionActionTypeSchema < Dry::Schema::Params
  define do
    optional(:id).filled(:string)
    required(:previous_mission_status_type_reference).filled(:string)
    required(:next_mission_status_type_reference).filled(:string)
    optional(:mission_event_type_references).array(:string)
    optional(:hidden).maybe(:bool)
    optional(:prerequisites).array(:hash, Pictures.new | ScanBarcode.new)
  end
end

s = MissionActionTypeSchema.new
res = s.call({ id: '1', previous_mission_status_type_reference: 'a', next_mission_status_type_reference: 'b', prerequisites: [{name: 'pictu'}]})
puts res.errors.to_h.inspect
```

Here's the output:

```
{:prerequisites=>{0=>{:name=>["must be equal to pictures"]}}}
```

It's tricky because producing "OR" messages coming from two different schemas requires special processing. You need to gather all errors, see which paths are the same and then convert them into "Message::Or".

So, the patch fixes the crash but it doesn't seem to be the final solution.

Hello, thank you for answer and reactivity,
This seems good in this case but I need to complexify prerequisites schemas as following:
require 'dry/validation'

class Pictures < Dry::Schema::Params
  define do
    required(:name).filled(:string, eql?: 'pictures')
    required(:params).filled(:hash) do
      required(:number).filled(:integer, gt?: 0)
    end
  end
end

class ScanBarcode < Dry::Schema::Params
  define do
    required(:name).filled(:string, eql?: 'scan_barcode')
    required(:params).filled(:hash) do
      required(:missions).filled(:string, included_in?: %w[all all_previous all_next previous next unknown])
      required(:mission_type).filled(:string, included_in?: %w[mission rest departure arrival])
      required(:statuses).array(:string)
      required(:presentation_order).filled(:string, included_in?: %w[reverse none normal])
    end
  end
end

class MissionActionTypeSchema < Dry::Schema::Params
  define do
    optional(:id).filled(:string)
    required(:previous_mission_status_type_reference).filled(:string)
    required(:next_mission_status_type_reference).filled(:string)
    optional(:mission_event_type_references).array(:string)
    optional(:hidden).maybe(:bool)
    optional(:prerequisites).array(:hash, Pictures.new | ScanBarcode.new)
  end
end

s = MissionActionTypeSchema.new
res = s.call({ id: '1', previous_mission_status_type_reference: 'a', next_mission_status_type_reference: 'b', prerequisites: [{name: 'pictures', params: {number: 8} }]})
puts res.errors.to_h.inspect

and I got an error with following messages:

whereas hash corresponds well to a Pictures

@fijemax I'm not familiar with this library, how would this help?

@fijemax could you see if this patch works for you? https://github.com/dry-rb/dry-schema/pull/387
It fixes a few problems I've encountered, but I also wouldn't call it a proper fix. In my opinion, it might be better to rearchitect all of Dry::Schema::Message::Or::*, so that it actually quacks like Dry::Schema::Message.
I'm not a regular contributor, so my intuition might not be best here though.


Feature/rnd 120 patch moto

Coverage decreased (-0.1%) to 55.493% when pulling f554de603e0c83811622f80dddcad3d0a66f7281 on Atidot:feature/rnd-120-patch-moto into d068653dead700f913f90b72a6948e51aeb53544 on spulec:master.


add geojson endpoint

@smit1678 @mojodna I think now it's the time to merge it to master and create a PR to the posm repository (https://github.com/posm/OpenMapKitServer).

@willemarcel tested the updates and they look good. Let's get this merged, will then test one last time on our deployments.


use newer testing conventions in plugin tests

motivation: cleaner code
changes

use string form of writeFileContents
do not wrap fixtures with try/catch

needs #4156  first

Thanks!

@swift-ci please smoke test


Do not allow purchase of tickets for showings that have already occurred for customers

Customers should not be able to purchase tickets if the showing has already happened.
This should be implemented purely on the server-side in (at least) two places: checkout and the events/slice endpoint (possibly also event-instance/tickets and /ticket-restriction.

In checkout, the purchase should be invalidated if a purchased item took place at or after the start time for its corresponding showing (for customer-purchase only).
In the events/slice endpoint, showings returned should be filtered out to not include any with start times before the current time.

Todo:

Remove events from events/slice when the end date/time is before now.
Inspect other API endpoints used by ticketingslice to see if items need to be removed before returned by apis


Terminal crashes upon opening [Kali-Rolling]

Please paste the output of the following command here: sudo edit-chroot -all

Out: kali-rolling
Please describe your issue:
So, using kali-rolling and I can't seem to open the terminal. I've powerwashed and tried reinstalling it. No luck. I could use the terminal before but now I can't do it anymore. I've also looked around but no luck fixing it either.
Terminal opens very briefly after just a millisecond closes again.
If known, describe the steps to reproduce the issue:
Install kali-rolling
use it for a while
tada. It won't work

I also have the same problem.

Try seeing if you can enter the chroot.
Like type in
sude enter-chroot [CHROOT NAME]

Yes, I can basically do anything inside chroot. I also can open xterm, but when I open other terminal (tried xfce4-terminal, gnome-terminal and terminator) it just flashed and disappeared.

Oh I also had this problem once.
Are you using xfce4?

Yes. I'm using xfce4, sudo sh ~/Downloads/crouton -t xfce,extension -r kali-rolling. Am I supposed to use something else?

Same issue here. All of a sudden Terminator and XFCE Terminal refuse to run. The only command line interface that I can get to work is X Term. Updated everything, uninstalled and reinstalled Terminator which goes fine, but still will not launch.

Does it just happen on xfce4?
Or does it happen on unity and gnome as well?

Unsure. I haven't tried.

Okay so now kali installation is completely broken. I can't install kali-rolling at all.

try installing a different chroot and see what happens


add instructions to install from MacPorts

Hey @skymoo thanks for adding this. I've been out of the MacPorts game for years. Is someone else there maintaining those? Should we try to do something to ensure that latest versions are pushed to MacPorts too?

@technoweenie I'm a MacPorts developer and just updated to the 1.2.0 release before filing this merge request. I'm subscribed to the git-lfs release RSS feed so I can keep an eye on releases and update as necessary.
We've recently started using git-lfs at work and it's in my best interest to make sure this is easy to install on Macs and as we use MacPorts extensively, making sure git-lfs is up-to-date in MacPorts is important to me. Whilst I'm not the official MacPorts maintainer for git-lfs it is what we call an Open Maintainer port so the maintainer has no objections to other developers updating it.
I am planning on making sure this is up-to-date in MacPorts going forward.

@skymoo Oh nice, thanks for elaborating. I've added a call-out on git-lfs.github.com as well.

Oh yeah, let us know if there's something the project could do to make things easier for you. You're welcome to open other issues or say hi in https://gitter.im/github/git-lfs/installation.


Bug: Pagination is not working for trash list

Environment
Host

item
version

OS
Ubuntu 18.04.3

GROWI
3.5.17 and 3.6.0.-RC

node.js
10.17.0

npm
6.11.3

Using Docker
yes (Kubernetes)

Using growi-docker-compose
no

(Accessing https://{GROWI_HOST}/admin helps you to fill in above versions)
Client

item
version

OS
Windows 10 1909 18363.476

browser
Chrome 78.0.3904.108

How to reproduce? (再現手順)

Create a lot of new pages (more than 50) and delete them
Open /trash
Click "Next"

What happens? (症状)

/trash/?offset=51 is redirected to /trash

What is the expected result? (期待される動作)

The link should be /trash?offset=51 (no trailing slash)

Fixed in dev/3.5.x branch.
Please wait v3.5.23 is released.


Symfony bundle/Laravel integration

I noticed that the following functionality has been added.  This is a nice thing to have for Symfony/Laravel users.  However, in my opinion, this should be a separate repo and kept out of the internals of GraphQLite.  The library is already started to get quite large and the addition of things like this aren't part of the core of the library, but are rather, business logic concerns.
https://graphqlite.thecodingmachine.io/docs/symfony-bundle-advanced
https://graphqlite.thecodingmachine.io/docs/laravel-package-advanced

Closing this in favor of #376


ARROW-10179: [Rust] Fixed error in labeler

@kszucs, It seems that I used a notation in the labeler that is only supported in the master version of it. This PR fixes that. I verified it on my own fork: https://github.com/jorgecarleitao/arrow/pull/12

fyi @andygrove


Allow specifying the canonical import path for GitHub

Our GitHub organisation is named Teamwork, but for various hard to
change reasons we import packages as teamwork (lower case t). To enforce
this we add an import enforcement for our packages.
This works well, but godoc.org enforces users to use the canonical
GitHub path (Teamwork), but with the import statement the Go compiler
enforces a different path, leading to an error.
Fixing this is a bit of a catch-22: to get the canonical import path
from the Go comment need to clone the code and parse it; but to clone
the code we first want to normalize the path.
As a fix, this patch will allow package authors to specify the canonical
import path in the repositories README file as:
<!-- import "github.com/canonical/path" -->

I have added this to github.com/teamwork/validate as a test:
https://github.com/Teamwork/validate/commit/4b8ee7725060a0d0e16ddc27fcb9b3d2f5a5e3b5
It seems to me that using the README for this is the easiest way to
achieve this;. Another way to fix this might be to use a different file
with metadata for gddo (i.e. .gddo.yaml). I don't know if that would
make sense.
Fixes #507

I signed it!


Expose a middleware to output Open API description for a certain OData service

Maybe we can have an extension middleware to expose the OpenAPI description for a certain OData service.
For example:
public class ODataOpenApiMiddleware
{
    private readonly RequestDelegate next;

    public ODataOpenApiMiddleware(RequestDelegate next)
    {
        this.next = next;
    }

    public async Task Invoke(HttpContext context)
    {
        // implementation here
    }
}

Extension method:
public static IApplicationBuilder UseODataOpenApi(this IApplicationBuilder app)
{
    return app.UseMiddleware<ODataOpenApiMiddleware>();
}

Configure the Middleware:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{

       app.UseODataOpenApi();

       app.UseRouting();

       app.UseEndpoints(...);
}

This would be a very useful middleware and will help feed swagger.json files to the openapi explorer

@xuzhg Wouldn't it make more sense for that middleware to be in here https://github.com/OData/AspNetCoreOData ?

@darrelmiller actually, we already have a sample for OpenApi OData middelware at https://github.com/OData/AspNetCoreOData/tree/main/sample/ODataRoutingSample/OpenApi.
It's for raw OpenAPI description of OData. Thanks.

I don't believe that this library should be implementing features that are dependent on ASP.Net.


Feature: Type safe custom context properties in TypeScript

Summary
This pull request enables developers to maintain type safety when adding custom properties to the context middleware arg.
Description
This is partially related to #897. That issue was closed with a pull request which added built-in context fields to the type definitions, however it did not address the issue of using custom context properties.
Right now Bolt does not offer any way to add TypeScript typings to the context object. Consider this example:
const app = new App();

app.use(async ({ context, next }) => {
  context.foo = { bar: 'baz' };
  await next();
})

app.command('/test', async ({ ack, respond, context }) => {
  await ack();
  await respond(context.foo.bar);
})

This code would work, but there is no way to record type information about context.foo. The only workaround is something like this:
const app = new App<MyContext>();

interface MyContext {
  foo: { bar: string };
}

app.use(async ({ context, next }) => {
  const myContext = context as MyContext;
  myContext.foo = { bar: 'baz' };
  await next();
})

app.command('/show-user-id', async ({ ack, respond, context }) => {
  const myContext = context as MyContext;
  await ack();
  await respond(`Your custom user id is ${myContext.foo.bar}`);
})

This does work but is very clunky, verbose and overall causes the developer experience to suffer. Casting like this should be reserved for rare, special cases, not for something as basic as middleware.
Background
How do other frameworks handle this? Koa takes a type parameter ContextT which is then added to the build-in context type definition in middleware listeners:
interface MyContext {
  foo: { bar: string }
}

const app = new Koa<any, MyContext>();

app.use(async (ctx) => {
  ctx.foo = { bar: 'baz' };
})

Solution
My implementation is similar to Koa and works like this:
interface MyContext {
  foo: { bar: string };
}

const app = new App<MyContext>();

app.use(async ({ context, next }) => {
  context.foo = { bar: 'baz' };
  await next();
})

app.command('/show-user-id', async ({ ack, respond, context }) => {
  await ack();
  await respond(`Your custom user id is ${context.foo.bar}`);
})

This could be accomplished in a number of ways, I decided that the following is the cleanest option:

The AllMiddlewareArgs interface is the "root" of middleware args, so I added a CustomContext type parameter to it, constrained and defaulting to StringIndexed, and modified its type definition to define the context property as Context & CustomContext

export interface AllMiddlewareArgs<CustomContext = StringIndexed> {
  context: Context & CustomContext;
  logger: Logger;
  client: WebClient;
  next: NextFn;
}

The link between listener args and AllMiddlewareArgs is the Middleware interface, so I added a CustomContext type parameter to it as well, constrained and defaulting to StringIndexed, and modified its type definition to pass that type argument to  AllMiddlewareArgs.

export interface Middleware<Args, CustomContext = StringIndexed> {
  (args: Args & AllMiddlewareArgs<CustomContext>): Promise<void>;
}

Finally, I added a CustomContext type parameter to the App class, constrained and defaulting to StringIndexed, and modified its methods' type definitions to pass that type parameter to Middleware

export default class App<CustomContext extends StringIndexed = StringIndexed> {
  // ...
  public command(
    commandName: string | RegExp,
    ...listeners: Middleware<SlackCommandMiddlewareArgs, CustomContext>[]
  ): void {
    this.listeners.push([onlyCommands, matchCommandName(commandName), ...listeners] as Middleware<AnyMiddlewareArgs>[]);
  }
  // ...
}

Because all added type parameters default to StringIndexed and Context already extends StringIndexed they can still be used in other parts of the codebase without a type parameter or any changed to the typings. Other parts of the codebase don't need information about custom context properties because those are by definition added by the end developer and hence not needed in internal framework logic.
These changes do not modify any typings outside of this rather narrow scope, do not introduce any changes to the logic of the framework, and should work with any existing codebase.
Requirements (place an x in each [ ])

[x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.

I've been doing some background processing on this and I think I've found a more robust solution to this problem. Extending context is fine, but true typed middleware support should probably extend middleware args themselves. Another upside is that this approach is even simpler and less invasive, in my opinion. Here's some code:
interface EmptyMiddlewareArgs {}

export default class App<AppMiddlewareArgs extends EmptyMiddlewareArgs = EmptyMiddlewareArgs> {
  // ...
  public command(
    commandName: string | RegExp,
    ...listeners: Middleware<AppMiddlewareArgs & SlackCommandMiddlewareArgs>[]
  ): void {
    // ...
  }
  // ...
}

This way middlewares are not limited to only extending context, and changes are limited to the App class.
This could be improved even futher by recording the middlewares attached to an app:
export default class App<AppMiddlewareArgs extends EmptyMiddlewareArgs = EmptyMiddlewareArgs> {
  // ...
  private middleware: Middleware<AnyMiddlewareArgs>[];
  // ...
  public use<T extends EmptyMiddlewareArgs>(middleware: Middleware<AppMiddlewareArgs & T>): App<AppMiddlewareArgs & T> {
    this.middleware.push(middleware as Middleware<AnyMiddlewareArgs>);
    return this as unknown as App<AppMiddlewareArgs & T>;
  }
  // ...
}

Then we can define some typed middleware:
interface Example1MiddlewareArgs { customArg: string }
const example1Middleware = (value: string): Middleware<Example1MiddlewareArgs> =>
  async (middleware) => void (middleware.customArg = value)

interface Example2MiddlewareArgs { anotherCustomArg: number }
const example2Middleware = (value: number): Middleware<Example2MiddlewareArgs> =>
  async (middleware) => void (middleware.anotherCustomArg = value)

And attach them to the app in chained calls:
const app = new App()
  .use(example1Middleware('foo'))
  .use(example2Middleware(1))

app.command('/test', async ({ ack, respond, customArg, anotherCustomArg}) => {
  await ack();
  await respond(`${customArg}, ${anotherCustomArg}`)
});

customArg and anotherCustomArg will be typed correctly.
Finally, this approach could enable another somewhat common pattern - a single middleware attached to a specific listener. For example, I've been using a command args parser middleware (to parse command.text into separate values). Ideally I should be able to call app.command like this:
// this is obviously a simplified version :)
const parseCommandArgs = (): Middleware<SlackCommandMiddlewareArgs & {
  parsedCommandArgs: string[];
}> => async (middleware) => {
  middleware.parsedCommandArgs = middleware.command.text.split(' ');
}

app.command('/test', parseCommandArgs(), async ({ack, respond, parsedCommandArgs }) => {
  const firstArg = parseCommandArgs[0];
  await ack();
  await respond(`First argument: ${firstArg}`);
})

Obviously right now this cannot be typed correctly, but it could - with this overload on the command method. Similar overloads could be added for other listeners (action, message etc.):
export default class App<AppMiddlewareArgs extends EmptyMiddlewareArgs = EmptyMiddlewareArgs> {
  // ...
  public command<T>(commandName: string | RegExp, middleware: Middleware<SlackCommandMiddlewareArgs & AppMiddlewareArgs & T>, listener: Middleware<SlackCommandMiddlewareArgs & AppMiddlewareArgs & T>): void
  public command(commandName: string | RegExp, ...listeners: Middleware<AppMiddlewareArgs & SlackCommandMiddlewareArgs>[]): void
  public command(commandName: string | RegExp, ...listeners: Middleware<AppMiddlewareArgs & SlackCommandMiddlewareArgs>[]): void {
    // ...
  }
  // ...
}

Wonderful feature! 💯

@seratch I definitely think it could be, looking at the changes in this PR.
@szydlovski What are your thoughts? If you're currently at full capacity, I'm also happy to take a look at this.

I'm going to check out @szydlovski branch and play around with this a bit this week

Unfortunately I didn't have the time to work on this further, but I really like the suggestions posted here. I think this would be a great improvement to Bolt.

@seratch I believe this can be closed now?


Don't draw a long bar when there is no data supplied (health app)

#1366

Is this tested? It seems to me that it now it doesn't draw anything at all?


Weird GridStore issue going from 1.2.8 to 1.2.9

I looked through the code changes, but I didn't see anything that would change the way a GridStore is accessed.  In my test suites, I get an error when trying to create a gfs stream using this code:
apologies for teh vagueness in my report.  But I figured I'd post this in case it's obvious to you all what changed to make this piece of code no longer create a proper stream:

var GridStore = mongoose.mongo.GridStore;
var conn;
var connect = function(){
   console.log(`connecting to gridfs:${config.get('gridfs.db')}`);
   conn = mongoose.createConnection(config.get('gridfs.db'), config.get('gridfs.dbOptions'));
};
connect();
conn.on('error', console.log);
conn.on('disconnected', connect);

...

var getStream = function(){
    var db = conn.db;
    var gfs = new GridStore(db, `/opt/sendergen/data/${that.hash}`, "r", {root: 'fs'} );
    return gfs.stream();
};

you should reopen this in the mongoose project.

Hi, sorry to re-open, but I think there may be a bigger issue with the upgrade from 1.2.8 to 1.2.9.  When I revert to 1.2.8, my gridstore issue with my test above is resolved.  However, I noticed another issue with 1.2.9.  I think it has something to do with my standard replicaset setup.  My process crashes every 5 seconds or so.  If I downgrade to 1.2.8, everything seems fine.  Here is the stack trace:
TypeError: self.isDead is not a function
    at nextObject (/opt/sgapp/node_modules/mongoose/node_modules/mongodb/lib/cursor.js:576:44)
    at Cursor.next (/opt/sgapp/node_modules/mongoose/node_modules/mongodb/lib/cursor.js:223:12)
    at Store.execute (/opt/sgapp/node_modules/mongoose/node_modules/mongodb/lib/topology_base.js:83:18)
    at null._onTimeout (/opt/sgapp/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js:888:31)
    at Timer.listOnTimeout (timers.js:89:15)

can you provide a free standing code snippet that reproduces the issue as I'm not having much luck getting this to happen.


[Microsoft.IntegrationSpaces] Making TrackingDataStores and its properties in Integration Application optional.

[Microsoft.IntegrationSpaces] Making TrackingDataStores and its properties in Integration Application optional.
This is to publish changes already checked in the RPSaasMaster in the private repo - https://github.com/Azure/azure-rest-api-specs-pr/pull/18210
ARM (Control Plane) API Specification Update Pull Request

[!TIP]
Overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram
Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

Purpose of this PR
What's the purpose of this PR? Check the specific option that applies. This is mandatory!

[ ] New resource provider.
[ ] New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been created in adherence to OpenAPI specs PR creation guidance).
[ ] Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
[ ] Update existing version to fix OpenAPI spec quality issues in S360.
[x] Other, please clarify:

Updating the TrackingDataStoreProperty to make it optional. We need to relax this validation due to changes in the business needs.

Due diligence checklist
To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

[x] I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
[x] I have reviewed following Resource Provider guidelines, including
ARM resource provider contract and
REST guidelines (estimated time: 4 hours).
I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.

Additional information

 Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.

Getting help

First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
and https://aka.ms/ci-fix.
For help with ARM review (PR workflow diagram Step 2), see https://aka.ms/azsdk/pr-arm-review.
If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

/pr RequestMerge


docs: add next verse

update the number of bottles and add the next verse.

@ParanoidUser please invite me to be the collaborator of the repo, thanks

Ahoy @yugu2day,
Thanks for jumping on board! 🚢 Welcome to the YOLO club 👋


Support for Kibana 7.6

Support for Kibana 7.6

Hi @ch-bas, do you have any idea of what you need to close this?

Hi @francisco-hoo , I think this will not be closed and merged as long as the maintainer announced that there is no plan for upcoming versions, you can try my fork meanwhile.

Hi @francisco-hoo , I think this will not be closed and merged as long as the maintainer announced that there is no plan for upcoming versions, you can try my fork meanwhile.

Do you plan to make your fork compatible with Kibana 7.8 ?
I rely on this plugin to upgrade the stack but no luck since version 7.3.2 .

@RonnieDilli what you got when trying for >7.3.x ?

On 7.7.0 and 7.8.0 the instead of the plugin contents, it says:
Invalid type "time"
as the image bellow:

I tried applying changes supplied in other issues and even @ch-bas branch, but no effect.
Also the Kibana console shows:
[kibana-time-plugin] are using the legacy plugin format and will no longer work in a future Kibana release. Please refer to https://ela.st/kibana-breaking-changes-8-0 for a list of breaking changes and https://ela.st/kibana-platform-migration for documentation on how to migrate legacy plugins."}

@RonnieDilli what you got when trying for >7.3.x ?

@francisco-hoo

At this time, I'm looking for upgrading to versions from 7.7.0 and above, since the new feature "Alerts" are a deal breaker for us.

Yes this is a problem related to the code... Elasticsearch remove support for legacy plugins, so since 7.x you must change some part of your code. Here you have some examples of migration from the previous versions to new ones.

Yes this is a problem related to the code... Elasticsearch remove support for legacy plugins, so since 7.x you must change some part of your code. Here you have some examples of migration from the previous versions to new ones.

Thank you Francisco, I suspect the code needed changes, but other forks haven't any.
Anyway, I'll attempt the changes and upload them to my fork, I hope it works.

This pull request may suppress the need for the plugin:
https://github.com/elastic/kibana/pull/58435

This pull request may suppress the need for the plugin:

Yes @RobinELM but it will be interesting let people in previous versions have access to this feature too. Some people are using other plugins that requires a specific version of Kibana.
Is this pull request related to a play button with a start/end date to create an animation? Only seems to be a shareable link of a dashboard with start and end date..

This pull request may suppress the need for the plugin:

Yes @RobinELM but it will be interesting let people in previous versions have access to this feature too. Some people are using other plugins that requires a specific version of Kibana.
Is this pull request related to a play button with a start/end date to create an animation? Only seems to be a shareable link of a dashboard with start and end date..

I understand it will allow to choose some features when you share a dashboard, for example:
If you pick the Time Filter option it will show the default time picker while using an embedded dashboard.
Without the Time Filter you will be restrained to a start and end date, like you are nowadays anyway.


How do I lock and unlock the canvas?

You can control dragging or not.

editor.editor_mode = 'view';

edit for edit, fixed for nodes fixed but their input fields available, view for view only
Only block nodes.  Not canvas.

Combine editor mode view edit with #321

yes! o(￣▽￣)ブ


Lifestone main page

Under upcoming events on the MAIN page (not youth page) please correct Youth Camp dates...
-correct the dates from July 18-25 to June 18-25.

@LPepper23 Good catch. Sorry about that.


Overload to allow Exceptions

More of a question, than a request.
What would be your opinion on adding an overload on the ErrorResult to accept to Exception (and maybe even a String,Exception)
Something like this:
try
{
    var state = await domainEventHandler.Handle(domainEvent, domainEventMetaData,cancellationToken);
    return new Result.Success(state);
}
catch(Exception e)
{
    return new ErrorResult(e);
}

Hello @StevenBlair123,
I don't see any benefit in adding an overload that accepts an exception (maybe you have an idea?). The purpose of the result pattern is so that the consumer does not have to deal with exception handling and in this example I see that it does not follow that purpose.
Honestly, I would avoid using try-catch.

It's maybe a specific use case for use, but when a "WrongExpectedException" occurs it informs the Command Handler that it can retry a specific command. I guess we could look at changing it to check for a String value (i.e. result.Message.Contains("WrongExpected")
We still need to use try catch for libraries that don't support returning a Result.

What is "WrongExpectedException"? It is a generic exception. What specific error does it represent?

We still need to use try catch for libraries that don't support returning a Result.

Are they third-party libraries or custom libraries?

Third party unfortunately.
WrongExpectedException in this example is when we write to our Eventstore and an optimistic concurrency issue has occured. It's not a fatal issue, and in some cases, retrying it works, rather than having to do a full round trip again.

Yeah, that's exactly what we have done to integrate using your library.
We had our own version of "Result" prior to this (but your version is better)

Okay, so I think I've solved your question, or is there something else?

Yeah, i think we can close this. Thanks for the quick response.


More functions and some defensive checks

set, unset, pick, omit, mapKeys and mapValues
defensive array checks

@marvinhagemeister: I plan to add more in future. Maybe I should also split this file into smaller files?
I am not sure what your vision for this repo is, but this is my TODO list.
Casing related
------------------------
camelCase
capitalize
kebabCase
lowerCase
snakeCase
startCase
upperFirst

isX
------------------------
isEmpty
isNil
isNumber
isObject
isUndefined

Others
------------------------
chunk
concat
defaultsDeep
debounce
difference
findLastIndex
flatMap
get, set, unset (by path need to enhanced?)
includes
initial
intersection
join
last
map (by object?)
mergeWith
omitBy
orderBy
partition
slice
sortedUniqBy
split
sumBy
reduce
reverse
transform
uniqBy (path)
uniqWith
xorWith
zipObject

@marvinhagemeister Ok, PR ready to be merged for now.


Help on Model Saving Errors with DeepSpeed and PEFT During Supervised Fine-Tuning

I'm conducting Supervised Fine-Tuning on mistral-instruct-v0.2 for a zero-shot classification task. I managed to implement it using a Pipeline with Parameter-Efficient Fine-Tuning (PEFT) featuring Lora. To handle a higher batch size, I configured Accelerate alongside DeepSpeed. This allowed me to initiate the training process with a simple command: accelerate launch train.py. The training took 2 days on 4xH100 GPUs to complete.
Although the training process appeared successful, I encountered an error when attempting to save the model:
Missing key(s) in state_dict: "base_model.model.model.embed_tokens.weight", "base_model.model.model.layers.0.self_attn.q_proj.base_layer.weight" ... (continues)

It appears that DeepSpeed encountered an issue when loading the best checkpoint into the base model for final output generation, detecting discrepancies in the layer configurations, which I cannot explain. I have saved all checkpoints from this training session. Therefore, I have two questions for those with similar experiences:

Why did this happen?
How can I use the best checkpoint generated by DeepSpeed to update the base model and create a new one?

More information:
Accelerate config:
compute_environment: LOCAL_MACHINE
debug: false
deepspeed_config:
  deepspeed_config_file: /app/transformers-training/deepspeed.json
  zero3_init_flag: true
distributed_type: DEEPSPEED
downcast_bf16: 'no'
machine_rank: 0
main_training_function: main
num_machines: 1
num_processes: 4
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false

Deepspeed config:
{
    "train_micro_batch_size_per_gpu": "auto",
    "gradient_accumulation_steps": 4,
    "fp16": {
        "enabled": true
    },
    "scheduler": {
        "type": "WarmupCosineLR",
        "params": {
            "warmup_num_steps": "auto",
            "total_num_steps": "auto"
        }
    },
    "zero_optimization": {
        "stage": 3,
        "offload_optimizer": {
            "device": "cpu",
            "pin_memory": true
        },
        "offload_param": {
            "device": "cpu",
            "pin_memory": true
        },
        "stage3_gather_16bit_weights_on_model_save": false
    }
}

We need:

Your accelerate version (accelerate env)
How are you trying to save your model?

Your accelerate version (accelerate env)

- `Accelerate` version: 0.27.0.dev0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- Numpy version: 1.24.1
- PyTorch version (GPU?): 2.1.0+cu118 (True)
- PyTorch XPU available: False
- PyTorch NPU available: False
- System RAM: 944.45 GB
- GPU type: NVIDIA A100 80GB PCIe

How are you trying to save your model?
I'm doing a trainer.save_model(dir_model_name) and trainer is the SFTTrainer instance used to train the model.


WIP: Configurable session timeouts

The hard coded 3600 second life on session tokens is often problematic when working on tasks that require a longer timeout, such as a long-running local script or working in the console via Holochrome.
This PR allows each role to have a configurable timeout based on a configurable LDAP group attribute. This means an engineer role, for example, could have a 4 hour timeout and a more permissive god role could have something like a 30 minute timeout.

I'm still unclear on how helpful this will be, since my experience is a lot of refreshes rather than explicit signouts that clearly happen more than every hour. I'd love to be proven wrong though. (Though I might not notice much since I'm so often sre.)


Test scaffolding configuration problems

It looks like the test scaffolding isn't using the test configuration correctly in several places. I haven't completely figured out the interaction between the 3akai-ux casperjs tests and the Hilary oae-tests library, but some problems are apparent.

3akai-ux/tests/casperjs/beforeTests is hard-coding the test tenant configuration instead of using a configured value (e.g. from 3akai-ux/tests/casperjs/util/include/config.js).

Hilary/node_modules/oae-tests/lib/util.js createInitialTestConfig is overwriting server config values (e.g. config.servers.globalAdminHost = 'localhost:2000' instead of using configured values.

Hilary/node_modules/oae-tests/lib/util.js setUpTenants is hard-coding URLs instead of using configured values (e.g. in 3akai-ux/tests/casperjs/util/include/config.js).

3akai-ux/tests/casperjs/beforeTests is using its own test tenant instead of using the test tenants that are created by setUpTenants in Hilary/node_modules/oae-tests/lib/util.js

I'm still trying to parse all this out, but the effect (in my case) is that a few of the casperjs tests pass, but most do not. I think the problem is that some of the 3akai-ux test code is relying on configured values and other parts of the code are ignoring those values and trying to use the hard-coded ones. (On my local installation, none of the hard-coded values will work because they require admin privileges; I'm running OAE on non-privleged port 8080).

Also, I just noticed that the macros directory has a tests/metadata.js file. Should this file be in /tests instead?


Add magnet icon

My extension (betterfountain) needed a magnet icon, so I thought I would submit it as a pull request, as it is a fairly generic icon which could be useful to other extension authors too:

I've made sure it respects the style of the other icons and is correctly aligned to the grid, so there shouldn't be any issues. However it isn't included in the dist folder, as I wasn't able to actually build this (as there's still a few issues when trying to build on a Windows machine)

This is now in version 0.0.10 and will be available on Insiders on Monday, as well as part of the September release. Available now via the npm module.

Amazing, thank you !

https://guides.github.com/feed/index.xml


/en-US/docs/Learn/Forms/HTML5_input_types

Request type

[ ] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[x] Correction or update

Details

Hi, I was reading the content, and I found a typo.
It is a quick fix. I believe it is supposed to say Libraries and not libraies.
https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types

@luisgiraldov fixed; thanks for reporting!


Syncing graphs on tenosorboard

You can use this as a reference and turn into code for applio to properly have the graphs synced.
All credits for the img guide go to codename btw.
Also another thing that isnt mentioned in the guide i showed u above is that u also need to change the config file thats also created once training starts for it to work like so:
https://github.com/IAHispano/Applio/assets/140747431/0920d13e-8b4e-402a-ac03-e9ec943a4c16
The config file in the vid should be in the logs folder of the model itself. it should be called config.json
Change it to what the log interval of each step is just like all the other config files as the guide suggests and all should be good.
Lastly, another comment regarding step 2. is that closing rvc or restarting it isnt necessary. I got it to work with just having the model train for an epoch, followed the rest of the steps and without closing it or refreshing the page so dont try to add a script like that since it'll work without restarting or closing applio altogether.

It isn't really necessary for casual users to set the saving frequency to 1 so dont force it upon them. It'll still log properly as it should.
Please do add this cuz it's important to have the logs and stuff auto optimized for proper ckpt evaluation and more accurate graphs overall.

Added https://github.com/IAHispano/Applio/commit/601b5560f4e3ef0b82bb144eb6baba42cb1e1c64


I need your help

The project is compiled normally and the dll file is obtained successfully.I created a new project and used it as an example, but the program reported an error. Is it necessary to configure FFMPEG accurately? Please reply to me, thank you!

You need to have the FFmpeg DLLs in a subdirectory named FFmpeg within your project. Take a look at my ExtractGPX  project and get the files from there. Each of the 5 DLLs should have a Build Action of Content and Copy to Output Directory should be set to Only if newer. Notice the 2 lines right above the line that caused the error. Those lines set the path to the FFmpeg DLLs, which is your EXE path plus FFmpeg.

I am very glad to receive your reply within one day.I did as you said, but the problem has not been solved.
Step 1: I created a new folder, 5 FFmpeg DLLs in a subdirectory named FFmpeg within my project。 And each of the 5 DLLs have a Build Action of Content and Copy to Output Directory set to Only if newer.
Step 2: Debug my project, the FFmpeg folder (including dll files) is generated under the Debug folder. （ Come to “GpmfItemList gpmfItems = Gpmf.LoadMP4(videoFileName);”）The software still reported an error, could not find the dll file.
PS：I use VS2019 Community。Target framework: Framework.Net 4.7.2.

I have only ever built it with VS 2022. If you ZIP up your project and attach it here, I'll take a look at it.

Thank you very much！
从QQ邮箱发来的超大附件
MV_CS.rar (51.21M, 2023年03月24日 23:00 到期)进入下载页面：http://mail.qq.com/cgi-bin/ftnExs_download?t=exs_ftn_download&k=07306635d79eaecbce3f552d13305018414455000305070714030206071d015601054b065054521a0802510553525356000154533539627a6f6f25661b420345390d&code=90f550b7

Sorry this took so long. The only way I could get it to work was to use Visual Studio 2022 and create a Windows Forms App (NOT the one with .NET Framework). Here's a link to a working project: http://gardens.frozen.ca/downloads/ExtractGpxWinForms.7z
Also, you have a spelling mistake in the name of your FFmpeg directory.


[VA-5970] Change bitrateAverageBucket XDM type to String

https://github.com/adobe/xdm/issues/1550
As we are doing the final end to end tests, we discovered we need to have this field of bitrateAverageBucket defined as a String, otherwise, we get platform errors due to our reporting logic.
I see for the build it says changing the type of this field would be a breaking change, this is why we prefer to do this before making the schemas stable, so far clients would not be impacted yet.
This is a field we use only on mediaReporting, so clients don't specify this field themselves we just send it on mediaReporting (after computing it internally) in the final reports from the platform.

Approving because its an experimental data type and is still going through testing by the media analytics team. They also confirmed that this field is only use iinternally


Enable chunked parquet reads by default

This enables chunked reads by default so we can get more time testing it before the 23.02 release goes live.

build


Show value as int or float

Currently the values in state.py are shown as float of int, eg:
def mileage(self) -> float:
def max_range_electric(self) -> int:

resulting in:

I would prefer to have these values all as int, but as long as these are shown consistent it's fine by me :grinning:
Also in some cases the get method is used:
return self._attributes.get('remainingRangeElectric')
and in some cases not:
return float(self._attributes['mileage'])
@m1n3rva shall I make a PR for this?

Yes, you're right, this should be consistent, fixed in #70

@m1n3rva
I also saw some other differences.

Also in some cases the get method is used:
return self._attributes.get('remainingRangeElectric')
and in some cases not:
return float(self._attributes['mileage'])

Should that be made consistent as well?

@gerard33 good point, I changed this.

Fixed in PR #70.


test db, deposit and indexer packages inside application

Scope
Adding and correcting tests for the following packages inside application:
db: 83% coverage
deposit: 77% coverage
indexer: 90% coverage
Why?
Increase code robustness
Todos
N/A

Please, merge the latest candidate branch on this PR and check if CI is going to pass. In case you find any problem with the CI, let me know!


Another Download redirecting to the dashboard on Beatsaver

Platform
This bug report concerns:

[x] Client

Details
As shown with oksoffs problem, the download sends me to the main page. I'm on the most recent version of Chrome (77 and some decimals or so) and not sure why it would still be doing it, be it my end or the site.
#47

I can't reproduce this issue. Unless you can post reliable repro steps I'm gonna close this issue since the other one was fixed/


Execution Argument not populating

Hey Team,
When adding a subflow trigger and selecting autocomplete for the "Execution Argument" field, my previous nodes do not appear

Moved it to the main repository. Thanks!


Just testing a FIPS modification

Checklist

[ ] documentation is added or updated
[ ] tests are added or updated

Ha, this seems to work better.


UpdateSecret function in secrets.go handler will not work as Docker secrets are immutable

Expected Behaviour

All functions in the secrets handler for Docker Swarm should work as intended if they are in the code base.
Current Behaviour

The function updateSecret() in the secrets.go handler does not update secrests; it can't because Docker secrets are immutable. An unhelpful status 500 error is thrown when attempting to update a secret via the API gateway using curl -d '{"name":"secret-name","value":"test-edit-i"}' -X POST http://<IP_ADDRESS>:8080/system/secrets.
Possible Solution

Remove the updateSecret() function completely
Handle PUT requests to update secrets with a 405 "Method not allowed" error.

Steps to Reproduce (for bugs)

Remove faas-netes or other non-Docker Swarm version of OpenFaaS on local machine.
git clone the openfaas/faas repo
run ./deploy_stack.sh -n, which installs with basic auth disabled
create a secret with curl -d '{"name":"secret-name","value":"test"}' -X POST http://<IP_ADDRESS>.1:8080/system/secrets
curl -d '{"name":"secret-name","value":"test-edit-i"}' -X POST -v http://<IP_ADDRESS>:8080/system/secrets
An HTTP/1.1 500 Internal Server Error is returned.

Context

I'm new to Docker and I had no idea that Docker secrets were immutable. Given that, I spent a day trying to figure out why the update part of my test in https://github.com/openfaas/certifier/pull/22 was failing for Docker Swarm installation, but not for faas-netes. The error returned was a 500 error, which made me think it was some logic error on our side.
The code base in faas-swarm wasn't helpful, because the presence of updateSecret() makes it seem like updating was possible.
Your Environment

FaaS-CLI version ( Full output from: faas-cli version ):
N/A - I didn't use faas-cli for the secrets CRUD testing.

Docker version docker version (e.g. Docker 17.0.05 ):
Docker engine version is 19.03.5.

Are you using Docker Swarm or Kubernetes (FaaS-netes)?
Docker Swarm

Operating System and version (e.g. Linux, Windows, MacOS):
MacOS Catalina

Link to your project or a code example to reproduce issue:
https://github.com/openfaas/certifier/pull/22

/add label: design/approved

/add label: help wanted

I will work on this one.

/assign: me

Thanks @viveksyngh, when should I check back for a PR?

Added the PR.


Flatpickr. On change wrong value

https://codepen.io/gamevnlc/pen/LYpbqEw
Your Environment

flatpickr version used: 4.6.3
Browser name and version: Chrome
OS and version: MacOS 10.15.3

On change give incorrect datetime value when enableTime is enable for the first time open picker

This is technically supposed to be the default behaviour.
You need to pass in the defaultDate yourself to make it use the current time. You can use simple JavaScript or any datetime wrapper like moment or Luxon -
defaultDate: new Date(),
You could also have defaultDate use a date coming from the database/any external source (useful in an "Edit" scenario) -
defaultDate: new Date(variableName)
Refer to https://flatpickr.js.org/options/ for other config options that you might need.

Thanks for the great explanation @BRAiNCHiLD95

This is technically supposed to be the default behaviour.
You need to pass in the defaultDate yourself to make it use the current time. You can use simple JavaScript or any datetime wrapper like moment or Luxon -
defaultDate: new Date(),
You could also have defaultDate use a date coming from the database/any external source (useful in an "Edit" scenario) -
defaultDate: new Date(variableName)
Refer to https://flatpickr.js.org/options/ for other config options that you might need.

hm weird I think it must be incorrect behavior or maybe you misunderstand, because in my example when first time click on change value give time string in my timezone but on the textbox it display time on utc. if you use onValueUpdate event you will see the value date time has change three time from local timezone to utc timezone.

hm weird I think it must be incorrect behavior or maybe you misunderstand, because in my example when first time click on change value give time string in my timezone but on the textbox it display time on utc. if you use onValueUpdate event you will see the value date time has change three time from local timezone to utc timezone. The onChange should give correct value reflect to text box change

If I understand correctly -
If you set the enableTime: false (i.e. - only datepicker), you'll notice the onValueUpdate runs just once!
So, what that tells me is that with enableTime: true, the onValueUpdate is called once each for - Date, Hour, Minutes. Because it needs to update all those values, correct?
The dateStr given by onChange will follow the format you specify using the defaultFormat option.
Try this config in your pen to confirm what I just said -
flatpickr("#flatpickr2", {
   enableTime: true,
   onChange: (selectedDates, dateStr, instance) => {
      alert('onChange -> ' + dateStr);
   },
   dateFormat: 'd-M-Y H:i', // change this to whatever format you want.
   minuteIncrement: 15,
   onValueUpdate: function(selectedDates, dateStr, instance) {
      alert('onValueUpdate -> ' + dateStr);
   }
});
BUT, if you do need to do something with dateStr yourself - the best thing to do would be to pass it through some datetime plugin (like moment), and format it into whatever format you need!
PS: If you could explain what exactly you're trying to achieve, I (or someone else) could try to help you out a bit better. 😄

@BRAiNCHiLD95
as you can see from my gif above. When I click on input box the alert dialog display follow step

onValueUpdate 29/04 09:39 => My current time zone
onChange 29/04 09:39 => My current time zone
onValueUpdate 29/04 12:00 I assume that is default time from flatpickr
onValueUpdate 29/04 12:00 again
29/04 12:00 in the input box
Therefore I think onChange give incorrect value on the first time click.

I am experiencing a bug as well.
I just create the flatpickr instance, set min and max dates, set default date to today.
When I open the flatpickr, the date seems to be properly set.
But then I close the flatpickr without changing anything, and I get an "onchange" event with date being 01 september 2019 (my min date).
Event when putting pick.jumpToDate or anything in the "oncreated" event, it does not work.
I have to manually push the today date inside pick.selectedDates (in the "oncreated" hook) for the correct behavior to happen.
My 2 cents :)

We have a similar issue. Our scenario:

There is no default value
The enableTime option is true
Focus the input field - the calendar opens
Click outside of the field
(ngModelChange) is triggered with the min value set

On the other hand, this issue doesn't exist when the enableTime = false - focusing out of the input date field without a value set does not trigger the (ngModelChange).


the token provided in .env doesnt work

please provide a valid token so i can do the funny and run fhdbot with can pooper code

Please take a shower immediately.


Error on Module Library using multidex.

I am getting the following error when I try to run my project, I am using butterknife in a library module and I have enabled multidex in the main app module.
Error:Execution failed for task ':appMDLive:transformClassesWithJarMergingForProductionDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: butterknife/BuildConfig.class

This seems very clearly to be a build system problem. Does a clean build fix it?

No, it doesn't.

I found my mistake, previously we were using butterfork and I forgot to update the other modules that were using butterfork. Sorry, my bad.


Rename ObjectFactory -> ObjectManager

Old name hints to a factory pattern which it isn't

@pgh70 Thank you for your PR. can you change ObjectFactory -> McObjectFactory?
please pull recent changes from development branch and do your change

Changing ObjectFactory to McObjectFactory still hints to a factory-pattern (http://www.tutorialspoint.com/design_pattern/factory_pattern.htm) which it isn't.. It is simply a class which holds references to other objects.. So a Manager is a better name for it...

@pgh70 Yes, McObjectManager could be a better name.

Is there a reason for using this class for holding the references? For instance RawMessageQueue could be a singleton class, then there is no need to let ObjectFactory (of McObjectManager) keep track of a reference to the class... I can create a PR to demonstrate this..

@pgh70 i do not have any specific reason to hold references. I will check your changes in 3 days.  right now I'm in vacation.  sorry for the delay.  thank you.

@pgh70 can you satisfy checkstyle?
[INFO] --- maven-checkstyle-plugin:2.17:checkstyle (check-style) @ mycontroller-core ---
[INFO] Starting audit...
/home/travis/build/mycontroller-org/mycontroller/modules/core/src/main/java/org/mycontroller/standalone/db/DataBaseUtils.java:30: Wrong order for 'org.mycontroller.standalone.McObjectManager' import.
/home/travis/build/mycontroller-org/mycontroller/modules/core/src/main/java/org/mycontroller/standalone/db/SensorUtils.java:25: Wrong order for 'org.mycontroller.standalone.McObjectManager' import.
/home/travis/build/mycontroller-org/mycontroller/modules/core/src/main/java/org/mycontroller/standalone/gateway/serialport/SerialDataListenerjSerialComm.java:21: Wrong order for 'org.mycontroller.standalone.McObjectManager' import.
/home/travis/build/mycontroller-org/mycontroller/modules/core/src/main/java/org/mycontroller/standalone/metrics/MetricsAggregationBase.java:360: Line is longer than 120 characters (found 121).
/home/travis/build/mycontroller-org/mycontroller/modules/core/src/main/java/org/mycontroller/standalone/metrics/MetricsAggregationBase.java:369: Line is longer than 120 characters (found 121).
/home/travis/build/mycontroller-org/mycontroller/modules/core/src/main/java/org/mycontroller/standalone/mqttbroker/BrokerConfiguration.java:53: Line is longer than 120 characters (found 121).
/home/travis/build/mycontroller-org/mycontroller/modules/core/src/main/java/org/mycontroller/standalone/rule/McConditionScript.java:24: Wrong order for 'org.mycontroller.standalone.McObjectManager' import.
Audit done.

Satisfy checkstyle done (after some effort in IntelliJ) :)

@pgh70 merged your changes thank you!

@jkandasa Did you also look at the conversion to singleton as shown in:
https://github.com/pgh70/mycontroller/tree/rmq-singleton
(commit: a4d2c6e516ddb8795a3f405140dc9ace267f075)
This demonstrates the conversion of RawMessageQueue to a singleton...
If you like this approach, i can make a PR with RawMessageQueue and the other classes where McObjectManager keeps a reference to, changed to singleton class which renders McObjectManager obsolete..

@pgh70 Thank you! Let me have a look and update you soon.

@pgh70 your single tone approach looks good. we can merge it. Kindly create a PR. Thank you very much for your contribution.


Update dutch translations for form components

Dutch translations for the wizard fields and some other dutch translation improvements.

Thanks


Implemented: functionality to add refresh button when we do not have jobs on pipeline page (#28940kn).

Screen shot:

@azkyakhan please update UI on this to center button properly

@azkyakhan please update UI on this to center button properly

I have updated UI on this to center retry button.
https://github.com/hotwax/job-manager/pull/101/commits/c1a625ae74ef8a19334d7b4608e38394f6537749


test fix fe ut failed as get the same port

Proposed changes
some case of fe ut failed, as get the same port.
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


massive datasets loading and training

if I have a massive datasets of images, and unable to fit all of them into memory, how do I load and train them by batches?
my folder structure is:
datasets
|
|----Train
|       |---- images
|       |-----masks
|
|---- Val
        |---- images
        |---- masks

If you are using GPU instead of loading all image at ones, try using datagenerator it allows you to supply images to GPU in batches, earlier I used to get OOM issue, now I am able to train my model.


User nonroot lost write access to kubemod-crt after 1.1.2

Steps to reproduce:

Run a 1.1.2 container with shell:

docker run -it --rm kubemod/kubemod-crt:v1.1.2 sh

While in the container shell:

cd /kubemod-crt
touch test

The above yields touch: test: Permission denied.
This is a problem when deploying KubeMod to non-OpenShift Kubernetes distributions as not all distributions make the container user a member of group root.
Suggested solution:
Roll back the changes made by #6 and make /kubemod-crt writable by everyone, as per the original suggestion by @gmahomarf.

Hi @vassilvk.
I missed that in my changes. #9 should fix it (I tested locally)

Thank you @gmahomarf!
I'll try and test the new bits this week with the goal of releasing with KubeMod v0.14.0.


WPF XAML Intellisense does not work in VS2017, F# Console Application

In Visual Studio 2015, I can add a XAML file to a F# Console Application project, and edit with the aid of Intellisense. This does not work in Visual Studio 2017.
Repro steps

Create a new F# Console Application project.

Add assembly references to PresentationCore, PresentationFramework, WindowsBase, and System.Xaml.

Add a New Item to the project, an XML file named MainWindow.xaml.

Copy the following boilerplate XAML into the file.

<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid />
</Window>

Try to edit the text in the XAML Designer's XAML window. Notice that Intellisense does not work.

Expected behavior
When I place the cursor within the Grid element and press ctrl-space, I expect VS to show me the properties of the Grid class. This is how VS 2015 behaves.
Actual behavior
Intellisense does not popup when expected.
Known workarounds

Edit the XAML without Intellisense.
Use the XAML Designer's Design and Property windows.
Revert to VS 2015.

Related information
Windows 7
VS 2017 Community
Visual F# nightly build
F# 4.1
.NET Framework 4.6.2

AFAIK it's now tightly coupled to Roslyn, so it's unlikely it will be fixed.

Strange that all else works but the Intellisense.

Tagging @mgoertz - any idea what happened here?


Cannot show icons in the custom tabs

Hi! In the documentation is written that the component is using Prime Icons. I installed the package and included the css-file, but the icons are now shown. Can you write, please, a short example?
It is also written that customization is possible. Can I use another icons (for example fontawsome)? Can I add any image?

I was able to add icons, but still stays the question if I can use another icons (fontawsome) or any other free images.

@SciManJD Yes i think you can, can you try this :

it's  <template #step></template>.  check out: Doc in #step slot you can add another icon


Merging plugin and standalone

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Required feature flags:
[ ] Changes UI
[ ] Includes DB Migration (follow approval process in SIP-59)

[ ] Migration is atomic, supports rollback & is backwards-compatible
[ ] Confirm DB migration upgrade and downgrade tested
[ ] Runtime estimates and downtime expectations provided

[ ] Introduces new feature or API
[ ] Removes existing feature or API

Codecov Report
Base: 82.29% // Head: 81.86% // Decreases project coverage by -0.42% :warning:

Coverage data is based on head (777253e) compared to base (91a3a65).
Patch has no changes to coverable lines.

Additional details and impacted files
@@                   Coverage Diff                   @@
##           dodo-frontend-1.3.1       #8      +/-   ##
=======================================================
- Coverage                82.29%   81.86%   -0.43%
=======================================================
  Files                      332      332
  Lines                    27410    27410
=======================================================
- Hits                     22556    22440     -116
- Misses                    4854     4970     +116

Flag
Coverage Δ

hive
?

mysql
81.75% <ø> (+0.04%)
:arrow_up:

postgres
81.78% <ø> (ø)

presto
?

python
81.86% <ø> (-0.43%)
:arrow_down:

sqlite
81.38% <ø> (ø)

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

Impacted Files
Coverage Δ

superset/db_engines/hive.py
0.00% <0.00%> (-82.15%)
:arrow_down:

superset/db_engine_specs/hive.py
69.80% <0.00%> (-16.87%)
:arrow_down:

superset/db_engine_specs/presto.py
83.47% <0.00%> (-6.49%)
:arrow_down:

superset/views/database/mixins.py
81.03% <0.00%> (-1.73%)
:arrow_down:

superset/connectors/sqla/models.py
88.03% <0.00%> (-1.66%)
:arrow_down:

superset/db_engine_specs/base.py
88.20% <0.00%> (-0.39%)
:arrow_down:

superset/models/core.py
89.69% <0.00%> (-0.26%)
:arrow_down:

superset/utils/core.py
88.62% <0.00%> (-0.13%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


fix of close sessions

addOnClose addOnRun with mutex
handle ctx.Done in udp client/server

Codecov Report

Merging #132 into master will increase coverage by 1.12%.
The diff coverage is 84.78%.

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
+ Coverage   60.51%   61.64%   +1.12%
==========================================
  Files          50       50
  Lines        3756     3830      +74
==========================================
+ Hits         2273     2361      +88
+ Misses       1191     1175      -16
- Partials      292      294       +2

Impacted Files
Coverage Δ

udp/session.go
76.47% <80.00%> (+2.66%)
:arrow_up:

dtls/session.go
75.75% <83.33%> (+14.88%)
:arrow_up:

tcp/session.go
65.53% <83.33%> (+5.41%)
:arrow_up:

udp/server.go
88.62% <100.00%> (+3.81%)
:arrow_up:

dtls/client.go
78.08% <0.00%> (-2.74%)
:arrow_down:

udp/client/clientconn.go
71.53% <0.00%> (-2.56%)
:arrow_down:

tcp/clientconn.go
67.82% <0.00%> (+0.99%)
:arrow_up:

tcp/server.go
81.19% <0.00%> (+1.70%)
:arrow_up:

tcp/options.go
18.51% <0.00%> (+6.17%)
:arrow_up:

... and 2 more

Continue to review full report at Codecov.

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


fix(remix): Fix support for plain objects in handler result

Type of change

[x] 🐛 Bug fix
[ ] 🌟 New feature
[ ] 🔨 Breaking change
[ ] 📖 Refactoring / dependency upgrade / documentation
[ ] other:

Packages affected

[ ] @clerk/clerk-js
[ ] @clerk/clerk-react
[ ] @clerk/nextjs
[x] @clerk/remix
[ ] @clerk/types
[ ] @clerk/themes
[ ] @clerk/localizations
[ ] @clerk/clerk-expo
[ ] @clerk/backend
[ ] @clerk/clerk-sdk-node
[ ] @clerk/shared
[ ] @clerk/fastify
[ ] gatsby-plugin-clerk
[ ] build/tooling/chore

Description

[] npm test runs as expected.
[] npm run build runs as expected.

issue: https://github.com/clerkinc/javascript/issues/960
introduced in: https://github.com/clerkinc/javascript/pull/750

@nikosdouvlis PTAL


Update plugin doc

I would merge to master if no other user comment

@CalvinKirs Is this PR ready to go now?

@CalvinKirs Is this PR ready to go now?

yup,PTAL.thx


Add inventory pipeline to inventory software on machines we use for builds

Add inventory pipeline for PS modules
Fix pipeline
Try again
Show dotnet --info
Add custom agents as well
Update inventory scripts
Remove maxParallel

/check-enforcer override


Manage website identification with the new scraper

With the old scraper, I can use the Surfing plugin to identify myself on websites that need it (Atlassian tools, Youtube...) to enable access to the page or avoid getting a login nag text instead of the real content.
How can I do that with the new scraper ?

I see a discussion about that is opened in this pull request : https://github.com/zolrath/obsidian-auto-link-title/pull/91#issuecomment-1876684005


pip install fails

Here is the error:
odoo@ns348518:~/erp$ sudo pip install invoice2data
[sudo] password for odoo:
Downloading/unpacking invoice2data
  Downloading invoice2data-0.2.0.tar.gz (358kB): 358kB downloaded
  Running setup.py (path:/tmp/pip_build_root/invoice2data/setup.py) egg_info for package invoice2data
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/invoice2data/setup.py", line 3, in <module>
        version = open('VERSION').read().strip()
    IOError: [Errno 2] No such file or directory: 'VERSION'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/invoice2data/setup.py", line 3, in <module>

    version = open('VERSION').read().strip()

IOError: [Errno 2] No such file or directory: 'VERSION'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/invoice2data
Storing debug log for failure in /home/odoo/.pip/pip.log

That's a problem. Checking it out now.

Works now. Sorry for the trouble.


Cabal cradle matches only exposed-modules to component

Upstream issue https://github.com/haskell/cabal/issues/6622
Explanation in hie-bios:
Assume project setup:
$ cabal init -p example --libandexe --tests --main-is=Main.hs --source-dir=src --application-dir=app --test-dir=test

and hie.yaml:
cradle:
  cabal:

then we can observe the following behaviour:
$ hie-bios flags src/MyLib.hs
Options: [...]
Dependencies: [...]

$ hie-bios flags app/Main.hs
Failed to show flags for "./app/Main.hs": ["Failed to parse result of calling cabal","","cabal.exe: Unknown target './app/Main.hs'.\nThe package example has no file target 'app/Main.hs'.\n\n\n",""]

However, the invocation hie-bios flags app/Main.hs should work just as well.

Adding Main to other-modules seems to allow hie to work, however it's complained about by hie and probably breaks other tools
2020-04-02 14:08:32.123114596 [ThreadId 14] - Warning: Enabling workaround for Main module 'Main' listed in 'other-modules'
2020-04-02 14:08:32.12318556 [ThreadId 14] - illegally!

I have no idea why, but this configuration allows src/Main.hs to work
cradle:
  multi:
    - path: "./src"
      config:
        cradle:
          cabal:
    - path: "./src/Main.hs"
      config:
        cradle:
          none:

Closing as upstream ticket is fixed.


Several issues

Happy to see yet another react boilerplate. However, I don't see any advantages over existing boilerplates. It does not represent a new approach, architecture, pattern, etc. Apart from this, there are some other issues such as using two different linters (jshint, eslint).
Hope to see something new in this repo.

Thanks Mohammad, I build new things in this repo soon ;)

I had released Node_ENV in this version ;)


STM: delete keys

Right now STM only supports Get and Put. For completeness, it should probably support Delete as well.

this already exists; oops


BREAKING CHANGE: remove intermediate withdrawal cell

Summary
This pr remove withdrawal lock cell. Allow block producer to generate user withdrawal cell directly after withdrawal request is finalized.
Motivation
Original withdrawal lock cell allow user to sell locked withdrawal cell, so user doesn't need to wait until it's finalized. We removed
this feature for security concern, then withdrawal cell become unnecessary. We can remove it to further reduce the attack surface.
Specification
Add a finalized withdrawal cursor record to GlobalState. Block producer must update this cursor index every time a finalized user withdrawal cell output is generated.
State validator will make sure that all block withdrawals between updated cursor are processed and corresponding user withdrawal cells are correctly generated.
Implementation
Schema changes
GlobalState

bump GlobalState max version to 2
new last_finalized_withdrawal field

NOTE:
A special value for last_finalized_withdrawal

u32::MAX (aka<PHONE_NUMBER>) means all withdrawals in a block are finalized

If a block's withdrawal_index is set to above values in the GlobalState,
Corresponding raw block is not required in witness to verify last_finalized_withdrawal  transition.
struct LastFinalizedWithdrawal {
    block_number: Uint64,
    withdrawal_index: Uint32,
}

struct GlobalState {
    rollup_config_hash: Byte32,
    account: AccountMerkleState,
    block: BlockMerkleState,
    reverted_block_root: Byte32,
    tip_block_hash: Byte32,
    tip_block_timestamp: Uint64,
    last_finalized_block_number: Uint64,
    last_finalized_withdrawal: LastFinalizedWithdrawal,
    // 0: running, 1: halting
    status: byte,
    version: byte,
}

RollupAction

new RollupFinalizeWithdrawal action

table RawL2BlockWithdrawals {
    raw_l2block: RawL2Block,
    withdrawals: WithdrawalRequestVec,
    withdrawal_proof: CKBMerkleProof,
}

vector RawL2BlockWithdrawalsVec <RawL2BlockWithdrawals>;

table RollupFinalizeWithdrawal {
    block_withdrawals: RawL2BlockWithdrawalsVec,
    block_proof: Bytes,
}

union RollupAction {
    // submit layer2 block
    RollupSubmitBlock,
    // change rollup status to halting
    RollupEnterChallenge,
    // change rollup status to running
    RollupCancelChallenge,
    // revert layer2 blocks and change status to running
    RollupRevert,
    // finalize and generate user withdrawal cell
    RollupFinalizeWithdrawal,
}

Verification Logic
State validator

global state version < 2, nothing is changed
global state version 2

submit block

check no output withdrawal cell
check no input reverted withdrawal cell
check invariant last_finalized_withdrawal

upgrade from v1, v0, block producer must set last_finalized_withdrawal to correct value according to tip block withdrawals (tip block number + u32::MAX or u32::MAX - 1)

finalize withdrawal

check only last_finalized_withdrawal is modified
check last_finalized_withdrawal is correctly updated
check input custodian, out withdrawal, output custodian balance

Custodian lock

ensure RollupSubmitBlock and RollupFinalizeWithdrawal action to unlock by state validator

What about updating Cargo.lock and c-uint256-tests/src/lib.rs in another PR?

The original plan is to merge this pr to breaking-change-next-upgrade branch, rest of breaking change PRs follow.

What about updating Cargo.lock and c-uint256-tests/src/lib.rs in another PR?

Done
https://github.com/nervosnetwork/godwoken-scripts/pull/126/commits/384b0db67479493bea12da4593ccf9a6add07a60

What about updating Cargo.lock and c-uint256-tests/src/lib.rs in another PR?

Unfortunately, I must bump ckb-vm version in Cargo.lock to fix https://github.com/nervosnetwork/godwoken-scripts/actions/runs/3144728720/jobs/5111105951#step:16:151

This PR should be retarget to next script upgrade.


[AutoPR containerregistry/resource-manager] [Do not merge] Swagger and Examples for the new Scoped tokens feature of Azure Container registry

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/5543

(message created by the CI based on PR content)

Codecov Report

Merging #5123 into restapi_auto_containerregistry/resource-manager will decrease coverage by 3.98%.
The diff coverage is 16%.

@@                                 Coverage Diff                                 @@
##           restapi_auto_containerregistry/resource-manager    #5123      +/-   ##
===================================================================================
- Coverage                                            52.99%      49%   -3.99%
===================================================================================
  Files                                                10849     6508    -4341
  Lines                                               227609   182551   -45058
===================================================================================
- Hits                                                120613    89457   -31156
+ Misses                                              106996    93094   -13902

Impacted Files
Coverage Δ

...erregistry/container_registry_management_client.py
61.07% <16%> (-7.94%)
:arrow_down:

...afactory/azure/mgmt/datafactory/models/__init__.py
50.67% <0%> (-49.33%)
:arrow_down:

...ights/azure/applicationinsights/models/__init__.py
51% <0%> (-49%)
:arrow_down:

...e/cognitiveservices/vision/face/models/__init__.py
51.08% <0%> (-48.92%)
:arrow_down:

...services/language/textanalytics/models/__init__.py
51.16% <0%> (-48.84%)
:arrow_down:

...iveservices/search/entitysearch/models/__init__.py
51.25% <0%> (-48.75%)
:arrow_down:

azure-eventgrid/azure/eventgrid/models/__init__.py
51.25% <0%> (-48.75%)
:arrow_down:

...ration/azure/mgmt/datamigration/models/__init__.py
51.27% <0%> (-48.73%)
:arrow_down:

...ure/mgmt/recoveryservicesbackup/models/__init__.py
51.46% <0%> (-48.54%)
:arrow_down:

...ce/azure/mgmt/containerinstance/models/__init__.py
51.8% <0%> (-48.2%)
:arrow_down:

... and 4428 more

Continue to review full report at Codecov.

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

This PR has been merged into https://github.com/Azure/azure-sdk-for-python/pull/5203


Address some issues with the Sockets tests.

Mark Disconnect() and SendPackets() tests as Windows-specific
Mark a few tests that cover dual-stack semantics with a dummy issue number while the differences are investigated
Fix port numbers on a multitude of tests to avoid conflicts at runtime
Make the perf tests runnable on non-Windows platforms.

@CIPop I'll be updating this PR to address the feedback you left on the original PR that included these changes. I'll ping you again once I've done so.

I still question the manual assignment of a port number to each test.  Someone adding a new test is going to need to go and find the next available number, and it seems like there's a really good chance of accidentally using an already used number.  Even if using a a counter to pick the next port number has the same chance of conflicting with other things in the system, it still seems less at risk for these kinds of errors.
But it's up to you guys.  Other than that, LGTM.

I still question the manual assignment of a port number to each test.

As per the previous CR, I think the long-term plan is to move all of the tests to use ephemeral ports that are automatically assigned by the OS.

@CIPop I believe I've addressed all comments from #19 with the latest commit in this PR.

@davidsh can you take a look at these changes as @CIPop is on vacation?

@pgavlin I need to abstain from this PR.  I have not been involved in this particular effort and don't realy have context to give it justice reviewing it. Given the approaching deadline, I'm fine with pushing this if you think it is ready for the next step.  When @CIPop is back on Wednesday, he can give additional feedback.  You can incorporate that feedback later into future PR's..

SGTM. Thanks!

LGTM
@pgavlin Thanks for splitting the memcmp part!
Regarding the port part, if there are still issues you could disable parallel execution:
See @davidsh code in System.Net.Http.WinHttpHandler: (XunitTestAssemblyAtrributes.cs):
[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)]
This doesn't address running various OS tests on the same box at the same time.


Update gettingstarted

Adding Terraform for each cloudprovider
Updating steps to include AWS Manual
Add screenshot

@giladshahar , please review this and let me know what you think.

@netapp-jmontel why was this assigned to Gilad? Can we please have this looked at? Maybe if anything Roy?


Using service account with Admin SDK yields Forbidden

It seems to me that using a service account with domain-wide delegation authority to access the Directory API is not working.
I have a service account with domain-wide delegation authority set, I have generated a JSON-format key, and given permissions for the respective OAuth client ID in the Admin console for scope https://www.googleapis.com/auth/admin.directory.user.readonly
The code I'm using to generate the access token is the same as the sample from readme:
scope = "https://www.googleapis.com/auth/admin.directory.user.readonly"

client = Google::Apis::AdminDirectoryV1::DirectoryService.new
client.authorization = Google::Auth::ServiceAccountCredentials.make_creds({
  json_key_io: File.open('./service_account.json'),
  scope: scope
})

client.authorization.fetch_access_token!

Inspecting the client authorization, there is an access token, but using it programmatically or via Postman will always yield HTTP 403 Forbidden "not authorized to access this resource/api".
Example resulting in HTTP 403
client.list_users(domain: 'myDomain.com')

Answering my own issue, the problem is that Google requires knowledge of a real actor with every service account request as well. This is done with
client.authorization.sub = <admin_email_in_organization>

And requires authorization for your service account client id in the used scope, which can be set in the Google Admin console.


PR 3 : S3 Mini provisioner Test 3

test this please

test this please

Test this please

Test this please

test this please

test this please


Odd rendering with no fill?

So, I decided to try using SVG in my otherwise System.Drawing based program.

As you can see, it looks a little... uh, off.
I was unable to find any information at all on how to use it, so I'm not sure why it looks like it does.
This is the relevant part of my code:
        private static Image GetPieceImage(Piece piece, int size)
        {
            var svg = SvgDocument.Open<SvgDocument>(new MemoryStream(Properties.Resources.BlackQueen1)); //.svg file as byte[]
            return svg.Draw(size, size);
        }

//later:
var pieceImage = GetPieceImage(piece, squareSize);
g.DrawImage(pieceImage, sx + pieceOffsetX, sy + pieceOffsetY, squareSize, squareSize);

Any ideas?

@robhol - If this is still an issue, can you provide the failing SVG?

I actually managed to track it down - still seems to fail.


Fraction / extended float implementation

Hey guys, I'm wondering if you would be interested in taking upstream the fraction crate. It's extended float implementation based on rationals from num crate. I see you already working on BigDecimal implementation, however it does not imply having NaN and Inf values (neither do Ratio). The idea behind Fraction though is to be lossless float implementation.

perhaps it might even be reimplemented on BigDecimal what it's stable enough

Honestly, no, I don't think we'll take on any additional crates at this time.  The folks interested in BigDecimal recently moved to an external project, published as the bigdecimal crate, and I think we'll keep it separate for now.  I'd be happy to add cross-reference links to the readme and/or num docs though!

Fair enough :) It also appears quite often that that having functionality in external crates helps to decouple dependencies within the code. Thank you for the quick response.


BVH - fix stale current_tree in deactivate function

Fix a bug in deactivate where current_tree variable was stale. This may have resulted in visual anomalies.
Changes passing of current_tree from a member variable to a function argument, making bugs due to stale state less likely.
May fix #48749
May fix #48790
Notes

Deactivate is only currently used in the render tree, as part of showing and hiding objects.
This is split from #48892. Originally that PR did two things, the fix here, and also added thread safety. After extensive testing for thread contention neither myself or @pouleyKetchoupp could see it happening, so we can make a separate decision about adding thread safety and it makes sense to separate the PRs. I will change that PR to only include the thread safety.
I've also changed the name of the variable from current_tree to tree_id, as that name seems to make more sense when passing it as an argument rather than using it as a state.

Thanks!

We should also port this PR to master to keep things in sync (although it's used only for physics for now on master so the bug is not present).

Cherry-picked for 3.3.3.


Group size in pre-training process of BGE-M3

In the pre-training process as described in the BGE-M3 paper, do you only use the "query" and "positive" for training (i.e. the train_group_size is set to 1)?

Yes.

Thanks for your reply


MAIN: data quality release

@jordanrburger can you please approve this PR as well please? Thank you. :-)


Enable re-ordering of properties

Hello,
I'd like to be able to re-order properties. Drag and drop one above the other.
Is this possible?

This is not possible right now, and would probably add quite a bit of complexity to the component, so I'd have to carefully consider the best way to implement it.
It's a bit tricky, because strictly speaking object properties don't have an "order", and it's only through JS implementation details that key order is mostly preserved at all. (For example, if you save a JSON field as binary in a Postgres database, the order is completely ignored).
For now, the only way to change the order (other than deleting and re-adding keys) is to edit the JSON directly and move it around as text:

I've created an issue to consider key ordering more generally, so will definitely be thinking about it further: https://github.com/CarlosNZ/json-edit-react/issues/73

@SanderKok01, I've started playing round with a basic drag-n-drop. I should have something for you to try out next week some time. :)

You can now do basic drag-n-drop in v1.13.0: https://www.npmjs.com/package/json-edit-react/v/1.13.0
Let me know how it goes :)

Amazing, thank you!


About litewallet observation pattern technology please teach

hi, @mosadialiou I would like to know if spv mode can implement the observation mode.
For example I know an address and synchronize the information of that address through watch mode. Just to view. I don't have the ownership of this address. I wonder if this is possible? Or even to observe multiple addresses?
I'm confused about this and would like to get technical help, thanks!
I don't know if spv mode can be implemented. I'm confused about this and would like to get technical help on it, thanks!

Sorry..we are out of time to train others  @vcexnet.  If you want to pick up an issue, we can do a code review


[DO NOT MERGE] Add new ROCm-Device-Libs bitcode library for ROCm 2.7.

Follow-up to #589 .
Do not merge as the new bitcode library is NOT present in current ROCm 2.6 right now.
Discussing with ROCm-Device-Libs maintainers are ongoing to devise a consistent approach to deliver bitcode libraries from ROCm-Device-Libs.

Failures for this PR on rocm-xla target is expected:
2019-08-02 16:48:25.505478: E tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc:276] bitcode module is required by this HLO module but was not found at /opt/rocm/lib/oclc_wavefrontsize64_on.amdgcn.bc

This bitcode library would only show up in the upcoming ROCm 2.7, and not in the current 2.6.

jenkins: retest this please

Taking this PR as ROCm 2.7 has been released.

need to study why some rocm-xla cases show:
Inconsistency detected by ld.so: dl-close.c: 811: _dl_close: Assertion `map->l_init_called' failed!


"p{foo:bar;foo:baz}" and "p{foo:bar}p{foo:baz}" are minified differently

This may or may not be intentional, but I was surprised by the following:
> c.minify("p{foo:bar;foo:baz}").styles
'p{foo:bar;foo:baz}'

> c.minify("p{foo:bar}p{foo:baz}").styles
'p{foo:baz}'

If I pass {advanced:true} to the constructor, the second example produces "p{foo:bar}p{foo:baz}" instead.
I'm using clean-css to normalize style sheets to test a JS to CSS compiler (probably an anathema for designers, I know), but I can't get it to behave accordingly in this case, where my code generates "p{foo:bar}p{foo:baz}".

This is in fact intentional, as take the following two declarations:
a{display:inline-block;display:block}

a{display:inline-block}/* some other properties */a{display:block}

In the first one, you declare two display properties adjacent to each other so it's highly likely you want to do a fallback, when one is not understood (more on this in a second) then the other one is picked. It's a common pattern in CSS.
In the 2nd one these are in two different selectors so it's less likely the author intention was to have a fallback, thus the display:block overrides display:inline-block.
However this is far from perfect so we started merging properties based on understandability, where less understandable properties (take color:rgba(...) which IE<9 does not support) cannot be overridden by more understandable, e.g. color:red. This is already done for background, color, marging, padding, and others: https://github.com/jakubpawlowicz/clean-css/blob/master/lib/properties/compactable.js#L35
Ultimately it will be implemented for all properties, see #290, but you can get a safer behavior using aggressiveMerging: false in the meantime.
Hope this helps!

That behavior makes sense when processing hand-crafted CSS, which is not my use case.
j2c is dumb, and things that are close together in the JS source may end up in consecutive but separate declarations for the same selector.
I ended up switching to crass which produces the same output for both inputs.

You can get the same behavior in clean-css by using advanced: false flag.

My bad, I meant advanced:false in the first post, and it doesn't suit my use case because it still outputs two rule sets rather than one with both properties. I could have changed the reference output in my test to match it, but in the long run, I wanted a CSS normalizer, which produces identical output for semantically equivalent, but syntactically distinct input, and clean-css doesn't do that.
A casting error on my side :-)

Ok, makes it makes sense now! I'll close the issue now.


The server can't connect to the server because the item registries don't match.

I installed the same version of Apotheosis on both server and client, and when I tried to connect, I couldn't because the item registries didn't match.
When I opened the server with my personal PC, I had no problems, but when I opened it through the hosting site, or at certain times, this happened.
The item in the registry that doesn't match is an item called ender_lead.
I don't know what the exact cause of this problem is.
latest.log

make sure client and server have the same configs

Ah, That's a really simple issue! I thought it was a problem with the modes themselves when I saw "modes don't match". I have no idea what is causing this and have been at a loss all day. thanks so much for letting me know.