nixos/ntfy.sh: use dynamic user + add defaults

Description of changes
Second try at updating this service with additional commands for smooth migration.
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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/)
23.05 Release Notes (or backporting 22.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

[ ] Fits CONTRIBUTING.md.

Note that I'm not sure the chown is going to work, the dynamic user might lack permissions.

@Tom-Hubrecht could you try this and tell us if the migration went correctly ?

The migration is still unsuccessful:
May 29 16:04:24 sd-02 systemd[1]: Starting Push notifications server...
May 29 16:04:24 sd-02 (touch)[164053]: Found pre-existing public StateDirectory= directory /var/lib/ntfy-sh, migrating to /var/lib/private/ntfy-sh.
May 29 16:04:24 sd-02 (touch)[164053]: Apparently, service previously had DynamicUser= turned off, and has now turned it on.
May 29 16:04:24 sd-02 touch[164053]: /nix/store/l6jgwxkc3jhr029vfzfwzcy28iyckwsj-coreutils-9.1/bin/touch: cannot touch '/var/lib/ntfy/user.db': Permission denied
May 29 16:04:24 sd-02 systemd[1]: ntfy-sh.service: Control process exited, code=exited, status=1/FAILURE
May 29 16:04:24 sd-02 systemd[1]: ntfy-sh.service: Failed with result 'exit-code'.
May 29 16:04:24 sd-02 systemd[1]: Failed to start Push notifications server.

It is possible to use DynamicUser while providing a specific user to sytemd's service. Thus, the creation of the required files can be done with systemd.tmpfiles.rules instead of touch and mkdir while setting the correct permissions

The module file at https://git.hubrecht.ovh/hubrecht/nixos/src/branch/master/modules/_ntfy-sh.nix does this

What do you need to pass to the tmp file rules for it to be the dynamic user ?
I tried with just a - in place of the user and the files where owned by root which made the deployment fail.
I couldnt find any docs on using tmp file rules and dynamic user . (thats why in the end i leaned on an execprestart hook since my attempt at tmpfile rules failed )
Happy to change if you know what should be out in place of the user and group of the rule.

I see , thanks for providing an example, ill have a look at changing and testing this on my machine.

@ofborg test ntfy-sh

Alright, I would have liked to not have to define the user at all, but I don't think there is a way to not define the user and provide a smooth migration process.
I've hardcoded the user and group since I can't think of a use case for running this service as another user. What do you both think ?
It's less flexible, but it reduces cognitive load since you have less options to choose from. I'm not married to this decision, but I thought I would propose it.

Alright, I would have liked to not have to define the user at all, but I don't think there is a way to not define the user and provide a smooth migration process.
I've hardcoded the user and group since I can't think of a use case for running this service as another user. What do you both think ? It's less flexible, but it reduces cognitive load since you have less options to choose from. I'm not married to this decision, but I thought I would propose it.

As specifying a user is necessary, I don't really see a point in hardcoding it now when it was configurable before, I don't think that it increases that much the cognitive load for users of this module, the options are few and a default is provided.

@Tom-Hubrecht fair enough.
I've left it configurable. When you have a moment if you can have another look, I think this is ready to merge now.

@Tom-Hubrecht @JulienMalka thanks to both of you for taking the time to review and test this!
Im going to wait 24h more (just in case ) before i merge

@ofborg test ntfy-sh

@ofborg test ntfy-sh

@JulienMalka the test is failing on
ile "/nix/store/pvlfvg0zm1v19qgjvadvzm7h9hm3jzs5-nixos-test-driver-1.1/lib/python3.10/site-packages/test_driver/machine.py", line 706, in wait_for_open_port

I don't think there is anything wrong with this PR though. I've just deployed it to make sure it worked well.
Are you comfortable if we merge or do you want to try something ?

trying a rebase on master just to see if it changes anything.

I don't think there is anything wrong with this PR though. I've just deployed it to make sure it worked well.
Are you comfortable if we merge or do you want to try something ?

Might actually be broken, test output is:
ntfy: if attachment-cache-dir is set, base-url must also be set

Also:
(ntfy) Found pre-existing public StateDirectory= directory /var/lib/ntfy-sh, migrating to /var/lib/private/ntfy-sh.
(ntfy)[916]: Apparently, service previously had DynamicUser= turned off, and has now turned it on.

The warning about DynamicUser being off is fine to ignore IMO, as it's just a warning.
The base-url thing is real. You do have to set it when starting an instance, but I don't think having a default there makes any sense. I'm going to remove the default for attachment cache dir then.

Im going to wait 24h more (just in case ) before i merge

Please do not do this in nixpkgs, wait for someone else to merge it ideally, the previous attempts already broke something, please be mindful of the maintainers of this package and give them enough time to test things if possible.

Hey thanks for chiming in !
I understand that there was breakage on the previous PR, it was fixed in a timely manner though.
This PR wont get merged before everyone has approved it.

@JulienMalka I've changed the test and added back the attachment default (I actually think it's a great feature to have out of the box).
Let me know what you think when you have a moment.

Here we go again

@ofborg test ntfy-sh

Ok lgtm, let's see what @Tom-Hubrecht says :)

LGTM !

@RaitoBezarius @mweinelt the tests, are passing and both of the maintainers have approved, would you be okay to merge ?

@JulienMalka @Tom-Hubrecht sorry again for the misunderstanding and thanks again for your patience through this!


🌱 sharded-test-server: add quiet support to front-proxy

Summary
Make the front proxy in sharded-test-server honor --quiet
Related issue(s)
Fixes #

/lgtm
/approve


Add &OPENMBRTXT as a parameter in Actions

Would be handy for some iSeries commands such as CRTSRVPGM to pick up text of the source member you created the *MODULE from to create the *SRVPGM with since the default for the CRTSRVPGM command is *BLANK.

Thanks,
Howard Adkins

A neat idea for sure. I will see what I can do.
In the mean time, are you passing in TEXT(*MODULE) into CRTSRVPGM?

I am not seeing *MODULE as a valid value for the TEXT parm on CRTSRVPGM.  I am on V7R3 TR5.  Unsure if they added that in later releases.

@Hadkins2 That's unfortunate. I did only check the 7.4 docs and it is there. I will still see about adding it.
https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/cl/crtsrvpgm.htm#CRTSRVPGM.TEXT

No need to expend energy on a feature that is coming from IBM.  My penalty for not having the system more current.


Add libraries support to presets

Just realized this could be useful 😅 .

This is ready to merge!

happy to merge this, but I'd prefer if someone else tested it. I'm not easily able to for the next couple weeks, so if someone could that'd be great. otherwise I will try to soon

Tried testing this and I can't pick directx 8.0 from the list (it always wants to select 5.0):

Any ideas?

This change seems to fix the problem.. because libs is a clone (and so updating scratchlib from libraries isnt much use)
diff --git a/frontend/src/components/compiler/CompilerOpts.tsx b/frontend/src/components/compiler/CompilerOpts.tsx
index 7f70ab4..c4f1d01 100644
--- a/frontend/src/components/compiler/CompilerOpts.tsx
+++ b/frontend/src/components/compiler/CompilerOpts.tsx
@@ -400,7 +400,7 @@ export function LibrariesEditor({ libraries, setLibraries }: {
         // clone the libraries
         const libs = JSON.parse(JSON.stringify(libraries))
         // Check if the library is already enabled, if so return it
-        const scratchlib = libraries.find(scratchlib => scratchlib.name == libName)
+        const scratchlib = libs.find(scratchlib => scratchlib.name == libName)
         if (scratchlib != null) {
             // If it is, set the version
             scratchlib.version = ver

dang it, nice catch! The suggested fix looks correct, pushed it.

Thanks for this, great stuff!


Beta v4

@bryantbiggs
Since this repo is no v5, I assume this means the current stable/v3 module is getting ready to move to v4?
Thanks,

correct - you can see more here https://github.com/terraform-aws-modules/terraform-aws-vpc/pull/838#issuecomment-1422596289
The plan is to make a "soft" breaking change (very little to zero changes required by users) for v4 to unlock a number of features folks have been requesting under the current module structure. And the much larger, more disruptive changes would follow after that in a v5. Trying to ensure users can get to the desired functionality without having to go into a major refactor first

Thanks!


Release 0.4.1

For reference I'll probably actually close this while I realized after initially making this PR that we don't need a new release for the jni-sys crate itself we just want a release of the macros crate that was updated to use syn 2 (ref: https://github.com/jni-rs/jni-sys/pull/36). There's not been any change to the jni-sys crate itself.
I'll just keep the two CI fixes.

I think one of the more impactful changes to release would be https://github.com/jni-rs/jni-rs/pull/513 😶

Hi, as you mentioned can we get a release of jni-sys-macros?
I would really like to see https://github.com/jni-rs/jni-sys/pull/36 end up in a release.


PROV: Add SM2 encoders and decoders, as well as support functionality

The EC KEYMGMT implementation handled SM2 as well, except what's
needed to support decoding: loading functions for both EC and SM2 that
checks for the presence or absence of the SM2 curve the same way as
the EC / SM2 import functions.

This pull request is ready to merge

Merged
58f422f6f481ec7961fe762c97121b53abad3eb4 Fix some odd names in our provider source code
f2db0528d8d7015ba39faca78a16e5e820db9df6 PROV: Add SM2 encoders and decoders, as well as support functionality


serving files from ipfs

Please add support for getting images from ipfs. (schemas ipfs:// and ipns://) It can be done via  https://pkg.go.dev/github.com/ipfs/go-ipfs/core/coreapi

It supports range requests.
I made it via http gateway. https://github.com/imgproxy/imgproxy/commit/6bcb52a9f66ac61738d5d91a025e137bc74a3d3e Doesn't have enough time for investigate how to build over ipfs-go library.


WIP: Go interop_matrix fixes

https://github.com/grpc/grpc/issues/16928

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]

****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]

[trickle] No significant performance differences

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 2,019,751      Total (=)      2,019,751

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
11,154,122      Total (>)     11,154,118

 No significant differences in binary sizes

Corrupt JSON data (indicates timeout or crash):
    bm_call_create.BM_IsolatedFilter_ClientChannelFilter_NoOp_.counters.new: 10
    bm_call_create.BM_IsolatedFilter_ClientChannelFilter_NoOp_.counters.old: 10

[microbenchmarks] No significant performance differences


Early check end of input condition to avoid ArrayIndexOutOfBoundsExceptions

Exceptions are expensive and should only be thrown in an exceptional state. End of input is no exception but should be expected. With the previous code a perfectly valid hostname will produce and process two ArrayIndexOutOfBoundsExceptions at its end, one in HttpParser.isAlpha() and one in HttpParser.isNumeric(), before detecting the end of input.

Thanks for the PR. I applied (rather than merged it) along with a update to the changelog that included crediting you as author.


How to install poseTrackingCPU on Android

OS Platform and Distribution
Android 12
Compiler version
bazel 5.2
Programming Language and version
Java
Installed using virtualenv? pip? Conda?(if python)
No response
MediaPipe version
0.9.1
Bazel version
5.2
XCode and Tulsi versions (if iOS)
No response
Android SDK and NDK versions (if android)
No response
Android AAR (if android)
None
OpenCV version (if running on desktop)
No response
Describe the problem
Hi, I am trying to install PoseTrackingCpu on Samsung Note 10+, but unfortunately, I've never succeeded. I followed https://github.com/google/mediapipe/pull/1773/commits/605afe392c20096f01d311282493798b76da516e
, but it is unsuccessful. Since I am running the apk built by Bazel, I am not sure how to get the LogCat. Could you provide a detailed tutorial about how to run poseTrackingCpu on Android? I appreciate your help!

Complete Logs
N/A

Hello @fchen09 The easiest way to install pose solution would be to use the build_android_examples.sh file. Though it will install other apps as well, but may be you can tweak the script and add an if condition for installing only pose tracking target.


Test the Test-Explorer

Seed node: <IP_ADDRESS>:18331

Installed and started locally

Running two testnet nodes locally, the explorer is connected to one of them. Explorer doesn't show the block contents (there's coinbase transaction):


Function _exit_tree() is not called properly in editor mode

Tested versions
v4.3.stable
System information
Godot v4.3.stable (77dcf97d8) - Windows 10.0.22621 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4070 Ti (NVIDIA; <IP_ADDRESS>94) - 13th Gen Intel(R) Core(TM) i5-13600KF (20 Threads)
Issue description
extends Node2D

func _enter_tree() -> void:
	print("_enter_tree")
	pass

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	print("_ready")
	pass # Replace with function body.

func _exit_tree() -> void:
	print("_exit_tree")
	pass

I expect the print result:
_enter_tree
_ready
_exit_tree

But currently the print result:
_enter_tree
_ready

Steps to reproduce
Run the project in the editor and close the window.
Check the print results.
Minimal reproduction project (MRP)
bugtest.zip

I have no opinion on whether or not _exit_tree should be called in this situation, but if you're trying to capture the event of the window closing you would do:

But I compressed the project into an exe file, and when debugging in the terminal, I can close the window and enter exit_tree() normally, which confused me.

Reproduceable in v4.4.dev.custom_build [c6c464cf9]
Unsure if bug, though. Closing the window isn't really exiting the tree as it is setting fire to the tree. I'll still take a look, though.

Me too.
in editor press stop button, node not call _exit_tree().


RenderFormatTemplate is not a template

In templates.py there is RenderFormatTemplate, RenderAutoFormatTemplate, and RenderTemplatedICL.  In theory I expected these to be templates, but they derive from ABC, not Template.

For instance, trying to add RenderFormatTemplate to a TemplateList in a dataset card gives an error.

Not relevant after refactor.


Issue: Classic flutter issue of insane & needless rebuilds eating resources - Propose: Less rebuilds for situations where NOT using milliseconds value of CustomTimerRemainingTime

Love this package, nice and simple & thank you for producing it. Now, I think something important could be improved.
I'm no Flutter pro engineer, mega computer genius, crazy Stephen Hawking intellectual, but rebuilding a widget a million times per second has always since I started learning Flutter been a serious main issue, concern & my arch nemesis and looks like Flutter's also. However it is also necessary IF one is showing milliseconds as part of their timer. I can understand this aspect of the programming. This uses enormous system resources in debug mode.
So my proposal is to include some sort of boolean value updateForMilliseconds or something which uses state and does not rebuild so much when not necessary when not using milliseconds value from timer. If using milliseconds then use the good old stateful widget and rebuild it quickly so user can see milliseconds passing.
I suppose all timers would have this issue and this is why I think this could be very valuable when some don't need rapid updates.
Showing my performance issue
class OTPTimer extends StatelessWidget {
  final CustomTimerController timeController;

  const OTPTimer({
    required this.timeController,
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return CustomTimer(
        controller: timeController,
        begin: const Duration(minutes: 10),
        end: const Duration(minutes: 0),
        builder: (timeRemaining) {
          return Text(
            "${timeRemaining.hours}:${timeRemaining.minutes}:${timeRemaining.seconds}",
            style: timerStyle(timeRemaining),
          );
        });
  }

  // // Timer time text
  TextStyle timerStyle(CustomTimerRemainingTime timeRemaining) {
    print(int.parse(timeRemaining.secondsWithoutFill));                          // Prints 40-60 times per second (useless in my case)
    // Green indicator text
    if (int.parse(timeRemaining.minutesWithoutFill) > 3) {
      return ThemeEndpoints.infoHeaderPositive();
    }
    // Yellow indicator warning text
    if (int.parse(timeRemaining.minutesWithoutFill) < 3 &&
        int.parse(timeRemaining.minutesWithoutFill) > 1) {
      return ThemeEndpoints.infoHeaderWarning();
    }
    // Red indicator warning text
    return ThemeEndpoints.infoHeaderNegative();
  }

Hi! I recently updated this package fixing some of these issues.
I recommend you read the README to see the new way it works after certain important changes.
Now you can tell the controller the update interval of the timer like this:
late CustomTimerController _controller = CustomTimerController(
  vsync: this,
  begin: Duration(minutes: 10),
  end: Duration(),
  interval: CustomTimerInterval.seconds // 👈 Minutes, seconds, or milliseconds.
);

If you continue to get performance issues please let me know!

To avoid using int.parse you can access the Duration of CustomTimerRemainingTime as follows:
TextStyle timerStyle(CustomTimerRemainingTime remaining) {
  final minutes = remaining.duration.inMinutes.remainder(60);
  if(minutes >= 3) return ThemeEndpoints.infoHeaderPositive(); // Green indicator text
  if(minutes >= 1) return ThemeEndpoints.infoHeaderWarning(); // Yellow indicator warning text
  return ThemeEndpoints.infoHeaderNegative(); // Red indicator warning text
}


Potentially ignored failed message delivery

In KafkaProducerMessageHandler.handleMessageInternal(Message<?> message), the message is fired to Kafka broker with this call:
this.kafkaProducerContext.send(topic, partitionId, messageKey, message.getPayload()); KafkaProducer.send(ProducerRecord<K,V> record)
It returns a Future<RecordMetadata> object, but for some reason the response is ignored. I assume it's because the intention is to assume the request will be successful and let any exception bubble up to the caller later on. However, when I look into the code for KafkaProducer, it actually silently swallow any ApiException and return a FutureFailure object instead of directly throwing exceptions.
I am curious that in this case, without checking the Future response from the KafkaProducerContext, would we run the risk of ignoring an failed message delivery to Kafka broker?

I think you are correct and we definitely should fix that.
From my perspective the fix should look like KafkaIntegrationEvent which is emitted on the Future.get() result (or its Exception) asynchronously, not directly to the caller Thread.
I don't like to block the caller just because the Kafka async nature.
Any other ideas are welcome!
Thank you for pointing that out, @sharpnk, anyway !

The best solution here would be to use a callback. Should add this to the next version.

Is there any way that i can check for exception till fix is available . In our case , we want to store messages in temp location ,if kafka broker is not available and re-try to send ,after some time.

A fix should be available in the master branch early next week.

The Kafka API itself throws no exception, only the callback is available.

Hi Marius ,
Thanks for sharing information . If a fix is available in next week , then it will be quite helpful to us . Is there any issue is available for keeping watch for code commit of this fix  ? Basically i want to use it as soon as it available.

Hi Vikas, I've added this https://jira.spring.io/browse/INTEXT-203 - you can try following that or even this issue.

Added this for supporting notifications on acknowledgment/failure https://github.com/spring-projects/spring-integration-kafka/pull/80

Thanks Marius ,
I am using https://github.com/spring-cloud/spring-cloud-stream/tree/master/spring-cloud-stream-samples/source sample to produce messages , How can i register ProducerListener in this case ?

Fixed with the https://github.com/spring-projects/spring-integration-kafka/commit/325d0b294c825252f5313bd9696229d198b0d38e.
ProducerListener is a part of ProducerConfiguration and can be specified as a ref attribute on the <producer-configuration>.
Closed as a valuable fix.


difference between protocols

Hello,
What is the difference between  EspTouch vs EspTouch V2? Which one should i use and why? Could you please explain this

Hi @mralperem
TL;DR: V2 is more secure than V1.
In V1, data is transmitted in plain mode, so if anyone in network intercept your data (ssid/password), he will be able to read it. In the other hand, EspTouch V2, uses key to encrypt data. When you initialize V2 protocol you need to provide key in format of string. ESP device needs to have the same key in order to decrypt received data.

thank you for your response. When i looked at your code i understand the difference but when i looked at the code for esp8266 provided from espressif system both protocol use the same code and there is no decrypt method. Could you provide a link for the esp8266 code you have used for esp touch v2. I might be looking at the wrong code.

Use esp_smartconfig_set_type function, and set type to SC_TYPE_ESPTOUCH_V2. Then, before calling esp_smartconfig_start function, provide crypt key into smartconfig_start_config_t configuration struct.
Your code for setting SmartConfig to use EspTouchV2 with encryption key should look something like this:
...
esp_smartconfig_set_type(SC_TYPE_ESPTOUCH_V2);

smartconfig_start_config_t start_config = {
  .esp_touch_v2_enable_crypt = true,
  .esp_touch_v2_key = "SecretKeyHere123",
};

esp_smartconfig_start(&start_config);
...

Rest of the code should be the same as in your example.

thank you for the answer. I was able to find understand it. But do you know if does it support esp8266 or only esp32?

You'r welcome. It supports 8266 as well. Here is SmartConfig docs for 8266 RTOS SDK.


Add line numbers in front of tracing result html output

Adds line numbers in front of the output in the html files from tracing.

Nice!


Upgrade to latest Angular

Upgrade the panel project, fix up its directory structure, and re-arrange/simplify the actions, etc.

FYI, at the moment, the dependencies have been upgraded, but the panel is no longer functional. Work continues.

FYI, the project is working as it was before the dependencies were upgraded. The re-arrangement and tidying up is something I still need to do, though.


Difficult to understand if space-cloud has actually started or not

No where in the docs have we mentioned whats the output to expect when space-cloud has started successfully. We should add something in the docs

Maybe we can add some better logs.

Done


Option: No external service

It would be nice if there where an option to select None as service. Copy-short-url then returns the canonical or long url if it could not found a short url.

Oh, that's a nice feature. I can do that. Thank you!

Oh thanks for asking, didn't know it was so popular a request. This does not appear to be hard to add at all :o

I just published version 4.5.1 on Firefox Add-ons, once the update lands, you should be able to select this in the settings!


Where is the definition of contrastive learning loss? I can't find it.

Where is the definition of contrastive learning loss? I can't find it.

Hello @suojinhui , you may find the contrastive learning loss here: https://github.com/Shengcao-Cao/CMT/blob/029cd21d0d77252d1309f87b83c05d1752055e56/CMT_AT/adapteacher/engine/trainer.py#L784

Thank you for your reply!


How to delete pipe?

Hi!
Does anyone know how to detele the pipe object createed by pipeline in the tutorial and free all CUDA memory so I can run other CUDA-related things later in my script?

It can not be deleted now.

When will it be supported? Sometimes, when the memory is fixed, it is really necessary to exchange time for space.

It can not be deleted now.

Thanks for your response! I think it would be a good feature to add a proper destructor.

It's on our working list but with low priority now


[rcore] Fix real touch gestures for PLATFORM_DESKTOP_SDL

Changes

Fixes/finishes implementing real touch gestures support for PLATFORM_DESKTOP_SDL.

Does that by complementing the SDL_FINGERMOTION (R1205-R1210), SDL_FINGERDOWN (R1185-R1191) and SDL_FINGERUP (R1195-R1201) implementations, by making them also set the CORE.Input.Touch.position and CORE.Input.Touch.currentTouchState values.

Also adds a new realTouch bool variable on PollInputEvents() (R999), necessary to differentiate real touch gestures from mouse ones, to pass the correct CORE.Input.Touch.position to the gestureEvent (R1250).

Also sets a SDL hint (SDL_HINT_TOUCH_MOUSE_EVENTS) during InitPlatform() (R1413-R1416) to disable mouse events being interpreted as touch events. This is wanted because there are SDL_FINGER* events available which provide unique data (doc). And, due to the way PollInputEvents() and rgestures.h are currently implemented, setting this won't break SUPPORT_MOUSE_GESTURES.

Optimizes the gesture handling by reusing the touchAction var (R1235) instead of the now redundant gestureUpdate (L999, L1144, L1158, L1181, L1191, L1198, L1206).

Fixes a case where GESTURE_DRAG could trigger a GESTURE_SWIPE* when it ends by adding a touchAction reset on the end of the gesture handling on PollInputEvents() (R1260).

Notes

This change lays the groundwork necessary to allow more complex gesture handling for the platform in the future.

Code example

This change can be tested with the core_input_gestures_web.c example or the core_input_gestures.c example.

Environment

Tested successfully on Linux (Mint 21.1 64-bit) with SDL2 (2.28.4).

Edits

1: added line marks.
2: editing.
3, 4: update changes and line marks.

@ubkp Thank you very much for the improvement!


Enable have a given chain selected on landing to the app

If for example I pass domain/swap?chain=thing
Then it should select the 'thing' chain. If this chain is invalid then default to normal behaviour which is JUNO

Solved by #134

Solved by #134


what's the name of this methode

what's the name of this methode , deep learning ?

You can find more details on the method here: http://blog.dlib.net/2017/02/high-quality-face-recognition-with-deep.html


KOGITO-1605: Amend issues in GitHub documentation

Wrong kogito-imagestream.yaml link
Infinispan link not working
Wrong sentence in Running the Kogito Operator locally
Add requirements for testing e2e

JIRA Link: https://issues.redhat.com/browse/KOGITO-1605
Many thanks for submiting your Pull Request :heart:!
Please make sure that your PR meets the following requirements:

[x] You have read the contributors guide
[x] Pull Request title is properly formatted: [KOGITO-XYZ] Subject
[x] Pull Request contains link to the JIRA issue
[x] Pull Request contains description of the issue
[x] Pull Request does not include fixes for issues other than the main ticket
[ ] Your feature/bug fix has a unit test that verifies it
[ ] You've tested the new feature/bug fix in an actual OpenShift cluster

@Sgitario Can you please select applied steps from the list in https://github.com/kiegroup/kogito-cloud-operator/pull/248#issue-395447057 ?
And also apply missing steps where possible?

@Sgitario please squash your commits before we merge.

Squash done.


Error parsing plex tv library - Malformed UTF-8 characters, possibly incorrectly encoded '}' At position 0.

Hi
When I try to execute the first  command to pull watchstate.. I get the following error. Unable to proceed further.
docker-compose exec watchstate console state:import -vvrm -s plx
[2022-04-22T01:41:59+00:00] logger.INFO: [M: 3.10M] Preloading all mapper data.
[2022-04-22T01:41:59+00:00] logger.INFO: [M: 7.33M] Finished preloading mapper data.
[2022-04-22T01:41:59+00:00] logger.INFO: [M: 7.33M] Single transaction mode
[2022-04-22T01:41:59+00:00] logger.NOTICE: [M: 9.19M] Importing 'plx' play state changes since beginning.
[2022-04-22T01:41:59+00:00] logger.NOTICE: [M: 9.40M] Waiting on (3) HTTP Requests.
[2022-04-22T01:42:00+00:00] logger.INFO: [M: 9.69M] Parsing Successful plx - (Movies) - (movie:3) response.
[2022-04-22T01:42:01+00:00] logger.INFO: [M: 11.20M] Finished Parsing plx - (Movies) - (movie:3) (1011 objects) response.
[2022-04-22T01:42:01+00:00] logger.INFO: [M: 11.19M] Parsing Successful plx - (Movies 4K) - (movie:2) response.
[2022-04-22T01:42:01+00:00] logger.INFO: [M: 11.21M] Finished Parsing plx - (Movies 4K) - (movie:2) (7 objects) response.
[2022-04-22T01:42:03+00:00] logger.INFO: [M: 11.23M] Parsing Successful plx - (TV Shows) - (episode:4) response.

In Parser.php line 368:

  [JsonMachine\Exception\SyntaxErrorException]
  Malformed UTF-8 characters, possibly incorrectly encoded '}' At position 0.

Exception trace:
  at /app/vendor/halaxa/json-machine/src/Parser.php:368
 JsonMachine\Parser->error() at /app/vendor/halaxa/json-machine/src/Parser.php:220
 JsonMachine\Parser->getIterator() at /app/src/Libs/Servers/PlexServer.php:631
 App\Libs\Servers\PlexServer->App\Libs\Servers\{closure}() at /app/src/Commands/State/ImportCommand.php:252
 App\Commands\State\ImportCommand->process() at /app/src/Commands/State/ImportCommand.php:96
 App\Commands\State\ImportCommand->App\Commands\State\{closure}() at /app/src/Command.php:84
 App\Command->single() at /app/src/Commands/State/ImportCommand.php:96
 App\Commands\State\ImportCommand->runCommand() at /app/src/Command.php:22
 App\Command->execute() at /app/vendor/symfony/console/Command/Command.php:291
 Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:989
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /app/src/Libs/Initializer.php:117
 App\Libs\Initializer->runConsole() at /app/console:66

state:import [-r|--redirect-logger] [-m|--memory-usage] [-f|--force-full] [--proxy PROXY] [--no-proxy NO-PROXY] [--timeout TIMEOUT] [-s|--servers-filter [SERVERS-FILTER]] [--import-unwatched] [--stats-show] [--stats-filter [STATS-FILTER]] [--mapper-direct] [-c|--config CONFIG]

Hmm, it seems to be able to parse your movies libraries fine and choke on your tv library, is your frontend server for plex doing compression? could you try running the following commands and then try to sync
docker exec -ti watchstate console servers:edit --key 'options.client.headers.Accept-Encoding' --set '' -- plx
docker exec -ti watchstate console servers:edit --key 'options.client.http_version' --set '1.0' -- plx

My server sits behind a reverse proxy, Caddy.
But when I tested the server I used both the direct http address and also the https link.
My current set is as below using http and when I ran those commands, I get the same error.
Here is my servers.yaml
plx:
  type: plex
  url: 'http://<IP_ADDRESS>:32400'
  token: <removed>
  uuid:  <removed>
  user: <removed>
  import:
    enabled: true
  export:
    enabled: true
  webhook:
    import: true
    push: true
    match:
      user: true
      uuid: true
    token: <removed>
  options:
    client:
      headers:
        Accept-Encoding: ''
      http_version: '1.0'

[2022-04-22T17:10:21+00:00] logger.INFO: [M: 38.71M] Parsing Successful plx - (Movies) - (movie:3) response.
[2022-04-22T17:10:22+00:00] logger.INFO: [M: 38.07M] Finished Parsing plx - (Movies) - (movie:3) (1011 objects) response.
[2022-04-22T17:10:22+00:00] logger.INFO: [M: 38.06M] Parsing Successful plx - (Movies 4K) - (movie:2) response.
[2022-04-22T17:10:22+00:00] logger.INFO: [M: 38.07M] Finished Parsing plx - (Movies 4K) - (movie:2) (7 objects) response.
[2022-04-22T17:10:22+00:00] logger.INFO: [M: 38.06M] Parsing Successful plx - (TV Shows) - (episode:4) response.

In Parser.php line 368:

  [JsonMachine\Exception\SyntaxErrorException]
  Malformed UTF-8 characters, possibly incorrectly encoded '}' At position 0.

Exception trace:
  at /app/vendor/halaxa/json-machine/src/Parser.php:368
 JsonMachine\Parser->error() at /app/vendor/halaxa/json-machine/src/Parser.php:220
 JsonMachine\Parser->getIterator() at /app/src/Libs/Servers/PlexServer.php:631
 App\Libs\Servers\PlexServer->App\Libs\Servers\{closure}() at /app/src/Commands/State/ImportCommand.php:252
 App\Commands\State\ImportCommand->process() at /app/src/Commands/State/ImportCommand.php:96
 App\Commands\State\ImportCommand->App\Commands\State\{closure}() at /app/src/Command.php:84
 App\Command->single() at /app/src/Commands/State/ImportCommand.php:96
 App\Commands\State\ImportCommand->runCommand() at /app/src/Command.php:22
 App\Command->execute() at /app/vendor/symfony/console/Command/Command.php:291
 Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:989
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /app/src/Libs/Initializer.php:117
 App\Libs\Initializer->runConsole() at /app/console:66

state:import [-r|--redirect-logger] [-m|--memory-usage] [-f|--force-full] [--proxy PROXY] [--no-proxy NO-PROXY] [--timeout TIMEOUT] [-s|--servers-filter [SERVERS-FILTER]] [--import-unwatched] [--stats-show] [--stats-filter [STATS-FILTER]] [--mapper-direct] [-c|--config CONFIG]

Alright, could you please try running this command to see plex response, it seems something happening in tv response,
curl -v -H "Accept: application/json" -H "X-Plex-Token: YOUR_PLEX_TOKEN_HERE" 'http://<IP_ADDRESS>:32400/library/sections/4/all?type=4&sort=addedAt:asc&includeGuids=1' 2>&1 | tee response.log

it should save a log in your directory called response.log, please edit the log to remove your plex token, after that please attached it here or send it to me at (ws-contact at arabcoders.net)
i need to see the response headers and body from plex to determine why the json parser is failing on this specific library.

Ok. Just sent you the response log via email.

I've successfully parsed your given response, the only thing i noticed that might be a problem is there is invalid UTF-8 characters in your payload.  i can probably fix that, and you are still using the old plex agents. which most likely will cause you problems in the future however they are "kinda" supported right now i'll see what i can do. i'll let you know once i have something hopefully by later today or tomorrow.

i push possible fix for this issue, in an hour i want you to switch to arabcoders/watchstate:dev-latest pull the new container and restart after that try importing

Ok. Will try and report back in an hour.
Thx

Indeed those are correct new agents, however it seems you possibly forgot to run full meta refresh on library. Anyway, the dev build is out try now and report back if it fixes your problem.

I've refreshed my Plex libraries and downloaded new dev image. But still same.
Also ran db list against plx server, and see a small set of watched status.
Any way to get a count from db and compare plx vs jellyfin?
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Star Trek: Voyager - (3x11) - The Q and the Grey]. Not watched.
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Star Trek: Voyager - (3x7) - Sacred Ground]. Not watched.
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Star Trek: Voyager - (4x6) - The Raven]. Not watched.
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Star Trek: Voyager - (4x8) - Year of Hell, Part 1]. Not watched.
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Warehouse 13 - (1x5) - Elements]. Not watched.
[2022-04-22T19:10:52+00:00] logger.ERROR: Unable to parse plx - (TV Shows) - (episode:4) response. [(file: /app/vendor/halaxa/json-machine/src/Parser.php), (line: 368), (kind: JsonMachine\Exception\SyntaxErrorException), (error: Malformed UTF-8 characters, possibly incorrectly encoded '}' At position 0.)]
[2022-04-22T19:10:52+00:00] logger.NOTICE: Finished waiting HTTP Requests.
[2022-04-22T19:10:52+00:00] logger.INFO: No changes detected.
┌─────────┬───────┬─────────┬────────┐
│ Type    │ Added │ Updated │ Failed │
├─────────┼───────┼─────────┼────────┤
│ Movie   │ 0     │ 0       │ 0      │
├─────────┼───────┼─────────┼────────┤
│ Episode │ 0     │ 0       │ 0      │
└─────────┴───────┴─────────┴────────┘

Ok, i pushed another fix to dev-latest should be done building in <30min after that pull restart and try again. if that also does not work, im afraid im out of ideas it's clearly one an item that is not valid UTF as you can see from the log it can parse some items and then bails.

it seems this file "/home/kodi/TVShows/Star.Trek.Voyager/Season.04/Star Trek Voyager s04e20 - Vis � Vis NTSC DVD x264 DD5.1-JCH.mkv" causing the problems. it's the character between vis and Vis it's incorrectly encoded do you not use media manger like sonarr ?
Star Trek: Voyager S04E20

Ok, the build is out, please pull the new dev-latest and restart and try again, now it should ONLY ignore that item instead of failing all.

@MagnuM2K the new builds are out, please try and report again pull and restart and try to import, now it should ONLY ignore the malformed item instead of bailing out completely on all other items.

That seemed to have done the trick.
Now that I know which file was causing the issue, I've rename it as well.
Thx!

Np. glad it worked for you. out of interest could you post part of the log where it was failing and now working?


Create a page before signing for the client so they can see what they are signing

Give Client an option to review the form before signing remotely on their phone.

This issue is waiting on an updated signature flow.


Revent integrated

Moved the ReventWorkload class to the Linux folder with new features (see 'revent' workload below) and it has now instead been sub-classed in the Android folder. There have been no functional changes as of yet to the Android version, but the possibility exists for their implementation and is detailed in the comments.
Introduced a new 'revent' workload to playback simple revent recordings, for use with instrumentation. The possibility to specify a .close file (which runs during teardown) as well as the existent .setup revent file has been added. It is also now possible to run the workload with 'idle' set to True in order to simply wait for a specified amount of time whilst still recording results instead of running the .run revent file, whilst still being able to run .setup and .close revent files.
Finally - a fix for a bug which meant the Chromebook Plus's (and possibly other unknown devices?) device_model had a trailing null character - this is now automatically removed.

Ready for review


Add a testing IDP for OIDC authentication

The OIDC authentication is missing tests related to groups. The staticPasswords field in the dex config doesn't support groups, and it has only "fixed" users.
Setting up an external IDP (LDAP?) will allow us to create/update users, and make some checks related to their groups and permissions. We would need to update the dex configuration, and restart Dex though.
Needs investigation.

Pairing with @mmartin24 maybe we don't need a full blown IDP to test some of the OIDC features, such as groups. We can create a valid JWT token with the needed claims to test the groups association.

@enrichman, I made this Confluence page with a summary of the steps done with this: https://confluence.suse.com/display/Epinio/How+to+check+update+of+user+roles+on+each+new+login+session


New NodeJS AST Parser Implementation

Using NodeJS to parse the TypeScript it should now generate a better AST when using modern TS features.
Includes a flag to switch between the old (good enough for most scenarios) and the new modern parser.
Using the abstraction the generator can select the parser from options, defaults to old parser.
The tests are copies of the Sdcb tests, should cover the most if not all the code generation scenarios.

Codecov Report

Merging #36 (9d37b62) into main (00f2a84) will decrease coverage by 4.73%.
The diff coverage is 80.37%.

@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
- Coverage   98.83%   94.10%   -4.74%
==========================================
  Files          76       86      +10
  Lines        3189     4022     +833
  Branches      285      378      +93
==========================================
+ Hits         3152     3785     +633
- Misses         20      193     +173
- Partials       17       44      +27

Impacted Files
Coverage Δ

...pt.Interop.Generator/GenerateCachedEntityObject.cs
100.00% <ø> (ø)

....TypeScript.Interop.Generator/GenerateClassShim.cs
100.00% <ø> (ø)

....Interop.Generator/GenerateClassStatementString.cs
100.00% <ø> (ø)

...terop.Generator/Identifiers/AliasTypeIdentifier.cs
55.26% <ø> (-44.74%)
:arrow_down:

...erator/Identifiers/AliasTypeStatementIdentifier.cs
81.25% <ø> (-18.75%)
:arrow_down:

...nterop.Generator/Identifiers/ArgumentIdentifier.cs
100.00% <ø> (ø)

...nterop.Generator/Identifiers/EnumTypeIdentifier.cs
100.00% <ø> (ø)

...tor/Identifiers/InterfaceResponseTypeIdentifier.cs
98.71% <ø> (ø)

...op.Generator/Identifiers/NullableTypeIdentifier.cs
100.00% <ø> (ø)

...p.Generator/Identifiers/PrimitiveTypeIdentifier.cs
100.00% <ø> (ø)

... and 57 more

Continue to review full report at Codecov.

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

The drop of -0.48% is from the cache section not getting covered with the added Unit Tests added.


Event Log

I'm not familiar enough with the codebase yet to know where any more interesting events might be, but there's an example usage @ https://github.com/input-output-hk/cardano-ledger-specs/pull/2244/files#diff-a367824a11ce6839b2fb774cca01608b15ddeba59d6734fab737f10f0c409cf6R195


Question: How to resolve “Unable to fetch script status due to timeout.” error when run script in pipeline?

I encountered error"[error]Error: Unable to run the script on Kudu Service. Error: Error: Unable to fetch script status due to timeout. You can increase the timeout limit by setting 'appservicedeploy.retrytimeout' variable to number of minutes required."
I wonder how to change this timeout?
Thanks.

@yorkzhang, please specify which task do you use?

It looks like message "[error]Error: Unable to run the script on Kudu Service. Error: Error: Unable to fetch script status due to timeout. You can increase the timeout limit by setting 'appservicedeploy.retrytimeout' variable to number of minutes required." is applicable for ArtifactsAndLibraries's tasks.
@pipeline-environment-team for assistance

@denis-tikhomirov I am facing the same issue when trying to deploy an App Service

@denis-tikhomirov The task name is "Azure App Service deploy".

any updates on this issue?

facing this issue while deploying to webapp using the task "Azure App Service deploy", trying to run a post-deployment script - npm install

We're also seeing this recently. I don't think this issue is stale, just nobody from @microsoft/pipeline-environment-team has responded.


add "passenger" section to the readme

cf http://stackoverflow.com/questions/21861387/rufus-cron-job-not-working-in-apache-passenger

The FAQ is sufficient.


Make the compass' jitter magnitude independent of its value

Additionally allows the value to wrap around at the limits.
Currently the jitter is set to ±1.8°.

Code looks good, although practically I think it'd be better to draw from a gaussian distribution than a uniform one and set the standard deviation rather than the absolute range. Python has random.gauss for this so hopefully that wouldn't be much more code. Opinions?
I had a quick look at a ~£1 magnetometer on Farnell (LIS3MDLTR) which has a measurement error of stdev 0.365°. Throwing in the environmental factors on top, standard deviation 1.5° seems reasonable.

I agree, for sensor noise it really should be gaussian. Although we'd need to check that the reasonalby common outliers aren't that far off so teams that aren't using filtering don't end up with completely incorrect behaviour.

With ~50 matches remaining, 2 teams per match, 120s each, sampling the compass 20Hz, that's about 240000 samples. With 1.5° standard deviation, the worst error we would expect to see in any single sample is 6.685°, which I think is OK.

Jitter is now gaussian distributed with σ=1.44°

Note: this branch will not be merged before League 4 so that we can merge and use #335 in the league.


use regionmask updates on overlapping regions

Prudence region are implemented in regionmask, see https://github.com/regionmask/regionmask/pull/283
will require regionmask>0.9.0

Because of https://github.com/regionmask/regionmask/pull/318 we can get rid of our workaround...

prudence regions are now part of regionmask... so let's close this one.


Logging support for looooooong messages

Feature
Very long messages currently cause Sushi Bot's logging feature to error out due to embed fields' character limit, which should be taken care of. This enhancement should see that through and allow Sushi Bot to log changes to and deletions of messages containing up to the character limit of Discord messages.
Acceptance Criteria

[ ] Sushi Bot's message log shall remain the same for messages that fit within a single embed field
[ ] Sushi Bot shall use as many embeds and embed fields as needed for long messages

Additional Context
The current logging implementation yields a Generic Error from an ArrayValidatorError, which should be worked around rather than caught.

Mmm, sooshi wörk


Request: update title

Hi,
unless I missed it, it seems you can only set the title during initialisation. I'd like to update it periodically.
cheers,
Beau

You definitely can change the title at any time.  Here's where I did so, as an example:  https://github.com/Jzar/misc/blob/master/misc.py#L96

Thanks! I was missing the sender argument:
    @rumps.timer(1)
    def repeating_function(self,sender):
        self.title= str(random.random())

It fails silently.

@jaredks You can close this now.  =)

Hum, I relaunch this request but this code seem invalid.
I maybe missed something but @rumps.timer function seem to take only one parameter according to the documentation (Timer.set_callback).
When I try to use one of this function to update my title, two possible cases:

I can't update my title but the function run every x seconds:

@rumps.timer(1)
def update_title(sender):
    print("update")

I try to use self, but the function throw an exception:

@rumps.timer(1)
def update_title(self, sender):
    print("update")

<class 'AttributeError'>: 'TypeError' object has no attribute 'message'

Maybe I miss something, but it's look like we can only access the Timer trough the repeating_function.


New version says it's no longer compatible.

i tried to launch the new version and like i said it said it's incompatible.
im on v 1.6.8.

Same issue

Can confirm. Previous version works. New one makes SMAPI nag about it "no longer [being] compatible" and not load it.

Available for download now for game versions 1.6.0-1.6.8.


Code style 2

Informations

Type
Status
Migration

Fix
Ready
No

Description
Implementation of new rules and code refactoring.
Rules added

prefer-const
newline-before-return
no-angle-bracket-type-assertion
only-arrow-functions
arrow-return-shorthand
object-literal-shorthand
array-type
variable-name

@Romakita Could you please have a look at my commits... Nothing dangerous, just code styling and rules on tslint.

Coverage remained the same at 100.0% when pulling e5dab7f3411355f646c0ff84ce57c2c567e4603c on code-style-2 into e399d1d37d323466544bc7a5e270790a9f7f1cf5 on master.

Coverage remained the same at 100.0% when pulling e5dab7f3411355f646c0ff84ce57c2c567e4603c on code-style-2 into e399d1d37d323466544bc7a5e270790a9f7f1cf5 on master.


invite supervisors to platform

[ ] sends them a sign-up email
[ ] gives them access to the platform

need to implement emailing function


feat: remove indicators

Description

Related links

Notes for reviewers

Pre-review checklist for the PR author

[ ] I've confirmed the contribution guidelines.
[ ] The PR is ready for review.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR has been properly tested.
[ ] The PR has been reviewed.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] (Optional) The PR has been properly tested with CARET_report verification.
[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

Codecov Report
Patch coverage has no change and project coverage change: +0.20% :tada:

Comparison is base (477deb6) 6.50% compared to head (3d0e4d3) 6.70%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #142      +/-   ##
========================================
+ Coverage   6.50%   6.70%   +0.20%
========================================
  Files         16      15       -1
  Lines        999     969      -30
  Branches     389     374      -15
========================================
  Hits          65      65
+ Misses       903     873      -30
  Partials      31      31

Flag
Coverage Δ

differential
6.70% <ø> (?)

total
?

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

Files Changed
Coverage Δ

CARET_analyze_cpp_impl/src/records_base.cpp
1.29% <ø> (+0.02%)
:arrow_up:

CARET_analyze_cpp_impl/src/records_map_impl.cpp
0.00% <ø> (ø)

CARET_analyze_cpp_impl/src/records_vector_impl.cpp
13.91% <ø> (ø)

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

rebase https://github.com/tier4/CARET_analyze_cpp_impl/pull/153.


Create a clock webapp

Hey! @AayushBiswas I want to work on this, can you please assign it to me?🙂


fix: fix the member cluster serviceimport nodeport error

What type of PR is this?
/kind bug
What does this PR do?

Which issue(s) does this PR fix?

Fixes #
Special notes for your reviewer:

Does this PR introduce a user-facing change?

/lgtm

/approve


ps_scan execute error

I try running with the -a option but I get the following error:
sh: 1: ps_scan.pl: Permission denied
execute ps_scan error
Even though I'm using sudo to run ltr_finder. Any clues will be welcome
Cheers.
Claudio

Please try to grant that script executable permission by command:
chmod 755 ps_scan.pl


use make slice to store cluster objects to improve efficiency

Signed-off-by: allencloud<EMAIL_ADDRESS>we we know the slice length in advance, I think we had better use make to create the specified length of slice. This will improve some kind of performance. Since if we create a slice with []type{}, we did not know how much space runtime should reserve, sine slice implementation should be continuous in memory. While when we make a slice with specified length, runtime would reserve a continuous memory space which will not result in slice movement in case of current space is not enough.
- What I did

use make slice to store objects to improve efficiency

- How I did it
- How to verify it
- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

LGTM


Hero Points assigning multiple d6's when subtracting below 1 under the max.

Having a persistent issue where using Hero Points underneath the max -1 (i.e. anything below 5/6 or 8/9, etc.)
To illustrate, if the player modifies their resource from 5/6 to 4/6 it will roll 2d6 in the chat. From 1/6 to 0/6 it will roll 6d6 in the chat.

Thanks for the report. I'll try to fix it soon

Fixed in 0.5.0


[exec] Consume PackageReferences

Change the package loader to use schema.PackageReference values rather
than *schema.Package values. The former load types, resources, and
functions as they are needed rather than up-front, which can drastically
reduce the peak memory consumption of the executor.

Rebased on top of Ian's recent changed and pushed back.


Add support for exporting resource script constants and script classes.

Godot version:
3.1 Alpha 1
Issue description:
I would expect the following to work:
# my_resource.gd
extends Resource
class_name MyResource

# node.gd
extends Node
export(MyResource) var my_res # ERROR: Expected a constant expression

I can actually confirm it isn't a constant by creating a derived version of MyResource, class naming it as SuperResource, and then literally re-assigning it, which I really don't think I should be able to do:
extends Node
func _ready():
    MyResource = SuperResource
    print(MyResource.resource_path) # prints "res://super_resource.gd"

To ME, this seems like a bug that shouldn't be allowed, and which consequently would allow the export of the type name to work in 3.1.
It also seems like this just flat-out wasn't ever a feature, even in 3.0.
const MyResource = preload("res://my_resource.gd")
export(MyResource) var my_res # Error: Export hint not a resource type (even though it is!)

Steps to reproduce:
Recreate the code examples above for Resource-extending scripts.
3.0: create a constant and try to export it. Fails.
3.1: Same as 3.0 + create a class name and try to export it. Fails.

Related: #6763

Just taking a quick look, it seems to me like part of the solution might lie in going to _type_from_variant in gdscript_parser.cpp and changing the logic here:
if (scr.is_valid()) {
    String name = GDScriptLanguage::get_singleton()->get_global_class_name(scr->get_path());
    if (ScriptServer::is_global_class(name)) {
        result.is_constant = true;
    }
    ...
}

There's probably also merit in simplifying the GDScriptLanguage's implementation of that method since we don't need to parse the ENTIRE file just to determine what it's class name is.

CC @vnen

we don't need to parse the ENTIRE file just to determine what it's class name is.

It's not only about the class name. If you are accessing methods and members of a variable typed with a custom class, the parser checks if those are valid as well, and for that it needs to parse the whole script. For this case it would also need to know if it's a resource.
Now about the OP, the problem is making the de/serialization work properly, and expose this to the editor as well. The GDScript part should be only setting the proper hints for that system once it's in place.

@vnen Ah, that makes more sense.
I don't know if that's a significant "problem" per se. In the PR I've linked that closes this, my tests show that I can safely serialize and deserialize both types of resource scripts, all from the Inspector. I can even have a script class's ScriptInstance as a sub resource within a preloaded constant resource script's ScriptInstance. Here's the test I have:
# my_resource.gd
extends Resource
export var health: int = 5
export(SubResource) sub_resource

# sub_resource.gd
extends Resource
class_name SubResource
export var count = 2

# node.gd
extends Node
const MyResource = preload("res://my_resource.gd")
export(MyResource) var my_res
func _ready():
    print(my_res.health)
    print(my_res.sub_resource.count)

If I try to add the MyResource or SubResource to the node's script properties in the Inspector, there's a bug with a massive list showing that doesn't display a scrollbar, so I can't access them, but if I create them as new resources in the Inspector first, save them (which works), and then drag n' drop them from the FileSystem dock to the Inspector's script properties on the node script, THEN the instances show up properly. If I then edit the health or count properties, the relevant resource files are updated.
There's also a bug here where the scripted resources don't show the right icon (they show a "Node" icon if a custom icon isn't defined and it should be a "Resource" icon) and their typename isn't displayed (probably a factor in the changes my PR made). However, the functionality parts of it are all there, what with de/serialization, safely exporting, and editing the data.

What I think is that this should be solved in the editor and probably with a new type of PROPERTY_HINT. Then GDScript can just use it, as other languages would be able to use it as well.

@vnen What do you mean by "solved in the editor"? And wouldn't you still need to use PROPERTY_HINT_RESOURCE_TYPE with the hint_string being the base type? You could then just use the class_name property as the script class's name, and the accessing side can just check whether that value is in the ClassDB or ScriptServer. In that way, you can already have a variant represent a scripted resource type, regardless of platform. It's not like script class's names can collide with engine types'. Unless I'm missing something?

And wouldn't you still need to use PROPERTY_HINT_RESOURCE_TYPE with the hint_string being the base type? You could then just use the class_name property as the script class's name, and the accessing side can just check whether that value is in the ClassDB or ScriptServer.

Yes please, this will be very useful for a lot of reasons :D

Would this feature change also have the effect, that you could edit the custom types you drag into the export fields in the inspector, be edited like Built-In types like Textures etc.?

@Reneator You can already do this, technically. If you create a resource script, then create a resource manually in the Inspector, and then set its script property to be equal to the resource script you made, the custom properties of that resource will appear in the Inspector. If you then save that resource and click+drag that resource file onto the export(Resource) property of some class, the sub-Inspector that appears when you expand that resource will include the custom properties. I have observed this myself with some of the work done in godot-next.

@willnationsdev Thank you a lot! Was struggling with this!
I achieved it by (If somebody else finds this issue while searching for a solution):

define export(Resource) field in Node script
create Script that extends Resource
define export var
define class_name  ("World_Def" in my example)
after saving the script file i could now click on the empty Resource-field in the inspector of the Node that i defined the export
the "World_Def" appears in the list and after choosing it, it shows me the export var that i defined in the Resource Script

@Reneator Just to say, the process as it is is very cumbersome. The change proposed by this issue would allow you to directly export the type, without having to manually attach a script to the resource in the Inspector.

@willnationsdev the steps i did was in a current 3.2 nightly build (from 2 weeks ago). I tested the same in 3.1 and the customResource wouldnt show up in the list of Resources after i defined a class_name.
So maybe they now can load all the custom resources in the project and add them to the Resource-Selection.

@Reneator Oh, maybe. Yeah, that's cool. Didn't know they'd added that.

Closing in favor of https://github.com/godotengine/godot-proposals/issues/18, as feature proposals are now tracked in the Godot proposals repository.


Enchantments not shown anymore

Already tracked by #82

I tried to reproduce this today, but wasn't able to. I figure you must have some other plugin installed that interferes with item lore, or a client side mod that strips the information. Could you show me the NBT data from a broken book (/data get entity yourplayername SelectedItem while holding it in your hand)?

I tried to reproduce this today, but wasn't able to. I figure you must have some other plugin installed that interferes with item lore, or a client side mod that strips the information. Could you show me the NBT data from a broken book (/data get entity yourplayername SelectedItem while holding it in your hand)?

@oddlama has the following entity data: {id: "minecraft:enchanted_book", tag: {StoredEnchantments: [{id: "vane_enchantments:soulbound", lvl: 1s}]}, Count: 1b}

@antonstech can you provide a list of plugins or a timings scan or something?
Does this affect all villagers, or just some?
Does this still affect brand new librarians?

Most probably something else is doing that. I can see no valid reason how this could be caused by vane.

@ryantheleach @oddlama I am using https://github.com/pufferfish-gg/Pufferfish and i have nothing installed except the Vane Plugins, Bluemap, Chunky. ProtocolLib, ServerBackup, TAB and Ultimate Homes

You case is strange for two reasons:

Even in older versions, vane removes generated custom enchantments from villager trades. So getting a soulbound book is impossible except when other plugin interfere with the events. (In the upcoming version it will be absolutely impossible that such a trade is even generated in the first place)
The lore is missing. Can only be a result of another plugin or server software stripping the lore that was added by vane, probably due to incompatibility of that other software with chat components. Could also be caused by another plugin generating the specific trade and therefore not calling vane's internal function to update lore.

Both parts suggest an error with external software. I'm not sure what Pufferfish, or some of your other plugins do exactly, but I'm afraid that there is nothing we can do at the moment.


Feature request: db event names in yii\log\Logger and yii\debug\panels\DbPanel

Feature request
Hi!
I am using Doctrine ORM with Yii2.
Now I want to add SQL logging to Yii2 default Logger and Debug panel. I create own Doctrine SqlLogger and use \Yii::beginProfile() and \Yii::endProfile() to create profiling.
I want SQL events to be displayed in the default Debug panel (in DB section) and Logs.
By default, yii\log\Logger and yii\debug\panels\DbPanel have similar functions to find out if an event is from DB category or not:
yii\log\Logger:
public function getProfileLogs()
{
    return $this->getLogMessages(Logger::LEVEL_PROFILE, ['yii\db\Command::query', 'yii\db\Command::execute']);
}

and
yii\debug\panels\DbPanel:
public function getDbProfiling()
{
    $timings = $this->getProfiling(['yii\db\Command::query', 'yii\db\Command::execute']);
    $count = count($timings);
    $time = 0;
    foreach ($timings as $timing) {
        $time += $timing['duration'];
    }
    return [$count, $time];
}

To overwrite these methods I have to create my own classes and add them to DI container or Debug module settings.
It is not very flexible as there is no way to add any other event to this list (['yii\db\Command::query', 'yii\db\Command::execute']).
I suggest adding to both classes public property like
/**
 * @var array of db commands names
 */
public $dbCommandsNames = ['yii\db\Command::query', 'yii\db\Command::execute'];

and use them in functions:
public function getProfileLogs()
{
    return $this->getLogMessages(Logger::LEVEL_PROFILE, $this->dbCommandsNames);
}

and
public function getDbProfiling()
{
    $timings = $this->getProfiling($this->dbCommandsNames);
    $count = count($timings);
    $time = 0;
    foreach ($timings as $timing) {
        $time += $timing['duration'];
    }
    return [$count, $time];
}

This will allow to add own event names to this list using the DI container or the Debug module settings (without creating own classes).

In case you don't mind having 'yii\db\Command::query', 'yii\db\Command::execute' while using Doctrine, in your own class you can trigger events with Yii::beginProfile($rawSql, 'yii\db\Command::query');

In case you don't mind having 'yii\db\Command::query', 'yii\db\Command::execute' while using Doctrine, in your own class you can trigger events with Yii::beginProfile($rawSql, 'yii\db\Command::query');

I think it is not entirely correct, since the class name of yii\db\Command will be used in Doctrine events (or other ORM systems).

I think it is not entirely correct, since the class name of yii\db\Command will be used in Doctrine events (or other ORM systems).

Well, yeah. Just offered it as a hack :) Are you sure it's just yii\log\Logger and yii\debug\panels\DbPanel? No other places where these are hardcoded?

Well, yeah. Just offered it as a hack :) Are you sure it's just yii\log\Logger and yii\debug\panels\DbPanel? No other places where these are hardcoded?

Yep, I have found only these 2 classes (in yiisoft vendor path).

Yep, I have found only these 2 classes (in yiisoft vendor path).

OK. Let's try it. Do a pull request please.

OK. Let's try it. Do a pull request please.

Done. All checks have passed.

Done. All checks have passed.


ci: only report error with job status 'failure'

Codecov Report

Merging #364 (6bc4092) into main (82c01af) will increase coverage by 0.37%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #364      +/-   ##
==========================================
+ Coverage   63.29%   63.66%   +0.37%
==========================================
  Files          41       41
  Lines        7285     7285
==========================================
+ Hits         4611     4638      +27
+ Misses       2281     2260      -21
+ Partials      393      387       -6

Impacted Files
Coverage Δ

pkg/agent/controller/policy/policy_controller.go
77.26% <0.00%> (+0.73%)
:arrow_up:

pkg/controller/group/group_controller.go
70.93% <0.00%> (+1.08%)
:arrow_up:

plugin/tower/pkg/controller/policy/controller.go
83.09% <0.00%> (+2.14%)
:arrow_up:


Multi-tenancy with EF Core: Should IModelCacheKeyFactory be replaced?

I found the following page: https://learn.microsoft.com/en-us/ef/core/modeling/dynamic-model.
Is replacing IModelCacheKeyFactory is needed if I use HasQueryFilter to dynamically set tenant id for queries?

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: bb29a2b6-c401-287f-2da9-1aeb3c633b41
Version Independent ID: bb29a2b6-c401-287f-2da9-1aeb3c633b41
Content: Multi-tenancy - EF Core
Content Source: entity-framework/core/miscellaneous/multitenancy.md
Product: entity-framework
Technology: entity-framework-core
GitHub Login: @JeremyLikness
Microsoft Alias: jeliknes

OnModelCreating was executing just once, where I use HasQueryFilter to change tenant id. So, I thought it caches whole model configuration with the first tenant id.

Have you looked at the example in the query filter docs above? The tenant ID is stored as a simple instance field on your DbContext instance, and the query filter definition looks at that to apply the filter.


openstack-maintenance-gating: add crowbar deploy jobs (SOC-9599,SOC-9669)

Add Crowbar jobs to the set of jobs executed for a maintenance
update.
This commit switches the MU gating job implementation to use
a configuration yaml file listing the jobs and the parameters
that need to be launched for each cloud version rather than
hard-coding them in the groovy library.
This PR also includes another couple of fixes required to get the Crowbar
MU gating job to pass:

call onadmin_rebootcloud instead of relying on the reboot_node
ansible role when testing maintenance updates. The onadmin_rebootcloud
functionality from qa_crowbarsetup.sh has additional logic built
into it which ensures that controller nodes are rebooted correctly
when HA is enabled, whereas the reboot_node ansible role does not
(included from #3529)
serializing the service update process for cloud nodes in Ardana
deploy-and-update MU jobs

Tested with: https://ci.suse.de/blue/organizations/jenkins/cloud-maintenance-gating-snica/detail/cloud-maintenance-gating-snica/29/pipeline/35/

Re-testing for cloud 8 with: https://ci.suse.de/blue/organizations/jenkins/cloud-maintenance-gating-snica/detail/cloud-maintenance-gating-snica/33/pipeline

Very nice!


fatsort: <IP_ADDRESS>9 -> <IP_ADDRESS>6

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/fatsort/versions.
meta.description for fatsort is: '"Sorts FAT partition table, for devices that don't do sorting of files"'.

Checks done (click to expand)

built on NixOS
Warning: no invocation of /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6/bin/fatsort had a zero exit code or showed the expected version
0 of 1 passed binary check by having a zero exit code.
0 of 1 passed binary check by having the new version present in output.
directory tree listing: https://gist.github.com/bd9bafa78360c9997f7d487cae68b6c6
du listing: https://gist.github.com/b43600620297cf5e7d3682a196deccf4

Instructions to test this update (click to expand)

One-time optional setup to skip building using Cachix:
nix-shell -p cachix --run 'cachix use r-ryantm'

Test this update by entering a nix shell, seeing what is inside the
result, and if applicable, running some binaries:
nix-shell --pure -I nixpkgs=https://github.com/r-ryantm/nixpkgs/archive/3da7fc8a5749077c3932484829f5901120013746.tar.gz -p fatsort
ls -la /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6

cc @kovirobi for testing.

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: fatsort
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Success on x86_64-linux (full log)
Attempted: fatsort
Partial log (click to expand)
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6
shrinking /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6/sbin/fatsort
gzipping man pages under /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6/sbin
patching script interpreter paths in /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6
checking for references to /build in /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6...
moving /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6/sbin/* to /nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6/bin
/nix/store/gkr3025pzki6a0dlrgdr8ns18gs45hy9-fatsort-<IP_ADDRESS>6

Success on aarch64-linux (full log)
Attempted: fatsort
Partial log (click to expand)
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/b13frfmylvhnz74n79d3pbiirz6hz3kn-fatsort-<IP_ADDRESS>6
shrinking /nix/store/b13frfmylvhnz74n79d3pbiirz6hz3kn-fatsort-<IP_ADDRESS>6/sbin/fatsort
gzipping man pages under /nix/store/b13frfmylvhnz74n79d3pbiirz6hz3kn-fatsort-<IP_ADDRESS>6/share/man/
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/b13frfmylvhnz74n79d3pbiirz6hz3kn-fatsort-<IP_ADDRESS>6/sbin
patching script interpreter paths in /nix/store/b13frfmylvhnz74n79d3pbiirz6hz3kn-fatsort-<IP_ADDRESS>6
checking for references to /build in /nix/store/b13frfmylvhnz74n79d3pbiirz6hz3kn-fatsort-<IP_ADDRESS>6...
moving /nix/store/b13frfmylvhnz74n79d3pbiirz6hz3kn-fatsort-<IP_ADDRESS>6/sbin/* to /nix/store/b13frfmylvhnz74n79d3pbiirz6hz3kn-fatsort-<IP_ADDRESS>6/bin
/nix/store/b13frfmylvhnz74n79d3pbiirz6hz3kn-fatsort-<IP_ADDRESS>6


Allow styling or switching off git diff gutter highlights

VSCode Version: Code 1.18.0 (dcee2202709a4f223185514b9275aa4229841aa7, 2017-11-08T12:44:48.751Z)
OS Version: Linux x64 4.4.0-98-generic

Can we have a new option to remove or at least colour the git diff gutter highlights please? They can be quite distracting.

@nomad-software Did you read my answer? workbench.colorCustomizations stopped working?
Also, this is a duplicate of https://github.com/Microsoft/vscode/issues/29241

@usernamehw Have you got an example of using workbench.colorCustomizations?

https://stackoverflow.com/questions/43969277/how-can-you-disable-gutter-indicators-in-vs-code/43973209#comment81367260_43973209


Data Loader support

Investigate how to support Facebook data loader in generated resolver layer.

/assign @wtrocki :)

Can't wait!!! 😄

I have done a quick investigation and found out that there are 3 major challenges of doing data loader support:

Moving towards caching resources will mean a complete refactor of the resolver layer
that has some concepts that I'm not fully understanding at the moment.
There is a problem of finding cache key - this is usually done explicitly by users creating data loaders for concrete business objects.
Generic resolvers are doing tons of extra stuff that might not be needed for specific use cases

Now I understand why custom resolvers were introduced and how much value they provide.
However, there is also a problem with the architecture of the cli that is creating server inside cli.
To implement most of the stuff like user/auth etc. people will usually need to apply some extra fields to context - including loaders. With the current architecture, there is no possibility to do it
as server startup logic is in cli and cannot be controlled by software. (which is fine for quick demo/testing)
I think generally the library is much more useful as it can be used by any other server (like Apollo GraphQL etc) and the resolver layer is also built for demo purposes and for production use cases it should be probably replaced with some custom one.
I think it will be cool if underlying api will return typedefs and resolvers as separate objects in alternative method. This will make entire library much more flexible - currently there is need for decomposing schema back or use schema that was saved to file. This change will make entire library much more friendly for library use cases.
This will mean that people who care for performance can use https://github.com/zalando-incubator/graphql-jit etc. along with the library
Example:
import { createGraphQLTypeDefs } from "openapi-to-graphql"

cosnt {typeDefs,resolvers} =  createGraphQLTypeDefs(oapi);
export const schema = makeExecutableSchema({
  typeDefs,
  resolvers,
});

WDYT? I'm happy to make the change as part of the new api and create separate sample app that is performant etc.

@wtrocki Thank you also for this proposal!
I am not 100% sure about data loaders, and the comments you make. Specifically, why do you say that "Moving towards caching resources will mean a complete refactor of the resolver layer"? Irrespective of data loaders, one way that caching can be implemented is: use the HTTP request to make (i.e., the URL, payload, and headers) to generate a hash, which then identifies the response in an ephemeral map (e.g., https://www.npmjs.com/package/node-cache). If a response is cached, return it from the cache, otherwise populate the cache. This should be doable with the current resolver functions.
You outline a second idea, namely to allow users to obtain type definitions and related resolver functions in maps, instead of obtaining the monolithic schema. I agree that this is an interesting idea that would improve flexibility of our library. I think this should be reflected in a dedicated issue, though. I am also wondering if the GraphQL reference implementation does allow to use the proposed maps to generated a schema? I don't think it is a good idea to generate this output if it is only usable with Apollo tools.

I cannot agree more. It will be good to have http level cache that will have cached data per request and yes data loader will not make much sense here.
Generating hash of payload is great alternative to not having clear information about id but I will need to check if cost of hash for every item might not defeat the purpose of having better performance. Caching outside single request is risky business as clients can get outdated data.
In relation to second problem. makeExecutableSchema is default way to build graphql API in both Apollo and graphql.js. Both frameworks allow to pass rootResolver and definitions separately as alternative to passing compiled schema. My plan is to play with API and send PR.

@wtrocki Caching on the HTTP level sounds very good! I actually implemented this (hackishly) once in an application with some custom resolvers, and it worked well.
Great to hear that makeExecutableSchema is a default way of doing things. I really like your proposal of adding a createGraphQLTypeDefs function!

In case someone will look for this problem in the future.
The found solution that does not require any change in OtG
The way I have approached that is that I have used https://github.com/ardatan/graphql-toolkit extractResolversFromSchema method.
  let { schema } = await createGraphQlSchema
  const typeDefs = printSchema(schema)
  const rootValue = extractResolversFromSchema(schema)
  graphqlHttp({
     ...
    typeDefs,
    rootValue
    context: {loaders: createLoaders()}
 });

@wtrocki can you give a bit more information on how you ended up solving this?


issue with using flash() is that it displays double messages on the view ( Laravel Fortify )

I have a problem when customizing User Authentication in Laravel Fortify, where the flash messages appear twice instead of once. What is wrong with my code?
// if login success redirect to home / dashboard page and show flash message

        Fortify::authenticateUsing(function (Request $request) {
            $user = User::where('email', $request->email)->first();

            if ($user && Hash::check($request->password, $user->password)) {
                flash()->AddSuccess('Welcome, '.$user->name);
                return $user;
            }
            flash()->addError('Invalid credentials');
        });

Did you solved this error yet?

Did you solved this error yet?

No, and I've made the decision not to use it

Hey guys 👋,
Thank you for reporting the issue, I've looked into this, and it seems to be a known issue within Laravel Fortify itself, as discussed here https://github.com/laravel/fortify/issues/339.
As a workaround, you can modify the FortifyServiceProvider to ensure that flash messages are only added once during the authentication process. Here's a simple way to implement this:
class FortifyServiceProvider extends ServiceProvider
{
    protected $isFirstCall = true;

    public function boot(): void
    {
        Fortify::authenticateUsing(function (Request $request) {
            $user = User::where('email', $request->email)->first();

            if ($user && Hash::check($request->password, $user->password)) {
                if ($this->isFirstCall) {
                    $this->isFirstCall = false;
                    flash()->addSuccess('Welcome, '. $user->name);
                }

                return $user;
            }

            if ($this->isFirstCall) {
                flash()->addError('Invalid credentials');
            }
        });

        // ... rest of the boot method ...
    }
}

In this code, a flag $isFirstCall is used to check if it's the first time the authentication method is being called, and the flash message is only added in this instance. This should prevent the flash message from appearing twice.
I hope this helps. Please let me know if you have any further questions.
Best regards,
Younes

Hey guys 👋,
Thank you for reporting the issue, I've looked into this, and it seems to be a known issue within Laravel Fortify itself, as discussed here laravel/fortify#339.
As a workaround, you can modify the FortifyServiceProvider to ensure that flash messages are only added once during the authentication process. Here's a simple way to implement this:
class FortifyServiceProvider extends ServiceProvider
{
    protected $isFirstCall = true;

    public function boot(): void
    {
        Fortify::authenticateUsing(function (Request $request) {
            $user = User::where('email', $request->email)->first();

            if ($user && Hash::check($request->password, $user->password)) {
                if ($this->isFirstCall) {
                    $this->isFirstCall = false;
                    flash()->addSuccess('Welcome, '. $user->name);
                }

                return $user;
            }

            if ($this->isFirstCall) {
                flash()->addError('Invalid credentials');
            }
        });

        // ... rest of the boot method ...
    }
}

In this code, a flag $isFirstCall is used to check if it's the first time the authentication method is being called, and the flash message is only added in this instance. This should prevent the flash message from appearing twice.
I hope this helps. Please let me know if you have any further questions.
Best regards, Younes

Solved, thanks a lot! 🙇🏻


Works swimmingly on Windows but some errors on ubuntu

I was able to get your bot running on windows but for some reason I get this error message when I try installing it on Ubuntu. I followed all of the prerequisate steps (for some reason on that page the command they give does not install npm or node, that has to be done seperately). Running the code does succesfully create a discord-spoiler bot folder as well. Running the index.js gives me another error message different from what you see here but it also includes a lack of package.json. Which package.json is it asking for?
ownagecat@ownagecat-desktop:~/node_modules$ npm install discord-spoiler-bot --save
loadDep:gifencoder → reso ▄ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine<EMAIL_ADDRESS>wanted: {"node":">=6.0.0"} (current: {"node":"4.2npm WARN saveError ENOENT: no such file or directory, open '/home/ownagecat/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/ownagecat/package.json'
npm WARN<EMAIL_ADDRESS>requires a peer of erlpack@hammerandchisel/erlpack#master but none was installed.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none was installed.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none was installed.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none was installed.
npm WARN ownagecat No description
npm WARN ownagecat No repository field.
npm WARN ownagecat No README data
npm WARN ownagecat No license field.
ownagecat@ownagecat-desktop:~/node_modules$

Number of issues I see with the output:

What you're getting is a warning, the installation was still successful so you should be able to run the bot. See below for how to get rid of the warning.
Are you sure you ran npm init? package.json should appear in the same directory where you execute npm init.
It appears you're inside the node_modules directory, which is usually not the place you want to run the installation in. I suggest create a new folder, call it spoiler-bot or similar, and run npm init and npm install ... inside it.
You'll need to upgrade your Node.js to v6+, as stated in the installation section. Otherwise the bot is likely to fail.

You're right, it was an outdated node.js. I had installed the wrong one.
 You don't happen to have a donation button?
On Mar 7, 2017 11:59 AM, "Tim K."<EMAIL_ADDRESS>wrote:

Closed #8 https://github.com/TimboKZ/discord-spoiler-bot/issues/8.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/TimboKZ/discord-spoiler-bot/issues/8#event-989929525,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZCgg7MhyaKAtVCZYjIKitLrhMrxY-hwks5rjYzhgaJpZM4MVuhH
.

Sadly, I don't. Thanks for the consideration though!


Empty cf_clearance?

I just started using the lib, and I'm not fully sure, but it seems weird to me that the cf_clearance is empty.
My code:
import cloudscraper

proxies = {"http": "http://x.x.x.x:xxxx", "https": "http://x.x.x.x:xxxx"}
tokens, user_agent = cloudscraper.get_tokens("https://spigotmc.org/", proxies=proxies)
print(tokens)

And this seemed to return this:
{'cf_clearance': '', '__cfduid': 'd08aa4c08c1462447eb2ad1a390b4ec131557165306'}
Is this normal? I thought cloudflare sets a cf_clearance.

Hi @para-dise , while not normal , i have seen that happen once or twice... however... you only need the __cfduid in order to use cloudflare, so i wouldnt be too concerned about it.
is there any reason you're extracting the cookies rather than just using cloudscraper.get() or .post() etc, as the library is calling requests as a super.


Properly handle default values for allowMaximumSizeToDivergeFromCoreSize

Properly handle default values for allowMaximumSizeToDivergeFromCoreSize when configuring properties using Archaius.
Fixes #1434

To give a bit more context: the default value for HystrixThreadPoolProperties.allowMaximumSizeToDivergeFromCoreSize is false instead of null, which means
private static boolean getValueOnce(String propertyPrefix, HystrixThreadPoolKey key, String instanceProperty, boolean builderOverrideValue, boolean defaultValue) {
  return forBoolean()
         .add(propertyPrefix + ".threadpool." + key.name() + "." + instanceProperty, builderOverrideValue)
         .add(propertyPrefix + ".threadpool.default." + instanceProperty, defaultValue)
         .build()
         .get();
}

will never try to read the value for threadpool.default.
A workaround for the current code is to either configure it programatically using HystrixThreadPoolProperties.Setter or adding a configuration for every specific threadpool key.

I just built a jar with this PR and deployed it into an environment with hystrix-1.5.8.  It has a regression - when the property is set to false, the default maximum (10) is getting picked up.  I'm reviewing the code to determine where that happens.

@ptab Can you try out #1447 and see if it works for you?  It builds on top of this PR (#1435)
It fixes 2 issues:

Maintain invariant of maximumSize == coreSize if allowMaximumSizeToDivergeFromCoreSize == false
Fix Configuration stream so that it also knows about this invariant

I am a bit late to the party, but I did run 1.5.9 against my test case and verified that it works as expected. Thanks for accepting it! 👍

Thanks for the contribution!


Icons are blocked because of untrusted fonts on Windows 10

I need to deploy an app using qtawesome on some machines where the Untrusted Font Blocking policy is set to "Block untrusted fonts and log events" (https://docs.microsoft.com/en-US/troubleshoot/windows-client/shell-experience/feature-to-block-untrusted-fonts).
With such a policy, the example.py in the root of the repository returns:
Traceback (most recent call last):
  File "C:/code/example.py", line 167, in <module>
    main()
  File "C:/code/example.py", line 162, in main
    _ = AwesomeExample()
  File "C:/code/example.py", line 18, in __init__
    fa5_icon = qta.icon('fa5.flag')
  File "C:\Users\tester\AppData\Local\test\envs\hyo2\lib\site-packages\qtawesome\__init__.py", line 173, in icon
    return _instance().icon(*names, **kwargs)
  File "C:\Users\tester\AppData\Local\test\envs\hyo2\lib\site-packages\qtawesome\__init__.py", line 77, in _instance
    'materialdesignicons-webfont-charmap.json')
  File "C:\Users\tester\AppData\Local\test\envs\hyo2\lib\site-packages\qtawesome\iconic_font.py", line 214, in __init__
    self.load_font(*fargs)
  File "C:\Users\tester\AppData\Local\test\envs\hyo2\lib\site-packages\qtawesome\iconic_font.py", line 270, in load_font
    os.path.join(directory, ttf_filename)))
qtawesome.iconic_font.FontError: Font at 'C:\Users\tester\AppData\Local\test\envs\hyo2\lib\site-packages\qtawesome\fonts\fontawesome4.7-webfont.ttf' appears to be empty. If you are on Windows 10, please read https://support.microsoft.com/en-us/kb/3053676 to know how to prevent Windows from blocking the fonts that come with QtAwesome.

The issue is present also when running the PyInstaller-based frozen version of the app: https://github.com/ausseabed/qax/issues/9

Hi @giumas thank you for the feedback! As described in the traceback if the font file is unable to load we suggest checking the link you describe for the user to allow/setup properly the font since from the package I think there is not much we can do (to enable the font load you either install the font or exclude the application/process using it from validation). However if you know a way to handle this from QtAwesome let us know :+1:

Thanks! Can you confirm that there is no way to get the QtAwesome icons without loading those fonts?
CC: @lachlanhurst

From my understanding yep, without loading the fonts there is no way for QtAwesome to be able to work. However, just in case, pinging @ccordoba12

I think a possible workaround is to install those fonts in the user AppData directory. But that only works for a recent Windows 10 build.

Interesting! It seems something that could be done/checked at the app initialization. What do you mean with 'install those fonts'? Copying them? How to then ask QTAwesome to search in that folder?

Checking seems like there is a way to setup/install fonts only for the current user (so without admin rights) since the Windows 10 build from 2018 (RS5): https://blogs.windows.com/windows-insider/2018/06/27/announcing-windows-10-insider-preview-build-17704/#vtHzS6SkLWyrfI4D.97 However, I'm not totally sure in the programmatic approach to do it (probably it requires copying the fonts sources in a directory under the user folder and some registry entry?)

Note: This SO post could be useful here (needs adaptation to install for the user and not to the whole machine) - https://stackoverflow.com/a/41841088/15954282


WebRTC is not working from Docker while other protocols do

I'm running the default docker container on Windows 11 with the following command:
docker run -p 8083:8083 -d --name rtsp-to-web ghcr.io/deepch/rtsptoweb:latest
I only have to replace the default config.json with my own because the default stream doesn't work at all. Then I saw on the webpage by clicking "all" that only webRTC is not working while other protocols do.
I see the following error message in the console:
WebRTC Client Offline                         call=WritePacket channel=0 func=HTTPAPIServerStreamWebRTC module=http_webrtc stream=27aec28e-6181-4753-9acd-0456a75f0289
What could be the reason for that?

I want to add I see a similar issue. I use the latest docker image, and have added a RTSP stream, from Unifi Protect. WebRTC which is the stream conversion I need for home assistant does not work, but MSE does.

Same problem here.

Thats true, sorry I thought the synology container is fully configured.
So for synology users; just change the network to host not bridge.
Thanks @allenporter !


[SP-5551][PDI-18619] Memory leak due to failing to clean up EmbeddedM…

…etastore
Within a single job or trans, multiple other jobs/trans can be launched in
parallel. It's also possible for more than one of those jobs/trans to share
a jobmeta or transmeta. Because of this, the former logic for disposing
and creating the metastorelocator key could result in orphaned keys,
since multiple threads may create new ones without disposing the previous.
This change (combined with pentaho/pentaho-osgi-bundles#364)
stores only a single embeddedmetastore for each meta, and associates a single
key. Disposal verifies that the trans or job doing the disposing is the "top level"
job or trans holding that key, making sure it will be cleaned up when no other job
or trans needs it.
https://jira.pentaho.com/browse/PDI-18619
(cherry picked from commit dfb3132e80708d79247a158f712fc7e1f617f728)

:white_check_mark: Build finished in 35m 4s
Build command:
mvn clean verify -B -e -Daudit -amd -pl engine

:ok_hand: All tests passed!
Tests run: 3635, Failures: 0, Skipped: 7    Test Results

:information_source:  This is an automatic message


Revert "[Autowire] remove @noRector on ParameterSkipper const"

Reverts symplify/symplify#3202

ok, let's merge it, and if easy-coding-standard green by it, then tweak str_replace() may be needed in build scoped php 7.0 process https://github.com/rectorphp/rector-src

It seems error on build:
Run git add --all
error: pathspec 'remove' did not match any file(s) known to git
error: pathspec '@noRector' did not match any file(s) known to git
error: pathspec 'on' did not match any file(s) known to git
error: pathspec 'ParameterSkipper' did not match any file(s) known to git
error: pathspec 'const (#3209)' did not match any file(s) known to git
Error: Process completed with exit code 1.


File Advanced Search Formatting

Add the 2px stroke after section titles in the advanced search overlay.

This is outdated. We're doing another UX pass.