Custom NewRelic logger

Proposed changes
Adds a custom logger for logging to NewRelic, including various default fields.
Related to AB#42
Types of changes

[ ] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Testing
Unit testing
None specifically for this.
Manual testing
Use the logger in a repository (see README.md on how to activate it) and ensure it works and is robust.
Further comments

Codecov Report

Merging #24 (6764c07) into develop (d31fe7d) will decrease coverage by 7.37%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             develop      #24      +/-   ##
=============================================
- Coverage      96.16%   88.79%   -7.38%
- Complexity        97      103       +6
=============================================
  Files             13       14       +1
  Lines            313      339      +26
=============================================
  Hits             301      301
- Misses            12       38      +26

Impacted Files
Coverage Δ

src/Logging/NewRelicLogger.php
0.00% <0.00%> (ø)

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 d31fe7d...6764c07. Read the comment docs.


bugfix: ieeg feature query space filtering & more predictable region.defined_in_space behaviour

this PR fixes two issues:

provides some predictability to Region.has_regional_map method (prior, it may raise RuntimeError if space provided has no suitable maps)
fixes ieeg session query based on provided space kwarg

@ reviewers, it could be argued that all spatial queries should adopt the proposed change. Should I amend the PR as such?

We will reintroduce iEEG from scratch in a version following v0.4. Suggest to delete this PR - ok @xgui3783 ?


Add an option to change the cookie monster by an eggplant

I like eggplant, and I think it would be better if we had an option to chnage the cookie gif by an eggplant. Eggplant are cool

I need to add an options panel (I plan to add sites whitelist as well), maybe in the next version :P

Your wishes have been implemented in the version 1.1.0 👍


Update deck gl to latest (8.7)

About
Update the deck.gl version to benefit of a lot of new additions
Description of changes
Simple update of the deck.gl version
Pre-Merge checklist

[x] The project was correctly built with npm run build.
[x] If there was any conflict, it was solved correctly.
[x] All changes were documented in CHANGELOG.md.
[ ] All tests on CircleCI have passed.
[ ] All Percy visual changes have been approved.
[ ] Two people have :dancer:'d the pull request. You can be one of these people if you are a Dash Deck core contributor.

Any idea why the tests fail to install geopandas?

superseded by #22 - apologies for missing this PR!


UnspecializedInput/InputTakeAtPosition are unnamable (externally)

nom version : 4.0.0-beta2

This means that it is impossible to implement either of these for external types.

Never mind I was incorrect.
Darn it I got bit by ending up on the non-docs.rs documentation site


windo + 'winfixbuf' creates a split even when it doesn't need to

Steps to reproduce
Related: https://github.com/tpope/vim-fugitive/issues/2278
vim +'set winfixbuf' calls windo as a part of its work. Since the buffer is 'winfixbuf', it creates a split on-start-up.
https://github.com/vim/vim/assets/10103049/4ec4d8fa-df70-45ae-9dff-28637e72c4dd
One can also achieve the same bug in a current Vim session by calling set winfixbuf | windo echo 'hello'. I believe it's the same code causing both behaviors
Expected behaviour
A command that does not change the user's current buffer would not generate a split with 'winfixbuf'. For example :windo enew would create a split. But :windo echo 'hello' is okay.
Version of Vim
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Mar 25 2024 20:19:15)
Environment
OS: CentOS 7
Terminal: gnome-terminal
$TERM: xterm-256color
Logs and stack traces
No response

The ex_listdo command is used for a variety of commands, including windo. By itself windo shouldn't need to care about 'winfixbuf', usually. Unless the windo command is changing the current buffer such as windo edit /tmp/foo or windo enew.
Ideally we'd be able to make ex_listdo more permissive like we're doing already with ex_edit. Where a command that doesn't change the buffer is allowed but one that does will create a split.
I could see this possible in one of two ways

Allow ex_listdo to run the passed command and then detect if the buffer had been changed and roll its changes back and stop
Validate in advance if the "do-it" portion of :windo do-it would change the current buffer and prevent the command from starting
Possibly another way that I'm unaware of

It's pretty edge case, a vim-fugitive user is trying to load fugitive while calling Vim, but if it's achievable I'd like to fix it


Add initial infra for load test

Uses Istio's fortio. Currently just very simple but will add more test configurations like # of threads, payload sizes, etc.
Moves magefile to magefiles directory to let it have an independent go.mod to not make the top level go.mod too confusing, now build dependencies are all independent.
Starting at 100 qps with 1 thread(s) [gomax 10] for 10s : 1000 calls each (total 1000)
Ended after 10.004602709s : 1000 calls. qps=99.954
Sleep times : count 999 avg 0.00031307502 +/- 0.02778 min -0.229090169 max 0.009110968 sum 0.312761947
Aggregated Function Time : count 1000 avg 0.0041951147 +/- 0.007499 min 0.000717417 max 0.238120125 sum 4.19511467
# range, mid point, percentile, count
>= 0.000717417 <= 0.001 , 0.000858709 , 0.50, 5
> 0.001 <= 0.002 , 0.0015 , 6.80, 63
> 0.002 <= 0.003 , 0.0025 , 8.40, 16
> 0.003 <= 0.004 , 0.0035 , 59.00, 506
> 0.004 <= 0.005 , 0.0045 , 80.00, 210
> 0.005 <= 0.006 , 0.0055 , 96.70, 167
> 0.006 <= 0.007 , 0.0065 , 99.00, 23
> 0.007 <= 0.008 , 0.0075 , 99.40, 4
> 0.008 <= 0.009 , 0.0085 , 99.70, 3
> 0.01 <= 0.011 , 0.0105 , 99.80, 1
> 0.011 <= 0.012 , 0.0115 , 99.90, 1
> 0.2 <= 0.23812 , 0.21906 , 100.00, 1
# target 90% 0.0055988
Error cases : count 78 avg 0.0015720038 +/- 0.0008374 min 0.000717417 max 0.005338625 sum 0.122616296
# range, mid point, percentile, count
>= 0.000717417 <= 0.001 , 0.000858709 , 6.41, 5
> 0.001 <= 0.002 , 0.0015 , 87.18, 63
> 0.002 <= 0.003 , 0.0025 , 94.87, 6
> 0.003 <= 0.004 , 0.0035 , 96.15, 1
> 0.005 <= 0.00533862 , 0.00516931 , 100.00, 3
# target 90% 0.00236667
# Socket and IP used for each connection:
[0]  80 socket used, resolved to [<IP_ADDRESS>:8080] connection timing : count 80 avg 0.00036178953 +/- 0.0003483 min 0.000137708 max 0.002978583 sum 0.028943162
Connection time histogram (s) : count 80 avg 0.00036178953 +/- 0.0003483 min 0.000137708 max 0.002978583 sum 0.028943162
# range, mid point, percentile, count
>= 0.000137708 <= 0.001 , 0.000568854 , 96.25, 77
> 0.001 <= 0.002 , 0.0015 , 98.75, 2
> 0.002 <= 0.00297858 , 0.00248929 , 100.00, 1
Sockets used: 80 (for perfect keepalive, would be 1)
Uniform: false, Jitter: false
IP addresses distribution:
<IP_ADDRESS>:8080: 80
Code  -1 : 78 (7.8 %)
Code 200 : 922 (92.2 %)
Response Header Sizes : count 1000 avg 338.374 +/- 98.42 min 0 max 367 sum 338374
Response Body/Total Sizes : count 1000 avg 10614.986 +/- 3087 min 0 max 11513 sum 10614986
All done 1000 calls (plus 0 warmup) 4.195 ms avg, 100.0 qps

Can we include payloads and body inspections on this tests? Not sure we are even passing headers here. Of course basic tests are great for performance matters but would be nice to have some load testing when regexes are run against bodies cc @M4tteoP

I see a httpOpts.Payload = fnet.GeneratePayload(*PayloadFileFlag, *PayloadSizeFlag, *PayloadFlag) and it also provides some sort of random payload.
I'm thinking about having some sequential runs:

basic tests
tests with payload
fuzzing...

Overall it's great to run it! 🚀 Also thinking about doing the same against different environments for comparisons 👀

Yup definitely want to add payloads and various configurations, but wanted to get this in separately since it does a lot of refactoring of the existing build logic too


[haskell-updates] hackagePackages.hnix: Disable completion to fix build

The optparse-applicative completion generation does not work for hnix
0.9.0.
Things done

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

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

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

@GrahamcOfBorg build haskellPackages.hnix

Looks like it is successfully building on Linux at least, thanks for fixing this!


floating cursor problems

doesn't move the way it should, for instance auto scroll doesn't work. Very hard to navigate down

Able to navigate down, but something still feels wrong. I tried yesterday and entered a state where I could not move the cursor left.


ZendDeveloperTools conflicts with Zend\Code 2.3.1 and 2.2.7

See zendframework/zf2#6166
Resolution is to wait for the next release (2.2.8 and 2.3.2) and then remove the patched code at https://github.com/zendframework/ZendDeveloperTools/blob/9f93faecc1c9c31b8af67491f0e706e75b1f85bf/src/ZendDeveloperTools/Listener/EventLoggingListenerAggregate.php#L120

This repository has been closed and moved to laminas/laminas-developer-tools; a new issue has been opened at https://github.com/laminas/laminas-developer-tools/issues/15.


Make it possible to turn off implicit external command resolution on a per-scope basis

When writing modules and scripts, it can be useful to turn off implicit external command resolution. This has two benefits:

Make it very easy to see which external commands a script or module depends on;

Make it possible for Elvish to statically check the existence of commands, improving the safety of the script or module.

This will need to be implemented as a special command that applies the restriction in the current lexical scope (files are also lexical scopes). It is conceptually comparable to JavaScript's strict mode or Perl's strict pragma.
An example: Assuming that the special command is strict, and there is no function named ls the following will trigger a compilation error:
# In a file, or any lexical scope
strict
ls # triggers compilation error
e:ls # ok

Inspired by #910.

Make it possible for Elvish to statically check the existence of commands, improving the safety of the script or module.

This seem impossible given the dynamic nature of external command resolution based on the value of $E:PATH when the command is run. AFAICT the goal of this issue is impossible for a command shell. At least not unless you're going to restrict changes to $E:PATH after the Elvish program is compiled. Alternatively, require that any external command references be resolved at compilation time, thus immune to any subsequent changes to $E:PATH as the program runs. A solution that seems worse than the problem it tries to solve.

The static checking happens not during the compilation of Elvish, but during the compilation of Elvish scripts.
Dynamic PATH is a problem, but the majority of scripts are not going to manipulate it.

Yes, this will require the paths of external commands to be resolved during compilation. This is not a bad thing for the majority of modules and scripts.

The static checking happens not during the compilation of Elvish, but during the compilation of Elvish scripts.

When I wrote "Elvish program" I meant a script written in the Elvish language, not the "elvish" binary.

Dynamic PATH is a problem, but the majority of scripts are not going to manipulate it.

Yes, but the behavior when PATH is modified still needs to be defined; even if it's just "changing PATH will not affect the resolution of any external command invoked by the script."


Flash error with ESP32-S3: Timeout

Appears to be the same with S2 and C3 ... there is a timeout error when trying to flash the chip.
esptool.js v0.1-dev
Serial port WebSerial VendorID 0x303a ProductID 0x1001
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3
Features: Wi-Fi,BLE
Crystal is 40MHz
MAC: f4:12:fa:44:1b:fc
Uploading stub...
Running stub...
Stub running...
Changing baudrate to 460800
Changed
Erasing flash (this may take a while)...
Chip erase completed successfully in 1.082s
Compressed 4420676 bytes to 124923...
Writing at 0x0... (12%)
Writing at 0x4000... (25%)
Writing at 0x8000... (37%)
Error: Timeout

Hello
I ve the same error :-( no idea to fix it

Same problem here using this board:
https://www.lilygo.cc/products/t-display-s3

Serial port WebSerial VendorID 0x303a ProductID 0x1001

Looks like you are flashing it via USB_SERIAL_JTAG. This should work after #54 and #65.

Both related PRs have been merged, I think this should be fixed now. Please reopen if the issue still exists.

It looks like this is still an issue. I am trying to flash an ESP32-S3 and still getting a timeout error:

I'm trying to flash the combined.bin inside of https://github.com/adafruit/tinyuf2/releases/download/0.12.0/tinyuf2-adafruit_feather_esp32s3_tft-0.12.0.zip at address 0, which works fine on https://adafruit.github.io/Adafruit_WebSerial_ESPTool/. However, I'd love to retire that tool in favor of this one once it is reliable enough.

The board I'm testing with is https://www.adafruit.com/product/5483. However, there's a number of bootloaders for espboards at https://github.com/adafruit/tinyuf2/releases if you want to test with a similar one.

#83 looks kind of promising for fixing the issue though.

@makermelissa I have tried the PR #83 with the binary linked tinyuf2 binary and flashing was successful. I've pushed this branch also to https://igrr.github.io/esptool-js/ for you to try.

Ok, I just tried it and it worked great. Thank you. It looks like this tool is getting very close now.

@igrr The timeout problem still seems to exist on ESP32 S3 USB JTAG/DEBUG mode.
I have tested https://igrr.github.io/esptool-js/ and https://espressif.github.io/esptool-js/.

@igrr The timeout problem still seems to exist on ESP32 S3 USB JTAG/DEBUG mode. I have tested https://igrr.github.io/esptool-js/ and https://espressif.github.io/esptool-js/.

Confirm this issue is also existing on C3, esptool-js keep timeout although python version work, but with --no-stub flag onl


Initial creation of Batch Operation prototype.

Creation of Batch Operation prototype.
Note to attestation team members: This is a prototype of some design work. It is not intended to ever be merged with main.

What is the plan of checking in deferred_operation.hpp and what is the plan for a beta release?

What is the plan of checking in deferred_operation.hpp and what is the plan for a beta release?

There is none. This feature branch will remain as a reference for you when you implement the pattern.

There is none. This feature branch will remain as a reference for you when you implement the pattern.

Is there going to be a separate PR?
Let's say I can get storage blob batch implementation done by today and I'll check-in the code into storage code base. Because the code depends on some definition in deferred_operation.hpp like DeferredResponse<T> and DeferredResponseFactory, the code won't compile if you don't check in deferred_operation.hpp.


[updateUnifiData-login site undefined] error: timeout of 5000ms exceeded

Since maybe a few weeks i have the following error in my iobroker log. after this error happens, the adapter stops working which means, that the datapoints are not updated anymore, for example is_online or last_seen (which i use for presence). The instance is still green.
After a restart it worked again until the error occurs again.
2023-10-19 05:17:57.608 - error: unifi.0 (1116221) [updateUnifiData-login site undefined] error: timeout of 5000ms exceeded, stack: AxiosError: timeout of 5000ms exceeded
at RedirectableRequest.handleRequestTimeout (/opt/iobroker/node_modules/node-unifi/node_modules/axios/lib/adapters/http.js:628:16)
at RedirectableRequest.emit (node:events:513:28)
at RedirectableRequest.emit (node:domain:489:12)
at Timeout. (/opt/iobroker/node_modules/follow-redirects/index.js:169:12)
at listOnTimeout (node:internal/timers:569:17)
at processTimers (node:internal/timers:512:7)

(is_online has to be false^^)

Adapter version: 0.6.6
JS-Controller version: 5.0.12
Node version: 18.16.1
Operating system: Ubuntu 22.04.2

Yesterday i updated my Unifi-Controller to 7.5.187 but the error was also on the previous Controller Version.

Seeing the same issue. It looks like the timeout has been introduced by node-unifi version 2.4.1: https://github.com/jens-maus/node-unifi/commit/8ccb7523110962dd928a3fb39d60502c3a8e0d0d
The updated node-unifi has is part of ioBroker.unifi 0.6.5: https://github.com/iobroker-community-adapters/ioBroker.unifi/commit/5da321c74411e18239d723c34d7677ba7d61a641
The adapter should probably identify the timeout and trigger an update anyway.
Updating line 265 (and following) in main.js to the following code works for me  (warning: this is not a recommended patch, since it will hammer the target in case of a login failure):
try {
    await defaultController.login();
} catch (err) {
    this.handleError(err, undefined, 'updateUnifiData-login');

    this.queryTimeout = setTimeout(() => {
        this.updateUnifiData();
    }, this.settings.updateInterval);

    return;
}

with V3.2.5 on UDM Pro the login is with the adapter not possible any more.. any ideas?
The change above is not working here.

with V3.2.5 on UDM Pro the login is with the adapter not possible any more.. any ideas? The change above is not working here.

If 3.2.5 is not working with node-unifi, please report your issue there, This is nothing that have to be handled in ioBroker.unifi separately. However, please note that v3.2.5 is still a beta version known to have severe issues as it seems (https://ubiquiti-networks-forum.de/board/thread/8516-unifi-os-3-2-5-ein-totaler-flopp/?postID=103950).


#118 - New hover-freeze and toggle-freeze

For this Issue

Hi,
Thanks for this pull request. This looks like a reasonable change. I'd just like to try it out a little bit before merging and releasing it, but I should be able to find some time for that in the next several days.
One change I'd like to request though is to remove the various links to examples and demos. I have my own page with demos that I'll update to show this new feature. I'd rather keep it all gathered in one place on my github pages. They're hiding in the gh-pages branch if you want to make a PR for updating those too.

Sounds good, @wittlock!
I'll change it soon, I didn't know about the hidden pages... Thanks for this info!

@wittlock I did a new example and the PR is open

@wittlock About the others adjustments: I'll change it soon.

@wittlock ✔Done!

I haven't forgotten about this. It looks good now. I just have been quite busy lately so I haven't had time to do a quick test and package a release. I promise I'm trying to find some time for it as soon as I can.
I'm also terribly sorry that I was unclear and you went through the trouble of updating the example. I just meant you could remove the links to the other one and I would have updated it. Recreating it without access to the source sounds like a pain. I appreciate the effort though!
Hang tight, hopefully a release can happen during this week sometime!

No problem!


Use bpf_probe_read_user

Consider using the bpf_probe_read_user helper function within your bpf program. It is recommended to use this over bpf_probe_read.
It is also recommended within the man pages: bpf-helpers(7)

Oh thanks for the tips, I'm still learning a lot from eBPF! Thanks a lot!


Stop focusing on test_id 4747

This focus was merged accidentally as part of this commit:
220bd65bfcf3102bc8b1daf6a0485f5384853bc1
Release note:

NONE

/test pull-kubevirt-goveralls
/test pull-kubevirt-unit-test

/test pull-kubevirt-goveralls


the groupId property for @KafkaListener is invalid

There is a problem for KafkaListener .
When I set a value to groupId and I want to consumer specified group id info,but it is invalid.
The code like
@KafkaListener(topics = "order-create-apply", groupId="order-group")

Your issue is not clear; please explain in more detail, with an example.
Thanks.

Now I have two group in Kakfa. One name is order-group ,the other one is user-group.
and I have two Consumer consume the message.
There is a topic with the same name in the two groups, the topic name is create-order. Now I have specified a different group name in the annotation, but it still listen to all the names that are create-order when I consume, and will not distinguish between groups.

Sorry, it's still not clear what you mean.
Topics are not "in" groups. A consumer group simply represents a group of consumers and the group consumes from one or more topics.
All groups will get all messages from the subscribed topic(s); there is no way to select messages within a topic.
Perhaps some code or a diagram will help explain your problem?

Thank you for your reply, I understand what it meant, I confused the concept


Features proposal

I understand the idea is to keep it as simply as possible, but it would be nice to have:

Ability to have Push Panels instead of Slide/Reveal.
Ability to have the navigation appear on top of the content instead of behind. This means, animating the hidden menu translateX instead of content, and obviously higher z-index.
Ability to have it on the right, instead of the left (this might get tricky with overflows).

Would you be accepting PRs for these?

Tomás, thanks for the proposals. We will accept prs for all of them.

Ability to have the navigation appear on top of the content instead of behind. This means, animating the hidden menu translateX instead of content, and obviously higher z-index.

@tomasdev Have you started any work on this feature? I also find it a bit distracting to have the content overlap the menu when the transition happens.

@phillipadsmith nope, haven't had the time. Feel free to do it.

@tomasdev Actually, mucking about with it, I'm not sure it requires more than a z-index: 1 on .slideout-menu   Perhaps, I am missing something?

@phillipadsmith yes sir, it is z-index + animating the menu instead of animating the content.

yes sir, it is z-index + animating the menu instead of animating the content.

Is the animation you reference necessary? What I'm seeing here is that simply setting the z-index on .slideout-menu solves the issue I was experiencing with overlapping content. That can be achieved easily without any update to the library.

+1 for Ability to have the navigation appear on top of the content instead of behind. This means, animating the hidden menu translateX instead of content, and obviously higher z-index.


Yaml does not parse

https://github.com/Rohit-Xapads/Xapads_Tracking_CPS_SDK/blob/bb1e9a8afad948c2494b3d257bb9085fb7fd0bed/metadata.yaml#L1
I'm attempting to perform the review of the template and your YAML file is not parsing due to the comma after homepage.

Dear Philpott,
Comma is removed. Please refer to the new commit and review them again and let us know.


Write function to get pokemon array from storage and display it on the cards and combined chart

awaiting pull request review


go generate command fails on running make pre-commit -B

Summary
Running make pre-commit -B gives the following error
go generate ./persist/sqldb ./pkg/plugins ./pkg/apiclient/workflow ./server/auth ./server/auth/sso ./workflow/executor
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:12 internal error: package "upper.io/db.v3/lib/sqlbuilder" without types was imported from "github.com/argoproj/argo-workflows/v3/persist/sqldb"
persist/sqldb/workflow_archive.go:49: running "mockery": exit status 1
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:13 internal error: package "github.com/argoproj/pkg/grpc/http" without types was imported from "github.com/argoproj/argo-workflows/v3/pkg/apiclient/workflow"
pkg/apiclient/workflow/workflow.go:3: running "mockery": exit status 1
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:14 internal error: package "context" without types was imported from "github.com/argoproj/argo-workflows/v3/server/auth"
server/auth/gatekeeper.go:47: running "mockery": exit status 1
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:15 internal error: package "fmt" without types was imported from "github.com/argoproj/argo-workflows/v3/server/auth/sso"
server/auth/sso/sso.go:37: running "mockery": exit status 1
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:17 internal error: package "bytes" without types was imported from "github.com/argoproj/argo-workflows/v3/workflow/executor"
workflow/executor/executor.go:89: running "mockery": exit status 1
make: *** [Makefile:278: docs] Error 1

This can be fixed by bumping github.com/vektra/mockery from  v2.9.4 -> v2.10.0
see: https://github.com/vektra/mockery/issues/416

Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

Would you like to submit a PR to fix this?


Review unneeded variables

main.py issues

@pass_config in main is not currently used
import os not used
SecretClient is not used

handle_scan_event = None & reporter = None

Both variables are set in main.py & webinspectorscanhelpers.py

more main.py issues

servers_list(config) (line 352) has no usages

webinspectconfig.py

Class WebInspectEndpoint has no usage


Allow custom loader to be provided

My use-case is that I have an object of objects, for which there are no real correspending files (let's say they come from a database), let's say:
const oaData = {
  'index.foo': {openapi: '3.0.2', ...},
  'schemas.foo': {...}
};

and my refs are like:
{ $ref: 'schemas.foo#/components/schemas/foofoo' }

When json-refs is used with it like this, there's no real way to fetch such references with a processContent function because PathLoader will try to resolve to process.cwd() and of course won't find such files.
What I suggest is providing an option for a simple function that gets an unmangled uri and then either returns an object (or error) as-is (synchronous), or returns a promise (asynchronous). You could name it customLoader or somesuch.
It could even have some matcher function to provide a way to validate whether to use the customLoader or fall back to PathLoader ending up with a simplest use-case (using the oaData from above) such as:
resolveRefs(oaData['index.foo'], {
  useCustomLoader: uri => !!oaData[uri],
  customLoader: uri => oaData[uri]
}).then(buildAPI);

or let's say from an async database loader such as:
resolveRefs(oaIndex, {
  overrideLoader: uri.startsWith('mydb://'),
  customLoader: uri => dbLoader(uri).then(res => JSON.parse(res.oa_data))
}).then(buildAPI);

I guess it's time I get this supported: https://github.com/whitlockjc/path-loader/issues/1


feat: account model

Pull Request type

Please check the type of change your PR introduces:

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] Documentation content changes
[ ] Other (please describe):

What is the current behavior?

Resolves: #448
What is the new behavior?

Account enum model allowing us to fetch the correct type of account deployed at an address
Refactored balance to be an account method and call the correct logic based on the account type

Does this introduce a breaking change?

[ ] Yes
[ ] No

I wonder if it makes sense to modify the entrypoints in Kakarot then,
maybe only for
/// Gets the balance associated to a contract account
fn contract_account_balance(self: @ContractState, evm_address: EthAddress) -> u256 {
let ca = ContractAccountTrait::new(evm_address);
ca.balance().unwrap()
}

I wonder if it makes sense to modify the entrypoints in Kakarot then,

Modify to what? Generic account_balance or account_storage_at rather than contract_account specifically?

I wonder if it makes sense to modify the entrypoints in Kakarot then,

Modify to what? Generic account_balance or account_storage_at rather than contract_account specifically?

I guess, storage_at and nonce cannot be made generic, or they can and will panic in case it points to an EOA

Refactored contract_account_balance entrypoint to account_balance
Removed useless comments


Didn't work for 2012 R2 ADFS

Hi,
I tried the instructions above, but they didn't work. Using "Set-AdfsProperties -WIASupportedUserAgents ((Get-ADFSProperties | Select -ExpandProperty WIASupportedUserAgents) + “Chrome”)" to add Chrome to my existing list didn't provide SSO for Chrome. This resulted in the WIASupportedUserAgents being:
MSAuthHost/1.0/In-Domain
MSIE 6.0
MSIE 7.0
MSIE 8.0
MSIE 9.0
MSIE 10.0
Trident/7.0
MSIPC
Windows Rights Management Client
Mozilla/5.0
Edge/12
Chrome
I then restarted ADFS services and tested, but no luck. The browser user agent string from Chrome reports as below from whoishostingthis. Does the entire string below need adding? If so, does it need updating for new Chrome versions?
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36

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

ID: 3d6a8f34-a392-d1f2-fb61-0d34bca5ab0d
Version Independent ID: a6cb49c5-2ac2-77e8-7f39-493713f7e9a8
Content: Configuring intranet forms-based authentication for devices that do not support WIA
Content Source: WindowsServerDocs/identity/ad-fs/operations/Configure-intranet-forms-based-authentication-for-devices-that-do-not-support-WIA.md
Product: windows-server-threshold
GitHub Login: @billmath
Microsoft Alias: billmath

Any update on this issue? We're running into the same problem.

Hi, Mozilla/5.0 should cover all of Chrome, as far as I know.  Did you remember to update your Authentication Policies in AD FS Management and update the end user's Security settings (as follows)?  In addition, once updating WIASupportedUserAgents, you need to open Services to restart the Active Directory Federation Services service on each of the ADFS farm servers for the changes to take effect.  You do not need to make any changes to the proxy servers.
Update Authentication Policies:
Open ADFS Management.
Click Authentication Policies.
Click Edit Global Primary Authentication.
In Primary Authentication, Global Settings, Authentication Methods, click Edit.
In the intranet section, select Windows Authentication. Optionally select Forms Authentication. Forms Authentication allows users who cannot use IWA, such as Linux and Mac users, to authenticate with SAML.
In end user’s browser…

Internet Options>Security
Select Local intranet and click “Sites”
Click “Advanced”
Enter full https URL of AD FS service and click Add
These configurations can be pushed to all end users via Group Policy

Our issue was that, when using Mozilla/5.0 as a user agent, it would also pick up iOS devices on the corporate wifi using Safari or Chrome and try to pass in windows credentials. On websites, this would cause a browser dialog to open (instead of the forms page) and on native apps using ADFS sign in it wouldn't work at all. In order to get around this, we needed to add "Windows\s*NT.*Chrome" to the user agent list so that it only picked up Chrome on windows and not Safari/Chrome on iOS devices.

(Ref. #4342)

#please-close

#assign:IngridAtMicrosoft


Bug: configuration parsing throws wrong errors on missing foriegn key relations

Summary
When a foreign relation is missing, the configuration parser throws misleading errors.
Steps To Reproduce
Run Kong 2.0.2 with DB-less mode
$ cat kong.json
{
  "_format_version": "1.1",
  "consumers": [
    {
      "username": "consumer-test",
      "basicauth_credentials": [
        {
          "username": "some_user",
          "password": "some_password"
        }
      ]
    }
  ],
  "plugins": [
    {
      "name": "request-transformer",
      "config": {
        "add": {
          "body": [],
          "headers": [],
          "querystring": []
        },
        "append": {
          "body": [],
          "headers": [
            "X-Another-Header:foo"
          ],
          "querystring": []
        },
        "remove": {
          "body": [],
          "headers": [
            "X-Another-Header"
          ],
          "querystring": []
        },
        "rename": {
          "body": [],
          "headers": [],
          "querystring": []
        },
        "replace": {
          "body": [],
          "headers": [],
          "querystring": [],
          "uri": null
        }
      },
      "route": "does-not-exist",
      "enabled": true,
      "protocols": [
        "http",
        "https"
      ]
    }
  ]
}
$ http :8001/config < kong.json
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 362
Content-Type: application/json; charset=utf-8
Date: Fri, 03 Apr 2020 00:03:11 GMT
Server: kong/2.0.1
X-Kong-Admin-Latency: 275

{
    "code": 14,
    "fields": {
        "consumers": [
            {
                "basicauth_credentials": [
                    {
                        "@entity": [
                            "all or none of these fields must be set: 'password', 'consumer.id'"
                        ]
                    }
                ]
            }
        ]
    },
    "message": "declarative config is invalid: {consumers={{basicauth_credentials={{[\"@entity\"]={\"all or none of these fields must be set: 'password', 'consumer.id'\"}}}}}}",
    "name": "invalid declarative configuration"
}

If you remove the broken route relation on the above plugin, then the configuration is correctly parsed.
Additional Details & Logs

Kong version ($ kong version) 2.0.2

I think I ran into the same issue with this simpler example:
_format_version: "1.1"

consumers:
- username: test
  basicauth_credentials:
  - username: test-user
    password: test-pass
- username: test2
  plugins:
  - name: acl
    config:
      blacklist: [dummy]

Results in this error:
$ kong config parse test-kong.yaml
Error: Failed parsing:
in 'consumers':
  - in entry 1 of 'consumers':
    in 'basicauth_credentials':
      - in entry 1 of 'basicauth_credentials':
        in '@entity':
          - in entry 1 of '@entity': all or none of these fields must be set: 'password', 'consumer.id'

  Run with --v (verbose) or --vv (debug) for more details

I've just run into this again. In my previous example it's invalid to define the acl plugin against a consumer (although without basicauth_credentials specified anywhere the config parser does not throw an error which it probably should).
This time however I think the config should be valid, the config parse doesn't throw an error without basicauth_credentials specified, but I'm not entirely sure if it's just a bug with the basicauth_credentials or if it's a bug with the route/plugin object.
This errors:
_format_version: "1.1"

services:
- name: test-service
  routes:
  - paths:
    - /test/path
    plugins:
    - name: key-auth
  url: https://example.com

consumers:
- username: test-user
  basicauth_credentials:
  - username: test-username
    password: test-password

While this works fine:
_format_version: "1.1"

services:
- name: test-service
  routes:
  - name: test-route
    paths:
    - /test/path
    plugins:
    - name: key-auth
  url: https://example.com

consumers:
- username: test-user
  basicauth_credentials:
  - username: test-username
    password: test-password

Note the only difference is the route object having a name in the second example. It also works if you explicitly specify an id for the route instead of a name. Should specifying name or id mandatory in such cases? To me it seems like it shouldn't, and indeed if basicauth_credentials aren't provided no error occurs, but in other instances of this bug it's been due to invalid configuration so maybe not? Of note if the key-auth plugin is removed from the route definition the error also doesn't occur.
Happy to raise this as a separate issue if there is a bug in the interactions between the route and plugin objects as well, but would like confirmation that is the case first.
Running Kong 2.0.4

Hello @nvx your issue (config throwing error if the route has a name, but not otherwise) seems like a different one from the one @hbagdi created - even if they are probably related. Please raise it as a separate one.


Misleading exception from FetchService.xxxJson() when server returns 200 w/empty response

We have special handling within FetchService to correctly return null from an API call that returns 204 NO_CONTENT and an empty response body.
However if an API returns 200 OK instead with an empty body, we throw on attemping to call r.json() and the exception handling wrapped around the call within FetchService ends up returning a misleading Exception. serverUnavailable() with the message Unable to contact the server at ${origin}.
This just confused @Ryanseanlee and I as we were seeing the network request to the API go through OK and respond with a 200 (before we noticed the empty body), so it very obviously did contact the server OK, but then was tripped up by its unexpected empty response.
For the particular case here we are contacting the API developers to have them return a non-empty body or a 204, but the misleading exception made it more difficult to debug.

Interesting comment here about browser support for empty responses:
https://developer.mozilla.org/en-US/docs/Web/API/Response/body
Would be good (and trivial) to at least code to this standard by checking body before calling .json()  Would be even better if chrome respected that!

Ran into another version of this just now with an API that returns 202 Accepted in response to a successful PATCH request - looks like we are throwing in the same way.
@jskupsik I'm referring to the new approvals endpoint on our client project - might be reason enough to take a look at this Hoist ticket and resolve it to better support this class of "empty but successful" responses.

I was thinking about a FetchOptions argument:
    /**
     * If set, response body will be always ignored or never ignored, regardless of status code.
     * Default behavior: null response bodies generally throw an error, except for status codes in
     * {@link NO_JSON_RESPONSES} in which cases the body is ignored.
     */
    ignoreBody?: boolean;

Is there any value in an (unexpected) body-less response throwing and being treated by hoist as a failed response, unless the developer explicitly opts into accepting it? I would improve the error message in this case.
If we don't do the strategy above and check for the existence of a body on the response, do we still want to always ignore the body for 204s and 205s as we currently do, or should we return the body if we ever do happen to get a 204 with a body?

Why wouldn't you just use fetchService.fetch() if you did not actually want the body?

In the end we determined that just improving the exception so that it was less confusing was the safest choice.
We considered  replacing the native .json() with a custom version, but decided we risk missing out on any browser optimizations there.
We also considered adding a flag of the form alwaysAllowEmptyResponse to the fetch ops but are holding off on that.   The new exception warns to go use fetch() directly...


Tester says "internal error" on stage 5 for a user error

Logs:
Dec 19 12:49:00 148e5315b37068 vector [stage-5] Creating some files & directories
Dec 19 12:49:00 148e5315b37068 vector [stage-5] $ ./your_git.sh write-tree
Dec 19 12:49:00 148e5315b37068 vector [your_program] aec2d24a22463ac63c7ec9684903f7f5ba292c79
Dec 19 12:49:00 148e5315b37068 vector [stage-5] Reading file at .git/objects/ae/c2d24a22463ac63c7ec9684903f7f5ba292c79
Dec 19 12:49:00 148e5315b37068 vector Error [stage-5] CodeCrafters internal error. Error reading .git/objects/ae/c2d24a22463ac63c7ec9684903f7f5ba292c79: open /tmp/worktree814524593/.git/objects/ae/c2d24a22463ac63c7ec9684903f7f5ba292c79: no such file or directory
Dec 19 12:49:00 148e5315b37068 vector [stage-5] Test failed

Here's our code that's supposed to filter user vs. internal error:
	if err == os.ErrNotExist {
		return fmt.Errorf("Did you write the tree object? Did not find a file in .git/objects/<first 2 chars of sha>/<remaining chars of sha>")
	} else if err != nil {
		return fmt.Errorf("CodeCrafters internal error. Error reading %v: %v", relativePath, err)
	}

Looks like this specific instance of "no such file or directory" isn't covered by os.ErrNotExist?

Relevant ChatGPT convo: https://chat.openai.com/share/a8e0acc3-2a33-4e00-bc04-4ef8962c9673
Looks like we should use errors.Is instead?


Question: Where do I find post.hbs?

Hi
Sorry for the basic question. I'm trying to add the facebook comments to my blog but I don't know how to find my post.hbs file. I'm using Ghost Pro and simply drag and drop images directly on the webpage and also write directly on the webpage. I don't directly see the files and directories.
Can anyone help? Thanks!
PS: I'm using the Casper theme

hi @catherineberaud.
On Ghost(Pro) users don't have direct access to the source. If you'd like to upload a custom theme file the best thing is to jump onto the support Slack (https://ghost.org/slack/) or contact<EMAIL_ADDRESS>

Thank you. I'll follow up with the support team.

Thank you. I'll follow up with the support team.

Thank you. I'll follow up with the support team.

Thank you. I'll follow up with the support team.

:)


Vale: test with several files

What are you changing in this pull request and why?
Testing linter with several files

closing as testing done and approved by Ly


iOS Push Notification (APN) is not working in the Testflight mode.

Bug Report
Cordova Push Plugins is working well while app is in the development. But after uploading to the testflight, it is not receiving the notification (APN).
Expected Behaviour
It should work at both of development and release.
Actual Behaviour
It is working while app is in the development. (debug mode + Xcode),
But not working with the testflight.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS - 14.2
cordova info Printout
Ionic:
Ionic CLI                     : 6.12.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework               : @ionic/angular 5.3.4
@angular-devkit/build-angular : 0.1000.8
@angular-devkit/schematics    : 10.0.8
@angular/cli                  : 10.0.8
@ionic/angular-toolkit        : 2.3.3
Cordova:
Cordova CLI       : 10.0.0
Cordova Platforms : ios 6.1.1
Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 16 other plugins)
Utility:
cordova-res                          : not installed
native-run (update available: 1.3.0) : 1.2.2
System:
Android SDK Tools : 26.1.1 (/Users/devmaster/Library/Android/sdk)
ios-deploy        : 1.11.3
ios-sim           : 8.0.2
NodeJS            : v14.15.0 (/usr/local/bin/node)
npm               : 6.14.8
OS                : macOS Catalina
Xcode             : Xcode 12.2 Build version 12B45b

So what you're saying is that when you install the app on your iPhone through XCode, you properly receive the notifications using APN (not using Google Firebase), but as soon as you publish the app on Test Flight, you can't receive the notifications?
On my part I also can't receive push notifications on Test Flight, but I can't test locally as I don't have any iPhone.
When using the simulator, are you able to send it a push notification (see Testing Remote Push Notification in iOS simulator)?

@stardevrk Any update on this issue? Were you able to fix the problem?

Same ISSUE. I have configured it several times and the error persists, the iphone only sends push notifications when I have it in debug mode.

@Heshyo As of today, notifications work on TestFlight.
@stardevrk Are you swapping out your certificates on your intermediary server for TestFlight builds?  TestFlight uses production certificates.  You can confirm this at the last step before uploading your build to AppStoreConnect, as seen here:

@llunn Thanks for testing. Are you using version 2.0.1-dev.0?
Also did you try sending a notification to the simulator (see Testing Remote Push Notification in iOS simulator)?
With this plugin, I don't receive anything in the simulator, but with the FirebaseX plugin, I do receiving the notification.
If it's working for you, then there's probably an issue with my dev environment.

@Heshyo This is using v2.0.0 directly from npm registry.
Package lock info:
"@havesource/cordova-plugin-push": {
            "version": "2.0.0",
            "resolved"<EMAIL_ADDRESS>            "integrity": "sha512-1FwXucwqpK3wk3VcbrxM1ybjKLpl7pIY8XQ4WF/ejxYgYIbvMwHLWk6UW8j8hR8G/Jo3qJZLnZR7EOxpSCjTxQ==",
            "dev": true
        },

I typically do not use the simulator to avoid having to confirm functionality on the device as well.  However, i fired up a iPhone 11 simulator using iOS 14.4 and got this:

I took a very quick look through the source for this plugin doesn't contain that remote notifications are not supported in the simulator, so that error message is either coming from the simulator itself or some other dependency.
With respect to push notifications, my particular iOS setup is simple and I am using only APNS.
I would try on an actual device.  Hope this helps.

@llunn Thanks, I'll test again with that version and double check the config.
FYI, real push notifications do not work on the simulator, but you can drag and drop a JSON file containing specific fields onto your simulator to fake receiving a notification.

After cleaning the project, removing then adding again the v2.0.0 plugin, the JSON notification appears in the Simulator, and I can receive notifications on real devices (tested with FCM) through TestFlight.

Closing this ticket as stale, as it may no longer be valid.
I tested extensively against the main branch using both simulator builds and debug/ad-hoc builds on a device. Push notifications were successfully sent to the device without any issues.
For simulators, I tested by dropping an APN payload directly into the simulator and by using the CLI with xcrun.
I recommend upgrading your project and testing against the main branch or waiting for the next major release. If the issue persists after upgrading, please create a new ticket with updated information for further investigation.


path/filepath: Glob does not work at Windows drive root

Please answer these questions before submitting your issue. Thanks!

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

1.6

What operating system and processor architecture are you using (go env)?

Windows AMD64

What did you do?

	res, _ := filepath.Glob("C:\\*")
	for _, match := range res {
		fmt.Println(match)
	}

What did you expect to see?

C:\$$PendingFiles
C:\$Recycle.Bin
C:\AudioSwitch
...

What did you see instead?

C:goplay
C:goplay.go
C:liteide

It seems that it lists content of the $PWD, and then blindly prepends C: to stuff.
The workaround seems to be to use double slashes C:\\\\*, so that only one separator would get trimmed off.

@AudriusButkevicius filepath.Glob code was changed recently (see issue #14949 for details). Perhaps your issue was fixed too. Please try current tip, to see if your issue is fixed on current tip. Thank you.
Alex

Works on tip


Charged particles

Do you think this code could be modifed to include particles with different properties like charge, ie positive particles would stick if they touched negative particles , but repel or not stick to other positive particles?

Yes surely. But the interaction would need to be discontinuous.
In EDMD.h, you can had a property to the type particle that would be the charge. Then, you could use the already implemented algorithm for square shoulder  (U>0)   and square well potential (U<0) to behave differently according to the type of the two particles colliding. If both particles have the same charge, you’d want to use the interaction with U > 0, otherwise, you’d use the interaction with U < 0.

I added a minimal charged particle example. You can look at the last commit change to see what I did. You can also compile the new code. You have a new button:
 alongside the % of charged particle (with the same charge, there're only + and - charges, with same absolute value of charge). You can control the attraction/repulsion strenght between different/same charges using U (-U and U are the same, only the absolute value of U matters). You can also display different charge in different color with the dropdown:

That was a cool idea, you can obtain very nice patterns:

In physics, this is called Frustration. You have geometrical constraint (here the volume and the number of particle are fixed) and the system tries to minimize its energy. Off course, every particles cannot have only the neighbors it would like to have, so it has to do some compromise. On top of that, these kind of systems are known to have a very slow dynamics (we call them Glasses) and do not manage to find the minimal energy state easily, so for a very very very long time, you only see a system that is in a local minimum of energy and not a global one.

wow thanks for the quick response and change in code!!!  this program could have really interesting biology applications with just a couple more additions .  I work in a lab where we study nanoparticle interactions with various pathogens (viruses and bacteria) and we use zeta potential (which is the measure of the particles charge ) to predict interactions but we currently only perform wetlab experiements  I saw your comment on youtube , what makes the neutral particle more difficult(just curious not trying to be a jerk) ?  Would it be possible to have certain particles that follow the old interaction equation that didn;t include the charge rule? (i have no coding experience so maybe thats a dumb suggestion)

I attached a silly drawing to illustrate what would be a dream program , essentially each color has a denoted charge amount(-20,15, 4 ,-2 etc. or 0) and then you could see how the particles interact as time progresses.   No idea if this is possible within the framework of your program or if this is a huge undertaking but figured I would put it out there since the program seems to be pretty powerful already.  Thanks for all of this already!!!

I added neutral particles (see last commit), grey-blue particles are neutral and free fly between the others. By hard I meant that to be done "nicely" it requires a bit of work. These types of simulations (event driven) really really like that all particles follow the same rules. Here, I made a particle neutral by simply asking for it to ignore a large chunk of code (or rule), but a lot of computations are still lost for "nothing"...
Yes, the drawing you show is more or less possible to simulate up to some issues:

The algorithm really dislikes varying sizes (as you might have seen with the button "polydispersity"), especially if we add a potential on top.
For now we cannot really add particles by "hand" and for very specific initial configurations such as yours we would need to "program" the initial condition by hand or give them through a initial config file (this is partially implemented).
I'm also using this program for some unrelated work and I don't want to bloat it too much (especially not things that could slow down the main algorithm, but surely I could make an other version!)

Other than that, this should be pretty straightforward to do. Instead of relying on a global potential energy U, we could rely, for each interaction on a particle-particle one. That would for example be U_12 = charge particle 1 * charge particle 2 * mass particle 1 * mass particle 2. If you have in mind a simple initial condition (that can be simply algorithmically described), I can give it a shot!
But for these kind of things, you would be better with LAMMPS (not "event driven" and slower (in single processor), but way more powerful and versatile) or DYNAMO if you want to stay close to the "event driven molecular dynamics" paradigm (that I think Bio people like a lot for proteins and stuff like that). Both of them give you total control over the program through a scripting language (well the scripting language of LAMMPS is a total absurdity, but it is the price to pay for such versatility)

I tried updating but im not seeing the neutral particles?  does git fetch work?

Strange
You don't see these two sliders (% of + particles and % of neutral particles) when clicking on charged?

In addition to:

coloring by "charge"?
The commits seem to have worked well:

i see color by charge , whats the right way to update the program?  im using "git fetch", "git pull origin main" and it doesn't give me an error but something isn't working

Ah that's very strange...  you can try to do git stash and then pull again. Or create a new directory and do a new git clone in it. To start fresh?

oh didn't realize I had to run "make" after updating!

its working now

Cool

To your earlier comments I may eventually try LAAMP but the learning curve is prohibitively high the fact that I can already play around with your program and that I can watch the results live is pretty nice, even if the results aren't going to be as accurate as LAAMP .   If you are still willing to make changes (whenever you have the time to) I would probably still try this instead.


ctrl-c handling

when started via docker I THINK won't handle ctrl-c properly

yarn does ctrl-c handling for us so not a problem :)


[FLINK-28749] Include resource type in KubernetesOperatorResourceNamespaceMetricGroup

What is the purpose of the change
This PR should be merged only after https://github.com/apache/flink-kubernetes-operator/pull/338
Include the resource class name FlinkDeployment/FlinkSessionJob directly in the KuberentesOperatorResourceNamespace metric group and expose it as part of the first component before the metric name.
This eliminates the need to add custom logic for any metric to include the resource name and makes it unifies across the codebase.
This PR introduces some changes to the reporting of some (previously inconsistently named) metrics:
JmDeploymentStatus metrics
BEFORE:
namespace.default.JmDeploymentStatus.READY.Count

AFTER:
namespace.default.FlinkDeployment.JmDeploymentStatus.READY.Count

JOSDK metrics metrics
BEFORE
resource.default.basic-example.JOSDK.Reconciliation.finished.Count
namespace.default.JOSDK.FlinkDeployment.reconcile.resource.TimeSeconds

AFTER
resource.default.basic-example.FlinkDeployment.JOSDK.Reconciliation.finished.Count
namespace.default.FlinkDeployment.JOSDK.reconcile.resource.TimeSeconds

Brief change log

Include the resource class name FlinkDeployment/FlinkSessionJob
Remove current manual adding of FlinkDeployment/Sessionjob to metric group
Update JOSDK metric logic to always extract the resource class from metadata (improvement in 3.1.0)
Update existing tests

Verifying this change
This change is already covered by existing tests, which have been updated.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changes to the CustomResourceDescriptors: no
Core observer or reconciler logic that is regularly executed: no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? docs

cc @morhidi

nice one, left minor comments.

@morhidi , I addressed your comment, please take a look :)

+1 LGTM


⚠ SOAP Platform (ETU) has degraded performance

In ecace22, SOAP Platform (ETU) (https://soap-etu.six-group.com/healthcheck) experienced degraded performance:

HTTP code: 503
Response time: 25942 ms

Resolved: SOAP Platform (ETU) performance has improved in 47864cc.


Migrations should result in a valid definition

Either use placeholders (e.g. when a request requires a name, make it name: DEFAULTRESPONSENAMECHANGEME or have the CLI prompt the user for the parameter value)

IMO leaving name missing is better than a dummy name that you might not notice

Going to close this issue for more specific issues.


Calculating basic statistics using moor

I am using the below function to get the summary of the last journey
 Stream <LastJourneyDetails>lastJourneySummary(){

final query = selectOnly(journeys).join([
  innerJoin(
    routePoints,
    routePoints.journeyId.equalsExp(journeys.journeyId),
    useColumns: false,
  )
])
  ..groupBy([routePoints.journeyId]);

   final journeyIdE=journeys.journeyId;

    final startTimelast = journeys.startTime;
    final endTimelast = journeys.endTime;
    final  LatitudeStartE= journeys.latitudeStart;
    final longitudeStartE= journeys.longitudeStart;
    final  LatitudeEndE= journeys.latitudeEnd;
    final longitudeEndE= journeys.longitudeEnd;
    final avgSpeedlast = routePoints.speed.avg(); //in km/hr
    final avgRisklast = routePoints.riskPoint.avg();
    final totalDistancelast =routePoints.odometer.sum(); // in meters

    query
      .addColumns([
        journeyIdE,
        startTimelast,
        endTimelast,
        totalDistancelast,
        LatitudeStartE,
        longitudeStartE,
        LatitudeEndE,
        longitudeEndE,
        avgRisklast,
        avgSpeedlast
      ]);

    return query.watch().map((row) {

       return LastJourneyDetails(
          startTime: row.last.read(startTimelast),
          endTime: row.last.read(endTimelast),
          distance: row.last.read(totalDistancelast) / 1000, //in KM
          avgSpeed: row.last.read(avgSpeedlast) * 3.6, //in km/hr
          safety: 10 - row.last.read(avgRisklast), // safety =10-risk
          latitudeStart:row.last.read(LatitudeStartE),
          longitudeStart:row.last.read(longitudeStartE),
          latitudeEnd: row.last.read( LatitudeEndE),
          longitudeEnd:row.last.read(longitudeEndE),
        );

      });

  }

I have three questions...

Is the above code correct ?...is it the right way to use moor to get the above details or there is a better shorter way to do that ....for example, I don't think 'join' is necessary since summarizing statistics I need can exist in each table separately but I tried to do it without join and it did not work
How can I calculate new statistics using moor....specifically the median, mode, std,.....etc?
Is it possible to do something like below using moor

 final medianSpeedlast = routePoints.speed.median();
 final modeSpeedlast = routePoints.speed.mode();

If this feature is not available in moor currently how can I get these statistics using moor syntax?

Finally thanks a lot for your amazing plugin and your amazing effort to keep it up-to-date and thank you very much for answering all my questions promptly.

From a quick look, your code looks correct to me.

I don't think 'join' is necessary since summarizing statistics

You're summarizing statistics of routePoints though (via avgSpeedlast, avgRisklast, totalDistancelast). For it to be available, you need to join that table. The groupBy is necessary since you want to take stats for each journey independently.

How can I calculate new statistics using moor....specifically the median, mode, std,.....etc?

You can do that, but it requires some special setup which I'll share below. Alternatively, you could also load the routePoints in Dart and just use them. That might be more efficient if you're calculating multiple values at once.
To do this, you need to use moor version 3.3.0 or later. You also need to migrate from package:moor_ffi to package:moor/ffi, as described here.
Since sqlite3 doesn't have a builtin implementation for most statistical functions, you'll need to write them yourself. For example, an implementation for MEDIAN could look like this:
class _MedianSqlFunction implements AggregateFunction<List<double>> {
  const _MedianSqlFunction();

  @override
  AggregateContext<List<double>> createContext() {
    // Initial state: Empty list
    return AggregateContext([]);
  }

  @override
  void step(List<Object> arguments, AggregateContext<List<double>> context) {
    // Processing a new row: Add its value to the list
    assert(arguments.length == 1);

    final value = arguments[0];
    if (value is num) {
      context.value.add(value.toDouble());
    }
  }

  @override
  Object finalize(AggregateContext<List<double>> context) {
    final value = context.value..sort();

    if (value.isEmpty) {
      // Can't compute the median of an empty function, so return null
      return null;
    }

    // You might want to use a different implementation that takes an average if the list has an odd length
    return value[value.length ~/ 2];
  }
}

Next, you'll register that custom function when the database is opened. For this, you can use the new setup parameter on VmDatabase:
VmDatabase(yourDatabaseFile, setup: (db) {
  db.createAggregateFunction(
    functionName: 'MEDIAN',
    function: const _MedianSqlFunction(),
    argumentCount: const AllowedArgumentCount(1),
  );
});

For convenience, you can define an extension method to use your function from moor:
extension AdvancedStats on Expression<num> {
  Expression<double> median() {
    return FunctionCallExpression('MEDIAN', [this]);
  }
}

This allows you to write routePoints.speed.median() to get the median speed, for instance.
In a similar fashion, you could implement the other functions that you were interested in:

stddev: Also as a AggregateFunction<List<double>>, just change finalize to compute the standard deviation instead
mode: You could implement this as a AggregateFunction<Map<int, int>>, mapping from values to how often they appeared. createContext initializes the context to an empty map. step increments map[value], finalize selects the highest value.

Thanks alot

Just like you said since I am calculating multiple values at once it is better to load routPoints to Dart.
Moor has been very efficient in most of the use cases and I thought there is an efficient way to perform this task but I am not aware of it.
Nevertheless, it was nice to know how it could be done if I need to do it using moor syntax.