Update version of expensify-common

Details

Fixed Issues
$ https://github.com/Expensify/App/issues/16633
PROPOSAL: https://github.com/Expensify/App/issues/16633#issuecomment-1488412379
Tests

Go to a chat
Send a link with uppercase letter in https, like

Https://www.google.com

Click the sent link
Verify the link can be opened correctly in Browser

[ ] Verify that no errors appear in the JS console

Offline tests

QA Steps
Same as test.

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
https://user-images.githubusercontent.com/117511920/229737341-f410b55b-7190-4a49-9dc7-9aaa0d4857a4.mov

Mobile Web - Chrome
mobile-chrome.webm

Mobile Web - Safari
https://user-images.githubusercontent.com/117511920/229737481-9c549f28-cc8f-42bf-8b73-0491f5a9c182.mp4

Desktop
https://user-images.githubusercontent.com/117511920/229737543-b62d7d32-dd1e-49e0-b542-787e44b87f22.mp4

iOS
https://user-images.githubusercontent.com/117511920/229737588-bd640003-5398-4fc7-94f7-584a90098704.mp4

Android
https://user-images.githubusercontent.com/117511920/229737638-bc6f8284-3340-4ef5-9e81-4a13745bbacc.mp4

@aldo-expensify @thesahindia One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

Thanks for the quick work @thesahindia adn @eh2077!

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/aldo-expensify in version: 1.2.97-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/francoisl in version: 1.2.97-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


CI: The 'test_android' step always fails due to a robolectric path mismatch.

Description
The docker-build-android step running in CI now fails the test due to a robolectric path mismatch as:

https://app.circleci.com/pipelines/github/facebook/react-native/9139/workflows/09348fbd-b53a-4fbe-a2f9-9dcc8ed6aed5/jobs/202029
https://app.circleci.com/pipelines/github/facebook/react-native/9137/workflows/100d83cf-6187-42df-8f73-9081854e976f/jobs/202009.

It seems that Changed from third-party/java/robolectric/4.4:robolectric to third-party/java/robolectric:robolectric by https://github.com/facebook/react-native/commit/0aa1aa6cc2f1b4d13ea068c01f9de08ba7132f53 But it crashes because the path does not exist.
React Native version:
I will omit it because it is not a version issue.
Steps To Reproduce
（This issue also can be reproduced in the local environment.）

Pull the latest and install deps.
Run docker-setup-android then docker-build-android.
Prints an error similar to the code example section.

Expected Results
The robolectric path can be resolved correctly.
Snack, code example, screenshot, or link to a repository:
The following error is output.
#!/bin/bash -eo pipefail
./scripts/circleci/buck_fetch.sh
+ retry 3 buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
+ local retries=3
+ shift
+ local count=0
+ buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
Not using buckd because watchman isn't installed.
Picked up _JAVA_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
No build file at ReactAndroid/src/main/third-party/java/robolectric/BUCK when resolving target //ReactAndroid/src/main/third-party/java/robolectric:robolectric.

This error happened while trying to get dependency '//ReactAndroid/src/main/third-party/java/robolectric:robolectric' of target '//ReactAndroid/src/test/java/com/facebook/react/modules:modules'
+ exit=1
+ wait=1
+ count=1
+ '[' 1 -lt 3 ']'
+ echo 'Retry 1/3 exited 1, retrying in 1 seconds...'
Retry 1/3 exited 1, retrying in 1 seconds...
+ sleep 1
+ buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
Not using buckd because watchman isn't installed.
Picked up _JAVA_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
No build file at ReactAndroid/src/main/third-party/java/robolectric/BUCK when resolving target //ReactAndroid/src/main/third-party/java/robolectric:robolectric.

This error happened while trying to get dependency '//ReactAndroid/src/main/third-party/java/robolectric:robolectric' of target '//ReactAndroid/src/test/java/com/facebook/react/modules:modules'
+ exit=1
+ wait=2
+ count=2
+ '[' 2 -lt 3 ']'
+ echo 'Retry 2/3 exited 1, retrying in 2 seconds...'
Retry 2/3 exited 1, retrying in 2 seconds...
+ sleep 2
+ buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
Not using buckd because watchman isn't installed.
Picked up _JAVA_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
No build file at ReactAndroid/src/main/third-party/java/robolectric/BUCK when resolving target //ReactAndroid/src/main/third-party/java/robolectric:robolectric.

This error happened while trying to get dependency '//ReactAndroid/src/main/third-party/java/robolectric:robolectric' of target '//ReactAndroid/src/test/java/com/facebook/react/modules:modules'
+ exit=1
+ wait=4
+ count=3
+ '[' 3 -lt 3 ']'
+ echo 'Retry 3/3 exited 1, no more retries left.'
Retry 3/3 exited 1, no more retries left.
+ return 1

Exited with code exit status 1
CircleCI received exit code 1

Closing as this is now solved


LiDAR sweeps

Hello,
I am wondering how many LiDAR sweeps you utilise in your best-performing C+L model.

1+9

BTW, we uploaded a new version on arxiv, which contains all the relevant details of model training.


[TASK] Brain storm needed regarding target and source in git - Deploy.js

Question: What should we do on master git branch when running deploy?

[ ] Update the source;
[ ] Update the target;
[ ] Update both;

Duplicate of #130


Unit Tests

We need unit tests for critical parts of the PIV calculations and the app.

We should use the uniform shear images for unit tests.


Disable Style/FormatString cop

The reason given for this rule in the style guide ( https://rubystyle.guide/#sprintf ) is that the String#% method is "fairly cryptic", which I suppose is true, but I think it's a method worth becoming familiar with, and, once one does that, then I think it's pleasantly concise and no longer very cryptic.

For the sake of consistency, I considered keeping this cop enabled with EnforcedStyle: percent, but I don't know that I really want to restrict style in that way. There might be some situations where format might seem preferable. Also, it seems that RuboCop wasn't able to autocorrect when it complained to me about violating this cop (even though the docs seem to claim that autocorrection will always work).


Add API template

Problem
Currently the definition of the API is left open and has no instructions. This can lead to unsecure, bad and trivial solutions.
Solution
It would be best to have a concrete template of an API that is easy to fill / complete for any algorithm.
Or, at least link to general API instructions of the city.

API for ML model client. A client sends feature vectors to the ML model and in return receives predicted label for each feature vector. Additional information may also be provided to the client, such as confidence estimates for the predictions.
There must be option to secure the API so that use can be limited securely.

At the moment api requires pickled schema objects in order to generate proper API documentation using openapi tools together with swagger. Schema is obtained using pandera library, and that brings extra step to ml template. However, I will research if we could collect similar information from model class itself in order to generate api classes. My goal is to build such api module that does not require any configuration by ML template user.


What are languages used to create pv?

hello i am using pv on my web site.
and i have few aks
i would like to know  if you use python 3.0?
javascript, php, html? What type of file is sh?
I am french, and i am interesting by this type of software.

Hi Jeremie,
most of PV is written in JavaScript (around 15k lines of code).  There are also a few python scripts in the repository. I'm still more proficient in Python than I am in JavaScript that's why I've chosen to write a few glue  scripts in Python rather than using node.js. If you are starting anew, it's probably best to just stick to JavaScript and not mix all kind of languages together.
I hope that answers your questions.
Best,
Marco

yes, thanks for fast answer, i don't know python, i work a little in pure js, in php,  css, i began to read webgl doc, and i know html of course.


 The code leaves a space on the first cell of the column sheet and reads the letters from the 0th row, causing it to make an error that it can't turn a string into a float. I also receive a sizing error, saying that I cant resize an array of 2600 into (51,51,1). Is there a way to go about this?
Best Regards,
Hanifah

Can you send your xlsx file to my email<EMAIL_ADDRESS>I will test this file.

I used the same file provided in the test file folder. It was the one demonstrated in the manual


[question] dynamic manipulation of trees

I am a bit lost when using tree / hierarchy in interactive dynamic context.
Similar to this project I am trying to migrate in v5:
http://bl.ocks.org/robschmuecker/7880033
In a dynamic context, since it should be data driven, I suppose I have to dynamically update my initial data and each time recompute the whole graph ?
It is a bit confusing , because I was thinking that I could modify the tree and the data will be updated automatically, but that does not seem being.
Please can you highlights which way I should use it in a dynamic context.
Thanks.

If I understand your question right: yes, it's possible to update hierarchy dynamically.
Let's say that you are loading all children for the expandable node from the server. You are calling load function on click event and then adding request data to the "data" property for the expandable node. After that, you are calling expandNode function and update the chart.
`function expandNode(expandableNode) {
const allChildren = expandableNode.data.children;
const newHierarchyChildren = [];
// create array of the nodes that we can add to the tree
allChildren.forEach((child: DendrogramModel) => {
  const newNode = d3.hierarchy(child); // create a node
  newNode.depth = expandableNode.depth + 1; // update depth depends on parent
  newNode.height = expandableNode.height;
  newNode.parent = expandableNode; // set parent
  newNode.id = String(child.id); // set uniq id

  newHierarchyChildren.push(newNode);
});

// add to the parent's children array and collapse
expandableNode.children = newHierarchyChildren;
expandableNode._children = newHierarchyChildren;

this.update(expandableNode);

}`

If I understand your question right: yes, it's possible to update hierarchy dynamically.
Let's say that you are loading all children for the expandable node from the server. You are calling load function on click event and then adding response data to the "data" property for the expandable node. After that, you are calling expandNode function and update the chart.
function expandNode(expandableNode) {
   const allChildren = expandableNode.data.children;
   const newHierarchyChildren = [];

   // create array of the nodes that we can add to the tree
   allChildren.forEach((child) => {
     const newNode = d3.hierarchy(child); // create a node
     newNode.depth = expandableNode.depth + 1; // update depth depends on parent
     newNode.height = expandableNode.height;
     newNode.parent = expandableNode; // set parent
     newNode.id = String(child.id); // set uniq id

     newHierarchyChildren.push(newNode);
   });

   // add to the parent's children array and collapse
   expandableNode.children = newHierarchyChildren;
   expandableNode._children = newHierarchyChildren;

   this.update(expandableNode);
}

Is there any other ways to do it? It shouldn't be a difficult job to add a function like d3.hierarchy.addChildren(index, children)

Yeah, d3-hierarchy doesn’t really support mutation of the hierarchy right now, but you can do it “in data” and then reconstruct the tree using d3.hierarchy(data).
It’s fairly easy to detach and re-attach parts of the tree in the same place by manipulating the children array as shown above. But this can easily result in node.height that is inaccurate when the children have been removed, for example.
So, we could have methods like node.add(child), node.remove(child), node.addAll(children) and node.removeAll(), which update the entire hierarchy as appropriate.
That said, I find immutability tends to be cleaner than mutation, so we might think about designing the API to return new trees rather than modifying them in-place. For example, if node.sum returned a copy of the tree, then you could easily pass the same node to multiple hierarchical layouts with different methods of summation and they would co-exist happily. But immutability has a cost, too: by nature of the bidirectional parent-child links you’d then have to copy the entire tree right, and that could be prohibitive for large trees.
At any rate, currently your options are:

Derive an entirely new tree by calling d3.hierarchy after modifying your data (or passing in a different children accessor function to do filtering).

Modify the children of a given node as desired, but remembering to recompute node.height of all ascendants as appropriate, and the like for any other node properties.

I don't know if this is waterproof, but it looks like you can update the hierarchy with a little trick:
// merge hierarchy B in hierarchy A as child of nodeA

 B.parent = nodeOfA;
 nodeOfA.children.push(B);
 A = d3.hierarchy(A);
 A.each((d) => (d.data = { ...d.data.data, children: d.children }));  // fix glitch that this methode of merging produces

See: https://observablehq.com/d/c2df560e9434151d


TO Golang: Updated ParseDBError

What does this PR do?
This PR updates parsing uniqueness errors,
adds parsing for fk constraint errors,
adds parsing for not null constraint errors
When verifying this PR, I recommend running the same tests on master.
Which TC components are affected by this PR?

[ ] Documentation
[ ] Grove
[ ] Traffic Analytics
[ ] Traffic Monitor
[x] Traffic Ops
[ ] Traffic Ops ORT
[ ] Traffic Portal
[ ] Traffic Router
[ ] Traffic Stats
[ ] Traffic Vault
[ ] Other _________

What is the best way to verify this PR?
Testing not null constraint:
curl -XPOST -Lvsk --cookie $mc 'https://localhost:6443/api/1.3/cdns' -d @cdn.json | jq
{
    "name": "cdn-test",
    "domainName": "new-name"
}

{
    "alerts": [
        {
            "text": "dnssecEnabled is a required field",
            "level": "error"
        }
    ]
}

Testing uniqueness constraint error:
{
    "name": "cdn-test",
    "domainName": "new-name",
    "dnssecEnabled": false
}

Post the above twice, you should get the following:
{
    "alerts": [
        {
            "text": "name cdn-test already exists.",
            "level": "error"
        }
    ]
}

Testing foreign keys:
curl -XPOST -Lvsk --cookie $mc 'https://localhost:6443/api/1.3/origins' -d @origin.json | jq
{
    "cachegroupId": 1,
    "coordinateId": 1,
    "deliveryServiceId": 1,
    "fqdn": "foo.example.com",
    "id": 1,
    "ip6Address": "cafe:dead:d0d0::42",
    "ipAddress": "<IP_ADDRESS>",
    "name": "origin1",
    "port": 443,
    "profileId": 1,
    "protocol": "https",
    "tenantId": 1
}

{
    "alerts": [
        {
            "text": "deliveryservice not found",
            "level": "error"
        }
    ]
}

Check all that apply

[ ] This PR includes tests
[ ] This PR includes documentation updates
[ ] This PR includes an update to CHANGELOG.md
[ ] This PR includes all required license headers
[ ] This PR includes a database migration (ensure that migration sequence is correct)
[ ] This PR fixes a serious security flaw. Read more: www.apache.org/security

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2472/
Test PASSed.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2475/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2476/
Test FAILed.

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2478/
Test FAILed.


Add a URL for this GitHub repo's description

Example:

Now added a package.json file to this repo.


docs: "Installing on Windows" rendering

Got some raw markdown and what looks like mis-rendering in the "installing on Windows" doc page.

Renders fine on the GitHub page

Hi!  Just to say that I have been working on #2280 and have fixed this doc issue too on my computer by removing the indent.  I will make a push soon.
That said, this perplexes me: Is such indented paragraphs, including the indented headings, supposed to be supported by Blackfriday (or with the github_flavored_markdown extension) and/or Mmark?  (Sorry, I haven't looked into this in detail.)
What do you think, @shurcooL and @miekg?  Many thanks for your insights.

It's a known difference between blackfriday rendering and that of GitHub.com. Blackfriday requires list entries that consist of multiple paragraphs to be indented by at least 4 spaces or a single tab, whereas GitHub.com markdown renderer is happy with only 2 spaces.

Thank you @shurcooL for your quick response and great insight.  Per your explanation, I have fixed the rendering issue by changing the 2-space indents to a 4-space indents, and they are now rendered correctly.
The corrected page is now live at https://gohugo.io/tutorials/installing-on-windows/#less-technical-users


Status code 304 return 220

Hi,
I've got a RESTfull server and I'm trying to use ETag along with SwiftHTTP.
When my server returns a 304 (not modified) for some reason SwiftHTTP sees 200 as the status code.
I use httpResponse.description to display the information about the response.
Are you seeing the same thing on your side.
Cheers, Manuel

I am able to give you more details on this.This was due to the default cache policy (UseProtocolCachePolicy) set on the HTTPRequestSerializer
public var cachePolicy: NSURLRequestCachePolicy = NSURLRequestCachePolicy. UseProtocolCachePolicy

Changing this to ReloadIgnoringLocalCacheData fix the issue.
From HTTPTask.swift
if let code = serialResponse.statusCode where serialResponse.statusCode > 299 {
    serialResponse.error = self.createError(code)
}

Also you are considering that if any status code greater than 299 is an error. Which is wrong (I think), it must be 399.

Alright good to know changing the cache fixed it. As far as the 299 status code is because NSURLSession automatically follows 300 redirects, so if you get a 301 back, that is probably not the expected behavior (too many redirects). I know it seems weird but makes sense with how the API works.


Fix LinkedIn profile link for speaker

I was just going through the schedule to decide which talks to attend and noticed a broken link on https://ep2024.europython.eu/speaker/michal-rokita to the LinkedIn profile of the speaker.
Not sure this way is how you want such suggestions and fixes to be reported, but I thought I'd give it a go as quick and easy option  without creating an issue or writing an email to the organiser.

Hi @goetzb!
Speaker, session, and schedule pages are automatically built and updated; so changing them here won't resolve the issue, it needs to be fixed in the source.
The data that is used to build these pages are created by this project.
I'll look into why this happened. Thank you again for reporting the bug!

Speaker, session, and schedule pages are automatically built and updated; so changing them here won't resolve the issue, it needs to be fixed in the source.
The data that is used to build these pages are created by this project.

Thanks @egeakman, I had a suspicion that there's more to it than some Astro collection, but as I spotted it here, I thought it's worth a try - and you now know about it :)

Thanks @egeakman, I had a suspicion that there's more to it than some Astro collection, but as I spotted it here, I thought it's worth a try - and you now know about it :)

Yes! Thanks for spotting it!
I opened a PR to fix the double linkedin.com in the URL: https://github.com/EuroPython/programapi/pull/52

It should be fixed now! Thanks for reporting :slightly_smiling_face:


RectButton borderTopLeftRadius

Style props borderTopRightRadius, borderBottomLeftRadius, borderBottomRightRadius, borderTopLeftRadius not works for ReactButton.

Hello @Bardiamist
Yes, it does not work and we're sorry for it. However, I see not point for copying every single prop implementation and and not going to add this specific one.
https://github.com/kmagiera/react-native-gesture-handler/blob/master/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.java#L114
It should be regarded as limitation of this library, but it does not mean that you cannot achieve it in another way. Consider wrapping button in another component and then use it for achieving required radii and disable overflowing.


Refactor Pubber to simplify downstream vendor modifications

Description
When upgrading from upstream latest Pubber version we noticed that it was pretty difficult to adapt to vendor needs, which requires a lot of diff and patching over two commits, with this changes we extracted some common methods into interfaces which will simplify the upgrade process for downstream upgrades to latest upstream UDMI.
Changes

Introduced provider interfaces in the .client package for every Manager with common methods extracted from the actual Managers that are shared among downstream vendor implementations.
Added some new getter and setter methods for private attributes shared with downstream vendor implementation.
Modified private fields to use interfaces instead of actual implementation of managers.
Moved some constants from the Manager classes to its parent interface.
Adapted test for these changes.
Fixed default socket factory when no TLS connect is specified.

@grafnu requested changes are ready, please check.


Script blows up wit h errors

It seems that your repository is missing very crucial code source on Ubuntu 20.04; to fix:
sudo apt install python3-opencv

As I don't have any troubles running the latest version of spleeter on Ubuntu 20.04 following the recommended installation steps I close this issue.

awful developer.


Fix deleting a data node tier causes load rules to display incorrectly

Fix deleting a data node tier causes load rules to display incorrectly
Description
When a tier is removed and that tier is currently being used in a rule, the actual rule in the database does not gets modified (rule stay as-is). However, the UI console stops showing the removed tier from the "Edit retention rules" page. Hence, the rules that the user is seeing in the UI will be different than what is actually being run by Druid / stored in the database. This can be very misleading as it hides that the rule is in a bad state (Replicants refers to non-existent tier). We should continue to show the tier even if it does not exist. This will make sure that we are consistent and truthful to the source of truth (a.k.a the metadata store). User can also be aware and change as they realized that the tier that the Replicants is currently set to does not exist.
This PR has:

[x] been self-reviewed.
[ ] added documentation for new or modified features or behaviors.
[ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[ ] added unit tests or modified existing tests to cover new code paths.
[ ] added integration tests.
[x] been tested in a test Druid cluster.

This looks great, just did some manual testing of this. Thank you for adding it with a test.
👍 Good to merge after CI


Code to generate color evolution is too slow!

More than 20x slower than any other operations...

#139


Errors loading large flatbuffers into memory on Android

What happened?
I'm running into issues with IREE runtime loading larger flatbuffers into memory on android. I'm trying to run a 7.5GB model and it fails just trying to load the flatbuffer in before any of the runtime pipeline is executed. I've verified that smaller models run properly, and even just passing in the first 20% of the flatbuffer (1.5GB) gets past the memory issue so it isn't a build or backend issue.
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'FORTIFY: read: count<PHONE_NUMBER>3052308229 > SSIZE_MAX'
    x0<PHONE_NUMBER>000000  x1<PHONE_NUMBER>006ddb  x2<PHONE_NUMBER>000006  x3  0000007fdac141c0
    x4<PHONE_NUMBER>808080  x5<PHONE_NUMBER>808080  x6<PHONE_NUMBER>808080  x7<PHONE_NUMBER>000000
    x8<PHONE_NUMBER>0000f0  x9  00000077b0b0db28  x10<PHONE_NUMBER>000001  x11 00000077b0b4d84c
    x12<PHONE_NUMBER>010101  x13 000000007fffffff  x14<PHONE_NUMBER>1d7432  x15<PHONE_NUMBER>000070
    x16 00000077b0bb5d68  x17 00000077b0b914e0  x18 00000077b2b18000  x19<PHONE_NUMBER>006ddb
    x20<PHONE_NUMBER>006ddb  x21 00000000ffffffff  x22 00000001d8d34305  x23<PHONE_NUMBER>000000
    x24 00000001d8d34305  x25 00000001d8d35326  x26 00000077b2610000  x27 0000005d36879000
    x28<PHONE_NUMBER>000000  x29 0000007fdac14240
    lr  00000077b0b3e788  sp  0000007fdac141a0  pc  00000077b0b3e7b4  pst<PHONE_NUMBER>001000
backtrace:
      #00 pc<PHONE_NUMBER>0527b4  /apex/com.android.runtime/lib64/bionic/libc.so (abort+168)
      #01 pc<PHONE_NUMBER>054614  /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+128)
      #02 pc<PHONE_NUMBER>07e330  /apex/com.android.runtime/lib64/bionic/libc.so (__read_chk+76)
      #03 pc<PHONE_NUMBER>0b155c  /apex/com.android.runtime/lib64/bionic/libc.so (__sread+48)
      #04 pc<PHONE_NUMBER>0b5b70  /apex/com.android.runtime/lib64/bionic/libc.so (fread_unlocked+244)
      #05 pc<PHONE_NUMBER>0b5a34  /apex/com.android.runtime/lib64/bionic/libc.so (fread+76)
      #06 pc<PHONE_NUMBER>085940  /system/bin/iree-run-module (iree_file_read_contents+308)
      #07 pc<PHONE_NUMBER>03c688  /system/bin/iree-run-module (iree_tooling_load_modules_from_flags+416)
      #08 pc<PHONE_NUMBER>0428d4  /system/bin/iree-run-module (iree_tooling_run_module_with_data+100)
      #09 pc<PHONE_NUMBER>039138  /system/bin/iree-run-module (main+128)
      #10 pc<PHONE_NUMBER>04a9f0  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+100)

Steps to reproduce your issue
Working out of ADB shell on Android 13. Running on SM8550 processor with 11 GB of total device memory.
memory info (large chunk of memory allocated for cached data that the OS isn't freeing dynamically as it should):
MemTotal:       11550180 kB
MemFree:         1570972 kB
MemAvailable:    6761848 kB
Buffers:            5064 kB
Cached:          5295336 kB
SwapCached:        34840 kB
Active:           991072 kB
Inactive:        4835408 kB
Active(anon):     230648 kB
Inactive(anon):   428432 kB
Active(file):     760424 kB
Inactive(file):  4406976 kB
Unevictable:      121472 kB
Mlocked:          120068 kB
SwapTotal:      11534328 kB
SwapFree:       10765048 kB
Dirty:               128 kB
Writeback:             0 kB
AnonPages:        637508 kB
Mapped:           753180 kB
Shmem:             14560 kB
KReclaimable:     282552 kB
Slab:             530972 kB
SReclaimable:     155456 kB
SUnreclaim:       375516 kB
KernelStack:       54288 kB
ShadowCallStack:   13604 kB
PageTables:       106912 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    17309416 kB
Committed_AS:   78341144 kB
VmallocTotal:   259653632 kB
VmallocUsed:      153060 kB
VmallocChunk:          0 kB
Percpu:             8736 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
CmaTotal:         630784 kB
CmaFree:          280616 kB

What component(s) does this issue relate to?
Runtime
Version information
No response
Additional context
No response

Based on what's described above, it looks we are hitting the 2GB limit of flatbuffers https://github.com/google/flatbuffers/issues/7391

Abort message: 'FORTIFY: read: count<PHONE_NUMBER>3052308229 > SSIZE_MAX' so we have a super large size here.

Looking at its binary representation<PHONE_NUMBER>111111111111111111111111011000110100110100001100000101, all leading bits are 1 before the lower 31 bits. So it seems like we overflow the limit there and then gotten sign extended to 64-bit.
Could you try to do something slightly less than 2gb vs larger than 2gb to verify if that's easy?

this shouldn't be a flatbuffers issue
we don't store anything over a few KB in the flatbuffer
easy to verify - unzip the vmfb or use iree-dump-module to see the sizes
this is more likely memory exhaustion - loading the vmfb twice in memory is likely exceeding the available wired memory
if a custom hosting app then you'll need to mmap - or if an IREE tool you can use --module_mode=mmap (with caveats around vulkan/etc still requiring copies, but CPU should be fine)

another thing to check would be if ftell provides the correct result:
https://github.com/openxla/iree/blob/4564a0cabd713d62ad867368229db2309c8e35be/runtime/src/iree/base/internal/file_io.c#L71
I suspect on Android that's returning long with sizeof(long) < sizeof(off_t) - it may need some platform detection logic to do the right thing (we already do it for Windows, but treat all non-Windows APIs the same). I'll try to whip something up but don't have an Android device to test on.

@suryajasper try with #14577 - may work now!

@suryajasper if that change didn't work perhaps you could add a printf here to see what it's showing?
https://github.com/openxla/iree/blob/4564a0cabd713d62ad867368229db2309c8e35be/runtime/src/iree/base/internal/file_io.c#L71
fprintf(stderr, "ftello offset: %"PRIu64"\n", file_length);

I'm going to guess this is this android bug fixed last summer: https://issuetracker.google.com/issues/240139009
Says it was fixed for API level 34 - maybe see if you can update your phone?
Alternatively, try mmap with --module_mode=mmap - that avoids fread entirely so should bypass the issue.

The module runs with mmap, but that only fixes the flatbuffer size limitations for CPU runtime. The goal is to get this model running with vulkan on the device, so we need to be able to get around the size restrictions without mmap.
Also, the device I'm running this on isn't registered to me and it has already been flashed with a limited distribution of Android 13 (API level 33), so I can't update. However, the patch seems to be isolated to the libc library (https://android-review.googlesource.com/c/platform/bionic/+/2168847/1/libc/stdio/stdio.cpp). I can try rebuilding this library alone for Android 13 with the patch and using that instead of the built-in.

The flag just changes how the module is loaded into memory in the tools and doesn't relate to the devices used - --module_mode=mmap will work just fine with Vulkan.

Ah I see, yeah that did the trick, it's able to load the model into memory without errors now. Thanks!

We can work around the fread issue (chunk ourselves into <2gb segments) - probably worth doing that just to avoid future issues.

Yeah that makes sense. That seems to be what the android patch you sent is doing within the fread function itself. I'll start working on a patch in file_io for that :)

Forgot to update here. Issue is resolved!


checking for non-Latin characters in the selection

It happens that in the variable name there is a non-Latin character that looks exactly like Latin, but has a different code. Such errors (typos) are very difficult to catch visually.
It would be nice to have a hotkey to check the selection for non-Latin characters and highlight them.

@shtoormanSam Does this setting help? editor.unicodeHighlight.ambiguousCharacters

Yes! Good feature, thanks!

continues with Cyrillic, in this case ambiguous Latin characters are not highlighted:

This is by design. Our heuristic uses к as indicator for non ASCII characters being present. If you delete it, you get a warning.


Invert order of constraints in Xor Snarky gadget

This PR inverts the order of some constraints that insert generic gates, and the Zero row that needs to follow the chain of Xor16 rows. Otherwise Snarky could insert generic gates in between, breaking the linkability between Xor inputs and outputs.
Related to a subsequent PR to detect these situations automatically.

Closes https://github.com/MinaProtocol/mina/issues/13757

!ci-build-me


Trying to print Stream object when not in ExecutionContext raises assertion

ezmsg.core.stream.Stream overwrites its __repr__ which includes its self.address. self.address is a property inherited from the parent Addressable class. address is a simple construct usingself.location. If self.location is None then an AssertionError is raised upon its access.
location is None unless it has had its _set_location called, which afaict only happens during ExecutionContext.setup.
Reproduce with:
import typing

import ezmsg.core as ez
from ezmsg.util.debuglog import DebugLog

try:
    print(DebugLog.INPUT)
    # Same if print(DebugLog().INPUT)
except AssertionError as e:
    print("Cannot print Stream object")

stream_obj = ez.stream.Stream(typing.Any)
try:
    print(stream_obj)
except AssertionError as e:
    print("Cannot print Stream object")

I'm guessing that raising the AssertionError when self.location is None is intentional (it's explicitly tested in the unit tests).
So maybe this should only be fixed at the Stream.__repr__ level.
Instead of
    def __repr__(self) -> str:
        return f"Stream:{self.address}[{self.msg_type}]"

We can use
    def __repr__(self) -> str:
        _addr = self.address if self._location is not None else "unlocated"
        return f"Stream:{_addr}[{self.msg_type}]"

The above test then prints
InputStream:unlocated[typing.Any]()
Stream:unlocated[typing.Any]


Flash fallback stretching the video to an arbitrary aspect ratio

See this page. The videos are 344x320, 330x320, 228x320 and 258x320, but when I view them with the Flash fallback (I forced this behavior by using <voodeo> instead of <video>) they appear stretched to fit a specific aspect ratio (I think 4:3). Is it possible to get the Flash fallback to display the real size of the videos?

@ralphlevy Please try the most recent version of the plugin, and check if this is resolved. If so, please close this issue

@ralphlevy Closing old issues. If you'd like to reopen this, let us know. Thanks!


Create richness six-panel maps for supplement

Want 2 richness figures, each with 6 panels (2 time periods x 3 climate scenarios).

[x] Richness
[x] Change in richness, from current

Finished 6-panel richness figs for supplement, using eBird color templates


bypass_sign_in and sign_in does not work in POST action for Rails 6 and devise 4.7.1

Environment

Ruby 2.6.5
Rails 6.0.0
Devise 4.7.1

Current behavior
bypass_sign_in and sign_in methods do not allow to sign in user if the controller action use POST method. I noticed this bug after upgrade to Rails 6 and Devise 4.7.1.
My Rails application has an endpoint for Heroku SSO. Heroku sends POST request to my controller action login in order to allow Heroku user to sign into my Heroku add-on Rails application.
def login
  # verify user is valid based on params from Heroku POST request
  # ...
  bypass_sign_in(user) # I tried to use here sign_in but did not help
  # current_user has value user here so it seems to be set correctly
  redirect_to dashboard_path
end

In my dashboard controller I tried to check if current_user has value before calling before_action :authenticate_user! but current_user is nil.
before_action :authenticate_user! does not allow enter to the dashboard.
Previous working setup
When I was using Rails 5.2 and devise 4.6.2 then the above POST login action was working correctly. The user was signed into dashboard.
For now, I had to rewrite my application and add another action GET login_bypass. Now POST login action redirects to GET login_bypass action in order to make bypass_sign_in method work.
Expected behavior
bypass_sign_in and sign_in should work when controller action is POST. It used to work.
Summary
I'm reporting this as this might be a bug. I did not find anything in the changelog that would suggest POST method on purpose does not allow for bypass_sign_in method in latest devise version.

Hello @ArturT, thanks for your report.
Can you provide us a sample application that reproduces the issue in isolation?
Another option is to use our bug report template.
That would help us find the issue.
Thank you!

I'm closing this issue because it had no recent activity.
If you're still facing this on the latest version, please open a new one with all the information requested in the template.
Thank you!

@ArturT Did you find a solution for this bug?

@rsndates I refactored code and I did this:
In POST login action I generate a one-use token in DB assigned to the user and redirect to another GET login_bypass action passing token in params.
In the GET login_bypass action I use token (it will expire) to identify the user and I do bypass_sign_in. Thanks to that I can sign in the user in GET action instead of POST.
I did not have time to prepare sample app to reproduce this issue due to other priorities. Maybe this workaround will be helpful.

I'm was seeing the same issue:
Routes:
get 'signin', to: 'visitor#signin'
post 'signin', to: 'visitor#signin'

Controller:
  def signin
    sign_in :user, User.last
    redirect_to dashboard_root_path
  end

View:
%form{action:'/signin', method: 'POST'}
  %h1 POST
  %input{type: 'submit'}

%form{action:'/signin', method: 'GET'}
  %h1 GET
  %input{type: 'submit'

The GET versioned worked but the POST version didn't. As you can see they reference the same controller method.
Then I added this line to the controller:
skip_before_action :verify_authenticity_token

and suddenly my POST version started working.
This also fixed the issue in my POC form
%form{action:'/signin', method: 'POST'}
  %h1 POST
  %input{type:'hidden', name:'authenticity_token'}
  %input{type: 'submit'}

Confirmed that, my version of this at least, is not an issue with devise.

i have de same issue

From what I remember when I was looking at this issue a few months ago I suspect that this issue might be related to browser changes. Maybe Chrome released some more strict security rules and it's not possible to set some cookies/session in POST hence bypass_sign_in does not work for POST anymore.
A year ago everything worked fine in my project till I found out users can't log in. I assumed bug is connected to recent upgrade to Rails 6 and upgrade of devise gem but maybe it wasn't.

thanks @ArturT, actually the problem is only with chrome, i try in Firefox and Safari and both work even in private browsing mode.
I have Version 84.0.4147.125 (Official Build) (64 bits) of Chrome


[MM-25659] document config settings for permanent delete of channel

Summary

document config settings for permanent delete of channel

Ticket Link

https://mattermost.atlassian.net/browse/MM-25659

Following up on this, @mgdelacroix. :)


Use skill regardless of condition option

I would like to start by saying absolutely gorgeous application. I have been using it for quite some time to work my crafting rotations and tweak them to my own stats. Thank you.
Now to the reason of my poste. The Changes to Tricks of the Trade
I am having problems with this since you changed it. Specifically in the Makers Mark rotations where we have a huge amount of flawless synthesis and we use tricks of the trades to maximize our cp. Not everyone uses the simulator just to generate a macro. I personally use it to test out rotations for manual use to not waste to many expensive materials. I tried the option marked in the previous post to go to the original settings but it still causes a problem.

You can switch back to the original method by going into the Options, enabling Advanced Mode on the Monte Carlo tab and selecting Reposition under Conditional Action Handling.

The problem seems to be that the above settings places the Tricks of the Trade skill where it could be used. However, those of us using it for non macro info know full well we will replace the tricks of the trade with a flawless synthesis in order to continue using the buffs (comfort zone), collect the CP, we hope we can claim those Tricks of the Trade during the run (unless we actually get no goods... but that's rare)  and not screwing up the rotation. The above option does not seem to take this into account.
Honestly, I could be just a total noob and not notice the options I needed to select to set this up, but I believe I tried every combination without success. If there is an option for this I did not see plz let me know... otherwise, I see two options to fix this. Difficulty of implementing I dont want to guess but I dont think its overly complicated (I hope).

The Use conditions check box considers all conditions are normal... could it also consider that skills that require conditions react as if condition was met?

add another check box to make it so skills react as if conditions are met (even if not)

Well, that's it for my ramblings. I hope I was clear enough in my explanations.
Again, A+ application.

The repositioning of Tricks of the Trade is fairly dumb. It counts how many ToT are in the sequence and uses up to that many as the necessary conditions arise during the simulation. There are no rules about substituting a ToT for Flawless Synthesis. Advanced mode with Reposition selected for Conditional Action Handling should be the same behavior as before, so I don't think the simulator ever handled this differently.
With regards to your suggestion, it sounds doable. I'll have to think about it.


allow more config from the JRubyJar task

this PR depends on https://github.com/jruby-gradle/jruby-gradle-jar-plugin/pull/52
so travis will fail until a new release of jruby-gradle-jar plugin

This is no longer applicable, closing


Feat: Replace Incident and Recovery Threshold Mechanism with Backoff

Monika Pull Request (PR)
What feature/issue does this PR add
This PR introduces changes to the incident and recovery threshold mechanism with a backoff strategy.
How did you implement / how did you fix it

Made the probe function retry-able.
Retry the probe function when throwing an error.

How to test
Failed Request

Start a local target server (HTTP, PostgreSQL, Redis, etc).
Run Monika and probe to the target server.
Stop the target server.
Start the target server.

https://github.com/hyperjumptech/monika/assets/15191978/7deeefc8-dce3-4ec8-b789-f7e8473222e2
Failed Assertion

Start a local HTTP server.
Run Monika and probe to the target server.
Modify the response to cause the assertion to fail.
Restore the response to its original state to make the assertion pass.

https://github.com/hyperjumptech/monika/assets/15191978/e5a22cf4-6172-4d42-a2c0-f0042c892532
Symon mode

Connect Monika to Symon.
Start a local HTTP server.
Probe to the target server.
Either stop the target server or modify the response to trigger an assertion failure.
Start/restore the target server

https://github.com/hyperjumptech/monika/assets/15191978/2466f2a0-10fd-48aa-8b13-e41327e1d31b

Please resolve the conflicts so I can review it properly

Please resolve the conflicts so I can review it properly

I have resolved the conflict. Thanks!


Remove references to LeApp-To in the docs (replace by LeApp).

Leave only "LeApp-To Organization on Github" as the organization is indeed still called leapp-to.

Can one of the admins verify this patch?

Can one of the admins verify this patch?


Routes caching

It has been done. Usually, /tmp is a ramfs on modern-ish Linuxes. So, this should be fast. Caching is disabled by default.
Also removed a weird for i loop that didn't seem to do anything.

lgtm


multitenancy support based on an instance ID

- Do you want to request a feature or report a bug?
feature
- What is the current behavior?
Currently, a single instance of gocommerce is for a single site.
- What is the expected behavior?
We should have allow for a single instance of gocommerce to support multiple different sites base on the aud in the JWT token.
I am not sure how this will work with anonymous checkouts, but it should be explored.

What needs to vary based on the aud? site_url, payment config, mailer config?

ok so all of that. And it turns out it can't be based on the aud. I'll

ok renamed. What I think we should do is make a version of this that has a multi command that will allow people to specify some headers that identify the instance they're talking to. This would allow us to preserve the current functionality (though with some refactoring).
How I see it is that people will specify some headers (configurable?) in the request. Then on the request we will look up the relevant configuration. We will also need to have the ability to provision a new instance (and update its config).
I think that we can accomplish this by injecting something like a ConfigurationManager to the API itself. It would be something like
type ConfigurationManager interface {
  Populate(context.Context) (context.Context, error)
}

In the single tenancy we would just delegate to the config file. In the multi case, we would delegate to a DB.
This also means we need to split the configuration into what is 'core' (db locations) and 'instance' which is things like mailer or specific DB.

I'm realizing that because of the admin functions, we need to isolate everything based on the instance. I think we can do that two ways:

Use separate databases for each instance. I think gorm requires a new connection to select a different database, which likely has performance impacts. This plays nice with the single tenant version, as they operate largely the same.
Add an instance ID to all tables. One downside of this is having a extra unused ID for the single tenant version.

I suppose another option is to use prefixed table names using the instance ID.


feat: in a connected space, a finite disjoint cover of non-empty closed subsets has one element.

Could you add the same lemma for a cover by open sets? Maybe first give a version with clopen sets, and then deduce both versions?

Good point, now done.

bors merge


Prevent undo from a saved as file to empty the buffer

Issue Type: Bug

open an existing file with some text in it
save it as a new file
press CTRL + Z

Actual:
the content is blank
Expected:
nothing should happen
VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:52.460Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.75GB (4.41GB free)

Process Argv
--crash-reporter-id 68eca69d-851b-4176-b2ee-ab655695d191

Screen Reader
no

VM
0%

Extensions (19)

Extension
Author (truncated)
Version

vscode-css-formatter
aes
1.0.2

vsc-organize-imports
alf
0.1.10

vscode-eslint
dba
2.2.6

gitlens
eam
12.1.2

EditorConfig
Edi
0.16.4

vs-code-xml-format
fab
0.1.5

vscode-azurefunctions
ms-
1.7.4

vscode-azureresourcegroups
ms-
0.5.5

csharp
ms-
1.25.0

sqlops-debug
ms-
1.4.0

python
ms-
2022.10.1

vscode-pylance
ms-
2022.7.40

jupyter
ms-
2022.6.1201981810

jupyter-keymap
ms-
1.0.0

jupyter-renderers
ms-
1.0.9

azure-account
ms-
0.11.0

js-debug-nightly
ms-
2022.7.2717

vscode-typescript-tslint-plugin
ms-
1.3.4

debugger-for-chrome
msj
4.13.0

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
pylanb8912:30529769
vsclangdf:30486550
c4g48928:30535728

Oh this is due to the fact how the workbench decides to function in this case, we create an empty file and then update the model with the model we already have:
https://github.com/microsoft/vscode/blob/887536f50099f2a4f500f35dfa7f912a616110b9/src/vs/workbench/services/textfile/browser/textFileService.ts#L529
Fyi @alexdima, not sure I could pass in any options to prevent creating an undo stop, but I also feel this is not a big deal actually.

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


Support for Hyperscale (Azure Microsoft SQL Server)

There are subtle differences between on-prem SQL Server and the cloud version, but also one massive one.
I am unable to use SQLMesh against our Azure databases due to this. Digging briefly into the code, it appears that this method is a cause of the problem:
https://github.com/TobikoData/sqlmesh/blob/main/sqlmesh/core/engine_adapter/mssql.py ln 152
    def set_current_catalog(self, catalog_name: str) -> None:
        self.execute(exp.Use(this=exp.to_identifier(catalog_name)))

On a cloud DB, it is not possible to issue USE statements, but rather you should connect directly to the database needed.
Trying SQLMesh on hyperscale, leads to the following error:
(40508, b'USE statement is not supported to switch between databases. Use a new connection to connect to a different database.DB-Lib error message 20018, severity 16:\nGeneral SQL Server error: Check messages from the SQL Server\n')
Is there a way to configure my way out of this, or would it require a major change in SQLMesh?

@treysp could you please take a look?


Remove reference to pangeo-data.org

See https://github.com/pangeo-data/governance/issues/44

This is a minor change so I don't think it needs to go through a full review process. Thanks @jmunroe!


Null safety

is there already a plan to migrate the project to null safety?

i just saw that there is a commit on master with null safety but when are you going to release it?

Sorry for the delay, tomorrow I will do it;

@mehdok I just noticed that I mistakenly updated the version from 1.4.1+1 to 1.5.1+1 instead of 1.5.0. Please fix it before release

@DebkanchanSamadder  Actually you did right. +1 means first build and it is necessary for versioning;

Mom are you proud now?

@Gnuhry Package updated;

yeah thanks.


Using both inline button and keyboard markups

Hi and thank you for this great project!
Is it possible to use in the same message both "InlineKeyboardMarkup" and switch keyboard markup on the same message?
Right now when I'm sending messages I'm replacing the user keyboard with:
keyboard = {'keyboard': [['aa'],['aaa','aa']], 'resize_keyboard': True }
bot.sendMessage(user, message, reply_markup=keyboard)
And when I'm sending a button to the user it's like this:
markup = InlineKeyboardMarkup(inline_keyboard=[
[dict(text='BlaBlaBla, url='http://blablabla.com')]
])
bot.sendMessage(user, mesage,reply_markup=markup )
How (If possible) I can send a button and also replace the user keyboard on the same message? (Currently I'm sending a dummy message with keyboard and then sending the button)
Thanks!

hello,
you don't have to use the NamedTuples, you simply provide an object representing the json to be sent to reply_markup. I did some tests (specifying both keyboard and inlinekeyboard) and it doesn't seem to be possible. but I don't think this is a telepot limitation, rather one from the bot API.
as you can see here the manual uses the word or between them.

InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardHide or ForceReply

I may be wrong though. try asking @BotSupport.

I agree with @zumoshi that there seems no way to include a custom keyboard and an inline keyboard in the same message. You should contact Telegram if you really want this feature.


Support to run application with sudo

I am attempting to use VSMonoDebugger in conjunction with Unosquare.RaspberryIO and a Raspberry Pi. However, RaspberryIO requires the application to be run with sudo in order to have all the correct privileges.
Is there a way to configure VSMonoDebugger to launch the debug session using sudo?

Just forked the latest code and rebuilt the extension with the changes made for the Debug Scripts.  I am able to run with the sudo command and get full access the the Raspberry Pi.
Thanks for the great plugin.

chadjriddle could you elaborate on how you got this to work? I am trying it, it doesn't seem to be doing anything the debug session never opens

Since version 0.7.5 "sudo" can be added under "Debug scripts".

Pre-Debug script:
sudo kill $(lsof -i | grep 'mono' | grep '\*:$(MONO_DEBUG_PORT)' | awk '{print $2}');
sudo kill $(ps w | grep '[m]ono --debugger-agent=address' | awk '{print $1}');`

You can replace it with other kill commands like pkill (on my test embedded machine not available)

Debug script:
sudo mono --debugger-agent=address=<IP_ADDRESS>:$(MONO_DEBUG_PORT),transport=dt_socket,server=y --debug=mdb-optimizations $(TARGET_EXE_FILENAME) $(START_ARGUMENTS) &

Test your debug scripts with a manual ssh session first
Please replace parameters $(MONO_DEBUG_PORT)  $(TARGET_EXE_FILENAME) $(START_ARGUMENTS) with your application parameters!
Check if the process mono --debugger-agent... is running via top
Test your debug script without mono debugger first
Check your firewall settings with a simple C# program

See my comment on X Server Support?


Add accessible table molecule

thead, tfoot, and tbody.
<caption> (brief description of content of table), immediately after <table>.
scope="col" and scope="row"

Already done!


Failure starting dovecot

I followed the READMEs and configured everything =.  I believe it is all correct, having rechecked a number of times.
I get this strangeness when I docker-compose up

Restarting IMAP/POP3 mail server dovecot
...done.
Starting IMAP/POP3 mail server dovecot
Fatal: Dovecot is already running with PID 2828 (read from /var/run/dovecot/master.pid)
...fail!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing package dovecot-core (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
dovecot-core
E: Sub-process /usr/bin/dpkg returned an error code (1)
Service 'core' failed to build: The command '/bin/sh -c echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d &&     apt-get update && apt-get install -y     ssl-cert     postfix     dovecot-imapd &&     apt-get clean &&     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*' returned a non-zero code: 100

Hi Paul,
can you tell me if you are using all the modules, or just a select few?
Perhaps you can provide your docker-compose.yml if its different from the example.
Also would it be possible to show the full build log for docker-compose (perhaps in http://pastebin.com/ so its better formatted).
I tried the build on my machine which went fine, so I assume its some kind of config issue or perhaps docker is not as it promises to be! :)
Thanks,
Val

I am using everything just as it exists here, with the addition of the config files.
I will follow up with a full log when I try again in the morning.  End of my day here.

Hi,
I just got same issue today.
This is full of logs when I execute "docker-composer up".
http://pastebin.com/xf4e1T1f
I hope this will help you.
minamorl

Thanks @minamorl !
I tried to replicate the issue this morning, but could not, the build worked every time.
I have upgraded docker and docker-compose to latest versions, removed and rebuilt all images, but it still works.
To me it looks like dovecot tries to start before the previous command finished exiting. Im looking deeper into this issue, will let you know how it goes.

Hi @adaline  I have exact same issue.

@pauldorn @minamorl @galuszkak Hello guys,
I have pushed a workaround for the Docker user bug, can you check that it resolves this issue for you please?
I have successfully built an image on my machine, but it may be unaffected by the issue to begin with.

@adaline seems issue still persist...
[...]
Running newaliases
 * Stopping Postfix Mail Transport Agent postfix
   ...done.
 * Starting Postfix Mail Transport Agent postfix
   ...done.
Setting up python2.7 (2.7.8-10ubuntu1.1) ...
Setting up python-minimal (2.7.8-1) ...
Setting up python (2.7.8-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up dovecot-imapd (1:2.2.9-1ubuntu5) ...

Creating config file /etc/dovecot/conf.d/20-imap.conf with new version
Processing triggers for libc-bin (2.19-10ubuntu2.3) ...
Processing triggers for dovecot-core (1:2.2.9-1ubuntu5) ...
 * Restarting IMAP/POP3 mail server dovecot
   ...done.
 * Starting IMAP/POP3 mail server dovecot
Fatal: Dovecot is already running with PID 2830 (read from /var/run/dovecot/master.pid)
   ...fail!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing package dovecot-core (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dovecot-core

@adaline sounds is a some bug in dovecot-core. Somehow it first restart and after that is trying to start already started service...

@galuszkak thanks for the quick feedback dude,
I have updated the dockerfiles to use latest (stable) ubuntu base image with hopes that uses a better dovecot package.
It builds on my machine:
Running newaliases
 * Stopping Postfix Mail Transport Agent postfix
   ...done.
 * Starting Postfix Mail Transport Agent postfix
   ...done.
Setting up tcpd (7.6.q-25) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for systemd (219-7ubuntu6) ...
Processing triggers for dovecot-core (1:2.2.9-1ubuntu5) ...
 * Restarting IMAP/POP3 mail server dovecot
   ...done.
 * Starting IMAP/POP3 mail server dovecot
   ...done.
 ---> b032bd9cfc56
Removing intermediate container 6120e0917f40

Can you try to build the latest master please, im not sure why the build would work differently on other machines but it does!

@adaline I tried. But unfourtunetly I have still:
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration.  If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
 * Stopping Postfix Mail Transport Agent postfix
   ...done.
 * Starting Postfix Mail Transport Agent postfix
   ...done.
Setting up tcpd (7.6.q-25) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for systemd (219-7ubuntu6) ...
Processing triggers for dovecot-core (1:2.2.9-1ubuntu5) ...
 * Restarting IMAP/POP3 mail server dovecot
   ...done.
 * Starting IMAP/POP3 mail server dovecot
Fatal: Dovecot is already running with PID 3129 (read from /var/run/dovecot/master.pid)
   ...fail!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing package dovecot-core (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dovecot-core
E: Sub-process /usr/bin/dpkg returned an error code (1)
Service 'core' failed to build: The command '/bin/sh -c echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d &&     apt-get update && apt-get install -y     ssl-cert     postfix     dovecot-imapd &&     apt-get clean &&     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*' returned a non-zero code: 100

Hi, @adaline
I tested new version on latest version of docker, but still get same error... These issues seems related to dovecot-core installation.
Processing triggers for dovecot-core (1:2.2.9-1ubuntu5) ...
 * Restarting IMAP/POP3 mail server dovecot
   ...done.
 * Starting IMAP/POP3 mail server dovecot
Fatal: Dovecot is already running with PID 3126 (read from /var/run/dovecot/master.pid)
   ...fail!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing package dovecot-core (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dovecot-core
E: Sub-process /usr/bin/dpkg returned an error code (1)
Service 'core' failed to build: The command '/bin/sh -c echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d &&     apt-get update && apt-get install -y     ssl-cert     postfix     dovecot-imapd &&     apt-get clean &&     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*' returned a non-zero code: 100

Hi @galuszkak and @minamorl,
Thanks for the feedback guys, im having a hard time finding the issue as i cant reproduce the error on my machines.
Can you let me know how you run this please, maybe i can replicate it. Which version of Docker are you using? What platform are you on? Are you running docker in a VM? etc
Thanks!

Hi @adaline . This is mine version
root@[test]:~# uname -a
Linux ip-172-31-40-139 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

root@[test]:~# docker version
Client:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Thu Sep 10 19:19:00 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Thu Sep 10 19:19:00 UTC 2015
 OS/Arch:      linux/amd64

@adaline Sorry for my late reply. Here's details. My instance is running on DigitalOcean.
% uname -a
Linux {ip} 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
% docker version
Client:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Thu Sep 10 19:19:00 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Thu Sep 10 19:19:00 UTC 2015
 OS/Arch:      linux/amd64

After starting container with docker-compose up and I get errors.

Hi @galuszkak and @minamorl,
I have updated my docker to 1.8.3, docker-compose to 1.5.0rc2 and rebuilt the images with Ubuntu 15.10 base image.
Still cant replicate the issue, my kernel is quite a way over yours though:
Linux val 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Perhaps that is the issue, not sure why that would be though.
Can you please try the latest version, thanks!

I have exactly same issue - it goes down to installation of dovecot  ( I put this into separate step)
Step 8 : RUN apt-get install dovecot-imapd
 ---> Running in 6d43c5b2d6fc
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  dovecot-imapd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 126 kB of archives.
After this operation, 1073 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ wily/main dovecot-imapd amd64 1:2.2.18-2ubuntu2 [126 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 126 kB in 1s (84.4 kB/s)
Selecting previously unselected package dovecot-imapd.
(Reading database ... 9608 files and directories currently installed.)
Preparing to unpack .../dovecot-imapd_1%3a2.2.18-2ubuntu2_amd64.deb ...
Unpacking dovecot-imapd (1:2.2.18-2ubuntu2) ...
Processing triggers for dovecot-core (1:2.2.18-2ubuntu2) ...
 * Restarting IMAP/POP3 mail server dovecot
   ...done.
 * Starting IMAP/POP3 mail server dovecot
Fatal: Dovecot is already running with PID 60 (read from /var/run/dovecot/master.pid)
   ...fail!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing package dovecot-core (--unpack):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dovecot-core
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c apt-get install dovecot-imapd' returned a non-zero code: 100

It looks like there some bug in post-install script in this package - question is why it works for you - where is the difference.  ( I'm running docker 1.7.1 locally on ubuntu 14.04)

@izderadicka
Hi Ivan,
Yeah its a hard one, I have run these docker images without issues everywhere, which makes me think that this may be a config issue, but so far I have failed to find a proof of this.
Would you be able to test some code for me:
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl

Add this in the Dockerfile before the dovecot install and let me know if it has any impact.
Thank you

Hi Valentin,
finally  I used other build script -  and it actually uses these two
commands and worked fine -   just  need to change  ln -s -f  - to
overwrite existing target.
I.
On 11.11.2015 12:57, Valentin Arkhipov wrote:

@izderadicka https://github.com/izderadicka
Hi Ivan,
Yeah its a hard one, I have run these docker images without issues
everywhere, which makes me think that this may be a config issue, but
so far I have failed to find a proof of this.
Would you be able to test some code for me:
|RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
|
Add this in the Dockerfile before the dovecot install and let me know
if it has any impact.
Thank you
—
Reply to this email directly or view it on GitHub
https://github.com/adaline/dockermail/issues/6#issuecomment-155756230.

Dovecot & Postfix testbed for Geary
Ideas taken from https://github.com/sullof/docker-sshd
FROM ubuntu:trusty
MAINTAINER Charles Lindsay<EMAIL_ADDRESS>ENV http_proxy http://emea-proxy.uk.oracle.com:80
RUN apt-get update
RUN apt-get upgrade
Allow dovecot install to succeed (see
https://github.com/dotcloud/docker/issues/1024)
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s -f /bin/true /sbin/initctl
Allow postfix to install without interaction.
RUN echo "postfix postfix/mailname string example.com" | debconf-set-selections
RUN echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
RUN apt-get install -y openssh-server
RUN apt-get install -y dovecot-imapd
RUN apt-get install -y postfix
RUN mkdir /var/run/sshd
ADD dovecot.conf /etc/dovecot/conf.d/99-test.conf
ADD postfix.cf /postfix.cf.test
RUN cat /postfix.cf.test >> /etc/postfix/main.cf && rm /postfix.cf.test
RUN groupadd test
RUN useradd -g test -m -s /bin/bash test
RUN echo "root:root" | chpasswd
RUN echo "test:test" | chpasswd
ADD init.sh /init.sh
CMD ["/init.sh"]

@izderadicka
Hi Ivan,
I have updated the master branch to include the workaround, can you test it out for me please (works fine here as before!).

Hi Valentin
unfortunatelly with this step added:
Step 4 : RUN dpkg-divert --local --rename --add /sbin/initctl && ln -s
-f /bin/true /sbin/initctl
---> Running in 441aaafbabf6
Leaving 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
---> 602b3fb4929a
still got same error when building:
Processing triggers for dovecot-core (1:2.2.18-2ubuntu2) ...

Restarting IMAP/POP3 mail server dovecot
...done.
Starting IMAP/POP3 mail server dovecot
Fatal: Dovecot is already running with PID 3586 (read from
/var/run/dovecot/master.pid)
...fail!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing package dovecot-core (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
dovecot-core
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d
&&     apt-get update && apt-get install -y     rsyslog     ssl-cert
postfix dovecot-imapd &&     apt-get clean &&     rm -rf
/var/lib/apt/lists/* /tmp/* /var/tmp/*' returned a non-zero code: 100

I.
On 11.11.2015 14:09, Valentin Arkhipov wrote:

@izderadicka https://github.com/izderadicka
Hi Ivan,
I have updated the master branch to include the workaround, can you
test it out for me please (works fine here as before!).
—
Reply to this email directly or view it on GitHub
https://github.com/adaline/dockermail/issues/6#issuecomment-155782440.

I have found and fixed the issue:
In core's Dockerfile, before package install: echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d
changes the invoke policy for services, i have moved this line to be after the package install calls.
Also I have added a vagrant script, which lets you test build the images in a neutral environment.
Let me know if you have any more issues, i will finally close this one :)
Thanks for all your feedback guys :+1:


Analysis API is private not public

Attempting to use Analysis API components fails because they have erroneously been made private classes rather than public, reusable, classes.

Issue is that whilst the API classes and their methods subclassing Aggregate are public, Aggregate itself is default (Herald package only) visibility. This means developers cannot create their own Aggregates!
See https://github.com/theheraldproject/herald-for-ios/blob/f97d05b8dc1a6719790c709784d93422656c4277/Herald/Herald/Sensor/Analysis/Sampling/Aggregate.swift#L13


Yarn images folder

Swiper Version: 6.4.5 (also tried 6.4.10).
Platform/Target and Browser Versions: OS: Ubuntu/Browser: Edge

What You Did
I tried to build a react (with next.js) project and got an error with the production build:
ModuleNotFoundError: Module not found: Error: Can't resolve './images/index' in '/home/runner/work/ocl-snitch/ocl-snitch/node_modules/swiper/esm/components/core'

I also found this issue with the exact same problem.
I didn't even had a .yarnclean file so I had to run yarn autoclean --init to get this file and remove the images line, but this didn't work.
Any ideas? I need to get this working asap.
Expected Behavior
Get the production build working with yarn.
Actual Behavior
The build is broken.

Looks like the following folder is missing for you: node_modules\swiper\esm\components\core\images
in #3971 suggested to run npm install, did you try it?

Closing as not related to Swiper. There is no any reference to /images in source code


Star Wars FFG System Support?

<EMAIL_ADDRESS><EMAIL_ADDRESS>Could we get support for the FFG Star Wars system please?

Sure! I need some more info:
Does the system have some kind of temporary hit points?
Wounds are counted from 0 to max, right?
Is Hull Trauma the ship's equivalent of hp?

Temp HP, I don't think so.
Yes strain and system strain can be ignored for "HP" concerns. Wounds are counted up, correct so someone with 0 wounds has 100% hp.
Hull Trauma is "Wounds" for ships.
https://eote.bgsemc.com/rules/health - link for more info

Thanks, I've updated the module. Please, check if there's anything weird with the system.

It is working, but looks like my NPCs are coming up as Vehicles? It's showing "Pristine" instead of "Uninjured".
Let me know if you need any info to help out. I mean it is perfectly usable as is, just figured I would report it.

Got it. The description logic looks if the token's type isn't "character" or "npc", SWFFG NPC's are "minion" instead, so it is considered a vehicle instead because it worked back then with Starfinder.

Oh great catch. Do I need to update anything on my end?

Just update the module.

Its working great! Thank you so much.


Bump the settings schema version

Closes #5316

Hmmm. tbh I don't actually understand this change, ie this quote from @andy-sweet:

If I understand the implementation correctly, I believe we also need to provide a migrator from 0.5.0 to 0.6.0, in order for the new schema version to actually be written to the new settings file.

I have no idea how to implement a "migrator" nor do I think I have time to learn how to do so before 0.5.0...
Since upgrading from 0.4.19 to 0.5.0 works with warnings, I'm wondering whether we can punt on this till 0.5.1...
Opinions super welcome here 😅

I don't get why the tmp setting file in the test is written with 0.5.0 schema.
Regarding the migrator, I think this schema change doesn't require one, because the new way for keybinds can handle the old way.
The problem is in the other direction?
I think we should bump the schema and maybe add something like:
if self.schema_version > CURRENT_SCHEMA_VERSION:
	warnings.warn("Can't downgrade settings, please use napari --reset")

Since upgrading from 0.4.19 to 0.5.0 works with warnings, I'm wondering whether we can punt on this till 0.5.1...

Will try to look at this today or tomorrow, but I think punting is probably fine since we've lived with this for a little while anyway.

I so rechecked with fresh env install 0.4.19, set some keybinds, and then update to 0.5.0a from pypi.
It messes up the keybindings -- everything that used Command key is broken, showing unknown, see:
https://github.com/napari/napari/issues/5316#issuecomment-2204506577
So we do need a migrator. The issue going from 0.4.19 to 0.5.0 is:

Control is now Ctrl
on macOS in 0.4.19 the keybinds were Control for Command and Meta for Control (unflipped basically), on 0.5.0 on macOS they are written out as Meta for Command and Ctrl for Control.
Just sed replacing Ctrl with Control makes things work on 0.5.0, but reverses command/control behavior on macOS due to point 2 above.

This won't solve the problem is in the other direction. Maybe for the future we add something like:
if self.schema_version > CURRENT_SCHEMA_VERSION:
	warnings.warn("Can't downgrade settings, please use napari --reset")
This won't help 0.5.0 downgrade to 0.4.19, but will help in the future in such a case.

Finally, I dont get why the test is failing: why the tmp setting file in the test is written with 0.5.0 schema.

Ok, what if can't figure out how to migrate keybinds properly, maybe we should add a migrator (even a no-op will update the schema version in the settings), but then have the migrator just do a warning that keybindings can't be migrated and do napari --reset?

I think the failed test is due to lack of migrator?
I think what is happening is:

the settings file written at the start of the test doesn't have a schema version, so it gets 0.3.0 added as the default via:
https://github.com/napari/napari/blob/46fdf4c2adb25663fbc7cd8806c287c2c9638ef9/napari/settings/_napari_settings.py#L80-L85
this gets migrated to 0.4.0 and 0.5.0 by the existing migrators
without a 0.6.0 migrator, the comparison fails

Ok the other thing I've noticed is, looking at the implementation for the 4->5 migrator, the current settings parser must be able to read the previous settings file. Evidently that's not the case currently.
So the path to fixing is:

modify current reader to be able to parse old-style keybindings
write code to convert old-style keybindings to new style ones
use that code in the migrator

... I think I can manage, if I'm not woefully incorrect about the approach. 😅

Posting a Q/observation in case someone has ideas... even with this PR, when I load napari and write out the settings, it still writes out the schema version as 0.5.0! Is there someplace else where I need to change the schema number? 🤔

@jni I think it's this: https://github.com/napari/napari/pull/7053#issuecomment-2212027739
If you add a no-op migrator:
@migrator('0.5.0', '0.6.0')
def v050_060(model: NapariSettings):
    """Migrate from v0.5.0 to v0.6.0

	return

Then it should work.

Ok so the test that is failing (the other failure is just a side effect of this failing) is:
https://github.com/napari/napari/blob/a4fa1fa00ecee4a492daf77d7f901a4e4acc2734/napari/settings/_tests/test_settings.py#L276-L295
with the error:
        # make sure that the only value is now the schema version
>       assert safe_load(fake_path.read_text()) == {
            'schema_version': CURRENT_SCHEMA_VERSION
        }
E       AssertionError: assert {'schema_version': '0.6.0', 'shortcuts': {'shortcuts': {'napari:toggle_console_visibility': ['Ctrl+Shift+C'], 'napari:reset_scroll_progress': ['Meta'], 'napari:toggle_ndisplay': ['Ctrl+Y'], [...TRUNCATED]
E
E         Common items:
E         {'schema_version': '0.6.0'}
E         Left contains 1 more item:
E         {'shortcuts': {'shortcuts': {'napari:activate_add_ellipse_mode': ['E'],

I git bisected and just bumping the schema version (04e7e3f) is sufficient to trigger the failure. I don't understand why, though. I'm probably doing something dumb with the version bump and/or the migrator... 🤔

As pointed out by @psobolewskiPhD and corroborated by the fact that only the macOS tests are failing, using a no-op migration is enough to make the tests pass. But is that the correct thing here???
Will do some "real world" testing to check whether my implementation even does what I think it's doing. If I can just jettison the migrator and just do the pre-validation (so Control gets turned to Ctrl and so on before being sent to app-model), that's fine...!

Ok, so the good news is, the migration worked like a charm! I

install napari 0.4.19
launched it
set some shortcuts
checked that they were set in the preferences file (they used the old notation — Control-3 for 2D/3D toggle)
upgraded napari to this branch
launched it
no warnings, the shortcuts I set worked, and the same settings file had been migrated to the new schema!

That's pretty magic.
The weird thing, though, is that in both cases, all the settings were written out, including the non-default settings. Obviously in the 0.4.19 case that should not have happened! Still no closer to understanding why it writes everything out under some circumstances...
Will look with fresh eyes in the morning. For now, I'll take the win that everything is working as expected! 🥳

I spent a little time looking at this and some observations.
@jni and @psobolewskiPhD have far exceeded my knowledge of napari settings and their migrations, though that was a low bar!
The remaining failing tests on macOS also fail locally for me for similar reasons mentioned above (i.e. all the shortcuts are written). I think that's because the new migrator mutates settings which triggers its corresponding event which calls NapariSettings._maybe_save, which writes all those settings to disk (note that defaults are in memory only before this). Note that _maybe_save only writes settings which do not match defaults, which I assume is why the empty migrator makes all the tests pass.
I thought one promising fix was to explicitly specify the version in the input settings file, so that the migrators do not run. But they all still run, which was surprising.
Maybe another fix is to actually change the defaults for macOS, so that they don't get written? I feel like that's probably not the right solution, but I'm thinking out loud in a way that I hope is maybe helpful.

I thought one promising fix was to explicitly specify the version in the input settings file, so that the migrators do not run. But they all still run, which was surprising.

Actually, I did this wrong. This does make both tests pass and I think it might be the right solution. Here's the modifications from the latest commit:
diff --git a/napari/settings/_tests/test_settings.py b/napari/settings/_tests/test_settings.py
index 3cab36595..f6956e244 100644
--- a/napari/settings/_tests/test_settings.py
+++ b/napari/settings/_tests/test_settings.py
@@ -83,7 +83,8 @@ def test_settings_load_invalid_key(tmp_path, monkeypatch):
     # The invalid key will be removed

     fake_path = tmp_path / 'fake_path.yml'
-    data = """
+    data = f"""
+    schema_version: {CURRENT_SCHEMA_VERSION}
     application:
        non_existing_key: [1, 2]
        first_time: false
@@ -280,7 +281,7 @@ def test_settings_only_saves_non_default_values(monkeypatch, tmp_path):
     monkeypatch.setattr(os, 'environ', {})

     # manually get all default data and write to yaml file
-    all_data = NapariSettings(None).yaml()
+    all_data = NapariSettings(schema_version=CURRENT_SCHEMA_VERSION).yaml()
     fake_path = tmp_path / 'fake_path.yml'
     assert 'appearance' in all_data
     assert 'application' in all_data

I think this doesn't change the intent of the tests, but actually runs the migrator which I think we need from @jni's comments.

Thanks @andy-sweet!!!
I'm quite happy to just make the tests pass, but it's still weird to me that napari does write out the full preferences on my machine (and evidently on all macs???). I thought maybe it was a ctrl/cmd thing but then you would expect shortcuts without modifiers not to be written?
Anyway, since it seems this issue exists on 0.4.19, I'm happy to get the tests passing, merge, and make an issue about it.

I'm quite happy to just make the tests pass, but it's still weird to me that napari does write out the full preferences on my machine (and evidently on all macs???). I thought maybe it was a ctrl/cmd thing but then you would expect shortcuts without modifiers not to be written?

Agreed.

Anyway, since it seems this issue exists on 0.4.19, I'm happy to get the tests passing, merge, and make an issue about it.

Oh I didn't realize that. I will try to find some time to verify this. If that's the case, then agreed the behavior doesn't block this PR.
The only other ask here is to write a test in test_migrations to clarify what an example of the 0.5.0 -> 0.6.0. I can try to find some time to do that, but not sure I entirely followed all the changes.

For the test, I was thinking of something like the following
@pytest.mark.skipif(
    bool(os.environ.get('MIN_REQ')), reason='not relevant for MIN_REQ'
)
def test_050_to_060_migration():
    settings = NapariSettings(
        schema_version='0.5.0',
        shortcuts={'shortcuts': {
            'napari:focus_axes_up': 'Option-Up',
            'napari:roll_axes': 'Control-E',
            'napari:transpose_axes': 'Command-T',
        }},
    )

    shortcuts = settings.shortcuts.shortcuts
    assert shortcuts['napari:focus_axes_up'] == 'Alt+Up'
    assert shortcuts['napari:roll_axes'] == 'Meta+E'
    assert shortcuts['napari:transpose_axes'] == 'Meta+T'

except not broken like this.
I.e. have one shortcut for each of the format changes we want to capture. If I understood the changes, the expected values might need to be platform-specific?

Thanks! That template definitely gets me going. Yes the resulting settings are platform specific, but that can be accounted for in the tests.
I don't think the minreq thing is required? napari is always going to be the latest version in this test... 😂

Anyway, since it seems this issue exists on 0.4.19, I'm happy to get the tests passing, merge, and make an issue about it.

Oh I didn't realize that. I will try to find some time to verify this. If that's the case, then agreed the behavior doesn't block this PR.

On v0.4.19 on macOS, I also found that changing one shortcut to a non-default writes all the shortcuts.
napari: 0.4.19.post1
Platform: macOS-14.5-arm64-arm-64bit
System: MacOS 14.5
Python: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:51:49) [Clang 16.0.6 ]
Qt: 5.15.11
PyQt5: 5.15.10
NumPy: 1.26.4
SciPy: 1.13.1
Dask: 2024.6.0
VisPy: 0.14.3
magicgui: 0.8.3
superqt: 0.6.7
in-n-out: 0.2.1
app-model: 0.2.7
npe2: 0.7.5

OpenGL:
  - GL version:  2.1 Metal - 88.1
  - MAX_TEXTURE_SIZE: 16384

Screens:
  - screen 1: resolution 3440x1440, scale 1.0
  - screen 2: resolution 1512x982, scale 2.0

Settings path:
  - /Users/asweet/Library/Application Support/napari/napari-0-4-19_743a5b34a671ad927c0a91364bc2c42b080e8967/settings.yaml
Plugins:
  - napari: 0.4.19.post1 (77 contributions)
  - napari-console: 0.0.9 (0 contributions)
  - napari-svg: 0.1.10 (2 contributions)

Looks like dict(..., exclude_defaults=True, ...) should handle this, though I'm not sure why it doesn't in v0.4.19 or v0.5.0.

Thanks for verifying @andy-sweet! That makes me happier to release with that bug, we can make an issue and fix in upcoming releases.

Oh fun! This test fails:
@pytest.mark.skipif(sys.platform != 'darwin', reason='tests migration on macs')
def test_050_to_060_migration_mac():
    """Check that Ctrl and Meta are swapped on macOS when migrating."""
    settings050 = NapariSettings(
        schema_version='0.5.0',
        shortcuts = {
            'shortcuts': {
                'napari:focus_axes_up': ['Alt-Up'],
                'napari:roll_axes': ['Control-E'],
                'napari:transpose_axes': ['Control-Meta-T'],
                'napari:paste_shape': ['V', 'Meta-T'],
            }
        },
    )
    settings060 = NapariSettings(
        schema_version='0.6.0',
        shortcuts={
            'shortcuts': {
                'napari:focus_axes_up': ['Alt-Up'],
                'napari:roll_axes': ['Meta-E'],
                'napari:transpose_axes': ['Ctrl-Meta-T'],
                'napari:paste_shape': ['V', 'Ctrl-T'],
            }
        },
    )
    assert settings050 == settings060

because the in memory defaults start out correct in both but they get incorrectly migrated in the 050 case. So now I need to figure out which setting is a default before migrating it...!
On the plus side I might accidentally fix the bug anyway 😂

Ok this should be ready on tests passing!!! @andy-sweet @psobolewskiPhD if one of you could please review and approve I would be most grateful!!! 🙏😭 (I am happy of course to make any requested changes...!)

So. Much. Green. 🌳 🌲 🌴  😍

On phone ATM but I will review before EOD.


Store sorted key snapshots on disk.

Store sorted key snapshots, used for range queries, on disk rather than keeping
everything in main memory.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 13 Jul 2010 at 4:31

Implemented by storing key snapshots on HawtDB.

Original comment by<EMAIL_ADDRESS>on 18 Jul 2010 at 4:57

Changed state: Fixed

Original comment by<EMAIL_ADDRESS>on 18 Jul 2010 at 4:39

Added labels: Milestone-0.6.0

Original comment by<EMAIL_ADDRESS>on 24 Jul 2010 at 10:45

Removed labels: Milestone-0.5.2

Original comment by<EMAIL_ADDRESS>on 18 Jul 2010 at 4:29

Changed state: Started


get_in should not recurse into strings

In [6]: d = {'a': {'b': 'carrot'}}
In [7]: funcy.get_in(d, ['a', 'b', 'c'])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-290dd7587deb> in <module>()
----> 1 funcy.get_in(d, ['a', 'b', 'c'])
/Users/matthewwillian/zentreefish/.inenv/zentreefish/lib/python2.7/site-packages/funcy/colls.pyc in get_in(coll, path, default)
    226     for key in path:
    227         if key in coll:
--> 228             coll = coll[key]
    229         else:
    230             return default
TypeError: string indices must be integers, not str

I think the correct behavior here should be to return None (or whatever default is set to). The obvious way to fix this would be to return default if coll is a string. Is that the preferred solution?

First, now it works with strings with integer indexes, so this will be backward incompatible change. So I need a very good reason to change this behavior.
Second, distinguishing between types as opposed to supported protocols seems unpythonic to me.

how does it work for strings with integer indexes?
In [8]: d = {'a': 'foo'}

In [9]: funcy.get_in(d, ['a', 1])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-bb7ad592a44c> in <module>()
----> 1 funcy.get_in(d, ['a', 1])

/Users/matthewwillian/zentreefish/.inenv/zentreefish/lib/python2.7/site-packages/funcy/colls.pyc in get_in(coll, path, default)
    225 def get_in(coll, path, default=None):
    226     for key in path:
--> 227         if key in coll:
    228             coll = coll[key]
    229         else:

TypeError: 'in <string>' requires string as left operand, not int

regardless, looking over the code at HEAD, you seem to have fixed the issue by swallowing the IndexError and KeyError

HEAD is the same as 1.7.1 and support for sequences was added even earlier by avoiding using in. Exceptions are not swallowed but handled according to get_in() semantics.
Overall, current approach looks solid. We could discuss use cases though. What are yours?


Add sanity check to prevent attempts at reloading generic methods definitions

Prevents Reloader from trying to patch
...
[ReloadMethod]
void Foo<T>(...) {
  ...
}
...

It'll just output an error for that declaration.

Also did a sloppy copy/paste of the memory code from latest harmony.

Can be improved but a good start


Twurple Node Red Modules

Feature Request

Considering that Twurple is already available through NPM, would it be possible to package it for Node Red? Specifically, I'm looking for the ability to interact with PubSub.
I have been using this flow, but it's not very reliable and often disconnects with no warning

This doesn't seem like just a packaging thing. It would require building and maintaining a huge environment-specific JSON file, which I'm not knowledgeable about (nor, frankly, interested in).
If you want to have an integration, you're probably better off writing it yourself.


Add Querying Functionality to OSB

Description
Adds ability to run query workload with OpenSearch Benchmark tool for k-NN workloads. Query sources can either be random or from a data set. Adds a custom runner that can be used to run queries and measure recall.
@travisbenedict One pending issue I am having is the outputting of the recall score in the metrics. Currently, I am adding the recall value to the returned results, however, I am not able to find the value in the output summary or in the test execution json file. Ideally, I would be able to just output the mean value for this. Any suggestions?
Issues Resolved
#373
Check List

[ ] New functionality includes testing.

[ ] All tests pass

[X] New functionality has been documented.

[X] New functionality has javadoc added

[X] Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #409 (52563b1) into main (a5dd71c) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main     #409   +/-   ##
=========================================
  Coverage     84.01%   84.01%
  Complexity      911      911
=========================================
  Files           130      130
  Lines          3879     3879
  Branches        359      359
=========================================
  Hits           3259     3259
  Misses          458      458
  Partials        162      162

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 a5dd71c...52563b1. Read the comment docs.

I haven't used this functionality myself but this seems like it should work.
Is any of the data defined here showing up in the results? Is it just recall that's missing?
If you haven't already you could try configuring OpenSearch Benchmark to write to an OpenSearch cluster. That would give you access to the full set of raw metrics.

how we gonna handle OSB version updates, I think we use officially supported extension points, but just want to re-confirm that we minimize changes of breaking things on our end with upgrade to a new OSB version

@martin-gaievski Good question. I think it will most likely be addressed at a later date. Right now, we don't release the benchmarks as artifacts and we hard code dependency to OSB in requirements.txt.  I think eventually we will want to transfer things to https://github.com/opensearch-project/opensearch-benchmark-workloads/ and when we do that we can ensure version compatibility.