Pub/Sub StreamingSubscriberConnection  : Terminated streaming with exception

See related issue on the spring-cloud-gcp project at https://github.com/spring-guides/gs-messaging-gcp-pubsub/issues/4.

Good timing :smile: ! I just submitted this PR to solve the problem.
The pubsub server sometimes terminate the stream proactively. We catch this, sleep a bit (just in case the server is heavily loaded), and reconnect. This is OK, but we log it at high severity which makes the log looks scary. The linked PR lowers the severity in cases where we can reconnect. Bad errors like "subscription doesn't exist" still gets logged at SEVERE.
Since the PR is merged and will go out in the next release, I'll close this issue. Please reopen if you need anything else!

@pongad I'm not sure if the PR fixes it though. The OP was saying that they stop receiving messages altogether. So, it's not just a logging issue as far as I understand.

@meltsufin Ah I'm sorry I misread.
There are two known issues that might have caused this.
The first suspect: We exponentially back off but previously did not cap the reconnect time. So we'd reconnect eventually but after a long long long time after a while. This was fixed by this PR and should have gone out in v0.23.0. Do you already have this version?
The second suspect: After the stream goes idle for a little while, there's a problem where a firewall might close the stream without notifying us so we wait for the messages that will never come. The "right thing to do" here is to configure a keep alive in gRPC, but this needs to wait for next gRPC release. In the meantime, could you try running this command? (assuming you're Linux):
sudo /sbin/sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_intvl=60 net.ipv4.tcp_keepalive_probes=5

This should get the kernel to do the keepalive for us.

We're on 0.24.0-beta. So, I think it might be the second suspect.
Since the application is containerized, do you suggest adding that line to the Dockerfile?

I think it should be OK to add the command to fix the immediate problem.
For the longer term fix, gRPC just released 1.7.0 which contains the new feature we need. I've just created PR to update the dependency; the master branch should get the fix in a few days. (I'm in Australia, so code review latency is a little high.) After this change is released, you shouldn't need to run that command anymore.

@pongad sudo /sbin/sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_intvl=60 net.ipv4.tcp_keepalive_probes=5 this may not work for Docker containers, it was said somewhere that docker restricts certain kernel parameter tuning for security reasons. At least the options were not avaialble under /proc/sys/net/ipv4/ for the images I checked.

OK, we'll prioritize gRPC 1.7. @garrettjonesgoogle Is there anything blocking us from releasing new gax? I can pick this up if Seattle folks are busy.

There's nothing blocking us.

Semi related question.
I've been receiving similar error messages, but within the Spring Framework.  I'm wiring a Subscriber as a singleton with startAsync as the initMethod, and stopAysnc as the destroyMethod.  I can't seem to find anything in the documentation that says Subscribers can be treated as thread-safe, but it seems like async pull subscribers should be long lived.
Should these be managed outside the Spring Framework through some sort of Factory?

I have problem with not receiving messages singe 0.19 or something like this. After ~10-15min it's stopping receiving messages. Currently I'm "restarting" subscribers every 5min by stopAsync() and just creating it again. I didn't found any other way :(
I had created healthcheck to monitor subscriber and apiservice but they was returning that everything is ok and they are working.

@jkupcho The Subscriber was implemented using Guava's Service so it is generally thread safe.
As explained in the linked page, there are some illegal actions though. You can't start service after it has stopped, etc. I'll add this documentation.

@Mistic92 Does your subscription usually have idle time where there's no message to consume? If so, it's likely you're running into the same problem. If you have root access to the machine, can you try running this command: sudo /sbin/sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_intvl=60 net.ipv4.tcp_keepalive_probes=5?
We hope to soon release a more permanent fix for this.

@pongad yep, currently we have only testers using backend so there is often time when no messages are send. I was supposing that's the reason. I'll try add this command to docker and see what's the result;)


remove wrapped native token from searches

Describe your changes

Create a new map wrappedNatives to centralize references to native tokens per chain
Create a new fn removeWrappedNative to remove the defined wrapped native token from an array of tokens
Use new functionality to remove wrapped native token from default token list and name/symbol searches

Link the related issue
Closes #2801
Checklist before requesting a review

[x] Is this PR ready for merge? (Please convert to a draft PR otherwise)
[x] I have performed a self-review of my code.
[x] Did I request feedback from a team member prior to merge?
[x] Does my code following the style guide at docs/CODING-STYLE.md?

Instructions for Reviewer
Functionalities or workflows that should specifically be tested.

Open the token selector and do not enter search input
Read tokens to ensure WETH does not appear in the list of tokens rendered by default
Search for WETH by name or symbol with various input strings, ensure it still does not appear
Search for WETH by address, ensure that it appears with warning text

Environmental conditions which may result in expected but differential behavior.

Test on both mainnet '0x1' and goerli '0x5' to ensure consistent behavior
Note that WETH (on Mainnet and Goerli) is the only defined wrapped native token, as we expand more tokens will be added

If relevant, list additional work to complete pre-merge (delete logging, code abstraction, etc)
none

The enhancements in this PR will leave some tech debt as documented in Issue #2831

style of wrapped native token warning should be close to the style of the warning of price changes


SetWindowLongPtr GWL_EXSTYLE doesnt works on Desktop(Windows)

Applying GWL_EXSTYLE with Extended styles do nothing. But applying them with GWL_STYLE give transparency, but windows stop redrawing its content. Its impossible give click transparency for window and show some updated information.
I really need some overlay window, transparent for clicks and showing some info, but i cant do this in current way.
import 'package:win32/win32.dart';

void main(List<String> arguments) {

  var hwnd = 0x21138e; // put any existed windows hwnd and
  SetWindowLongPtr(
      hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW);

  SetWindowPos(hwnd, -1, 0, 0, 0, 0,
      SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
}

Oh, desperately used 0x80020 from autohotkey instead of WS_EX_TRANSPARENT and it works fine with GWL_EXSTYLE.


Fix datastore.put() to update existing events. Clear local storage on…

… event save.
Existing events being edited are no longer saved as new/duplicate entities and update correctly to datastore.

Will add more to this PR before officially requesting review.


One instance of customizer at each customize step

Change so that getCustomizers is only called once during provisioning.
This ensures that only a single instance of a customizer configured
with DSL will be called.  This means that state can be kept between
steps.

LGTM; I've submitted https://github.com/duncangrant/brooklyn-server/pull/1 to add some additional changes in this PR.
@duncangrant can you review that - if you merge it into your branch, then it will appear automatically in this PR.

LGTM; once jenkins has confirmed the tests pass, this is good to merge.


Offer homebrew formulae for sorbet

Problem
At the moment, those that are using JRuby, sorbet-static can never be installed via gem/bundler.
sorbet-static is platform dependent and has the gem name such as: sorbet-static-0.4.5055-universal-darwin-19.gem (darwin being OSX & universal the CPU type)
However when running on JRuby platform the only platforms available are:
$ gem env
...
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-java-1.8

Whereas on MRI it will list
$ gem env
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-18

This means that the sorbet-static gem can never be installed while using JRuby :(
This is unconventional use of using gems  -- typically the platform in the gem name would make sense because JRuby cannot use a library that is native C code. However in this case sorbet-static is never required by the codebase in question and just used a tool to run the type check.
Proposed solution

I've already contributed https://github.com/sorbet/sorbet/pull/2212 to search for sorbet on the PATH via srb
submit a formulae to homebrew that will install from source or prebuilt binary and make available the sorbet binary.

You don't need (1) to implement (2). The only thing that srb tc is doing is finding an executable for sorbet and then calling it. If you've already put sorbet on your path, then calling sorbet is identical to calling srb tc.
Homebrew is a package manager maintained by the community. If you want to maintain a formula for sorbet, feel free to make one. On the Sorbet team we're more interested in providing only the most essential distribution channels so that we don't have to maintain so many things.
In particular, we publish pre-built binaries for mac and linux on ever master commit to our Releases tab. Feel free to use that or something else as a starting point.
In particular though, using Sorbet on JRuby is known to be poorly supported right now, and the Sorbet team has no intention of staffing an effort to support it in the near future, so know that if you want to go down that road, you'll likely be paving your own way.

I offered (1) because the documentation streamlines just running srb rather than sorbet ?
Seems advantageous to make the native code installable regardless of Ruby environment.

I have proffered a brew file to homebrew-core: https://github.com/Homebrew/homebrew-core/pull/47173


Support decimal min and max

Describe the bug
I defined a field as type number and format double with minimum as 0.01. The asyncapi cli generator generated with java springboot template defined the field correctly as Double but the jakarta validation @Min accepts only long. It seems like only @DecimalMin can support decimal types but it requires a string type.
Similar discussion - https://stackoverflow.com/questions/7422803/why-do-bean-validation-min-max-constraints-not-support-the-double-type
Bug reported by Sajeesh Kumar in Slack
Expected behavior
DecimalMin \ DecimalMax is used for Double validation

Hi @Tenischev I would like to help resolve this!

Hi @codingmickey! Glad to hear =)
Please go ahead and make PR. From my brief look update is required only in  template/src/main/java/com/asyncapi/model/$$objectSchema$$.java file where @Min and @Max annotations are set.

Hey @codingmickey any progress with it?
Do you need a help?

Hi, @Tenischev, Could you please check my PR and let me know if any changes are required?


Errors with datetimepicker element

I'm submitting a ...  (check one with "x")
[ ] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[x] Other, please describe

Tell about your platform

eonasdan-bootstrap-datetimepicker version : 4.17.47
Vue.js version : 2.5.9
Browser name and version : Chrome 60.0.3112.101
This package version : latest

Current behavior
At the moment, we have single text field, and I'm attempting to turn it into a date picker element.
I followed the installation instructions, added the code to the webpack.mix.js file, created a webpack.config.dev.js file using the the source from the file of the same name, and in the component in Vue:
var moment = require('moment'); moment().format();

// Import this component
import datePicker from 'vue-bootstrap-datetimepicker';

// Import required dependencies
import 'bootstrap/dist/css/bootstrap.css';

// Import date picker css
import 'eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css';

Vue.use(datePicker);

However, I'm getting a warning:

[Vue warn]: Error in mounted hook: "TypeError: this.elem.datetimepicker is not a function"
found in
--->
 at resources/assets/js/components/SpreadsheetsManageEdit.vue

... and an error:

TypeError: this.elem.datetimepicker is not a function
at VueComponent.mounted (appSpreadsheetManageEdit.js:30645)
at callHook (app.js:14138)
at Object.insert (app.js:15319)
at invokeInsertHook (app.js:17080)
at VueComponent.patch [as patch] (app.js:17299)
at VueComponent.Vue._update (app.js:13890)
at VueComponent.updateComponent (app.js:14008)
at Watcher.get (app.js:14358)
at Watcher.run (app.js:14435)
at flushSchedulerQueue (app.js:14197)
at Array. (app.js:13059)
at flushCallbacks (app.js:12980)
at

Expected behavior
I would expect there to be a date picker to use.
Minimal reproduction of the problem with instructions
Since this is an entire application, it's not feasible to create a minimal working version; it would take at least a day to do.
However, I would be willing to grant the author access to the repo on Git, if need be.

What does webpack.config.dev.js do with Laravel Mix ?

I don't understand the question.
In the webpack.mix.js file, I have:
mix.autoload({
	'jquery': ['$', 'window.jQuery', 'jQuery'],
	'vue': ['Vue','window.Vue'],
	'moment': ['moment','window.moment']
})...

... with additional parameters.

My question was straight forward.
There is no need to create webpack.config.dev.js when you are using laravel mix.
Why you have specified this in your question.

In the instructions, you ask if I'm using Laravel Mix, which I am, so I used that code.
Also, I get the same errors whether I use the code in the Webpack file or not.

If you know we pack then you can clone this repo and see how my examples are working.

I'm not familiar with the inner workings of Laravel or Webpack, so this has been a process of trial and error.
I've removed the webpack.config.dev.js file, and moved the import code into the app.js file, which got something working, although the pop-up isn't getting populated with the actual date picker itself.

Glad you was made it.
Try loading the component with bootstrap modal.
Make sure it is working fine outside of modal.
I am sure some css code is causing the datepicker not to show property.
I never faced any issues using this component inside popups or modal.

I tried it outside the modal and it's still not working.
I'm using the format: "YYYY-MM-DD" and wondering if that's something to do with it?

Do you see any errors in console?

No errors.

I found a reference to Bootstrap for X-Editable which was interfering with your own reference.
I've removed that and the date picker is working.
Thanks for the assistance!


memory access error when inference a splitted pretrained model

Description
Hi,
we developed a python program to cut a pretrained object classification model to two parts, top net and bottom net to meeting our application.
The model cutting is based on the model json file. We will re-write the json file and parameter files accordingly into two parts.
We use ssd_512_mobilenet1.0_voc and yolo3_mobilenet1.0_voc to verify.
We have no issue about the yolo3_mobilenet1.0_voc.  It means, in mxnet environment, we intialize the two nets and the top net output feed into the input of the bottom net. The result is the same as the net without splitting.
However, when we splitting the ssd_512_mobilenet1.0_voc, we encounterred the memory access error, when bottomnet inference with the input of the top net. We have checked the splitted net with netron, it seems no problem.
We cannot locate the root cause and we would like seek some help to see if it is due to the limitation of mxnet or any limitation we need to take care when splitting a model because our way of inference is unusual.
We have written the test code in the attachment (just run: python splitter_test.py).
Error Message
File "splitter_test.py", line 113, in
class_IDs, scores, bounding_boxes = Bottomnet(*testdata)
File "C:\Users\junsong.hou\Anaconda3\envs\npuc0100\lib\site-packages\mxnet\gluon\block.py", line 548, in call
out = self.forward(*args)
File "C:\Users\junsong.hou\Anaconda3\envs\npuc0100\lib\site-packages\mxnet\gluon\block.py", line 1098, in forward
return self._call_cached_op(x, *args)
File "C:\Users\junsong.hou\Anaconda3\envs\npuc0100\lib\site-packages\mxnet\gluon\block.py", line 805, in _call_cached_op
self._build_cache(*args)
File "C:\Users\junsong.hou\Anaconda3\envs\npuc0100\lib\site-packages\mxnet\gluon\block.py", line 793, in _build_cache
self._cached_op = ndarray.CachedOp(out, flags)
File "C:\Users\junsong.hou\Anaconda3\envs\npuc0100\lib\site-packages\mxnet_ctypes\ndarray.py", line 116, in init
ctypes.byref(self.handle)))
OSError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
To Reproduce
run: python splitter_test.py
cutting_ssd.zip
Regards!
JS

@houjs thanks for reporting the issue. Besides the json and params, I think what could really help debugging is how you split the networks to generate them. It might be easier to debug that way.


catppuccin-discord: init at 0-unstable-2024-12-08

catppuccin-discord: init at 0-unstable-2024-12-08

Adds a simple derivation, inspired by catppuccin-kvantum, for Catpuccin's
discord theme. Since upstream does not tag releases, we use an unstable
commit.

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 365773

x86_64-linux

:white_check_mark: 1 package built:

catppuccin-discord

aarch64-linux

:white_check_mark: 1 package built:

catppuccin-discord

x86_64-darwin

:x: 1 package failed to build:

catppuccin-discord

aarch64-darwin

:white_check_mark: 1 package built:

catppuccin-discord


Add support for Pulsar cluster level auto failover (PIP-121)

Please add support for cluster-level auto failover similar to Java client.
Related information:
Cluster Level Fail Over PIP-121
Java Client MR

Hi! I'm not actively using Pulsar and not adding new functionality to the library myself (only doing bug fixes), but always happy to support if someone wants to add smth, so if you need this feature - you can send a PR

So far I get to the point:
in java code when the cluster address changed, they do this:
   pulsarClient.updateServiceUrl(serviceUrl);
   pulsarClient.reloadLookUp();

On update service url:
 log.info("Updating service URL to {}", serviceUrl);
        conf.setServiceUrl(serviceUrl);
        lookup.updateServiceUrl(serviceUrl);
        cnxPool.closeAllConnections();

and on reload lookup:
 if (conf.getServiceUrl().startsWith("http")) {
            lookup = new HttpLookupService(conf, eventLoopGroup);
        } else {
            lookup = new BinaryProtoLookupService(this, conf.getServiceUrl(), conf.getListenerName(), conf.isUseTls(),
                    externalExecutorProvider.getExecutor());
        }

So far I did same things
 backgroundTask {
       let q = { config with ServiceAddresses = addresses }
       do! connectionPool.CloseAsync()
       connectionPool <- ConnectionPool(q)
       lookupService <- BinaryLookupService(q, connectionPool)
       }

but all producers are still connected to old address. It looks like in Java code when all connections are closed, producers/consumers will go to new lookup to get new addresses(?), but in F# they do not.

I think you need to ensure that once connection is dropped consumers/producers should already have new address for reconnection. In your code you make connection drop first, so reconnect happens immediately to the same address

once connection is dropped consumers/producers should already have new address for reconnection

I tried to rewrite like this:
 backgroundTask {
       let q = { config with ServiceAddresses = addresses }
       let oldPool = connectionPool
       connectionPool <- ConnectionPool(q)
       lookupService <- BinaryLookupService(q, connectionPool)
       do! oldPool.CloseAsync()
       }

Interesting, if I start demo app + 2 clusters on 6650 and 6651 addresses, and a webapp which tells pulsar to swtich from 6650 to 6651 - it works :) But if I start with 6650, then boot up the app to broadcast new address 6651, it fails to reconnect tp 6651 with inner exception
Unhandled exception. System.TimeoutException: Could not send message to broker within given timeout
  at <StartupCode$Pulsar-Client>.$ProducerImpl.SendMessage@760.MoveNext() in F:\work\pulsar-client-dotnet\src\Pulsar.Client\Internal\ProducerImpl.fs:line 767

So, it seems like if there is an established connection to broker, my code fails to change the address. But if there is no connection yet (address is switched before client is connected to broker), it works ok.

@fjod I think you can create a PR already so I could try it myself and help


Martinro/small fixes

fixes a few small bugs in the concept docs.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/quantum-concepts-5-MultipleQubits.md
:white_check_mark:Succeeded

articles/quantum-concepts-7-PauliMeasurements.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Fix NoMethodError in provider_instance

This is a simple fix for #234 that worked well for me.

@tonnenpinguin 👍


Persist mempool to disk and load it on node start

Persist mempool to disk and load it on node start
Use binary format for memorypool.dat in node data directory
Add IMempoolPersistence to MempoolFeatures
Load MemoryPool on MemoryPoolFeature.Start(); Save on  .Stop().
Push loaded transactions to MemPool with validation.
Handle bad files with ignore.
Delete mempool.dat on Stop() if there are no memory pool entries to persist.
Fixes https://github.com/stratisproject/StratisBitcoinFullNode/issues/109

Request live testing before acceptance.
Unable to do live testing as I do not have access to a fully updated node (yet).

Its ok I have I'll test it

I am testing this on TestNet now. I'd prefer to test on Main as well, and I'm not updated there completely yet.
It is working well on test.


Add James to pager duty support rota

Add James to pager duty support rota

There is an issue in the dependency logic when adding new users, to workaround you need to apply locally
terraform apply -target='module.users'

terraform apply -target='module.teams'

terraform apply


Harp can't load a model on Windows 11

HARP starts up in Windows 11 and links to reaper. What it doesn't do is load a model. When I go to load a model, it can't find the path. HEre's what the log says when I tried loading 2 models.  NOTE: I confirmed I could load both models from MacOS HARP. Same room, network, and version number (the latest one).

hello, harp!
Log started: 4 Jun 2024 11:23:57am
url: hugggof/nesquik
Running command: start /B cmd /c set PYTHONIOENCODING=UTF-8 && C:\Users\bryan\Downloads\Resources\gradiojuce_client\gradiojuce_client.exe --mode get_ctrls --url hugggof/nesquik --output_path C:\Users\bryan\AppData\Local\Temp\control_spec.json >> C:\Users\bryan\AppData\Local\Temp\system_get_ctrls_log.txt 2>&1
The system cannot find the path specified.

hello, harp!
Log started: 4 Jun 2024 11:24:32am
url: hugggof/pitch_shifter
Running command: start /B cmd /c set PYTHONIOENCODING=UTF-8 && C:\Users\bryan\Downloads\Resources\gradiojuce_client\gradiojuce_client.exe --mode get_ctrls --url hugggof/pitch_shifter --output_path C:\Users\bryan\AppData\Local\Temp\control_spec.json >> C:\Users\bryan\AppData\Local\Temp\system_get_ctrls_log.txt 2>&1
The system cannot find the path specified.

hello, harp!
Log started: 4 Jun 2024 11:25:28am

I can't reproduce this. It works for me in both win10 and win11 64bit.
Based on the log, I think the gradiojuce_client.exe cannot be found.
The steps I'd follow to debug this would be:

I'd extract the  HARP-1.2.0-Windows.zip into its own folder and not in Downloads, in case there are previous versions of HARP floating there in the Downloads.
Using the explorer, I'd manually check if the  file exist

C:\Users\bryan\Downloads\Resources\gradiojuce_client\gradiojuce_client.exe
if the zip extraction is done the way I describe above, the file should be in
C:\Users\bryan\Downloads\HARP-1.2.0-Windows\Resources\gradiojuce_client\gradiojuce_client.exe

That's the issue! I didn't have the whole .zip file extracted, so the helper dlls, etc were not there. Once I unzip the whole folder of stuff it works.
I note that the gradio client is an .exe. That probably explains why a command line briefly appears when I click on a button that causes a call to gradio.


instruction pointer arrow missing in Disassembly window

Hi,
In our debugger based on MIEngine, in the Disassembly window, there is not yellow arrow pointing to the current instruction. Instead just the text caret is there as the indicator and moves properly while stepping, which means the PC value is correctly reported to the core debugger.
So do you know how to get the yellow arrow to show up ?
Thanks !

Are you seeing AD7DisassemblyStream.GetCodeLocationId called for the IDebugCodeContext2 which is the current instruction address?
Does the value returned from that match up with the right line in the disassembly as returned in Read via prgDisassembly[iOp].uCodeLocationId?

Ok, I figured it out and it's due to this bug in AD7Disassembly.cs.
Line 30:
ppCodeContext = new AD7MemoryAddress(_engine, (uint)uCodeLocationId, null);
The cast of uCodeLocationId to "uint" is problematic for 64-bit target.
Same problem with
line 131
_addr = (uint)uCodeLocationId;
Removing the casts fixed my problem.

Excellent. Do you mind sending a PR?

I tried to create a pull request, but I don't have the privilege to push a branch to the repo.  What should I do for that ? or is it ok I just attach a patch here ?

So we follow the 'GitHub fork model'. So you want to:

go to https://github.com/Microsoft/MIEngine and clone the repo into your account
Push your changes up to GitHub
Go to https://github.com/digittigerw/MIEngine/pulls and create a pull request for merging your changes into MIEngine master.

Here is some more general information on GitHub pull requests if this is the first time you have submitted one: https://help.github.com/articles/about-pull-requests/
It should be pretty easy. Thanks!

Thanks for fixing this!


Add first(), last(), subspan()

See Guidelines Support Library Review: span, section Subspans.

Added in v0.3.0


Update README.md

Closes #2.
Updated Quick Start, Features and Technologies Used in README

Looks good, let's merge it!


Dmitry/cleaning

Description
Speed improvements, ESLint integration, general cleanup.
Motivation
Beauty all around
To-do list

[x] I have read the CONTRIBUTING document.

[x] This pull request is ready to merge.

@DmitryBaranovskiy I've also noticed an odd shift that's happening in HSLuv interpolation with the new Chroma-plus. Directionality of the polar interpolation is reversed from its original direction (in existing Leonardo).
For example, when creating a scale using CSS colors 'yellow' (#ffff00) and 'navy' (#000080), the current d3 interpolation in Leonardo traverses through cool colors:

The update, using the same key colors yellow and navy, traverse through warm colors (opposite directionality):

Both d3-color and chroma.js determine which direction to interpolate (in polar space) based on closest distance.  Just to be safe, I've compared the two libraries conversion of #ffff00 and #000080 to confirm that their hsluv values are identical (rounded):

Color name
Hex
d3-hsluv
chroma-plus hsluv

Yellow
#ffff00
hsluv(86,100,97)
hsluv(86, 100, 97)

Navy
#000080
hsluv(266,100,13)
hsluv(266, 100, 13)

What this appears to be is that these colors lie directly on the threshold of when directionality should shift: The hues are exactly 180 degrees apart. (266 - 86 = 180).
This won't be an issue in reviewing/accepting this PR, however I'm making a note of it here for record. I will need to ensure this is communicated when we publish this update. I believe it's reasonable to inform users that if this happens, they should modify one of their key colors hues to be one degree more or less (in the respective colorspace) in order to force interpolation direction to reverse.
Although, this makes me wonder if we should enable a directionality shift parameter to the scales, such as how d3-interpolate offers a "long" option (color.interpolateHcl() and color.interpolateHclLong()): https://github.com/d3/d3-interpolate#interpolateHcl


GDExtension: Some EditorNode3DGizmoPlugin virtual functions are not being called

Godot version
v4.0.beta.custom_build.fc926eda1
System information
macOS 12.3
Issue description
Porting an EditorNode3DGizmoPlugin to GDExtension (godot-cpp), I noticed when overriding EditorNode3DGizmoPlugin::_get_gizmo_name that Godot still prints:
WARNING: A 3D editor gizmo has no name defined (it will appear as "Unnamed Gizmo" in the "View > Gizmos" menu). To resolve this, override the `_get_gizmo_name` function to return a String in the script that extends EditorNode3DGizmoPlugin.

This should happen here.  Haven't check in the debugger yet, and I will update the issue when I do, but I guess/intuition says the if (get_script_instance() && get_script_instance()->has_method("_get_gizmo_name")) check returns false.
If this is correct this also applies to EditorNode3DGizmoPlugin::_get_priority. The gizmo still works fine and the other functions all seem to call GDVIRTUAL_CALL instead of calling the method in the script instance.
Steps to reproduce
Create a simple EditorNode3DGizmoPlugin with godot-cpp:
class TestGizmo : public EditorNode3DGizmoPlugin
{
    GDCLASS(TestGizmo, EditorNode3DGizmoPlugin);

  protected:
    static void _bind_methods() {}

  public:
    virtual String _get_gizmo_name() const override
    {
        return "TestGizmo";
    }
};

Add it to project with add_node_3d_gizmo_plugin in an EditorPlugin (GDScript). Restart the editor and notice the warning produced by Godot. The gizmo will be unnamed.
Minimal reproduction project
No response

Can you check if ClassDB::get_virtual_func is called with your function name? In godot_cpp/src/core/class_db.cpp

Ah, so that function basically needs to change to
String EditorNode3DGizmoPlugin::get_gizmo_name() const {
    String ret;
    if (GDVIRTUAL_CALL(_get_gizmo_name, ret)) {
        return ret;
    }

[...]

? I will try this out and see if it works. Don't know how GDVIRTUAL works, but was wondering why all other functions but get_gizmo_name and get_priority were calling it. Good time to learn something new about the engine :-)


setting javascriptEnabled to true

I need to set PhantomJS with the following:
phantom.javascriptEnabled = true
page.settings.javascriptEnabled = true
Is there a way I can do this through Poltergeist?
Thanks.

There is no way for a user to change those settings, but they are true by default so I'm not sure why you would need to set them again?

Closing due to lack of response


Is the word vectors GloVe or Goldberg ones?

Could we confirm and update in the online docs? Thanks,

The word vectors are from Levy and Goldberg. That's what the docs say, right?

Thanks for confirmation. Is there any plan to migrate to GloVe by default in any foreseeable roadmap? (Probably that'd involve work to optimise the loading time)

I do want to switch to the GloVe vectors, but I want to have a bit of an
evaluation set up.
There's been some delay on this. I've been working on switching spaCy to
use a feed-forward neural network, instead of the averaged perceptron. The
word vectors would be fine-tuned for the parser and tagger.
The question is whether the parser/tagger vectors will be well suited for
general similarity use, or whether there will need to be separate vectors
for that. I'd like to put a heavy regulariization penalty on the vector
fine-tuning, to try to find a good parser model that's close to the
original GloVe vectors.
In hindsight I probably should've switched to the GloVe vectors already. I
thought this work would be completed a little sooner, and I didn't want to
change vectors twice.
To load vectors faster, the answer is simply to load a smaller vocabulary.
If the vocabulary is frequency-sorted, there's very little utility in
loading such an enormous vocabulary, like the GloVe vectors provide. It's
great that they provided the full vectors --- because if you need all of
them, e.g. for spelling correction or some niche long-tail use-case, it's
important that the full resource is distributed.
But almost nobody needs to load all that data. The vast, vast majority of
applications will be fine loading, say, 200,000 vectors. That means the
loading will be pretty fast.
On Fri, Nov 27, 2015 at 11:37 AM, Jencir Lee<EMAIL_ADDRESS>wrote:

Thanks for confirmation. Is there any plan to migrate to GloVe by default
in any foreseeable roadmap? (Probably that'd involve work to optimise the
loading time)
—
Reply to this email directly or view it on GitHub
https://github.com/honnibal/spaCy/issues/192#issuecomment-160109177.


unable to display container in projects tab

I am unable to see the container in the project tab even if it is run from same service console , however container are started , we can see those container in container panel

I am unable to see the container in the project tab even if it is run from same service console , however container are started , we can see those container in container panel
project tab snap :

container tab snap :


python-simplejson not in redhat/7* saltstack repo

Moved from https://github.com/saltstack/salt/issues/31036. @lorengordon
In Enterprise Linux 6 distros, python-simplejson is in the repos included with the distribution. In Enterprise Linux 7, it seems it is not (I checked rhel7 and centos7). python-simplejson is a dependency of python-raet, so to use the raet transport in EL7, there is a dependency on the EPEL repo.
My understanding at the moment is that the saltstack repo is supposed to include all packages and dependencies such that there should be no dependency on EPEL. If that understanding is correct, please add python-simplejson to the saltstack repo for EL7.

Thanks @jfindlay. I almost opened the issues here, but wasn't positive you all wanted to track issues in different places across the different projects. :D

@lorengordon, it's not a big deal.  I am only grateful you reported the issue. :)

Fixed with PPR #42 , should be available with the next point release


Update the new module automation process

Currently, the new module process closes the issue once the repository is created. However, it would be good to keep that issue open until the initial release of the module has been made. (We are beginning to enforce the policy that every PR must have an associated issue and reusing the new module request issue would prevent unnecessary duplicates.)
Instead of closing the issue, perhaps we can use repo_created and added_to_catalog labels to mark the progress.

Added a check in action-repo-issue-extractor so that it will abort if an issue already has the repo_created tag, and will not continue processing.
https://github.com/cloud-native-toolkit/action-repo-issue-extractor/pull/46
Updated workflow in software-everywhere so that issues are not closed when a repo is created.   Instead a comment is posted on the issue, and labels are applied.  repo_created is added to the issue when the repo is created.  added_to_catalog is added when the module is automatically added to the catalog.
https://github.com/cloud-native-toolkit/software-everywhere/pull/76

Also updated with a check in action-repo-issue-extractor to see if the issue title starts with Request new module:.  If it doesn't start with that, it won't be processed. https://github.com/cloud-native-toolkit/action-repo-issue-extractor/pull/47

Moved check to see if its a new module request back into this repo's workflow instead of action-repo-issue-extractor https://github.com/cloud-native-toolkit/software-everywhere/pull/80
Also moved check for repo_creatd label into this workflow:
https://github.com/cloud-native-toolkit/software-everywhere/pull/81


Latest master is broken?

On latest commit of master: https://github.com/successible/cleanslate/commit/ac376c7ad29ee2a6c53c285d75b4d9b20f8a87fb
When I run the instructions for docker-compose / deploy.sh locally, I'm met with a /build missing some artifacts

/build # ls
service-worker.js        service-worker.js.map    sw.js                    sw.js.map                version.txt              workbox-e4b65e41.js      workbox-e4b65e41.js.map

When I roll back to the build at this commit it works, I have index.html and more https://github.com/successible/cleanslate/commit/52a46102570a19cd0378d8d014b17bb128776b5c

This I cannot replicate - I just build locally on and on the production server to check - any more context you can give?

Don't know if it's related to this but I'm getting a 404 on production

Yup, I see that - looking at it now

Ok, fixed! And I think that fixes your problem too @alex4108.
(Please reopen if it comes back)


Add files via upload

Adding side track - coding-in-the-cabana
No index.png.  I am assuming that Jason does these.

Yes, at the moment I'm making the images! Thank you!


Feature - set subscription keys to an API in Azure API Management

Provides script on API Management PS module that sets the subscription header and query parameter to an API running on API Management.
Closes #39

PTAL @mbraekman


Can't access ESP8266 via browser on local network even though it's connected to router

Hi. I'm pretty much a newbie when it comes to all this so apologies if I'm missing something really obvious.
With much research, self-teaching, trial and error I've managed to get as far as 6:50 in your brilliant YouTube video (https://www.youtube.com/watch?v=JysKXOdrOlM&feature=youtu.be) but no matter what I try (and I've tried everything I can think of / see mentioned online) I cannot access my ESP board.
I've found my ESP board's MAC address and I can see that it's connecting to my router. I've tried accessing the board by typing irblaster.local:80 into my browser with no success. I do realise this is dependent on having MDNS and I'm not really sure if I do or don't to be honest, so have been focussing on entering it's IP address e.g. <IP_ADDRESS> which, from what I can see, should be guaranteed to work. However, no success with that either. In all cases I just get a "Page cannot be reached" page - that's using IE and Chrome. I have tried setting it up with many different IP addresses and can see on my router's "Connected Devices" page that it is connecting successfully and assigning it the IP addresses I specify each time.
My issue seems to be very similar to **Config file and WiFi Manager #110 ** - albeit his had been working previously then stopped - I've never got mine working.
Is as if the device is connecting but it isn't starting it's web interface. I bought two boards and both act the same way, so I don't think it's down to a faulty board.
Any ideas / advice would be gratefully received - I'd love to get past 06:50 in your video!!
Thanks,
Chris

Hi, thanks for getting back to me so quickly.
I abandoned the first of my two boards after a few hours at the weekend when I couldn't get it working and moved onto my second board. When I couldn't get that working either, I decided it wasn't a board issue and started playing around with library versions, etc - trying every version and combinations. I did all that really intense testing with the 2nd board and it was after this that I created this thread.
For some reason, I thought just now, I'd give the original board a try seeing as I gave up on that one quite quickly - just in case. I didn't expect anything different but, that one is now working!!
I can only conclude that I inadvertently stumbled upon the correct combination of library versions, etc whilst testing with my 2nd board, but that that board is somehow bust. How annoying!
I've now been able to learn a code, create an Alexa device, associate the code with that device, get Alexa to discover it and I can see the red LED on the board flash when I ask Alexa to control it - so I've clearly managed to get the port forwarding sorted too. Brilliant!
The signal isn't actually getting through to my A/C unit though for whatever reason, so I need to 'debug' that now. But it's a huge step forward. Hopefully I'll be able to figure that out myself in the near future, but I know now where to come if I get stuck.
Thanks again
Chris

AC units can be particularly challenging as their codes are often very long and not always going to work
Make sure you’re not sending an ‘UNKNOWN’ code too, if the code is read as unknown you have to send the RAW format
From: chrisp79
Sent: Wednesday, July 25, 2018 2:13 PM
To: mdhiggins/ESP8266-HTTP-IR-Blaster
Cc: Michael Higgins; Comment
Subject: Re: [mdhiggins/ESP8266-HTTP-IR-Blaster] Can't access ESP8266 viabrowser on local network even though it's connected to router (#199)
Hi, thanks for getting back to me so quickly.
I abandoned the first of my two boards after a few hours at the weekend when I couldn't get it working and moved onto my second board. When I couldn't get that working either, I decided it wasn't a board issue and started playing around with library versions, etc - trying every version and combinations. I did all that really intense testing with the 2nd board and it was after this that I created this thread.
For some reason, I thought just now, I'd give the original board a try seeing as I gave up on that one quite quickly - just in case. I didn't expect anything different but, that one is now working!!
I can only conclude that I inadvertently stumbled upon the correct combination of library versions, etc whilst testing with my 2nd board, but that that board is somehow bust. How annoying!
I've now been able to learn a code, create an Alexa device, associate the code with that device, get Alexa to discover it and I can see the red LED on the board flash when I ask Alexa to control it - so I've clearly managed to get the port forwarding sorted too. Brilliant!
The signal isn't actually getting through to my A/C unit though for whatever reason, so I need to 'debug' that now. But it's a huge step forward. Hopefully I'll be able to figure that out myself in the near future, but I know now where to come if I get stuck.
Thanks again
Chris
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Awesome, thanks for the tip. Maybe I'll try getting it working with a TV first then before moving on to my A/C unit

I would definitely advise that
#187 has a post I made going through the specifics of which latest library has been tested and should be working if you want to check it against your own setup

Thanks again. I will try and compare that list and my own tomorrow and see if I can make any improvements. All seems pretty stable though how I have it now ;o)
Seem to be able to receive codes and I think I understand how I transmit them now via URL. Can't get my TV to respond though. Will have another go at the weekend.
Thanks again

I don't have "IwIP Variant: v1.4 Prebuilt", I have "Higher bandwidth" and "Compile from source". Currently using "Higher bandwidth".
Gonna try:
ESP8266 2.4.0 (currently 2.4.1)
ArduinoJson v5.13.2 (currently v5.13.1)
EasyNTPClient v1.0.0 (currently v.1.1.0)
IRremoteESP8266 v2.4.0 (currently v2.4.3)

Now it's completely unresponsive.. 2 steps back :D

I’m getting the same error as the previous person. Any solutions or at least knowledge of what might be the next thing to diagnose

I'm stuck. No matter what I try it dies after just a few seconds.

@SirJMD If you don't see lwIP Variant v1.4 Prebuilt its because you're using the wrong version of the Arduino ESP8266 Core (needs to be 2.4.0, 2.4.1 DOES NOT work) and possibly you have the wrong board selected from your board manager. Until you get the right combination including v1.4 Prebuilt the memory leak will cause freezing and it will not work
See #187 for all the specifics

@mdhiggins I noticed that after downgrading. However, 2.4.0 just results in the ESP8266 being completely unresponsive. With 2.4.1 the AP mode works fine and I can setup wifi connection and everything, but as soon as it reboots its only alive for a few seconds. 2.4.0 doesn't even get to the AP mode.

What does the serial output say?

Nothing at all. No communication at all.

That doesn't make any sense, you need to reflash or recheck your Arduino libraries and potentially reinstall 2.4.0 because something is broken then. Try deleting your 2.4.0 install and redownloading

I'll give that a shot tonight.

Just tested deleting the esp8266 board folder and reinstalling 2.4.0. The board is yet again completely unresponsive. Nothing on the serial monitor at all.
With 2.4.1 I'm getting this:
ESP8266 IR Controller
Config pin GPIO10 set to: 1
failed to mount FS
*WM: Adding parameter
*WM: hostname
*WM: Adding parameter
*WM: passcode
*WM: Adding parameter
*WM: port_str
*WM: Adding parameter
*WM: user_id
Using Static IP
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Custom STA IP/GW/Subnet
*WM: <IP_ADDRESS>
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 0
*WM: SET AP STA
Entered config mode
<IP_ADDRESS>
IR Controller Configuration
*WM:
*WM: Configuring access point...
*WM: IR Controller Configuration
*WM: AP IP address:
*WM: <IP_ADDRESS>
*WM: HTTP server started
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Scan done
*WM: TP-Link_701F
*WM: -89
*WM: HP-Print-90-Photosmart 6520
*WM: -95
*WM: Sent config page
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: WiFi save
*WM: Parameter
*WM: hostname
*WM: Blaster
*WM: Parameter
*WM: passcode
*WM: 1234
*WM: Parameter
*WM: port_str
*WM: 80
*WM: Parameter
*WM: user_id
*WM: Testuser
*WM: static ip
*WM: <IP_ADDRESS>
*WM: static gateway
*WM: <IP_ADDRESS>
*WM: static netmask
*WM: <IP_ADDRESS>
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Custom STA IP/GW/Subnet
*WM: <IP_ADDRESS>
*WM: Already connected. Bailing out.
Should save config
WiFi connected! User chose hostname 'Blaster' passcode '1234' and port '80'
 config...
failed to open config file for writing
{"hostname":"Blaster","passcode":"1234","port_str":"80","user_id":"Testuser","ip":"<IP_ADDRESS>","gw":"<IP_ADDRESS>","sn":"<IP_ADDRESS>"}
Writing config file
Config written successfully
WiFi configuration complete
Local IP: <IP_ADDRESS>
URL to send commands: http://Blaster.local:80
HTTP Server started on port 80
Warning, user_id appears to be in the wrong format, security check will most likely fail. Should start with amzn1.account.***
EPOCH time obtained for security checks
Ready to send and receive IR signals
Turning off the LED to save power.

Right after it turns off the LED, it stops responding.

The loss of response is expected with 2.4.1 - its a known bug due to a memory leak in changes made to the WiFi libraries. There's been countless people opening issues about this and a persistent one I opened myself. Unfortunately it is not yet fixed but its out of my hands to fix until they update the ESP8266 Arduino Core
Now why 2.4.0 isn't working is very strange and to get no response at all is even more strange but I can assure you that the entire project was developed with 2.4.0 and does work so it must be something unique on your end
What board do you have set?
What are all your compile and upload options? (Frequency, SPIFFS, baud etc)
What hardware are you using?

I'm using a Wemos D1 mini clone, with a ESP8266MOD. It's been working fine in other projects, but for some reason not this time.
My settings follow the ones recommended for Tasmota:
https://github.com/arendst/arendst.github.io/raw/master/media/arduinoide2b.png
What are the other hardware specs are you asking for?

Try using NodeMCU 1.0 (ESP-12E Module) and 3M SPIFFS

That seems to work! It hasn't crashed yet and the web ui seems to work (it won't read IR codes yet, probably a wiring error on my part).
Interesting.. what's your reasoning behind suggesting that solution?

Interesting.  With the "Generic ESP8266" chosen I had tried many different settings for flash size, and tested it with the ESP8266 example that tests the flash configuration.  Based on that a setting of 4M with 1M SPIFF resulted in config OK.
For this project it made no difference what I chose.


Remove kotlin-android-extensions

Remove all 'kotlin android extensions' code to avoid memory issues that can occur while caching views.

Hi @WindSekirun
So after removing the kotlin-android-extension are we migrating this to DataBinding? which is good. But I don't understand what can be the memory issues for caching view as kotlin-android-extension remove all the cache view onDestroy() method. Is there any article/source from which I can go through to dig a little deeper on this topic that it can cause some serious issue.

Hi, @deepakkumardk
Starting from this commit message, Kotlin-Android-Extensions is not officially recommended (which is not the same as recommendation against) cause these reasons.

Cache view into HashMap
Doesn't expose nullabilty when views are only present in some configuration.
Risk of making RecyclerView not cache ViewHolder.
If some views have same id, Type inference does not work properly.

Although this problem may not be significant, the risk exists and is intended to be removed.
I consider DataBinding as another alternative, but I try to avoid adding dependencies that may not be used by other applications.
The issue in #22 has the same problem. findViewByIds with lateinit commands also fine to me. (The code will grow a lot, but it doesn't cause any problems)
You can find source of topic in here and here and
Any other comments are welcome at any time. I don't have enough time to implement right away.

@WindSekirun Thanks for the info, I will work on that.

#24 merged.

@WindSekirun now we can close this.


how to do server version?

h3 server or monoio quiche server?

The project is currently on hold due to lack of manpower...


Remove tab characters from C source files.

Some have been creeping into the source code.
Also remove end of line spaces.

[x] tests are added or updated

There are more tabs in the assembly, I didn't touch them.

Merged to master, thanks.

Errr, I just found my email address in the commit stays incorrect. Should be something like:
Reviewed-by: Paul Yang<EMAIL_ADDRESS>instead of:
Reviewed-by: Paul Yang<EMAIL_ADDRESS>I dropped an email to @levitte yesterday about the information update due to a job change of mine. It seems it's better if I send the information to the @openssl/omc as well...


Fix documentation

get_protos has a wrong statement in the docs text.
https://github.com/fragcolor-xyz/clamor/blob/8e9148aee01ad7e537c1c78c288ff3bb642e0ff9/pallets/protos/src/lib.rs#L856

Lib account has some TODO regarding documentation.

Please make an estimate of this before the Sprint is finished.

Please make an estimate of this before the Sprint is finished.
This is done: https://github.com/fragcolor-xyz/clamor/blob/devel/pallets/protos/src/lib.rs#L1108-L1114. Could you close this issue? Thanks


Allow providers to handle supports_

This helps Providers answer supports_*? questions
An "Ems" for AnsibleTower returns a Provider and not an InfraManager / CloudManager.
That class did not have the mixin necessary to handle those questions.
This fixes an issue when calling ems#supports_streaming_refresh?
fixes https://github.com/ManageIQ/manageiq-api/pull/447 (among other failed builds)

@Ladas If you're around, would like your thoughts here as well.

@Fryguy actually if the target is a ManagerRefresh::Target the targets_by_ems will still return an ExtManagementSystem.  I think the issue is that t.manager was never expected to return something other than an ExtManagementSystem.
I'm not sure why a credential would be owned by the provider instead of by the ext_management_system.  Maybe @jameswnl knows?
I could see adding a .responds_to temporarily to fix the issue but if it is expected that a credential.manager returns a provider then I think the same condition applies for streaming refresh of that provider (i.e. should we queue a refresh or not)

Actually I think this is an issue with the API spec setting the manager to the provider not the EMS.  The specs created by a refresh have the credential.manager being the EMS.

@agrare yes, credentials are associated with the manager, not the provider.  See my comment to https://github.com/ManageIQ/manageiq-api/pull/451

closing - Better to fix the bad tests
Alternatives:

https://github.com/ManageIQ/manageiq-api/pull/451 or
https://github.com/ManageIQ/manageiq-api/pull/452


Renaming of file - what happens?

Apologies if this is mentioned somewhere, I have looked and cannot see it.
When "image.jpg" is uploaded is the name retained in the object but with the suffix appended? The example show is being returned as a long string but I cannot see where this has come from.

Good question @latitudehopper, this should definitely be explained better in the docs!
By default uploaded images get assigned a unique random name like 110ec58a-a0f2-4ac4-8393-c866d813b8d1 using the UUID v4 algorithm. All resized versions of this image will have a suffix string appended to them like this: 110ec58a-a0f2-4ac4-8393-c866d813b8d1-small.
This is configurable, you can use another random name generator of your choosing:
var client = new Upload(process.env.AWS_BUCKET_NAME, {
  randomPath: require('@starefossen/rand-path')
});

or you can set the name for the uploaded image yourself:
client.upload(file, { path: 'my-file-name' }, function(err, versions, meta) {
  // uploaded image is here
});

Excellent answer. Many thanks. I will have a play! Thanks, @Starefossen


Access Function Calling responses before Pydantic's parsing

For debug purposes, is it possible to access the raw response of a Function Calling request before Pydantic's parsing? Thanks!

Pydantic doesn't parse the response, the raw JSON is just loaded (I did have Pydantic parse it but it was a usability issue there).
Not sure if there's a user-friendly approach for it. Maybe a parameter to also return the API response?

Maybe a parameter to also return the API response?

Sounds legit.


Update mockito-core to 3.4.0

Updates org.mockito:mockito-core from 3.3.3 to 3.4.0.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.mockito", artifactId = "mockito-core" } ]

labels: test-library-update, semver-minor

Superseded by #88.


Support division and multiplication with Calc

It would be nice to support the division and multiplication with Calc.

Can you show a use case?

You can already do:
let page = style([
  width @@ px(2 * standard_width)
]);

Now, it is possible with constant multiplier, but not with two different units.
Example if I now write this css, it is impossible:
font-size: calc(14px + (26 - 14) * ((100vw - 300px) / (1600 - 300)));

Also, I did not test it, but I have impression that the use of several operator in same property, is buggy.
Example:
open Css;
let ((-@), (+@)) = (Calc.(-), Calc.(+));
let rule = [
    fontSize(px(14) +@ (vw(100.) -@ pct(10.)))
];

It should be relatively simple to add.. I left it out because i could not think of a valid use case.
I haven't tested multiple operators... there could be an issue there.

IMHO, to support multiple operations on the same property would surely involve a BC

Well maybe not, thanks to Css.rei

This code
let ((-@), (+@)) = (Calc.(-), Calc.(+));
padding(px(10) +@ px(10) -@ px(10));

return:
padding: calc(calc(10px + 10px) - 10px);

Which seems incorrect in the standard https://developer.mozilla.org/en-US/docs/Web/CSS/calc
but works in chrome, safari and firefox.

It is... we dont handle stacked calc yet...

Here is a proof of concept (https://sketch.sh/s/rf9tLCgPOK2Rns7rErmqiE/)
If you find it interesting I can try to make a pull request
Using
open CalcOp;
open Length;

toString(px(10) - px(5) + 4. * px(5) + px(5) / 5. + px(K.(5 + 5)));

Module CalcOp
module CalcOp = {
  let (+) = (a, b) => `add((a, b));
  let (-) = (a, b) => `sub((a, b));
  let ( * ) = (k, v) => `mul((v, k));
  let ( *. ) = (v, k) => `mul((v, k));
  let (/) = (v, k) => `div((v, k));

  module K = {
    let (+) = Pervasives.(+);
    let (-) = Pervasives.(-);
    let ( * ) = Pervasives.( * );
    let ( *. ) = Pervasives.( *. );
    let (/) = Pervasives.(/);
  };
};

Module Length
module Length = {
  type t = [
    | `ch(float)
    | `em(float)
    | `ex(float)
    | `rem(float)
    | `vh(float)
    | `vw(float)
    | `vmin(float)
    | `vmax(float)
    | `px(int)
    | `pxFloat(float)
    | `cm(float)
    | `mm(float)
    | `inch(float)
    | `pc(float)
    | `pt(int)
    | `zero
    | `percent(float)
    | `add(t, t)
    | `sub(t, t)
    | `mul(t, float)
    | `div(t, float)
  ];

  let ch = x => `ch(x);
  let em = x => `em(x);
  let ex = x => `ex(x);
  let rem = x => `rem(x);
  let vh = x => `vh(x);
  let vw = x => `vw(x);
  let vmin = x => `vmin(x);
  let vmax = x => `vmax(x);
  let px = x => `px(x);
  let pxFloat = x => `pxFloat(x);
  let cm = x => `cm(x);
  let mm = x => `mm(x);
  let inch = x => `inch(x);
  let pc = x => `pc(x);
  let pt = x => `pt(x);
  let zero = `zero;

  let rec toString = (v: t): string =>
    switch (v) {
    | `ch(x) => string_of_float(x) ++ "ch"
    | `em(x) => string_of_float(x) ++ "em"
    | `ex(x) => string_of_float(x) ++ "ex"
    | `rem(x) => string_of_float(x) ++ "rem"
    | `vh(x) => string_of_float(x) ++ "vh"
    | `vw(x) => string_of_float(x) ++ "vw"
    | `vmin(x) => string_of_float(x) ++ "vmin"
    | `vmax(x) => string_of_float(x) ++ "vmax"
    | `px(x) => string_of_int(x) ++ "px"
    | `pxFloat(x) => string_of_float(x) ++ "px"
    | `cm(x) => string_of_float(x) ++ "cm"
    | `mm(x) => string_of_float(x) ++ "mm"
    | `inch(x) => string_of_float(x) ++ "in"
    | `pc(x) => string_of_float(x) ++ "pc"
    | `pt(x) => string_of_int(x) ++ "pt"
    | `zero => "0"
    | `percent(x) => string_of_float(x) ++ "%"
    | `add(l, r) => "calc(" ++ toString(l) ++ " + " ++ toString(r) ++ ")"
    | `sub(l, r) => "calc(" ++ toString(l) ++ " - " ++ toString(r) ++ ")"
    | `mul(v, k) =>
      "calc(" ++ toString(v) ++ " * " ++ string_of_float(k) ++ ")"
    | `div(v, k) =>
      "calc(" ++ toString(v) ++ " / " ++ string_of_float(k) ++ ")"
    };
};

@maarekj Yes, this is interesting, but I'd really like to remove the calc from length type.
calc can be applied on different types https://developer.mozilla.org/en-US/docs/Web/CSS/calc, I don't think it's good to keep it in Length module


How to get historical data?

Hi there,
Thanks for the wrapper. Its nicely designed and easy to understand.
I was going through the api page on Bittrex's site and then this python wrapper here. They have nothing to fetch historical OHLC data for any period, do they?
Is there any way?
Regards,

There is not, you need to record it by yourself. You can purchase from third parties though like coinigy eg.

try these Kaggle links for data:
Bitcoin
Ethereum


Linked file extension

Hi currently in generated index.md file contents linked like this
[h2 Heading](dep/base.md#h2-heading)
How can I configure this to generating links without .md file extension like this
[h2 Heading](dep/base#h2-heading)

@realsontaran I created a new plugin that addresses most issues with this implementation.
It supports a configuration of the reference suffix. In your case, you should add the following to your conf.py file:
markdown_uri_doc_suffix = ""

Please try it: https://github.com/liran-funaro/sphinx-markdown-builder

@liran-funaro I am happy to forward people to your fork if you don't mind giving me some credit in your README.md and making a pull request in my README.md file. I no longer use this project, so I lack the motivation to properly maintain it.

Thanks.
I already credited you (and your brother I presume) in the readme.
If you have some other phrasing you'd like me to use please let me know.
Do you want me to open a PR for your readme that refers to my project?
One last thing, can you remove your plugin from PiPy so I'll add mine instead?

DISCONTINUED: This project is no longer maintained. The active version of this project is now being maintained at liran-funaro/sphinx-markdown-builder.


Docs for Recommended Reconnection strategy

Hi,
I've been having this problem for a while, and I could not find any docs related to how you recommend for us to handle reconnection strategy. When the connection is lost the driver is not able to recover, resulting in a failure state, where the app is alive but connection is dead.
The error I'm getting is gorethink: write tcp <IP_ADDRESS>:63652-><IP_ADDRESS>:28015: write: broken pipe.
Would you mind providing a default docs for handling reconnection strategies ?
Thank you.

Hi @thomasmodeneis,
Sorry for taking so long to respond, the driver is meant to reconnect automatically when it detects a bad connection so if you are seeing issues then there may be a bug with the driver. Funnily enough I have been seeing some issues using a different database driver which uses some of the same underlying packages so the issues might be related.
Unfortunately I don't have any solutions right now but I will try to spend some time investigating the issue soon.

Sorry for the delay, I just wrote a simple script to test reconnections and it appears to be working, could you let me know any more information about what is causing the connections to be dropped and any information you can find about why the connection is not being recreated?
Here is the code I was running and the output I observed
package main

import (
	"fmt"
	"time"

	r "github.com/dancannon/gorethink"
)

func main() {
	session, _ := r.Connect(r.ConnectOpts{
		Address:  "localhost:28015",
		Database: "test",
	})

	for {
		cur, err := r.Expr([]interface{}{1, 2, 3}).Run(session)
		if err != nil {
			fmt.Println(err)
		}

		var res []interface{}
		cur.All(&res)

		fmt.Println(res)

		time.Sleep(time.Second)
	}
}

[1 2 3]
[1 2 3]
// I manually interrupted RethinkDB instance
gorethink: dial tcp [::1]:28015: getsockopt: connection refused
[]
gorethink: dial tcp [::1]:28015: getsockopt: connection refused
[]
gorethink: dial tcp [::1]:28015: getsockopt: connection refused
[]
gorethink: dial tcp [::1]:28015: getsockopt: connection refused
[]
// I started the RethinkDB instance again
[1 2 3]
[1 2 3]
[1 2 3]

Hi @dancannon
I've tested with latest v2.2.2 and confirmed that it now reconnects after db is restarted.
I will deploy this to prod and monitor the behaviour for the next days.
Thanks !
I was on v2.2.0
 {
			"ImportPath": "github.com/dancannon/gorethink",
			"Comment": "v2.2.0",
			"Rev": "e75f34b0817d1ed1a4b967975ccf5fac9535dbc2"
		},

And now on v2.2.2
{
			"ImportPath": "gopkg.in/dancannon/gorethink.v2/encoding",
			"Comment": "v2.2.2",
			"Rev": "016a1d3b4d15951ab2e39bd3596718ba94d298ba"
		},
		{
			"ImportPath": "gopkg.in/dancannon/gorethink.v2/ql2",
			"Comment": "v2.2.2",
			"Rev": "016a1d3b4d15951ab2e39bd3596718ba94d298ba"
		},
		{
			"ImportPath": "gopkg.in/dancannon/gorethink.v2/types",
			"Comment": "v2.2.2",
			"Rev": "016a1d3b4d15951ab2e39bd3596718ba94d298ba"
		},

Hi everyone,
for us the problem is not reconnecting (which actually seems to work) but connecting on startup.
Currently, the the connection will only work if the rethinkdb server is already started when the program tries to establish the connection. This will pose problems if one is trying to automatically startup services and the rethinkd-db at the same time (i.e. using different docker-containers).
    session, err := r.Connect(r.ConnectOpts{
        Address: url,
    })
    if err != nil {
        log.Fatalln(err)
    }

We did write a small utility package that will start a goroutine trying to establish the connection until it succeeds. As soon as the connection has been established once, later requests will automatically try to reconnect to the server.
It would however be great to have this implemented in the gorethink package itself.

That is odd, could you share a gist with this goroutine of yours so I can try to reproduce it?
Cheers.

Here is an example gist: https://gist.github.com/tikiatua/f1a639d4e6c84dfc94660cfc3357d20e
Subsequent attempts to connect to a server will result in a panic, if the initial connection did not succeed and the process is not aborted. On the other hand, if an empty session is passed to a run command, the commend will not panic but correctly result in a corresponding error.
My suggestions would be to return an empty session from the r.Connect() method if the session failed to allow for later connection attempts (i.e in a separate goroutine).

I just added a pull request #381 to "fix" this behaviour.

To be honest I had not considered supporting this use case as I typically handle this behaviour in my applications however I think it makes sense to include your fix. I will include it in the next release, until then I will merge it to the develop branch.

Hi,
So I've just restarted rethinkdb cluster and noticed that app failed to reconnect.
Logs are not conclusive, but reconnection never happens.
When rethinkdb was restarted, queries started to fail with
gorethink: EOF
Then when rethinkdb went back up, queries are now failing with err
gorethink: write tcp <IP_ADDRESS>:33472-><IP_ADDRESS>:28015: write: broken pipe
Any ideas ?
Cheers.

@dancannon what was the resolution here ? I missed the point.

@thomasmodeneis I ran into this and I found that gorethink uses a library called fatih/pool for connection pools. The connections to your rethinkdb cluster had broken pipes due to the restart, so they have become stale... however due to a bug in fatih/pool they weren't closed properly so the pool will keep reusing the stale connections.
Fix is to update to this sha or newer: https://github.com/fatih/pool/commit/44696c5bba56ddaeb1e5750a80e2fbab8925d3e4

@hinshun oh man, thanks for the heads up, this defect is a pain on my servers.
I will check this out asap, thanks again for the tip.
Cheers.


Fibonacci versioning

Increment every next version by Fibonacci number: fibver.org

Add it into dephell_versioning with docs and tests. Allow only major.minor.patch
Update docs in DepHell for project bump

So “Product 55.0.0” versus “Product 34.0.0” sounds much more expensive and feature-full than boring upgrade from “Product 8.0” to “Product 9.0”.

I disagree and think it may cause more confusion. People were confused when pip first switched to calver in 2018, because of the leap from 10.x to 18.x: "This is very strange. Did the pip project just upgrade from version 10 to version 18? Why?"

https://stackoverflow.com/questions/51476300/why-did-pip-upgrade-from-version-10-to-version-18

Moreover, sucessive Fibonacci numbers differs greatly. It is much harder to confuse versions 1.987.2584 and 1.2584.987 instead of 1.15.17 and 1.17.15.

1.987.2584 and 1.2584.987 are much less readable for me. I'd hate to have to say it out loud, or even remember which version is which!
I don't recall a situation confusing something like 1.15.17 and 1.17.15.
FibVer reminds me a bit of html5lib's asymptotic versioning: https://github.com/html5lib/html5lib-python/issues/282.

FibVer reminds me a bit of html5lib's asymptotic versioning

html5lib represented in examples for ZeroVer.

I disagree and think it may cause more confusion.

Of course, it's an awful way to version your project. As Roman versioning. Don't treat it seriously.


Proposal: Use shadcn UI components

shadcn has come up with a set of good UI components that align closely with the current choices of epic-stack.
Refer:

https://github.com/shadcn/ui
https://ui.shadcn.com/

At the core, it's nothing but wrappers around Radix UI components with Tailwindcss for styling.
Pros:

Could remove some of the hassles around starting a new project, which is one of the things epic-stack could help with.
Comes with theming and complete customizability. We can just pick and choose the radix components to use, just like the radix components in use currently.

Cons:

Could be a little opinionated for some, but I guess it could be a good one to consider.
Could add a few more dependencies

Thanks for this! I'm not sure how to apply this though considering shadcn is not a library you can install:

https://ui.shadcn.com/docs


provide a better debugging experience when peer dependencies cause multiple resolution of singleton packags

Is your feature request related to a problem? Please describe.
3 or 4 different projects I am aware of in the last two weeks ran into issues where dependency updates caused undesired multiple resolutions of itwinjs-core packages which is illegal and causes (occasionally nefarious) runtime errors.
Sometimes people will accidentally commit the broken resulting lockfile too.
Describe the solution you'd like

for @itwin/build-tools or some published package to ship a utility function that can be imported in any project's .pnpmfile.cjs to error out on attempts to install a dependency arrangement that results in illegal multi-resolved singleton packages. This will help people more quickly notice when they've screwed up a project, not at runtime
a guide or link to an existing guide on debugging multi-resolved peer dependencies in pnpm. Maybe placed in a FAQ or in tips and guidelines, next to the API support policy

I'm open to other potential solutions and discussions. I'd be curious if anyone has researched:

* wildcard versions for some peer dependencies
meta packages

these would need to be tested for tree-shakability, and possibly itwin.js packages need to conform to the package.json#sideEffects standard used by bundlers.

pnpm auto install peers

Describe alternatives you've considered
pnpm override everything... causes other issues.
Additional context
None

One of the reasons that can happen is that peerDependencies in itwinjs-core are specified with ^, which tells package manager that it's fine to use a higher version. The first step, IMO, should be to fix this problem and instead specify all peer deps at exact version.


Make new uplink-c release

Follow https://github.com/storj/uplink-c/blob/main/MAINTAINERS.md to make new release. We should make version 1.8.0 but we should  also first finish Add new edge.Config field InsecureSkipVerify to bindings https://github.com/storj/uplink-c/issues/22.

https://review.dev.storj.io/c/storj/uplink-c/+/9129

Waiting for Eriks PR to be pushed.

May I come back to this? Can we create a new release with a new tag?

This finally done.


[bitfinex] added the category parameter to ledger method

see the api description for the new parameter 'category'
https://docs.bitfinex.com/reference#rest-auth-ledgers

@timmolter thanks for merging
did not have time yet to see, what went wrong with the CI check...
but seems not to be related to the changes in this PR

@timmolter thanks for merging
did not have time yet to see, what went wrong with the CI check...
but seems not to be related to the changes in this PR

Just some artifact transferring errors I've been seeing A LOT lately. Pretty annoying. I tried adding a artifact cache on travis ci. We'll see if that helps.

Just some artifact transferring errors I've been seeing A LOT lately. Pretty annoying. I tried adding a artifact cache on travis ci. We'll see if that helps.


Add .gitattributes file at the root of the web-application template to normalize line endings when pushing to Git?

I am not sure if it' really needed... When I was developing CRACO, I had issues with line endings when I was accepting PR form Unix based OS contributors.
I added a .gitattributes file at the root of the repo with the following content to normalize the line endings when pushing to Git:
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto eol=lf

Should it be added to the CLI templates?

@ofrogon @alexasselin008 any comment?

Fixed in PR #60


Problem with the browser Back button.

Hi, I'm implementing this example: http://www.yiiframework.com/wiki/772/pjax-on-activeform-and-gridview-yii2
But instead of adding records, i´m using it to search a model via GET.
Everything behaves the way it should, exept when I use the browser back button and reach the first state without any search,  pjax is replacing the GridView with a duplicate of the search form, so I´m getting a page with two search forms and no GridView.
I've also tested it using a plain CRUD generated by Yii, and I get the same wrong behavior.

May be fixed in #21
Could you try the dev-version, please?

@aquataller Could you check, please?

Sorry, the project is already closed and I can't make any modifications or test it

Ok, thank you for the response. I'll close the issue because it really seems to be fixed in #21


Turn selected pods into a scope

This feature helps organize the canvas hierarchy. Specifically, it consists of two features:

a button to turn selected pods into a scope
a button to select all pods on the ROOT canvas

a button to turn selected pods into a scope
Did PR #419 fully address this feature?

a button to select all pods on the ROOT canvas
Is PR #454 good enough for now?

Both PRs addressed partially. I’d still like a direct way to do these operations.
In addition, we need one more feature alone this line: splice a scope into its parent scope.

This is known as the splicing and raising in structural editing


GZRS availability

CanadaCentral isn't like under GZRS but it is available. Customer and I both create a storage account there with GZRS. Please check for other regions that should be updated and update the doc. Thank you!
[Enter feedback here]

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

ID: f618f40d-ae53-5c3b-d8bf-0e80614f66d3
Version Independent ID: 93083407-8f1e-b3e2-6a62-e30be5e1fbcb
Content: Data redundancy - Azure Storage
Content Source: articles/storage/common/storage-redundancy.md
Service: storage
Sub-service: common
GitHub Login: @tamram
Microsoft Alias: tamram

@grant-flander Thanks for your question. We are checking on this and will respond to you soon.

@grant-flander - Thanks for your feedback! The doc has been updated with all of the currently available regions.
#reassign: @tamram
#please-close


fix: avoid throwing in tryRecoverDBFiles, decouple and cleanup persistence

fixes: #277
(hopefully)
Also gives quite a performance boost when persisting primitives. (~800k -> 1.6M changes/s, including closing the DB after each set of 100k changes)

The last commit can help with https://github.com/ioBroker/ioBroker.js-controller/issues/1779


Update the PR template

Proposed feature
As per internal IO alignment, it was agreed to update the PR template so it is more in line with the objective of the contribution.
As a contributor, my objective is to ensure that my PR is successfully merged into the project. In order to achieve this, it is crucial for me to have a clear understanding of the expectations and criteria the reviewers will use to evaluate my PR.
The template acts as a guide for contributors, outlining the information and considerations that must be part of the PR. By adhering to the template, I can ensure that I provide the necessary details for the reviewers to make an informed decision about merging my changes and that I have completed the associated tasks expected to accompany a contribution (like updating docs and adding tests, for example).
Once the PR has been submitted the contributor and reviewer can request more details and clarify within the PR comments
Feature description
Description:
Summarize the changes you're submitting in a few sentences, including Jira ticket ATL-xxxx if applicable.
Context:
It creates traceability on the matter tackled by the PR. It will also help the reviewer understand what the PR is about ---- linking to related issues, bug reports, or discussions for context.
Alternatives Considered (optional):
Link to existing ADR if any. If relevant, describe other approaches explored and why this approach was chosen. Documenting why certain paths were not taken creates a knowledge base for future reference, helping prevent others from revisiting less optimal ideas.
Checklist:

[ ] My PR follows the contribution guidelines of this project
[ ] My PR is free of third-party dependencies that don't comply with HL-Allowlist
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have checked the PR title to follow the conventional commit specification

Anything else?
No response

@essbante-io , can you share the link to HL-Allowlist so I can add it to the PR template?

I added the link to the PR.

Comment from @curtis-h to take into account (I'd remove Context, it just looks like noise: I don't understand it's blurb, and can't see the distinction between it and "Description"): merge the Description and the Context to simplify.


Unable to register IMixedRealityInputDeviceManager data provider

Import a new MRTK and report an error directly
unity 2020.2.2

Please see my response to a similar case in #9528. Also please fill out our template bug report next time or it may be very hard for us to try to fix the issue without the information requested in that template.


[QUESTION] Is there a way to force the language of the LP web part content?

Is there a way to force the language of the LP web part content?

[] Installation
[] Administration
[] Custom Content
[x] M365 learning pathways web part

When we create multilingual content we have different pages per language. If we create a page for the french content and include the LP web part, we should be able to set the language to french in the web part properties. That way, we would be able to see proper content for the language (french content for french page and english content for the english page).
The way it currently behave is that I will allways see LP content in my browser's or user's language. If I switch the language selector to the alternate page, it would alternate from french to english text but the web part's dynamic content stays the same.
Thanks

Yes, this is a known behavior that is a function of how multilingual pages and SharePoint Framework solution work together.  Unfortunately, there is no uncomplicated way for you to force the language of the content. If you have a user that has not set the default language in their delve profile, then the browser language will determine the user's language in SharePoint.  So that's the easiest way to test the translations as it's a simple thing to switch the browsers language.

It is harder to maintain content because of that automatic language. Also, it looks weird to have mixed language content on the same page because some comes from the page variation and other from user's settings.
Can this be an improvement or there is no way to control it at all?

There is no way for learning pathways solution (which uses the SharePoint Framework) to improve this.  As I said this is an issue with the out of the box SharePoint multilingual publishing pages and SharePoint Framework solutions, so the SharePoint engineering team would have to change the behavior.
That all said, if I understand correctly then you can just go look at the page directly instead of reviewing it through the playlist as iFramed content. They will automatically be displayed in whatever language the user is defaulted to, as you can tell since your default language is what the web part is always displaying in. So maybe the solution is just to change the way you review/author.  Sorry wish I had a better answer.

Thanks for the answer.


wizard-docker.controller.js fix win socket command

Fix backslash being cut from winSocket command line
Changes:
https://<IP_ADDRESS>:9443/#!/wizard/endpoints

where it should be

Closing this one as it's been resolved by https://github.com/portainer/portainer/pull/6957


bindings(python): better message type

Congratulations on the release of the first version of the Python bindings! 🎉
As I mentioned in issue #559 and in the bindings/python documentation:

Access to data of message types (e.g., Greeting) is currently only available through dictionary representations.

To address this, I attempted to implement a library that facilitates the conversion between dict and Python classes using msgspec. You can check it out here.

I chose msgspec over pydantic because msgspec is lightweight and sufficient for the task. However, it can be easily replaced with pydantic if necessary.

Initially, I adjusted the original dict structure:
{
  "Ok": {
      "tag": "a001",
      "code": null,
      "text": "Message 17 is the first unseen message"
  }
}

Currently, enum variant names are used as keys. These can be used as a tag field in tagged unions, so I placed them as the value of codec_model:
{
  "codec_model": "Ok",
  "tag": "a001",
  "code": null,
  "text": "Message 17 is the first unseen message"
}

Specifically, if the value isn't an object or if it represents a Rust enum variant object, the value is placed in a codec_data field (as implemented in utils.py):
{
  "Unseen": 17
}
// transforms to
{
  "codec_model": "Unseen",
  "codec_data": 17
}

Next, I created some msgspec structs in the models directory to build upon this structure:
Unlike Rust enums, Python enums do not support Algebraic Data Types (ADT), so I used Union to simulate them:
class TaggedBase(Struct, tag_field="codec_model"):
    pass

# Example where value isn't an object
class Unseen(TaggedBase):
    codec_data: int

# Example where value is an object
class AppendUid(TaggedBase):
    uid_validity: NoZeroUint
    uid: NoZeroUint

# Example where the value is a Rust enum variant object
class Untagged(TaggedBase):
    kind: StatusKind
    code: Code | None
    text: str

class Tagged(TaggedBase):
    tag: str
    body: StatusBody

class Bye(TaggedBase):
    code: Code | None
    text: str

class Status(TaggedBase):
    codec_data: Untagged | Tagged | Bye

And so on...
In my repository, I referred to imap-types to define all the structures that will be used in the Python bindings. I also defined some functions in validate.py for use:
_, command = type_codec_decode(CommandCodec, b"ABCD UID FETCH 1,2:* (BODY.PEEK[<IP_ADDRESS>.MIME]<42.1337>)\r\n")
>>> Command(
    tag="ABCD",
    body=Fetch(
        sequence_set=[Single(codec_data=Value(codec_data=1)), Range(codec_data=(Value(codec_data=2), "Asterisk"))],
        macro_or_item_names=MessageDataItemNames(
            codec_data=[NameBodyExt(section=Mime(codec_data=[1, 2, 3, 4]), partial=(42, 1337), peek=True)]
        ),
        uid=True,
    ),
)

type_codec_encode(command).dump()
>>> b"ABCD UID FETCH 1,2:* (BODY.PEEK[<IP_ADDRESS>.MIME]<42.1337>)\r\n"

model_dump(command)
>>> {
    "tag": "ABCD",
    "body": {
        "Fetch": {
            "sequence_set": [{"Single": {"Value": 1}}, {"Range": [{"Value": 2}, "Asterisk"]}],
            "macro_or_item_names": {
                "MessageDataItemNames": [
                    {"BodyExt": {"section": {"Mime": [1, 2, 3, 4]}, "partial": [42, 1337], "peek": True}}
                ]
            },
            "uid": True,
        }
    },
}

You can find some tests in the tests directory, which can be run using pytest.

I haven’t tested all the structures yet, so there might be some structural mistakes. The main goal of this issue is to propose a potential solution to improve the typing experience on the Python side as I understand it. Additionally, I’m interested in exploring any effective methods to test the consistency of the structure between imap-types and imap-codec-model (it does seem a bit overwhelming).
If it's feasible, perhaps this could be integrated into the Python bindings library. I’d be happy to contribute further!

Hey @AzideCupric! Thank you so much for your work (and the congratulations)! I'll try to take a look as soon as possible! I'm very happy about your contribution, but need to find a slot when to give this the attention it deserves :-) Unfortunately, I'm not the most experienced Python developer... But: Very happy to learn from you! Maybe Henning can also chime in.

Thanks again for your work, but also for creating this issue, @AzideCupric, I still had moving your suggestions into a new issue on my list but unfortunately didn't get round to it yet. I'm really sorry for keeping you waiting this long.
I think a better type interface on the Python side is definitely a topic we should persue further and your approach looks reasonable. I'm currently not sure how this impacts the maintainability of imap-codec and imap-types (as the type structure is maintained in both languages), but I'm sure we will find a way. Maybe we will have to separate the repositories after all, so Rust developers do not have to change Python code all the time and the Python bindings become a downstream project.
I'm still catching up with other projects at the moment, but otherwise I'm happy to support on this. Hopefully, I'll find the time to take a good look at your suggestions over the weekend.

Thanks for the patient responses from both of you. I am here awaiting good news.
And if there is a need, I am also more than willing to offer my help here.

@AzideCupric Thanks again for you patience! I now finally found some time to take a deeper look at this. I really like the work you have done here!
As I could not find an example on how to construct one of the types, I played around with it myself and result looks pretty neat (maybe except for the type paths but I did not want to pollute the local namespace too much):
# imap_codec_model/models/__init__.py
from . import fetch, sequence

# tests/test_validate.py
from imap_codec_model import models

def test_construct_command():
    remaining, decoded = type_codec_decode(
        CommandCodec, b"ABCD UID FETCH 1,2:* (BODY.PEEK[<IP_ADDRESS>.MIME]<42.1337>)\r\n"
    )
    assert remaining == b""

    ref = models.Command(
        tag="ABCD",
        body=models.command.Fetch(
            sequence_set=[
                models.sequence.Single(models.sequence.Value(1)),
                models.sequence.Range((models.sequence.Value(2), "Asterisk")),
            ],
            macro_or_item_names=models.fetch.MessageDataItemNames(
                [
                    models.fetch.NameBodyExt(
                        section=models.fetch.Mime([1, 2, 3, 4]),
                        partial=(42, 1337),
                        peek=True,
                    )
                ]
            ),
            uid=True,
        ),
    )
    assert decoded == ref

There is actually not much for me to add, as I think working on your IMAP extension for NoneBot will probably guide you to implementing a better API than any theoretical stuff we would come up with will. I would probably prefer wrapper types instead of re-export the types from imap-codec so you don't end up with multiple codec and message types in the user facing API.
Is there anything we could do on the Rust side to make life easier for you?
However, I think the question on how to continue with this is more of organizational than of technical nature. As mentioned above, I'm a still bit hesitant about extending imap-codec-python in this repository with lots of Python code as it would limit working on imap-codec to "polyglot developers". For the bare minimum right now, it is probably okay, but going forward, we should move to a different structure.
Off hand, I see two paths for this:

We could move the Python bindings into their own repository where you can then add the new API to it.
You could also create your own Python package (which would be imap-codec-model right now) sitting on top of imap-codec and we would update the documentation to refer users over to your package for a more pythonic interface.

@AzideCupric, @duesee What are your thoughts on this?

Thanks so much for your kind words!
Regarding your question:

Is there anything we could do on the Rust side to make life easier for you?

As you might have noticed in utils.py, there is an additional step where we adjust the dictionary structure before conversion. I wonder if there's a way to handle this on the Rust side. Specifically, could we modify the output structure from something like:
{
    "Unseen": 12
}

to a format more like:
{
    "tag": "Unseen",
    "data": 12
}

This would help avoid unnecessary performance costs and potential errors when adjusting the structure after generation.
Additionally, I'm concerned that testing each IMAP lines one by one might be too extensive and time-consuming. I'm wondering if there's a more efficient way to validate the alignment between the Python models and imap-types, so that any discrepancies can be identified and resolved more quickly.

We could move the Python bindings into their own repository where you can then add the new API to it.
You could also create your own Python package (which would be imap-codec-model right now) sitting on top of imap-codec and we would update the documentation to refer users over to your package for a more pythonic interface.

Between the two options, I lean more towards the first one. As a user, it’s always more convenient to have just one dependency rather than two. Moreover, needing to install two different packages from separate authors for a single feature might feel a bit odd or even unsettling.

As you might have noticed in utils.py, there is an additional step where we adjust the dictionary structure before conversion. I wonder if there's a way to handle this on the Rust side. Specifically, could we modify the output structure from something like:
{
    "Unseen": 12
}

to a format more like:
{
    "tag": "Unseen",
    "data": 12
}

This can be configured through serdes https://serde.rs/enum-representations.html. I generally find the internally tagged variant most easy to work with. So, I would be in favor of this change.

@AzideCupric To give you a heads-up on this: @duesee and I will move the Python bindings code into their own repository over the next days.
Afterwards, it would be awesome if you can provide a PR with the first set of changes, as we really would like to see the great work you did merged into the project, so others can benefit from it.
Meanwhile, I will look into the mapping thing and see, how I can change it to the internally tagged representation. It would indeed be nice, if we could get rid of the conversions.

Thank you for the update! It's an honor to contribute to the project, I'm excited for the changes ahead and to see how we can improve things further together.

@AzideCupric Thanks again for your patience! After we have now separated the repositories (see https://github.com/duesee/imap-codec-python), I took a shot at the enum representation.
The serde attribute referred to by @duesee seems to work as expected. However, as there are several enumerations using tuple variants, thus, the only useful alternative to the "externally tagged" default seems to be "adjacently tagged". (At least if we want to keep this consistent for all enum types.)
This means, that { "Unseen": 12 } now becomes { "type": "Unseen", "data": 12 } as discussed. However, this also results in { "BodyExt": { "section": None, ... } } becoming { "type": "BodyExt", "data": { "section": None, ... } } instead of { "type": "BodyExt", "section": None, ... }. The latter might have been more convenient for conversion?
You should be able to compile/install the package directly from my development branch: pip install --force-reinstall imap-codec@git+https://github.com/duesee/imap-codec-python@henning/enum_representations
The corresponding branches/changes can be found here:

imap-codec/imap-types: https://github.com/HenningHolmDE/imap-codec/tree/enum_representations
imap-codec-python: https://github.com/duesee/imap-codec-python/tree/henning/enum_representations

I'm curious if this makes things work better in combination with msgspec and allows us to get rid of the dict transformations.

Sorry for the delay in my response, and thank you so much for the work you've done on the enum_representations branch!
After reviewing the relevant code, I believe there are still some points that need further discussion.

I'm curious if this makes things work better in combination with msgspec and allows us to get rid of the dict transformations.

If "adjacently tagged" is the only option, as mentioned in my initial post, it forces all structures into the second format. For example, in the case of:
#[derive(Serialize, Deserialize, Debug)]
enum Status {
    Untagged(StatusBody),
    // ...
}

#[derive(Serialize, Deserialize, Debug)]
struct StatusBody {
    kind: StatusKind,
    code: Option<Code>,
    text: String,
}

We would have to write it as:
# now
class Untagged(TaggedBase):
    codec_data: StatusBody

class StatusBody(TaggedBase):
    kind: StatusKind
    code: Code | None
    text: str

res = Untagged(StatusBody(kind="Ok", code=None, text="..."))

# before
class Untagged(TaggedBase):
    kind: StatusKind
    code: Code | None
    text: str

res = Untagged(kind="Ok", code=None, text="...")

Compared to the previous approach, this adds an additional import of StatusBody and introduces another layer of nesting, making it less straightforward.
If possible, perhaps a custom derive macro could be implemented to apply Custom serialization. This could further adjust/restore structures that meet certain criteria, allowing us to retain the simplicity of the previous approach while still benefiting from the "adjacently tagged" base. Since some structural transformations seem inevitable, keeping them on the Rust side might be more efficient.

The latter might have been more convenient for conversion?

Additionally, I believe the tag name used in the current enum_representations branch is too generic. The use of type as a tag might conflict with certain names in imap-types, potentially leading to unnecessary clashes. This is why I opted for codec_model and codec_data on the Python side.
Finally, I noticed that the current Python bindings repository could benefit from adding static type checking and formatting tools like pyright and ruff, as well as dependency management tools (like pdm) to enhance the development experience. Especially with the introduction of msgspec structs, static type checking would help catch errors early. If agreeable, I can contribute by adding some configurations and related documentation.

Just a small update: We havn't forgotten about you :-) It's just that we don't have funding currently and too busy with our day-to-day jobs... But: Your work will not get old, don't worry! We'll surely come back to this eventually!

I'm in the same boat, and I also except this new feature can be implemented soon!


[WolverineGet] returns 200 OK instead of 404 Not found

Executing this request in the Todo Sample api project returns the wrong response:
GET http://localhost:5197/todoitems/2

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Sat, 29 Apr 2023 20:57:23 GMT
Server: Kestrel
Transfer-Encoding: chunked

null

Fetching a collection also fails, might be a seperate issue though:
    [WolverineGet("/todoitems")]
    public static Task<IReadOnlyList<Todo>> Get(IQuerySession session)
        => session.Query<Todo>().ToListAsync();

Returns:
GET http://localhost:5197/todoitems

HTTP/1.1 200 OK
Content-Length: 0
Date: Sat, 29 Apr 2023 22:47:58 GMT
Server: Kestrel

<Response body is empty>

Response code: 200 (OK); Time: 22ms (22 ms); Content length: 0 bytes (0 B)

Replacing the code with this:
    public static async Task<IResult> Get(IQuerySession session)
    {
        var todos = await session.Query<Todo>().ToListAsync();
        return Results.Ok(todos);
    }

Works and returns:
GET http://localhost:5197/todoitems

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Sat, 29 Apr 2023 22:50:23 GMT
Server: Kestrel
Transfer-Encoding: chunked

[
  {
    "id": 1,
    "name": "Add json encoding",
    "isComplete": false
  },
  {
    "id": 1001,
    "name": "Hello world!",
    "isComplete": false
  }
]

(But then we lose the OpenAPI specification)

Oversight on my part. I just flat out forgot to code for that. Easy money.
I'm checking on the collection thing now, and that's most likely a separate issue.

Thanks for your super quick resolutions! Super excited about this, and MartenDB! 💯