Get the prev/next posts in JS

Hey,
I really appreciate Cockpit !
But I've a problem to get the prev/next posts from a current entry.
I'd like to have the posts just before and after my entry with _id _this.actualite._id
I've found in the mongoDB docs the $ltand $gt but how I can use those properties ?
I've tried this, but it doesn't work :
Cockpit.request('/cockpit/call', {
    module: 'collections',
    method: 'find',
    args: [
       'Actualites', {
          filter: {
             'categorie': _this.categorie._id,
              _id: {
                 $lt: _this.actualite._id
              }
           },
           limit: 1,
           sort: {
             _id: -1
           }
        }]
        }).success(function(item) {
          console.log(item);
          console.log(item[0].titre);
      });

Maybe someone can help me :)
Thanks

Why won't you load whole collection (respecting the order), lookup current entry and pick previous/ next entries from an array?
That's how it's done for example in Joomla CMS. You could also add a collection-link type field and set up these manually.
The $lt and $gt are comparators when picking up entries based on criteria, I think it's better to use them in conjunction with an custom-order field.
BTW: I have bad experience with filtering the _id field, Cockpit handles this propety in a different way.

Yep, I thought to your solution, but as you wrote, finally I needed to find previous / next entries based on a custom field (a date selected by editor).
// Previous entry
Cockpit.request('/collections/get/Entries', {
  filter: {
    'date': {
      '$lt': _this.entry.date
    },
    'category': _this.category._id
  },
  limit: 1,
  sort: {
    'date': -1
  }
})

// Next entry
Cockpit.request('/collections/get/Entries', {
  filter: {
    'date': {
      '$gt': _this.entry.date
    },
    'category': _this.category._id
  },
  limit: 1,
  sort: {
    'date': 0
  }
})

At first it did not work, but I noticed that the $lt / $gt filters in MongoLite did not allow to compare a string (and my entry's date was a string).
So I fixed this in MongoLite to solve my problem:
// cockpit/vendors/MongoLite/Database.php
private static function evaluate($func, $a, $b) {
  $r = false;

  switch ($func) {

    ...

    case '$gte':
      if (is_numeric($a) && is_numeric($b)) {
        $r = $a >= $b;
      } else if (is_string($a) && is_string($b)) {
      $r = $a >= $b;
    }
    break;

    case '$gt':
      if (is_numeric($a) && is_numeric($b)) {
        $r = $a > $b;
      } else if (is_string($a) && is_string($b)) {
        $r = $a > $b;
      }
      break;

    case '$lte':

      if (is_numeric($a) && is_numeric($b)) {
        $r = $a <= $b;
      } else if (is_string($a) && is_string($b)) {
        $r = $a <= $b;
      }
      break;

    case '$lt':

      if (is_numeric($a) && is_numeric($b)) {
        $r = $a < $b;
      } else if (is_string($a) && is_string($b)) {
        $r = $a < $b;
      }
      break;

    ...
  }
}

PS : I don't speak english very well so if you don't understand, tell me ! ahah :)

what is the example output for date field?

The output is like this : 2015-06-17. But yes, I would have had the same result by parsing the array with all entries.

My point is that probably the is_numeric check is not required in variables checking. PHP is capable of comparing strings and even if this wouldn't usually make much sense, it does when comparing dates in ISO 8601 format, in case like yours.

Yep you've right, I just added the condition with is_string($a) && is_string($b) to not change too much the original code of MongoLite. Thank you for your feedback.

Well, this is because I'd say it's good candidate for pull request. I think the checks may be removed altogether.
By the way: I just recall that every entry has created and modified values, which are unix timestamps. You could use these instead of having editor to set it manually.

Yes good idea !
Publishers want to be able to edit the publication date of an entry. That's why I have a date custom field.


RuntimeError: No application found.

Hello,
I'm trying to get choices from database for my Form but get an error:
"RuntimeError: No application found. Either work inside a view function or push an application context. See http://flask-sqlalchemy.pocoo.org/contexts/."
Do you know what happens here?
I worked with the code of your book till chapter 8. now I tried to do it like they have done it in my "forms.py" script.
https://stackoverflow.com/questions/35314102/get-choices-from-a-database-query-in-wtforms-and-flask-sqlalchemy
thanks mate

The code works fine till I write the line Users.query.all() in my forms.py. Then I get this error message.
"RuntimeError: No application found. Either work inside a view function or push an application context. See http://flask-sqlalchemy.pocoo.org/contexts/."
I have imported all models (from ..models import *).

Yes, the problem is that you can use the database in the global scope of the application, because that code runs when the module is parsed. That early there is no application and no application context, so Flask-SQLAlchemy does not have access to the database configuration.

thanks for your support! What can I do to get this running? I can see that flasky is also importing User and Roles in forms.py

Hi, thanks for advise. I found a solution for this error. I moved the query to the views.py script and added the choices from there form.user_items.choices = choices. Thank you for your support!


Decode labels

Need to figure out a way of decoding the labels. Currently Categorize is being done in compose_tfms without the Pipeline knowing about it

Fixed with TfmdLists caching


Image compressed to unsupported format causes crash when OpenGL renderer is in use.

Godot version
4.0.beta.custom_build f692b476869c14023b
System information
arch linux
Intel® Core™ i7-10510U × 8
Mesa Intel® UHD Graphics (CML GT2)
NVIDIA GeForce GTX 1080
Issue description
When using the OpenGL renderer loading of some scenes leads to crashes. Terminal shows this error before stacktrace:
ERROR: Image Format: 34 is not supported by the OpenGL3 Renderer
   at: _get_gl_image_and_format (drivers/gles3/storage/texture_storage.cpp:569)
ERROR: Condition "img.is_null()" is true.
   at: texture_set_data (drivers/gles3/storage/texture_storage.cpp:1084)

Steps to reproduce
Unsure
Minimal reproduction project
None yet

Can you please post the stack trace as well so we can see where it crashes?

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.beta.custom_build (486ff0437bb0c99f96ac98ee2ca51c431868157f)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x38a00) [0x7f82d249aa00] (??:0)
[2] /usr/lib/libc.so.6(+0x15384d) [0x7f82d25b584d] (??:0)
[3] /usr/lib/dri/iris_dri.so(+0x621eb8) [0x7f82c6421eb8] (??:0)
[4] /usr/lib/dri/iris_dri.so(+0x271332) [0x7f82c6071332] (??:0)
[5] /usr/lib/dri/iris_dri.so(+0x2730b3) [0x7f82c60730b3] (??:0)
[6] godot4-dev(+0x1a195e2) [0x5643537e85e2] (??:0)
[7] godot4-dev(+0x43a0fdc) [0x56435616ffdc] (??:0)
[8] godot4-dev(+0x43a576b) [0x56435617476b] (??:0)
[9] godot4-dev(+0x3ce941a) [0x564355ab841a] (??:0)
[10] godot4-dev(+0x3ceb4fa) [0x564355aba4fa] (??:0)
[11] godot4-dev(+0x3cede90) [0x564355abce90] (??:0)
[12] godot4-dev(+0x3d468cc) [0x564355b158cc] (??:0)
[13] godot4-dev(+0xae06fb) [0x5643528af6fb] (??:0)
[14] godot4-dev(+0xa830d1) [0x5643528520d1] (??:0)
[15] godot4-dev(+0xa75589) [0x564352844589] (??:0)
[16] /usr/lib/libc.so.6(+0x23290) [0x7f82d2485290] (??:0)
[17] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f82d248534a] (??:0)
[18] godot4-dev(+0xa813c5) [0x5643528503c5] (??:0)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)

For some reason I'm unable to get debug symbols working, I'm not sure how the build system has changed recently. I'll keep trying to get debug symbols.

Thread 1 "godot4-dev" received signal SIGSEGV, Segmentation fault.
0x00007ffff7c78d41 in memcpy () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff7c78d41 in memcpy () from /usr/lib/libc.so.6
#1  0x00007fffea9e91e9 in ?? () from /usr/lib/libnvidia-glcore.so.525.60.11
#2  0x00007fffea9fdad2 in ?? () from /usr/lib/libnvidia-glcore.so.525.60.11
#3  0x00007fffea64dba6 in ?? () from /usr/lib/libnvidia-glcore.so.525.60.11
#4  0x0000555556f6d5e2 in RasterizerSceneGLES3::_render_list_template<(PassMode)1> (p_alpha_pass=true, p_to_element=<optimized out>, p_from_element=0, p_render_data=0x7fffffffcb00, p_params=<synthetic pointer>, this=<optimized out>)
    at drivers/gles3/rasterizer_scene_gles3.cpp:2334
#5  RasterizerSceneGLES3::render_scene (this=<optimized out>, p_render_buffers=..., p_camera_data=<optimized out>, p_prev_camera_data=<optimized out>, p_instances=..., p_lights=..., p_reflection_probes=..., p_voxel_gi_instances=...,
    p_decals=..., p_lightmaps=..., p_fog_volumes=..., p_environment=..., p_camera_attributes=..., p_shadow_atlas=..., p_occluder_debug_tex=..., p_reflection_atlas=..., p_reflection_probe=..., p_reflection_probe_pass=<optimized out>,
    p_screen_mesh_lod_threshold=<optimized out>, p_render_shadows=<optimized out>, p_render_shadow_count=<optimized out>, p_render_sdfgi_regions=<optimized out>, p_render_sdfgi_region_count=<optimized out>,
    p_sdfgi_update_data=<optimized out>, r_render_info=<optimized out>) at drivers/gles3/rasterizer_scene_gles3.cpp:1987
#6  0x00005555598f4fdc in RendererSceneCull::_render_scene (this=<optimized out>, p_camera_data=<optimized out>, p_render_buffers=..., p_environment=..., p_force_camera_attributes=..., p_visible_layers=<optimized out>, p_scenario=...,
    p_viewport=..., p_shadow_atlas=..., p_reflection_probe=..., p_reflection_probe_pass=<optimized out>, p_screen_mesh_lod_threshold=<optimized out>, p_using_shadows=<optimized out>, r_render_info=<optimized out>)
    at servers/rendering/renderer_scene_cull.cpp:3270
#7  0x00005555598f976b in RendererSceneCull::render_camera (this=this@entry=0x55555da302b0, p_render_buffers=..., p_camera=..., p_scenario=..., p_viewport=..., p_viewport_size=..., p_use_taa=p_use_taa@entry=false,
<EMAIL_ADDRESS>p_shadow_atlas=..., p_xr_interface=..., r_render_info=<optimized out>) at servers/rendering/renderer_scene_cull.cpp:2551
#8  0x000055555923d41a in RendererViewport::_draw_3d (this=<optimized out>, p_viewport=0x55556a441d60) at servers/rendering/renderer_viewport.cpp:211
#9  0x000055555923f4fa in RendererViewport::_draw_viewport (this=0x55555da301d0, p_viewport=0x55556a441d60) at servers/rendering/renderer_viewport.cpp:266
#10 0x0000555559241e90 in RendererViewport::draw_viewports (this=<optimized out>) at servers/rendering/renderer_viewport.cpp:711
#11 0x000055555929a8cc in RenderingServerDefault::_draw (this=0x55555d9fd230, p_swap_buffers=<optimized out>, frame_step=0.30054199999999914) at servers/rendering/rendering_server_default.cpp:91
#12 0x00005555560346fb in Main::iteration () at main/main.cpp:3205
#13 0x0000555555fd70d1 in OS_LinuxBSD::run (this=this@entry=0x7fffffffdb90) at platform/linuxbsd/os_linuxbsd.cpp:878
#14 0x0000555555fc9589 in main (argc=<optimized out>, argv=0x7fffffffe0f8) at platform/linuxbsd/godot_linuxbsd.cpp:73

Looks like it is crashing when attempting to draw the mesh.
Could you please share the model/texture that is causing the crash so we can look into it?

Due to licensing I'm unable to upload the assets. I've been trying to recreate a MRP, I've gotten as far as applying the just normal map to a plain sphere mesh and had the crash trigger, however it doesn't do so reliably in that case, which has me thinking there might be more than one thing going on...

https://github.com/godotengine/godot/issues/69836 could be related

Looks like duplicate of #69836, which contains a fix.


go/types, types2: wrong method signature

What version of Go are you using (go version)?

$ go version
go version devel go1.18-b32209d22d Thu Sep 9 23:18:18 2021 +0000 windows/amd64

What did you do?

package main

import (
	"fmt"
)

type ISetName interface {
	SetName(name string)
}

type Item struct {
	Name string
}

func (i *Item) SetName(name string)  {
	i.Name = name
}

func Hello[T ISetName]()  {
	ins := new(T)
	(ins).SetName("foo")
        fmt.Printf("%+v", ins)
}

func main() {
	Hello[Item]()
}

What did you expect to see?

output: {Name:"foo"}

What did you see instead?

// go version devel go1.18-b32209d22d
output:Item does not satisfy ISetName: wrong method signature
	got  func (*Item).SetName(name string)
	want func (ISetName).SetName(name string)

// go2go playground
output:Item does not satisfy ISetName: wrong method signature
	got  func (*Item).SetName(name string)
	want func (ISetName).SetName(name string)

when method 'SetName' with value receiver is ok, but pointer receiver not

package main

import (
	"fmt"
)

type ISetName interface {
	SetName(name string)
}

type Item struct {
	Name string
}

func (i Item) SetName(name string)  {
	i.Name = name
}

func Hello[T ISetName]()  {
	ins := new(T)
	(ins).SetName("foo")
        fmt.Printf("%+v", ins)
}

func main() {
	Hello[Item]()
}

// go version devel go1.18-b32209d22d
output: error: cannot convert ins (variable of type *T) to ISetName

// go2go playground
output:&{Name:}

It is seem that go2go playroung can work with value receiver method 'SetName', but  go version devel go1.18-b32209d22d not.

package main

import (
	"fmt"
)

type ISetName interface {
	SetName(name string)
}

type Item struct {
	Name string
}

func (i Item) SetName(name string)  {
	i.Name = name
}

func Hello[T ISetName]()  {
	ins := new(T)
	(*ins).SetName("foo")
        fmt.Printf("%+v", ins)
}

func main() {
	Hello[Item]()
}

// go version devel go1.18-b32209d22d
output: &{Name:}

The error reported is correct, since when you call new(T), this basically a pointer to interface ISetname. If you convert your program to non-generic, and run with go1.17, you will get a clearer error message:
func Hello(T ISetName) {
	ins := &T
	(ins).SetName("foo")
	fmt.Printf("%+v", ins)
}

func main() {
	Hello(&Item{})
}

$ go run t.go
./t.go:21:7: ins.SetName undefined (type *ISetName is pointer to interface, not interface)

Maybe we can make go/types and go/types2 produce a clearer error message.
cc @griesemer @findleyr

Retitled, looking for better error message.


Add note about type mismatch in automatically inserted apply argument

[skip ci]

This not ready yet, there would be subtleties to take care off like correctly wrapping the error message, but I am already adding @odersky as a reviewer for a high-level review: is the approach reasonable?

The note is not always relevant, for example consider:
def Test = List(1,2)("hello")

Does that clarify anything to say that:
  | The required type comes from a parameter of the automatically
  | inserted `apply` method of `List[Int]`,
  | which is the type of `List.apply[Int]([1,2 : Int]*)`.

?
As a middle ground, I moved the message to -explain.

The pickling failure in "Applications.scala" is just due to an extra line break…
➜  ~/dotty git:(mb/19680) diff before-pickling.txt after-pickling.txt
17956,17957c17956,17957
<                                                                                dotty.tools.dotc.reporting.Diagnostic
<                                                                                .Error
---
>                                                                                dotty.tools.dotc.reporting.
>                                                                                Diagnostic.Error

I was able to reproduce (with scala3-compiler-bootstrapped / testOnly *BootstrappedOnlyCompilationTests -- *picklingWithCompiler), but not to minimize and find exactly where and why the line breaking mechanism differs before and after pickling.

What I tried
I tried this, but it compiles successfully with -Xprint-types -Ytest-pickler -Yprint-pos -Yprint-pos-syms:
package dotty.tools.dotc.reporting.Diagnostic
package Diagnostic

class Error

def adipiscing() =
  def elit() =
    def nunc() =
      def vel() =
        def sapien() =
          def congue() =
            def lacus() =
              def duis() =
                def quam() =
                  def eleifend() =
                    def ultricies() =
                      def morbi() =
                        def pellentesque() =
                          val dia: Any = ???
                          dia match
                            case _: String =>
                              dia match
                              case _: String =>
                                dia match
                                  case _: String => new Diagnostic.Error()
                                  case _ => dia
                              case _ => dia
                            case _ => dia
                        pellentesque()
                      morbi()
                    ultricies()
                  eleifend()
                quam()
              duis()
            lacus()
          congue()
        sapien()
      vel()
    nunc()
  elit()

@main def Test = adipiscing()

As a workaround, I just moved maybeAddInsertedApplyNote to the outer scope, which avoids the problem.

@odersky: I removed the last line of the message, as discussed.


Fixed the upload FileReader and goby seasons and location

Thank you so much for the PR! I just committed the useFsAccessApi fix. We don't currently hardcode fish values into the site, and we actually have #78 open to fix a few different inconsistencies with the fish. Will move discussion over there related to that, but thank you so much!


THE LEGEND OF HEROES: TRAILS OF COLD STEEL [PCSB00866]

App summary

App name: Atelier Rorona Plus ~The Alchemist of Arland~
App serial: PCSB00866
App version: 1.01

Vita3K summary

Version: v0.1.4
Build number: 2436
Commit hash: https://github.com/vita3k/vita3k/commit/b37293fa

Test environment summary

Tested by: Zangetsu38
OS: Windows 10
CPU: AMD Ryzen 9 3900X
GPU: NVIDIA RTX 2070 Super
RAM: 16 GB

Issue:

crash on ngs error

Screenshots:

Log
vita3k.log

Vita3K summary

Version: v0.1.6
Build number: 2841
Commit hash: https://github.com/vita3k/vita3k/commit/0c75bbb5
CPU backend: Dynarmic

Test environment summary

Tested by: othmanead
OS: Windows 11
CPU: Intel i5-10300H
GPU: RTX 3060 mobile
RAM: 16 GB

Issue:
Game plays with no issues
Screenshots:

Log
vita3k.log
Recommended labels

Playable


Vector takes drozd magazines (naming issue for guns and their ammo)

Description

So someone reported that the vector does not infact take SMG magazines (.35) but takes .40 ammo. After some digging it turns out .40 ammo is named Drozd Magazines. We no longer have the Drozd so the following needs to happen:

Rename the Drozd Magazine to either .40 Vector Magazine OR .40 SMG Magazine.
Add either a suffix to each gun as to what ammo it takes for mapping purposes, or more logically, add the ammo calibre to the description of the gun so when you examine it you know what it takes.

Please close this issue if it has been corrected.

Looks like it is fixed, closing


kanata: 1.6.1 -> 1.7.0-prerelease-1

This patch fixes compilation error1 with rust 1.802.
This should be merged after https://github.com/NixOS/nixpkgs/pull/332764 is merged.  If there is a new stable release before https://github.com/NixOS/nixpkgs/pull/332764 is merged, we should use that stable release.
Description of changes

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[X] Tested, as applicable:

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

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

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

[X] Fits CONTRIBUTING.md.

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

@ofborg build kanata


prettier

This looks like tis is the older version of prettier. We updated recently to prettier 2.

@sdjmchattie Pointed out something about a similar linting failure I ran into, which might be relevant here. In this case the linting tests on the push and pull were running with two different versions of prettier, and it was impossible to satisfy both. In that case he fixed up for the newer version (ie. the pull tests) and we merged that in. However you could also rebase on top of develop, and then everything would be nice and consistent.


[WIP/Draft] Web: Support "broken arrow" button

This commit is to provide "broken arrow" button to handle
unexpected system situation such as PR hangs, frequence OOM operations,
and too many zombie processes.
Changes proposed in this PR:

Supported "broken arrow" button

Signed-off-by: Geunsik Lim<EMAIL_ADDRESS>

:memo: Version: 1.20180820. Thank you for submitting PR #400. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://invain.mooo.com/.

:octocat: cibot: @leemgs, There is a newline issue. The final line of a text file should have newline character. Please resubmit your PR after fixing end of line in ci/taos/webapp/broken_arrow.php.

:octocat: cibot: @leemgs, One of the format checkers is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnsuite/TAOS-CI/wiki/.

:octocat: cibot: @leemgs, There is a newline issue. The final line of a text file should have newline character. Please resubmit your PR after fixing end of line in ci/taos/webapp/broken_arrow.php.

:octocat: cibot: @leemgs, One of the format checkers is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnsuite/TAOS-CI/wiki/.

Changes proposed in this PR:

Version 2:

Added configuration variables in json file
Added a routine to handle POST html tag
Updated check routine if id and passowr are correct
Added doxygtags
Specified php files with permission 644

Version 1:

Supported "broken arrow" button

Web UI:

:octocat: cibot: @leemgs, There is a newline issue. The final line of a text file should have newline character. Please resubmit your PR after fixing end of line in ci/taos/webapp/broken_arrow_proceed.php.

Changes proposed in this PR:

Version 3:

Improved try ... catch statement for readability
Fixed incorrect file name : broke_arrow_proceed.php
Added comments for maintenance

Version 2:

Added configuration variables in json file
Added a routine to handle POST html tag
Updated check routine if id and passowr are correct
Added doxygtags
Specified php files with permission 644

Version 1:

Supported "broken arrow" button

:octocat: cibot: @leemgs, One of the format checkers is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnsuite/TAOS-CI/wiki/.

:octocat: cibot: @leemgs, One of the format checkers is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnsuite/TAOS-CI/wiki/.

:octocat: cibot: @leemgs, There is a newline issue. The final line of a text file should have newline character. Please resubmit your PR after fixing end of line in ci/taos/webapp/broken_arrow_proceed.php.

Changes proposed in this PR:

Version 5:

Added a security facility to contol IP address

Check if IP address of a system administrator
is equal to an allowed IP address.

Version 4:

Updated a html design of Broken arrow webapge.

Version 3:

Improved try ... catch statement for readability
Fixed incorrect file name : broke_arrow_proceed.php
Added comments for maintenance

Version 2:

Added configuration variables in json file
Added a routine to handle POST html tag
Updated check routine if id and passowr are correct
Added doxygtags
Specified php files with permission 644

Version 1:

Supported "broken arrow" button

:octocat: cibot: @leemgs, One of the format checkers is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnsuite/TAOS-CI/wiki/.

Changes proposed in this PR:

Version 6:

Updated variables (e.g., id, ip, password) for code readability

Version 5:

Added a security facility to contol IP address

Check if IP address of a system administrator
is equal to an allowed IP address.

Version 4:

Updated a html design of Broken arrow webapge.

Version 3:

Improved try ... catch statement for readability
Fixed incorrect file name : broke_arrow_proceed.php
Added comments for maintenance

Version 2:

Added configuration variables in json file
Added a routine to handle POST html tag
Updated check routine if id and passowr are correct
Added doxygtags
Specified php files with permission 644

Version 1:

Supported "broken arrow" button

The local test is successfully done. This PR (v6) is ready to be merged.


Updates per PR#63 Discussions

Description

Made some minor changes per PR #63
Relocated the components of the Robot Framework code.  The specific test definitions seem inherently tied to the Upgrade Testing Framework and the Executor we had defined seemed like it should be part of our core library, so moved things accordingly.  I didn't see a reason to keep the separate Python package for it.

Issues Resolved
N/A
Testing
Check out the updated output from our robot tests in the following run.  I increased the minimum logging severity for the robot tests so we should only get test results and any WARN/ERROR logs messages from it.  This seems like it will scale better in terms of intelligibility as we add more tests.
(.venv) chelma@3c22fba4e266 upgrades % ./run_utf.py --test_config ./test_configs/snapshot_restore_es_7_10_2_to_os_1_3_6.json
[FrameworkRunner] ============ Running Step: LoadTestConfig ============
[LoadTestConfig] Loading test config file...
[LoadTestConfig] Loaded test config file successfully
[FrameworkRunner] Step Succeeded: LoadTestConfig
[FrameworkRunner] ============ Running Step: BootstrapDocker ============
[BootstrapDocker] Checking if Docker is installed and available...
[BootstrapDocker] Docker appears to be installed and available
[BootstrapDocker] Ensuring the Docker image docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 is available either locally or remotely...
[BootstrapDocker] Docker image docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 is available
[BootstrapDocker] Ensuring the Docker image opensearchproject/opensearch:1.3.6 is available either locally or remotely...
[BootstrapDocker] Docker image opensearchproject/opensearch:1.3.6 is available
[FrameworkRunner] Step Succeeded: BootstrapDocker
[FrameworkRunner] ============ Running Step: SnapshotRestoreSetup ============
[SnapshotRestoreSetup] Creating shared Docker volume to share snapshots...
[SnapshotRestoreSetup] Created shared Docker volume cluster-snapshots-volume
[FrameworkRunner] Step Succeeded: SnapshotRestoreSetup
[FrameworkRunner] ============ Running Step: SelectExpectations ============
[SelectExpectations] Loading Knowledge Base and filtering for relevant expectations
[SelectExpectations] Found 2 relevant expectations.
[FrameworkRunner] Step Succeeded: SelectExpectations
[FrameworkRunner] ============ Running Step: StartSourceCluster ============
[StartSourceCluster] Creating source cluster...
[StartSourceCluster] Waiting up to 30 sec for cluster to be active...
Node source-cluster-node-1 is now active
Node source-cluster-node-2 is now active
[StartSourceCluster] Cluster source-cluster is active
[FrameworkRunner] Step Succeeded: StartSourceCluster
[FrameworkRunner] ============ Running Step: PerformPreUpgradeTest ============
====================================================================================================
Robot Test Defs
====================================================================================================
Robot Test Defs.Common Upgrade Test
====================================================================================================
Perform pre-upgrade setup of "consistent-document-count" expectation                        | PASS |
----------------------------------------------------------------------------------------------------
Robot Test Defs.Common Upgrade Test                                                         | PASS |
1 test, 1 passed, 0 failed
====================================================================================================
Robot Test Defs                                                                             | PASS |
1 test, 1 passed, 0 failed
====================================================================================================
Output:  /tmp/utf/test-results/pre-upgrade/output.xml
Log:     /tmp/utf/test-results/pre-upgrade/log.html
Report:  /tmp/utf/test-results/pre-upgrade/report.html
[FrameworkRunner] Step Succeeded: PerformPreUpgradeTest
[FrameworkRunner] ============ Running Step: CreateSourceSnapshot ============
[CreateSourceSnapshot] Creating snapshot of source cluster...
[CreateSourceSnapshot] Confirming snapshot of source cluster exists...
[CreateSourceSnapshot] Source snapshot created successfully
[FrameworkRunner] Step Succeeded: CreateSourceSnapshot
[FrameworkRunner] ============ Running Step: StartTargetCluster ============
[StartTargetCluster] Creating target cluster...
[StartTargetCluster] Waiting up to 30 sec for cluster to be active...
Node target-cluster-node-1 is now active
Node target-cluster-node-2 is now active
[StartTargetCluster] Cluster target-cluster is active
[FrameworkRunner] Step Succeeded: StartTargetCluster
[FrameworkRunner] ============ Running Step: RestoreSourceSnapshot ============
[RestoreSourceSnapshot] Checking if source snapshots are visible on target...
[RestoreSourceSnapshot] Source snapshot visible to target cluster
[RestoreSourceSnapshot] Restoring source snapshot onto target...
[RestoreSourceSnapshot] Snapshot restored successfully
[FrameworkRunner] Step Succeeded: RestoreSourceSnapshot
[FrameworkRunner] ============ Running Step: PerformPostUpgradeTest ============
====================================================================================================
Robot Test Defs
====================================================================================================
Robot Test Defs.Common Upgrade Test
====================================================================================================
Perform post-upgrade assertion of "consistent-document-count" expectation                   | PASS |
----------------------------------------------------------------------------------------------------
Robot Test Defs.Common Upgrade Test                                                         | PASS |
1 test, 1 passed, 0 failed
====================================================================================================
Robot Test Defs                                                                             | PASS |
1 test, 1 passed, 0 failed
====================================================================================================
Output:  /tmp/utf/test-results/post-upgrade/output.xml
Log:     /tmp/utf/test-results/post-upgrade/log.html
Report:  /tmp/utf/test-results/post-upgrade/report.html
[FrameworkRunner] Step Succeeded: PerformPostUpgradeTest
[FrameworkRunner] ============ Running Step: StopSourceCluster ============
[StopSourceCluster] Stopping cluster source-cluster...
[StopSourceCluster] Cleaning up underlying resources for cluster source-cluster...
[FrameworkRunner] Step Succeeded: StopSourceCluster
[FrameworkRunner] ============ Running Step: StopTargetCluster ============
[StopTargetCluster] Stopping cluster target-cluster...
[StopTargetCluster] Cleaning up underlying resources for cluster target-cluster...
[FrameworkRunner] Step Succeeded: StopTargetCluster
[FrameworkRunner] ============ Running Step: SnapshotRestoreTeardown ============
[SnapshotRestoreTeardown] Removing shared Docker volume cluster-snapshots-volume...
[SnapshotRestoreTeardown] Removed shared Docker volume cluster-snapshots-volume
[FrameworkRunner] Step Succeeded: SnapshotRestoreTeardown
[FrameworkRunner] ============ Running Step: ReportResults ============
[ReportResults] ======================== SKIPPED EXPECTATIONS =======================
[ReportResults] doy-format-date-range-query-bug
[ReportResults]         Description: Given 1/ an index created in ES 7.x; 2/ documents with dates uploaded in a yyyy-DDD (day of year) format,
[ReportResults]         and a query that uses an inclusive date range, the results of the query will fail to include documents where the date
[ReportResults]         of the document is the same day as the inclusive endpoint of the range. See https://github.com/opensearch-
[ReportResults]         project/OpenSearch/issues/4285
[ReportResults]

[ReportResults] ======================== PASSED EXPECTATIONS ========================
[ReportResults] consistent-document-count
[ReportResults]         Phases: pre-upgrade, pre_upgrade, post-upgrade, post_upgrade
[ReportResults]

[ReportResults] For additional details on test results, see the test result directory: /tmp/utf/test-results
[FrameworkRunner] Step Succeeded: ReportResults
[FrameworkRunner] Ran through all 14 steps successfully
[FrameworkRunner] Saving application state to file...
[FrameworkRunner] Application state saved
[FrameworkRunner] Application state saved to: /tmp/utf/state-file
[FrameworkRunner] Full run details logged to: /tmp/utf/logs/run.log.2023-01-04_17_45_00

The pre-upgrade test used to look like this:
[FrameworkRunner] ============ Running Step: PerformPreUpgradeTest ============
==============================================================================
Tests
==============================================================================
Tests.Common Upgrade Test
==============================================================================
Perform pre-upgrade setup of "consistent-document-count" expectation  PUT http://localhost:9200/sample-index [status:200 request:0.442s]
.POST http://localhost:9200/sample-index/_doc [status:201 request:0.339s]
.POST http://localhost:9200/sample-index/_doc [status:201 request:0.012s]
.POST http://localhost:9200/sample-index/_refresh [status:200 request:0.070s]
.POST http://localhost:9200/sample-index/_count [status:200 request:0.131s]
Perform pre-upgrade setup of "consistent-document-count" expectation  | PASS |
------------------------------------------------------------------------------
Tests.Common Upgrade Test                                             | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Tests                                                                 | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Output:  /tmp/utf/test-results/pre_upgrade/output.xml
Log:     /tmp/utf/test-results/pre_upgrade/log.html
Report:  /tmp/utf/test-results/pre_upgrade/report.html
[FrameworkRunner] Step Succeeded: PerformPreUpgradeTest

Check List

[ ] New functionality includes testing

[X] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented
[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #67 (6c83ad4) into main (755c828) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
+ Coverage   93.75%   93.78%   +0.03%
==========================================
  Files          21       21
  Lines         944      950       +6
  Branches       94       95       +1
==========================================
+ Hits          885      891       +6
  Misses         49       49
  Partials       10       10

Impacted Files
Coverage Δ

...ore/cluster_migration_core/core/framework_state.py
100.00% <ø> (ø)

...on_core/cluster_migration_core/core/expectation.py
100.00% <100.00%> (ø)

...re/cluster_migration_core/core/framework_runner.py
94.87% <100.00%> (+0.06%)
:arrow_up:

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

There seems to be a few linting errors to fix: https://github.com/opensearch-project/opensearch-migrations/actions/runs/3842546906/jobs/6543942256

I have some mixed feelings about this change. I think it has been structured nicely and for our current robot tests this makes sense. My main concern is that this would be limiting if we wanted to use the robot tests or the library we build up for it for anything outside of the UTF, whether that be the assessment tool or something else. The future of these things seems in flux though so my stance is more that we can go this route but should do it with the expectation that we might need to pull some of the robot library (maybe not the test themselves) into a central place in the future

Totally get your concerns and I'm already thinking along those lines.  Basically, the way I see it, all of the re-usable code should be under cluster_migration_core, and that includes things like new Robot actions (.py files) if/when we define them.  The specific robot test defs (.robot files) should live with the thing that uses them (in this case, the UTF).  If the .robot files references one or more Library files (OpenSearchClientLibrary.py) to pull actions from, those should live in the same Python module upgrade_testing_framework as the robot test defs.  If those Library files want to use shared code, they can pull them from the core library (cluster_migration_core) via imports.
Does that seem plausible?

I have some mixed feelings about this change. I think it has been structured nicely and for our current robot tests this makes sense. My main concern is that this would be limiting if we wanted to use the robot tests or the library we build up for it for anything outside of the UTF, whether that be the assessment tool or something else. The future of these things seems in flux though so my stance is more that we can go this route but should do it with the expectation that we might need to pull some of the robot library (maybe not the test themselves) into a central place in the future

Totally get your concerns and I'm already thinking along those lines. Basically, the way I see it, all of the re-usable code should be under cluster_migration_core, and that includes things like new Robot actions (.py files) if/when we define them. The specific robot test defs (.robot files) should live with the thing that uses them (in this case, the UTF). If the .robot files references one or more Library files (OpenSearchClientLibrary.py) to pull actions from, those should live in the same Python module upgrade_testing_framework as the robot test defs. If those Library files want to use shared code, they can pull them from the core library (cluster_migration_core) via imports.
Does that seem plausible?

Okay cool, as long as we thinking through the shared code aspect of this I think I am good with it. As a side note I haven't thought through much about what the Library files will actually look like long term (as it is seeming currently they will only contain specific logic that doesn't belong to say a REST call function in the RESTClient) so I more or less plan on seeing how they evolve before looking to much into moving parts into shared space


Allow disabling the Sofia SIP SDP Offer/Answer Engine Module

This fixes the Sofia-SIP-based payload type negotiation (issue #248) by disabling the builtin
SOA module for SDP answers.
I tested the fix with the builtin demorecog plugin.

I just updated the title and the patch to reflect the conclusion in #248.

Thanks, looks good. The change has been merged to master.


Brackets not working when used in parse() function

Version used: 13.0.1
Content being parsed:
# FAQ

This [shortcodes] is not working.

Below the output I get:
$ node scrape-github.js
C:\project\node_modules\markdown-it\lib\rules_inline\link.js:99
    if (typeof state.env.references === 'undefined') { return false; }
                         ^

TypeError: Cannot read property 'references' of undefined

When I change the content of the markdown file to the below it works without problems. Not sure what to do here, can't find any information about it online. Setting different options didn't seem to help like html: true/false.
# FAQ

This shortcodes is working.

Code to reproduce:
const md = require('markdown-it')({
  html: true // Enable HTML tags in source
});
const html = `
# FAQ

Stupid [shortcodes] not working.

`;
const ast = md.parse(html);

Please note that I can't edit the contents so the markdown file stays the same. The only option I have is to tweak it with a regex before parsing it.
If I would mess with replacing open/close brackets to replace or surround it with a backtick (which does seem to parse fine in those cases) it would also do this for any links in the document. Or I would need to first convert any links to a different format, and then do the replacement on any shortcodes. And then revert back. It's all possible but I find this a bit of a strange "issue"?
Another problem here is that I can't get any information on where the parser is encountering the problem.
It just gives that generic error.
`[shortcode]`

https://github.com/markdown-it/markdown-it/blob/master/lib/index.js#L517 seems, missed second mandatory param in manual  .parse() call. See docs & how it's used from .render()


dcos service log requires ssh credentials

Please answer the following questions before submitting your issue. Thanks!
What version of DC/OS + DC/OS CLI are you using (dcos --version)?
If DC/OS CLI version < 0.4.5, DC/OS version can be found at `http://dcos_url/dcos-metada/dcos-version.json

root@swarm-master02:/# dcos --version
dcoscli.version=0.4.8
dcos.version=1.7-open
dcos.commit=14509fe1e7899f439527fb39867194c7a425c771
dcos.bootstrap-id=3a2b7e03c45cd615da8dfb1b103943894652cd71

What operating system and version are you using?

root@swarm-master02:/# cat /etc/debian_version
7.11
root@swarm-master02:/# python -V
Python 3.4.5
root@swarm-master02:/# pip -V
pip 8.1.2 from /usr/local/lib/python3.4/site-packages (python 3.4)

What did you do?
If possible please provide a recipe for reproducing.

installed the dcos cli
ran 'dcos auth login' --- result was correct
ran 'dcos service' --- result was correct
ran 'dcos service log marathon' --- stuck here asking for password

root@swarm-master02:/# dcos service log marathon
Running ssh<EMAIL_ADDRESS>journalctl -n 10 -u dcos-marathon
Password:

What did you expect to see?
The dcos cli node is in the same network as the dcos cluster, according to the manual, I should see the logs.
What did you see instead?
Asking for ssh password

Hi @r0c. What manual are you referring to and where are you running the cli from? Is the master node publicly from where the cli is running from? You probably need to add your aws key to your ssh-agent.

@tamarrow and @r0c  I think the other possible issue is that core in ssh<EMAIL_ADDRESS>may not be a valid user. It should be possible to set the right user with the --ssh-config-file flag.
We should add features to DC/OS to make it possible to expose the journald logs without having to ssh. cc. @pyronicide and @malnick

I figure it would be easiest to add a new setting called user to the config file, then anytime you ssh via node ssh or look at marathon logs, it would use that as default.

@ddispaltro what do you think about configuring the SSH options instead?

You mean in your ~/.ssh/config, if so I am good with that.  The tool doesn't seem to respect it though.

I suspect that's because we're using IPs and jumping hosts. We need to make it obvious how to do that config!

I think this is related. I am doing dcos node ssh --leader --master-copy and it is asking me for a password. I can't find this password anywhere.

@fpapleux I am trying to use dcos node ssh to get into Redis as per the tutorial but I'm having the same issue as you. Were you able to find a solution?

Same issue as @partounian, would appreciate a fix.

@partounian @fpapleux, you can add --user=vagrant option to solve this. I don’t know why it is not in the redis tutorial:
dcos node ssh --master-proxy --mesos-id=$(dcos task redis --json | jq -r '.[] | .slave_id') --user=vagrant

@fpapleux by default, dcos ssh utilize default user 'core'. For vagrant local installation of dcos, it's 'vagrant'.

Why isn’t this mentioned as part of DCOS 101 tutorial? Or better yet, add vagrant as a user option to the ssh command:
dcos node ssh --master-proxy --mesos-id=$(dcos task  redis --json |  jq -r '.[] | .slave_id’) --user=vagrant
Knowing the correct combination of username/password for vagrant is not exactly common knowledge.

If you are using Vagrant, the --user=vagrant switch works. Note it still asks for a password, I entered the password as vagrant and I got in.

Hello @all
You are all right on how to change the user when SSHing into one node's name/ip.
But ,what can I do in the following case when there is a pswd for the user core requested:
'dcos service log marathon'?
I did not find any 'workaround' to change the user with, e.g., '--user=vagrant'.
Is there any solution to change the user from 'core' to 'vagrant' when executing above mentioned dcos service log command?
Your response will be highly appreciated.
Regards,
Roger

I fixed this issue by going through https://docs.mesosphere.com/1.7/administration/sshcluster/

chmod 600 .pem (Grant permissions)
cp .pem ~/.ssh/.pem (Copy key to local ssh path)
ssh-add ~/.ssh/.pem
dcos node ssh --master-proxy --mesos-id=

Now it is not asking for a password. Hope this helps.


fix user avatar source text

#12524
GIFs or Screenshots:

@synicalsyntax does this look alright?

@timabbott This should be an easy merge.

I didn't think of uploading a profile and checking, I'll fix that.

@YashRE42 ping on this -- it looks like this PR just needs a couple lines of changes to be mergable, and it'd be nice to get the fix in for the 2.1 release.

I'll be able to look at this on Sunday

@timabbott I think this should be okay now.

While testing this, I noticed this regression (that the save/discard widget is misaligned); do you want to take fixing it or should we open a separate issue?:

Merged, thanks @YashRE42!


Using for multiple values doesn't seem to work.

background-size: rem(1143) rem(838);
-- ends up looking like this in the css
background-size: 71.4375rem;
--same with doing things like padding
padding: rem(5) rem(6) rem(7) rem(8);

Also appears to be buggy with
border: rem(3) solid #ffffff;
So, multi-argument-declarations.

Also negative integers may not work.
top: rem(-114);

Thanks @412andrewmortimer, @JulsWlf is looking into this.

Thank you both. I appreciate the code. @EduardoRT @JulsWlf


Repenrich

Does not pass tests anymore.
In anycase, the dev of Repenrich was forked in 2018 to https://github.com/nerettilab/RepEnrich2
The galaxy wrapper should thus to evolve to wrap this (yet it stil in py27...)
Will create a specific dev branch for that

Definitely to do


Is there a way to change bitrate?

Output files have a static bitrate is there a way to increase/decrease bitrate based on requirement? e.g for mp3 files It gives 128kbit bitrate whereas is it possible to change this to 320kbit

The latest release should now allow you to select any bitrate you want!

Super, its working fine Awesome


Force PR title for sync job

The title is sometimes different for the same PRs, for example:
https://github.com/openshift-knative/serving/pull/5 vs. https://github.com/openshift-knative/serving/pull/15
Let's force the title

/lgtm


auto approval

the new auto complete feature works so far. but to get this use case fully working we would also need the auto approval to be active.

Can you contribute a PR?

unfortunately, my time is limited for the next few weeks and I'm not familiar with ruby. do you know if this feature is already supported by dependabot core, or do we need to add the logic?

I could try having a look into this - I have never done ruby but I think I would manage somehow.
I would have extended the script in a similar fashion after we check whether we want to set it to autocomplete (see line 405).
So if we set the variable in the task to auto-approve, we'll just use the Azure DevOps REST API to approve it - would this make sense?
What I was wondering, would we need to provide the option which user actually would approve? Because in our case you cannot approve your own PRs and that makes sense, I'm not sure if Azure DevOps provides a way to exclude this for a specific user (e.g. the build service). If not we probably want to have the capability to provide an additional token of the "approving user".
What are your thoughts on this? If this sounds sane I can check it out in the next days and see what I can do.

I'm not sure if this solution fits for you - but I still want to mention it shortly:
If you remove the policy for the target branch that at least one reviewer must approve, Dependabot can close the pull request directly.

#102 is implementing the functionality. @mburumaxwell  could you have a look and let me know whether this is acceptable?

Thanks, @huserben for your contribution

@mburumaxwell
Do you have the next release of the Azure DevOps Task already planned? So we have a rough idea of when we'll be getting the new options? It's not urgent, more a "good to know" whether it's a matter of days or weeks.

@huserben, a new version has just been published.

Awesome, thank you for the quick response time and in general the willingness to create this extension and making it available for everyone.


JsonSerializationException possibly having too long message

Not sure whether this can be classified as a bug, but it could be problematic.
I'm deserializing a type from a stream. The content is like 100MB long. And this works fine. One day somebody messed up the source and instead of being JSON text, it became a string containing JSON text (probably serialized two times or something). So I'm trying to deserialize a 100MB string instead of JSON now and deserializer, correctly, throws an exception.
However, the problem is that JsonSerializationException.Message contains text "Error converting value "....."" where it concatenates entire input string which is more than 200MB. It also does some additional copies internally and at the peak of Exception it consumes like more than 1.5GB of memory by looking at memory profiler.
Expected behavior
JsonSerializationException.Message trims source to a manageable length. (perhaps configured somewhere).
Actual behavior
Throws an JsonSerializationException with a Message containing more than 200MB worth of text.
Steps to reproduce
I.e. try converting any string to a custom type.
void Main()
{
	string text = new string(' ', 1_000_000);
	var deserialized = new JsonSerializer().Deserialize(new StringReader($"\"{text}\""), typeof(Tubo));
}

public record Tubo { }

Could be considered along side https://github.com/JamesNK/Newtonsoft.Json/issues/2703


[Housekeeping] Rethink usage of custom CharSequence implementations

Currently, we avoid using class String at many different places of querqy. Instead, we use implementations of the interface ComparableCharSequence like CompoundCharSequence, LowerCaseCharSequence or ComparableCharSequenceWrapper. The interface implements the methods equals, compareTo and hashCode.
To be discussed:
Do we actually need these methods? Where are they used (except for tests)? Using hashCode for the respective implementations should be avoided anyway, as they do not cache the hashCode (in contrast to String). TrieMap should also not require these methods, as it only consumes CharSequence. For tests, a special assert method could be implemented for comparing CharSequences.
To be discussed:
Another reason for having these extra implementations is that we want to avoid array copying in the context of splitting and concatenating strings (e. g. tokenization, prefixes, ...) at query time. However, all these functionalities should be only required in the context of creating querqy.model.Term (which itself implements CharSequence). Therefore, the required functionalities could be included into TermBuilder (the nice side effect would be that this enforced to some degree using the builder to create new terms somewhere).

Additional information:

We already make use of String.substring() in the tokenization process of QuerqyParser implementations (even though we could also use SimpleComparableCharSequence here as it includes start and length meta information for char arrays).
CompoundCharSequence requires 3 int + int[] + CharSequence[], so this class also has an overhead of metadata; furthermore, it is used only a very few times in query-time contexts

Conclusion: I think we could easily get rid of the CharSequence implementations. There are only a very few cases, where they are used in query-time. For these cases, it should be fairly straightforward to implement a comparably efficient solution. For non-query-time usages, String and StringBuilder can be used.

Additional information:

We already make use of String.substring() in the tokenization process of QuerqyParser implementations (even though we could also use SimpleComparableCharSequence here as it includes start and length meta information for char arrays).
CompoundCharSequence requires 3 int + int[] + CharSequence[], so this class also has an overhead of metadata; furthermore, it is used only a very few times in query-time contexts

Conclusion: I think we could easily get rid of the CharSequence implementations. There are only a very few cases, where they are used in query-time. For these cases, it should be fairly straightforward to implement a comparably efficient solution. For non-query-time usages, String and StringBuilder can be used.


Update test_models.py that includes tests for our models

As a Developer
I need to write Unit tests to test our backend models created,
So that we make sure that our models and methods are functioning as desired.
Details and Assumptions

Must have 95% code coverage, Use the coverage tool to measure test coverage.
There should be tests for each of Create, Read, Update, Delete, and List, traversing both happy paths and sad paths.
Run these tests using green as you develop the code making them all green (passing).
Use the standard PyUnit syntax that we learned.
place your test cases in a ./tests folder.

Acceptance Criteria
Given the models,
When we run Unit tests which cover at least 95% of our code,
Then all Unit tests are passed.

This is completed by #6.


Stop back button from being shown when left action clicked using leftActionMode showHamburger

Great library.
I'm trying to implement MaterialDrawer with your library and I am unable to use the .attachNavigationDrawerToMenuButton(mDrawerLayout) method as the other library is not a DrawerLayout. That's not a problem.
When I set a click listener for the left action and open the other drawer, your left action animates to show a back button. When I close the MaterialDrawer, it displays a back button which does nothing. Upon clicking it nothing happens. Is there some way to disable it from displaying the back button on click and just keeps displaying the menu?
<com.arlib.floatingsearchview.FloatingSearchView
        android:id="@+id/floating_search_view"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:floatingSearch_leftActionMode="showHamburger"
        app:floatingSearch_searchHint="Search..."
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

floatingSearchView.setOnSearchListener(this);
        navigationDrawer = new DrawerBuilder().withActivity(mView.getActivity()).build();
        floatingSearchView.setOnLeftMenuClickListener(new FloatingSearchView.OnLeftMenuClickListener()
        {
            @Override
            public void onMenuOpened()
            {
                navigationDrawer.openDrawer();
            }

            @Override
            public void onMenuClosed()
            {
                // this is only called when the back button is clicked, but the drawer is already closed by this point
                navigationDrawer.closeDrawer();
            }
        });

Thanks @jbmlaird , because of this confusion the attach API was added. Since you can't use the attach method, just follow the internal implementation here and apply it to the library you use.
Regards,
Ari


[QA] Flaky API tests with Posix FS filesystem driver

We are running API test pipelines in reva that use the new PosixFS driver for storage.
That was introduced in PR https://github.com/cs3org/reva/pull/4562
Today there were a few unexpected failures. When drone CI was restarted, they passed. So there are some "flaky" things. It might be timing between what the tests do, and how the PosixFS driver behaves when updating storage, etags, etc. in the back end. Or it might be???
This was noticed in reva PR https://github.com/cs3org/reva/pull/4715
I have opened this issue as a place to mention unexpected test failures, and that will help us see if there is some pattern, and understand if we need to adjust test timing, or if there is some more consistent back-end problem or...

Some POSIX FS test scenarios failed unexpectedly. Example:
https://drone.owncloud.com/cs3org/reva/4694/34/7
      | spaces           | "C++ file.cpp" |
        Failed step: When user "Alice" uploads file with content "uploaded content" to "C++ file.cpp" using the WebDAV API
        TestHelpers\WebDavHelper::getPersonalSpaceIdForUser webdav propfind for user Alice failed with status 404 - so the personal space id cannot be discovered (Exception)

runsh: Total unexpected failed scenarios throughout the test run:
coreApiWebdavUpload/uploadFile.feature:53

I will restart drone CI to see if the test are flaky.

Also there was:
https://drone.owncloud.com/cs3org/reva/4694/31/7
    Examples:
      | ocs-api-version | ocs-status-code |
      | 1               | 100             |
        Failed step: And uploading content to a public link shared file with password "%public%" should work using the new public WebDAV API
        Checking the content of the last public shared file after downloading with the new public WebDAV API
        The content was expected to be 'test new', but actually is 'test newata'. HTTP status was 200
        Failed asserting that two strings are equal.
        --- Expected
        +++ Actual
        @@ @@
        -'test new'
        +'test newata'

runsh: Total unexpected failed scenarios throughout the test run:
coreApiSharePublicLink1/createPublicLinkShare.feature:88

https://drone.owncloud.com/cs3org/reva/4694/33/7
      | new              |
        Failed step: And these etags should not have changed:
        WebDavPropertiesContext::theseEtagsShouldNotHaveChanged
        The etag '"169e21c9cdd598d3743b8a83802fe00e"' of element '/upload/file.txt' of user 'Alice' changed to '"a6a2af996d4739063f6ac0a1c4d51d20"'.
        Failed asserting that 1 matches expected 0.

runsh: Total unexpected failed scenarios throughout the test run:
coreApiWebdavEtagPropagation2/copyFileFolder.feature:116

I started to look into this problem end of last week. I could sometimes reproduce it locally at first, but unfortunately it no longer fails after I added some debug outbut, even after removing the debug output for whatever strange reason. Also my attempts to get helpful logs by running a shorter version of the pipeline (https://github.com/cs3org/reva/pull/4716) did not yield that issue yet even after 30 runs. So... I'm still on it.

Thanks @aduffeck - hopefully we get a few more "random" test fails, and can see a pattern to give us a clue.

This should be fixed with the merge of https://github.com/cs3org/reva/pull/4719


Release v0.1

Description

[x] Set version to 0.1
[x] Create release notes (copy changes from GitHub release notes tool)
[ ] Merge this PR
[ ] Use GitHub to create new release and tag
[ ] Copy sdist and wheels from GitHub action
[ ] Upload sdist and wheels to PyPI using twine
[ ] In phasorpy.github.io, change docs/stable symlink to point to docs/v0.1
[ ] Add news entry to phasorpy-homepage: Sept 30, 2024: PhasorPy 0.1 is released.
[ ] Update version to 0.2.dev
[ ] Update citation in docs/index.rst with Zenodo doi created from release

Checklist

[x] The pull request title and description are concise.
[x] Related issues are linked in the description.
[x] New dependencies are explained.
[x] The source code and documentation can be distributed under the MIT license.
[x] The source code adheres to code standards.
[x] New classes, functions, and features are thoroughly tested.
[x] New, user-facing classes, functions, and features are documented.
[x] New features are covered in tutorials.
[x] No files other than source code, documentation, and project settings are added to the repository.

I'll leave this PR open over the weekend in case someone wants to add to the release notes.


Add cache metrics and dashboard

Changes

Current dependencies on/for this PR:

main

PR #469   👈

This stack of pull requests is managed by Graphite.


Online survey results for designating and classifying attributes

https://docs.google.com/forms/d/1qzcqtXxviDruc-GZi8FWLxghuFqthyA8lA0MQ1s22Gg
Results to be presented.


Feedback for HOL-Continuous_Integration

When following the HOL-Continuous_Integration, I noticed a couple of minor issues:

In the step 1 of Task 1: This sentence " You can paste in the URL if you copied it in Step 1" is confusing. There is no copying action in step 1. This sentence is probably from the previous version of the labs and not needed any more.

In Task 3: The steps are not numbered correctly. There are two "step 2" and two "step 4".

Anyway, these are just very minor issues. Hope it helps!

Thanks @leimaleison for the feedbacks ! I will check next week.


zlib / zlib1 binary and symbol filename mismatch - causes CI pipeline failures

Describe the bug
When using the minizip port, it brings in these 2 files among others:

zlib1.dll
zlib.pdb

Note the missing "1" in the pdb file. The two files differ in name, so tooling that expects a binary and its PDB file to have the same name, fails to find a match. This happens with e.g. binary security analysis running in microsoft (SDL analysis)
Environment

OS: Windows
Compiler: msvc

Microsoft people: please ping me on Teams for a link to the pipeline that fails because of this mismatch.

When using the minizip port, it brings in these 2 files among others:

zlib1.dll
zlib.pdb

FTR these artifacts are from port zlib, not minizip:
zlib:x64-windows:/bin/zlib.pdb
zlib:x64-windows:/bin/zlib1.dll
zlib:x64-windows:/debug/bin/zlibd.pdb
zlib:x64-windows:/debug/bin/zlibd1.dll

And the names are chosen by upstream.

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.


“Oops! Something went wrong” page is shown when user tap on earn Rewards button from hamburger menu

Frequency: 100%
Repro on build version: Android Internal Build V1.11.0(1004294337), Test Flight Build V1.11.0(47)
Does not Repro on build version: Playstore build V1.10.1, App store build V1.10.1,
Repro on devices: iPhone 6 + (12.4.5), Samsung galaxy J7 pro (8), iPhone 6s (14.2), iPhone XR (14.4)
Testing Account:<PHONE_NUMBER> / Backup Key
Repro Steps:

Launch the application & login with test account
Tap on Hamburger menu
Tap on Earn rewards button
Observe

Current Behavior: Oops! something went wrong page is shown when user tap on Eran rewards button .
Expected Behavior: User should redirect to Earn rewards page after tapping on Earn rewards page .
Observation: App get close when user tap on Quit button on Oops something went wrong page

Same error page is shown when user tap on How it works" button from You're eligible CTA.

Impact: Users get blocked to earn rewards.
Attachment: EarnRewrads.MP4

Hi @i1skn We have verified this issue latest android internal build 1.11.1 & testflight build 1.11.1(48) and found issue is fixed.

Userr should able to see Earn rewards page by tapping on earn rewards button from hamburger menu

Device: Samsung M31 (10), iPhone 7+ (14.2)


Added workflow badges

Issue
This repo's status is not displayed in the Charm Engineering Releases overview.
Solution
Added workflow badges for

CharmHub Badge
Release
Tests

@a-velasco A rebase on main should have the tests passing here.

@zmraul thank you!


Problem when using liip monitoring bundle

It seems to like there is a problem when using this bundle and liip monitoring bundle in combination.
When running the liip monitoring for doctrine migrations, no migrations are found in the directory (because no migration directory is passed to Doctrine\Migrations\Configuration\Configuration.
This results in the following check failure because more migrations are marked as executed in the database than found in the directories
Doctrine migrations "migrations_with_doctrine_bundle": Migrations applied which are not available
Did anyone encounter this or a similar problem already and know of a possible solution?

Hi @xammmue! Never worked with LiipMonitorBundle, but would you mind sharing your LiipMonitorBundle
and DoctrineMigrationsMultipleDatabaseBundle configurations?

Hi, thanks for the fast reply
monitor.yaml (liipMonitorBundle)
liip_monitor:     enable_controller: true     checks:         php_extensions: [amqp, redis, ctype, curl, iconv, json, pdo]         php_version:             version: '>='             7.2.0: '>='         doctrine_dbal: default         doctrine_migrations:             migrations_with_doctrine_bundle:                 connection:          default         doctrine_mongodb:        default         redis:             name:                 host:       '%env(REDISDB_HOST)%'                 port:       '%env(int:REDISDB_PORT)%'                 password:   '%env(REDISDB_PASSWORD)%'         rabbit_mq:             rabbitmq_default:                 host:       '%env(RABBITMQ_HOST)%'                 port:       '%env(int:RABBITMQ_PORT)%'                 user:       '%env(RABBITMQ_USER)%'                 password:   '%env(RABBITMQ_PASSWORD)%'                 vhost:      '%env(RABBITMQ_VHOST)%'
`
doctrine_migrations_multiple_database:
entity_managers:
default:
migrations_paths:
'DoctrineMigrations': '%kernel.project_dir%/migrations'
datasource:
migrations_paths:
'DoctrineMigrationsDatasource': '%kernel.project_dir%/migrations_datasource'
`

I guess it's missing a default configuration for DoctrineMigrationsBundle. I'm supposing LiipMonitorBundle parses DoctrineMigrationsBundle config files to get info like the entity manager or the migrations path, and this bundle uses its own configuration file and overrides DoctrineMigrationsBundle commands.
You could configure your DoctrineMigrationsBundle to the default migrations folder but you would check only one database migrations. If it doesn't work for you, I highly suggest you ask on LiipMonitorBundle's repository, because it is more related to their internals rather than our internals. You can link this issue too and I'll be happy to answer any doubts from them, but take in consideration this disclaimer:
Symfony states the following in their documentation:

Using multiple entity managers is not complicated to configure, but more advanced and not usually required. Be sure you actually need multiple entity managers before adding in this layer of complexity.

Entities cannot define associations across different entity managers. If you need that, there are several alternatives that require some custom setup.

https://symfony.com/doc/current/doctrine/multiple_entity_managers.html
And we claim to solve some problems "in a hacky and dirty way", to solve a very specific need usually in legacy scenarios.
If you are doing a new application, I would strongly suggest you to use one database and one migrations folder if there is not a very good reason to have this splitted. If you still want to go to the multiple database solution, beware the dragons 😄
Feel free to reopen the issue if you feel I'm missing something 👍🏻

The missing configuration actually was the problem. When I added DoctrineMigrationsMultipleDatabaseBundle, I also removed that configuration as I thought having that stuff duplicated would lead to problems. Adding the configuration back solved the issue.
Thank you!
Short explanation of the decision for multiple database just in case anyone is curious:
My software is running in a microservice environment. Because there is sort of a main configuration spread across multiple tables which is needed in almost all services synchronization was they chosen way until now. But this leads to a massive amount of synchronization messages being sent around. The other 2 options were either queries to the service responsible for that configuration or directly reading from that services database with a read only user. So we don't need the additional set of migrations here.
When running integration tests though, we need to have that other database also available. But as only a single service is tested, we need to create both database schemas (the tested service and foreign service) to be created. Which is where we need that second set of migrtaions.


RTL UI rendering issues

Hi there,
Just started using this package for my app that supports RTL layout, and encountered some issues.

Error when scrolling the UI horizontally and then vertically:

======== Exception caught by gesture ===============================================================
The following _CastError was thrown while handling a gesture:
Null check operator used on a null value

When the exception was thrown, this was the stack:
#0      _FlutterAgendaState._buildMainContent.<anonymous closure>.<anonymous closure> (package:flutter_agenda/src/views/agenda_screen.dart:165:49)
#1      PillarView.build.<anonymous closure> (package:flutter_agenda/src/views/pillar_view.dart:31:45)
#2      TapGestureRecognizer.handleTapDown.<anonymous closure> (package:flutter/src/gestures/tap.dart:581:61)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:198:24)
#4      TapGestureRecognizer.handleTapDown (package:flutter/src/gestures/tap.dart:581:11)
#5      BaseTapGestureRecognizer._checkDown (package:flutter/src/gestures/tap.dart:287:5)
#6      BaseTapGestureRecognizer.didExceedDeadline (package:flutter/src/gestures/tap.dart:258:5)
#7      PrimaryPointerGestureRecognizer.didExceedDeadlineWithEvent (package:flutter/src/gestures/recognizer.dart:591:5)
#8      PrimaryPointerGestureRecognizer.addAllowedPointer.<anonymous closure> (package:flutter/src/gestures/recognizer.dart:535:41)
(elided 11 frames from class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
Handler: "onTapDown"
Recognizer: TapGestureRecognizer#60ba6
  debugOwner: GestureDetector
  state: possible
  button: 1
====================================================================================================

When reaching the top/bottom limit and trying to scroll the right side tries to scroll with laggy UI, and also you can just scroll the right pane which is strange.
The AgendaEvent UI is cut out on the right edge of the first Resource so text is not fully displayed.
The horizontal dividers of the panes doesn't share the same thickness and the same height.

Code I used:
FlutterAgenda(
      resources: [
        Resource(
          head: Header(title: 'מרסל אוחנה', object: 1, color: Colors.yellow),
          events: [
            AgendaEvent(
              title: 'תור לציפורניים - יוסי שיטרית',
              start: EventTime(hour: 18, minute: 00),
              end: EventTime(hour: 19, minute: 00),
            ),
          ],
        ),
        Resource(
          head: Header(title: 'מוגוטה', object: 2, color: Colors.yellow),
          events: [
            AgendaEvent(
              title: 'תור לציפורניים - יוסי שיטרית',
              start: EventTime(hour: 18, minute: 00),
              end: EventTime(hour: 19, minute: 00),
            ),
          ],
        ),
      ],
      agendaStyle: AgendaStyle(
        startHour: 9,
        endHour: 24,
        headerLogo: HeaderLogo.bar,
        timeItemWidth: 45,
        timeSlot: TimeSlot.full,
        decorationLineBorderColor: Colors.transparent,
      ),
    )

https://user-images.githubusercontent.com/26387823/164233522-5481e711-b531-4d76-89bd-8fb43c8a2f9d.mp4

About the RTL Support is now currently under development.

I added the Support for Directionality its under version 3.1.0, update your version to the latest and add the direction field to your AgendaStyle property.
agendaStyle: AgendaStyle(
    direction: TextDirection.ltr,
    startHour: 9,
    endHour: 24,
    headerLogo: HeaderLogo.bar,
    timeItemWidth: 45,
    timeSlot: TimeSlot.full,
    decorationLineBorderColor: Colors.transparent,
),

FlutterAgenda(
  resources: resources,
  agendaStyle: AgendaStyle(
    startHour: 9,
    endHour: 20,
    direction: TextDirection.ltr,
    headerLogo: HeaderLogo.bar,
    timeItemWidth: 45,
    timeSlot: TimeSlot.quarter,
  ),
  onTap: (EventTime clickedTime,dynamic object) {
    print("Clicked time: ${clickedTime.hour}:${clickedTime.minute}");
    // dont forget to cast the object back to it's original type
    print("Head Object related to the resource: $object");
  },
)

@iliyass-zamouri Looks better now.
But still weird scrolling issues.

Which flutter sdk version your are using?

Flutter 2.10.5.


There is not any assigned MS2 in the list of scans

Basic information

My operating system: windows 10
My MZmine version: 3.9.0

My raw data is from Agilent triple quad. I converted them to mzML first using MS convert. after importing to MZmine3, I got the triangle warning beside the name of sample after importing saying that scans were detected as centroids but contains zero intensity values. I ignored this one for now.
the issue I faced, according to the below scan list, there is not any MS2. all the MSn values are 1.

has anyone faced this problem before?
Thanks in advance,
Ghs

Hi Ghs,
can you share an example mzML file as well as the corresponding .d file? We need t check if something goes wrong during conversion or during data import.

dear @kyrasolaris01
Thanks for your comment.
Sure. Here is the link of the files in zipped format.
[mzML] (https://drive.google.com/file/d/1v_lG-GFuNuQoEZOWP2uzOFNopy16wWxE/view?usp=sharing)
.d [file ] (https://drive.google.com/file/d/1jdu0i6L6abevFzSc5nqiFFWjG92Yl_i3/view?usp=sharing)
Thanks in advance,
Ghs

Hi Ghs,
I looked into your data, and my best guess is there was a problem during data conversion to mzML, as the warning suggests. Can you share a screenshot of your MSConvert settings?

Dear @kyrasolaris01,
thank you.
Please have a look at them here.

another update is that: if we convert them using original agilent software to mzData, the triangle warning is gone but still no scan 2 can be observed.
Uploading D23-0020-P.mzdata.xml.zip…
Best,
Ghs

Hi Ghs, I looked into your data, and my best guess is there was a problem during data conversion to mzML, as the warning suggests. Can you share a screenshot of your MSConvert settings?

Dear @kyrasolaris01
Have you got time to look at the screen shot I shared?
could this be because of we did full scan mode when doing LC-MS/MS?
Best Regards,
Ghs

Hi Ghs,
yes I did, sorry for not replying yet. Your MSConvert settings look fine, however there seems to be an issue with data conversion, because there are scans assigned as MS level 2 in the converted file. MZmine is reading it correctly. If you check the log file printed at the bottom of MSConvert you can read a statement that "vendor centroiding" was requested but did not work. Please check if you acquire your data as MSConvert expects it or contact Agilent support to get assistants on converting the file as expected.

Sorry, i missed the word "no". There are NO scans assigned as MS level 2....

Sorry, i missed the word "no". There are NO scans assigned as MS level 2....

ok.
Because we used  full scan MS2 for our sample, means that we did MS2 for all the ions from MS1 step, still should we see both MS1 and MS2 label in mzMine raw data overview?

Please have a look at your raw data file. MZmine can only show what is in the raw data. In the mzML file I cannot see any scan defined as ms level 2. Please check for yourself:
 for MS1 scans and  for MS2 scans.

thank you for your time.
Ghs


[ko] cs-230-convolutional-neural-networks

Hello!
I'm in progress :D

@sy95lee would you know anyone who could review the content?

@WooilJeong would you like to be the reviewer?

I can review this if there aren't any other takers. I can take a look at the other Korean documents when I get a chance.

Thank you @dongwon900 for your thorough review! Moving forward with the merge!


Metadata better type

Link the Issue(s) this Pull Request is related to.
Each PR should link at least one issue, in the form:
Fixes #123
Use one line for each Issue. This allows auto-closing the related issue when the fix is merged.
Summarize your change.
Describe the reason for the change.
Add a list of changes, and note any that might need special attention during review.
Reference associated tests.
If no new tests are introduced as part of this PR, note the tests that are providing coverage.

I pressed the create PR by mistake.


fix: ProducesResponseType

public async Task<Results<Ok, method should have [ProducesResponseType(StatusCodes.Status200OK)]

If we remove, for instance, a generic parameter 'AccessTokenResponse' from the 'ProducesResponseType' attribute, we would lose some swagger documentation:
With generic parameter:

Without generic parameter:

Its good to add them where they are missing (with generic parameter describing the response body), but I would not remove them.

@dr-marek-jaskula
I also aggree with your opinions.
I only add [ProducesResponseType(StatusCodes.Status200OK)] where they are missing.


PIA for FAM

As a MISO
I want to understand the privacy risks of an app so that I can
so that make sure it follows ministry approved best practices and will not expose privacy risks
Acceptance Criteria:
MPO has completed PIA to review
Definition of Done

[x] Ready to Demo in Sprint Review
[x] Peer Reviewed by 2 people on the team
[x] PIA has been submitted

PIA forms here https://apps.nrs.gov.bc.ca/int/confluence/pages/viewpage.action?pageId=91204093

First draft of the PIA has been completed and reviewed by the MISO. PIA has also been sent to Privacy, Compliance and Training Branch | Ministry of Citizens’ Services. See details on the PIA request below. The PIA needs to be signed by the PCT branch for approval of BC Services Card agreement.
Good afternoon,
Thank you for submitting your BCSC PIA and checklist PIA.  Wynne MacAlpine has been assigned and the tracking numbers are:
WLRS23015 – Forest Access Management
WLRS23016 – FAM Checklist
If you have any questions or are working under a tight deadline, please contact Wynne directly.
Best,
Sandy Tremblay (they/them)
Privacy Analyst
Privacy, Compliance and Training Branch | Ministry of Citizens’ Services
236-478-2265

Confluence page with PIA documents
https://apps.nrs.gov.bc.ca/int/confluence/pages/viewpage.action?pageId=160072515

@gormless87 Is this not mostly done? It's sitting in "new issues"

CPO signed copies at  https://apps.nrs.gov.bc.ca/int/confluence/x/Q4OKCQ
Post-hoc estimate of 13 story points added


Vuex store Root not working in Firefox 97

Version
6.0.6
Browser and OS info
Firefox 97 / Windows 10
Steps to reproduce

Create a simple Vuex store with elements in the root state

import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
  state:{
    user:"user"
  }
});

const app = new Vue({
  el: '#app',
  store,
})

Open the Vue Devtools
Navigate to Vuex
Select Root

What is expected?
The stored key is visible under the Root
What is actually happening?
The Root is empty

If I include modules they work correctly, the issue is only with the Root element.
The DevTool is working fine in Chrome 98
Edit: Downgrading to 6.0.5 solved the issue
Edit 2: I discovered in Chrome I run 6.0.2 so that part is irrelevant

I still have the same issue on Vue.js devtools 6.1.4. But it works as expected on Vue.js devtools 5.3.4.


UserDefaults - working ?

Great component - tried to work direction with HSplitView ... not easy to go beyond basics.
I have a UI with multiple tabs - 2 tabs are using Split but I want each to have them save their position to UserDefaults:
`
let snippetFraction                 = FractionHolder.usingUserDefaults(Constants.Size.snippetFraction,  key: "snippetFraction")
let templateFraction                = FractionHolder.usingUserDefaults(Constants.Size.templateFraction, key: "templateFraction")
`
But, when switching tabs, the fraction value is still default - and wasn't sure if you could use your own keys.
Otherwise - thanks for this - saves lots of effort - great job !

Glad it's useful to you.
In your example, the snippetFraction and templateFraction should be retrieved from UserDefaults.standard based on the keys you supplied, so I'm not sure what's going on. If you want to use something other than UserDefaults.standard, you can use the more elaborate initializer for FractionHolder, like the usingUserDefaults function does:
public static func usingUserDefaults(_ fraction: CGFloat? = nil, key: String) -> FractionHolder {
    FractionHolder(
        fraction,
        getter: { UserDefaults.standard.value(forKey: key) as? CGFloat ?? fraction ?? 0.5 },
        setter: { fraction in UserDefaults.standard.set(fraction, forKey: key) }
    )
}

and just supply your own closures for getter and setter. In your case, if the fraction still comes up, not the new value that gets set as you drag, you could try debugging by putting a breakpoint or print statement in the setter and/or getter closure.

I was not sure if you needed to use the keys you showed in the example ("myFraction").  So, I understand that it can't find something not stored in UserDefaults, how is the last state stored there ?

Yes, the idea is to use keys that make sense in the context of your app. For fraction, the Split view updates its CGFloat value whenever dragging stops, in onEnded using fraction.value = privateFraction:
    private func drag(in size: CGSize) -> some Gesture {
        return DragGesture()
            .onChanged { gesture in
                unhide(in: size)    // Unhide if the splitter is hidden, but resetting privateFraction first
                privateFraction = fraction(for: gesture, in: size)
                onDrag?(privateFraction)
                previousPosition = layout.isHorizontal ? privateFraction * size.width : privateFraction * size.height
            }
            .onEnded { gesture in
                previousPosition = nil
                fraction.value = privateFraction
            }
    }

So with my code example, then your framework would have saved using my key "snippetFraction"  or is there a step I am missing ?

No, that's all there is to it.

Yep - had to swap between 2 diff splitters in the .fraction() modifier - working now - thanks !


formulae: popen_read for git merge-base

Jobs in homebrew-core are currently failing, this PR might fix it.
Example: https://github.com/Homebrew/homebrew-core/runs/957201337?check_suite_focus=true#step:5:21

I'll merge and check.

It fixed the issue, but the problem with wrong formulae detection persists: https://github.com/Homebrew/homebrew-core/pull/59293/checks?check_run_id=958662537#step:5:26


app submitted to Ledger

Goal
App is submitted for functional requirement checking. This is done using the form

Submitted on 20/10/2023


Component destructor call

Hello!
I've got a question regarding something that I've spotted while using the lib, now it's getting me quite some headaches.
Look at this sample:
class velocity
{
public:
	velocity(float f1, float f2) : x(f1), y(f2) {}
	~velocity()
	{
	}
	float x, y;
};

// somewhere below in code
auto ent1 = registry.create();
auto ent2 = registry.create();
registry.assign<velocity>(ent1, 12.0f, 23.0f);
registry.assign<velocity>(ent2, 1.0f, 1.0f);

On the second assignment for entity ent2 the velocity destructor is called for ent1. It's a bit weird, maybe I don't understand it, but I was pretty sure that components live independant of each other. Because other systems reference that component, at some point it's cleaned and my app breaks.
Does that mean that I can't hold references to component instances and that for any component I need to use registry.view<velocity> ?
Thanks!
P.S. Entt is pretty nice and easy to integrate! Keep the good work going!

Think of it this way, what if you put the velocity in a std::vector with space for 1 element, then you put in a second, it has to reallocate the size, that's basically what's going on here, it 'grows' as necessary.  Remember, never ever reference the memory location of a component or entity, only keep entity handles around and access it that way.

As @OvermindDL1 correctly pointed out, a pool grows and shrinks when needed. You should retain external handles (namely entity identifiers) rather then  references to components.
Would you store aside a reference to an element in a vector or would you save its index? Since a vector can reallocate, I would use the latter. EnTT offers entity identifiers instead of indexes but the reason for which you should use them and avoid references is more or less the same.

As a said note, an upcoming feature is meant to allow different pools when needed and one of them will be designed probably so as to guarantee stable pointers.
Stay tuned. :wink:

Okay, that's also what I had in mind.
I was trying to integrate Bullet's MotionState into my engine, to update my transform components when collision or forces happen. I'll try to redesign it.
Thanks for the quick answer! 💪

You're welcome. Thank you for using EnTT.
Feel free to ask if you need help or join the gitter channel (link in the README) if you have any question. :wink:


Reset Jenkins config

Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful subject line and body.
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Run Seed Job

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Go_MavenInstall/476/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Python_MavenInstall/554/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/15379/


Keyboard shortcuts: "when": "activePanel == 'workbench.panel.match'" doesn't seem to work

So I have a couple of customized keyboard shortcuts, they look like this:
{
    "key": "meta+t d",
    "command": "workbench.action.closePanel",
    "when": "activePanel == 'workbench.panel.terminal'" //when terminal is visible
},
{
    "key": "meta+r d",
    "command": "workbench.action.closePanel",
    "when": "activePanel == 'workbench.panel.match'" //when problems view is visible
},
The first command works correctly: when the terminal is visible, I press "meta+t d" and it hides. But for some reason the second one doesn't work: when the problems view is visible, I press "meta+r d" and nothing happens. The problem seems to be the "when" condition. Is 'workbench.panel.match`deprecated?

VSCode Version: 1.27.2
OS Version: Ubuntu 16.04.5 LTS

Does this issue occur when all extensions are disabled?: Yes

Docs: https://code.visualstudio.com/docs/getstarted/keybindings#_active-view-or-panel-when-clause-context

@dsanz006 I do not think there is any panel with id workbench.panel.match. Id of Problems panel is workbench.panel.markers. It works when I use correct id.

Thank you @sandy081, I will try it with id workbench.panel.markers. However, the documentation that @Tyriar references should be fixed, because there it says workbench.panel.match.

Thanks @dsanz006 for pointing it out. Fixed the docs.


[main] Upgrade to latest dependencies

Bump eventing -nak3
/cc knative-sandbox/eventing-writers
/assign knative-sandbox/eventing-writers
Produced by: knative-sandbox/knobots/actions/update-deps

/lgtm
/approve


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_aey94xa3_w/clone/recipe/meta.yaml:16: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_aey94xa3_w/clone/recipe/meta.yaml:21: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_aey94xa3_w/clone/recipe/meta.yaml:22: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_aey94xa3_w/clone/recipe/meta.yaml:43: missing_license_family: The recipe is missing the about/license_family key.
WARNING: /tmp/abs_aey94xa3_w/clone/recipe/meta.yaml:43: missing_description: The recipe is missing a description
ERROR: /tmp/abs_aey94xa3_w/clone/recipe/meta.yaml:43: missing_dev_url: The recipe is missing a dev_url
Errors were found

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_52kpntv5_b/clone/recipe/meta.yaml:16: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_52kpntv5_b/clone/recipe/meta.yaml:21: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_52kpntv5_b/clone/recipe/meta.yaml:22: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_52kpntv5_b/clone/recipe/meta.yaml:43: missing_license_family: The recipe is missing the about/license_family key.
WARNING: /tmp/abs_52kpntv5_b/clone/recipe/meta.yaml:43: missing_description: The recipe is missing a description
ERROR: /tmp/abs_52kpntv5_b/clone/recipe/meta.yaml:43: missing_dev_url: The recipe is missing a dev_url
Errors were found


dotnet-sdk, dotnet-publish-image: initial implementation.

This is an implementation of .NET Tasks for inclusion in OpenShift Tekton.
For integration into the catalog, this repo is organized as a Helm Chart and it will be pulled through https://github.com/openshift-pipelines/tektoncd-catalog/blob/main/externals.yaml. We'll move the repo to an "official" location before that.
I've written up tests using a .NET test framework. These tests are meant to be run as part of the repo to verify the functionality. The catalog will pull the released chart, it does not care about these tests.
The test are unit tests. There are no integration tests that involve using tekton on a server yet.
One of the test verifies what the rendered chart looks like against a stored file. It is an easy way to see the complete Task definitions.
This is an initial implementation. We can make improvements in follow up PRs.
The dotnet-publish-image task depends on an MSBuild feature (--getResultOutputFile) that Microsoft will include in their upcoming 8.0.3xx SDK. To use it, we'll need to backport it to our 8.0.1xx SDK.
@omajid @aslicerh @vdemeester @savitaashture ptal.
@vdemeester @savitaashture feel free to ignore the .NET tests and give feedback on the Helm/Task definitions only.

One of the test verifies what the rendered chart looks like against a stored file. It is an easy way to see the complete Task definitions.

These are the ones named *.verified.txt.

@vdemeester thank you for making time to review this!

do you aim to setup some CI on this (using github action or openshift-ci) ?

Definitely. For the .NET tests, I know how to do this.
I can use some help and guidance on how I might do integration testing with Tekton.

@vdemeester @omajid thanks for reviewing!
I'm going to merge this now. Further improvements/fixes can be made in new PRs.
If there is additional feedback, you can still add it to the PR.


Although I have git this plugin, why does my import fail? Is there a specific operation procedure? How to use no need requirements.txt?

You can try checking the console to see what libraries are missing, or you can open 'no need requirements. txt' to view the corresponding library requirements and install the missing libraries. The reason why I didn't use requirements. txt is that if you install it directly, your ComfyUI probably won't work.
你可以试着查看控制台，看缺少什么库，也可以打开no need requirements.txt，查看对应的库需求，安装缺少的库。我没有使用 requirements.txt的原因是：如果你直接安装，你的comfyUI多半用不了。


feat(rust): use cli_state when creating nodes

Changes

Move CliState to ockam_api
Refactor the to-be-deprecated current NodeConfig so it points to the new directories, so nodes are created using the new structure and the new vault/identity symlinks.
Removes the default_vault.json file and the default_identity from the global config.json
Removes the methods on the NodeManager to create vaults/identities.

Current state
Now, when creating a node with ockam node create, it will create the default vault and identity, and a random node using those vault and identity.

Merged through https://github.com/build-trust/ockam/pull/3866


First implementation of virtio-fs

With this pull request it is possible to mount a virtio-fs filesystem and write/read/create/delete files on it. No folder are supported at the moment.
The relevant parts are:

File system layer. Very simple, every folder under / is a mount point, under that the actual filesystem.
Fuse filesystem. provides the filesystem layer with an actual implementation. Needs a fuse-driver to send messages over
virtio-fs as said fuse-driver. Uses virtio virtqueues to send the messages via qemu to virtiofsd running on the host
virtio: provides an abstraction layer over the raw virtio-pci device.

Most parts have only the bare necessity implemented. Big areas for improvement are:

Better error handling. It is quite stable, but non-happy paths will likely panic
Folder support
Better memory-concept for virtio queues. Due to the DMA nature, Rusts memory guarantees do not hold and we should provide a safe abstraction. Currently solved by spinlooping after each request until it is handled.
Better fuse in-memory-structures. Currently feels a bit hacky.
Some more abstraction in the PCI layer.
Investigate what happens when we use a multi-core cpu. There are some global locks, it might degenerate to a serial execution when using the filesystem.
Better architecture support? Currently a lot of things live in x86/kernel.
Lots of parts marked with TODO
Speed improvements. Especially writing involves too many copies right now.

👍 I will test!

👍


Server Side Rendering is broken as of<EMAIL_ADDRESS>

See: https://github.com/airbnb/lottie-web/pull/905

@chenqingspring I've resolved this in #27


Private Voice Search not working on iPhone 8 iOS 16.7.2

iPhone 8 iOS 16.7.2
Before version 7.107.1, the Private Voice Voice Search was not to be found in Settings. Now (<IP_ADDRESS>), it finally is there, but when I turn it on and tap the microphone, it goes to the recording screen and instantly closes. :(
The DDG app does have microphone permissions.

Update: After the latest update (7.108), Private Voice Search is missing from Settings again.


HARVESTER: UI shouldn't present "Enable Logging" checkbox before v1.1.2

Summary
PR Checklist
~- Is this a multi-tenancy feature/bug?
- [ ] Yes, the relevant RBAC changes are at:~
~- Do we need to backport changes to the old Rancher UI, such as RKE1?
- [ ] Yes, the relevant PR is at:~
~- Are backend engineers aware of UI changes?
- [ ] Yes, the backend owner is:~
UI shouldn't present "Enable Logging" checkbox before v1.1.2

Occurred changes and/or fixed issues

https://github.com/harvester/harvester/issues/3656

Technical notes summary

Areas or cases that should be tested

Areas which could experience regressions

Screenshot/Video

@mergify backport master


docs: Edit file name License-depencies.md > dependencies-license.md

Description

Edit File name License-depencies.md > dependencies-license.md

Changes

Change 1

Rename License-depencies.md > dependencies-license.md

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.