[BUG] needs proper error handling in manage form section

Description
We have lots of AJAX call in pages/account/manage section and we are calling fetch() function. The problem is here that by default the fetch function doesn't reject the promise if we get back an error status code, in that case, we should reject the promise and throw an actual error and handle the rejected promise.
The downside of not handling a rejected promise in fetch call is that if the request fails for any reason, such as a network error or server-side error, the code does not handle the error gracefully. As a result, the application may not provide appropriate feedback or error handling to the user.
Without proper error handling, it becomes challenging to identify the cause of the issue. Debugging the code and fixing the problem becomes more complex, as there is no specific error message or indication of what went wrong.
To address this issue, it is important to handle rejected promises appropriately. This can involve displaying error messages to the user.
Screenshots
No response
Additional information
want to fix this issue

We have a discussion open regarding form validation here : https://github.com/EddieHubCommunity/LinkFree/issues/8031
We can continue this discussion there!

Thank you for the suggestion 👍  I think 1 location of code should be updated and then we can discuss further before implementing it to other areas of the code

I want to work in this issue.

My idea is, If the request fails for any reason, such as a network error or server-side error, then reject that promise by throwing an appropriate error message and handle it in the catch block.
One possible solution might be this-
(example code: pages/account/manage/profile.js)
  const handleSubmit = async (e) => {
    e.preventDefault();

    try {
      const res = await fetch(`${BASE_URL}/api/account/manage/profilesf`, {
        method: "PUT",
        headers: {
          "Content-Type": "application/json",
        },
        body: JSON.stringify({ name, bio, tags, layout }),
      });

      if (!res.ok) {
        const update = await res.json();
        throw new Error(update.error || update.message || res.statusText);
      }
      setShowNotification({
        show: true,
        type: "success",
        message: "Profile updated",
        additionalMessage: "Your profile has been updated successfully",
      });
    } catch (err) {
      setShowNotification({
        show: true,
        type: "error",
        message: "Profile update failed",
        additionalMessage: `Please check the fields: ${err.message}`,
      });
    }
};

what do you think?

const handleSubmit = async (e) => {
   e.preventDefault();
   fetch(`${BASE_URL}/api/account/manage/profilesf`, {
       method: "PUT",
       headers: {
           "Content-Type": "application/json",
       },
       body: JSON.stringify({ name, bio, tags, layout }),
   })
   .then(async(res) => {
       if (!res.ok) {
           const update = await res.json();
           throw new Error(update.error || update.message || res.statusText);
       }
   })
   .then((data) => {
       setShowNotification({
           show: true,
           type: "success",
           message: "Profile updated",
           additionalMessage: "Your profile has been updated successfully",
       });
   })
   .catch((err) => {
       setShowNotification({
           show: true,
           type: "error",
           message: "Profile update failed",
           additionalMessage: `Please check the fields: ${err.message}`,
       });
   })
};

@badrivlog When I saw this issue, I thought handling it this way but your try catch and async wait wait is a better approach in my opinion because it's easier to understand.

const handleSubmit = (e) => {
   e.preventDefault();
   fetch(`${BASE_URL}/api/account/manage/profilesf`, {
       method: "PUT",
       headers: {
           "Content-Type": "application/json",
       },
       body: JSON.stringify({ name, bio, tags, layout }),
   })
   .then(async(res) => {
       if (!res.ok) {
           const update = await res.json();
           throw new Error(update.error || update.message || res.statusText);
       }
   })
   .then((data) => {
       setShowNotification({
           show: true,
           type: "success",
           message: "Profile updated",
           additionalMessage: "Your profile has been updated successfully",
       });
   })
   .catch((err) => {
       setShowNotification({
           show: true,
           type: "error",
           message: "Profile update failed",
           additionalMessage: `Please check the fields: ${err.message}`,
       });
   })
};

@badrivlog When I saw this issue, I thought handling it this way but your try catch and async wait wait is a better approach in my opinion because it's easier to understand.

@Dobariya-Nishant I think code you wrote is not correct

@badrivlog sorry I don't know, it would be great if you correct my code.

@badrivlog sorry I don't know, it would be great if you correct my code.

You should need to know how promise works. (note: please don't comment issues that are unrelated as this creates extra noise and confusion)
If you need any help- EddieHub Discord might be better
https://discord.gg/44dXjyWB

Yes we use async/await in our project and we are keen to keep things consistent 👍 thanks for the collaboration everyone, great to see different perspectives 💪
@badrivlog that looks good 👍 I will assign it to you

Thank you for the suggestion 👍  I think 1 location of code should be updated and then we can discuss further before implementing it to other areas of the code

Please take a look my draft PR I created.
I have improved the error handling functionality and updated in one location of code.
should I implementing it to other areas of the code?

Thank you for the suggestion 👍  I think 1 location of code should be updated and then we can discuss further before implementing it to other areas of the code

Please take a look my draft PR I created. I have improved the error handling functionality and updated in one location of code.
should I implementing it to other areas of the code?

I will ask the other maintainers to take a look, I don't see the benefit, it looks very much the same to me and focused on form validation - so wouldn't work for other http requests 🤔

Yes, we could wrap the http request in a try/catch and handles the error, that might be a solution.
But this approach will produce lots of duplicate code, even of this is kind of repetitive🤔
In opinion it's really a bit cumbersome to having to do all these step all the time. Instead it would be good to actually create ourselves a really nice utility function for api request. And that utility function will wrap up the fetch the error handling, and also the conversion to JSON.
export async function sendRequest(requestConfig) {
   try {
     const res = await fetch(requestConfig.url, {
       method: requestConfig.method ? requestConfig.method : "GET",
       headers: requestConfig.headers ? requestConfig.headers : {},
       body: requestConfig.body ? JSON.stringify(requestConfig.body) : null,
     });
     const data = await res.json();
     if (!res.ok) {
       let errMessage = res.statusText;
       if (data.message) {
         if (typeof data.message === "string") errMessage = data.message;
         else {
           errMessage = Object.keys(data.message)
             .map((val) => `${val} is required`)
             .join(", ");
         }
       }
       if (data.error) {
         errMessage = data.error;
       }

       throw new Error(`Request failed! ${errMessage}.`);
     }
     return data;
   } catch (err) {
     console.error(err);
     throw err;
   }
 }

The sendRequest will accept any kind of api request and when there is an error in this fetch, it will throw a new error and it also immediately converts the response to JSON
The sendRequest function abstract all this functionality into one nice function that we can use all over our project.

And that utility function will wrap up the fetch the error handling, and also the conversion to JSON.

But part of that code is specific to form validation and not other requests

And that utility function will wrap up the fetch the error handling, and also the conversion to JSON.

But part of that code is specific to form validation and not other requests

Hey, thank you for correcting me💪
I have pushed new changes to my PR, please take a look 🙏
What's next?

Hi @eddiejaoude ,
I hope you're doing well. I've just submitted a pull request for Handling rejected promise and I would really appreciate your feedback. Your expertise would be invaluable in ensuring the quality and functionality of the code changes.
Please take a moment to review the pull request at https://github.com/EddieHubCommunity/LinkFree/pull/8283 and share your thoughts. Your insights and suggestions will help us improve the codebase and deliver a better product.
Thank you in advance for your time and effort!

Thanks @badrivlog sure I will take a look and ask the maintainers to also as this is a challenging topic 👍


[Example] PingpongClient often crashes

In example/pingpong/pingpong_client* ans example/pingpong/client_main.
When it runs, it will crash in a short time because of "core dump: segmentation default".
I tried to find the bug, and found that when a raw pointer is used by a lot of objects it will be inaccessible (I mean that memory space the pointer pointed to).
@macosunity @renph @L-Super @CosmosNing @maxlv7

The bug is in Connector Module. It has been solved.

OK.


Use upstream ecs-agent types for deserializing API responses

This project rolls its own types for deserializing ECS task metadata and container stats responses. Maintaining these types can be tedious, as the documentation of these API endpoints is underspecified, in the sense that properties included in API responses are broadly available in the documentation, but their precise types (including whether properties are optional) are sometimes not. If we roll our own types, we are stuck reverse-engineering the specifics of the ECS API responses, which is made more tedious by the fact that these can differ between EC2 and Fargate.
Good news: rolling our own types is not necessary. The ECS Agent is open source and written in Go. We can depend on it as a library, purely to get at the structs that it uses for API responses. We were already doing a similar thing for docker stats; this is just more comprehensive. (The ECS Agent project itself depends on the same docker library we were using for these stats, and includes them in its API responses.)
Switching to these ECS Agent types has revealed situations in which our types were incorrect, silently relying on implicit type conversions of JSON values in Go's JSON deserializer. One of these situations was resulting in actually invalid data being served: ECS tasks on EC2 need not specify task-level resource limits at all, such that these properties are optional on the JSON response, but our types for them were not pointers, such that we were incorrectly reporting derived metrics as zero, when they really should not exist at all.
The downsides of doing this:

The ECS Agent project has no detectable Go module version. I am not an expert on this, but I think it's related to a single repo containing multiple Go modules. I don't think this is a big deal, as the existing docker dependency already did not have a Go module version.
We have to upgrade to go 1.21, as the ECS agent project declares that it requires it in its go.mod.
Binary size grows, about 12MB -> 18MB on my laptop. I am surprised that simply switching to use these structs blew up binary size so much, but I don't think binary size is taken very seriously in the Go ecosystem anyway, so I don't think this is a big problem.

I think these downsides are worth it in that, going forward, we can more reliably develop metrics derived from ECS Agent API responses, because we're using types that are much more likely to be correct.
I plan to add more metrics, and improve existing ones, using these types in the future.
I have validated these changes by recording output on EC2 and Fargate before and after this change here:
https://github.com/isker/ecs-exporter-cdk/tree/master/experiments/use-official-types. The resulting diffs are as expected.

Hmm, not sure what to do about that lint failure.

I'm going to ignore the lint error, since this will get fixed with the next sync of the lint config.


Add polymer behavior & polymer behavior implement

Sure, no problem!

Would you mind doing a rebase to squash the commits together?

Done, I also changed html to script highlighting

Great thank you!

Thanks for you're time & you're welcome!


On testnet you can page past the end of all tokens

But only if there are paths + tokens.
Seems to be correct for just base tokens.
When you do so, you end up with 'not found' and no way of going back.

Think this is fixed by 71cffe21f6676bf1aedc4258e4552fd7e96aef00 and 98700d346844eeb2347b65b966d6ae876f35f7e5


go modules support ?

the new go modules allow to fetch versions with go get.
but this does not seem to work:
go get<EMAIL_ADDRESS>go get<EMAIL_ADDRESS>no matching versions for query "v1.1"

You can only fetch a Go package by its version if it explicitly defines itself as a valid Go Module - through the presence of a valid go.mod file.
Goji isn’t a Module, and thus you can’t use go get like that.

Good news! Just added module support. Let me know if you’re still having trouble with this

hi,
it still does not work. But i think that is because of the git-tags.
go modules requires vX.Y.Z tags. it looks like it does not work with vX.Y tags.
GO111MODULE=on go get -u -v<EMAIL_ADDRESS>  Fetching https://goji.io?go-get=1
  Parsing meta tags from https://goji.io?go-get=1 (status code 200)
  get "goji.io": found meta tag get.metaImport{Prefix:"goji.io", VCS:"git",
  RepoRoot:"https://github.com/goji/goji"} at https://goji.io?go-get=1
  go get<EMAIL_ADDRESS>no matching versions for query "v1.1"

Alright—I’ve gone and added three-part semvar tags. Let me know if that helps!


fix fix  export-manual.md

Problem summary
The definitions of AWS_ENDPOINT and AWS_REGION were reversed in the Chinese document.  I modified the correct translation.
Checklist(Required)

[ ] Does it affect the original behavior
[ ] Has unit tests been added
[x] Has document been added or modified
[ ] Does it need to update dependencies
[ ] Is this PR support rollback (If NO, please explain WHY)

run buildall


fix retain connection

The retain connection property wasn't actually doing anything. It works now and is false by default since it can create server timeout errors if used incorrectly.

🚢


Where can I find the log files?

I've seen where to find it for linux on a previous thread before but I'm on windows 10 and not exactly sure where is it.
Also, I'm not very experienced at coding and all of that but if someone could guide me in the direction to display my log files as graphical information then I'd appreciate that very much.

@longinus13 C:\Users\{UserName}\AppData\Roaming\pomotroid\logs
Replace {UserName} with your current user.


Single Stocks Analysis Example doesn't work for SPY

Dear Zipline Maintainers,
Before I tell you about my issue, let me describe my environment:
Environment

Operating System: MacOS Catalina 10.15.7
Python Version: 3.8.10
How did you install Zipline: conda install -c ml4t -c conda-forge -c ranaroussi zipline-reloaded

Now that you know a little about me, let me tell you about the issue I am
having:
Description of Issue
import pyfolio as pf
#Fetch the daily returns for a stock
stock_rets = pf.utils.get_symbol_rets('SPY')

What did you expect to happen?

A dataframe of date and daily returns for SPY

What happened instead?

Error message
Exception in thread Thread-7:
Traceback (most recent call last):
  File "/opt/anaconda3/envs/zipreload/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/opt/anaconda3/envs/zipreload/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/anaconda3/envs/zipreload/lib/python3.8/site-packages/multitasking/__init__.py", line 102, in _run_via_pool
    return callee(*args, **kwargs)
  File "/opt/anaconda3/envs/zipreload/lib/python3.8/site-packages/yfinance/multi.py", line 167, in _download_one_threaded
    data = _download_one(ticker, start, end, auto_adjust, back_adjust,
  File "/opt/anaconda3/envs/zipreload/lib/python3.8/site-packages/yfinance/multi.py", line 179, in _download_one
    return Ticker(ticker).history(period=period, interval=interval,
  File "/opt/anaconda3/envs/zipreload/lib/python3.8/site-packages/yfinance/base.py", line 123, in history
    _time.strptime(str(start), '%Y-%m-%d')))
  File "/opt/anaconda3/envs/zipreload/lib/python3.8/_strptime.py", line 562, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "/opt/anaconda3/envs/zipreload/lib/python3.8/_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '1/1/1970' does not match format '%Y-%m-%d'

Here is how you can reproduce this issue on your machine:
Reproduction Steps

Write the code listed above or see https://github.com/quantopian/pyfolio/blob/master/pyfolio/examples/single_stock_example.ipynb
Retrieve daily returns for SPY
See error
...

What steps have you taken to resolve this already?
This issue only happens with SPY, other tickers such QQQ, VOO work with no problem. The issue appears to be parsing of date in data received through yfinance package.
...
Anything else?
It is my first time submitting an issue, not sure if I submitted the report correctly.
...
Sincerely,
Anil

This is not really an issue with zipline but pyfolio/yfinance maybe it would be better to open the issue there?

Indeed a pyfolio issue. Please open an issue [there](https://github.com/stefan-jansen/pyfolio-reloaded.


Null parameter exception when cloning.

Hi,
I was excited to use the gitignore option added to clone, so was testing with the latest version of the code base, when I encountered a LibGit2Sharp exception.
The command I ran was:
git tfs clone http://my.tfs.local:8080/tfs/Defaultcollection $/redacted/redacted/Active --branches=all --changeset=21457 --gitignore=c:\src\gitignore active-partial-ignore
And the output in the log was:
------ start log snippet -------
2016-12-15 16:40:53.7539 [Debug] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: merger
at LibGit2Sharp.Repository.Merge(Commit commit, Signature merger, MergeOptions options)
at Sep.Git.Tfs.Core.GitRepository.Merge(String commitish)
at Sep.Git.Tfs.Commands.Clone.Run(String tfsUrl, String tfsRepositoryPath, String gitRepositoryPath)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sep.Git.Tfs.Util.GitTfsCommandRunner.Run(GitTfsCommand command, IList1 args)    at Sep.Git.Tfs.GitTfs.Main(GitTfsCommand command, IList1 unparsedArgs)
at Sep.Git.Tfs.GitTfs.Run(IList`1 args)
at Sep.Git.Tfs.Program.MainCore(String[] args)
at Sep.Git.Tfs.Program.Main(String[] args)
2016-12-15 16:40:53.7539 [Error] Value cannot be null.
Parameter name: merger
------ end log snippet -------
Any help is appreciated, even if it's just pointers on where to look in the code. : )
Tyler.

I'm also seeing a crash in fetching when I attach a debugger--manages to take out the debugger and VS. Crashes generally, but not precisely, the same point in the log output each time. Possible race condition somewhere, or maybe just a completely flushed log?
Crash happens after a log line like the following:
2016-12-16 16:14:24.7891 [Debug] get [C22799]$/branch/some/path/foo.js

I know why the exception is thrown but I don't understand why exactly it is happening.
Libgit2Sharp throw this exception when creating a merge commit and libgit2sharp don't succeed to retrieve the git user data (username and email).
I think that your git data are not set, are they? Perhaps you could circumvent the exception by setting them...
https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
Perhaps should git-tfs warn before doing something....

Yep, that was indeed the problem--I was working on a new box, which I've not used for any commits. Just as an FYI, this is different behavior than I'm seeing in the last production release. Also, I'm seeing some "couldn't fetch parent branch" errors, but I'll post them as a separate issue once I've had a chance to dig into them a little.
Thanks for the quick response, and for the great tool!

this is different behavior than I'm seeing in the last production release

Yes, that's a new behavior of libgit2sharp that now require git user config data before trying to do a merge, even if in our special case,  they are not needed (fast forward merge...)


[BUG] Use Step Down rounding while collecting deposits with too many decimals

Version:
2.4-stable
Additional Info:
No changes in deposit & withdrawal process
Steps to reproduce:

send a transaction with exactly "0.055796386110991888"
System will show the deposit as "0.0557963861109919"
When collecting system will try to collect "0.0557963861109919" because we have less funds on blockchain this transaction will not be accepted.

Solution:
Instead of using"0.0557963861109919" system should use "0.0557963861109918" or "0.05579638611099187"

Rounding on monetary amounts is a bad practice.
Fix proposed in #2851


Custom type support

Can I have custom type instead of bytes so that I can implement my own serializer/deserilizer of this field?
I have the following pb file from scala.  In scala it uses an extension to present the field as BitSet
message Receive {
    bytes locallyFree = 1 [(scalapb.field).type = "scala.collection.immutable.BitSet"];
}

I can write my BitSet struct in rust and expose serializer/deserializer traits,  is there a way to inject my struct into the generated code ?

There's no way to do that now, but I'm open do considering designing and implementing this extension.

thanks, finally I solved it with prost.


Add support for new DM show & list apis

This PR enables anaconda to support following two new APIs of DM.

GET direct_messages/events/list - which returns list of Direct Message events (both sent and received).
GET direct_messages/events/show - which returns a single Direct Message event by the given id.

This addresses #258 partially.

I couldn't make POST direct_messages/events/new & DELETE direct_messages/events/destroy work without major changes in the core. I will give it an another try later after understanding anaconda in-depth.


#1251 - Update to Storm 2.6.3

Thank you for contributing to Apache StormCrawler.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a issue associated with this PR? Is it referenced in the commit message?

[x] Does your PR title start with #XXXX where XXXX is the issue number you are trying to resolve?

[x] Has your PR been rebased against the latest commit within the target branch (typically main)?

[x] Is your initial contribution a single, squashed commit?

[x] Is the code properly formatted with mvn git-code-format:format-code -Dgcf.globPattern="**/*" -Dskip.format.code=false?

For code changes:

[x] Have you ensured that the full suite of tests is executed via mvn clean verify?
[ ] Have you written or updated unit tests to verify your changes?
[x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[x] If applicable, have you updated the LICENSE file, including the main LICENSE file?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file?

Note:
Please ensure that once the PR is submitted, you check GitHub Actions for build issues and submit an update to your PR as soon as possible.

I am going to do a run in my cluster setup and will report back here. Stay tuned (might be tmrw)

I am going to do a run in my cluster setup and will report back here. Stay tuned (might be tmrw)

Tested locally. Needed to update Jackson as well, but now it's fine.


TreeDataTemplate does not generate children [11-preview5]

Describe the bug
I am using TreeDataTemplate to show a generated tree in a TreeView. Starting in 11-preview5, only the root nodes are shown. Same behavior under nightly (11.0.999-cibuild0030252-beta).
Below is the most relevant XAML. I am using compiled bindings and there are no warnings in the VS Output window. The node Children collections are populated in the debugger. Collections are created once in the constructor and are never replaced. IIRC, there were no TreeViewItem node children in 11-preview5+ in DevTools, only for the root nodes.
<TreeView Items="{Binding Items}">
    <TreeView.DataTemplates>
        <TreeDataTemplate DataType="vm:BranchNodeViewModel" ItemsSource="{Binding Children}">
            <TextBlock Text="{Binding Children.Count, StringFormat=[BranchNode - Children: {0}]}" />
        </TreeDataTemplate>
        <TreeDataTemplate DataType="vm:LeafNodeViewModel" ItemsSource="{Binding Children}">
            <TextBlock Text="[LeafNode]" />
        </TreeDataTemplate>
    </TreeView.DataTemplates>
</TreeView>

To Reproduce

Clone this repro
Run the app to see the top Grid TreeView works under 11-preview4
Update to 11-preview5 (or nightly), fixup IControl -> Control in ViewLocator, run the app, and see it no longer generates children.

Expected behavior
I expect that the nodes with children are expandable.
Screenshots
The repro has a TreeDataTemplate generated hierarchy on the top pane and the bottom pane has one that defines a hierarchy manually via TreeViewItem.
11-preview4 correctly has expanders and children for the templated-generated pane:

11-preview5 (and nightly) do not:

Desktop (please complete the following information):

OS: Windows 10
Version: 11-preview4 (working), 11-preview5 (not working), 11.0.999-cibuild0030252-beta (not working)

Hello,
After migrating to 11-preview5 i experimented this behaviour, while preview4 is working.
In my hierarchical datamodel, the ItemsSource ObservableCollection getter is never accessed.
I worked-around it creating a wrapper HierarchyItem object that just redirect Items to the underlying observable collection.

I found a workaround: https://github.com/stevemonaco/AvaloniaTreeDataTemplateRepro/pull/1
The reason seems to be that only ItemTemplate is respected since preview5. If this is a bug or intended, I cannot say.

Thanks. This workaround to add an ItemTemplate also works in my real application.
<TreeView.ItemTemplate>
    <TreeDataTemplate DataType="vm:NodeViewModel" ItemsSource="{Binding Children}">
        <ContentControl Content="{Binding}" />
    </TreeDataTemplate>
</TreeView.ItemTemplate>

👀

Ok, I see what's happening. If one removes the view locator in App.axaml in the repro then it starts working.
The cause is the following:

PanelContainerGenerator prepares the item before adding it to the logical tree
When ItemsControl tries to find the data template, it first tries to find it relative to the TreeViewItem
If there is no ViewLocator in App.axaml then hic.FindDataTemplate(item) returns null, so it then tries to find it relative to the TreeView (the code after the ??)
If there is a ViewLocator in App.axaml though, this data template is found and used, meaning that the code after ?? is never executed


46 add recorder functions

Coverage remained the same at 100.0% when pulling 33f1a898d861cd80f77196374420869292a3a0a0 on 46_add_recorder_functions into b474933300d31423d827c0356dc1b93c95f49b1b on master.


Futures socket does not work with websockets version 10.0

Describe the bug
I recently reinstalled all modules and the futures websocket suddenly stopped working (no exceptions thrown). Downgrading to  "websockets==9.1" resolved the issue.
To Reproduce
Install the latest version of python-binance and websockets, then the following code will get stuck at tscm.recv()
client = await AsyncClient.create() bm = BinanceSocketManager(client) ts = bm.aggtrade_futures_socket('BTCUSDT') async with ts as tscm:     while True:         res = await tscm.recv()         print(res)
Environment (please complete the following information):

Python version: 3.8.10
OS: [Ubuntu]
python-binance version: 1.0.12

Describe the bug
I recently reinstalled all modules and the futures websocket suddenly stopped working (no exceptions thrown). Downgrading to "websockets==9.1" resolved the issue.
To Reproduce
Install the latest version of python-binance and websockets, then the following code will get stuck at tscm.recv()
client = await AsyncClient.create() bm = BinanceSocketManager(client) ts = bm.aggtrade_futures_socket('BTCUSDT') async with ts as tscm: while True: res = await tscm.recv() print(res)
Environment (please complete the following information):

Python version: 3.8.10
OS: [Ubuntu]
python-binance version: 1.0.12

I have the same problem. I have suffered losses because of this. Developers need to commit versions of dependent libraries in files requirements.txt and setup.py.

Yeah, took me a while to figure out what the issue even was. I forgot to mention that I only tried the aggregated trades websocket stream and that it works for spot markets while the futures markets does not.

OMG It takes me 48 hours to find the problem

Describe the bug
I recently reinstalled all modules and the futures websocket suddenly stopped working (no exceptions thrown). Downgrading to "websockets==9.1" resolved the issue.
To Reproduce
Install the latest version of python-binance and websockets, then the following code will get stuck at tscm.recv()
client = await AsyncClient.create() bm = BinanceSocketManager(client) ts = bm.aggtrade_futures_socket('BTCUSDT') async with ts as tscm: while True: res = await tscm.recv() print(res)
Environment (please complete the following information):

Python version: 3.8.10
OS: [Ubuntu]
python-binance version: 1.0.12

I have the same problem. I have suffered losses because of this. Developers need to commit versions of dependent libraries in files requirements.txt and setup.py.

I could not agree anymore. Developers need to commit versions of dependent libraries in files requirements.txt and setup.py.

Big issue indeed, recently did a reinstall and took me a long long time to figure out what's wrong...

Still didn't work for me :(
Python version : 3.9.7
OS: Windows 10 Pro
python-binance version: 1.0.14
I tried with websockets 9.1, 8.1, upgrading my python version, my python-binance version, nothing work :(

@DaStapo
Thank you very much! It takes me 48 hours to find out what's the problem.
@Molloss: you're same env with me. If you're using testnet, you must me change code in stream.py #929

I tried future socket over 6~8 hours. finally I solved it thanks to you by downgrade websockets.

I tried future socket over 6~8 hours. finally I solved it thanks to you by downgrade websockets.

What is  the version of the websockets library  at your system ? I have same problem. Every stream works except futures socket.

this issue is still going on, after 20 days of being reported.
manually installing websockets==9.1 continues to be the solution, while installing dependencies as-is from this library continues to be broken

this issue is still going on, after 20 days of being reported.
manually installing websockets==9.1 continues to be the solution, while installing dependencies as-is from this library continues to be broken

@ericcastro I have the same problem, but websockets version 9.1 does not seem to work for me, does this snippet work for you ?
from binance import ThreadedWebsocketManager
bsm = ThreadedWebsocketManager()
bsm.start()
def show_ticker(msg):
	print(msg)

bsm.start_kline_futures_socket(callback=show_ticker, symbol='BTCUSDT', interval='1m')

websockets==9.1 gets installed by default now with this library however I still can't see any streams with multiplex.
Wat do?

Hello,
add this at the start of your code:
import asyncio
import nest_asyncio
nest_asyncio.apply()

that should be enough


Create dataset of slopes of Sym-H

Something that might be better is a list of what phase you are in or phase and percent of phase. I think just knowing what phase you are in if there was a flare, is there a substorm maybe perhaps not sufficient, but pretty good.


Error when yarn dev command

I'm getting this error when trying to run yarn dev:

@felippegh There might be some issue in portfolio.js from your side. There is no issue in project


How to write custom angular component, and dynamic import to app.module?

There are demos for angular available...

There are demos for angular available...


Allow teleport_owner to be an object

If this is done once in vanilla files, And it should be a boolean, then I rather say this is an error in vanilla files and enforce that it is an boolean

Alr I'll undo this


Fix Z39.50 Presenter according to Convert-a-card feedback

Thanks to Yongjing https://twitter.com/ge_aimee https://twitter.com/ge_aimee/status/906091923693293569:
'Wonder if you need feedback on the card project. Great new layout. Keywords remain in the search box for previous records after submission.'

Should take a few mins.

I'm actually using this one to address a few other comments we had re usability issues for these tasks.

Layout of the search results compacted
Link to the Worldcat record added
Comments box moved to a more obvious collapse button

@alexandermendes could we ask the person who suggested it to review? I don't know the cards project well enough to spot any issues.

Well a lot of them came from Bill and I added in a few things I had spotted while I was at it, so that might be a bit tricky as we probably don't want to make a habit of giving outside access to our staging server...
We could say I'll try and get more feedback once they're live and we can always raise a new issue after that if more things come up.


ci: add build cache

Current dependencies on/for this PR:

main

PR #5369   👈

This comment was auto-generated by Graphite.


Duplicate id's of relationships in database

I'm running into an issue where the database contains duplicate id's for relationships. I'm using Ember, the Ember JSONAPIAdapter, Fortune, Fortune JSON API and Fortune Postgres.
Below I'll try to describe the issue / reproduction path as good as possible. Please let me know if my assumptions are wrong or there's information missing.
The problem
When performing a PATCH request to the server, the relations object is always passed with the request.
The relations are updated correctly if it has no inverse property for the related defined. However, when an inverse property for the related model is specified, it will also update the that model.
Example data model as defined in the store
product: {
    name: { type: String },
    shop: { link: 'shop', inverse: 'products' }
  },
shop: {
    name: { type: String },
    products: { link: 'product', inverse: 'shop', isArray: true }
  },

Reproduction path

I'm sending a PATCH request for the product with id product-1. Only the name has changed.
The request will contain the relationships property with the following value for the shop property:
data: { id: shop-1, type: 'shop' }
I'm not sure if the relationship is supposed to be specified in this request, but that's how Ember's JSONAPISerializer does it.

The Fortune PostgreSQL adapter will run the update() method for the product model. Next it will run update() for the shop model.
Because it's an array it will execute the following line: set.push("${field}" = array_append("${field}", $${index})) See https://github.com/fortunejs/fortune-postgres/blob/master/lib/index.js#L408

However, there seems to be no check if that id is already present in the array. The result is that the array can contain duplicates.

Later on, when updating the shop-1 model, the request fails because of duplicate id's inside the products property.

Unhandled rejection ConflictError: Duplicate ID "product-1" in the field "products".

Conclusion
I hope I've described my problem clear enough. Looking forward to have your feedback. If I have a better understanding of what is going wrong, I can work on a fix.
Many thanks in advance!

This might be a bug within fortune itself, the adapter's update method should never be called with incorrect arguments.
There are lots of tests for updates: https://github.com/fortunejs/fortune/blob/master/test/integration/methods/update.js
If it really is a bug and hasn't been covered, it should also be added in the tests as well.

@0x8890 why do you think the update method is being called with incorrect arguments? Should the method be called at all for relations which are are already present in the db?

Most likely there is an incorrect calculation done somewhere in here: https://github.com/fortunejs/fortune/blob/master/lib/dispatch/update.js
What it does is try to update only what is necessary, and it seems there is something wrong because if the field is the same it shouldn't try to update the relationship.
If it isn't a core bug, then what I suspect is the issue is JSON API's requirement of string IDs isn't working with number IDs in Postgres.

It does not seem to be a problem in Fortune.js core. I added a demo to test it in a browser: https://github.com/fortunejs/fortune/blob/master/test/demo.js
Furthermore, I made some modifications to the above code to use Postgres and JSON:API, and still could not reproduce the error. This is what I tried:
curl -H 'Accept: application/vnd.api+json' -H 'Content-Type: application/vnd.api+json' -X PATCH -d '{"data":{"type":"animals","id":"1","relationships":{"owner":{"data":{"type":"users","id":"1"}}}}}' http://localhost:1337/animals/1

@0x8890 thanks for investigating! But I'm not sure how that demo.js file tests this behaviour? I can't see any relationships defined.
Adapter options
adapter: [
postgresAdapter,
{
url: config.pgConnectionString,
generatePrimaryKey: function () {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
s4() + '-' + s4() + s4() + s4();
}
}
],
Serializer options
serializers: [
[jsonApi]
]
Version numbers

fortune v3.4.3
fortune-json-api v2.0.1
fortune-postgres v1.4.3

@0x8890 I've updated Fortune to v3.5.4 which fixes this behaviour. Following commits contained the fix: https://github.com/fortunejs/fortune/compare/3.5.3...3.5.4
I should have updated before asking here :-/ Thanks very much for your work!

Hmm ok. Any reason you're not using 4.x though? I would highly recommend using the latest version, the breaking change introduced by 4.0 is pretty trivial and won't affect you if you're not using WebSocket.

@0x8890 you're right. I've updated my application to the latest versions of all packages.
Is there a way I can donate to the project so I can support you for your work?

@Voles I would mostly welcome contributions to features and documentation, I'm not so interested in free software for money since it's mostly a labor of love for me. Also I re-use my own open source code in hobby projects and commercial projects as well.

When applications are done well, they are just the really application-specific, brackish residue that can't be so easily abstracted away. All the nice, reusable components sublimate away onto github and npm where everybody can collaborate to advance the commons.

http://substack.net/how_I_write_modules
I typically don't implement features until I need them in my own projects, though sometimes I anticipate something I will need and it gets posted as an issue. This would be an example: https://github.com/fortunejs/fortune/issues/229


Update Kafka reference docs and passwordless migration guide

As title.

@hui1110 , it's better to add link to the PR about MS docs.


rp adapter: support issuer's challenge and proof when presenting the user's consent VC

supporting the issuer's challenge would need a flow that looks roughly like this:

propose-presentation: rp -> issuer
request-presentation (with challenge): issuer -> rp
presentation (with consent VC + challenge): rp -> issuer

and then....

request-presentation (sub thread?): rp -> issuer
presentation: issuer -> rp

When producing VCs and VPs, need to take into account the following

you should not produce a VC from a did document that does not have an asssertionMethod
you should not produce a VP from a did document that does not have an authentication

Source

LD proof now being added in #211
pending challenge/domain and the whole propose-presentation/request-presentation cycle described above.


Allow multiple -compile args

Fixes Cyberpunk's escaped arg string mess
Uses bpaf for argument parsing

Existing Cyberpunk args are "supported" but do nothing
More will need to be added if command arg changes (possibly in different scenarios)

Allows multiple -compile <SOURCE_PATH> args, supporting files or folders
Adds tests for default commands & likely scenarios

lgtm!


WinRM service is restarted when running Set, which breaks the DSC run

When running the resource using
Invoke-DscResource -ModuleName JustEnoughAdministration -Name JeaEndpoint -Method Set -Verbose -Property @{
            EndpointName        = 'Microsoft.PowerShell'
            RoleDefinitions     = "@{ 'CONTOSO\DnsAdmins' = @{ RoleCapabilities = 'DnsAdmin' } }"
            TranscriptDirectory = 'C:\ProgramData\JeaEndpoint\Transcripts'
            ScriptsToProcess    = @('C:\ProgramData\JeaEndpoint\startup.ps1')
            VisibleCmdlets      = "'DnsServer\*',
                @{
                    'Name'       = 'Restart-Service'
                    'Parameters' = @{
                        'Name'        = 'Name'
                        'ValidateSet' = 'Dns'
                    }
                }"
}

At one point it restarts the WinRM service, which then fails the DSC run.
VERBOSE: [SQLTEST]:                            [[JeaEndpoint]DirectResourceAccess] Restarting WinRM service
WARNING: [WSManNetworkFailureDetected] The network connection to localhost has been interrupted. Attempting to reconnect for up to 4 minutes...
WARNING: [WSManConnectionRetryAttempt] Attempting to reconnect to localhost ...
WARNING: [WSManConnectionRetrySucceeded] The network connection to localhost has been restored.
The WS-Management service cannot process the operation. The operation is being attempted on a client session that is unusable.  This may be related to a recent restart of the WS-Management service. Please create a new client ses
sion and retry the operation if re-executing the operation does not have undesired behavior.
    + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : HRESULT 0x803381fa
    + PSComputerName        : localhost

Would it be better to override the restart the service, and instead allow the resource to restart the node using $global:DSCMachineStatus = 1. 🤔

Same problem happens when running with Start-DscConfiguration.

I don't think we should restart the machine -- that's a lot more disruptive than just restarting WinRM. This aspect of our DSC resource is a major pain point. It's avoidable if you use a CimCession that uses the DCOM protocol, but that's obviously atypical.

If a CimCession that uses the DCOM protocol works, then that sounds like a solution. Do you see any other problems using that method?
Typically you use DSC to configure a node to be in a desired state from a clean state(newly deployed). There are several resources that are restarting the node when necessary to get into the correct state, so the configuration can continue after the restart.
When the machine is in desired state then there will be no more restarts by this resource. Unless there are some manually intervention making the configuration not in desired state, then to get the node into desired state again, another restart might be necessary (for example if the endpoint was manually removed). If that is not desired, there could be a parameter added to the resource like Force or RestartWhenRequired to opt-in for restarts. If opt-out, then the resource (Set() method) should throw an error saying it cannot make the node in desired state.

Maybe I misunderstood with the CimSession, I thought you meant that the reosurce should configure the environment using a CimSession? If you meant that running the configuration using a CimSession that would probably not work since the resource should work with Chef, Puppet, running Set() manually etc.
I think the resource must be able to handle this internally regardless how it's started.

I'd rather have the machine reboot than have the service restart, especially with the bug in #31 being a real possibility. If the LCM isn't configured to let the machine reboot whenever it needs to then it won't and we can ensure it logs out a message saying it needs to reboot.

Please ! Please ! Don't make 'reboot' a mandatory thing to change something in a JEA endpoint !
We deploy JEA endpoints and reconfigure them on hundreds of live servers without any problem as:

we use a Pull Server (so the WinRM deconnection is not a thing)
we have a patched version of the resource that workaround the WinRM issue #30
we are aware of issue #31 so we don't use Path resource in the same configuration as JeaEndpoint

If you plan to use a reboot instead of a WinRM restart, please let the user choose this behavior with a parameter ;-)


Send an asset Directly for Editing?

I realize this is a "picker" but of course there are other features here for trimming, cropping, etc. Is it possible to send a video or image asset directly for editing versus having to go through the initial picker flow? In other words to instantiate it with an asset.

I need to do exactly as @Appswage described, can somebody help us?

Did i got it right - you have an Asset. You need to init it like YPImage or YPVideo and present only filters, right?

@NikKovlos exactly, that what I mean, I already have an Asset (photo or video) and I want to use only the filter

@NikKovIos - I would suggest the process looks the same as everything you can do once an asset is selected in the existing process. So this means cropping, trimming and filters. Today you tap on an asset (video or image) and then you can manipulate it. This entry point would essentially start with an already selected asset and from there you can do everything you do as of today. Thanks.

I've never thought of it but it is a very interesting use case indeed :)

Too old issue. Feel free to open new.


Enhancement: PWA / mobile web app UI

This would be a great site to make installable as a PWA for phones etc. Probably related to any other UI work that might be planned. Interested to help around these areas if I can, this is as much a note-to-self to look into as anything else.

One of the PWA features I'm most excited about is the Web Share API.
Right now it's a bit of a hurdle to add a bookmark to Postmarks from Firefox Mobile, and presumably other mobile browsers. It would be really nice to be able the use the native share prompt and select Postmarks (installed PWA) as the share target, which would populate the new bookmark form.

that would be pretty great! I'd be interested in doing this for sure; I think the UI refresh I've discussed with a couple frontend-leaning friends would certainly have mobile in mind more than I did when hacking out the UI we have now. So other than UI improvements this would involve:

setting up the appropriate manifest file
making sure we have appropriately sized images for setting the icon on various platforms
setting up as a "web share target"

anything else that PWAs are capable of that would be interesting? I feel like a lot of the offline/caching stuff is kind of moot since so much of the site is about going out to other parts of the internet-- I think we're out of scope when we start talking about Instapaper-style offline reading.

Agreed about offline stuff. I can't think of any other PWA features that make sense right now.
Happy to pitch in on any part of the PWA setup or frontend work, just let me know.


Support .java source actions in some fashion

by @gorkem from https://github.com/apache/incubator-openwhisk-runtime-java/issues/12#issuecomment-368357302

We should add direct .java invocation to this epic too. I have it already implemented on the devtools repo. [1]. The only reason I did not PR it to here was the gson dependency. Since we are taking care of it with this one, I see no reason not to implement it.
[1] https://github.com/apache/incubator-openwhisk-devtools/tree/master/java-local

by @csantanapr https://github.com/apache/incubator-openwhisk-runtime-java/issues/12#issuecomment-368473079

@gorkem I See no issue on adding .java also
@rabbah do you recall why this was not done originally for Java actions and only .jar?
Maybe the extra latency for compile step on /init too bad or takes longer than 1minute those would be the only two I see, put that’s a problem we have today with swift with single source file it’s convenient for dev/demo but for production is better to have a precompiled to the action
Maybe it’s time again to bring discussion of init actions that will help with compiling and saving the compiled output to the action stamping with runtime image and maybe source on the action this way it only compiled when the source changes or the runtime image changes.

by @csantanapr https://github.com/apache/incubator-openwhisk-runtime-java/issues/12#issuecomment-368484016

Hum 🤔
What about simple one liner functions between sequences  ?
Meaning like to transform output parameters into input parameters in sequences
Maybe there is a OW provider/operator that included libraries and frameworks into a custom runtime
IBM including Watson sdk, COS SDK, Cloudant sdk, http client library
RedHat including spring cloud framework and adapters
Regular user extending a Java runtime with own libraries
Someone offering a UI web based editor useful for demo to edit a java file in web editor assuming that runtime has some useful libraries installed like Jax-rs related ones to handle web actions input.

by @rabbah https://github.com/apache/incubator-openwhisk-runtime-java/issues/12#issuecomment-368486065

It’s nice to have - quick start, demo all good.

by @kameshsampath https://github.com/apache/incubator-openwhisk-runtime-java/issues/12#issuecomment-368492849

This has been my thinking last couple of days in these lines
I am not sure where are storing the jars today when we say wsk action create foo foo.jar --main foo - is it as a blob in couchdb ??
As you mentioned that biggest stuff we need to resolve dependency resolution for Java - wondering we can deploy a Maven Repo Manager as part of the OW deployment, this could solve the above point as well,. Right now the biggest hurdle of Java Adoption is this as functions need to be quick

Hasn't there been a proposal by somebody to have "compiling-actions" where we an action is called on action creation and creates the binary outputs that we today "manually" create in the swift runtime for example.
Would be nice to have a principled approach here.

Hasn't there been a proposal by somebody to have "compiling-actions" where we an action is called on action creation and creates the binary outputs that we today "manually" create in the swift runtime for example.

Yes @markusthoemmes me and others have proposed this I think we keep referring them as "init-actions", "compiled-actions"
Yes it would be nice to have this approach here I agree 💯

@csantanapr @markusthoemmes The current solution compiles a .java into .class in memory and loads it to VM. No real .class files are generated. The approach is suitable for single file and no dependecy actions but nothing else, unless we want to add some known Java libraries to the runtime by default.
I think "init-actions" can be suitable for an actualy maven/gradle build.


Drowsiness Detection to improve Study Efficiency

💥 Proposal
For students studying online, a drowsiness Detection system can be made which alerts the user when he or she starts feeling drowsy and unfocused. This alarm will bring the student to focus back.
The dataset that can be used is :
https://www.kaggle.com/datasets/rakibuleceruet/drowsiness-prediction-dataset
@khusheekapoor
I am a GSSOC '23 contributor. I am really keen to contribute on this project . Kindly assign it to me!

Sir i want to work on this can u assign this me

@KomalT2003 This is a duplicate issue. #153 Check this issue. Since we are following the first-come-first-serve policy, we cannot assign you this issue. However, you can create another issue and use the same algorithm on a different dataset.


[Suggestion] Clean up some controls in circuit editor

To smooth out some features inside the circuit editor, I would like to suggest some changes in the controls.
Right clicking on a component would be more streamlined to delete it.
A middle-mouse click on a component already on the board should switch your active component to be that, similar to how Minecraft itself has a block switching feature to the block you're looking at.
Thanks,
Oky

Now that I'm a bit more familiar with the system I see why you can't use right click, since that is how you go about editing the component when there is no active component. I think the middle-mouse click is still plausible. It saves time to need to go back into the menu again if you already have one on the board.


You can add "root" to the tree structure of the "page". It looks like a bug

I understand that this is more of a typo in the code than a full-fledged bug, but I decided that it should be noticed.

Overall, I really like the idea and architecture of streamsync. I think it will be a very powerful tool in the future and it already looks very cool!
I always wanted such a tool for my work and projects, and I will try to participate in the development and testing

Hi @s4k17 , thanks for bringing this to my attention. I'm glad you like Streamsync!
Can you please tell me how you arrived to this result? Was it through a standard way (e.g. drag and drop, copy and paste) or via editing the file?
If you arrived to this via a standard way I'd definitely consider a bug. If not, I probably wouldn't, but still would like to know and likely issue a warning.

Fixed in v0.1.12, which was just released.


Upgrade cadence dependencies

https://github.com/uber/cadence/blob/master/docker/docker-compose-es-v7.yml
Cadence has now released to 1.x but we are using 0.24.0
We should upgrade it and also upgrade the Kafka images accordingly

We can reference this MR: https://github.com/uber/cadence/commit/4cb4443f6647c730430e1131780e6674f5eed3cf


Package ci-tools within dotmesh

citools is a package used by both dotmesh/tests as well as e2e tests. Currently most changes to citools are to utils that are used by dotmesh acceptance tests, and it's painful to constantly update citools, push and update and re-vendor citools package in dotmesh.
We could probably move citools to a pkg on dotmesh and just vendor that in the e2e tests.

Relatedly, the dind-flexvolume and dind-dynamic-provisioner things under cmd/dotmesh-server/pkg are only used by citools, so should be moved out from under cmd/dotmesh-server to a more suitable location alongside wherever citools ends up!


Enable tracer level tags to be initialised from environment variable

Resolves #214

Codecov Report

Merging #215 into master will increase coverage by 0.07%.
The diff coverage is 72.22%.

@@             Coverage Diff             @@
##             master    #215      +/-   ##
===========================================
+ Coverage     80.43%   80.5%   +0.07%
- Complexity      476     484       +8
===========================================
  Files            79      79
  Lines          1855    1872      +17
  Branches        218     223       +5
===========================================
+ Hits           1492    1507      +15
  Misses          273     273
- Partials         90      92       +2

Impacted Files
Coverage Δ
Complexity Δ

...e/src/main/java/com/uber/jaeger/Configuration.java
78.67% <72.22%> (-1.16%)
27 <6> (+6)

...jaeger/reporters/protocols/ThriftUdpTransport.java
83.05% <0%> (+5.08%)
16% <0%> (+2%)
:arrow_up:

Continue to review full report at Codecov.

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

@yurishkuro Updated.
Currently just treats the tags as string type - wondering whether to check values to see whether number and boolean types should also be handled? Can be done in separate PR.

I don't think it's that critical to recognize the tag types.


Epic: Starlark SDK

[ ] Map out the requirements for the Starlark SDK

Some items in https://github.com/GoogleContainerTools/kpt/issues/2504#issuecomment-919414489 may be related.

Tasks:

[feat]scaffolding: #2392
[docs] Re-write kpt.dev starlark guide
[feat] Define test framework if users contribute to kpt catalog.
[feat] make resource_list.items as strong typed objects (protobuf). This only supports the k8s API types.
[feat] https://github.com/GoogleContainerTools/kpt/issues/2201
[feat] #2350 include-file function (may need a different design than what is proposed)
[refactor/feat] Simplify UX. Currently provides three different ways to call starlark file, we can simplify the UX once include-file is done.
[feat] Provide the kyaml equivalent library that starlark users can load. the Library functions shall be aligned with go SDK library

Bugs:

https://github.com/GoogleContainerTools/kpt/issues/2487

Extensions:

[feat] Support loading KCC as builtin strong typed object (protobuf).
[feat] Support loading customers CRD as builtin strong typed object (protobuf).

[feat] Provide the kyaml equivalent library that starlark users can load. the Library functions shall be aligned with go SDK library

As part of this, we should provide a GVKN matching function, e.g. isGVKN(r, "v1", "ConfigMap", "gcloud-config.kpt.dev") would greatly simplify the starlark function for the value propagation task.


how to plot?

Hello, thank you for your work, is there any code for drawing the result graph at the end?

You can use something like matplotlib. This is also a forked repo from https://github.com/TianhongDai/hindsight-experience-replay.


repo: add CI no_std check

Currently, the CI does not check if this actually builds with no_std. This MR fixes this.
After #98 is fixed, this should be mandatory for all new MRs

@IsaacWoods @phil-opp  I do not have admin rights. Can you please add the build_no_std-CI step to mandatory checks for MRs?
This PR arises from #98 . With this change, we can verify that the crate builds in no_std contexts.


Create repository documentation for reproducibility

Create the readme that documents and reproduces experiments for all the best models

#34


[Bug] UTC Issue Follow-Up

This issue was initially described in #1605 but this ticket is to implement a more sustainable approach that will show times in Exports adjusted to the appropriate local timezone rather than UTC.
Technical Notes:

This may require the addition of a new env variable
This may have been an issue before and there's relevant context here
Will also need feedback from Product on what is the desired behavior

Desired behavior here is to have the export reflect the timezone for where the user is. The timezone should also be noted in the column data. For example, 03-11-2022 02:26:32AM EDT if the report is downloaded in EDT.

This looks good to me.


Implement for_instance on PageLogEntryManager

(From a Slack #support query: https://wagtailcms.slack.com/archives/C81FGJR2S/p1719490591607189)
BaseLogEntryManager leaves for_instance unimplemented, and ModelLogEntryManager implements it but PageLogEntryManager doesn't. The LogActionRegistry.get_logs_for_instance method calls this, which means it fails on page models.
Currently this is only used on generic views, which aren't used by page models (unless they're also registered as a snippet, which isn't really a supported setup) but LogActionRegistry is supposed to work transparently across log models, so this is clearly a bug.

Merged in 6dbae8ca2c33c362148812344c807c43c892a6a2


K8SSAND-1369 ⁃ Certificate rotation for cass-operator

What is missing?
CA certificates cannot currently be rotated without downtime for cass-operator deployed clusters.
We should enable the injection of both old and new certificates during a grace period so that CAs can be rotated smoothly.
┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-1369
┆priority: Medium

Hey team! Please add your planning poker estimate with ZenHub @burmanm @Miles-Garnsey

This one is relatively complex and may benefit from a preliminary research ticket. Estimates are as follows:

2 days on design work to determine how this needs to work and socialise (as there are a few options and the design doc has not been approved+merged.)
4 days to implement a layer of indirection so that a change to the certificates triggers a copy of the existing encryption materials before commencing rotation.
4 days to implement features relating to injecting encryption materials into the truststore and combining them.

Note that I've put estimates at the higher end of the range here but I think they will be roughly accurate once we account for the need for some nuanced test cases.

This work was superseded by other CA work.


[Android] Mouse not working with x11rdp

Description:
When using aFreeRDP (Android Client) with a x11rdp server mouse would be unusable, both with and without external usb-connected mouse -it won't click or won't click in the right spot (i.e.: trying to click on an active dialog opened through console would simply take the dialog's focus but the location of the registered click event itself can't be discerned).
Mouse works alright with other Android apps, like "aRDP Free". Mouse works alright in xrdp-sessman, which is shown before getting to the x11rdp session.
Steps to reproduce:

Connect to a remote x11rdp session
Try to click something in the screen

Connected-to System:
Ubuntu Server v16
File: /etc/xrdp/xrdp.ini
[xrdp7]
name=sesman-X11rdp
lib=libxup.so
username=ask
password=ask
Notice that mouse works alright with x11vnc (libvnc.so). Configuration that works follows:
[xrdp1]
name=sesman-Xvnc
lib=libvnc.so
username=ask
password=ask
ip=<IP_ADDRESS>
port=-1
Expected behavior:
Mouse clicks to be correctly registered as those for x11vnc session, using aFreeRDP.
xfreerdp --version
1.1.0-beta1 (git n/a)

you might want to try the F-Droid version, which is actually more recent than the play store.

That's the version I've got installed - 2.0.0-rc-1 (F-Droid).

Ah, sorry mixed with the xfreerdp version you mentioned.


Publish latest fix to npm

The fix from https://github.com/matthew1232/discord-webhook-node/commit/219126d21f7bae23a890ade110716f30784c0c16 hasn't been published to npm. npm already has a v1.1.1, but that one is from 8 months ago: https://www.npmjs.com/package/discord-webhook-node/v/1.1.1

Nice catch, it looks like the versions got a little mixed up. The latest version is now published @1.1.6.


Multiple when then steps

Hi,
i'm using the SpecFlow.Reporting with the WebApp project and the result looks really great.
But if i'm defining a scenario like this
given a
and b
when click a
then dialog appears
when click ok
then something should happen
the created report has only the static given when then schema, but i would need a given when then when then schema.
So it would be great if you could change this.
I have already done this by cloning your repositories (Reporting and WebApp), but i'm not so familiar with Github and the general "workflow" of pull requests and so on.
So if you would like to see my changes or if i should do a pull request or something else please tell me.

Hey Silv3rcircl3, I am stuck on the same requirement (given when then when then). Would you mind sharing how you extended the code to do this?

Hi,
I'm sorry, but I deleted my fork a few month ago because I switched to MSpec.


Background issues

Hi,
Thanks for releasing this great plugin.
Everything works fine until the iOS app stays in foreground. Watch app and glance get updated with no issues.
If the app goes background or gets killed instead, then the watch will not be able to communicate anymore with the Cordova application.
Thus, for example, if you try to reboot the watch and then launch the watch app you will stay stuck with a black screen. To have it update, you'll have to manually launche the iOS application.

That's unexpected behaviour - it should keep working as long as the Watch can communicate with the Phone (bluetooth on, paired). Are glances of other apps able to update during this time?

Yes, all other apps and glances are working fine.
You can easily reproduce the bug following these steps:

start a blank ionic project (ionic start blank)
configure Xcode project and add your plugin
use your demo as index.html
run the application from Xcode
app will be installed correctly on phone and watch
run the app on the iPhone but NOT on the watch
put iPhone app in background a few seconds after it starts then run the app on the watch
watch screen will be black (bad)
resume app from background and watch screen will be immediately updated

Test #2:

put phone app in background
reboot watch
run app from watch
watch app will stay black until you resume phone app from background

The strange thing is that occasionally I can have it working in both situations even with phone app in background but most of the times it behaves as described in my two test case. I'll be happy to share my project in any case, if needed.
Please note that I'm running iOS 9 GM and watchOS1.

Ah, iOS9 may be the issue then. I smoketested it, but perhaps not this case. Will do today, thx!

Yep, reproduced it on iOS9. Hope to find a solution asap.

Hi @andreground, I've pushed an update to master (0.6.0-dev), could you try that one please?
Make sure to remove applewatch.registerNotifications.. from the demo index.html because it may interfere with this test a little. Will look at that once this has been tackled.

Sure @EddyVerbruggen !
I'll make more deep testing but I can already give you one quick feedback: app seems now surviving background mode but still watch is black if app gets killed or phone is rebooted before starting the app on the watch.
Steps to reproduce:

run the application from Xcode
app will be installed correctly on phone and watch
run the app on the iPhone but NOT on the watch
kill iPhone app and run app from watch

You'll get black app and glance. Same if:

run the application from Xcode
app will be installed correctly on phone and watch
run the app on the iPhone but NOT on the watch
reboot iPhone and run app from watch

If you swipe away from the glance and get back to it, do you then see it? The app needs a little time to spin up the first time after a reboot..

Nope, I see the loader spinning for a few seconds in the upper right of the glance screen but nothing gets pushed from the phone app. Is it the same for you?

No, glances behave the same for me. How are you launching the app to test the glance, and are you gracefully stopping the debugger before killing the app on the phone?

Actually no, I don't gracefully stop the debugger before killing the app...should I?
Concerning app launch, I always run the iPhone app from Xcode while starting the watch one directly by tapping on the watch.

If you kill your app after just having it launch from Xcode, Xcode will 'hang' your app (in my experience). Try pressing 'stop' in Xcode before killing the app.
You can also start the watch app or glance directly from Xcode if you select their respective targets. That's at least what I do to quickly test my changes. It should even save you the trouble of having to kill the phone app.

Good point, I'll try to stop it from Xcode instead of killing it and let you know.
Have you had the same outcomes in both situations I reported a few comments ago?

The behaviour here was ok (not with the 0.5.0 version though). Please also replace your index.html with the one I provided a few comments ago, just to rule out other errors. Thanks for your efforts, much appreciated!

I do appreciate your support very much, thanks!
Btw, I did miss your comment with these two questions:
1)We're both running Xcode 7 GM and iPhone 6 GM with WatchOS 1
Yes, Xcode 7 GM, iPhone 6 on iOS 9 GM with WatchOS 1

We're both starting the app with the WatchKit App target (I've also tested with the Phone App target)
No, I always used Phone as target in Xcode.

Given your outocomes, I'll strip my html down to the one you posted and make another complete round of tests.
My test paths will be:

First round of tests: 100% OK!!!
@EddyVerbruggen Thanks a billion for your effort and for the gold hint about ALWAYS stopping app from Xcode before any phone operation! :+1:

Superawesome! Thanks for your thorough tests, you've helped making this plugin better compatible with iOS9 (and I sneaked in a few small fixes for WatchOS2 as well).
v0.6.0 has been released. :+1:


.net core 2.1

if I put
 <TargetFramework>netcoreapp2.1</TargetFramework>
template using
<#@ template debug="true" hostspecific="true" language="C#" #>
<#@ import namespace="Newtonsoft.Json" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="Microsoft.AspNetCore.Http" #>
<#@ import namespace="Microsoft.AspNetCore.Mvc" #>
<#@ import namespace="Microsoft.AspNetCore.Mvc.ApiExplorer" #>
<#@ import namespace="System.Reflection" #>
<#@ import namespace="Microsoft.AspNetCore.Mvc" #>
<#@ import namespace="System.Text.RegularExpressions" #>
<#@ import namespace="System.Threading.Tasks" #>
<#@ import namespace="System.Reflection" #>
<#@ import namespace="System.Runtime" #>
<#@ import namespace="System.Xml" #>
<#@ import namespace="System.Xml.Linq" #>
<#@ Assembly name="EnvDTE" #>
<#@ output extension=".ts" #>

although I have in .csproj (tried 4.1.1 with same result):
<PackageReference Include="System.Collections" Version="4.3.0" />
im getting following error on 2.1 core when trying to complie template that on .net core 2.0 works

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Collections, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621) ---> System.IO.FileLoadException: Could not load file or assembly 'System.Collections, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL'.

any helpfull ideas?

I update this tool to dotnet core 2.1, please use https://www.myget.org/feed/zeekoget/package/nuget/TextTemplating.Tools/2.2.1-alpha1 . But T4 is really a out of date technology, please consider migrating to https://github.com/filipw/dotnet-script or https://github.com/daveaglick/Scripty

BIG thanks!
Please note that not everybody is willing to rewrite big part of their T4 scripts, especially when this works on .net core, thanks to you again.  T4 is supported in latest VS2017, I dont see it necessary out of date.
In terms of usability, yes there is Roslyn, and those promising projects. However I would like to see more advanced examples scripts and same elegance when it comes to switching between multi-line code and multi-line template text parts using opening and closing tags.. And or t4 to dotnet-script converter, excellent integration etc. etc.

T4 to dotnet-script converter, that is a good idea, I'll have a try on it. :smile:

There are also T4 plugins for vscode and VS.. T4 is official format, new community projects are just trying to find right shape. I hope I ll see more of it solving complex problems.
But how about T4 to dotnet-script internally and getting output there, keeping syntax features. Just brainstorming.)
I would be happy if this project stays in tact with .net core versions.


fix(compat): more accurate behavior of SGR 21

What was changed
Switch const key for SGR 21 to a more widely supported variant.
Rationale
ECMA-48 and most common terminal emulators implement SGR 21 as double underline, which predates SGR 4 underline style extension. This behavior is much more common than "no bold" one.
Currently, x/ansi uses [Nn]oBoldAttr for SGR 21, but the consensus among terminal emulators (and ECMA-48) is to apply double underline or other visual indicator instead.
printf '\e[21mTest\e[m'

Double underline:

ECMA-48
WezTerm (flatpak 20240203-110809-5046fc22)
KDE konsole 23.08.5
Gnome Terminal Version 3.52.0 for GNOME 46 (Using VTE version 0.76.0 +BIDI +GNUTLS +ICU +SYSTEMD)

Single underline or other visual indicator:

xterm (372)
Linux console since Linux 4.17

Normal intensity / no bold:

Linux console before Linux 4.17

Impact

This will break apps using the NoBold function, but x projects do not guarantee backwards compatibility.
After a cursory search, NoBold() does not seem to be used (at least according to GitHub's search) and impact of the change should be minimal.
This requires change in charmbracelet/sequin.

this LGTM
for reference, ghostty also shows double underline, rio does nothing, apple terminal does nothing as well

Perhaps we should remove both NoBold and EcmaDoubleUnderline altogether. You can reset bold attribute using SGR 22 NormalIntensity. Double underline using SGR 21 is not widely implemented and usually, fwict, implemented using the underline extension i.e. SGR 4:n


Dr.Elephant not analysing jobs in EMR core node

Hello,
I'm trying to install/configure Dr.Elephant in one of the EMR core nodes. The core node doesn't have any spark, oozie apps installed as they're installed in Master nodes. In our platform, we're running Spark jobs scheduled via Oozie co-ordinators everyday. Initially we configured Dr.Elephant in master node, it worked fine and everyday jobs are captured/analysed in Dr.Elephant perfectly.
But in configuring in core node, the drelephant service is running but it's not analysing any jobs.
I copied all the confs, jars from the master to the core nodes and set hadoop_home, spark_home accordingly.
Below is the application log.
09-04-2018 08:31:59 WARN  [dr-el-executor-thread-2] com.linkedin.drelephant.ElephantRunner : Add analytic job id [application_1535464521333_3324] into the retry list. 09-04-2018 08:31:59 INFO  [dr-el-executor-thread-2] com.linkedin.drelephant.analysis.AnalyticJobGeneratorHadoop2 : Retry queue size is 7 09-04-2018 08:31:59 INFO  [dr-el-executor-thread-2] com.linkedin.drelephant.ElephantRunner : Analyzing MAPREDUCE application_1535464521333_3313 09-04-2018 08:31:59 ERROR [dr-el-executor-thread-0] com.linkedin.drelephant.ElephantRunner : Could not invoke class com.linkedin.drelephant.schedulers.OozieScheduler 09-04-2018 08:31:59 ERROR [dr-el-executor-thread-0] com.linkedin.drelephant.ElephantRunner : java.lang.RuntimeException: Could not invoke class com.linkedin.drelephant.schedulers.OozieScheduler 	at com.linkedin.drelephant.util.InfoExtractor.getSchedulerInstance(InfoExtractor.java:101) 	at com.linkedin.drelephant.util.InfoExtractor.loadInfo(InfoExtractor.java:126) 	at com.linkedin.drelephant.analysis.AnalyticJob.getAnalysis(AnalyticJob.java:327) 	at com.linkedin.drelephant.ElephantRunner$ExecutorJob.run(ElephantRunner.java:175) 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 	at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.reflect.InvocationTargetException 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 	at com.linkedin.drelephant.util.InfoExtractor.getSchedulerInstance(InfoExtractor.java:84) 	... 8 more Caused by: java.lang.RuntimeException: Failed fetching Oozie workflow 0000965-180827104704635-oozie-oozi-W info 	at com.linkedin.drelephant.schedulers.OozieScheduler.loadInfo(OozieScheduler.java:113) 	at com.linkedin.drelephant.schedulers.OozieScheduler.<init>(OozieScheduler.java:79) 	at com.linkedin.drelephant.schedulers.OozieScheduler.<init>(OozieScheduler.java:64) 	... 13 more Caused by: IO_ERROR : java.io.IOException: Error while connecting Oozie server. No of retries = 4. Exception = Connection refused (Connection refused)
And the dr.log,
[hadoop@ip-10-40-12-181 dr-elephant-2.1.7]$ tailf dr.log SLF4J: Found binding in [jar:file:/opt/dr-elephant-master/dist/dr-elephant-2.1.7/lib/ch.qos.logback.logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/opt/dr-elephant-master/dist/dr-elephant-2.1.7/lib/org.slf4j.slf4j-simple-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/opt/dr-elephant-master/dist/dr-elephant-2.1.7/lib/org.slf4j.slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/lib/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] [info] play - database [default] connected at jdbc:mysql://ireland-all-eu-daap-drelephant-zt.ctw8vnsdkjzr.eu-west-1.rds.amazonaws.com/drelephant?characterEncoding=UTF-8 [info] application - Starting Application... [info] play - Application started (Prod) [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000 Connection exception has occurred [ java.net.ConnectException Connection refused (Connection refused) ]. Trying after 1 sec. Retry count = 1 Connection exception has occurred [ java.net.ConnectException Connection refused (Connection refused) ]. Trying after 2 sec. Retry count = 2 Connection exception has occurred [ java.net.ConnectException Connection refused (Connection refused) ]. Trying after 4 sec. Retry count = 3

Update:
I updated the url of oozie host in app-conf/SchedulerConf.xml replacing localhost with master node ip.

oozie
com.linkedin.drelephant.schedulers.OozieScheduler

http://localhost:11000/oozie

Now the Oozie workflows are getting listed in dr.elephant dashboard, but the spark jobs are not captured.

I don't know if you use the spark version?


Add neoterm strategy

Neoterm provides better customization options for how terminals are spawned in
neovim. It behaves more like Dispatch in that it can send the command to a new
split or an existing split if there is one already open. Neoterm has some built in test
commands but they aren't as good as the ones provided by vim-test. This strategy
allows you to get the best of both worlds.

Cool, thanks! :heart:
There is just one typo in the docs, "deisplay", if you could just correct it :)

I would normally ask you to squash the commits into a single commit, but to save us trouble, I want to try Tim Pope's style of merging PRs.
https://github.com/janko-m/vim-test/commit/45074b87b76aff2c35db3ff03c2c8eaca1660b37


GSSOC'23: Crop Recommendation using Random Forest

💥 Proposal
Prerequisites

I am GSSOC'23 Contributor

Description

This project aim to help the farmers to decides which crop they have to grow in the particular condition and environment
It helps the farmers to get informed decision about the farming strategy
I will use Random Forest model to train the data
The data I will be using is https://www.kaggle.com/datasets/atharvaingle/crop-recommendation-dataset

@khusheekapoor I would like to work upon this , please assign it to me

@Shubhamkumar-op you can go ahead! We are assigning you 21 days for this project, after which it will be assigned to someone else if not completed. All the best!  Name the file as: algorithm_dataset.ipynb and link it in the readme of the labeled directory as algorithm - dataset.


DigitalTwins: Switch to etags, drop tiny Options classes

It's also worth pointing out that we can switch from "<= 6 parameters" simple params to an Options type complex param in the future without breaking if the service adds many more parameters.
Assuming we had something today like:
public void Foo(string id, bool include = false) { ... }

We can switch to an Options bag in the future with:
[EditorBrowsable(Never)]
public void Foo(string id, bool include) { ... } // note: default value removed

public void Foo(string id, FooOptions options = default) { ... }

public class FooOptions
{
    public bool Include { get; set; }
    public string Random { get; set; }
    // + more new params...
}

And it would not be a breaking change.  Customers will continue to compile, upgrading without recompile is fine, etc.  We'd only see the new signature in intellisense and documentation so new customers would always start there.  The only pain is customers wanting to use the new Random property would have to switch from Foo(id, include: true) to Foo(id, new FooOptions { Include = true, Random = "..." }).  We consider that acceptable and have done it often in other services like Storage.


What kind of Machine Learning's Algorithn ChatterBot use?

Hi,
I was wondering what kind of algorithm you guys use for train a dataset to create chatbot?.

https://chatterbot.readthedocs.io/en/stable/faq.html#what-kinds-of-machine-learning-does-chatterbot-use


fixing ol list style

This PR will fix the issue with ol list, due to recent changes of #145 the styles were broken for ol.
Signed-off-by: Rakesh PR<EMAIL_ADDRESS>

screenshots
before:

after:


New arguments for Postgresql.Database function

I was very happy to come across the following news today:
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-august-2019-feature-summary/#postgresql
Yay! That said, will you be expanding on the documentation for the data source here:
https://docs.microsoft.com/en-us/powerquery-m/postgresql-database
And potentially allow us to expand on this connector similar to the odbc.datasource function?
The target that I have in mind requires me to specify sslmode=require and I would like to append that via custom connector if not built into the native connector directly.
Thanks!

At some point it will be possible to wrap the PostgreSQL connector in another connector, but we do not currently expect that this would allow you to change the connection string.
We already set sslmode=require on the connection string. If the connection fails, the user is prompted for whether to fall back to unencrypted. If they answer in the affirmative, we then use a connection string of sslmode=disable. The server certificate must currently be signed by a CA chain known to the Windows credential store in order for it to be used for the connection.

What kind of additional documentation are you looking for?


go/staking: include LastBlockFees in genesis

Will this break dump/restore?

yeah in the first begin block the GetLastCommitInfo will have no votes, so we probably need to also carry over that as well? (or handle differently the initial fee disbursement)


SPFx service worker ignores Cache-Control HTTP header for JavaScript bundles from CDN and loads old files

1### Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested

[ ] 💥 Internet Explorer
[X] 💥 Microsoft Edge
[X] 💥 Google Chrome
[X] 💥 FireFox
[ ] 💥 Safari
[ ] mobile (iOS/iPadOS)
[ ] mobile (Android)
[ ] not applicable
[ ] other (enter in the "Additional environment details" area below)

Additional environment details
SPFx: 1.18.2
SPFx file versions on my tenant:
https://res-1.cdn.office.net/files/odsp-web-prod_2024-11-01.005/spserviceworker.js
https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_8c7071cb898dfe247cb5cd85d48a845e.js
https://res-1.cdn.office.net/files/odsp-web-prod_2024-11-01.005/spwebworker.js
Describe the bug / error
We have a SPFx solution where .js files are hosted on a custom azure web site. We use Cache-Control and max-age to control the cache expiration and to force SPFx to re-load newer versions of .js files when the cache is expired. Starting from the end of October or from the beginning of November this solution stopped working.
Now SPFx service worker never fetches the newer version of .js file and instead always uses the version cached originally.
However, it works well for SPFx resource files, in this case it follows max-age settings and correctly requests content from the web server, when there is a cache expiration.
Here is the sample wrong request, where the main .js bundle was cached yesterday (November, 11), but the newer version is never requested, despite that max-age is only 3 minutes:

Here is the correct request for resource file, which is cached only for 3 minutes and is requested after expiration:

I tried a hard reload in browser, in this case it returns the right file loaded from the web server, but on every subsequent normal page refresh it again returns the cached version.
Of course, we can change a file name to be unique, or a path to our .js bundle on a web server, but it requires a .sppkg re-deployment for all customers on every change, and that's what we'r trying to avoid by implementing HTTP caching approach.
Steps to reproduce

Configure SPFx solution to be hosted on an external CDN or an Azure web site.
Configure Cache-Control HTTP header for JavaScript files served from Azure. Set cache expiration (max-age) to any meaningful value.
After cache entry is expired, new .js file is never requested. It's reproducible only for main .js bundle file from SPFx build

Expected behavior
After the cache is expired, SPFx services worker fetched a new version of the .js file from the web server.

UPD
we managed to work around this issue by introducing access-control-expose-headers: * header as Alex suggests in the similar issue 2 years ago here (but we just use wildcard). With this header everything seems to work as expected, meaning sp service worker respects cache-control settings.
I'm just not sure if it's ok to have it as a long term solution, and if there is a bug on sp service worker side or not.


How to handle conflict clause in association upsert?

Context and question
I'm using Gorm v1 in my project and I'm currently migrating from the v1 to the v2 (v1.20.2). I've migrated my code quite smoothly so far, but now I'm struggling with associations.
Here is my use case:
package main

import (
	"gorm.io/driver/mysql"
	"gorm.io/gorm" // v1.20.2
)

type User struct {
	ID        string    `gorm:"primaryKey"`
	Emails    []Email   `gorm:"foreignKey:User"`
}

type Email struct {
	ID       string `gorm:"primaryKey`
	User     string
	Address  string `gorm:"not null;uniqueIndex"`
}

func main() {
	entity := User{
		Emails: []Email{
			Email{Address: "foo@bar"},
		},
	}
	db, _ = gorm.Open(
		mysql.New(mysql.Config{DSN: "<my.db.info>"}),
		&gorm.Config{},
	)
	db.Debug().Create(&entity)
}

When I'm creating a new User{}, with 1 Email{}, I'm expecting the upsert query to add 1 user and 1 emails in my database, which is actually done as expected. And since I've defined the Address field of my Email{} model as a unique index, I can't have 2 emails with the same address. Hence, running the Create() method twice with this same entity as parameter needs to return an error.
But Gorm v2 adds a ON DUPLICATE KEY UPDATE clause while doing an upsert on associations (in my case that's a has-many association, but I've noticed the same behaviour on other kind of associations). Therefore, where I'm running the Create() method twice with this same entity as parameter, a new user is created and the existing emails are associated to this new user.
INSERT INTO `emails` (`id`,`user`,`address``) VALUES ('email_1','user_1','foo@bar') ON DUPLICATE KEY UPDATE `user`=VALUES(`user`)
INSERT INTO `users` (`id`) VALUES ('user_1') ON DUPLICATE KEY UPDATE `id`=`id`

Here is my question: how can I get an error while creating an entity that have conflicting associations instead of resolving the conflict by updating the foreign key?
Documents and experimentations
According to the documentation:

GORM V2 will use upsert to save associations when creating/updating a record

As described in the upsert section, I tried to used clause.OnConflict:
db.Debug().Clauses(clause.OnConflict{DoNothing: true}).Create(&entity)

But I got the same results:
INSERT INTO `emails` (`id`,`user`,`address``) VALUES ('email_1','user_1','foo@bar') ON DUPLICATE KEY UPDATE `user`=VALUES(`user`)
INSERT INTO `users` (`id`) VALUES ('user_1') ON DUPLICATE KEY UPDATE `id`=`id`

I don't know if that's a bug, or I'm not using it correctly.
Should I use .Omit() method described in this documentation instead?

Begin new transaction
Create the user tx.Omit("Emails").Create(&entity)
Manually set the user ID in my emails
Bulk insert my emails
Commit the transaction

Thank you.

how can I get an error while creating an entity that have conflicting associations instead of resolving the conflict by updating the foreign key?

Which is not supported and I think most cases, this is the correct behaviour or you should remove the unique check or check the data issue before the inserting...

But for your case, you could disable the Emails field's create permission in your user struct definition and create them in user's after create hooks.

@jinzhu I've got a similar issue
The issue is in the insert statement the On Conflict clause is generated with only a single primaryKey
// Main struct
type BaseEntity struct {
	ID string `gorm:"primaryKey;not null"`
	Buckets []*xfs.Bucket `gorm:"polymorphic:Entity"`
	EntityType string `gorm:"-"`
        ...
}

// Association struct
type Bucket struct {
	CreatedAt   time.Time
	UpdatedAt   time.Time
	DeletedAt   gorm.DeletedAt `gorm:"index"`
	XFileSystem `gorm:"embedded"`
        // Have a composite primary key with two fields ID, EntityID
	ID         string `gorm:"uniqueIndex:buk_ent_idx;primaryKey"`
	EntityID   string `gorm:"uniqueIndex:buk_ent_idx;primaryKey"`
	EntityType string `gorm:"uniqueIndex:buk_ent_idx;"`
}

But the generated SQL is this
When I'm creating a main object db.Create(&BaseEntity{})
INSERT INTO "buckets" ("created_at","updated_at","deleted_at","id","entity_id","entity_type")
VALUES
(........., 'default','phano1605697835','users') ,
(........,'default-1','phano1605697835','users'),
(........,'default-2','phano1605697835','users')
ON CONFLICT ("id") // here
DO UPDATE SET "entity_type"="excluded"."entity_type","entity_id"="excluded"."entity_id"

It says ON CONFLICT ("id") but shouldn't it say ON CONFLICT ("id", "entity_id")? Because ID, EntityID together is the primary key

I was able to find a work around for now
func (b *Bucket) BeforeCreate(tx *gorm.DB) (err error) {
	cols := []clause.Column{}
	colsNames := []string{}
	for _, field := range tx.Statement.Schema.PrimaryFields {
		cols = append(cols, clause.Column{Name: field.DBName})
		colsNames = append(colsNames, field.DBName)
	}
	tx.Statement.AddClause(clause.OnConflict{
		Columns:   cols,
		DoUpdates: clause.AssignmentColumns(colsNames),
	})
	return nil
}

Thankfully BeforeCreate works for Associations (Which seems obvious now after many hours of me hacking around)

I found this issue in trying to investigate a similar problem - but found that even though the BeforeCreate is called, when the entity that has the many-to-many relationship is persisted, the DoNothing clauses aren't applied.   Did you have to do anything else to get the hook to work?

I filed a PR via Playground and created an issue.

The issue is in the insert statement the On Conflict clause is generated with only a single primaryKey

Seeing this too for an intersection table and it's unfortunate


Add unit tests for sf::Time

Thanks a lot for making a contribution to SFML! 🙂
Before you create the pull request, we ask you to check the follow boxes. (For small changes not everything needs to ticked, but the more the better!)

[ ] Has this change been discussed on the forum or in an issue before?
[x] Does the code follow the SFML Code Style Guide?
[ ] Have you provided some example/test code for your changes?
[ ] If you have additional steps which need to be performed list them as tasks!

Description
I added unit tests for sf::Time. The goal was to cover every public API call with a couple basic assertions to prevent regressions.
Tasks

[ ] Tested on Linux
[ ] Tested on Windows
[x] Tested on macOS
[ ] Tested on iOS
[ ] Tested on Android

SFMLBuildMaster: Build this please.

I see a lot of overloads of Catch::toString in some test utilities files but reading through the Catch docs and observing what happens when tests fail, they appear to not be working. I wonder if we can remove those. Adding operator << for the types being tested does seem to work though. Those overloads can easily be added to the .cpp file containing the tests which means not having to maintain these accessory utilities files.

The MinGW builds succeeded! A Window job was failing on an OpenGL example. I saw Vittorio fixed that so I rebased this branch to include that commit. I expect the whole pipeline to pass after this.

SFMLBuildMaster: Build this please.

SFMLBuildMaster: Build this please.

@phgroe was more correct than I had originally thought. We are getting weird floating point issues but only in one MinGW build. The errors manifest in the form of single-microsecond differences between the expected and actual values. Nothing drastic but still worth looking into.
In src/SFML/System/Time.cpp:171:
Time operator *(Time left, float right)
{
    return seconds(left.asSeconds() * right);
}

we're multiplying a Time times a value in terms of decimal seconds which is not the fundamental unit for time. Shouldn't all time calculation be implemented in terms of the underlying type, which is in this case sf::Int64? That way we minimize the number of floating point errors that can be accumulated and instead do more integral operations which are better defined between platforms. By saying all times are fundamentally microseconds, we're implying that sub-microsecond times are free to be truncated and ignored so it seems safe to do all calculations in those terms and leaving the floating point representation and merely a convenience to users at the API boundary.

SFMLBuildMaster: Build this please.

SFMLBuildMaster: Build this please.

SFMLBuildMaster: Build this please.

SFMLBuildMaster: Build this please.

C:\Dev\worker\windows-gcc-810-mingw-32\build\test\src\System\Time.cpp:176: FAILED:
  CHECK( sf::milliseconds(10) / sf::microseconds(1) == Approx(10'000.0f).epsilon(1e-9f) )
with expansion:
  10000.0f == Approx( 10000.0 )

I'm still struggling with the 32 bit MinGW build. I'm not sure how to determine the difference between the expected and actual values. I'm also not sure if I'm misusing Catch2's approximate matchers. For now I'll keep dropping that epsilon by a few orders of magnitude until that test passes. Hopefully someone who knows Catch2 better can help me test this in the best way possible.

@binary1248 @eXpl0it3r: how about we stop supporting 32-bit altogether? Almost no one is using it, see Steam hardware surveys. I will create an issue.

C:\Dev\worker\windows-gcc-810-mingw-32\build\test\src\System\Time.cpp:176: FAILED:
  CHECK( sf::milliseconds(10) / sf::microseconds(1) == Approx(10'000.0f).epsilon(1e-9f) )
with expansion:
  10000.0f == Approx( 10000.0 )

I'm still struggling with the 32 bit MinGW build. I'm not sure how to determine the difference between the expected and actual values. I'm also not sure if I'm misusing Catch2's approximate matchers. For now I'll keep dropping that epsilon by a few orders of magnitude until that test passes. Hopefully someone who knows Catch2 better can help me test this in the best way possible.

I wouldn't worry too much about being "perfect" here -- these are just unit tests. If you find a reasonable epsilon that works on both architectures then I'd be fine with it.

SFMLBuildMaster: Build this please.

CI finally passes! An epsilon of 1e-6 did the trick for that 32 bit MinGW build.


Vulnerability roundup 84: fontforge-20190801: 3 advisories

search, files

[ ] CVE-2019-15785 CVSSv3=9.8 (nixos-unstable)
[ ] CVE-2020-5395 CVSSv3=8.8 (nixos-unstable)
[ ] CVE-2020-5496 CVSSv3=8.8 (nixos-unstable)

Scanned versions: nixos-unstable: 0f5ce2fac0c. May contain false positives.

CVE-2019-15785 is for version 20190813 to 20190820. This is 20190801, so it's not affected.
The other two CVEs don't seem to be fixed yet. Upstream issue: https://github.com/fontforge/fontforge/issues/3123. See also the issue on the debian issue tracker.

I agree that CVE-2019-15785 doesn't affect us. Is there any way to whitelist non-affecting CVEs?

@puzzlewolf I think we are affected by CVE-2019-15785.
@erictapen Each CVE is reported only once, so no action required in this case.


Use a queue to early merge changes during aggregation

Description
This uses a ChangesQueue to aggregate changes in the aggregation tree in a breath-first order. The queue also merges changes to the same node early on and avoids bubbling up multiple changes along a whole branch.
Testing Instructions

Closing as stale since Turbopack is no longer in this repo!


Center author avatar?

Description
What is the best way to center (horizontally) that author avatar within the sidebar? I've have tried several things, but non of them seem to work.
Environment

Minimal Mistakes version:
Ruby gem or remote theme version:
Jekyll version:
Git repository URL: https://github.com/davidlcassidy/davidlcassidy.github.io
Operating system:
GitHub Pages hosted (if yes provide URL to site): https://davidlcassidy.github.io

Expected behavior
Author avatar is centered within sidebar.
Steps to reproduce the behavior

With CSS. You'll have to add something like margin: auto and display: block to .author__avatar img in _sass/minimal-mistakes/_sidebar.scss.
.author__avatar img {
    margin: auto;
    display: block;
}

Ah I had it outside img. That works. Thanks!


MicroProfile Opentracing 2.0

Microprofile Opentracing upgraded to v.2.0.
Resolves #2637

I have changed the target to Helidon 3.0, as the TCK tests should depend on Config 2.0

I have changed the target to Helidon 3.0, as the TCK tests should depend on Config 2.0