[WIP] Introduce customizable scope objects

This PR introduces a new, user-customisable concept to dry-view: scopes.
Until now, dry-view has given the users the following places to provide data and behaviour to the view:

exposures
view parts, which add view-specific behaviour to the values provided by exposures
the context object, which provides a global, baseline rendering environment (available to the view parts, the template, and all partials within a single rendering, and in normal cases, this is also global across view controllers as well, since the same context class is usually reused across whole sections of an app)

This has been enough to cover many use cases, but it still left a gap: what if you wanted to provide some extra behaviour to particular templates, e.g. those within a single view controller rendering only, or even just to specific partials?
For this, we now have scopes. Scopes are just that - the rendering environment for a template. They consist of locals, the context, as well as the other internal objects used for rendering, etc.
You can create scopes from within templates as well as parts. When creating a scope, you pass a name (optional), as well as a hash of locals.
Scopes are created via a ScopeBuilder, which like the PartBuilder, can be configured to infer a scope class from its name, searching within a given namespace.
A scope can also be assigned to a view controller config itself, which provides the scope for the controller's base template.
To demonstrate the usefulness, let's run through a couple of concrete examples.
Adding extra behavior to a base template
template:
== hello

ruby code:
    module Test
      class ControllerScope < Dry::View::Scope
        def hello
          "Hello #{_locals[:text]}!"
        end
      end
    end

    vc = Class.new(base_vc) do
      configure do |config|
        config.template = "custom_view_controller_scope"
        config.scope = Test::ControllerScope
      end

      expose :text
    end.new

    expect(vc.(text: "world").to_s).to eq "Hello world!"

Providing default values for partials
This also demonstrates how a scope can be rendered without an explicit partial name, if the scope's name matches the partial's name.
template:
== scope(:greeting).render

_greeting partial:
| Greeting: #{greeting}

ruby code:
    module Test::Scopes
      class Greeting < Dry::View::Scope
        def greeting
          _locals.fetch(:greeting) { "Howdy" }
        end
      end
    end

    vc = Class.new(base_vc) do
      configure do |config|
        config.scope_namespace = Test::Scopes
        config.template = "named_scope_with_defaults"
      end

      expose :text
    end.new

    expect(vc.().to_s).to eq "Greeting: Howdy"

Both of these examples, while obviously simplified here, are derived from real issues we had in using dry-view across multiple complex client projects.
I'm very excited to see the addition of scopes, because it means we now have an appropriate place for every kind of view behaviour, whether it's global (context!), specific to a particular value (parts!) or specific to a particular controller or template (scopes!).
I still have some tidying to do before this PR is ready to merge, but I wanted to write up some brief thoughts on how this all works to seek some feedback at a feature/behavioural-level. Would love to hear what you think.

TODO:

[x] Merge renderer, context, part_builder, scope_builder together into some kind of "Rendering" object (we're passing some or all of these around in groups and I feel it's calling out for a refactoring)
[ ] Consider how we handle implicit rendering when a scope's name is actually a class
[ ] Add specs demonstrating class being provided as scope name

Pinging @solnic @jodosha and @AlfonsoUceda to take a look at this one.

@jodosha I'm really glad to hear like the approach. I agree 100% that a big part of helping people get on board with dry-view is clearly articulating each of these facilities and the purpose for each (along with some example cases, perhaps, to make things clearer). I'll be working on user docs once I've got through most of the 1.0 issues.
The order of precedence when calling a method within a template is:

Methods explicitly defined on the scope object
A local of that name (i.e. returning a view part)
A public method defined on the context object

@solnic @flash-gordon @GustavoCaso If you have a chance, I'd love your feedback on the refactoring I've just pushed in https://github.com/dry-rb/dry-view/pull/90/commits/91c0b3dde7de8f5b6d6f16b05cf260e84ee91341.
The background for this is that now we're adding support for custom "scope" classes, we've added a scope_builder to go along with our existing part_builder, and then because I want to to be possible to build scopes from within part classes, that scope_builder also needs to be provided to the part_builder when it's getting initialised. And then, when initializing part classes, we were ending up having to pass a whole list of related objects (renderer, context, scope_builder, part_builder). That's too many things. It was getting out of control.
So to tidy up, I've introduced a Rendering object. This is created at the beginning of the #call process on a view controller. It holds all those 4 things together, and provides an API to cover all the things we want to do (from anywhere) during the rendering process: rendering templates and partials, as well as building scopes and parts. With this in place we only have to pass a single object around to the various parts of our system. It feels much, much tidier, and it's simplified a lot of code.
However, the reason why I'd like some feedback here is that the Rendering class sets up some cyclic dependencies. When it is initialised, it passes itself to the context, scope_builder, and part_builder objects by calling #for_rendering(self) on each. Each of them then holds a reference to the rendering object so they can pass on the whole rendering environment to the objects they're vending (e.g. the part builder passes the rendering object to any of the parts it creates, so those parts can then offer a #scope method, which internally calls _rendering.scope).
I feel this approach is OK given the interrelatedness of these objects, and it's certainly helped tidy up our internals here. But if you think this kind of arrangement is a red flag, I'd love to hear your thoughts on how else we could approach it.

@timriley I have check the refactor you mentioned in https://github.com/dry-rb/dry-view/pull/90/commits/91c0b3dde7de8f5b6d6f16b05cf260e84ee91341
I see no issue with it, it actually pushes the logic one level down leaving the controller class much cleaner and easier to understand 👏 👏
Id true that
def for_rendering(rendering)
  return self if rendering == self.rendering

  self.class.new(namespace: namespace, rendering: rendering)
end

is not a very usual pattern in ruby, but as you say we need the rending because context, part and scope use the method defined in rendering
One question:
While we are refactoring I noticed that we have a bunch of private class methods in controller.rb but they are truly public for people to use them:
# @api private
def self.rendering(format: config.default_format, context: config.default_context)
  Rendering.prepare(renderer(format), config, context)
end

# @api private
def self.renderer(format)
  renderers.fetch(format) {
    renderers[format] = Renderer.new(paths, format: format, **config.renderer_options)
  }
end

# @api private
def self.renderers
  @renderers ||= {}
end

# @api private
def self.exposures
  @exposures ||= Exposures.new
end

Is there something stopping us from using private_class_method  and make them private?

@GustavoCaso Thanks for taking a look. I actually have tentative plans to make .rendering public, since it'll help with testing. I suppose it wouldn't hurt to try and make the others truly private — will look at that later on.


chore: fix repo name

coverage: 80.231%. remained the same
when pulling 91460fd08391825ad99a7ab9a713c819342cb757 on chore/docker-hub-readme
into 05d233eceed4efe49c901e1a419f3053a52e51d6 on develop.


External core library loading

To prevent shadowing dozens of libraries, causing the final JAR to be >20MB, look into methods to allow for external loading of these libraries.
Currently Libby seems promising, having only Libby shadowed would greatly decrease the size of the final JAR files.
Performance at startup is negligible, though libraries must NOT be hot-swapped during runtime. Async loading is a plus, but not required.

Started in https://github.com/GuusLieben/DarwinServer/tree/%2321-library-loading


DRG: Update Jump-related Rules

our jumps are fast now, so all jumps except for stardiver are generally ok to weave. This also means that we now expect both SSD charges to be held for Dragon Sight, as it's now feasible to weave within those windows.

Is DRG going to be bumping the minimum patch to 6.1 then?

Is DRG going to be bumping the minimum patch to 6.1 then?

mmmm yes we should do that.

Have you tested this on logs from 6.05, 6.08, and 6.1?
Tested on 6.0-6.1 and looks sane to me.


Implement the ZADD options

This closes #1018
Has passed the unit test with go.

You can just run ./x.py format to format the source code rather than manual formatting

Oh, I notice the cppcheck false alarm. I think you can change c++11 to 17 here: https://github.com/apache/incubator-kvrocks/blob/unstable/x.py#L162
@manchurio

You can just run ./x.py format to format the source code rather than manual formatting.

got it,thanks.

Oh, I notice the cppcheck false alarm. I think you can change --std=c++11 to 17 here: https://github.com/apache/incubator-kvrocks/blob/unstable/x.py#L162
@manchurio

src/commands/redis_cmd.cc:2432:19: warning: Suspicious condition. The result of find() is an iterator, but it is not properly checked. [stlIfFind]
    if (auto it = options.find(option); it != options.end()) {
                  ^

It seems cppcheck  wrongly reports @PragmaTwice

It is sad that cppcheck still fail and report a FALSE ALARM.
We will replace cppcheck by clang-tidy, and I think you can now workaround it by auto iter = ...; if(iter != end()) ...
cc @git-hulk

@manchurio Need to use gofmt to format the test case

If you only need to determine whether the key exists, you can use count directly, the iterator is redundant. Also doing this will not trigger an error from cppcheck. (By the way, C++20 has contains to do this thing. )

Hi @tanruixiang,
Actually I like the original code more, since the iterator is used in the true-branch block to avoid a double search (the upper bound is actually not O(1) due to collision, and even O(1) DOES NOT imples no cost). And I think this change does not improve readability, as the use of iterators is natural and easy to understand in c++. The false positives of cppcheck are entirely due to his own problems, and we should not modify the code logic just for that.
And I prefer just a comment rather than "request for changes" for just a trivial and purely code-smell review message, in order to be nice to new contributors.

And in my opinion, I prefer just a comment rather than "request for changes" for just a trivial and purely code-smell review message, in order to be nice to new contributors.

Got it, thanks a lot for your suggestion. It should be that I misunderstood this "request for changes". (Because if someone else suggests a little modification, I prefer to click on github to complete the modification🤣)

And in my opinion, I prefer just a comment rather than "request for changes" for just a trivial and purely code-smell review message, in order to be nice to new contributors.

Got it, thanks a lot for your suggestion. It should be that I misunderstood this "request for changes". I originally thought that only use "request for changes" can be clicked on github to modify. (Because if someone else suggests a little modification, I prefer to click on github to complete the modification🤣)

In the github review page, you can select "comment", "request for changes" or "approve". I think the first option is relatively "milder".

@manchurio By the way, where are the unit tests? :)

The file permission of x.py has changed from 755 to 644, which is weird. Could you revert it?

@manchurio By the way, where are the unit tests? :)

Th unit tests of zadd options are all in zset_test.go

Please revert changes on x.py.
The file permission of x.py has changed from 755 to 644, which is weird. Could you revert it?

OK. I'll figure out what happened, then fix it later.

@manchurio By the way, where are the unit tests? :)

The unit tests of zadd options are in zset_test.go

Hi. What he meant maybe the test/cppunit/t_set_test.cc.

@manchurio @tanruixiang  Yes, I meant the unit tests that are written in C++. Related to the sorted set unit tests are located in tests/cppunit/t_zset_test.cc and test only one component - class ZSet.
On the other hand, tests in Go/TCL test the entire kvrocks (storage + protocol + network).

@manchurio @tanruixiang Yes, I meant the unit tests that are written in C++. Related to the sorted set unit tests are located in tests/cppunit/t_zset_test.cc and test only one component - class ZSet. On the other hand, tests in Go/TCL test the entire kvrocks (storage + protocol + network).

By the way, after everyone's efforts, there are only Go tests now.😄

The file permission of x.py has changed from 755 to 644, which is weird. Could you revert it?

The file permission of x.py has changed from 644 to 755 now. @PragmaTwice  @tisonkun

@manchurio You can also consider using something like the following to encapsulate the logic with options and eliminate code duplication:
struct ZAddOptions {
  ZAddOptions() {}
  explicit ZAddOptions(uint8_t flags) : flags(flags) {}

  bool IsXX() const { return (flags & kZSetNX) != 0; }
  // other methods to ask if the specific flag was set

  uint8_t flags = 0;
};

Of course, you can add methods like SetXX to encapsulate set operations as well (to not spread bit operations over the codebase).

@manchurio You can also consider using something like the following to encapsulate the logic with options and eliminate code duplication:
struct ZAddOptions {
  ZAddOptions() {}
  explicit ZAddOptions(uint8_t flags) : flags(flags) {}

  bool IsXX() const { return (flags & kZSetNX) != 0; }
  // other methods to ask if the specific flag was set

  uint8_t flags = 0;
};

Of course, you can add methods like SetXX to encapsulate set operations as well (to not spread bit operations over the codebase).

This refactoring has been completed

Sorry, touched wrong button. :rofl:


fix: LSDV-1058: Data import missing file ids when multiple files uploaded async

PR fulfills these requirements

[X] Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
[X] Tests for the changes have been added/updated (for bug fixes/features)
[X] Docs have been added/updated (for bug fixes/features)
[X] Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
[X] Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)
(check all that apply)

[ ] Product design
[ ] Backend (Database)
[ ] Backend (API)
[X] Frontend

Describe the reason for change
When users were to upload multiple files consecutively while others were currently uploading, there was an issue where if some of the files resolved while there were still outstanding files uploading, clicking the "Import" button after all have resolved would only import the last files uploaded.
What does this fix?
Correctly handles all files and ids no matter the order or quantity. If uploading multiple of the same file, that will work correctly and generate separate tasks as expected on Import.
What libraries were added/updated?
N/A
Does this change affect performance?
No
Does this change affect security?
No
What alternative approaches were there?
N/A
What feature flags were used to cover this change?
N/A
Does this PR introduce a breaking change?
(check only one)

[ ] Yes, and covered entirely by feature flag(s)
[ ] Yes, and covered partially by feature flag(s)
[X] No
[ ] Not sure (briefly explain the situation below)

What level of testing was included in the change?
(check all that apply)

[ ] e2e
[ ] integration
[X] unit

Which logical domain(s) does this change affect?
Data Import

/git merge develop


MINOR: Implement toStringBase to avoid duplicated code

This is a follow up of https://github.com/apache/kafka/pull/14386.
The goal of this PR is to refactor the toString method to reduce duplicated code.

Apparently @kirktrue  implemented those in his previous commit.  So closing this.


Disable Clerical and Terminator Events

About the PR
Disables the terminator and clerical error events. (And probably doesn't fail tests.)
Why / Balance
Terminator is a obvious since it's whole goal is to perma kill someone.
Clerical Error could be a up for a bit more debate, given it's nothing major but if I recall correctly we were leaning towards wanting to disable this one.

The main argument for the clerical error being added upstream was so that "someone not being on the manifest doesn't instantly make them valid," but I kinda feel like we can trust our players to not instantly arrest & perma someone for not being on the manifest. The event isn't necessary, basically, and only serves to make gameplay more difficult / obscured.


build: bump deps v2.4.x [DEV-4255]

Task linked: DEV-4255 Backport maintenance release components selectively to v2.x major version


HSEARCH-3132 Normalizers are not closed on shutdown

https://hibernate.atlassian.net//browse/HSEARCH-3132

Merged, thanks!


Prevent a crash when the mutelinks endpoint would return a 404

Right now when the mute links endpoint the script just crashes instead of ignoring mute links.
By moving the line after the if it prevents the script from crashing and displays a readable error in the console instead.
If you have any changes you want me to do feel free to ask or if you don't want to introduce this I completely understand.

Hey there!
This is an important fix for sure, thanks for working on it TeddyPepe <3
I changed the base from main to dev and move some stuff around so that it works with other changes there.
If you want to, I'd appreciate you doing the same thing with some other endpoints (nukes has the same problem, I think) <3
But no pressure, of course NODDERS


More wooden support pieces as official scenery additions

The set of wooden support scenery pieces that ship with the game is pretty incomplete, i think it would be a very nice and desireable addition to have a half height support structure piece, a support structure wall piece, and a half height version of that wall piece. Possibly more but the three i mentioned should be pretty easy to make.

As of #294 the pieces mentioned in this issue have been implemented. but i'll leave this open as there are other wooden support pieces that could be added in the future. Such as the diagonal pieces brought up in that PR.


phonetics/french/sonnex: fix -us case #144

Fix proposal for issue #144

Hello @tuzepoito. Looks good to me. Ready to merge and release after you add the comment. Also, note that if you need a way better phonetic algorithm for French I designed one here. It's all undocumented though.

Thanks for merging @Yomguithereal . I think a good phonetics algorithm for the French language would be welcome, while the Soundex algorithms for French appear quite old. Sonnex seemed to be a step in the good direction, but it still needed improvement and it appears to be abandoned by its author. I'll take a look to your project.

@tuzepoito you can test my algorithm online here if you need: https://yomguithereal.github.io/phonogram/
Just know that only the French & Spanish version are somewhat usable.


add suggested blurb to 2nd call of paper notebooks,

Data: StrokeMRI, TOP, SABRE
Harmonisation: NeuroCombat
Training data: StrokeMRI+TOP
Testing data: SABRE
Validation method: double-stratified
Brain-age algorithm: ExtraTrees
Output: H_NeuroCombat_StrokeMRITOP_SABRE_ET.csv (sort of stitching them together)

Should not be done on 3 notebooks as these are not finished. @MDijsselhof please review on 1s and 2s

Done.


Compatibility to .net Core 1.1

I'm currently trying out .net core, using the (at least I think so) current version and get the following error:
Package BingMapsRESTToolkit 1.0.5 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1)
According to the readme this package should be compatible with ASP.NET Core 1.0 and as far as I understand the .net framework (which is not very far but still) asp.net core and dotnet core should be kind of similar/identical so it should work.
Steps to reproduce:

Install .net core from here https://www.microsoft.com/net/core#windowsvs2017 (command line tools)
Create new app (dotnet new console)
Add BingMapsRESTToolkit package from nuget to project ( dotnet add package BingMapsRESTToolkit)

Full error message:
  Writing [...]\tmp3363.tmp
info : Adding PackageReference for package 'BingMapsRESTToolkit' into project '[...].csproj'.
log  : Restoring packages for [...].csproj...
info :   GET https://api.nuget.org/v3-flatcontainer/bingmapsresttoolkit/index.json
info :   OK https://api.nuget.org/v3-flatcontainer/bingmapsresttoolkit/index.json 623ms
info :   GET https://api.nuget.org/v3-flatcontainer/bingmapsresttoolkit/1.0.5/bingmapsresttoolkit.1.0.5.nupkg
info :   OK https://api.nuget.org/v3-flatcontainer/bingmapsresttoolkit/1.0.5/bingmapsresttoolkit.1.0.5.nupkg 502ms
log  : Installing BingMapsRESTToolkit 1.0.5.
error: Package BingMapsRESTToolkit 1.0.5 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package BingMapsRESTToolkit 1.0.5 supports:
error:   - dotnet (.NETPlatform,Version=v5.0)
error:   - net45 (.NETFramework,Version=v4.5)
error:   - portable-net45+win8+wp8 (.NETPortable,Version=v0.0,Profile=Profile78)
error:   - uap10.0 (UAP,Version=v10.0)
error:   - wpa81 (WindowsPhoneApp,Version=v8.1)
error:   - xamarinios (Xamarin.iOS,Version=v0.0)
error: One or more packages are incompatible with .NETCoreApp,Version=v1.1.
error: Package 'BingMapsRESTToolkit' is incompatible with 'all' frameworks in project '[...]csproj'.

.NET core is not supported at this time.

Is there a technical reason for this (missing/incompatible APIs or similar) or only lack of demand?

Main reasons;

Lack of demand (only 2 requests for this so far)
.NET Core vs .NET Standard clarity. General consensus the last I looked was that these weren't where they need to be yet and likely won't be for about 4 to 6 months or so.
Time. Don't have a lot of time to work on this. I recently had another portable class library where I added support for .NET standard. It took several hours to get working right and in the end consisted of creating a separate .NET standard project which was ugly.

Consider this another request.

We will take a look at adding an .NET core library and see if we can get it in with our next planned update of this project near the end of September.

What's the status of this?  I need to be able to use this library in .net core.

Try the latest version. Support for .NET standard 1.4+ was added. If all else fails, simply download the source code and add it to your project.


DjangoUnicodeDecodeError raised when viewing page that uses charset other than DEFAULT_CHARSET

I have a view that displays the contents of an attachment. If the charset of the attachment is not compatible with the default charset (say, UTF8 and Windows‑1252) then DjangoUnicodeDecodeError is raised with the following traceback:
Traceback:
File "/home/inboxen/inboxen/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
  199.                 response = middleware_method(request, response)
File "/home/inboxen/inboxen/lib/python2.6/site-packages/debug_toolbar/middleware.py" in process_response
  109.         content = force_text(response.content, encoding=settings.DEFAULT_CHARSET)
File "/home/inboxen/inboxen/lib/python2.6/site-packages/django/utils/encoding.py" in force_text
  116.             raise DjangoUnicodeDecodeError(s, *e.args)

N.B. the charset has been manually set in response["Content-Type"]
The simplest solution is to catch the exception, return the response unmodified and log a warning.

I'm fairly sure this has been fixed by #895, so I'll close this issue.


Cannot locate tasks that match ':desktopApp:compileJava' as task 'compileJava' not found in project ':desktopApp'.

https://github.com/JetBrains/compose-multiplatform-template/
Android Studio Iguana | 2023.2.1 Canary 3
Build #AI-232.9559.62.2321.10773421, built on September 7, 2023
Runtime version: 17.0.8+0--10699129 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
external.system.auto.import.disabled=true
debugger.new.tool.window.layout=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
ide.experimental.ui=true
Non-Bundled Plugins:
com.squareup.sqldelight (2.0.0)
org.jetbrains.compose.desktop.ide (1.5.1)
Cannot locate tasks that match ':desktopApp:compileJava' as task 'compileJava' not found in project ':desktopApp'.

Try:

Run gradle tasks to get a list of available tasks.
For more on name expansion, please refer to https://docs.gradle.org/8.2.1/userguide/command_line_interface.html#sec:name_abbreviation in the Gradle documentation.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.2.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 843ms

Same result in Giraffe
Android target builds fine

Desktop not

Steps to reproduce.

Pull template.
Add new branch.
Add new module, link it. (any common module)
Try to build. See build error.
Checkout main
Clean project
You can't build desktop target

Hi @mironoff2007,
I've been trying to replicate the problem that you're facing, but without success. The compileJava task seems to be not required for this project, as there's no Java code included. Therefore, it is quite unclear what exactly is triggering it.
With regards to reproduction steps, both 4 and 7 seem to operate well on my end. It would be highly beneficial if you could share with us the entire project, inclusive of all the modifications you've made to our template. This would greatly aid in the identification of the issue.

I've deleted fork and pull template again. I had same error.
But I realised that I use different run method.
Is this method wrong?
It worked before in my pet projects, but it is broken in pet project in same way.

In pet projects I'm using jvm { withJava() } instead of just jvm() in build.kts. With this desktop target builds, but I causes runtime no class found exceptions for dependencies outside of desktope module

Indeed, I've reproduced that - this method doesn't quite function as expected when attempted via Android Studio, although it works seamlessly in IntelliJ IDEA. This method is perfectly valid and should ideally perform without a hitch, but it seems to be some sort of an issue specific to the Android Studio IDE.
At present, I would recommend using the "desktopApp" run configuration - simply utilize the run button located on the top bar.
I'm going to close this issue as it appears to be more related to Android Studio rather than a problem inherent to Compose Multiplatform. I would suggest that you bring this to the attention of Google's Android Studio IDE via their issue tracker. They should be able to provide further assistance in this regard.


Added Azure.Defender.Cspm

PR Summary
Fixes #2151
Added Azure.Defender.Cspm rule.
PR Checklist

[x] PR has a meaningful title
[x] Summarized changes
[x] Change is not breaking
[x] This PR is ready to merge and is not Work in Progress
Rule changes

[x] Unit tests created/ updated
[x] Rule documentation created/ updated
[x] Link to a filed issue
[x] Change log has been updated with change under unreleased section

Other code changes

[ ] Unit tests created/ updated
[ ] Link to a filed issue
[ ] Change log has been updated with change under unreleased section

Hey @BernieWhite, please check out.


Automated cherry pick of #5115: aws userdata bugfix

Cherry pick of #5115 on release/3.1.
#5115: aws userdata bugfix

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/3.1@a3b3e9c). Click here to learn what that means.
The diff coverage is 0%.

@@              Coverage Diff              @@
##             release/3.1   #5116   +/-   ##
=============================================
  Coverage               ?   6.75%
=============================================
  Files                  ?     545
  Lines                  ?   95270
  Branches               ?       0
=============================================
  Hits                   ?    6433
  Misses                 ?   88299
  Partials               ?     538

Flag
Coverage Δ

#aFlag
6.75% <0%> (?)

Impacted Files
Coverage Δ

pkg/util/cloudinit/cloudconfig.go
51.98% <ø> (ø)

pkg/cloudprovider/instance.go
0% <0%> (ø)

pkg/compute/guestdrivers/aws.go
4.09% <0%> (ø)

pkg/multicloud/aws/host.go
0% <0%> (ø)

pkg/multicloud/aws/instance.go
0% <0%> (ø)

Continue to review full report at Codecov.

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

/lgtm

/lgtm

/approve


feat: add a til posts api endpoint

Adds the endpoint /api/posts.json to fetch the json feed of TIL

Supports an optional limit param for adjusting the number returned - default is 10

Coverage increased (+0.4%) to 84.906% when pulling df8c947120a931b04a7843c8206122310373f008 on feature/get-posts-api-endpoint into 100fe9181111d2cba85e178aaf6377e1432989fd on master.


Getting stuck on crictl stats

Description
While debugging very high memory consumption by kubelet we identified a possible bug within containerd. Analysing kubelet withgo pprof showed that the cause of this high memory usage was it's metrics collection system (kubernetes/kubernetes#106919), which at some point calls the CRI to retrieve metrics from the container runtime, in this case containerd.
We then attempted to run crictl stats to retrieve stats for all running pods, which didn't get a response from containerd and got stuck instead. The issue only affected querying all pods, querying individual ones was working fine.
Looking at the logs now (a few days after this issue occurred) it seems like a single container (30bd5ec8a997983875654a9bb28ae6810717198a8c349cf5032dee76c322acae) was responsible for this issue. Unfortunately we don't have any more details on that container, nor do we have a snapshot of the machine.
The logs show a significant amount of cancelled contexts when we restarted (and therefore shut down) containerd. Containerd is stopped at line 17704, afterwards shows cancelled contexts until line 35195.
It did consume quite a lot of memory (several GB iirc) as well, which is logical when there probably were about 18k goroutines running.
containerd.log (8,4MB)
Redacted a few things like Container configs and such.
Steps to reproduce the issue
Since we do not have a lot of information on the container suspected to have caused this issue, I'm unfortunately unable to provide any reproduce steps here. If we encounter the issue again, we'll try to collect more information.
Describe the results you received and expected
Whatever caused this error resulted in CRI calls getting stuck forever (or at least for a very long time).
There should be some timeout mechanism that cancels the contexts to prevent such a huge amount of stuck calls, resulting in a lot of memory consumption.
I'm not too familiar with the CRI, so there might be some mechanism in place that just get's used incorrectly by Kubernetes.
What version of containerd are you using?
containerd github.com/containerd/containerd v1.5.5 72cec4be58a9eb6b2910f5d10f1c01ca47d231c0
Any other relevant information
# runc --version
runc version 1.0.1
commit: v1.0.1-0-g4144b638
spec: 1.0.2-dev
go: go1.16.6
libseccomp: 2.5.1

Show configuration if it is related to CRI plugin.
version = 2

[debug]
  level = "debug"

[metrics]
  address = "<IP_ADDRESS>:1338"

[plugins]
  [plugins."io.containerd.grpc.v1.cri"]
    sandbox_image = "k8s.gcr.io/pause:3.4.1"
            [plugins."io.containerd.grpc.v1.cri".registry]
      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
              [ ... several overrides ... ]

By cri stats, do u mean ctictl stats?

yes, of course, sorry.

I don't want to get your hopes up if this is a new issue but this may have been solved in 1.5.8 with the ttrpc dependency bump that contained this fix https://github.com/containerd/ttrpc/pull/94 which was intended to solve this issue https://github.com/containerd/ttrpc/issues/72. We'd seen containerd hang on collecting metric on Windows as well, but I'd never heard of a report of this for Linux.

@schrej Could you collect the goroutine stack of contained by kill -USR1 next time? It will help us to find root cause. Thanks!

Yea +1 the above, we can tell if it's the same ttrpc issue most likely.

Thanks, on the Kubernetes issue I got pointed in the same direction, so hopefully that really is a fix for that. If it ever comes up again I'll try to capture a goroutine stack.

We have caught another outlier node on which we see high memory usage of kubelet and containerd. Here is the snapshot of top:
Here is the goroutine dump of containerd (zip file ~48M, raw dump ~960M): https://drive.google.com/file/d/1yLSz-lrJVObT15VjdOShHgW5DWNtoRlg/view?usp=sharing

@vukg
It looks like containerd hung on communicating with some containerd-shim. From the same shim pointer 0xc0024e6000, I guess that one of the containerd-shim is hung.
github.com/containerd/containerd/runtime/v2.(*shim).Stats(0xc0024e6000, 0x563d1f92e120, 0xc44b00c180, 0xc4e0127b01, 0x0, 0x0)

The script follow can find out the hung shim.
for cid in `crictl pods  -q --no-trunc`; do
    echo $cid;
    ctr -n k8s.io shim --id $cid state 1>/dev/null 2>&1;
done

Have u enable debug.sock on containerd? ctr pprof block will be really helpful to locate the problems.

The script may help you to find out the hung shim.

Unfortunately it did not help. In this case it also seems like all of the requests to crictl stats $podid freeze.

Have u enable debug.sock on containerd? ctr pprof block will be really helpful to locate the problems.

Unfortunately we don't have that enabled. Enabling it now would probably require a restart, which will likely unbreak it.

I am seeing this same thing running rke2 with containerd v1.5.10-k3s1. Restarting the rke2-agent service which restarts the kubelet seems to fix the issue but it does usually come back. Same symptoms where crictl stats hangs, memory rises (clears on restart of rke2-agent/kubelet), and kubectl top nodes show unknown for these nodes. Our current way to track it is when a kubectl top node starts returning unknown but the node is still ready.
https://github.com/rancher/rke2/issues/2863 has more info on what I am seeing
Please let me know what I can do to help track this down.

We are only seeing this on our cluster running v1.22 that has containerd v1.5.10-k3s1. A few other clusters running v1.21.6 with containerd v1.4.11-k3s1 don't seem to have the issue.

I believe that I stumbled across the same issue. We have shims randomly hanging and not responding to stats requests anymore. Actually, all requests directed to that specific shim are hanging (e.g. ctr shim state). Interestingly, the requests don't hang forever. It looks like the shim is able to process a few requests in one batch every 30s or so.
Getting stack traces via USR1
Getting stack traces from the affected shims turned out to be much harder than expected. It looks like sending USR1 to the process "unblocks" the shim for a very short time period, making all pending requests succeed immediately. It also looks like the process is not able to collect stack traces fast enough to actually catch the cause. The resulting stack traces all look "normal" (I'll post an example next time I run into the hang). @mitchellmaler Can you maybe try the same thing and verify that you see the same "unblocking" behaviour on USR1?
Getting stack traces via gops
I've then decided to find other ways of getting stack traces. I started with a self compiled shim binary that has the gops agent running so that I can use gops stack <pid> to gather stack traces. This turned out to not be helpful, as gops uses a TCP connection to issue requests to the process agent...and these requests turned out to show the same behaviour as the shim requests.
This leads to the assumption that this is probably NOT ttrpc (issue) related. As gops clearly does not share the same client. Or I got the linked issue wrong and this is actually about some OS or process level buffers getting full and causing the lockups?
Getting stack traces via dlv
Next thing I tried was to use a shim binaries with debug symbols enabled so that I could use dlv to attach and print stacktraces. This worked, at least in regard to getting stack traces. However, just attaching the debugger causes the shim process to unblock, meaning that stack traces were useless again. The debugger was even "better" at unblocking the shim as it caused the shim to work properly again even after detaching the debugger. This means, that all requests (including gops requests) were now handled properly by the shim process until enough time passed to re-trigger the issue for the unknown reasons. Using gdb instead of dlv gave the same results.
Getting stack traces via periodic dumps
Then I tried to modify the shim source to run a goroutine with a loop that printed the stacktraces into a file every 10s, with the hope that this would not "unblock" the shim and reveal the underlying cause. This however showed that the goroutine performing the stackdumps was also getting blocked when the shim stopped responding. Interestingly, this loop showed that the process got unblocked for a very short time exactly every 2m as I could see stackdumps every 2m in the stack file.
I also added some debug prints to the GC loop in setRuntime (it calls debug.FreeOSMemory every 30s). It prints before and after the FreeOSMemory calls and shows how much time is spent in the GC. I somehow assumed that this loop might be the cause for the lockups, but it turned out that the loop is also not run at all when the process hangs, meaning that the "before FreeOSMemory" debug print isn't even reached.

 And I can't stop thinking that the way containerd tries to limit the memory footprint via debug.SetGCPercent() and the debug.FreeOSMemory() loop is causing some internal scheduling issue inside the runtime. There is also an open issue (https://github.com/golang/go/issues/52178) in the Golang repo that reports hangs in combination with periodic FreeOSMemory calls. It might be related...
Next thing I will try is to run a shim binary with the FreeOSMemory loop being disabled and see if the issue vanishes for the next few days. This test will however not be reliable as I won't be able to say if waiting 2 more days would trigger it.
Long term, I assume containerd will switch to Go 1.19 and then be able to use the new debug.SetMemoryLimit() function to achieve the result that it initially tried to achieve with the loop. Maybe that makes this whole issue just disappear...


Gdm refactor s3

review please, I'll squash and do a single commit pull request after review

Fixed & squashed pull request coming on another branch.


[staging] libmicrohttpd: 0.9.74 -> 0.9.77, several unpinnings

Description of changes
https://git.gnunet.org/libmicrohttpd.git/tree/ChangeLog?h=v0.9.77
I would keep the old versions for the moment and drop them when this mass rebuild went through fine and the old versions are known to not be needed any more (e.g. for pinning on the staging/staging-next cycles).
Closes #187811.
Since there are many pkgs transitively dependent on libmicrohttpd, I only built a hand-picked selection:
Result of nixpkgs-review run on x86_64-linux 1

16 packages built:

coturn
fileshare
kismet
kiwix
kiwix-tools
kodi
libjson-rpc-cpp
libpromhttp
ola
osmscout-server
profanity
proxysql
taler-exchange
taler-merchant
xmrig
xmrig-proxy

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

[ ] Tested, as applicable:

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

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

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/3247

@ofborg build proxysql taler libjson-rpc-cpp libmicrohttpd

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-already-reviewed/2617/1447

lgtm


Feature: Show filters on top of the table

Greetings,
While building one application, I have the requirement to display filters on top of the table.

By adding following line to table builder component, the filters will be displayed on the top of table.
public bool $showFiltersOnTop = true;

By default, the filters will show as usual.
Thank you.

Works perfect for me. Thanks a lot.

Great idea!

Does this also work in the admin panel for resources?

Yes! this also works with admin panel for resources.
Add public bool $showFiltersOnTop = true;   to ListRecords page.

Does this also work in the admin panel for resources?

Yes! this also works with admin panel for resources.
Add public bool $showFiltersOnTop = true;  to ListRecords page.

Ah, yes of course. Nice!

Hi @danharrin
According to this PR, one can use property on livewire component to show filters above table.
public bool $showFiltersOnTop = true;

But, according to documentation, filament's standard way of customization is using protected method on component.
For example, (https://filamentphp.com/docs/2.x/tables/filters#customizing-popover-columns)
protected function getTableFiltersFormColumns(): int
{
    return 3;
}

So kindly let me know, should I update this PR from  using property public bool $showFiltersOnTop = true;   to protected method like below.
protected function getTableFiltersOnTop(): bool
{
    return true;
}

Please guide.

Yes please, because public properties are editable via Livewire. We should use a protected method 👍

Hi @danharrin
As suggested by you, I have changed the public property $showFiltersOnTop to protected method showFiltersAboveTable().
By default, filters will be shown at there default position. To show filters above table,  override the showFiltersAboveTable() method on table livewire component:
protected function showFiltersAboveTable(): bool
{
    return true;
}

Thank you.

Thanks! I've slightly changed the syntax for more flexibility in the future, and added docs.


adding scroll animations and get in touch button

on scrolling there will be animations on scroll like eg zoom flip fade etc..It will make it more attractive to the user
get in touch button will open a form that saves data on google sheets

plz do assign me this

Obviously, based on your changes I will add the labels in your PR, no worries

Okay

How work is going on @123shreyanvi

What is the update

What is the update

I have made the pr


Obsidian inner link to block doesn't  work in HTML export

Hi,
Obsidian inner link to block doesn't work in HTML export.
Would be expected to work in HTML, because block references in obsidian can function similarly as anchors in HTML.
Thank you for looking after.
Win 10 PRO
Firefox 122.01
Obsidian 1.5.3
your plugin version 1.8.0

This is a duplicate of #57. This actually is not possible without adding special support because obsidian keeps track of block locations internally and redirects links programmatically. They do not work using ID's except when they are explicitly defined.
Since this is a duplicate I'll go ahead and close it.

To clarify I do plan on adding this. You have also actually reported this before! haha #298


[Discussion] More on reset

I have everything working pretty nicely with the reset i implemented, but i did start to realize that UITableViewCells and UICollectionViews can be pretty tricky. I have a mixed media feed and i noticed my FPS dropped with or without video.   Like calling a reset method in prepareForReuse even if the cell isn't going to play a video.
I believe replaceCurrentItemWithPlayerItem is done on the main and it's probably a bad idea to be constantly setting nil on every prepareForReuse.

Basically what i need to be able to do is stop and hide the player on prepare for reuse, not tear the entire thing down. Then when cellForRow is called it can then run through the standard setup when a new path runs through the setter. The other problem is the cell has delegation methods to get notified on cellWillAppear and didEndDisplayingCell, and when they get this message they call the appropriate play/pause methods which will hijack the current cell as the Player instance is still just sitting there. I could do a lot of juggling.
I guess it would be nice to somehow mark the controller that it needs a reset,  but don't use the main thread for anything until a non nil value is passed to the setter. That means it would also have to ignore any calls between that time.
The combination of reusable views with tableView delegation methods makes this pretty hard.

hey @rromanchuk
couple things i wanted to mention. i actually don't recommend "reloading" each player video unless a certain set of criteria is met. by loaded, i mean that the thumbnail image view for the video disappears and the video starts playing.
videos should "load" once the the scroll view stops scrolling. once you get that callback, the cells that are visible on screen, should be given the signal to load the URL path and then proceed to fade out the thumbnail image view.
this should make the re-use logic a lot more performant because you're not having to reset the player fully in every case unless scrolling completely stops. :+1:

@piemonte "videos should "load" once the the scrollview stops scrolling." But according to who?  You wouldn't say the same thing for photos.... That definitely makes things easier, but there is a significant improvement in user experience if the player starts loading when ios tells the cell it needs to prepare its data in cellForRow.
I also allow for playing while the user is scrolling.  The problem arises when a cell is about to be reused, if i don't force a reset here other delegation methods will fire off play signals which will trigger a video that  is now out of context.  It's also not the responsibility of these delegation methods to manage the cell based on logic from the data source. I still need to use prepareForReuse to do exactly that, but i rather use a flag than actually tearing down the player.

Or maybe an even simpler approach.... allow nil to be passed into path and don't force a hard reset on the player. That way, the only thing i need to do is always set the path in cellForRow, and that's basically it.
Ideally passing nil would put the player in an invalid state, without doing anything too aggressive, besides maybe setting itself into some state like NoContent. The refactoring would be making sure replaceCurrentItemWithPlayerItem is not called for a nil path, and when there is a .NoContent state the player doesn't try to interact with AVPlayer. Seems like natural and expected behavior for anyone trying to set a nil pass.    Sorry if i'm not making much sense, maybe an example project is needed here.

@rromanchuk How bad is your experience when scrolling with some videos in the feed? I was trying to find a way to allow seamless scrolling w/ autoplaying videos and I didn't want to wait to play on the scrollview decelerating either.
I tried many things and there was always some lag. I then realized that even Vine's feed will catch/lag if you scroll fast enough, and if Twitter hasn't been able to figure it out then my guess is you just aren't meant to quickly scroll a feed full of auto playing videos.
The best approach is to only trigger the video when deceleration is happening.


Jackson2 AOT contribution not registered when extending JdbcOAuth2AuthorizationService

Expected Behavior
When extending the JdbcOAuth2AuthorizationService or JdbcRegisteredClientRepository, the Jackson2ConfigurationBeanRegistrationAotContribution should be registered.
Current Behavior
The Jackson2ConfigurationBeanRegistrationAotContribution is not registered as an AOT contribution.
Context
This is due to the OAuth2AuthorizationServerBeanRegistrationAotProcessor checking for the relevant classes by the String class name (i.e. "org.springframework.security.oauth2.server.authorization.JdbcOAuth2AuthorizationService" and "org.springframework.security.oauth2.server.authorization.client.JdbcRegisteredClientRepository").
My current workaround is to provide my own BeanRegistrationAotProcessor implementation that JdbcOAuth2AuthorizationService and JdbcRegisteredClientRepository are assignable from registeredBean.getBeanClass(), and then use reflection to instantiate the package-private Jackson2ConfigurationBeanRegistrationAotContribution:
@Override
public BeanRegistrationAotContribution processAheadOfTime(RegisteredBean registeredBean) {
    boolean isJdbcBasedOAuth2AuthorizationService =
        JdbcOAuth2AuthorizationService.class.isAssignableFrom(registeredBean.getBeanClass());

    boolean isJdbcBasedRegisteredClientRepository =
        JdbcRegisteredClientRepository.class.isAssignableFrom(registeredBean.getBeanClass());

    BeanRegistrationAotContribution contribution = null;
    if ((isJdbcBasedOAuth2AuthorizationService || isJdbcBasedRegisteredClientRepository)
        && !this.jackson2Contributed) {

    this.jackson2Contributed = true;
    contribution = createJackson2ConfigurationBeanRegistrationAotContribution();
    }
    return contribution;
}

Is there a reason to use String-based class references over Class references?

I would be happy to work on a pull request if my proposed changes make sense.

@billkoch Thank you for reporting this.

Is there a reason to use String-based class references over Class references?

I'm not sure why the String-based class equality check was used but it should use the class reference instead, as per your workaround.
Would you be interested in submitting a PR for this fix?

@jgrandja Thank you for the quick response! I'd be happy to submit a PR for this. 👍


Name

Pull Request Template

Please provide all of the details below. Pull requests missing any of the information below will be closed!
Providing the issue number/url helps us identify the problem being solved and keep the issues tab clean and tidy

Summarise what this PR fixes
<Detail your PR changes/fixes>
What ISSUE NUMBER does this fix?
Fixes #
Checklist:
(Add an x between the brackets to check the items)

[ x] I have summarised what this PR fixes above
[ ] I have provided the issue ID/URL above
[ ] This PR fixes only the issue mentioned above (create separate PRs for separate issues)
[ ] I was the first one to claim the issue or I created the issue

I have added my name to the contributors.md file since I have made a pull request.

PR's made need to follow this template with an issue linked that has been taken care of in the pr:


Record the exception raised while serializing gRPC metadata

Armeria currently doesn't catch and record the exception raised by io.grpc.Metadata.serialize(). As a result, when gRPC fails to serialize some metadata, the request will time out or fail silently. The exception should instead be recorded into RequestLog.request/responseCause() so a user can analyze the root cause more easily.
Here's an example stack trace of such exceptions:
java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4
 at io.grpc.Metadata.serialize(Metadata.java:473)
 at io.grpc.InternalMetadata.serialize(InternalMetadata.java:78)
 at com.linecorp.armeria.internal.common.grpc.MetadataUtil.fillHeaders(MetadataUtil.java:68)
 at com.linecorp.armeria.server.grpc.ArmeriaServerCall.statusToTrailers(ArmeriaServerCall.java:663)
 at com.linecorp.armeria.server.grpc.ArmeriaServerCall.doClose(ArmeriaServerCall.java:422)
 at com.linecorp.armeria.server.grpc.ArmeriaServerCall.lambda$close0$6(ArmeriaServerCall.java:362)
 at com.linecorp.armeria.common.RequestContext.lambda$makeContextAware$3(RequestContext.java:547)
 at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
 at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
 at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
 at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391)
 at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
 at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
 at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 at java.base/java.lang.Thread.run(Thread.java:829)

Thanks for reporting the issue, @sfc-gh-nalekseev!

I didn't have enough time to fix this bug. Let me handle it in the next iteration. 🙇♂

FYI:
I noticed that  grpc/src/main/java/com/linecorp/armeria/server/grpc/ArmeriaServerCall.java is renamed to  grpc/src/main/java/com/linecorp/armeria/server/grpc/AbstractServerCall.jav
at [this commit] (d2468806cdf0e7f2402c6f8b33c7ec490836024b)
(
https://github.com/line/armeria/pull/4192/files#diff-77a9c8cba521c7ccb32f217b4a1c0f7f32450a51aeef23ee68b04447c0cecea0 )

Right 👍
As you've noticed, the stacktrace is for an older armeria version so the class names,line numbers may not match the most recent codebase.
Let me share a little background on this change:
ArmeriaServerCall has been divided into UnaryServerCall and StreamingServerCall.
Each armeria service may specify whether the request/response is unary or streaming. When a request/response is unary armeria can apply some special handling to make the code path more efficient.

UnaryServerCall: when both the request and response is unary
StreamingServerCall: when either one of request or response is streaming

I would guess that we need to verify both unary and streaming implementations to check if the problem still persists.

As array size is preserved in the instance of io.grpc.Metadata beforehand, but
java.lang.ArrayIndexOutOfBoundsException is thrown.
This means the size has changed unexpectedly (usually implementation error at server-side or at client-side.

I think Metadata can be specified by the user.
For instance, StatusRuntimeException can contain a Metadata. If a StatusRuntimeException containing an invalid Metadata is thrown/returned from a gRPC service I guess we might be able to reproduce the problem.

I noticed just wrapping with try catch would be easy to set RequestLog.request/responseCause(),
but there's risk that unnecessary implementation is included by this change.
I also noticed that finding root cause and reproduce the problem is a bit tiresome then I've expected..

Reason 1)
The change of

ArmeriaServerCall has been divided into UnaryServerCall and StreamingServerCall.

has happened on
Jul 4, 2022
It looks the error reported here could happen less than armeria-1.17.0.
I'll read the code of armeria-1.16.1, and try to understand why the bug could happen.

Reason 2)
Because io.grpc.Metadata usually manages  private property size properly by itself
( https://github.com/grpc/grpc-java/blob/release-1.52/api/src/main/java/io/grpc/Metadata.java#L120-L212 )
It would be the timing issue to reproduce the error.
To surely reproduce the error, we might need to use reflection util, or need to mock implementation...

Thanks!
I think we can create an invalid metadata using an unsafe API provided by gRPC.
e.g.
InternalMetadata.newMetadata(2, new byte[] { 1 }, new byte[] { 1 });

Using this, I think we can throw a StatusRuntimeException including the Metadata from a gRPC service:
new TestServiceImplBase() {
  public void someMethod(MyRequest request, StreamObserver<MyResponse> responseObserver) {
      responseObserver.onError(/* StatusRuntimeException with invalid metadata */)
  }
}


Log file configuration

Hi, I'm currently working out a raspberry configuration with a read only file system.
The problem is that the rtspserver is writing a log file to /var/log which is not writeable.
Because of that the server won't start.
Is it in any way possible to configure the location of the log file?

Hi Ronny,
The h264_v4L2_rtspserver write to standard output using log4cpp.
If you get log in /var/log, I guess you redirect to syslog or whatever starting it, isn't it ?
Regards,
Michel.

Hi Michel, thanks for your reaction, indeed it was redirected with the init script which was starting the server.
Case closed.


change working directory, and default user

Hi @blacktop
Would you accept a PR with the default user being non-root, and working directory being changed to /usr/logstash?

And maybe changing the jre from 8 to 11?

Just for my personal reference, I think here is the dockerfile for the official logstash image: https://github.com/elastic/logstash/blob/master/docker/templates/Dockerfile.j2

Hi, I'd be down to take a look at a PR.  Sorry for the massive delay in my response.  I prefer staying as close to the official images as possible and just being an alpine drop in if possible.


(WIP) Left right switch

Changing convention of motors in the link to be from left to right sequentially

please merge with
https://github.com/berkeleyopenarms/blue_configs/pull/1


Nav Icon update needed for ESC

In the move Nav launch to Pulumi Hugo, the shied gliph is missing. The css class for the shield seems to be missing from the source code; there's no definition for it.
In the near term I used an existing one on this temp fix https://github.com/pulumi/pulumi-hugo/pull/3454

This seems to be fixed now, and we've moved to a key icon for this product:


protobuf version select support needed

Is there a better way to select protobuf version?  Every package it depends should have an option to select from a specific one. Using the system-wide package by default is always not feasible in a complicated project.

The path to search protobuf can be specified actually, it's restricted to the system one.


Disable telemetry in harden-runner

There was a quite a bit of workflows here, so I created a PR. Will merge now.


Disable debug default

Closes: #266
This logging is overly verbose, disable it by default.
Add a demo debug category to default graph config.
Also include a commit to have k8s actually use bitcoind options from the graph (doh!). We now indirectly test this by having debug logging disabled and requiring debug=validation to come from a test graph.
Finally add some logging to the k8s backend so we can see what's going on better

@willcl-ark this may have broken the rpc test?

Nice! Looks good.


New terms and definition

[ ] Fabrication (previously SampleComponentFabrication):
The production of a Precursor in controlled conditions performed by a commercial enterprise, one or more Research Users or a third party. Fabrication may require the use of Equipment, Consumable(s) and Instrument(s). A Measurement may also be performed during the Fabrication, e.g., to characterize the intermediate and/or final resulting Precursor(s).

[ ] Precursor (previously SampleComponent):
Identifiable entity (typically a piece of material) with distinctive properties (structural, chemical, dimensional, functional and others), which is fabricated during the Fabrication and is used during the Sample Preparation to produce a Sample. It may include one or more substrates, layers, masks, evaporation materials, coatings, and molecules. A single Precursor might itself become the only SampleComponent of a Sample in case it undergoes Measurement. E.g. Precursor1 is ethylene and Precursor2 is a Ni substrate. Ethylene reacts with Ni substrate converting into graphene (SampleComponent1). The result of Sample Preparation is a Sample composed of a graphene layer (SampleComponent1) and the same Ni substrate (SampleComponent2).

[ ] SampleComponent (redefinition):
Identifiable entity (typically a piece of material) which constitutes a part of a Sample, usually with distinctive properties (structural, chemical, dimensional, functional and others).

[ ] Sample (redefinition):
Identifiable entity (typically a piece of material) with distinctive properties (structural, chemical, dimensional, functional and others), composed by one or more Sample Components, exposed to the Instrument during a Measurement, typically after a Sample Preparation. Sample may be held by a Sample Holder and/or carried by a Sample Carrier during the Measurement. Sample may also stand for a model, configuration or input (or any combination of them) of a Computation.

[ ] Sample Preparation (redefinition):
Identifiable and reproducible set of actions (physical changes or chemical reactions) typically carried out by one or more Research Users to produce one or more Samples and/or to make the Sample(s) fit to perform a Measurement. The actions may be performed on (or between) one or more Precursors or Sample(s). Sample Preparation may require the use of Equipment, Consumable(s) and Instrument(s). A Measurement may also be performed during the Sample Preparation, e.g., to characterize the intermediate stages and/or the final resulting Sample(s).

[ ] Consumables (new term):
Complementary entity used in Fabrication or Sample Preparation or Measurement which has a limited time capacity or is limited  in its number of uses before it is disposed of, necessary to the process itself and normally bought from third party manufacturers.  Eg:- gloves, syringes, wipes, etching solutions, glass slides, spatulas, weighing paper, two-sided tape etc.

[ ] Equipment (redefinition):
Any kind of item, device, machine or other tool (also virtual) used by one or more  Research Users to perform one or more Fabrication, Sample Preparations and/or Measurements. Usually, the Equipment is located in a Laboratory hosted by an Institution and is usually an investment. According to this definition, an Instrument is a particular type of Equipment.

solved #61


An MPS (approximate) simulator

This is based on this algo:
https://arxiv.org/abs/2002.07730

Hello,
I read more of the paper, and I think I understand how to do the 2D version (famous last words).
In the meantime, is there any comment on this PR? It would be nice to have some feedback on 1D before I attempted 2D.

Hello,
I read more of the paper, and I think I understand how to do the 2D version (famous last words).
In the meantime, is there any comment on this PR? It would be nice to have some feedback on 1D before I attempted 2D.

Thanks. PTAL.

Thanks. PTAL.

@tonybruguier I'm ready to merge this PR if you're happy with it - let me know.

@tonybruguier I'm ready to merge this PR if you're happy with it - let me know.

Yes, please merge if you think it's fine to do so. Thank you for your help!

Yes, please merge if you think it's fine to do so. Thank you for your help!

Thanks Orion for the ping! I still haven't had time to look closely but will offer a few cursory comments if they're useful.
I think the simulator threshold is set internally at 1e-3? If so, it could be good to let this value be a simulator option, e.g. MPSSimulator(threshold=...). This allows for exact simulation (threshold = 0 <==> keep all singular values) in addition to "noisy" simulation (threshold > 0 <==> small singular values are thrown away).
I'm not sure in which order gates are applied, but it could be good to sweep from left to right (or right to left) to keep some canonicalization. This may not be necessary at present but certain operations are faster with canonical MPS.
Also not relevant now but maybe to future proof: this should support the "SimulatesExpectationValues" protocol when that is finalized since MPS are great for computing expectation values.

Thanks Orion for the ping! I still haven't had time to look closely but will offer a few cursory comments if they're useful.
I think the simulator threshold is set internally at 1e-3? If so, it could be good to let this value be a simulator option, e.g. MPSSimulator(threshold=...). This allows for exact simulation (threshold = 0 <==> keep all singular values) in addition to "noisy" simulation (threshold > 0 <==> small singular values are thrown away).
I'm not sure in which order gates are applied, but it could be good to sweep from left to right (or right to left) to keep some canonicalization. This may not be necessary at present but certain operations are faster with canonical MPS.
Also not relevant now but maybe to future proof: this should support the "SimulatesExpectationValues" protocol when that is finalized since MPS are great for computing expectation values.


Update readme.md

updated the install command

can we disable this PR and approve the previous one ? it has more changes , and moves away from curl , and uses Wget.


RDS Migrations: DynamicFileMigrationProvider attempts to copy migration scripts to separate read-only folder

Attempting to run migrations on a non-local stack causes the following error because it tries to copy the migrations to another folder before running.
[Error: EROFS: read-only file system, copyfile '/var/task/sst_rds_migration_scripts/migration.2022-03-10.js' -> '/var/task/sst_rds_migration_scripts/migration.2022-03-10.js1646949820654.js'] {
  errno: -30,
  code: 'EROFS',
  syscall: 'copyfile',
  path: '/var/task/sst_rds_migration_scripts/migration.2022-03-10.js',
  dest: '/var/task/sst_rds_migration_scripts/migration.2022-03-10.js1646949820654.js'
}

This bug is fixed with the additional commits in #1511

I actually fixed this in #1508


Why the ServerAcceptor.java used accept() instead of selector?

It only makes sense to use a Selector if you need to manage more than one socket. The ServerAcceptor only manages a single ServerSocket, so using a Selector is unnecessary.

I have read all your tutorials about NIO. It is really really good and benefits me a lot. Looking forward to reading your new articles.

Thanks :-)


⚠ Bofrost.de has degraded performance

In 55b2419, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1874 ms

Resolved: Bofrost.de performance has improved in 4bfa986 after 13 minutes.


fix secondary button behaving as type submit

related to #2181
In Form.jsx we do validation checks and show toast in case there're errors. At the same time we let semantic-ui Form handle  these errors and render them inside the Form itself. Can we just rely on one of the two? or move the validation errors on bottom and remove the toast completely. what do you think @sneridagh @giuliaghisini ?

i think toast is super usefull if you have many tabs in your form on submit, and fields with errors are  not in current tab.. i'm not fully agree to remove the toast notification

totally agree with @giuliaghisini ... the toasts display other kind of errors too... I do not think it's redundant.

Thanks @giuliaghisini for the comments. I identified the real issue and modified PR accordingly.

Cannot reproduce anymore.


An error occurred while installing aws-sigv4 (1.0.2), and Bundler cannot continue

Cookbook version
cookbook 'aws', '~> 7.2.1'
Chef-client version
[2017-10-30T23:47:09+00:00] INFO: *** Chef 12.19.36 ***
Platform Details
Cloud Provider - AWS
31-Oct-2017 10:47:08 | DISTRIB_ID=Ubuntu
31-Oct-2017 10:47:08 | DISTRIB_RELEASE=14.04
31-Oct-2017 10:47:08 | DISTRIB_CODENAME=trusty
31-Oct-2017 10:47:08 | DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
31-Oct-2017 10:47:08 | NAME="Ubuntu"
31-Oct-2017 10:47:08 | VERSION="14.04.4 LTS, Trusty Tahr"
31-Oct-2017 10:47:08 | ID=ubuntu
31-Oct-2017 10:47:08 | ID_LIKE=debian
31-Oct-2017 10:47:08 | PRETTY_NAME="Ubuntu 14.04.4 LTS"
31-Oct-2017 10:47:08 | VERSION_ID="14.04"
Scenario:
Use cookbook version 7.2.1 so I can make use of the named_iam_capability option to the cloudformation_stack resource. This is so  Ican assign an IAM role to my instances that get launched.
Expected Result:
My recipes can use the latest cookbook and I can assign an IAM role to the instances it creates.
Actual Result:
[What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.]

31-Oct-2017 10:47:14
[2017-10-30T23:47:14+00:00] ERROR: Running exception handlers

31-Oct-2017 10:47:14
[2017-10-30T23:47:14+00:00] ERROR: Exception handlers complete

31-Oct-2017 10:47:14
[2017-10-30T23:47:14+00:00] FATAL: Stacktrace dumped to /home/bamboo/.chef/cache/chef-stacktrace.out

31-Oct-2017 10:47:14
[2017-10-30T23:47:14+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report

31-Oct-2017 10:47:14
[2017-10-30T23:47:14+00:00] ERROR: Expected process to exit with [0], but received '5'

31-Oct-2017 10:47:14
---- Begin output of bundle install ----

31-Oct-2017 10:47:14
STDOUT: Fetching gem metadata from https://rubygems.org/

31-Oct-2017 10:47:14
Fetching version metadata from https://rubygems.org/

31-Oct-2017 10:47:14
Resolving dependencies...

31-Oct-2017 10:47:14

31-Oct-2017 10:47:14
Bundler::GemspecError: Could not read gem at /opt/chefdk/embedded/lib/ruby/gems/2.3.0/cache/aws-sigv4-1.0.2.gem. It may be corrupted.

31-Oct-2017 10:47:14
Using jmespath 1.3.1

31-Oct-2017 10:47:14
Using bundler 1.12.5

31-Oct-2017 10:47:14
An error occurred while installing aws-sigv4 (1.0.2), and Bundler cannot

31-Oct-2017 10:47:14
continue.

31-Oct-2017 10:47:14
Make sure that gem install aws-sigv4 -v '1.0.2' succeeds before bundling.

31-Oct-2017 10:47:14
STDERR: sudo: no tty present and no askpass program specified

31-Oct-2017 10:47:14
sudo: no tty present and no askpass program specified

31-Oct-2017 10:47:14
---- End output of bundle install ----

31-Oct-2017 10:47:14
Ran bundle install returned 5

31-Oct-2017 10:47:14
[2017-10-30T23:47:14+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

This should be fixed now that we allow the v3 gems.


The frame of gif image is error

I use local gif image in my app,but it show the speed is not the same.The original frame is normal,but
slower on App.

@FKLam please reopen when you have filled the issue template info. We cannot work with issues described like this.


bindings snippets

Hi,
It is possible to implement a snippet for the bindings?.
Thx and regards.

hi @pasblin. Thanks for your issue. I will be implementing what you ask for.

Thx ! 👍


stripResponseExamples CLI option

Added stripResponseExamples CLI option

@nicklloyd any suggestion how & where to test this?

Linked to #179

Shit now that I see the code, think it does belong in globals :/

I understand if you don't want to move now that you've implemented, just your initial thinking was correct

I'll move it into globals and make it a function.
It is a simple lift & shift + test


Docker Images section not working if image ID downloaded twice

Sometimes two different docker repository addresses refer to the same image id.

Hence if you pull both images and end up having one image id twice, then the Explorer section "Docker Images" does not display anything.

When I try to refresh the section, the following error is thrown:

Element with id <image_id> is already registered

I still get this as well

Anyone?

Can confirm this.
$ docker ps
  ...
  httpd                              2.4                 1132a4fc88fa   3 weeks ago    143MB
  httpd                              latest              1132a4fc88fa   3 weeks ago    143MB
  ...

Error message:
Element with id 1132a4fc88fa is already registered

Can also confirm this.
$ docker images
...
hyperledger/fabric-ca          1.4                           152b9082adf6   17 months ago   158MB
hyperledger/fabric-ca          1.4.8                         152b9082adf6   17 months ago   158MB
hyperledger/fabric-ca          latest                        152b9082adf6   17 months ago   158MB
....

Element with id 152b9082adf6 is already registered


Portable Storage Interface with hopper underneath gets stuck in extraction mode

Describe the Bug
When you put a hopper underneath a Portable Storage Interface, when a wind mill that is being used for a tree farm and so rotating. When they connect, it will extract the items that the farm has collected but even when there is no items it will stay trying to extract items
Reproduction Steps
I'm terrible at describing so just see the video demonstrating how to reproduce it
Expected Result
For it to extract the items then once done the farm would go on about its business
Screenshots and Videos
https://youtu.be/1hP9unn2hv4
Crash Report or Log
No response
Operating System
Windows 10
Mod Version
0.5.0i
Minecraft Version
1.18.2
Other Mods
No response
Additional Context
No response

This is only an issue on 1.18 with hoppers, and would be very difficult to fix. Either update or use a chute.


unable to install atom-beautify

Description failed
npm ERR! Unexpected end of JSON input while parsing near '...tor-keys":"^1.0.0","e'
npm ERR!      C:\Users\praveen.atom.apm_logs\2020-08-06T18_30_19_438Z-debug.log
The results of beautification are not what I expect.
Input Before Beautification
This is what the code looked like before:
<INSERT CODE HERE>

Expected Output
The beautified code should have looked like this:
<INSERT CODE HERE>

Actual Output
The beautified code actually looked like this:
<INSERT CODE HERE>

Steps to Reproduce

Add code to Atom editor
Run command Atom Beautify: Beautify Editor
This beautified code does not look right!

Debug
Here is a link to the debug.md Gist:
Checklist
I have:

[ ] Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
[ ] Reloaded (or restarted) Atom to ensure it is not a caching issue
[ ] Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
so I know this is not a duplicate issue
[ ] Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
[ ] Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue

unable to install atom-beautify


Update benchmark

The benchmark is pretty outdated now (from 0.6 and probably with an old Erlang version). Also, it only shows a single node deployment. If someone really had 1 million clients he surely had a cluster of at least 2 nodes, so that should be the benchmark setup IMHO. I assume that this will affect performance quite significantly. And if not, even better :)

okay, will plan a thoroughly benchmark with 0.10.0 release:)

move to 0.11.0

@Hades32, done in 0.12.0 release: https://github.com/emqtt/emqttd/wiki/benchmark-for-0.12.0-release


SVG Icons: Evaluate possibility for further shrinking

We're currently even already using ImageOptim for optimizations, but we might have either forgotten to do it in the meantime, or might need further optimizations like e.g. through tools like https://jakearchibald.github.io/svgomg/

svgomg is an amazing tool, but we might stick with ImageOptim for the moment as this even also provides batch optimization.


Make this tool work with EFCore 3.1?

I have an application which uses .Net Framework 4.8 and .net Standard 2.0. For those reasons I cannot use EFCore 5.
Would this project work with EFCore 3.1 (the highest version I can use). Or are there too many reliances on the API for EFCore 5?

Hi,
This library is using some EF Core 5 internal API, and i am afraid that it is not available in EF Core 3.1.


Truncated column text in Analyze

Just started this app. The Analyze screen shows two columns - apparently the first is the policy and the second is whether configured or not. For whatever reason both of these columns are too short so the full text of the policy and configured message is not visible. I can't find a column size setting or slider.
https://i.imgur.com/AqU8G2p.png

Looks like you set DPI Scaling to 200%, right?

Correct. 17" laptop with 3840x2160 res.

Whoops. Didn't mean to close....

:ok_hand: can confirm. I'll look for a fix in next releases.

Yep, same thing for me with a 200% DPI

Please check build https://github.com/mirinsoft/spydish/releases/tag/0.13.1

Thanks! Looks good.


Sending Project to review from completed, displays validation error.

Describe the bug
System throws an error when user tries to send project to review stage with putting some comments in status note.
Screenshots

coming on 2019-07-19


premis:hasOriginalName triple is missing in Fedora 4.3

To reproduce:
curl -i -X POST --data-binary<EMAIL_ADDRESS>-H "Content-Disposition: attachment; filename=\"picture.jpg\"" "http://localhost:8080/fedora/rest"

Response is 201 Created and everything appears normal except the premis:hasOriginalName triple is missing from the resulting binary's fcr:metadata.
The triple is present in Fedora 4.2. (Both are instances are using the downloaded WAR files.)

Correct, see: https://jira.duraspace.org/browse/FCREPO-1532

The 4.3 REST API documentation still speaks of the premis:hasOriginalName property.
Also, the release notes say that filename is one property which "no longer uses the Fedora namespace," but are not really clear about what this means, e.g. that premis:hasOriginalName has changed to ebucore:filename.

Thanks for the documentation help:
https://wiki.duraspace.org/pages/diffpagesbyversion.action?pageId=69830783&selectedPageVersions=1&selectedPageVersions=2


DO_NOT_MERGE: Ongoing effort of refactoring gradlew to fix code quality issues

Request
Would you be willing to provide an abstract to why are the components in that file written this way so that i could make a documentation and refactor accordingly? See comments

Hey @Kreyren - you might get a better response on our Slack or forums.   Some of your questions may be best answered by changing the script with what you think is the better solution and seeing what works/breaks.  Thanks!


Cache in expr (#4)

Implement caching of expressions. checkout the perf number update in file managerDispatchBenchmark_test.go
NOTE:
QUESTION : The cache created during the validation code is different than the one that will be used during runtime, this is because validation code constructs a  new object of CEXL. As a result, the first call to eval (during runtime) will be a cache miss since it will not use the cache built during the validation time. If this was not intentional, I can go ahead and use the same expr.Validator object that was passed along duing the server construction so that runtime and validation time will use the same cache. Let me know.
Currently the expressions are not normalized before caching. I discussed this with Mandar and to do it correctly it will require some additional code change that will be scattered across multiple files which can risky for alpha. I have added a TODO and will continue working on it and submit after alpha release. Reasonable ?

This change is

Jenkins job mixer/presubmit passed

Jenkins job mixer/e2e-smoketest passed

Jenkins job mixer/manager-regression passed

Out of scope for this PR, but are we also interested in an attribute-value keyed cache of expression evaluation results? A substantial number of attributes won't change request to request, which means we don't even need to enter an evaluation context (cross over into a VM/interpreter) if an expression only uses those attributes.

Jenkins job mixer/presubmit passed

Jenkins job mixer/manager-regression passed

Jenkins job mixer/presubmit passed

Jenkins job mixer/e2e-smoketest passed

Jenkins job mixer/manager-regression passed

Jenkins job mixer/presubmit passed

Jenkins job mixer/presubmit passed

Jenkins job mixer/e2e-smoketest passed

Jenkins job mixer/manager-regression passed

Friendly ping @geeknoid @mandarjog @ZackButcher @douglas-reid

Jenkins job mixer/presubmit passed

Jenkins job mixer/manager-regression passed

Jenkins job mixer/manager-regression passed

jenkins rebuild mixer/e2e-smoketest

Jenkins job mixer/e2e-smoketest passed


Installation on Alpine Linux failed

Version:
v1.18.4+k3s1
K3s arguments:
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.18.4+k3s1 sh -s - server --token p147f0rm
Describe the bug
The installation of k3s (as master) on Alpine Linux failed, because the service cloud not be started.
Note, that the above curl command works for Debian Linux.
To Reproduce
Get a clean Alpine VM (e.g. Virtual boxes roboxes/alpine39 and generic/alpine39) and execute the above curl command.
Expected behavior
The service is started successfully.
Actual behavior
The service failed to start because of an invalid value of  respawn-max in the init script.
Workaround
Modify content of init script so that the value of respawn-max is 1.
Additional context / logs
Console output:

[INFO]  openrc: Starting k3s

Caching service dependencies ...  [ ok ]
Mounting cgroup filesystem ...    [ ok ]
Starting k3s ...
failed to start k3s [ !! ]
ERROR: k3s failed to start

/var/log/messages:

Jun 29 08:33:04 alpine39 authpriv.notice sudo:  vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/etc/init.d/k3s restart
Jun 29 08:33:04 alpine39 daemon.err /etc/init.d/k3s[2665]: Invalid respawn-max value '0'
Jun 29 08:33:04 alpine39 daemon.err /etc/init.d/k3s[2450]: ERROR: k3s failed to start

@MarkusAGSchmidt From the logs respawn-max  flag seems to be invalid. Could you update it to respawn_max and and see if it fixes the issue?
I tried installing k3s version v1.18.4+k3s1 and v1.18.6+k3s1 successfully without workarounds.
alpine:~# cat /etc/alpine-release
3.12.0
alpine:~# k3s -v
k3s version v1.18.4+k3s1 (97b7a0e9)
alpine:~# kubectl get nodes
NAME     STATUS   ROLES    AGE     VERSION
alpine   Ready    master   2m36s   v1.18.4+k3s1
alpine:~# kubectl get pods -A
NAMESPACE     NAME                                     READY   STATUS      RESTARTS   AGE
kube-system   local-path-provisioner-6d59f47c7-p8mn9   1/1     Running     0          2m30s
kube-system   metrics-server-7566d596c8-686fh          1/1     Running     0          2m30s
kube-system   helm-install-traefik-jdhb4               0/1     Completed   0          2m30s
kube-system   svclb-traefik-4mgcc                      2/2     Running     0          2m12s
kube-system   coredns-8655855d6-z66zg                  1/1     Running     0          2m30s
kube-system   traefik-758cd5fc85-cttvw                 1/1     Running     0          2m12s
alpine:~# cat /etc/init.d/k3s
#!/sbin/openrc-run

depend() {
    after network-online
    want cgroups
}

start_pre() {
    rm -f /tmp/k3s.*
}

supervisor=supervise-daemon
name=k3s
command="/usr/local/bin/k3s"
command_args="server \
    >>/var/log/k3s.log 2>&1"

output_log=/var/log/k3s.log
error_log=/var/log/k3s.log

pidfile="/var/run/k3s.pid"
respawn_delay=5
respawn_max=0

set -o allexport
if [ -f /etc/environment ]; then source /etc/environment; fi
if [ -f /etc/rancher/k3s/k3s.env ]; then source /etc/rancher/k3s/k3s.env; fi
set +o allexport

This appears to be a bug in Alpine see respawn_max in the openrc docs:
https://github.com/OpenRC/openrc/blob/master/supervise-daemon-guide.md#variable-settings

You might also try a newer release of Alpine, 3.9 is only a couple months out from end-of-life: https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases

OpenRC added support for setting this to 0 about 16 months ago: https://github.com/OpenRC/openrc/commit/54780a45826f789f1291742eb2c99be369bfe64c

As @brandond mentioned we see this issue in older version of Alpine
cat /etc/alpine-release
3.9.6

Logs:
Jul 21 06:39:01 alpine39 daemon.err /etc/init.d/k3s[2200]: Invalid respawn-max value '0'
Jul 21 06:39:01 alpine39 daemon.err /etc/init.d/k3s[2180]: ERROR: k3s failed to start

Closing the issue as it is narrowed down to old Alpine version. @MarkusAGSchmidt  please feel free to reopen if you have any concerns. Thanks.


toggle sidebar button unclickable due to OS taskbar behaviour

With a hiding taskbar it's a bit difficult to press the collapse sidebar button, because it's hidden.
(Arguably this is a windows and macos issue... but it happens, and annoys me when using headlamp often)
Perhaps we could avoid putting controls at the bottom to work around the issue?
Here's a screen shot of what is seen at the bottom of the headlamp window.
(note the collapse sidebar button and kubernetes version buttons are not there)

For me collapsable button was visible but version info was absent. Working on this

Tested it on Mac, it is visible now in the latest version. Can you please confirm if you able to reproduce it again?

It's still a problem on windows. (didn't try on mac)

How are you running headlamp? This is what I see when testing on Windows:


OSS .desktop file is named "undefined.desktop"

Fixed via https://github.com/Microsoft/vscode/commit/61f5dc66974300dc4a665de1c90f6cd7d68df1d5


nuxt build error in 1.5.0

Hello everyone.
There is a build error in version 1.5.0.
It does not occur when downgrading to 1.4.0.
> nuxt-ts build

 FATAL  Cannot convert undefined or null to object                                                                                13:14:00

  at Function.keys (<anonymous>)
  at getKeys (node_modules/deepmerge/dist/cjs.js:61:16)
  at mergeObject (node_modules/deepmerge/dist/cjs.js:86:2)
  at deepmerge (node_modules/deepmerge/dist/cjs.js:117:10)
  at ModuleContainer.module (node_modules/nuxt-logrocket/lib/module.js:5:19)
  at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:235:34)
  at node_modules/@nuxt/utils/dist/utils.js:1846:43
  at ModuleContainer.ready (node_modules/@nuxt/core/dist/core.js:55:5)
  at Nuxt._init (node_modules/@nuxt/core/dist/core.js:715:5)

   ╭───────────────────────────────────────────────────────────╮
   │                                                           │
   │   ✖ Nuxt Fatal Error                                      │
   │                                                           │
   │   TypeError: Cannot convert undefined or null to object   │
   │                                                           │
   ╰───────────────────────────────────────────────────────────╯

Do you know how to deal with it?

@masayuki0220 Can you please provide a code sandbox or example?

@masayuki0220 I think I found a way to recreate the problem. You're not providing the logRocket config in your nuxt.config.js file. I added a condition to check its presence.
This should be resolved in v1.5.2.
Please re-open if the issue exists.

Thank you very much for your support!


Fix failling test

Now I understand why tests are falling on mac (on mine linux distro too!)
We have added fuzzy search that can matches by each char in string but asserts are for contains
In other words on my machine I can search process with name "test" but what I got is not process that contains "test" as substring but a sum of those chars -> "at-spi2-registr" is matched because "aT-spi2-rEgiSTr" is present in name.

@grouzen I have fund the issue ;)

God damn, nice catch, indeed!


Form Source as attachment

ability to upload a file as the form source

https://github.com/modilabs/formhub/pull/155


No module named 'pycocotools._mask'

Hi, while running the test script ./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc_0712 res101 i get the following error
Traceback (most recent call last):
File "./tools/test_net.py", line 13, in
from datasets.factory import get_imdb
File "/media/kist-iit2/421e12ca-0f68-44d8-8b26-dd6fd0619902/kist-iit2/Codes/Tensorflow/Faster_RCNN/tf-faster-rcnn/tools/../lib/datasets/factory.py", line 15, in
from datasets.coco import coco
File "/media/kist-iit2/421e12ca-0f68-44d8-8b26-dd6fd0619902/kist-iit2/Codes/Tensorflow/Faster_RCNN/tf-faster-rcnn/tools/../lib/datasets/coco.py", line 23, in
from pycocotools.coco import COCO
File "/media/kist-iit2/421e12ca-0f68-44d8-8b26-dd6fd0619902/kist-iit2/Codes/Tensorflow/Faster_RCNN/tf-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/coco.py", line 55, in
from . import mask as maskUtils
File "/media/kist-iit2/421e12ca-0f68-44d8-8b26-dd6fd0619902/kist-iit2/Codes/Tensorflow/Faster_RCNN/tf-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/mask.py", line 5, in
import pycocotools._mask as _mask
ImportError: No module named 'pycocotools._mask'
Command exited with non-zero status 1
0.35user 0.24system 0:00.36elapsed 166%CPU (0avgtext+0avgdata 133356maxresident)k
0inputs+40outputs (0major+23441minor)pagefaults 0swaps
It seems i am unable to import cython module _mask.pyx but i have cython 0.25.2 installed.
On adding
import pyximport
pyximport.install()
at the start of mask.py I am able to import _mask.pyx module but then i am getting the following error.
/usr/include/python3.5m/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
/home/kist-iit2/.pyxbld/temp.linux-x86_64-3.5/pyrex/pycocotools/_mask.c:437:21: fatal error: maskApi.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/pyximport/pyximport.py", line 216, in load_module
inplace=build_inplace, language_level=language_level)
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/pyximport/pyximport.py", line 192, in build_module
reload_support=pyxargs.reload_support)
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/Cython/Distutils/old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/Cython/Distutils/old_build_ext.py", line 193, in build_extensions
self.build_extension(ext)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension
depends=ext.depends)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./tools/test_net.py", line 13, in
from datasets.factory import get_imdb
File "/media/kist-iit2/421e12ca-0f68-44d8-8b26-dd6fd0619902/kist-iit2/Codes/Tensorflow/Faster_RCNN/tf-faster-rcnn/tools/../lib/datasets/factory.py", line 15, in
from datasets.coco import coco
File "/media/kist-iit2/421e12ca-0f68-44d8-8b26-dd6fd0619902/kist-iit2/Codes/Tensorflow/Faster_RCNN/tf-faster-rcnn/tools/../lib/datasets/coco.py", line 23, in
from pycocotools.coco import COCO
File "/media/kist-iit2/421e12ca-0f68-44d8-8b26-dd6fd0619902/kist-iit2/Codes/Tensorflow/Faster_RCNN/tf-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/coco.py", line 55, in
from . import mask as maskUtils
File "/media/kist-iit2/421e12ca-0f68-44d8-8b26-dd6fd0619902/kist-iit2/Codes/Tensorflow/Faster_RCNN/tf-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/mask.py", line 5, in
import pycocotools._mask as _mask
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/pyximport/pyximport.py", line 445, in load_module
language_level=self.language_level)
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/pyximport/pyximport.py", line 232, in load_module
raise exc.with_traceback(tb)
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/pyximport/pyximport.py", line 216, in load_module
inplace=build_inplace, language_level=language_level)
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/pyximport/pyximport.py", line 192, in build_module
reload_support=pyxargs.reload_support)
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/Cython/Distutils/old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/home/kist-iit2/.virtualenvs/cv/lib/python3.5/site-packages/Cython/Distutils/old_build_ext.py", line 193, in build_extensions
self.build_extension(ext)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension
depends=ext.depends)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
ImportError: Building module pycocotools._mask failed: ["distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n"]
Command exited with non-zero status 1
0.53user 0.40system 0:00.52elapsed 181%CPU (0avgtext+0avgdata 134828maxresident)k
0inputs+48outputs (0major+36427minor)pagefaults 0swaps
Can anyone please let me know the problem. I am unable to find a way to fix it.
Thanks you.

you need to get the coco lib.

Hi, Sorry for replying late. I have installed coco lib following the steps given in readme page, but still i get am getting this error. Can you please help me out with it.

I think you need to run the command 'make' at the directory PythonAPI of coco if you use python.


AP-1966 Update date and time checks to consider time zones

AP-1966 Update date and time checks to consider time zones
Link to story
Use the rubocop-rails timezone https://www.rubydoc.info/gems/rubocop/0.57.2/RuboCop/Cop/Rails/TimeZone
and fix Time.now to Time.current or Time.zone.now which protects the application from BST/GMT changes
Checklist
Before you ask people to review this PR:

[x] Tests and rubocop should be passing: bundle exec rake
[x] Github should not be reporting conflicts; you should have recently run git rebase master.
[x] There should be no unnecessary whitespace changes. These make diffs harder to read and conflicts more likely.
[x] The PR description should say what you changed and why, with a link to the JIRA story.
[x] You should have looked at the diff against master and ensured that nothing unexpected is included in your changes.
[x] You should have checked that the commit messages say why the change was made.

Seems there are still a few places where Time. and Date. are not using the better standard. Might be worth going through the application and making sure they are all addressed so everything's as consistent as it can be 🙂

Seems there are still a few places where Time. and Date. are not using the better standard. Might be worth going through the application and making sure they are all addressed so everything's as consistent as it can be 🙂


search-Based Message Extension not returning Adaptive Card

Hi guys, I have an issue with the search-based Message Extension.
When I debug locally, everything works fine. After deploying the messaging extension on Azure and testing it in the Teams app, I can search for specific queries. The Message Extension gives me the desired results, up to here we are good to go. The Problem: After I select one of the delivered search results, the messaging extension does not return the adaptive card. The chat-box in Teams is simply empty.
Anyone familiar with this issue?

Sorry, I cannot reproduce this issue. Can you always reproduce this issue? I guess it may be due to unstable network or Teams client and  you can retry several more times to let it work.


dayjs Time comparison(past/present/future)

Update calendar to current day at the the top
Generate another 6 days after current day
Make use of data-date attribute and store exact date DD/MM/YYYY to use for local Storage

The table is created dynamically.
The current day of the week is on top. and highlighted in Yellow
Both cells ( day of the week and + button are storing the date in DD/MM/YYYY format