Tracer.capture_method decorator does not preserve function type hints

What were you trying to accomplish?
I want to use the @tracer.capture_method decorator for detailed function level tracing however it's currently unusable because it disables all errors when linting with mypy.
Expected Behavior
See code example below
Current Behavior
Function signatures (argument and return types) are not preserved when decorated with @tracer.capture_method and linting with mypy.
Possible Solution
Mypy can be forced to look at the decorated function signature: https://mypy.readthedocs.io/en/stable/generics.html#declaring-decorators
Steps to Reproduce (for bugs)

Use code sample below
Run mypy (tested on mypy==0.782)

Environment

Powertools version used: aws-lambda-powertools==1.10.2
Packaging format (Layers, PyPi): PyPi

How to enable debug mode**

tracer = Tracer()

@tracer.capture_method
def foo(bar: str) -> str:
    return bar

x = foo('baz')
x.get('this is not a dict')  # should cause mypy error
y = foo(123)  # should cause mypy error

Hey @zlalvani thanks a lot for raising this. While we've had numerous MyPy issues fixed we don't yet have full support for it -- Roadmap item that you can help us +1 to prioritize: https://github.com/awslabs/aws-lambda-powertools-roadmap/issues/3
I'm unsure how to fix this atm as I had thought functools.wraps would ensure some level of correctness here (not at wrapt level, tho) -- This is that part of the code: https://github.com/awslabs/aws-lambda-powertools-python/blob/8724294013e3157de9478f90e7c1283a952de54f/aws_lambda_powertools/tracing/tracer.py#L607
I've been meaning to refactor capture_method as it's the most complex logic we have in the codebase, so it'd be a good exercise nevertheless to get this improved.
I'd appreciate if you have any guidance on how we can satisfy MyPy in a backwards compatible way - happy to provide any guidance if you'd like to try contributing it.
Thank you!

Updating here to let you know the fix will be available in the next release

Just merged the fix for synchronous functions - Async however requires the new ParamSpec only available in 3.10, so I'll wait for more customers using mypy + async fn as it'll increase the package size by 240K.
This will be available in next week's release (1.18.0) -- I'll ping back here once it's released.
Thank you again for flagging it @zlalvani

Hi @zlalvani - This is now fixed in 1.18.0
More details in the release notes: https://github.com/awslabs/aws-lambda-powertools-python/releases/tag/v1.18.0

Awesome thanks for the fix! @heitorlessa


Issue with discriminators: system.indexes collection created

I've followed the instructions in this tutorial for using Mongoose discriminators, and everything seems to work fine however a new collection is created called "system.indexes". I believe this is because some fields in my model have unique:true set. Will I be charged for this additional collection? If so, seems to defeat the point of using discriminators. Any way to avoid creating this additional collection? Also, this is an open issue on Stackoverflow: https://stackoverflow.com/questions/52507428/azure-cosmosdb-indexes-collection-named-undefined

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

ID: 59571387-86d7-72d7-2c96-6a8e75ee8b1e
Version Independent ID: d24f0ef2-188f-5603-915e-0a69c2d9b17a
Content: Connect a Node.js Mongoose application to Azure Cosmos DB
Content Source: articles/cosmos-db/mongodb-mongoose.md
Service: cosmos-db
Sub-service: cosmosdb-mongo
GitHub Login: @sivethe
Microsoft Alias: sivethe

@jtmilne Thanks for the comment! We will investigate on this issue and get back to you soon.

@jtmilne : what version of mongoose/mongodb-* packages are you using?  AFAIK, the latest version of mongoose (v5.5.0 and above) does not depend on system.indexes collection for creating a new unique index.
Regarding costing, the system.indexes collection will be charged as it is created by the older mongodb drivers in response to a createIndex call.  The new drivers use the createIndex() command which just creates the index without creating the system collection.

Mongoose version:
"mongoose":` "^5.5.4",

Also, I have set:
useCreateIndex: true,

@jtmilne Can you verify if the items in the undefined collection are items that haven't been resolved correctly, as such there is conflict and the undefined collection is created to handle the conflicts.
https://mongoosejs.com/docs/discriminators.html

Discriminators are a schema inheritance mechanism. They enable you to have multiple models with overlapping schemas on top of the same underlying MongoDB collection.

My assumption here is that if all objects are referenced correctly, the undefined collection will not be created. Possibly an inheritance issue.

We will now proceed to close this thread. If there are further questions regarding this matter, please comment and we will gladly continue the discussion.


Issue getting write_html past generate_html

Here's the error under win10 having just installed latest python and snudown, my data folder is about a gig and a half. I assumed min score/comments and deleted are all set to something by default.
E:\Myfolder\reddittohtml>write_html.py
Traceback (most recent call last):
File "E:\Myfolder\reddittohtml\write_html.py", line 774, in
generate_html(args.min_score, args.min_comments, hide_deleted_comments)
File "E:\Myfolder\reddittohtml\write_html.py", line 114, in generate_html
raw_links = load_links(d, sub, True)
File "E:\Myfolder\reddittohtml\write_html.py", line 625, in load_links
comments_file_path = daily_path + '/' + link_row['id'] + '.csv'
KeyError: 'id'
Here's when I do try it with min and max etc set;
E:\Myfolder\reddittohtml>write_html.py --min-score -4 --min-comments 2 --hide-deleted-comments
Traceback (most recent call last):
File "E:\Myfolder\reddittohtml\write_html.py", line 774, in
generate_html(args.min_score, args.min_comments, hide_deleted_comments)
File "E:\Myfolder\reddittohtml\write_html.py", line 114, in generate_html
raw_links = load_links(d, sub, True)
File "E:\Myfolder\reddittohtml\write_html.py", line 625, in load_links
comments_file_path = daily_path + '/' + link_row['id'] + '.csv'
KeyError: 'id'

I pushed a fix, will you try again?

So it look longer to print out an error this time, if it helps some of the reddit subs I'm pulling from use non-english characters (ex hindi, korean) frequently
E:\Myfolder\reddittohtml>write_html.py
Traceback (most recent call last):
File "E:\Myfolder\reddittohtml\write_html.py", line 774, in
generate_html(args.min_score, args.min_comments, hide_deleted_comments)
File "E:\Myfolder\reddittohtml\write_html.py", line 119, in generate_html
write_link_page(subs, l, sub, hide_deleted_comments)
File "E:\Myfolder\reddittohtml\write_html.py", line 288, in write_link_page
'###BODY###':               snudown.markdown(c['body'].replace('>','>')),
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc2 in position 382: invalid continuation byte

Cool, forward progress. I'm not too hip with Windows, but can you try running the 2 commands listed here under "Windows users may need to run"? https://github.com/libertysoft3/reddit-html-archiver/blob/master/README.md#install

Running the commands with cmd under admin still has the issue;
E:\Myfolder\reddittohtml>chcp 65001
Active code page: 65001
E:\Myfolder\reddittohtml>set PYTHONIOENCODING=utf-8
E:\Myfolder\reddittohtml>write_html.py
Traceback (most recent call last):
File "E:\Myfolder\reddittohtml\write_html.py", line 774, in
generate_html(args.min_score, args.min_comments, hide_deleted_comments)
File "E:\Myfolder\reddittohtml\write_html.py", line 119, in generate_html
write_link_page(subs, l, sub, hide_deleted_comments)
File "E:\Myfolder\reddittohtml\write_html.py", line 288, in write_link_page
'###BODY###':               snudown.markdown(c['body'].replace('>','>')),
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc2 in position 382: invalid continuation byte


is there any way to read the generated json file as a human being？

any tools or client？ like Redis desktop manager

Everything is compressed using BLOSC2 this is not a human readable format. Luckily the compressed data is plain JSON. Just decompressing the file results in human readable JSON output.
from blosc2 import decompress

with open("some_db_file", "rb") as f:
    json_output = decompress(f.read())

# Do something with the json ...
# print, writing to file, ....


Search for keywords using streams instead of snapshots

Currently, the add-on takes a snapshot of the subtitles every intervalms and then searches through the keywords array to see if there's a match.  This has proved to be simple and effective, but is not without drawbacks.
My two main concerns are that

It often notifies the exact same word multiple times, if interval is set too low.
It's impossible right now to identify combinations of words.

A simple fix for 2 is to concatenate all the subtitles and form a string. This will let us process everything as a paragraph and run proper regex searches. But it still fails for 1.
A more elegant, albeit complicated, approach is to build a parser that would scan the comments and return a stream of new words as their identified. This will also eliminate the need for interval and make the system more robust.

I wonder if something like RxJS would help with this

https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver


Use nulls not instances

This successfully satisfies the mockito library but greatly simplifies the code. Instance creators are no longer needed.
Thank you for submitting a pull request!
[x]  Keep your commits clean: squash your commits if necessary.
[x]  Make sure you're targeting the dev branch with the PR.

IIRC I have read somewhere that this is undocumented behavior and subject to change.
Though this would really make life a lot easier, I am not entirely sure if we can depend on this.
I will look into it.

See https://youtrack.jetbrains.com/issue/KT-8135.

Fair enough. It seems they acknowledge something like this is necessary for testing, but that was in 2015.
Should I close the PR until an official stance is taken?

Let's close this for now, the mock-maker-inline feature eases things as well.


websocket.org cannot connect

Hi, i found that https://www.websocket.org/ service is no longer to available.

Thank you Zehao! I've updated the page to link to MDN for documentation and suggest a different sample server.


chore: Update css-inline to 0.10

Hi! This PR updates css-inline to its latest version

Hello 👋 thanks for the pull request 😁. Unfortunately I won't be making anymore commits to this repo because the project is complete. Also any updates will require me to upload a new docker image, test and  redeploy.

Hello 👋 thanks for your pull request 😁 are you the creator of the css-inline package?

Yep :)


Blivet-GUI Partitioning does not check that a /boot partition is created, but Anaconda will fail to install grub2 without one

What happened?
I suspect this issue applies to at least all ublue installers, although I encountered it specifically with Bazzite 40 (using bazzite-stable.iso).
I selected Blivet-GUI to setup partitions. Because I was using a ext4 root partition (unencrypted), I did not create a separate /boot partition. Blivet-GUI told me I needed to fill the /boot/efi mountpoint, so I created a biosboot and EFI partition, and mounted the EFI partition in /boot/efi.
Part way through boot, anaconda tries to configure grub2, and crashes because /boot/grub2 does not exist.
I was able to work around this issue by installing a new drive into my computer and using the automatic partitioning.
I expected either Blivet-GUI to give me an error message saying to create a /boot partition (probably the easier option to implement), or for Anaconda to install grub2 into my root partition (an unencrypted ext4 volume).
I'm not sure if this is the right place to file this bug report. Unfortunately, I also do not have logs, although I will try to reproduce the issue on another computer.
Relevant log output
Please attach or paste the logs from the Anaconda Installer https://docs.fedoraproject.org/en-US/quick-docs/anaconda/anaconda_logging/

I've managed to reproduce this on a second system. Here are the resulting log files:
ls_R_sysroot_boot.txt
packaging.log
program.log
storage.log
anaconda.log
journalctl.log


new checker texture

we always need a checker texture, here my proposal (with a playground: https://www.babylonjs-playground.com/#J5E230#124 )

Yeah I love it :-)


⚠ ClamAV has degraded performance

In 0fef61b, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 57 ms

Resolved: ClamAV performance has improved in 4cc5d13.


bug: the nav bar is with the body section

Describe
the body section is coming under the navbar instead it is overlapping for which we are not able the see the full content

This issue is repetitive https://github.com/wrappid/wrappid-app/issues/129.


Implement a Camo proxy for images

After some light discussion with @cky, I wondered: would it be possible for Stack Exchange to implement an image proxy (like Google and GitHub do), such as atmos/camo?
I've currently got a Camo instance running in production, and GitHub do too; post any image anywhere on GitHub and it will be proxied through https://camo.githubusercontent.com.
It works by taking a URL, and using HMAC-SHA-1 with a shared key to cache-bust/rate-limit. The default key is usually '0x24FEEDFACEDEADBEEFCAFE'
This could technically also be used in production at Stack Exchange for posts themselves, but I gather that's a pretty big commitment. It's pretty battle-tested on GitHub, though.
An example is below:
http://puu.sh/8tN8V.png -> https://images.r-a-d.io/6bb5cb44d3d5c030784bce28172411bbd4bb1847/687474703a2f2f7075752e73682f38744e38562e706e67

If you guys want to go down this route, I'd make a secure_image helper for liquid that'd automatically HMAC and generate a new URL:
<img src="{{ page.avatar | secure_image }}" alt="{{ page.username }}">

For completeness, this'd have to be a liquid filter:
require 'openssl'
require 'config'

module StackExchange
  module SecureImage
    def secure_image(input)
      digest = OpenSSL::HMAC.hexdigest(
        OpenSSL::Digest.new('sha1'), config['camo_key'], url
      )
      image_url = digest.to_enum(:each_byte).map { |byte| "%02x" % byte }.join

      "#{config['camo_host']}/#{digest}/#{image_url}"
    end
  end
end

Liquid::Template.register_filter(StackExchange::SecureImage)

I'm having some difficulty understanding what the benefit of this would be -- We should be only using i.stack.imgur images on the blog, which supports https://

This is merely for the edge cases (not all images in posts use imgur), but if you're going to be moving everything to imgur, then I guess this is redundant. Otherwise, there's still quite a lot of posts to migrate over. Avatar URLs in comments, too.

... That point is moot now.

Closing because this can be solved without a proxy. It'd still be useful on SE sites, though.


Clean-up activation heights

This PR:

Removes the legacy BIP 9's and replaces them with hard-coded heights
Moves the activation heights into the ActivationHeights array. Some advantages to this:

The PoAConsensusOptions class-definition will remain static instead of changing with almost every release.
Ultimately the array can move to the base class making the activation heights accessible without casting the options.

Good catch. Will make the required changes.

Made the necessary changes to be able to derive PoABuriedDeploymentsArray from BuriedDeploymentsArray.


Remove kvass

Tank sprite looks bad.
Adding region-specific things like food / drink is cringe.
I don't think I've ever seen it ordered.
There's no reason to have one drink in a tank.

:cl:

remove: Remove kvass.

i love kvass

cringe

oh no. cringe

cringe

ultrakill ultracringe

cringe, kent


Toggle photo picker switch behaviour and tweak phrases

Description (required)
The enable state used to trigger the GET_CONTENT intent. Alter the flow such that the GET_CONTENT intent is triggered when switch is disabled. Adjust default value and other parts of code naming to reflect this.
The existing phrasing had a lot of tech jargon in it which could result in the non-technical users being confused. Tweak the phrasing to avoid such phrases.
The documentation in the website could also use some follow up improvements.
Note: This addresses follow up comments in MR #5227 and does not handle #5242 (that's to be looked into separately).
Tests performed (required)
OnePlus Nord running Android 11
Screenshots (for UI changes only)

Preference page
Dialog shown when turning off

cc @nicolas-raoul @Rishavgupta12345 @kartikaykaushik14

@nicolas-raoul Thanks for the review. I've tweaked the phrasing as mentioned. Do check and merge this if it looks good 🙂


Create index.css

i have added file of css its a planet site
Checklist:

[ ] I have read freeCodeCamp's contribution guidelines.
[ ] My pull request has a descriptive title (not a vague title like Update index.md)
[ ] My pull request targets the main branch of freeCodeCamp.
[ ] I have tested these changes either locally on my machine, or GitPod.

Closes #XXXXX

Hey
Thank you for opening this pull request.
This is a standard message notifying you that we've reviewed your pull request and have decided not to merge it. We would welcome future pull requests from you.
Thank you and happy coding.


Update npm to latest version

Currently we are moving from bower to npm. But I cannot find the same/latest version in npm.
Please update npm to the latest version.
Thanks,
Daniel

Hi, I'm not supporting this anymore I'm afraid.


Doc update

@hashier, I haven't reviewed your changes since my previous feedback a day ago but this is, it seems to me, a case where you should squash all your commits to a single commit and force push the result upstream to Github. Or perhaps close the current P.R. and start a new one after squashing your closely related commits.

@hashier, I haven't reviewed your changes since my previous feedback a day ago but this is, it seems to me, a case where you should squash all your commits to a single commit and force push the result upstream to Github. Or perhaps close the current P.R. and start a new one after squashing your closely related commits.

You're entitled to your opinion, but I don't have one on this matter. GitHub makes it easy enough to squash the commits when merging the PR.


Is it possible to Blazy have an option function to run when all images has been succesfully loaded?

I mean when using Blazy with a slideshow that every click display:block next slide the issue that I see that if I use the success: to include a display:none; a spinner when the image has finished loaded is working fine until the Blazy does not run anymore success: when finished all images as loaded... in this case I will like to keep my spinner working while going next or previous after all images has been loaded but there is no a control or function for this that can run after all images has been loaded with blazy...
any ideas or solution? also why  bLazy.revalidate(); is not working in my case? why am i doing wrong?
Here my Blazy options:
var bLazy = new Blazy({
success: function(ele){
console.log("Element loaded: ", ele.nodeName);
setTimeout(function(){
var loader = document.querySelector('.spinner');
loader.style.display = 'none';
var active = document.querySelector(' .active');
active.style.display = 'block';
}, 700);
},
});
bLazy.revalidate();
Here what I think it will be nice Blazy to have as extra options maybe with onloaded options to control when all images has been loaded...
var bLazy = new Blazy({
success: function(ele){
console.log("Element loaded: ", ele.nodeName);
setTimeout(function(){
var loader = document.querySelector('.spinner');
loader.style.display = 'none';
var active = document.querySelector(' .vanilla-active');
active.style.display = 'block';
}, 700);
},
onloaded: function(ele){
console.log("All Elements loaded: ");
});

Normally I would say set the spinner on all elements with the class b-lazy and remove it when b-loaded is added.
In your case you could use the success function: Select all elements with the class b-lazy and select all with the class b-loaded. If the number of elements with class b-lazy matches the number of elements with the class b-loaded (and b-error), all images have been loaded.
If you want to implement a proper solution you need to specify a container element. When all elements in this container were loaded you can execute the allElementsLoaded function. As a first clue you could have a look at my repo. I have implemented a function where you can specify container element where all children of this element get loaded, but at once. When all elements in this container were loaded the success function is executed.


[MQTT] initialize refresh configuration from MQTT topics

Try to load the existing refresh configuration from MQTT
If no configuration can be retrieved after 10s, start with default values

@mschmiedel Since you did the base work of the refresh handling, could you take a look on this?

Of course, but will be around the weekend...

I just did a first check, I like the concept, I did not think of any "nice" way to listen to the topics at the begin without nasty threading stuff, this solution with the 10s grace period looks fine.
Only thing I believe that could happen (will try to test it on the weekend), is that after you set the first missing value, you will immediately get a value from the topic in the message handler, and since vehicle state is not complete yet, it will try to set it again, until all values are set. Have you made sure this is handled?
Else I will finish reviewing it with a quick test in a few days...

The setters check if the value has actually changed and only send an update to MQTT if it has, so we should not get any loops there.

The setters check if the value has actually changed and only send an update to MQTT if it has, so we should not get any loops there.

Yes, you are right, I saw that now...

So, code looks fine for me.
I could test the following scenarios successfully:

Read data from retained messages
Partial init of absent data (just published a non-retained message before)
Change settings and restart

So for me the MR looks fine...


DefaultHttp2Connection modifying child map while iterating

Motivation:
When DefaultHttp2Connection removes a stream it iterates over all children and adds them as children to the parent of the stream being removed. This process may remove elements from the child map while iterating without using the iterator's remove() method. This is generally unsafe and may result in an undefined iteration.
Modifications:

We should use the Iterator's remove() method while iterating over the child map

Result:
Fixes https://github.com/netty/netty/issues/6163

@rkapsi - FYI. Please verify if possible (maybe not because you haven't been able to reproduce).

4.1 (ec3d077)


How can I add new market (currency)?

See configs in exchange files. Use GitHub's repo search

Hello @ohld
How to add new market use api?
Thanks
Best regards


chores after releases

Description

Opening as draft for now, should be merged after releases (v7.7.0, v8.4.0 and the 08-wasm releases) are published.
I assume that v8.2.x and v8.3.x will be retracted.
closes: #XXXX

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

[ ] Targeted PR against the correct branch (see CONTRIBUTING.md).
[ ] Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
[ ] Code follows the module structure standards and Go style guide.
[ ] Wrote unit and integration tests.
[ ] Updated relevant documentation (docs/).
[ ] Added relevant godoc comments.
[ ] Provide a conventional commit message to follow the repository standards.
[ ] Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
[ ] Re-reviewed Files changed in the GitHub PR explorer.
[ ] Review SonarCloud Report in the comment section below once CI passes.

Clicking merge when ready, lets take your question @DimitrisJim elsewhere


feature: prevent scroll

prevent first scrollheight
it works with onresize
disable autoscrolling on wheel event
add unsubscribes to old useeffects
fix ecosystem logo height in safari
fix mobile font-size
transfer js files to ts

If you press Tab after the #after link, the focus will stop in the iframe.
Let's wrap all the invisible elements in a block with visibility: hidden and aria-hidden


[Suggestion] Expose Custom Colors/Custom Constants globally for Dynamic Fonts

Godot version:
3.0
AFAIK, I just found out that the only way to enable the shadow outline for Dynamic Fonts is under a label node.
This means we cannot use the Shadow Outline feature for Buttons and other nodes that have text. Or wherever that text is drawn. My suggestion is to make that feature available globally, for that font

And as a global option when editing the resource page:

Bitmap fonts are kind of deprecated and discouraged because dynamicfont
supports all character sets, oversampling and other stuff that is difficult
to do with bitmap fonts.
I hope users will eventually make asset library plugins to make up for
bitmap fonts after 3.0 is out.
Eventually, you can create a bitmap font with outlines using BMFont:
http://www.angelcode.com/products/bmfont/
And Godot will import then fine.
On Dec 22, 2017 2:49 PM, "Dillybob1992"<EMAIL_ADDRESS>wrote:

Godot version:
3.0
AFAIK, I just found out that the only way to enable the shadow outline for
Dynamic Fonts is under a label node.
This means we cannot use the Shadow Outline feature for Buttons and other
nodes that have text. My suggestion is to add this:
https://camo.githubusercontent.com/2662679861e61b0cb54a203fa128693b06f025ed/68747470733a2f2f692e6779617a6f2e636f6d2f36396466326264613637616136323336313739336634313039656636323732312e706e67
As global options for that text when we edit the Dynamic Font:
https://camo.githubusercontent.com/93f3c9eeea05ea04132387643e92223808ab100d/68747470733a2f2f692e6779617a6f2e636f6d2f37353461333534656637366333346235616135616666643762356266303033392e706e67
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/14949, or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z28MzOvIpBi112MAf7LIN4b8Mj_zcks5tC-vFgaJpZM4RLRwN
.

Thanks @reduz
Yeah, I actually just tested a 1000x1000 label full of text w/ DynamicFonts with the "Shadow as outline" enabled, and it cuts fps from 144 to 80. Doing the same thing with a BitMap font, stays at 144fps.
So I guess my suggestion is not very good because the shadow as outline mode should be for specific cases, and used carefully.
So, when importing BMFont from AngelCode or Littera, we can achieve the font with the outline (and have no fps drops.
However, I am getting an error when trying to load the .fnt file from AngelCode:

Unrecognized binary resource file: res://Fonts/lol123.font
core\io\resource_loader.cpp:148 - Condition ' err != OK ' is true. returned: RES()
Failed loading resource: res://Fonts/lol123.font

Not sure if I should make a new issue for that

Ah, try renaming the extension to .fnt, at least that used to be the
extension
On Fri, Dec 22, 2017 at 5:34 PM, Dillybob1992<EMAIL_ADDRESS>wrote:

Thanks @reduz https://github.com/reduz
Yeah, I actually just tested a 1000x1000 label full of text w/
DynamicFonts with the "Shadow as outline" enabled, and it cuts fps from 144
to 80. Doing the same thing with a BitMap font, stays at 144fps.
So I guess my suggestion is not very good because the shadow as outline
mode should be for specific cases, and used carefully.
So, when importing BMFont from AngelCode or Littera, we can achieve the
font with the outline (and have no fps drops.
However, I am getting an error when trying to load the .fnt file from
AngelCode:
Unrecognized binary resource file: res://Fonts/lol123.font
core\io\resource_loader.cpp:148 - Condition ' err != OK ' is true.
returned: RES()
Failed loading resource: res://Fonts/lol123.font
Not sure if I should make a new issue for that
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/14949#issuecomment-353670452,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z28Qbkvd5-8POv-OZcHJ38ZZUzfNQks5tDBJIgaJpZM4RLRwN
.


Add support for CycloneDX v1.4

Currently, v1.3 is the latest that can be validated. Support for v1.4 should be added.

Never mind. It was a caching issue.


Add new SelenideDriver(new FirefoxDriver()).find("#element") syntax in addition to $("#element")

Usually the "automatic driver management" is great.
But sometimes, when you need to operate with two opened browsers in one test - there is just no easy option in Selenide to do this.
Usecase:
Social network. Unfortunately there is no access to backend so you have to automate it as "full black box". You have to test "Joe can see a post created by his friend Bob".
In order to "save time" for "login/logout" the developer decides to open two browsers and login in each with different user - Joe and Bob correspondingly - so then once Bob created a post Joe can "immediately" check the result without "logout/login".
In Selenide there is the only option to implement this:

remember two drivers in test itself and switch drivers via WebDriverRunner#setDriver correspondingly.  Even if we have pageobjects, we still have no way to say to pageobject to which driver should it belong to. This makes a code for such test overcomplicated and hardly supportable.

In one project we had to create our own "spikes" over Selenide WebDriverRunner implementation using reflection to get access to private fields in order to hide "driver substitution" and reduce boilerplate in tests...
It's sad:)
I recommend to refactor implementation of Selenide's driver management to be of object oriented style, where we have an object of Selenide wrapper over Selenium driver,
so we can create SelenideElement via:
SelenideDriver driver = new SelenideDriver(new FirefoxDriver());
driver.element("#element").click();

or some other "naming" style can be chosen:
SelenideDriver I = new SelenideDriver(new FirefoxDriver());
I.find("#element").click();

But the first style seems to me more "object oriented" and of "less magic" (find does not find, it creates a a lazy proxy element object which can find itself by request). We still can keep both aliases find and element, and even $.
Then we can build "procedural/static" helpers like $, $$ on the base of the latter object-oriented implementation.
This will add a big plus to popularity of Selenide. Because many engineers are afraid of using Selenide because of its "the only procedural" nature (in context of "managing driver and creating elements").

I still believe that using 2 browser windows in the same test is bad idea.
Never do it!
But probably we will implement this feature request. Just because many people ask for this.

@yashaka
I don't understand what you trying to say about Selenide.
Selenide is just a wrapper around Selenium and it gives you access to all of Selenium's core components.
Any limitation Selenide has Selenium has as well.
If you need to use two browser windows, then just like Selenium, you will need to create two WebDriver instances.
If you need to use Selenide, you will need to assign each WebDriver instance using the setWebDriver() static method in the WebDriverRunner class when you need to use that browser to perform the test.
If you need to use the same Page Objects with multiple browsers, then the context must be set for each before instantiating it.
Below is a JUnit example using a single Page Object between two different WebDriver instances.
It also opens a Google page to prove the context switch.
NOTE 1: Reference the setUp(), set each WebDriver instance in the WebDriverRunner before creating the page objects.
NOTE 2: By doing this you will need to close the WebDriver instances manually just like Selenium. This also assumes Firefox browser is used and no proxy settings.
import static com.codeborne.selenide.Selenide.page;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.FindBy;

import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.SelenideElement;
import com.codeborne.selenide.WebDriverRunner;

public class AppTest {
	private WebDriver w1;
	private WebDriver w2;
	private WebDriver w3;
	private ExamplePage ex1;
	private ExamplePage ex2;

	@Before
	public void setUp() {
		w1 = new FirefoxDriver();
		w2 = new FirefoxDriver();
		w3 = new FirefoxDriver();

		WebDriverRunner.setWebDriver(w1);
		ex1 = page(ExamplePage.class);

		WebDriverRunner.setWebDriver(w2);
		ex2 = page(ExamplePage.class);
	}

	@Test
	public void test() {
		WebDriverRunner.setWebDriver(w1);
		Selenide.open("http://www.example.com");
		Assert.assertTrue(Selenide.title().equals("Example Domain"));

		WebDriverRunner.setWebDriver(w3);
		Selenide.open("http://www.google.com");
		Assert.assertTrue(Selenide.title().equals("Google"));

		WebDriverRunner.setWebDriver(w2);
		Selenide.open("http://www.example.com");
		Assert.assertTrue(Selenide.title().equals("Example Domain"));
		ex2.moreInfoLink.click();
		Assert.assertTrue(Selenide.title().equals("IANA — IANA-managed Reserved Domains"));

		WebDriverRunner.setWebDriver(w1);
		ex1.moreInfoLink.click();
		Assert.assertTrue(Selenide.title().equals("IANA — IANA-managed Reserved Domains"));
	}

	@After
	public void tearDown() {
		w1.close();
		w2.close();
		w3.close();
	}

	static class ExamplePage {
		@FindBy(tagName = "a")
		public SelenideElement moreInfoLink;
	}
}

@JasonTolotta
Yeah, you really did not understand my post. Seems like because did not read it with enough attention.
Because everything you wrote, I also mentioned in my post.
And your example just reflects my note on the subject:

remember two drivers in test itself and switch drivers via WebDriverRunner#setDriver correspondingly. Even if we have pageobjects, we still have no way to say to pageobject to which driver should it belong to. This makes a code for such test overcomplicated and hardly supportable.

Pay attention to this part:

This makes a code for such test overcomplicated and hardly supportable.

As I explained, your example is a BADly implemented test. Good test implementation should contain test logic, not TECHNICAL DETAILS like "switching drivers". Such test is too complicated and needs more time for support. It's also prone to errors when something changes in test logic. There are also a plenty of arguments in context of "good design", but this is a just a test, not a "complicated software system" so I will leave them out of the board:)
Taking this into account, I can't agree with:

Any limitation Selenide has Selenium has as well.

Because Selenium is free of limitation - "overload your test with bulky technical details in context of driver management".
Saying all this, I still completely agree with @asolntsev that

I still believe that using 2 browser windows in the same test is bad idea.
Never do it!

But sometimes, on some projects, you just have no other choice (except of "retire from work"), because of many things.
Sometimes you have no access to backend.
Sometimes management is foolish and you are too young to convince management in what you believe.
And in such cases, you have to use selenium (some own selenium based framework) over selenide, if you still want to write "concise and easy to read and support" tests ... And it's a sad...
I believe that if we make Selenide "more friendly" in this context, we can make it more popular, and so have more power to convince people that yeah,

I still believe that using 2 browser windows in the same test is bad idea.
Never do it!

And, by the way, there is one more use case for this feature.
It is described here with examples in C#: https://github.com/yashaka/NSelene/tree/master/NSeleneExamples/TodoMVC/IntegratedToSeleniumBasedFramework
The idea is the following.
We have a project with many automated tests, which are built using "own selenium based framework with pageobjects + pagefactory style".
And let's assume that this selenium based framework is not good enough, some steps are not stable (because of e.g. Ajax problems), and engineers would like to switch to Selenide. But they have no time to "rewrite all old tests and pageobjects".
They just want to
1 write "everything new using Selenide"
2 fix unstable parts by using Selenide over own framework.
And now, with current Selenide implementation the only option they have is:

to write tests for new web pages using Selenide
to achieve goal 1

But to achieve the goal 2 (fix unstable parts by using Selenide over own framework) they have to rewrite pageobject fully what is not a good choice taking into account our precondition.
But if we add to Selenide a correspondent webdriver decorator, everything will become much smoother.
Want to cover new webpage? - no problem, just add a pageobject in a normal "selenide way" with automatic driver management
Want to fix some unstable step which uses driver.findElement(locator)? - no problem, just change it to new Browser(driver).element(locator)
Have problems with some @FindBy element? - no problem, just delete annotation, and add  element = browser.element("#its-locator") to the page constructor, or implement if not as a field, but as a method with the return browser.element("#its-locator") code
Easy;)
In this way, we will not only give Selenide as a "better tool for you next automation project", we will sell it as a "better tool for you current automation project".
I have trained a lot of my students to work with selenide (in addition to selenium). And many of them find new projects and face the "our own selenium based frameworks" and have to live in hell after come back from paradise... They have to support "legacy bulky not stable code" in the same "bulky" way. I believe that the proposed feature can really make their life much easier...

One more use case for "bad test with two drivers":)
A backend of some project will be completely refactored, completely:)
So we may need some "acceptance tests" that should be fully of "black box" style, with no any dependence to backend. Such tests will be slow... And (recall example with social network from my first post) it will really save some execution time to optimise them via dealing with several opened browsers...

@yashaka

Because everything you wrote, I also mentioned in my post.

Yah, I should stop trying to point out what people are saying and explaining their own point that they missed.

As I explained, your example is a BADly implemented test. Good test implementation should contain test logic, not TECHNICAL DETAILS like "switching drivers".

I am glad you took the time to analyze my code.
Could you please implement an example to describe what you think you want?

Because Selenium is free of limitation - "overload your test with bulky technical details in context of driver management".

More information, this statement is like me saying "Because potato".

But sometimes, on some projects, you just have no other choice
Don't agree with you, there is always an elegant solution even for situations that seem impossible.
You have to look at other toolsets and frameworks though beyond Selenium and Selenide.

I have trained a lot of my students to work with selenide (in addition to selenium).
I would suggest you teach your students SSCCE
http://sscce.org/

Code examples for original post:

Social network. Unfortunately there is no access to backend so you have to automate it as "full black box". You have to test "Joe can see a post created by his friend Bob".
In order to "save time" for "login/logout" the developer decides to open two browsers and login in each with different user - Joe and Bob correspondingly - so then once Bob created a post Joe can "immediately" check the result without "logout/login".

// somewhere in init
joeDriver = new FirefoxDriver();
bobDriver = new FirefoxDriver();
joePage = new Page(joeDriver);
bobPage = new Page(bobDriver);

joePage.open()
joePage.login("joe", "qwerty");

bobPage.open()
joePage.login("bob", "123456");

...

//in test "create post"
bobPage.createPost("red fox jumps over lazy dog");
joePage.stream.posts.first().shouldHave(text("red fox jumps over lazy dog"));

vs
// somewhere in init
joeDriver = new FirefoxDriver();
bobDriver = new FirefoxDriver();
joePage = new Page(joeDriver);
bobPage = new Page(bobDriver);

setDriver(joeDriver);
joePage.open();
joePage.login("joe", "qwerty");

setDriver(bobDriver);
bobPage.open();
joePage.login("bob", "123456");

...

//in test "create post"
setDriver(bobDriver);
bobPage.createPost("red fox jumps over lazy dog");

setDriver(joeDriver);
joePage.stream.posts.first().shouldHave(text("red fox jumps over lazy dog"));

You will need to create a wrapper to handle both the WebDriver, Page Object and any other static method calls you desire.
Below is the example:
Create the wrapper that will store the WebDriver instance and Page Object.
Instantiate by passing in the WebDriver instance and Page Object class.
Call the page() method to get the Page Object.
Call the navigate() method to get the Navigator object.
import org.openqa.selenium.WebDriver;

import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.WebDriverRunner;
import com.codeborne.selenide.impl.Navigator;

public class MyPage<T> {
	private WebDriver webDriver;

	private T page;

	private Class<?> pageClass;

	public MyPage(WebDriver webDriver, Class<?> pageClass) {
		this.webDriver = webDriver;
		this.pageClass = pageClass;
		WebDriverRunner.setWebDriver(webDriver);
		page = (T) Selenide.page(this.pageClass);
	}

	public T page() {
		return page;
	}

	public Navigator navigate() {
		WebDriverRunner.setWebDriver(this.webDriver);
		return Selenide.navigator;
	}
}

The following test should demonstrate your needs.
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.FindBy;

import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.SelenideElement;

public class AppTest {
    private WebDriver w1;
    private WebDriver w2;

    private MyPage<ExamplePage> ex1;
    private MyPage<ExamplePage> ex2;

    @Before
    public void setUp() {
        w1 = new FirefoxDriver();
        w2 = new FirefoxDriver();

        ex1 = new MyPage<ExamplePage>(w1, ExamplePage.class);
        ex2 = new MyPage<ExamplePage>(w2, ExamplePage.class);
    }

    @Test
    public void test() {
        ex1.navigate().open("http://www.example.com");
        Assert.assertTrue(Selenide.title().equals("Example Domain"));

        ex2.navigate().open("http://www.example.com");
        Assert.assertTrue(Selenide.title().equals("Example Domain"));
        ex2.page().moreInfoLink.click();
        Assert.assertTrue(Selenide.title().equals("IANA — IANA-managed Reserved Domains"));

        ex1.page().moreInfoLink.click();
        Assert.assertTrue(Selenide.title().equals("IANA — IANA-managed Reserved Domains"));
    }

    @After
    public void tearDown() {
        w1.close();
        w2.close();
    }

    static class ExamplePage {
        @FindBy(tagName = "a")
        public SelenideElement moreInfoLink;
    }
}

@JasonTolotta
First of all, this
ex1 = new MyPage<ExamplePage>(w1, ExamplePage.class);

Seems to me as "boilerplate" code. Solution is far away from being "elegant" and "concise".
Second, your wrapper can "implicitly" switch drivers only during navigation.
This  means that the test will still contain the same "technical details" - this time - navigate() calls instead of setDriver(...).
The one idea is to provide a solution that can remove "technical details" from "test logic" for tests working with "Several browsers" and built with "pageobject steps".
The second idea is to provide solution that can integrate selenide into existing selenium based framework taking into account that the majority of such frameworks uses "driver as a state of PageObject".

@yashaka

seems to me as "boilerplate" code. Solution is far away from being "elegant" and "concise".

 I should have seen that. LoL.

For me, definitely one practical usage for this feature is possibility to use 2 browsers simultaneously. (It was not possible in Selenide before). I think that it's totally bad idea to use 2 browsers in test, but people ask for it too often. So, let's do it.

Along with this feature, we have to also make an "object-oriented" alternative to Configuration class.
There is one more thing to do about Configuration - make Configuration properties - static ones - like Configuration.timeout - ThreadLocal - the same as internal "automatic" driver in Selenide. Because currently you can have "driver per thread" in Selenide, but can't have "configuration per thread". But this seems to be filed as separate issue, like "make Configuration properties - ThreadLocal to allow custom configuration per thread in parallel testing"

Unless we have proper implementation in Selenide, here is the simplest implementation which anybody can already use if needed: https://gist.github.com/yashaka/dc7607239518bd37298ef5eb5b08da9b

Hi,
Any update on this implementation?

Not yet. I plan to do it soon, but have not started yet.
On Aug 15, 2017 10:14 AM, "Kiranannam"<EMAIL_ADDRESS>wrote:

Hi,
Any update on this implementation?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/codeborne/selenide/issues/354#issuecomment-322394128,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AARE3V_zAitPyJoz8kFgz2vIc-p1em9Uks5sYUVFgaJpZM4I_1T1
.

@asolntsev, Thanks for your reply. Will wait for your update.

@yashaka @jtolotta @Kiranannam FYI
I started working on this issue in branch use-dependency-injection.

Is it still impossible to have 2 web driver sessions in selenide ?

@evgenyfedorenko Why? It's possible in several ways.

Starting from Selenide 5.0.0: new SelenideDriver()   (see https://selenide.org/2018/10/10/selenide-5.0.0/)
Starting from Selenide 5.4.0: using(webdriver)   (see https://selenide.org/2019/10/16/selenide-5.4.0/)

Awesome, thanks will check it out!


Unable to connect when using an intermediate SSL proxy

When an intermediate or MITM proxy is being used that alters the certificate chain, this extension throws an Error: self signed certificate in certificate chain regardless of the global "http.proxyStrictSSL": false setting.
The flag for this is currently hard-coded in https://github.com/Microsoft/vscode-cosmosdb/blob/2eb9e18ece1e8f946e2c4daba40809de54e43aa6/src/docdb/getDocumentClient.ts#L12
This setting should follow the global setting in VS Code.

Fixed via #568


the trace of webflux application which use @RequestBody is broken

Please answer these questions before submitting your issue.

Why do you submit this issue?
[ ] Question or discussion
[X] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?

Bug

Which version of SkyWalking, OS and JRE?
skywalking 8.0.1 spring webflux

Which company or project?

What happen?
If possible, provide a way for reproducing the error. e.g. demo application, component version.
I use the test case https://github.com/apache/skywalking/tree/master/test/plugin/scenarios/webflux-scenario, add some db opration into the hello() method.I visit the method, I found that the trace is broken.when I delete the @RequestBody params,the trace is ok.Is this something wrong?

Requirement or improvement

Please describe about your requirements or improvement suggestions.

Did you access the url concurrently and which url did you access?

Did you access the url concurrently and which url did you access?

I access the url only once.The url is "/testcase/annotation/mono/hello",but I add a mongodb operation into the method,like this
    @GetMapping("/testcase/annotation/mono/hello")
    public Mono<String> hello(@RequestBody(required = false) String body) {
        // mongodb operation
        Object o = accountStorage.findAllStudentArrive(1, "1");
        return Mono.just("Hello World");
    }

Got it, I will try it

On Jul 27, 2020, at 10:59 PM, HowlsCastle<EMAIL_ADDRESS>wrote:
Did you access the url concurrently and which url did you access?
I access the url only once.The url is "/testcase/annotation/mono/hello",but I add a mongodb operation into the method,like this
@GetMapping("/testcase/annotation/mono/hello")
public Mono<String> hello(@RequestBody(required = false) String body) {
    // mongodb operation
    Object o = accountStorage.findAllStudentArrive(1, "1");
    return Mono.just("Hello World");
}

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub https://github.com/apache/skywalking/issues/5184#issuecomment-664448574, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC64HX3NB24EOEZGC4WKPFDR5WI43ANCNFSM4PIUKWKQ.

No activity for a long time.


Make warning log verbose

What does this PR do?
Make warning log more verbose when parsing mntr output.
Motivation
The following message is not helpful to debugging when it's unclear what the ValueError is
Cannot format `mntr` value. key=zk_server_state, value=leader"
Additional Notes

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] PR title must be written as a CHANGELOG entry (see why)
[ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[ ] PR must have changelog/ and integration/ labels attached

/azp run

/azp run PR Changes


DAP: allow custom request extension

Does this mean we can now adding custom requests by extending DEBUGGER__::UI_DAP with request_my_request methods 🤔 ?

Yes.

That’s awesome! Thanks for this change 😄


make watch-only wallets visible on wallets page

Can test with this pub key tpubVokqVVuZgvPWNuVQXUPMt3znUFJMqArBtuy4m8Xw2GGqBdXCWRqvPua21adM99n43CTn3dMnXnVVrncqkeCs4GukzgdxPRaFF2L322vdog6.

Please add a description to this PR.


FT bloom conversion fails with HF model id

Description
FT handler will fail with changes to conversion script in upstream - https://github.com/NVIDIA/FasterTransformer/pull/568 as model is not fetched using from_pretrained() method.

FT is deprecarted.


Event's Id sould be long type

We got json deserialize exception when loading events for an user.
As the 'Id' field overflows integer. So it has to be long.

Hi @stevenxi,
Thanks for your contribution, but your changes entail a breaking API change so we can't currently accept this PR.
Note however that we're currently planning on converting most (if not all) int IDs to long and subsequently bumping the major version. Refer to #491.


Search does not return results - Search.loadIndex is not a function

Problem
I'm experiencing an issue where the search results page hangs (just like #348 )
I have tried several options (including installing manually by git cloning the theme).
Error Logs/Results
I have an error in the Chrome console:
Uncaught TypeError: Search.loadIndex is not a function
    at HTMLDocument.<anonymous>

Environment Info
Using python 3.7.1, sphinx 2.0.0, sphinx-rtd-theme==0.4.3

Did this work before sphinx 2.0.0?

See here https://github.com/sphinx-doc/sphinx/issues/6244.

Adding proper link: https://github.com/sphinx-doc/sphinx/issues/6244
This seems to be a bug in Sphinx but will keep this report open to make sure everything works when sphinx fixes itself.

https://github.com/rtfd/sphinx_rtd_theme/pull/729/ Should also fix this problem

Sphinx fixed this in their 2.0.1 version, it's working now!


LSTM model returning empty output

What is wrong?
LSTM model returning empty output.

Where does it happen?
when the model has been trained. I am trying to run net.run(data) but it return empty in command line.

How do we replicate the issue?

Step 1
Step 2
Step 3

Expected behavior (i.e. solution)

I am expecting an output or at least an error if the model cannot classify the data.
Version information
Nodejs: v14.16.0
Browser:
Brain.js<EMAIL_ADDRESS>How important is this (1-5)?

5
Other Comments

I am using this model for my final year project at University so its very important.

Paste an example of your {input: [], output: []} object, maybe those two values have to return the same type but indeed there should be an error or some kind of response even if it was set up in a wrong way.

Hi Nelias,
Thanks for helping.
I have an array as an input and an array as an output.
The length of input arrays varies from 129 to 235.
const dataset = [  {input: [-0.04145152278764286,             -0.04145152278764286,             0.02931191649103404,             0.025314243671365394,             0.09964059565399563,             0.13279864523813079,              220 more items], output: [0,0,1]},  {input: [-0.07838869117980984,             -0.07838869117980984,             0.005700191047779968,             0.16397912434852924,             0.16847045770006555,              190 more items], output: [0,1,0]}]
The size of dataset variable is 24.
Below is the code for training LSTM.
const net = new brain.recurrent.LSTM({
  inputSize: 235,
  inputRange: 24,
  hiddenLayers: [5]
});

net.train(dataset, {
  // Defaults values --> expected validation
  iterations: 2000, // the maximum times to iterate the training data --> number greater than 0
  errorThresh: 0.005, // the acceptable error percentage from training data --> number between 0 and 1
  log: true, // true to use console.log, when a function is supplied it is used --> Either true or a function
  logPeriod: 1, // iterations between logging out --> number greater than 0
  learningRate: 0.3, // scales with delta to effect training rate --> number between 0 and 1
  momentum: 0.1, // scales with next layer's change value --> number between 0 and 1
  callback: null, // a periodic call back that can be triggered while training --> null or function
  callbackPeriod: 10, // the number of iterations through the training data between callback calls --> number greater than 0
  timeout: Infinity, // the max number of milliseconds to train for --> number greater than 0
});

When I test this model with another array from testing data. The model returns empty output and I have tried different types of arrays as well.

You need to not use brain.recurrent.LSTM, but rather brain.recurrent.LSTMTimeStep.  A LSTM network deals with strings, where a LSTMTimeStep deals with numbers.


Issues with casting

I've encountered a couple of issues with casting. I'm happy to look into solutions but I want to share them to make sure I'm not doing something wrong:
1. MediaCast assume the field is an array, and won't work when MediaHubField doesn't have ->multiple() set on it.
I guess the options are either to create a second Cast for single media fields, or to have MediaCast check if the field value is an array before retrieving the media. I don't think this should be too hard to resolve!
2. Using MediaCast on my model works on my frontend but seems to break things in Nova:

I can add media no problem
Saving data works; I can see it in the database as expected
When I edit the entry, the field appears empty

Looking in the network tab at the data Nova is receiving, I think the cast is being applied to the value Nova receives? I've come across this before in another package I was contributing to and have never got it clear in my head, but it feels to me like in general a Nova field would want to access the underlying model value not the cast version? I tried switching to a getter (e.g. getImageAttribute) on my model but this seems to have the same issue.
Am I doing something wrong here? if not how are other people handling image fields without running into problems? There's always the option of manually resolving fields in my controllers but it feels messy.

For the minute I've created my own cast that looks like the following:
namespace App\Casts;

use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
use Outl1ne\NovaMediaHub\Models\Media;

class NovaMediaLibraryCast implements CastsAttributes
{
 public function get($model, string $key, $value, array $attributes)
    {
        if (is_null($value)) {
            return;
        }

        if (request()->is("nova-api/*")) {
            return $value;
        }

        if (is_array($value)) {
            return Media::whereIn("id", json_decode($value, true))->get();
        }

        else {
            return Media::find($value);
        }
    }

This solves both of the above issues. The bit that checks if it's a /nova-api/ request feels like a hack, but it solves my problem for now.


Add news screen to example

Add Screens :

SignUp
Dashboard
Transactions
Activity
Contacts
E-commerce

@carmenmitru Could you provide some images of these screens?


FINERACT-730: Fixing bootRun and removing embedded Tomcat

Description
Fixed bootRun / bootJar by:

Rewriting ServerApplication class based on SpringBoot documentation
Fixing SSL configuration for Tomcat by removing trust store config
Reworking dependencies to remove conflicts (conflicting HikariCP, missing commons-logging and commons-io,

To avoid conflict between embedded Tomcat and Spring Boot Tomcat:

Added Cargo plugin for Gradle to start a separate Tomcat instance
Changed integrationTest to use separate Tomcat instance through Cargo plugin
Removed embedded Tomcat and Gradle Tomcat plugin

Fixed failing integration tests by adding a delay after a job has been scheduled to allow time for the job to get registered / start
TODO:

Get the dev profile (using MariaDB4j) to work in the same way with integrationTest etc
Update Confluence pages to remove references to tomcatRunWar etc

And apologies for the messed up commit history - hope the pull request is OK though!
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!

[X] Commit message starts with the issue number from https://issues.apache.org/jira/projects/FINERACT/. Ex: FINERACT-646 Pockets API.

[X] Coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions have been followed.

[X] API documentation at https://github.com/apache/fineract/blob/develop/api-docs/apiLive.htm has been updated with details of any API changes.

[X] Integration tests have been created/updated for verifying the changes made.

[X] All Integrations tests are passing with the new commits.

[X] Submission is not a "code dump".  (Large changes can be made "in repository" via a branch.  Ask on the list.)

Our guidelines for code reviews is at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide

Seems there are checkstyle exceptions with the incoming changes. See: https://travis-ci.org/github/apache/fineract/builds/682516455
Thanks for this very important PR @ptuomola

@ptuomola would you consider "squashing" the commits into a single one? Or object if we did, before merging?

@ptuomola this now fails in the (brand new...) ClasspathHellDuplicatesCheckRuleTest introduced in https://github.com/apache/fineract/pull/803/files, see FINERACT-919 for background. Please shout here or there if that is not clear enough and you require assistance - without hearing from you, I'll assume that you'll figure it out, whenever you have time for this PR. - Again, we appreciate this contribution very much!

@ptuomola this now fails in the (brand new...) ClasspathHellDuplicatesCheckRuleTest introduced in https://github.com/apache/fineract/pull/803/files, see FINERACT-919 for background. Please shout here or there if that is not clear enough and you require assistance - without hearing from you, I'll assume that you'll figure it out, whenever you have time for this PR. - Again, we appreciate this contribution very much!

Thanks - I've fixed the duplicates, and also had to upgrade the Docker Tomcat image to Tomcat 9 in order to get all of checks to pass. So that should all be OK now.
My only concern about this pull request is: after this, Fineract will need Tomcat 9 or above to run. The WAR does not work on Tomcat 7/8 anymore as it has been compiled against Tomcat 9 JARs, and there are some classes that are not present in 7/8. Is that going to be a problem? I.e. are there people who are using Tomcat 7 and expecting Fineract to work? Do we need to communicate this to everyone somehow so that they are aware?
If this is an issue, it might be possibility to build two versions of the WAR - one for Tomcat (including 7/8) and another one for Spring Boot. But if no one is using Tomcat 7/8 (or if we can expect people to upgrade to 9), then of course it would be good to keep things simple...

Re. Tomcat versions, that's totally fine IMHO. But we should document it - do you want to add just 1 bullet point about it on https://github.com/apache/fineract#requirements as part of this PR, like this:

Java >= 1.8 (Oracle JVMs have been tested)
Tomcat 9 (since FINERACT-730; Tomcat 7/8, now 9 is required)
MySQL 5.5


Morphisms in data category of ACSet schemas

The data category in the schema is assumed to be discrete, but it would helpful to allow the specification of morphisms.
For example, the schema for a free diagram is currently as defined:
@present TheoryFreeDiagram <: TheoryGraph begin
  Ob::Data
  Hom::Data
  ob::Attr(V,Ob)
  hom::Attr(E,Hom)
end

Since a free diagram is supposed to be a functor out of a freely generated category, it would be better to have:
@present TheoryFreeDiagram <: TheoryGraph begin
  Ob::Data
  Hom::Data
  dom::DataHom(Hom,Ob)
  codom::DataHom(Hom,Ob)

  ob::Attr(V,Ob)
  hom::Attr(E,Hom)

  compose(src, ob) == compose(hom, dom)
  compose(tgt, ob) == compose(hom, codom)
end

The intended interpretation is that whatever Julia types instantiate Ob and Hom should have methods dom(::Hom)::Ob and codom(::Hom)::Ob and then the instance data should satisfy the two equations.
At least to start with, this feature would be for documentation/specification purposes and would not provide any new functionality. Thoughts on this, @olynch?

Yeah, we already don't really enforce the equations, so I think it's generally fine to have things in the schema that don't come into the presentation.
Julia just doesn't have the right type system for everything we would want to do with it, but... eh, we make do.
One way of interpreting this would be to say that Data is a category enriched over method-sets (which are sets decorated by julia methods), and JType is the category of julia types and julia functions, also enriched over method-sets (i.e. each function between two types is an implementation of some method). Then K : Data -> JType is a method-set enriched functor.
This has the advantage of clarifying that the "data" of K is exactly the choice of types for each object of K; given this choice of types, the choice of functions in JType is uniquely specified by the method-preserving property.

Now that I think of it, can we enrich over arbitrary acsets? :eyes:


Cython 0.28.5, hypothesis 3.69.2

Motivation for this change
Update 2 packages to their latest versions, fix cython build with python 3.7.
Things done

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

[X] NixOS: python 2.7, 3.6, 3.7
[ ] macOS
[ ] other Linux distributions

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

Please change or re-open this pull request to the staging branch instead of master.

This is on hold until after release of 18.09. At that point we'll do more major updates such as matplotlib.

Cython we may actually want to get in 18.09 though.

@FRidh @Mic92 So, should I change the target branch? If yes, which one: staging, or staging-18.09, or something else?

We should get Cython in.

It seems it didn't get in. Any reason to still backport?


Availabilty Zone description incorrect

Hi,
currently you say in this document:
"There are no guarantees regarding the distances between various Availability Zones within an Azure region."
"The network latency across Availability Zones is not the same in all Azure regions. In some cases, you can deploy and run the SAP application layer across different zones because the network latency from one zone to the active DBMS VM is acceptable. But in some Azure regions, the latency between the active DBMS VM and the SAP application instance, when deployed in different zones, might not be acceptable for SAP business processes. In these cases, the deployment architecture needs to be different, with an active/active architecture for the application, or an active/passive architecture where cross-zone network latency is too high."
But Microsoft does make guarantees:
https://github.com/MicrosoftDocs/azure-docs/blame/main/articles/availability-zones/az-overview.md#L25
"Azure availability zones are connected by a high-performance network with a round-trip latency of less than 2ms.". This is a maximum distance (speed of light) and also a latency maximum. I'd even say the latency is usually what is more important than distance in a HA scenario.
Greetings
Klaas

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

ID: 4a92416d-c7fb-fb7e-8a38-726a63d38cf3
Version Independent ID: 99390ad1-b7c3-eaa5-f9c5-0a48f8d102e5
Content: SAP workload configurations with Azure Availability Zones - Azure Virtual Machines
Content Source: articles/virtual-machines/workloads/sap/sap-ha-availability-zones.md
Service: virtual-machines-sap
GitHub Login: @msjuergent
Microsoft Alias: juergent

@Klaas-
Thanks for your feedback! We will investigate and update as appropriate.

It depends what distance we are talking about. Isn't it. The cable distance or the geographical distance of the DCs. One can't assume that the different zones are connected by cable routes that are straight line from one zone to another zone, There can be situations where the actual cable length for the network traffic and the geographical distance are quite different. Despite all the efforts to minimize the cable length between two locations. I changed the wording a bit and also reference to the document that you pointed to. But again, the network roundtrip latency experienced in the traffic between AvZones might not necessarily be indicative of the geographical distance. Especially not when the network round trip latencies are a bit higher.

@msjuergent
Thanks for your comments
@Klaas-
if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.

Hi,
yeah, the modifications in https://github.com/MicrosoftDocs/azure-docs/commit/cb3951b12982d2355a9db839159610941af0c61b make it better :)

"Be aware that the experienced network roundtrip latency is not necessarily indicative to the real geographical distance of the datacenters that form the different zones." well it is indicative, it is at most 1ms speed of light :) But I am guessing you're thinking about a minimum distance, that is indeed undefined in Azure.


[Feature Request] SolusVM extension update

What is the idea?
Feature request
The SolusVM plugin has remained at version 1.0.0, not fully compatible with SolusVM 1.26.11, it also has bugs in the product configuration in particular the choice of virtualization, nodes and problems with user registration.
Why would this be beneficial
Benefits
Greater compatibility with the current version "1.26.11", and bug fixes in the configuration/general.

I think I know the issues with this, but I haven't a test environment (SolusVM) server to use.
If anyone were able to provide that, I could take a look further.

I've got the license and servers but I'm struggling with their new requirements for centos8 will let you know


(Meta issue) Simplify the framework

A common criticism with our samples is the complicated framework. Esp. the samples that use the high level framework have a lot of abstraction, making it hard to debug, follow or learn from the code. While there is no direct action to take here we should look at ways to simplify the framework like removing multiple levels of abstraction and agreeing on ways to write code. Using modern C++ features might look nice, but if they result in code that's hard to follow we should not use in the samples.

Looking through the framework makes me wonder why we did certain things the way we do. We have different design patterns, heavily templated code, lots of abstractions which in the end do nothing more than to fill out a Vk*CreateInfo structure. I wonder how we can simplify that in such a way that esp. the higher level framework becomes easy to follow  and debug again?

Indeed, it's something we need to address. We did some improvements, but still compilation times are too long compared to other similar projects. We'll probably move to C++20 (for other reasons) and then start using modules which should reduce build times, esp. for anything using Vulkan.hpp.


KAFKA-10634: Adding LeaderId to Voters list in LeaderChangeMessage

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Thanks for the patch. Left a few minor comments.

Thanks @hachikuji , i have replied on the comments..

Thanks for the additional changes @vamossagar12 . Left a few comments.

Thanks @jsancio , I had a couple of basic questions..

@jsancio , made the changes.. plz review when you get a chance.

@jsancio , I see some timeout related errors in the CI/CD checks. I am not sure if these are relevant to the changes I have made?

Thanks @hachikuji . I have assigned the name change issue to myself. I see 1 test failures but those don't seem to be connected to this issue.
1 of them is
kafka.network.ConnectionQuotasTest > testListenerConnectionRateLimitWhenActualRateAboveLimit FAILED
08:54:04      java.util.concurrent.ExecutionException: java.lang.AssertionError: Expected rate (30 +- 7), but got 39.12107974180088 (600 connections / 15.337 sec) expected:<30.0> but was:<39.12107974180088>
08:54:04          at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
08:54:04          at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
08:54:04          at kafka.network.ConnectionQuotasTest.$anonfun$testListenerConnectionRateLimitWhenActualRateAboveLimit$3(ConnectionQuotasTest.scala:414)
08:54:04          at scala.collection.immutable.List.foreach(List.scala:333)
08:54:04          at kafka.network.ConnectionQuotasTest.testListenerConnectionRateLimitWhenActualRateAboveLimit(ConnectionQuotasTest.scala:414)
08:54:04
08:54:04          Caused by:
08:54:04          java.lang.AssertionError: Expected rate (30 +- 7), but got 39.12107974180088 (600 connections / 15.337 sec) expected:<30.0> but was:<39.12107974180088>
08:54:04              at org.junit.Assert.fail(Assert.java:89)
08:54:04              at org.junit.Assert.failNotEquals(Assert.java:835)
08:54:04              at org.junit.Assert.assertEquals(Assert.java:555)
08:54:04              at kafka.network.ConnectionQuotasTest.acceptConnectionsAndVerifyRate(ConnectionQuotasTest.scala:871)
08:54:04              at kafka.network.ConnectionQuotasTest.$anonfun$testListenerConnectionRateLimitWhenActualRateAboveLimit$2(ConnectionQuotasTest.scala:412)
08:54:04

and the other one being:
kafka.network.ConnectionQuotasTest > testListenerConnectionRateLimitWhenActualRateAboveLimit FAILED
08:54:04      java.util.concurrent.ExecutionException: java.lang.AssertionError: Expected rate (30 +- 7), but got 39.12107974180088 (600 connections / 15.337 sec) expected:<30.0> but was:<39.12107974180088>
08:54:04          at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
08:54:04          at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
08:54:04          at kafka.network.ConnectionQuotasTest.$anonfun$testListenerConnectionRateLimitWhenActualRateAboveLimit$3(ConnectionQuotasTest.scala:414)
08:54:04          at scala.collection.immutable.List.foreach(List.scala:333)
08:54:04          at kafka.network.ConnectionQuotasTest.testListenerConnectionRateLimitWhenActualRateAboveLimit(ConnectionQuotasTest.scala:414)
08:54:04
08:54:04          Caused by:
08:54:04          java.lang.AssertionError: Expected rate (30 +- 7), but got 39.12107974180088 (600 connections / 15.337 sec) expected:<30.0> but was:<39.12107974180088>
08:54:04              at org.junit.Assert.fail(Assert.java:89)
08:54:04              at org.junit.Assert.failNotEquals(Assert.java:835)
08:54:04              at org.junit.Assert.assertEquals(Assert.java:555)
08:54:04              at kafka.network.ConnectionQuotasTest.acceptConnectionsAndVerifyRate(ConnectionQuotasTest.scala:871)
08:54:04              at kafka.network.ConnectionQuotasTest.$anonfun$testListenerConnectionRateLimitWhenActualRateAboveLimit$2(ConnectionQuotasTest.scala:412)
08:54:04


⚠ Bofrost.es has degraded performance

In 95c82a4, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1881 ms

Resolved: Bofrost.es performance has improved in bed3c69 after 6 minutes.


result file is not written on default

[ERROR] Failed to execute goal com.baloise.open:codeql2sonar-maven-plugin:0.1.0-HEAD-main-SNAPSHOT:SonarIssueReporter (default-cli) on project Test: target\sonar\codeql2sonar.json (Das System kann den angegebenen Pfad nicht finden)

problem is caused on unix file system since ./ was missing
Should be fixed with commit 3d4ebc43397e41758bd53c83e68c556a48664f47


include OEP-tag economy

Description of the issue
This comes from #33. The model factsheets use tags which should be represented in the ontology.
Ideas of solution
The tag economy is used by models 68, 168 and 169
The term economy is also mentioned in the sector sections of these model factsheets. Therefore we could add an economic sector class.
Workflow checklist

[ ] I discussed the issue with someone else than me before working on a solution
[ ] I already read the latest version of the workflow for this repository
[ ] The goal of this ontology is clear to me

I am aware that

[ ] every entry in the ontology should have a definition
[ ] classes should arise from concepts rather than from words

As sector is defined as a ... generically dependent continuant that is a subdivision of a system, a economic sector would be something like a subdivision of an economic system, right? We currently don't have a economic system. Is a economic system equivalent to a economy?
@OpenEnergyPlatform/oeo-domain-expert-economy : What do you think?

As  sector is defined as a ... generically dependent continuant that is a subdivision of a system, a economic sector would be something like a subdivision of an economic system, right?

Maybe we could define it as a subdivision of an economy instead if we can define economy as a system, which I think sounds feasible at first glance.

Wikipedias definition seems practical:
An economy is an area of the production, distribution and trade, as well as consumption of goods and services by different agents.

Or this:
the system of trade and industry by which the wealth of a country is made and used

We could then think about production (we have producer, maybe add production as a process?), distribution and trade as economic activities that take place in / across economic sectors.

We currently don't have a economic system. Is a economic system equivalent to a economy?

I think an economic system is more to be seen as the way in which the economy is governed, e.g. capitalism, communism ....
I do not think we need this for now.

As  sector is defined as a ... generically dependent continuant that is a subdivision of a system, a economic sector would be something like a subdivision of an economic system, right?

Maybe we could define it as a subdivision of an economy instead if we can define economy as a system, which I think sounds feasible at first glance.

I would not like to change the definition of sector as this was the result of a very long discussion process in #30.

* [Wikipedias](https://en.wikipedia.org/wiki/Economy) definition seems practical:
  _An economy is an area of the production, distribution and trade, as well as consumption of goods and services by different agents._

* [Or this](https://dictionary.cambridge.org/dictionary/english/economy):
  _the system of trade and industry by which the wealth of a country is made and used_

What about combining these two to the following definition: An economy is a system of production, distribution, trade and consumption of goods and services?

I think economic system in general is used to express the way in which the economy is governed, e.g. capitalism, communism .... I do not think we need this for now, but could rather define economy as a system itself...

Wikipedia seconds your understanding that we should avoid the label economic system. And you're right, we do not need cover capitalism, communism etc. in the OEO.

We could then think about production (we have producer, maybe add production as a process?), distribution and trade as economic activities that take place in / across economic sectors.

The concepts production, distribution, trade and consumption are all processes. Two of them we already defined:

A trade is a process in which one commodity or service is exchanged for another commodity or service.
Consumption is the process of using something and thereby reducing its amount.

I suggest that we open separate issues for production  and distribution

As sector is defined as a ... generically dependent continuant that is a subdivision of a system, a economic sector would be something like a subdivision of an economic system, right?

My original thought was that the system is society as a whole which then can be devided into economy, research, education, etc.
But I also agree that economy can be defined as a system itself.

What about combining these two to the following definition: An economy is a system of production, distribution, trade and consumption of goods and services?

I like this definition. Maybe we can use commodities and services instead of goods and services. That way we would be closer to the OEO-vocabulary.

I think, good is more general than commodity. In my understanding, not every good is a commodity as there are also good which are not exchangeable (for example things that are only produced once and are therefore unique). FIBO defines good as: physical, produced item over which ownership rights can be established, whose ownership can be passed from one party to another by engaging in transactions, and that is not money or real estate

In that case, we should use the opportunity and add a class good to the OEO. We could use the same structure as for commodity (defining a role and an equivalent class) and make commodity a subclass of good.

I would not like to change the definition of sector as this was the result of a very long discussion process in #30.

Yes, this makes sense. I did not mean to change the definition of sector. Given the status of the discussion now, we could avoid this if we define economy as a system, right?

Yes, exactly.

We have the following definitions:

economy: An economy is a system of production, distribution, trade and consumption of goods and services.
good role: The role of a physical, produced item over which ownership rights can be established, whose ownership can be passed from one party to another by engaging in transactions, and that is not money or real estate. (definition source: https://spec.edmcouncil.org/fibo/ontology/FND/ProductsAndServices/ProductsAndServices/Good)
good: A material entity that has the good role. (Equivalent To material entity and (has role some good role), parent class of commodity)

Okay, seems we have a solution we can agree on. I'll implement.

@l-emele you implemented it with pull request #843 but did not close this issue.
I guess, you wrote closes issue #832 instead of closes #832.
Am I right? Can we close this issue here?

Yes, I'll close the issue.


terraform cloud support

What steps did you take:
I installed the provider on a project and set the project to be run by terraform cloud
What happened:
I received the following error:
Executing ytt: exec: "ytt": executable file not found in $PATH (stderr: )
What did you expect:
ytt to be provisioned by the plugin

ytt to be provisioned by the plugin

@bonzofenix any thoughts on how to do that? never used terraform cloud myself. (this terraform provider just delegates to tools like ytt, kbld, kapp by calling out to them).

Binaries can be installed via https://github.com/mumoshu/shoal lib for example

@cppforlife Reading thourgh terraform cloud docs, they recommend vendoring any missing dependency in their worker with a  git submodule. I got this working by vendoring https://github.com/bonzofenix/carvel_binaries as a submodule to my terraform project and adding the it to the PATH env.


Add javascript async await explanation with example

Add a brief overview of async await in concepts section.

can i take this one?


Upgrade to Azure OpenAI SDK 1.0.0-beta.12 + Structured Outputs support

As discussed in #1715 this includes migrating to Structured Outputs.
For more information on Structured Outputs:

The announcement by OpenAI: https://openai.com/index/introducing-structured-outputs-in-the-api/
The OpenAI documentation: https://platform.openai.com/docs/guides/structured-outputs
Microsoft Learn documentation: https://learn.microsoft.com/en-us/java/api/overview/azure/ai-openai-readme?view=azure-java-preview#structured-outputs
Sample code: https://github.com/Azure/azure-sdk-for-java/blob/azure-ai-openai_1.0.0-beta.12/sdk/openai/azure-ai-openai/src/samples/java/com/azure/ai/openai/StructuredOutputsResponseFormat.java

I migrated many tests:

I'm not sure the AzureOpenAiTokenizer works correctly anymore
I had to exclude or migrate some models are they are not available anymore in Sweden Central

There is clearly more work needed, @agoncal just told me he would help, but we're both out for about 10 days, so unless someone else is available to help, this will need to wait a bit.

Regarding AzureOpenAiTokenizer: yes, it is really hard to maintain that logic, perharps we should simplify it (support token estimation only for text) or deprecate completely?

@jdubois thank you!
Just to double check: it seems that this PR is mostly focused on using new JsonObjectSchema API to define tool parameters, while it has already been covered in #1668 and should not require any work at this point.
Structured Outputs is a different feature, you can see how it is implemented for OpenAI in InternalOpenAiHelper.toOpenAiResponseFormat()

Yes I first wanted to do this, I'm doing the structured output right now!! But I missed that you had another draft request for this, so now let me look at this.

I just pushed what I did in https://github.com/langchain4j/langchain4j/pull/1982/commits/fce2bc537d9e13c3a8502894b23b80456cbfc3dd but that's not finished, and I won't have time until November, 4th.

Hi @jdubois, quick update: I will postpone the release till the next week. So I guess there is a chance to get this PR in? Thanks!

With this latest commit I started to add the real code to support structured outputs. It's far from being finished and I can't promise I'll have much time in the next 2 weeks to work on this, but this is definitely moving forward.

For the record, here is the Azure SDK documentation:

Microsoft Learn documentation: https://learn.microsoft.com/en-us/java/api/overview/azure/ai-openai-readme?view=azure-java-preview#structured-outputs
Sample code: https://github.com/Azure/azure-sdk-for-java/blob/azure-ai-openai_1.0.0-beta.12/sdk/openai/azure-ai-openai/src/samples/java/com/azure/ai/openai/StructuredOutputsResponseFormat.java

@langchain4j  All integration tests are now green, I need time to look at your code review and to clean up everything, but that should be good soon!!!

BTW there is a new JSON type (JsonAnyOfSchema) being added in https://github.com/langchain4j/langchain4j/pull/2148, I guess Azure OpenAI supports it as well, so we should not forget to add a mapping for it in Azure OpenAI

@langchain4j I put this as "ready for review", all my tests are passing and the code review should be OK.

I really dislike the new ChatCompletionsJsonSchemaResponseFormat(null) configuration:

Putting a null as an argument seems wrong
Also we would mix LangChain4j's API with Azure OpenAI's API

Then, you are right, use case 5 isn't working here, even if that's a weird one we should support it.
Do you think we could update dev.langchain4j.model.chat.request.ResponseFormat, to support TEXT, JSON and STRUCTURED_JSON?

I really dislike the new ChatCompletionsJsonSchemaResponseFormat(null) configuration:

Putting a null as an argument seems wrong
Also we would mix LangChain4j's API with Azure OpenAI's API

Then, you are right, use case 5 isn't working here, even if that's a weird one we should support it.
Do you think we could update dev.langchain4j.model.chat.request.ResponseFormat, to support TEXT, JSON and STRUCTURED_JSON?

I guess if we change the logic of supportedCapabilities() like I've described in https://github.com/langchain4j/langchain4j/pull/1982#discussion_r1878523329, there will be no need in new ChatCompletionsJsonSchemaResponseFormat(null)

@langchain4j yes with my last commit this should be OK

@jdubois wondering if you need any help or review on this one ?

@agoncal I was going to work on this today, but as we have the day tomorrow together at the office, let's pair program tomorrow!

@langchain4j I believe this now works the way you wanted

@jdubois thanks you so much!
19 tests are failing for me when run locally:

Does it work fine for you?

@jdubois I think it is good to merge. There are a few minor comments left, but we can also merge it as it is now (if you will not have time to address them tomorrow). Please LMK how you want to proceed

@jdubois could you please update the documentation and Spring Boot starter?

Awesome! Yes I'll do this today.


Error in npm quick start

i had installed npm and tried to execute npm start cmd and i got following error!
Error occured when executing command: npm run serve
Error: spawn cmd.exe ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
Error occured when executing command: npm run serve
Error: spawn cmd.exe ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
[1] npm run serve exited with code -4058
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>start: concurrently "npm run build:watch" "npm run serve"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above
.npm ERR!      C:\Users\Harsha\AppData\Roaming\npm-cache_logs\2017-07-07T21_06_20_028Z-debug.log
please help me out in fixing this problem
thank you in advance

This repository is now deprecated. The Angular Quickstart project was a nice starting point for creating Angular applications. Now we recommend using the Angular CLI to create new Angular projects.
Starting from 1 November 2017, all the Angular documentation, at angular.io, is based on the Angular CLI.
Let's get started


[Plugin] AWS Proton

Hello! I'm from the AWS Proton service team, and we're exploring use cases for a Proton plugin in Backstage and what that could look like.  At a high-level, this is what I'm thinking right now -- I would love feedback:  With Proton + Backstage, you can use Proton to standardize infrastructure and pipeline configuration, so that your developers don't have to keep things like CloudFormation and Terraform templates up-to-date in their source code repos.  Backstage still acts as your developer portal for creating new applications, cataloging applications, and centralizing your developer tools into a single UI.
I think there are two parts to the Proton+Backstage integration:
1. Backstage Template Action:
As part of creating and scaffolding out a new component in Backstage, Backstage Software Templates can create and deploy a Proton service in order to provision the infrastructure and the CI/CD pipeline needed for the application.  For example, instead of having the scaffolder drop a CloudFormation or Terraform template in the developer's source code repo, I would register that CloudFormation/Terraform template in Proton and keep it up-to-date there (freeing up developers from having to deal with keeping it up-to-date themselves).
Snippet of a scaffolder template's steps:
    - id: publish
      name: Publish
      action: publish:github
      input:
        allowedHosts: ['github.com']
        description: This is ${{ parameters.name }}
        repoUrl: ${{ parameters.repoUrl }}

    - id: provision
      name: Create Proton Service
      action: aws-proton:create
      input:
        ???

The catalog entity can then be annotated with the Proton service ARN, along with any resources that were provisioned in the Proton service, for use by front-end plugins.
Example annotations for a catalog entity:
aws.amazon.com/proton-service-arn: "arn:aws:proton:us-west-2:123456789012:service/MyService"
aws.amazon.com/codepipeline-service-arn: "arn:aws:codepipeline:us-west-2:123456789012:MyServicePipeline"
aws.amazon.com/ecs-service-arn: "arn:aws:ecs:us-west-2:111222333444:service/my-http-service"

In the example above, the proton-service-arn annotation can be used by the proposed Proton plugin (described below) to display the Proton service in the Backstage UI; the codepipeline-service-arn annotation can be used by the proposed CodePipeline plugin to display the pipeline; and the ecs-service-arn annotation can be used by the proposed ECS plugin to display the deployed containers.
2. Backstage Plugin:
The Proton plugin would display information in the Backstage UI about the component's Proton service and its deployed Proton service instances, with a link to the Proton service in the AWS console.  This is an area where I'd love input on what types of information and/or actions you'd like to see/take in the Backstage UI for Proton.

This looks really neat. Think it looks pretty good so far, and pretty reasonable. The annotation of the entities is going to be pretty simple I think, but you probably want to amend the catalog-info.yaml that is going to be created after the aws:proton:create action or something as that would output the arn's that are needed. So maybe the push comes after?
As for what to show in the Backstage plugin itself, I think i'm gonna delegate back to you folks for this, or maybe there's some other Proton users that could provide some insight. I've not used it personally, but if it's anything like the CloudFormation rollout stuff, then I'd like to see the status of the rollout after changes etc, and maybe in the meantime until the plugins for code pipeline and ecs are ready, some links into the aws console could be useful.
I think it's gonna be really great when all the plugins are working in harmony with each other and they all just work given the annotation thats on the catalog-info.yaml file :)

Hi,
Awesome that you're looking into this! I bet a lot of users will be thrilled to work with this tooling.
Is there any chicken-and-egg problem to iron out with the aws-proton:create action vs. the catalog-info.yaml creation and CI/CD triggering etc? As in, I'm just double checking - is there some need to perform actions in a certain order? The reason I'm asking is, indeed it would be super valuable to be able to get the right annotations in place immediately and things being up and running fully without additional user interaction. Those annotation values are possible to pre-populate right, not needing any data to be returned from proton itself?

Yeah there is a bit of a potential chicken-and-egg problem if the resources that are provisioned by the Proton service have auto-generated, non-predictable names.  For example, the service could deploy a CloudFormation stack or Terraform config that generates the names CodePipeline pipeline MyServicePipeline<random ID> and ECS service my-http-service-<random ID>.  Those generated names would be returned from Proton APIs and somehow need to get inserted into the catalog-info.yaml file.  But, Proton expects that the repo is already created and populated when the Proton service is created, so that it can provision and trigger the CI/CD pipeline.
For that particular case, is it reasonable to scaffold the repo twice in the software template?  Something like:

fetch:template: Fill in proton-service-arn annotation in catalog-info.yaml, but skip annotations for resources with non-predictable names
publish:github: Create and initialize the repo
aws-proton:create: Create the Proton service. Get the CodePipeline pipeline and ECS service ARNs as outputs from the action
fetch:template again: Fill in all the values, including ecs-service-arn and codepipeline-service-arn annotations in catalog-info.yaml
publish:github again: Effectively just pushing a change to catalog-info.yaml. Do the current git publishing actions handle the repo already existing and having content?
catalog:register

This isn't a concern for Proton service templates that only use predictable names, so that catalog-info.yaml can be entirely generated before the Proton service is created.  But, it is very common to let CloudFormation or Terraform generate random IDs into resource names.

Proton plugins for Backstage are now available!
Repo: https://github.com/awslabs/aws-proton-plugins-for-backstage
Blog post: https://aws.amazon.com/blogs/containers/provisioning-infrastructure-using-the-aws-proton-open-source-backstage-plugin/


dynamically representing field-name in smithy

Problem Faced
While writing a response structure for a smithy model. I wanted to dynamically represent one of the field names as the name of the index that the model response is returning.
Example:
Below is the model defined for Get /{index}/_settings API.
Request Structure
structure GetSettingsIndexInput {

    @httpLabel
    @required
    index: IndexName,

    @httpQuery("allow_no_indices")
    allow_no_indices: Boolean,

    @httpQuery("expand_wildcards")
    expand_wildcards: ExpandWildcards,

    @httpQuery("flat_settings")
    flat_settings: Boolean,

    @httpQuery("include_defaults")
    include_defaults: String,

    @httpQuery("ignore_unavailable")
    ignore_unavailable: Boolean,

    @httpQuery("local")
    local: Boolean,

    @httpQuery("master_timeout")
    master_timeout: Time,
}

Required Response structure
structure GetSettingsIndexOutput {

   <IndexName>: UserDefinedMap

}

<IndexName> in response structure must match with the index value specified in request structure.

I don't see how this could work in in Smithy (I'd also suggest a different API design if you can control it). If this is needed, it can be implemented using a nested map of some kind or possibly a document type if the different values for different keys aren't all homogeneous (the document type could be nested or set as the @httpPayload).