Lost of connectivity after reboot

Hi @markdumay,
Each time i performed a reboot, i lost everything.
Docker is running but no of my container is available. I not sure what is the issue.
I solved this by restoring and upgrading all with your script.
Do you experience the same issue with reboot of your synology nas ?

Hi @siddjellali, that's odd - it's not something that I recognize on my own NAS. I updated DSM to the latest available version (Version: 6.2.3-25426 Update 3) this morning, and Docker restarted all of my containers as expected. However, I'm still on Docker version 19.03.13 and haven't updated to the latest version yet.
How did you initially start your containers? Do you use Synology's Docker UI, Portainer, Docker Compose, or another method? Does the log file /var/log/Docker/docker.log provide any clues (NB: you can switch to root with sudo -I from the command line)?

A bit off-topic, but what NAS do you own @markdumay ?
My DS916+ has the same DSM version as yours and yet the latest docker version available to me is the old 18.09.0-0513.

My NAS is a Synology DS918+ with 8GB RAM. This repository hosts a script to manually update the Docker Engine and/or Docker Compose to the latest version available (as maintained by the Docker team instead of by Synology). I developed the script to address the lack of decent Docker Swarm support by Synology's Docker package. However, the script is not supported by Synology and it does have to some drawbacks (see known issues).

Ah, ok, that explains it.
Thanks, I already knew that repository but alas my NAS is working on btrfs, so it does not work for me.
Probably the reason Synology themselves are taking more time to release v19, they usually are only one release behind.

Hi @markdumay sorry for my late reply. Very good Christmas and New Year :P
Well i have also did (automaticaly) the upgrade of my NAS in 6.2.3-25426 Update 3 during the night;
In the next morning, i noticed all my container was up but not reachable even after restart the all nas twice ^^.
When my nas reboot i have to restore with my backup and upgrade the nas again.
Maybe a specific command on your script help to refresh/reload a specific element...
Did you the upgrade to docker version 20.10.1 ?
$ docker version
Client: Docker Engine - Community
 Version:           19.03.14
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        5eb3275
 Built:             Tue Dec  1 19:14:24 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.14
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       5eb3275
  Built:            Tue Dec  1 19:21:08 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.3.9
  GitCommit:        ea765aba0d05254012b0b9e595e995c09186427f
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

$ docker-compose version
docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

No worries - hope you had a wonderful Christmas, despite Covid-19! I just finished watching "Death to 2020" on Netflix - spot on I'd say.
I'm still on the old Docker version 19.03.13 and haven't updated to the latest version yet. My docker-compose is on version 1.27.4 though. Did you have to revert back to the previous Docker version to get it up and running? And what kind of additional command / specific element to reload would you be looking for?

Hehe thanks. I hope all is well on your side too.
Did you have to revert back to the previous Docker version to get it up and running? YES
And what kind of additional command / specific element to reload would you be looking for? it's what I am looking for.
Any idea ?

Hi, for information, after a stop and start; all services go up again.
No need to reinstall anymore;
synoservicectl --stop pkgctl-Docker
synoservicectl --start pkgctl-Docker

Hi, for information, after a stop and start; all services go up again.
No need to reinstall anymore;
synoservicectl --stop pkgctl-Docker
synoservicectl --start pkgctl-Docker

Hi @markdumay for information, the last update of yesterday solved my issue;
DSM 6.2.4-25556
Docker version 18.09.8, build bfed4f5
docker-compose version 1.24.0, build 0aa59064

ok, glad to hear the issue has been solved for you!


Add configurable Github review_type with 'REQUEST_CHANGES' as default

NOTE: This PR is a replacement for PR #320 which lost its traction.
Issue
#319
Implements
Similarly to #320 this adds REQUEST_CHANGES as the default event, with some more code around the configurability and specs for that.

@gyfis sorry for the delay on getting you feedback. Could you rebase against master so we can get this merged?

@doomspork Thanks for the reminder, I rebased the code against the latest master.

Looks solid. I have doubts about REQUEST_CHANGES as a default behavior. As much as I'd prefer to keep it as REQUEST_CHANGES, I'm afraid some of our users might be annoyed that we're breaking compatibility.
@gyfis @prontolabs/core What do you think?

Agreed @mknapik. @gyfis can we swap the default behavior for now?

@mknapik That makes sense. Thanks for the review!
@doomspork Updated the code to use COMMENT as the default.

Thank you @gyfis! @mknapik any final thoughts before we merge?

@doomspork @mknapik How do you feel about this change?

Looks good @gyfis, thank you for your patience! We're definitely in need of more maintainers if you'd like to be more involved in Pronto's development 😁

Thanks for the merge @doomspork and for the offer! I'm busy (as we all are), but I'll keep it in mind 👍


Can utf-8 codes be avoided in the output?

Hi,
I am using this library in an ERP system called NetSuite.
When I get an output from LZString.compress like 㚆ࡠ왐¸ὀ阁㌀룀☁᠄ᩈ恅唐聛ō瀿\x18ţ怂Ƅސȭ쀌먈\x8D퀁띌鴣Î\uDC71큣\x0E넕챞劜⑩逄켿搀ⴘɳ쏆 NetSuite saves it like 㚆ࡠ왐¸ὀ阁㌀룀☁᠄ᩈ恅唐聛ō瀿ţ怂Ƅސȭ쀌먈퀁띌鴣Î?큣넕챞劜⑩逄켿搀ⴘɳ... and that makes the decompress function produce null.
Notice how the code \x8D for example was converted to ?
Is there a way to avoid this other than using other methods that produce longer text?
Thanks

Short answer: no
Longer answer: In order to compress to something it needs to be able to decompress it again. When there are "special" codes such as in utf8 then the library would need to understand them all for both sides of that. Unfortunately utf is an evolving standard, and that would mean having it work at the time of coding (probably!), and then break at some point in the future when new utf codes are added and they get special meaning (or conversely unknown codes that get swapped with ? get a glyph and suddenly start behaving differently).
If your code is getting z-lib compressed (ie, browser compression) then it won't make much difference using base64.

I tried compressToUTF16, and in the cases I ran it through it didn't produce codes like that. So this doesn't mean it will never produce UTF8 codes, right?
What if I replace \x before saving with something unique, then change it back before decompressing? I think this would work if there are some characters that are guaranteed NOT to be generated in the compression output by the lib. Are there such characters?

compressToCustom and decompressFromCustom should work for your usecase, if you can provide the string of allowed characters.

compressToCustom and decompressFromCustom should work for your usecase, if you can provide the string of allowed characters.

I tried it, but the length of the output is larger than compressToEncodedURIComponent's output. I thought it would be as small as compress while changing utf-8 codes with one of the characters I am passing.

I identified an issue with the custom encoders - using base64 as a proof of concept - marking them as experimental until this is fixed (it's an awkward one - but they're only implemented on here and if not going into something that saves code they can decompress the compressed content safely)

Sorry for the late reply.
I used ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
This is a simple example:
LZString.compress(`{"name": "Adam", "age": 30}`)
'㞂⁶ࡠ똊戅쀂တ䀦턀榑Ι쒀찀》'

LZString.compressToEncodedURIComponent(`{"name": "Adam", "age": 30}`)
'N4IgdghgtgpiBcACEBBAJtEAaZEDmcSAzAAwC+QA'

LZString.compressToCustom(`{"name": "Adam", "age": 30}`, `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`)
'DrMCKCAikMHoGgtMwyBEUEQ2N48HB3AO1NFWNkUDMXPLa'

@marwan-nwh Check #200 - short answer is that it's deterministic, but not the expected output when using a dictionary that is a perfect binary length - your comparison is also not valid as EncodedURI has extra processing, should be using plain base64


preloader fades out

Made the preloader smaller and fades out instead of just disappearing.

I've deleted some junk code in style.css, I guess it was made for another preloader.

I've deleted some junk code in style.css, I guess it was made for another preloader.


PowerShell module path missing

Hi,
Problem
Some PowerShell modules aren't automatically loaded by 'Microsoft.PowerShell.EditorServices.Host.exe'.
The following path isn't included : '**C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules**'
although it actually reads the x64 counterpart ('C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules').
Thanks !

Hi @MakwaWes, could you file this issue here:
https://github.com/PowerShell/PowerShellEditorServices/issues
If you have other bugs to file against the PowerShell extension for VS Code, you can file them here:
https://github.com/PowerShell/vscode-powershell/issues
Thanks!

Moved to PowerShell/vscode-powershell#36


markdown-it plugins

Fixes #940.

Super nice to support markdown-it plugins. But out of the box footnotes look bad.

I would say that this is the DIY version of #940. True support for footnotes means we'd have nice styles too, and for now this means the user has to add their own custom style.css (and cannot use themes). In other words it's a necessary step, but I don't think it's enough to really close the OP.
This also bears the question of which plugins we want to include by default. We can start with none, of course.
Besides footnotes, I think markdown-it-container would make total sense since it would allow us to use markdown in conjunction with our component classes (::: card, ::: warning, etc).
For example if we configure:
import MarkdownItContainer from "markdown-it-container";
import MarkdownItFootnote from "markdown-it-footnote";

  markdownIt: (md: MarkdownIt) =>
    md
      .use(MarkdownItFootnote)
      .use(MarkdownItContainer, "card")
      .use(MarkdownItContainer, "tip")
      .use(MarkdownItContainer, "warning")

we can get this:

::: card
That’s a _nice_ card, ain’t it? Here is a footnote reference,[^1] and another.[^longnote]
:::

::: tip
That’s a _nice_ **tip**, ain’t it?
:::

::: warning
That’s a _nice_ **warning**, ain’t it?
:::

[^1]: Here is the footnote.
[^longnote]: Here's one with multiple blocks.

    Subsequent paragraphs are indented to show that they
    belong to the previous footnote.

to render like so:

I would certainly use those.

I think we should add this now and see how people use it before adding anymore preemptively (or speculatively). Sound/look good?


How to install?

Ubuntu 20.04.3. I downloaded gdrive_2.1.1_linux_amd64.tar.gz. What's next?
I unpacked tar xzf gdrive_2.1.1_linux_amd64.tar.gz also but no install and cannot run. Not many info in Readme
gdrive about: Command 'gdrive' not found
https://askubuntu.com/questions/25961/how-do-i-install-a-tar-gz-or-tar-bz2-file didn't helped

Bonjour, tiens cadeau, j'ai eu le même soucis : https://github.com/prasmussen/gdrive/issues/580

Merci @lan7ium


Go to production 🚀🚀🚀🚀🚀

Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] This change requires a documentation update
[x] Others

Describe your changes
Issue ticket number and link
Issue number:
Issue link:
Checklist before requesting a review

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings

LGTM 🚀🚀🚀🚀🚀


Logistics

This PR adds two pages needed for a return to in person events: overall logistics and a "things to do in Seattle" page.

Want to add the map link you previously had in an earlier PR to the Logistics page?
I still have the map linking for the schedule on my TODO

@jomey can you point me to details on how to add a map?


dyld: Symbol not found: _SecTrustEvaluateWithError  when upgrade to go 1.18 in macOS High Sierra 10.13.3

What version of Go are you using (go version)?
1.18.1
Does this issue reproduce with the latest release?
Yes
What did you do?

I upgraded go from go 1.17.2 (worked well) to go1.18.1 (from go1.18.1.darwin-amd64.pkg in the official download page), then a horrible error was thrown.
My system was MacOS High Sierra 10.13.3, and I find the it's supported in the release note of go 1.17 (while go1.18 doesn't point the requirement of darwin).
It's same to https://github.com/golang/go/issues/50855. However my system met the requirement.
The problem is resolved when I upgrade my darwin to MacOS Mojave 10.14.6
What did you expect to see?
go version go1.18.1 darwin/amd64
What did you see instead?
$ /usr/local/go/bin/go version

dyld: Symbol not found: _SecTrustEvaluateWithError
  Referenced from: /usr/local/go/bin/go
  Expected in: flat namespace

[1]    67235 abort      /usr/local/go/bin/go

previously #52112

This looks like a duplicate, and perhaps solved merely by updating 10.13 to 10.13.6 or better.


Let users know that the $ char may need to be escaped when inputting system module ids to the CLI

The '$' symbol has special meaning in many shells. It would be helpful to our users if we pointed out they may need to escape $ when inputting a system module for the --module-id param. Here is a recent issue in the IoT CLI extension repo where a user ran into a problem from not escaping (which is not the only user reported issue with this root cause):
https://github.com/Azure/azure-iot-cli-extension/issues/339#issuecomment-833291947

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

ID: 014b28e4-afcd-a151-1819-1eccd31d3715
Version Independent ID: 032a4694-18d7-67eb-56bb-64078d79d6ae
Content: Troubleshoot - Azure IoT Edge
Content Source: articles/iot-edge/troubleshoot.md
Service: iot-edge
GitHub Login: @kgremban
Microsoft Alias: kgremban

Hello @digimaun Thanks for the feedback.
Our SME will review your feedback.


feat: add pico8-ls

Adding support for PICO-8 by using https://github.com/japhib/pico8-ls/
Solves https://github.com/japhib/pico8-ls/issues/34
Related - git tags needed in pico8-ls for better renovate support https://github.com/japhib/pico8-ls/issues/45

I think it'd be much better if they simply provided an npm package for it!

Agreed! Thank you for the merge


Show user-friendly error messages for Phone Auth

In Phone Auth we are sending e.getLocalizedMessage() directly to an alert dialog:
https://github.com/firebase/FirebaseUI-Android/blob/4e7bce15b2c5ca207fb3f12e4e5e1ff2dfb15ec2/auth/src/main/java/com/firebase/ui/auth/ui/phone/PhoneVerificationActivity.java#L222
The problem with this is that error messages from the server frankly suck.  So we need to do the following:

Pick a set of known error codes and make human-friendly messages for them.
Show 'unknown error' for the rest and only log the raw message to the console.

The fix for this issue has been released in v2.1.0.


Add a simple IMD unit test

Summary

Add IMD test case to verify the conversion from frequency to IMD condition is correct.
Changelist

Testing Done

Resolved Issues

Checklist
Please change [ ] to [x] when you are ready.

[ ] I have read and followed the code conventions detailed in README.md (This will save time for both you and the reviewer!).
[ ] If this pull request is longer then 500 lines, I have provided explicit justification in the summary above explaining why I cannot break this up into multiple pull requests (Small PR's are faster and less painful for everyone involved!).

@garethellis0 Addressed all the comments you left in #536, but let's keep all the new comments in this PR now since this is the PR that will contain the changes i made!

@garethellis0 Added a bunch of tests to exercise the CAN signals. Have a look and let me know what you think!


No GIM support

Was wanting to utilize this plugin to get my groups levels and rare drops sent to our discord server when they are on mobile.
Kinda doesn't watch the group chat at all.

I don't believe it looks at GIM chat whatsoever. I'd love to see this changed.

Was wanting to utilize this plugin to get my groups levels and rare drops sent to our discord server when they are on mobile. Kinda doesn't watch the group chat at all.

I don't believe it looks at GIM chat whatsoever. I'd love to see this changed so that we could get GIM chat logs.

This is resolved, awaiting runelite plugin hub team to merge in the changes. ^.^
https://github.com/runelite/plugin-hub/pull/5613


add security fix and fix bug that disabled static checks

Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA

[ ] My PR addresses the following Gobblin JIRA issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"

https://issues.apache.org/jira/browse/GOBBLIN-XXX

Description

[ ] Here are some details about my PR, including screenshots (if applicable):

Tests

[ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

[ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Codecov Report

Merging #3316 (e385d25) into master (bf37c76) will decrease coverage by 3.64%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #3316      +/-   ##
============================================
- Coverage     46.50%   42.85%   -3.65%
+ Complexity    10041     1929    -8112
============================================
  Files          2041      392    -1649
  Lines         79349    16849   -62500
  Branches       8845     2072    -6773
============================================
- Hits          36898     7220   -29678
+ Misses        39020     8831   -30189
+ Partials       3431      798    -2633

Impacted Files
Coverage Δ

...in/java/org/apache/gobblin/cluster/HelixUtils.java
32.23% <0.00%> (-5.79%)
:arrow_down:

...ache/gobblin/data/management/trash/AsyncTrash.java

...iter/stressTest/RateComputingLimiterContainer.java

...ention/profile/ModificationTimeDatasetProfile.java

...in/source/extractor/extract/FlushingExtractor.java

.../gobblin/converter/json/JsonToStringConverter.java

...va/org/apache/gobblin/source/jdbc/JdbcCommand.java

...li/GobblinServiceFlowExecutionResourceHandler.java

...apache/gobblin/writer/AcknowledgableWatermark.java

...he/gobblin/writer/GenericWriteResponseWrapper.java

... and 1642 more

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 1e03329...e385d25. Read the comment docs.

@autumnust @aplex please take a look


Visualize the simple properties of the config file

The config file editing should allow possibility to show (in split-screen, or any other way) the plain properties that are defined in the file. This should be show in the a hierarchical tree-table. This is a first step into going for the editing of the plain properties on the UI.

Perspectively we also should think about having the same view on all plain properties within an agent mapping scope


Refactor how Results are handled and implement custom error handling

I did not test this AT ALL (didn't run the server locally or anything). Just offering an idea on how you might handle success/errors and automatically convert them to status codes for all routes.
Please do not merge without testing this on your machine - as I've said, have not tested at all.

Rewriting the entire project in TS. Will save/use some of the codes for the future.


[fr] Create homepage for French localization

[ ] Localize index page to French
[ ] Create an issue label for lang:fr
[ ] Create org-level groups for fr approvers
[ ] Update code/component owners

I am volunteering to help out with this.

Thank you @iguitton and @dmathieu! Happy to get the French localization started! 🎉 🇫🇷

Add me to the reviewers as well! 💙🤍❤ (<-- sorry, it's the only way I found to get a French emoji flag)

I would be happy to pitch in and help as well!

+1, happy to help reviews!

You can add me as a reviewer.

Plus on est de fous, plus on rit (the more, the merrier).
Please add me as reviewer as well.

Seems we have a big french speaking community as well, exciting! I will tag you all when we will create the team, this will be the next step after merging https://github.com/open-telemetry/opentelemetry.io/pull/5386, which you all by the way can review and approve already :-)

You can also add me as a reviewer


Smart-Content "system-properties" can be overriden by "properties" xml-config

We should provide a "sulu" namespace for "system-properties" like title, created, ...

this PR starts discussion for that https://github.com/sulu-io/sulu/pull/1285

seems to be no problem so we can close this issue


Won't run

I have that windows thing already installed, I'm not sure why it's happening

What's the latest version of it you have installed?

Try installing this one: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.21-windows-x64-installer?cid=getdotnetcore

Try installing this one: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.21-windows-x64-installer?cid=getdotnetcore

he has both 6.0.21 and an older one

he has both 6.0.21 and an older one

They have the .NET runtime for 6.0.21, not the desktop runtime for 6.0.21.

oh my bad then

Issue has been awaiting clarification for over a month, closing as stale. If you have anything further to add, just respond and I'll reopen.


Extension to capture denominator-exception

currently in a summary MeasureReport, users are unable to parse out which DenominatorException patients are a part of qpp's definition of denominatorException that is required to be reported because they are inDenominator, inDenominatorException, and inNumerator.
In order to map to qpp json reports from MeasureReport's independently calculated populations in CQM sets defined here: https://build.fhir.org/ig/HL7/cqf-measures/measure-conformance.html#proportion-measure-scoring
I need an extension similar to ones defined in https://github.com/cqframework/clinical-reasoning/issues/400
for total-denominator and total-Numerator. This would track patients that are inDenominatorException and are considered in calculation of MeasureScore.

https://jira.hl7.org/browse/FHIR-44736


Getting the heading number of a Word section heading

This is in the same line as issue #471 and #590 among many more such issues. Can you please help me in getting the number of a Word section heading? Since there a popular demand for this feature will someone implement it if it has not been implemented? Otherwise, if it has already been implemented, please let me know the technique of fetching these numbers and/or letters.

any news?

I made a simple one which actually does not get/read auto-generated heading number. In stead, it generates all new  heading number, so the result may be different from that we read in WORD. However it meets my need
import sys
from docx import *

document = Document(r"test.docx")

MAX_HeadingLevel = 7
lstSevenZeros = [0] *MAX_HeadingLevel
lstHeadingNumber = [0] * MAX_HeadingLevel

def makeNumber():
    return '.'.join([str(i) for i in lstHeadingNumber if i])

for para in document.paragraphs:
    if para.style.name in ['Heading %i' % i for i in range(MAX_HeadingLevel)]:

        intTmp = int(para.style.name.split(' ')[1])
        lstHeadingNumber = (
            lstHeadingNumber[:intTmp-1] +
            [lstHeadingNumber[intTmp-1] + 1]
            + lstSevenZeros
        )

        text = makeNumber() + ' ' + para.text
        print('    ' * (intTmp-1), text)

@retsyo  How can we update these heading numbers to the same docx files?

Has there been any update? It should not be too difficult to implement @retsyo idea into a python-docx functionality, is it?


Custom LLM and Embedding

Hi!
Can we use custom LLM and Embedding models with it?
Thanx

I recently published a package llm-client that can be very helpful in enabling the support to run other LLM models, including OpenAI, Google, AI21, HuggingfaceHub, Aleph Alpha, Anthropic, Local models with transformers.

Thanks for sharing the codes that have very user-friendly simplified APIs.
First of all, why created the ChromaDB class when LangChain have Chroma class? You can find more information at https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/chroma
By the way, I forked the repo and the following points are written near the top of the readme:
https://github.com/limcheekin/embedchain

This is the fork of Embedchain to run with OpenAI API compatible llama-cpp-python Web Server. Hence, you can run the Embedchain with any LLMs supported by llama-cpp-python package.
The notebook embedchain.ipynb is created to quick test the integrations is working fine. It is tested with orca-mini-7b.ggmlv3.q4_0.
Use of HuggingFaceEmbeddings(model_name="intfloat/e5-large-v2") instead of OpenAIEmbeddings as the embedding endpoint of the llama-cpp-python Web Server is too slow and using too much compute resources to be usable. Hence, you need to install additional dependency, the sentence_transformers package in order to run the notebook successfully.

You can review all my changes in a single commit.
I'm happy to work out a proper pull request if you're interested to merge my changes.
Thanks.

Can the LLMs be replaced with Open commercial LLMs like Dolly in place of OpenAI? (from Ranganathan Rajkumar on linkedin)

linkedin comment link

Yes, you can replace the OpenAI to any open source commercial friendly LLMs listed at https://github.com/eugeneyan/open-llms, including Dolly.
Besides that, you need to replace the text embedding model of OpenAI such as text-embedding-ada-002 to the open source alternatives listed at https://huggingface.co/spaces/mteb/leaderboard.
That's what I did for the chatbot I'm working on currently.
The challenges is find the right models that fulfilled with your use cases and requirements with acceptable quality for given constraints in resources such as computes, memory and storage.
(I replied to the linkedin link too)

For you information, I created a project at https://github.com/limcheekin/open-text-embeddings.
The following is short description extracted from the readme:

The goal of this project is to create an OpenAI API-compatible version of the embeddings endpoint, which serves open source models such as intfloat/e5-large-v2, sentence-transformers/all-MiniLM-L6-v2, sentence-transformers/all-mpnet-base-v2, and other sentence-transformers models supported by the LangChain's HuggingFaceEmbeddings class.

Please see the readme on how to use it in your project. By the way, I just added support for https://tfhub.dev/google/universal-sentence-encoder-large/5, please checkout the universal_sentence_encoder branch of the repo.

I'm trying https://github.com/oobabooga/text-generation-webui/  as a backend since it supports LLaMa-2 and exposes it at http://<IP_ADDRESS>:5001/v1
Now how do I point embedchain at it?
I only see in README to do:
import os

  from embedchain import Llama2App

  os.environ['REPLICATE_API_TOKEN'] = "REPLICATE API TOKEN"

  zuck_bot = Llama2App()

  # Embed your data
  zuck_bot.add("youtube_video", "https://www.youtube.com/watch?v=Ff4fRgnuFgQ")
  zuck_bot.add("web_page", "https://en.wikipedia.org/wiki/Mark_Zuckerberg")

We now support most of the popular llm providers so will close this issue now.


Screenshot doesnt match the text

The Azure AD connector is named aaddscontoso.onmicrosoft.com - AAD.
The screenshot shows: contoso.onmicrosoft.com

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

ID: dedc709c-19ce-e83b-dae8-7cc18793632e
Version Independent ID: 1f14d8cc-761d-1cf3-e40a-6a8774b7e812
Content: Enable password hash sync for Azure AD Domain Services
Content Source: articles/active-directory-domain-services/tutorial-configure-password-hash-sync.md
Service: active-directory
Sub-service: domain-services
GitHub Login: @iainfoulds
Microsoft Alias: iainfou

Thanks for the feedback! We are currently investigating and will update you shortly.

@iainfoulds Can this be checked and changed ?


#1930 Celero Initial Port

Adding the Celero Microbenchmark Library.
See GitHub page for package details: https://github.com/DigitalInBlue/Celero
Reference talk at CPPCon 2017.
Licence agreements have been signed with Microsoft for inclusion into vcpkg.

Thanks a bunch for making this PR!
I made a few tweaks while merging:

I switched to using the newer and spiffier vcpkg_from_github(), which enables vcpkg install celero --head to grab the latest version
Pulling from master would instantly break the hash check whenever you make another commit, so instead I've changed it to pull the most recent tag (v2.1.0)
In my tests, it builds fine with Ninja, so I re-enabled PREFER_NINJA (it's a teensy bit faster :))


Adding application on Linux.

You know what would be great? Adding the app for Linux users too!

This repository, however, is for macOS, and this issue does not belong here.


Removing RBAC Rules

What steps will reproduce the problem?
We have a usual workflow step that consist of git commit with DB migrations (it can be regarded as kind of unit of work). This commit goes to CI which do a magic with tests and deployment.
And now we want to remove unneeded \yii\rbac\Rule from file system and DB in one step (one commit). It is quite logical to remove RBAC Rules from DB via migration using a \yii\rbac\DbManager.
Files must be updated first to run migration and this action deletes Rule class file.
What is the expected result?
A Rule can be successfully deleted from DB after its class was deleted from file system.
What do you get instead?
Error. Because the Rule's data can not be unserialized without the class.
Additional info
I think it's a kludge to make such Rule removal by doing 2-step-deployment or remove it from DB manually.

Q
A

Yii version
2.0.9

PHP version

Operating system

How do you propose to do it in a single commit?

I propose to give RBAC Manager an ability to remove rules and items directly by name.
If I haven't lost sight of something, in the default implementation \yii\rbac\BaseManager::removeItem and \yii\rbac\BaseManager::removeRule uses object argument to take the name from it only.

its could be made public:
and could be made to accepts object-or-string.
In case of string argument it could be interpreted as a rule or item name.

The seconds option is to add public helper methods like remove[Item|Rule]ByName.

A Rule can be successfully deleted from DB after its class was deleted from file system.

I think it's wrong and should always be other way around i.e. if rule is still in DB but its class is missing you'll get an exception.

I agree that there should be an exception when a DB rule exists but the file doesn't. I'm not talking about any automatic deletion.
I mean there should be a safe and proper way to get rid of DB part of a rule if its class already doesn't exists any more.
The problem now is that we must pass an object of a rule to the remove method, but due to the class doesn't exists any more, the object neither can be created manually, nor can be fetched via RBAC manager (it can't be properly unserialized). So it is actually no standard way to remove the rule in this case.

Your case already causes trouble. If you're removing PHP class first, you'll get error from the moment it's removed till the moment migrations are applied. As I said, it should be other way around:

Remove all usages of the rule from hierarchy.
Remove class itself.

Remove all usages of the rule from hierarchy.
Remove class itself.

It's unable to do this in one step as I described.
Please do not focus on the case itself, it's special. I mentioned unit of work and CI. Just imagine it happens very fast with all possible blockings on the upgrade time, and nothing happens between removing the file and the rule from DB. I think it is a programmer responsibility what to do with sharpened tool. =)
I'm talking about how to remove rule from hierarchy by name only, without creating rule object. It is safe, so why not to allow it?
Аfter all there is always may be a situation of inconsistency when file is deleted (accidentally maybe) and DB part was forgotten. How to just drop it with rbac manager?

I don't like the idea of exposing raw deletion like that:

It's pretty special case which (at least I think so) isn't general enough.
It would result in exposing everything else with raw names making interface less strict.

@yiisoft/core-developers need opinions.

It's unable to do this in one step as I described.

There is a workaround: you could attach copy of declaration of removed class in migration.

Migrations should not use code from the application that is subject to change. If you have a migration that adds a Rule class you can not run that migration when you have removed the class so you break your migration system. See the "Note" under this headline: http://www.yiiframework.com/doc-2.0/guide-db-migrations.html#db-accessing-methods


Requested message not triggered

I'm testing the TriggerMessage from the Central System to the Charge Point. But the Charge Point doesn't send the requested message.
Central system:
async def trigger_message(self):
        request = call.TriggerMessagePayload(
            requested_message = MessageTrigger.bootNotification,
        )
        response = await self.call(request)
        if response.status == TriggerMessageStatus.accepted:
            print("Request accepted!!!")

Charge Point:
@on(Action.TriggerMessage)
    async def on_trigger_message(self, **kwargs):
        return call_result.TriggerMessagePayload(
            status = TriggerMessageStatus.accepted
        )

Log:
INFO:ocpp:Test_CP1: receive message [2,"5494e4e1-0c7c-4403-aa99-600285076498","TriggerMessage",{"requestedMessage":"BootNotification"}]
INFO:ocpp:Test_CP1: send [3,"5494e4e1-0c7c-4403-aa99-600285076498",{"status":"Accepted"}]

The Charge Point receives the request but never sends the BootNotification message.
Is there something else I need to do to allow the Charge Point to send the  requested message?
Thank you.

Your implementation only returns a response, but doesn't do anything else. You've to implement all logic yourself.
@after might be use full here.


How to set position label radar chart. in Swift .

please be more specific

EX:   ChartLegend *l = _chartView.legend;
l.position = ChartLegendPositionRightOfChart;
error ChartLegendPositionRightOfChart no class in swift

@objc
public enum ChartLegendPosition: Int
{
    case RightOfChart
    case RightOfChartCenter
    case RightOfChartInside
    case LeftOfChart
    case LeftOfChartCenter
    case LeftOfChartInside
    case BelowChartLeft
    case BelowChartRight
    case BelowChartCenter
    case AboveChartLeft
    case AboveChartRight
    case AboveChartCenter
    case PiechartCenter
}

it's there.

Thank you for helping me.

Can you help me.
How to add check box follow image ?

that's something beyond this project. A checkbox can be implemented in many ways. StackOverflow is the better place to ask.


[Question] Extensions

How does this behave with Extensions like translator, Text to voice, webcam, etc... ?

I think it should work the same as in the editor

Alright thanks


Revive mem_stats.sh

The tool became bitrotten. Bringing it up-to-date to handle the
output of jerry and rss-measure.sh properly.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss<EMAIL_ADDRESS>

I think the combination of  mem_stats.sh and run-perf.shwould be a great tool. The current method used in run-perf.sh for memory measurement is quite inaccurate. Apart from that, this path looks good to me.

Landed (9c124e263436968f169de9df2b45ccb2473ddcc1)


Typo in section #9 - heiranchy

There is a stentence using the word heiranchy:

Hit alt-enter add suspend modifiers to all functions in the heiranchy

It should be:

Hit alt-enter add suspend modifiers to all functions in the hierarchy

Thanks for the bug report! This is fixed now.


Autoformat doesn't work with non *.rb files

When I am working with non .rb files, like thor, Rakefile, rb executable, the autoformat does not work even when activated with :RufoOn.

Looks like this is configured here: https://github.com/ruby-formatter/rufo-vim/blame/master/plugin/rufo.vim#L33

Just add this to your vimrc in the meantime:
augroup RufoAutoFormat
  autocmd!
  autocmd BufWritePre *.rb,*.rake silent! call rufo#AutoFormat()
augroup END


Issue: Sweet Alert 2 problems

Sweet Alert 2 CDN not working out of the box, as intended...
We can correct this by changing the CDN file, but the fonts get too small because adminlte use bootstrap 3, and sweetalert 2 probably expecting bootstrap 4 bigger font size...
Possible Actions:
1 - Only change CDN (small sweet alerts)
2 - Change CDN and fix font sizes (but that will require extra css in master or extra CSS file)
3 - Add Sweet alert in plugins as an asset (and add the extra fix css file in the folder)
3 - Remove Sweet Alert 2 plugin from default plugins
What do you think?

for now, i'm use like this
@section('js')
    <script type="text/javascript">
        swal('Error!', 'Do you want to continue','error')
    </script>
@stop

If option 1 works, we should do this.


Remove duplicated details from ReadMe.md that is already and should be in UserGuide.md

Reduce workload of updating the same descriptions across two different files
ReadMe.md will be focused on highlighting and marketing our most important features

ReadMe has been updated by @Statspadders


Write extension sources into an Extensions subdirectory

When testing the 0.1 generator out, I decided that I wasn't quite a fan on having extensions left in the top-level of the output directory since it made things look a little messy and disorganised.
Instead, I'm proposing that we nest them in their own directory named Extensions to keep things a little more organised.

Before
After

I also think this aligns a bit better with how other generators work, for example the openapi-generator does this (for Android):

WDYT @LePips? When generating with mergeSources, they'll continue to be embedded inside Paths.swift and Entities.swift

Think it looks good 👍


Typing warnings in IDE on Client methods

Hi. I get warning on aiomqtt.Client methods' calls.
Here are the warnings:

Here's a full example of source code:
async def main(mqtt_topic: str):
    logger: logging.Logger

    async with Client(
        hostname=lorem,
        port=lorem,
        username=lorem,
        password=lorem,
        transport=lorem,
        websocket_path=lorem,
        tls_params=lorem,
        tls_insecure=None if not Config.enable_tls else False,
    ) as client:
        logger.debug("Connected")

        async with client.messages() as messages:
            logger.debug("Subscribing on %s/#", mqtt_topic)

            await client.subscribe(f"{mqtt_topic}/#")

            logger.debug("Subscribed on %s/#", mqtt_topic)

            async for message in messages:
                logger.debug("Received message on %s: %s", mqtt_topic, message.payload)

Also, as an optional feature, it's much expected to have typing on message in each iteration, while looping through client.messages.

My Environment:
PyCharm 2023.3.2
Python 3.11.3
aiomqtt==1.2.1
paho-mqtt==1.6.1
OS: Both Ubuntu 22.04 and Windows 11

The problem of pycharm. It is recommended to use vscode to open it.
Vscode uses pyright for type detection.

Here's some more context: https://github.com/sbtinstruments/aiomqtt/pull/211#issuecomment-1545494330
I don't think we can fix this from our side, that has to be done in PyCharm.


Notification on Android does not switch back to app

Hello there, I am experiencing an issue on Android, when I tap on a new notification the application does not switch back to front.
Did someone already experienced that ?
Best regards, Olivier

@Oliv nope, never seen that ever. Are you buy chance editing your AndroidManifest.xml to change the android:launchMode?

@macdonst  I think the problem is here. I was in singleInstance mode, tried all options but still no good result. When I tap the notification, I get the right notification event in the app, but not the app brought back to front. Do you know what are the right configs ?
Regards, Olivier

It works now, solved it using singleTask param ! Thanks a lot


Feature requests: Spillover menu for new MBP with notch and spacing expands when opened

A couple of things to request: On the new MBP with the notch, I was wondering if there is a way to implement a dropdown menu as the last menubar item before the notch to spill over any icons that can't fit on the menu bar? Might be something that could be used on notch-less displays as well if needed.
The second request is to have an option to not increase the spacing of the menu bar when the hidden items are opened on macOS Monterey. I have found that this happens on my main display, but not external displays so it may be a bug.
Device Details

OS: macOS 12.01
Device: MacBook Pro (14-inch, 2021)
App version: 1.8 (12)

Thanks!

have an option to not increase the spacing of the menu bar when the hidden items are opened on macOS Monterey

I think this is covered/duplicated by #180 issue :)

Apologies for the duplication of #174. Hopefully, the dropdown menu suggestion is not a duplicate

Another alternative would be an option where Hidden Bar hides the items to the right of the arrow when activated. That way there's likely no risk of overflow, and it's not like (at least for me) we're interested in what's normally showing when opening the others.
This would also sort my main current issue - Hidden Bar and its alternatives is literally what's causing my overflow - space is precious and an additional three icons is more than can fit since iStat takes up most space for me.

The problem with the new notched computers' Monterey menu bar is that the 40% of real estate is significantly reduced compared to before.

You only ever get 40% of the space. on a non-notched computer, the space could be as high as 70% or more if you merely swap to an app that has few menus in the bar. Not flexible like this with the notch at all.
Due to the taller size of the menu bar (to accommodate the size of the notch), the padding applied to icons is increased. This actually serves to further reduce the available real estate, since fewer icons (of the same size) can be fit in the same horizontal space if the padding became larger.

As-is now, the logic of Hidden Bar is not helpful on these computers. Because the behavior of the menu bar on these computers is such that the left most icons simply get dropped if they do not fit, since hidden bar's logic does not allow in any way for making RIGHT MOST icons hidden, this app cannot in its current form be used as a tray to store more icons than would normally fit in the first place. Indeed the way it works now, the use of Hidden Bar guarantees a reduction in real estate in the menu bar. Its only purpose can be to "reduce clutter", which is certainly a laudable goal, but it surely is lower on the priority list than "not make it impossible to access items", which is the showstopping ux problem a lot of us with these computers are currently trying to address.
SUGGESTION:
Allow an option to adjust Hidden Bar such that a group of icons on the right side can be toggled (rather than the left side). This would combine nicely with built-in truncation behavior (which happens on the left) to allow us to use hidden bar as a way to access all of our icons (provided that they would fit in ~70% of the width in total)

re: original topic, the spacing changing from right-aligned to justified when you near filling the space is built-in menubar behavior, and I find it aggravating as well. But it seems to be a feature not a bug courtesy of Cupertino, and sort of unrelated to the general issue of there not being enough damn space in there for stuff.

This would be awesome to see as a new feature!
Bartender4 solves it like this:

This would be a great addition for people who use the new MacBooks. macOS's native handling of menubar icons covered by the notch is just simply unacceptable. Using a menubar manager like Hidden Bar simply makes the issue worse. They do make the menubar clean, but at the cost of adding to new icons to the menubar. This pushed other menubar app icons into the notch area, thereby making products like Hidden Bar a frustrating experience on the new MacBook. On one hand, you want the clean UI provided by Hidden Bar, but on the other hand it comes the cost of making certain menubar app icons 100% inaccessible.
It's a pity that Hidden bar has to add a specific handling for this, when macOS should have handled it natively.


quit

Hi Jakob,
The quit command does not work when I start the engine from the command line and issue first the 'uci' command, then the 'quit' command. It does work after a second 'quit' and it also works if I issue it without 'uci'.
Also, it takes a long time (several seconds) to load/quit under Fritz 17. And my screen flashes while doing so.
This is the simple release version.

Hi,
the initial quit command just left the UCI protocol and dropped back into the main program. I changed it that quit always exits the program completely. The new prebuild binaries are now in releases. The master branch contains this change as well, if you want to clone and build yourself.
I have no issues regarding load/quit times when testing with Arena Chess. Maybe it was caused by the quit command not working properly? After which UCI command occurs the delay? Note that even the simple version used 3-threads - maybe the delay was caused by engines competing for CPU time.

Yes, now quit works as expected. The load/quit delay  has also gone. Thanks for your quick reaction.


Fix Session Fixtures With on Id

If a test uses only fixtures without ids -- that cannot happen if the "mpi_ranks" fixture is used -- _get_identifier previously raised an AttributeError because callspec was not found.

Looks good. Can you please one bullet point summarizing the fix into CHANGES.rst under the (not yet existing) Version 0.2 headline?


Support MIDI Outputs

In my current fun project, I want to use MIDI signals for my DAW software and Automate stuffs....

I'm afraid this would be beyond the scope of PyAutoGUI, which only deals with keyboard input. Also, MIDI is well outside the areas of my expertise and a bit too specific for a GUI automation library like PyAutoGUI.


Map localization when zooming in

Fixed in https://github.com/Couchers-org/maps/commit/0b48bf9a2ccbf6d8e9fecf7a97419e03cf48d3c6


Unable to Assign Issue Assignee to On Premise Jira

The Ticket are created by Aqua Postee, yet the assignee cannot be assigned.
The assignee info are configured in the cfg.yml

Does Postee support on Premise Jira Server ?

The User Search api for Jira Cloud is not applicable to Jira Server.  Which API does
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-user-search/#api-rest-api-2-user-search-query-get
https://docs.atlassian.com/software/jira/docs/api/REST/8.5.5/#api/2/user-findUsers

GET /rest/api/2/user/search/query resulting error when sending to the on premise Jira.

For the assign issue api, they share the same api.
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-assignee-put
https://docs.atlassian.com/software/jira/docs/api/REST/8.5.5/#api/2/issue-assign

@qhe6 can you check the latest Postee "main" branch?


fix(tagsInput): Only updating model through ng-model

Not setting tags explicitly as that circumvents ng-model and can create invalid models on parent, especially when model hasn't been loaded yet (scope.tags === undefined). Removed test for testing just that and defaulted .tags to be [] in tests for them to work the way they were written. Also defaulted to updating BOTH through ngModel and direct 2-way angular binding on tags, since otherwise a lot of tests would have broken.
Can break code that relies on their model being initialized indirectly by tagsInput. Closes #320

Could you rebase your PR on top of the master branch?

Any update on this?

done

I see that you have merged the master branch into your own. Could you undo that and rebase your branch on top of the master branch? Let me know if you need assistance doing that.

sorry...created this one instead https://github.com/mbenford/ngTagsInput/pull/394


Is it possible to use croppie to crop an image stored in canvas?

I'm Trying to write a tool for one of our departments to use that takes a photo, and crops it to a predetermined size (200x300). I have a working version that does this with the middle of the video frame, but it requires the user to wrangle the camera to fit the subject in the middle of the frame or have them move around until they're framed up right. I want to change this to allow the user to pan/zoom the finished image to fit the subject in with minimal posing/wrangling of the camera.
right now my code takes the photo and writes it to canvas, I want to then be able to crop it in canvas, but I can't find a dirt-simple tool that lets me do this. Croppie comes the closest, but I can't figure out how I can get it to work with canvas data as opposed to an imported image. Any help would be great.
Example Link

Link:Codepen

Specifications

Browser: Firefox
Version:62.0.2

You could convert your image to base64, and set the base64 data as the 'imageUrl'.

Gonna go ahead and close this, I ended up learning javascript and writing my own tool from scratch :) It should be on my github soon.


Internal Terminology sever not working in github actions

Caused by: org.hl7.fhir.utilities.SimpleHTTPClient$HTTPResultException: Invalid HTTP response 404 from http://localhost:8082/matchboxv3/tx-reg/resolve?fhirVersion=4.0&url=urn%3Aietf%3Abcp%3A47&usage=validation&nocache=1712698406607 (null) (Response in /tmp/http-log/fhir-http-2.log)

the validation call seems to work from the client to the matchbox server, however the terminology call from within the matchbox server itself seems to fail
https://github.com/ahdis/matchbox/actions/runs/8614498842
https://productionresultssa4.blob.core.windows.net/actions-results/53b24acd-3b7b-4f44-bd43-10baf89c2bf4/workflow-job-run-c892508d-390a-5765-0ad0-b341c7fd0dd4/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-04-10T06%3A45%3A15Z&sig=E6r1NtfiA4ygmTOk6cw4fMIDhpDskzbxPCKZy8G8xQ8%3D&sp=r&spr=https&sr=b&st=2024-04-10T06%3A35%3A10Z&sv=2021-12-02

The official terminology server also responds with an error 404 for that call: https://tx.fhir.org/r4/tx-reg/resolve?_format=application/fhir+json
It seems to be still unimplemented there.
The issue is a bad lock in Lucene files:
2024-04-09T21:33:52.4350234Z 2024-04-09 21:33:52.392 [Hibernate Search - default backend - Worker thread - 0] WARN  o.h.s.b.l.l.w.i.IndexWriterProvider [IndexWriterProvider.java:92] HSEARCH000052: An index writer operation failed. Resetting the index writer and forcing release of locks. Context: index 'ResourceTable'

2024-04-09T21:33:54.4195196Z org.springframework.orm.jpa.JpaSystemException: Unable to perform afterTransactionCompletion callback: HSEARCH800024: Unable to index documents for indexing after transaction completion: HSEARCH700124: Indexing failure: HSEARCH600016: Unable to index entity of type 'ResourceTable' with identifier '1' and tenant identifier 'null': Lock held by this virtual machine: /home/runner/work/matchbox/matchbox/matchbox-int-tests/target/lucenefiles/ResourceTable/write.lock

2024-04-09T21:33:54.9094145Z Caused by: org.hibernate.search.util.common.SearchException: HSEARCH600016: Unable to index entity of type 'ResourceTable' with identifier '1' and tenant identifier 'null': Lock held by this virtual machine: /home/runner/work/matchbox/matchbox/matchbox-int-tests/target/lucenefiles/ResourceTable/write.lock
2024-04-09T21:33:54.9096953Z Context: index 'ResourceTable'
2024-04-09T21:33:54.9097982Z 	at org.hibernate.search.backend.lucene.work.impl.AddEntryWork.execute(AddEntryWork.java:36)
2024-04-09T21:33:54.9099586Z 	at org.hibernate.search.backend.lucene.work.impl.AddEntryWork.execute(AddEntryWork.java:17)
2024-04-09T21:33:54.9101606Z 	at org.hibernate.search.backend.lucene.orchestration.impl.LuceneBatchedWorkProcessor.submit(LuceneBatchedWorkProcessor.java:63)
2024-04-09T21:33:54.9103997Z 	at org.hibernate.search.backend.lucene.orchestration.impl.LuceneBatchedWork.submitTo(LuceneBatchedWork.java:26)
2024-04-09T21:33:54.9106063Z 	at org.hibernate.search.backend.lucene.orchestration.impl.LuceneBatchedWork.submitTo(LuceneBatchedWork.java:14)
2024-04-09T21:33:54.9108092Z 	at org.hibernate.search.engine.backend.orchestration.spi.BatchingExecutor$BatchWorker.work(BatchingExecutor.java:189)
2024-04-09T21:33:54.9110063Z 	at org.hibernate.search.engine.backend.orchestration.spi.SingletonTask$RunnableWrapper.run(SingletonTask.java:199)
2024-04-09T21:33:54.9111669Z 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
2024-04-09T21:33:54.9112889Z 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
2024-04-09T21:33:54.9114505Z 	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
2024-04-09T21:33:54.9116556Z 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
2024-04-09T21:33:54.9118064Z 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
2024-04-09T21:33:54.9119259Z 	at java.base/java.lang.Thread.run(Thread.java:1583)

Multiple solutions seem to exist for this issue:
https://stackoverflow.com/questions/49251998/spring-boot-integration-test-failes-due-to-lucene-lock-when-using-hibernate-sear
https://stackoverflow.com/questions/10248598/clearing-locks-between-junit-tests-in-hibernate-search-4-1

Set hibernate.search.default.exclusive_index_use=false: the lock is released after each transaction (this implies performance penalties)
Mark tests with Spring's @DirtiesContext: Spring will recreate the context between each tests instead of reusing what can be reused (this implies performance penalties)
Set hibernate.search.backend.directory.type=local-heap: move Hibernate/Lucene's indexes to memory (it may fill the memory if too much data is stored)
Set hibernate.search.backend.directory.root=...: move Hibernate/Lucene's indexes to the specified directory.


mocking call with no return value does not work

Hey. I can't find a way to mock a call which doesn't return a value. It may be that I am just passing the wrong thing to mockCall, but I can't find any documentation about what the right thing to pass is. Calls with a return value work as expected.
I have tried passing abi.encode(), "", and an empty variable initialised with bytes memory x;.
Reproduction case:
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;

import {console2 as console} from "forge-std/console2.sol";

interface IFooer {
    function foo() external;

    function fooWithParam(uint256) external;

    function fooWithReturn() external returns (uint256);

    function fooWithParamAndReturn(uint256) external returns (uint256);
}

contract Contract {
    IFooer public fooer;

    constructor(address fooAddr) {
        fooer = IFooer(fooAddr);
    }

    function foo() public {
        fooer.foo();
    }

    function fooWithParam() public {
        fooer.fooWithParam(1);
    }

    function fooWithReturn() public {
        uint256 result = fooer.fooWithReturn();
        console.log(result);
    }

    function fooWithParamAndReturn() public {
        uint256 result = fooer.fooWithParamAndReturn(1);
        console.log(result);
    }
}

Test:
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;

import "forge-std/Test.sol";
// import {Vm} from "forge-std/Vm.sol";
import {IFooer, Contract} from "../src/Contract.sol";

contract ContractTest is Test {
    Contract public c;
    address mockAddr = 0xa8C254850E5F54393c8a99D3bc32d759c596D648;

    function setUp() public {
        c = new Contract(mockAddr);
    }

    function testFoo() public {
        vm.mockCall(
            mockAddr,
            abi.encodeWithSelector(IFooer.foo.selector),
            abi.encode()
        );
        c.foo();
    }

    function testFooWithParam() public {
        vm.mockCall(
            mockAddr,
            abi.encodeWithSelector(IFooer.fooWithParam.selector, 1),
            abi.encode()
        );
        c.fooWithParam();
    }

    function testFooWithReturn() public {
        vm.mockCall(
            mockAddr,
            abi.encodeWithSelector(IFooer.fooWithReturn.selector),
            abi.encode(123)
        );
        c.fooWithReturn();
    }

    function testFooWithParamAndReturn() public {
        vm.mockCall(
            mockAddr,
            abi.encodeWithSelector(IFooer.fooWithParamAndReturn.selector, 1),
            abi.encode(123)
        );
        c.fooWithParamAndReturn();
    }
}

Result:
Running 4 tests for test/Contract.t.sol:ContractTest
[FAIL. Reason: Revert] testFoo() (gas: 15869)
[FAIL. Reason: Revert] testFooWithParam() (gas: 16076)
[PASS] testFooWithParamAndReturn() (gas: 19152)
[PASS] testFooWithReturn() (gas: 18945)
Test result: FAILED. 2 passed; 2 failed; finished in 446.21µs

As an aside, it would be good to include a failure reason in this case, as tracking this down in a complex contract was more difficult. Running at max verbosity has no info in the trace about the mock function being invoked:
Running 4 tests for test/Contract.t.sol:ContractTest
[FAIL. Reason: Revert] testFoo() (gas: 15869)
Traces:
  [223698] ContractTest::setUp()
    ├─ [166939] → new Contract@0xce71065d4017f316ec606fe4422e11eb2c47c246
    │   └─ ← 722 bytes of code
    └─ ← ()

  [15869] ContractTest::testFoo()
    ├─ [0] VM::mockCall(0xa8c254850e5f54393c8a99d3bc32d759c596d648, 0xc2985578, 0x)
    │   └─ ← ()
    ├─ [5021] Contract::foo()
    │   └─ ← ()
    └─ ← ()

Please file an issue in the Foundry repository, this is not related to the book.

@onbjerg can you re-open this to update the documentation on the book?

Yes, you need to upgrade forge and then passing abi.encode() as the last param should work. Ideally there would be an override for mockCall which had no data param though.
Either way, it should definitely be in the docs.


Format Date does not appear to give correct results for non-US locales

Locale is set as English (AU), but it appears to be interpreted as en-us, so instead of returning 9th November, it returns 11th September.

I have the same problem using Europe/Rome as TimeZone.
If i want to get a correct date i have to use "utc-2" and this is insane !!!


regression in async handling in tests

In the 1.26 rc 17, this test passes:
// @dart=2.9
import 'dart:async';
import 'package:flutter_test/flutter_test.dart';

Future<void> main() async {
  tearDown(() async {
    await ensureLoaded();
  });

  testWidgets('ensureLoaded', (tester) async {
    await ensureLoaded();
  });
}

Future<void> _theFuture;

Future<void> ensureLoaded() async {
  if (_theFuture != null) {
    return _theFuture;
  }

  Future<void> loadInternal() async {
    await null;
  }

  _theFuture = loadInternal();
  await _theFuture;
}

But this test times out:
// @dart=2.12
import 'dart:async';
import 'package:flutter_test/flutter_test.dart';

Future<void> main() async {
  tearDown(() async {
    await ensureLoaded();
  });

  testWidgets('ensureLoaded', (tester) async {
    await ensureLoaded();
  });
}

Future<void>? _theFuture;

Future<void> ensureLoaded() async {
  if (_theFuture != null) {
    return _theFuture!;
  }

  Future<void> loadInternal() async {
    await null;
  }

  _theFuture = loadInternal();
  await _theFuture;
}

A very similar issue is blocking the internal google roll against master.

On stable (1.22.6 with Dart 2.10.5), just changing:
  if (_theFuture != null) {
    return _theFuture;
  }

to:
  if (_theFuture != null) {
    return await _theFuture;
  }

causes the test to timeout.

This was caused by https://github.com/dart-lang/sdk/commit/14032a6209e091dcd755582aa0edfa6a860427da
I'd like to get a repro that doesn't involve flutter_test, and see if this behavior change was fully anticipated by the upstream CFE change. If so, we probably want at least some kind of lint to guard against this, if not we want to fix it upstream.
This is a P0 because it is blocking the flutter roll.

// @dart=2.12
import 'package:test/test.dart';
import 'package:fake_async/fake_async.dart' hide fakeAsync;

Future<void> main() async {
  tearDown(() async {
    await ensureLoaded();
  });

  test('without ft', () async {
    FakeAsync()
      ..run((FakeAsync localFakeAsync) async {
        await ensureLoaded();
      })
      ..flushMicrotasks();
  });
}

Future<void>? _theFuture;

Future<void> ensureLoaded() async {
  if (_theFuture != null) {
    return _theFuture!;
  }

  Future<void> loadInternal() async {
    await null;
  }

  _theFuture = loadInternal();
  await _theFuture;
}

fails with just FakeAsync. See if I can distill further.

Without FakeAsync:
// @dart=2.12
import 'dart:async';
import 'dart:collection';

import 'package:test/test.dart';

Future<void> main() async {
  tearDown(() async {
    await ensureLoaded();
  });

  test('without ft', () async {
    final Queue<void Function()> microtasks = Queue<void Function()>();
    final Zone zone = Zone.current.fork(
      specification: ZoneSpecification(
        scheduleMicrotask: (_, __, ___, microtask) {
          microtasks.add(microtask);
        },
      ),
    );

    zone.run(() async {
      await ensureLoaded();
    });

    print(microtasks);
    while (microtasks.isNotEmpty) {
      microtasks.removeFirst()();
    }

  });
}

Future<void>? _theFuture;

Future<void> ensureLoaded() async {
  if (_theFuture != null) {
    return _theFuture!;
  }

  Future<void> loadInternal() async {
    await null;
  }

  _theFuture = loadInternal();
  await _theFuture;
}

@lrhn Is this expected to fail now?

@johnniwinther @eernstg as well

Revert on dart-lang/sdk master is here: https://dart-review.googlesource.com/c/sdk/+/181860

For  some more context - this pattern comes up in Flutter tests when someone initially awaits a future in a testWidgets test, and then later awaits the same future again. The second attempt at listening to the result of the future never completes.

cc @franklinyow

https://dart-review.googlesource.com/c/sdk/+/181860 has landed a revert on Dart master.

removing cp label here as it's covered on the Dart side

I don't actually know how test zones work, but I'm also fairly sure I've seen this precise code before and concluded that it's unsafe.
Yes, the code is expected to hang. It's simply not doing what it intends to do, and it should be fixed.
If I add a print where you add to the queue, where you remove from the queue, and where the queue-loop ends, I get:
Adding task. Queue size: 1

Removing task: Queue size: 0

Loop done

Adding task. Queue size: 1

This shows that something is added to the queue after it thought it was done processing. That microtask will never fire, and since something is waiting for it, the code hangs.
One thing the code does wrong is that it doesn't actually run the scheduled functions in the correct zone. Change the handler to:
          scheduleMicrotask: (_, __, actualZone, microtask) {
            microtasks.add(actualZone.bindCallback(microtask));
          },

(that also calls registerCallback, which you should for async callbacks). Doesn't fix the problem, though, but could cause issues with other zones if they rely on registerCallback being called or the correct zone being used.
The tearDown callback is not run in the created zone. That's not surprising, tearDown is called before the zone exists. It's also run after the test function has returned and the fake microtask loop has completed, so that's where the late add to the zone's microtask queue comes from. The _future is created in that zone and uses it for its scheduleMicrotask to report its result. Since the custom microtask loop has long ended, the await waiting for that never completes.
If I were to write it, I'd do something like:
// @dart=2.12
import 'dart:async';
import 'dart:collection';

import 'package:test/test.dart';

Future<void> main() async {
  tearDown(() async {
    await ensureLoaded();
  });

  test('without ft', () async {
    final Queue<void Function()> microtasks = Queue<void Function()>();
    bool scheduled = false;
    final Zone zone = Zone.current.fork(
      specification: ZoneSpecification(
        scheduleMicrotask: (s, p, z, microtask) {
          microtasks.add(z.bindCallback(microtask));
          if (!scheduled) {
            scheduled = true;
            p.scheduleMicrotask(s.parent!, () {
              while (microtasks.isNotEmpty) {
                microtasks.removeFirst()();
              }
              scheduled = false;
            });
          }
        },
      ),
    );

    zone.run(() async {
      await ensureLoaded();
    });

    expect(microtasks, isNotEmpty);
    await Future(() {});
    expect(microtasks, isEmpty);
  });
}

Future<void>? _theFuture;

Future<void> ensureLoaded() async {
  if (_theFuture != null) {
    return _theFuture!;
  }

  Future<void> loadInternal() async {
    await null;
  }

  _theFuture = loadInternal();
  await _theFuture;
}

It looks like we're reverting a bug fix (https://dart-review.googlesource.com/c/sdk/+/175310) because it reveals that some tests are buggy. The fact that the test also times out if return _theFuture!; is changed to return await _theFuture!; also shows that the given example is highly sensitive to scheduling (that's what @lrhn calls 'unsafe'), so the pre-175310 semantics doesn't make them safe, they're just lucky. So I think we should get 175310 landed at some point.

I think the fix for this will need to be in fake_async then.
I have no objection to relanding this functionality - I think some of the revert going on was to unblock some internal rolls. I think it would be ideal to fix fake_async before relanding this functionality, and making sure that rolls to the right places (this repo and the internal monorepo) before relanding the change, unless there's an urgent need to reland it.

The only part of that code sample you provided that might be challenging is the scheduled idea.
fake_async wants to control all microtask scheduling so that they can be flushed in a controlled manner, and test expectations can be validated before/after a future completes.

In other words, it is not clear to me how we can let the test framework for Flutter control microtask flushing here - your example assumes that microtasks need to bea ble to fire sooner than we might want.

It's impossible to control "all microtask scheduling". If your framework depends on doing that, it will fail.

You can always call Zone.root.scheduleMicrotask.
If you have a Future completed in the root zone (or some other foreign zone), then calling thatFuture.then(...) will schedule a microtask in that zone. Such futures are sometimes provided by the platform libraries.1
If you receive a RawReceivePort event, it's handled in the root zone. If it does anything async, that gets scheduled in the root zone.

Also, not all future callbacks are triggered by a scheduled microtask at all. Some are triggered directly by other futures completing.
At most, you can provide tools for users to control their own microtasks, as long as they stay within some fixed usage scenario. You can't prevent other code from going beyond that, and you need to be ready for that to happen.
(I do think the test framework's usage of zones should be changed so you can declare a test in a zone, and it then runs in that zone, possibly in a child zone with extra test information. The current behavior is completely unpredictable.)
The minimal fix I'd do in this situation is probably to have a "flushMicrotasks" operation that empties the new microtask queue, and also call that in the tearDown callback. At least things will happen.
As a larger change, I'd introduce dynamic scopes where the events are manually controlled, and have some automatic scheduling when outside of such a scope, something like:
test("whatnot", () {
  fake_async.controlScope((controller) {
     do some stuff.
     controller.flushQueue();
     do more stuff
  });
});

and if the fake microtask queue is not empty and not inside a control scope, then it's automatically scheduled to run at some point anyway. A scheduled microtask which never runs is a bad error mode. It's better to have run and thrown than to never have run at all.
1: I actually want to change this, so that it uses the zone of the listener to schedule the listener, but if there is more than one listener, it will likely only use the zone of the first one, so you still won't be sure that something runs in a specific zone's microtask queue. Haven't happened yet, and maybe never will, because any attempt to change which zones does what breaks a lot of fragile tests.

(I do think the test framework's usage of zones should be changed so you can declare a test in a zone, and it then runs in that zone, possibly in a child zone with extra test information. The current behavior is completely unpredictable.)

Yeah... also see https://github.com/flutter/flutter/issues/57600 and https://github.com/dart-lang/test/issues/1023.
One thing I don't understand about all of this is how/why did the test originally pass?  Dumb luck?

The problematic future (let's call it f1) is created and completed inside the fake async zone.
It's an instance of the internal _Future class, which most futures are.
The tearDown callback is async and returns a different future (f2), which is created in the outer zone.  That's also a _Future.
With the existing behavior, the return of f1 would not listen to f1. It would instead return it as-is and complete f2 directly with f1 (like calling Completer.complete, but using internal private methods).
That completion recognizes f1 as an internal _Future which has already been completed with a value. That's a "safe" case, so it just completes f2 with the same value (picked out of the f1 future using a private getter), which means that the zone of f1 never comes into play. The zone of f2 is then used to schedule reporting that value to the registered listeners of f2.
With the new semantics, or if you write return await ..., the async function waits for the result of the f1 future.
That means attaching a listener to the future — or really, since the future is already completed, scheduling a microtask to report the value to the then callback. That microtask uses the zone of the f1 future.
The zone of the f1 future is broken, it doesn't respect arbitrary calls to scheduleMicrotask, but the former approach gets lucky and dodges that brokenness due to an internal optimization in the _Future._complete method.

So does this mean that fakeAsync's flushMicrotasks is fundamentally broken? https://github.com/dart-lang/fake_async/blob/3ccb51ff90eee2d480aabbe89990a199f19fc97e/lib/fake_async.dart#L177-L195

I'd say ... yes. It's fundamentally broken.
I wanted to say "fundamentally fragile", but it has none of the affordances you'd need to make it safe.
If you have a zone which overrides schedule microtask with its own scheduler, then it needs to run all scheduled microtasks eventually. That, or perhaps throw synchronously when anything tries to schedule a microtask. Otherwise things get stuck.
If you run arbitrary code (any code not under part of the framework) in that zone, then it might schedule microtasks events again at any later time. If you create a future and store it for late (like here). If you start a timer task and then do microtasks in there. If you simply store Zone.current and reuse it later (which library code can do for any number of reasons).
The idea in fake_async seems to be that when you have flushed the microtask queue, then all computation in the zone is done.
That's not correct. You cannot, ever, predict when all computation in a zone is done. Someone, somewhere, might have stored the Zone along with a (properly registered) callback, and will then call it in two hours (I thing fake_async does handle timers), or when an HTTP request completes, or a port even arrives.
The only way to use fake_async safely is to ensure that nothing which happens inside the test can possibly leak. That doesn't sound viable (as the current example shows, caching anything which contains a zone is a problem).
It's fine to have a "flush microtasks" function, but it cannot be the only way to make microtasks run. There has to be a backup solution like the schedule trick I introduced above. You can still flush if you want to, then the scheduled backup will just find an empty queue.

I filed https://github.com/dart-lang/fake_async/issues/32 and pointed to the discussion here.
Since the revert has landed, the cause of the issue seems to be understood, and a few options for fixes have been identified, I will close this issue. We may also want internal issues to track migrating the internal tests to any new APIs resulting from the resolution of https://github.com/dart-lang/fake_async/issues/32.
So the sequence would be:

Address https://github.com/dart-lang/fake_async/issues/32
Migrate tests.
Reland https://dart-review.googlesource.com/c/sdk/+/175310

Please correct me if I've misunderstood something =)


Vite Plugin with ESM support for main

Pre-flight checklist

[X] I have read the contribution documentation for this project.
[X] I agree to follow the code of conduct that this project uses.
[X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version
7.2.0
Electron version
v28.0.0
Operating system
Windows 10 22H2
Last known working Electron Forge version
N/A
Expected behavior
I see that V28 brings ESM support (Hooray!). I'd like to switch my projects over but I'm having issues getting the Vite template to build. I successfully got a normal electron-forge app to build but using the vite template I cannot as it still converts it to cjs.
Actual behavior
Vite converts main.js to cjs, in which it then errors out because the package.json has been updated to include "type": "module".
App threw an error during load
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and 'C:\Users\joeja\projects\deleteme-vite\pack
age.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
    at file:///C:/Users/joeja/projects/deleteme-vite/.vite/build/main.js:1:22
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

Steps to reproduce

yarn create electron-app test-esm-vite --template=vite
Add "type": "module", to package.json
Change forge.config.js to export default
Change the header of src/index.js to:

import { app, BrowserWindow } from "electron";
import path from "path";
import * as url from "url";

import { handleSquirrelEvent } from "./squirrel.js";

const __dirname = url.fileURLToPath(new URL(".", import.meta.url));

Add an esm squirrel event handler that works with import: ./squirrel.js
Change vite.*.config.mjs to vite.*.config.js
Update forge.config.js paths for plugin-vite to remove .mjs

Additional information
Looking through the vite plugin code, there is still a reference stating that Electron doesn't support ESM which is no longer true. Can this be updated?
Line 76 in file: https://github.com/electron/forge/blob/main/packages/plugin/vite/src/ViteConfig.ts
         build: {
            lib: entry
              ? {
                  entry,
                  // Electron can only support cjs.
                  formats: ['cjs'],
                  fileName: () => '[name].js',
                }
              : undefined,

I tried overriding this in my defineConfig({}) but haven't had any luck:
{
            // `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`.
            entry: "src/main.js",
            formats: ["es"],
            config: "vite.main.config.js",
          },

I know this is an on going effort to update everything. I'd figure I'd bring it to attention since the code now says something that's untrue and because I can't figure out what the work around to override this.

I found that I can override that setting in vite.main.config.js:
// https://vitejs.dev/config
export default defineConfig({
  resolve: {
    ...
  },
  build: {
    lib: {
      formats: ["es"],
    },
  },
});

I have another issue now though, as in esm __dirname is not available. This is needed to specify the index.html path and the preload file. I changed it to:
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
...
mainWindow.loadFile(path.join(dirname, "index.html"));

However, Vite replaces import.meta.url with self.location and then Bite errors out ReferenceError: self is not defined.

+1.
Thanks for your investigation!
I wonder if you tried import.meta.resolve(...)? It's both more to the point and perhaps vite doesn't try to mess with it?
I'm brought here trying to use both @sveltejs/vite-plugin-svelte which is esm-only, (and so it requires "type": "module" in package.json), and this is tripping me up.
I think I can slap an dist-electron/package.json in with { "type": "commonjs" } as a work-around but it feels a bit horrid. 😉

The combination of svelte + vite + electron + forge doesn't seem to work unless we have ESM support.

The combination of svelte + vite + electron + forge doesn't seem to work unless we have ESM support.

You can try to this 👉 https://github.com/electron/forge/issues/3309
The next version of Vite plugin will be use "type"="module" by default, coming soon...

Is this something that's planned? I'm hoping to use Forge with Svelte + Vite (not SvelteKit).

The "horrid" workaround I suggested seems to be working for me.  I've got vite+forge+tailwind+typescript+svelte+melt+workers+import("node:module").register (node20, electron29-alpha) working fine.

Aweome! I haven't had a chance to try your suggestion but I'm starting a new project tomorrow and might mess around with it more. Hopefully the official support comes soon but good to know its coming by default soon!

Fixed by #3468

thanks @caoxiemeihao! any ideas when #3468 might land in a release?

Wait so I will be able to actually use "type": "module" in my package.json? I need that, too.
Kinda want to use with SvelteKit, – but it only supports esm projects.

Was this supposed to be fixed in the 7.3.0 release? This issue was closed, but even with running a fresh install npm init electron-app@latest my-new-app -- --template=vite, its still using CJS for main and type module is not in the package.json.

@caoxiemeihao sorry to ping you, but just curious where this issue stands?

Any update here? I cannot get esm / type: module to work with forge / vite / typescript.

Strange that this issue is closed, as it appears @caoxiemeihao is still working on it: https://github.com/electron/forge/pull/3572

Strange that this issue is closed, as it appears @caoxiemeihao is still working on it: #3572

v7.3.0 can be supported by ESModule through user modification, which is not subject to @electron-forge/plugin-vite.
#3572 is just a few changes to the template, not a major upgrade.

@caoxiemeihao yep, I confirmed this today via these application-side changes
https://github.com/sparecycles/vite-svelte-tailwind-electron/compare/forge-7.3.0..forge-7.3.0-esm and then
https://github.com/sparecycles/vite-svelte-tailwind-electron/compare/forge-7.3.0-rewrite..forge-7.3.0-rewrite-esm-support
@joezappie
I think it's worth trying to apply the extendMainConfig({...}), extendPreloadConfig({...}), extendRendererConfig({...}) from my rewrite of vite.base.config.ts methods to existing templates to see if it "just works", (but I don't intend to support this long-term, nor do I have the resources to debug on a wide variety of platforms at the moment.)
See https://github.com/electron/forge/issues/3506#issuecomment-2068296799

@sparecycles You gave me some inspiration and I updated the API design for migration to 7.3.0+.

This is still confusing. In the main branch vite template, there still seems to be a mess with mjs and some js using require.
I tried to modify it all manually based on the template, but vite still ended up generating main.js file with require and failed to run it because of package type=module.
What is the best way to create ESM-enabled vite project (without Typescript)?


Missing inertia / momentum when zooming on Google Map

Summary
In the standard Google Maps App, when you zoom in or out quickly, there is inertia before the zoom stop, which makes the map feel more natural. It works well with react-native-maps on iOS with Apple Maps, but it does not work on Android with Google Maps (not yet tested on iOS with Google Maps)
Reproducible sample code
import React from 'react';
import MapView from 'react-native-maps';

export default function App() {
  return (
    <MapView
      style={{flex: 1}}
      initialRegion={{
        latitude: 42,
        longitude: 30,
        latitudeDelta: 1,
        longitudeDelta: 1,
      }}
    />
  );
}

Steps to reproduce
Quickly zoom in or out
Expected result
The zoom should continue with inertia
Actual result
The zoom immediately stop, but since you often pan a bit the map at the same time and that panning HAS inertia, the map is not completely frozen either, which makes it feel even weirder.
React Native Maps Version
1.2.0
What platforms are you seeing the problem on?
Android
React Native Version
0.68.3
What version of Expo are you using?
SDK 46
Device(s)
Samsung Galaxy S12FE
Additional information
Another ticket has been opened few years ago about the same issue (but using the term "momentum" instead of "inertia", that's why I did not found it first): https://github.com/react-native-maps/react-native-maps/issues/2579 So I suppose there is few hopes to find a solution ^^

Hi @Pitouli 👋
This is not a bug in react-native-maps, but how the Google Maps SDK behaves on Android. I don't know why Google decided not to match the behaviour in their Maps app vs the Maps SDK, but it's quite easy to reproduce this in a native project, following Google's quick start guide.
If you would like to see this changed, I'd recommend opening an issue on Google's public issue tracker :)

Aw ! 😮 I did not knew that, thank you for the information! 🙂
And I will open a ticket at Google then 😛


[SSP-2922] Once anchored to a source dont allow changes

Once an On Prem Pinakes is connected to a Source (Automation
Controller) we cannot have it connect to another Source.
If the user tries to change the Source report a user friendly
localized message. The logic is based on the install_uuid from
the Automation Controller once docked to a controller we store
the install_uuid for the Source.

https://issues.redhat.com/browse/SSP-2922


Add a migration guide for 1.0

This adds a guide which shows all the changes between 0.6 and 1.0. I hope I didn't miss any.

Thanks for your review @honzajavorek, I've addressed it all in af40105.


Added included and third-party plugin documentation

Added listings with descriptions for both included and third-party plugins.

Will close #7 and #9


HTTP/1.1 TLS Upgrade (RFC-2817) causes upgrade_failed

Title: HTTP/1.1 TLS Upgrade (RFC-2817) causes upgrade_failed
Description:
RFC-2817 specifies two ways for a client to indicate an optional TLS upgrade in HTTP/1.1. The first is via a CONNECT and the second is by sending the Connection: upgrade header and an Upgrade header field with the upgrade protocols. However, sending this to Envoy currently will cause a 403 with upgrade_failed.
Notably the RFC states:

In this case, the server MAY respond to the clear HTTP operation normally, OR switch to secured operation (as detailed in the next section).

This is a little bit ambiguous, but my reading is that the options are to either ignore it or to upgrade, but rejecting the request entirely isn't an option.
RFC-9110 gives us the same ambiguity:

A server MAY ignore a received Upgrade header field if it wishes to continue using the current protocol on that connection. Upgrade cannot be used to insist on a protocol change.

The envoy source tells us why it might be rejecting the upgrade entirely:
      // While downstream servers should not send upgrade payload without the upgrade being
      // accepted, err on the side of caution and refuse to process any further requests on this
      // connection, to avoid a class of HTTP/1.1 smuggling bugs where Upgrade or CONNECT payload
      // contains a smuggled HTTP request.

Repro steps:
Make a request over plaintext HTTP/1.1 with 'Connection: Upgrade' and 'Upgrade: TLS/1.3' headers set
This came up because Apache HttpComponents HttpClient added RFC-2817 headers as default in 5.4 (https://github.com/apache/httpcomponents-client/pull/542). This was released as GA this past week, so should start to hit people as they upgrade.
The bigger issue is the default behavior of HttpClient. I have filed an issue there https://issues.apache.org/jira/browse/HTTPCLIENT-2344. However, we should consider whether we are being spec compliant vs the conservative approach to rejecting these requests.

cc @alyssawilk

So Envoy doesn't support this feature by default, but I think you could in fact get it to work by configuring Envoy to accept this type of upgrade: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/upgrades
and configuring Envoy to route the "upgrade terminated" request back through a second pass of Envoy to a TLS listener (or internal listener)

I don't think the request here is to have TLS upgrades succeed, but to have Envoy ignore the upgrade request and continue with no upgrade and no error.

What @ggreenway said, but just to add on, while i think the spec is ambiguous, i tested a few other proxies, and they all ignore it. The Apache HttpClient folks have closed the issue as "invalid" (which i disagree with). Given all this, I think de-facto we should ignore it.

Ah, when it comes to issues of security I lean towards being strict, rather than possibly increasing attack surface.
I'd say if someone were enthusiastic enough to contribute a "silently allow" default off config knob I'd allow it, but I'm not inclined to add one myself :-)

I don't think the request here is to have TLS upgrades succeed, but to have Envoy ignore the upgrade request and continue with no upgrade and no error.

Sounds good, but how to have Envoy ignore the upgrade request?

The current fix is to do the below at the HTTP Connection Manager, which will allow these requests to pass through
filter_chains:
  - filters:
    - name: "envoy.http_connection_manager"
      typed_config:
        upgrade_configs:
          - upgrade_type: "TLS/1.3"
            enabled: true

👋  team, we are a large consumer of Envoy proxy and have started to experience the production impact of this issue in our service mesh.
I would like to kindly encourage the Envoy team to prioritise formulating a position on this issue (plans to fix it, if any, how, and maybe a rough ETA), as it will help many users devise the appropriate guardrails in their enterprise workloads. 🙇

I know this was originally filed as a bug, but given the ambiguity of the spec (and that allowing upgrades by default has negative security implications) I think it's a feature request.  Unfortunately Envoy is supported on a volunteer basis - we don't have a core team dedicated to features, so any additions to Envoy are contributed by the companies that desire those features.  If your service mesh is negatively impacted we encourage you to become envoy contributors so you can address it!

I don't see how the spec is ambiguous. It says the server should either accept the upgrade request or decline it by ignoring it. If Envoy does not do this it is clearly incompatible with RFC-2817. For me it sounds like a bug, not a feature.

@alyssawilk, could you assist potential contributors by providing guidance on how the Envoy configuration should look if we want to add an option to ignore (specific?) upgrade requests? Alternatively, could you direct us to someone who can help? This would greatly clarify the effort needed to contribute a fix for this issue.

I think the best option for ignoring an upgrade request is to strip the upgrade header before sending the request to the upstream, so that there can't be any confusion between envoy and the upstream about whether an upgrade is happening or not.
We can add configuration for this to UpgradeConfig to ignore specific upgrade types, or we could consider adding an option to ignore any unknown upgrade.

I'm looking at https://www.rfc-editor.org/rfc/rfc2817#section-5 and wondering if passthrough is even a thing in this context?

5. Upgrade across Proxies
As a hop-by-hop header, Upgrade is negotiated between each pair of
HTTP counterparties.  If a User Agent sends a request with an Upgrade
header to a proxy, it is requesting a change to the protocol between
itself and the proxy, not an end-to-end change.

Since I was tagged in #37150 and replied there, I'm adding the same context here:
There's an important distinction between HTTP versions here:

Upgrade is used only in HTTP/1.1, it is documented in Section 7.8 of RFC 9110
Extended CONNECT is used only in HTTP/2 and HTTP/3, it is documented in RFC 8441 and RFC 9220

They behave differently: in particular, in HTTP/1.1 the server can "ignore" the Upgrade and still send a successful HTTP/1.1 response without upgrading to a different protocol. In HTTP/2 and 3 however, that is not possible. If the server does not wish to use the other protocol, it has no choice but to reject the request.
This gets particularly tricky because Envoy normalizes every Extended CONNECT internally to look like Upgrade. So the information of whether ignoring is allowed or not gets somewhat hard to track down inside Envoy.
I worry that allowing Envoy to ignore upgrades will cause protocol confusion or request smuggling attacks, unless there are strong safeguards in place to ensure that this cannot happen in HTTP/2 or HTTP/3.

Would it be a good idea to also propose that RFC 2817 optional client initiated upgrade mechanism be deprecated? Does anyone here have the resources to do so and think it is a good idea? https://github.com/httpwg/http-core/blob/main/CONTRIBUTING.md#proposing-new-work
I believe it has several security implications that make it problematic in modern contexts.
Some examples of issues:

Man-in-the-Middle (MITM) Vulnerability: An attacker could intercept the initial HTTP request and strip out the Upgrade header, preventing the connection from being upgraded to HTTPS. This leaves the communication vulnerable to eavesdropping and modification.

Downgrade Attacks: Similar to MITM attacks, an attacker could modify the client's request to remove the Upgrade header, forcing the communication to remain unencrypted.

Information Leakage: The initial request is sent over cleartext HTTP, potentially exposing sensitive information before the connection is upgraded.

Complexity: The upgrade mechanism adds complexity to both client and server implementations, potentially introducing new bugs or security flaws, such as request smuggling.

Potential for Confusion: Users may believe they're using a secure connection from the start when in reality, the initial request is sent in the clear.

Limited Adoption: Because of these security concerns, this mechanism hasn't been widely adopted, which means it's not well-tested in real-world scenarios.

What does it help for?
A misconfigured client and a passive eavesdroppers.
Alternatives
HSTS, HTTPS Everywhere, rejecting HTTP requests, automatic redirects from HTTP to HTTPS, and simply initiating requests on port https/port 443 instead of 80 by default

@chlunde I totally agree with your intent here - upgrading to TLS is incredibly insecure, and clients should instead always connect directly over HTTPS.
Unfortunately, RFC 2817 is still used in the real-world by the Internet Printing Protocol, see Section 8.2 of RFC 8010. So it doesn't make sense to mark RFC 2817 as obsolete. Even if it should be avoided in almost all cases.
That said, deprecating the feature from Envoy is a different question, but I don't know if anyone is using it.

That said, deprecating the feature from Envoy is a different question, but I don't know if anyone is using it.

We don't have any intention to make TLS upgrades work; I'm just trying to make Envoy ignore those upgrade requests instead of failing requests, to increase compatibility with clients (such as https://issues.apache.org/jira/browse/HTTPCLIENT-2344) which insist on using this upgrade type.

I see. Thanks for the context!

The approach in #37150 didn't work due to how the http1 codec changes behavior when it thinks its handling an upgrade.
A fix for this would probably have to be in the http1 codec_impl, but that doesn't have access to the configured upgrades which are processed later, so it would probably need to be a change that specifically ignores TLS upgrades.

👋 team, we are a large consumer of Envoy proxy and have started to experience the production impact of this issue in our service mesh.
I would like to kindly encourage the Envoy team to prioritise formulating a position on this issue (plans to fix it, if any, how, and maybe a rough ETA), as it will help many users devise the appropriate guardrails in their enterprise workloads. 🙇

The same goes for my org!
@ggreenway kudos for your effort!
Is envoy team actively looking for a workaround?

I don't believe anyone is currently working on this.

@ggreenway thank you, I'll try to find somebody to work on it

I agree wholeheartedly with this sentiment, but i don't see apache httpclient moving on this at all.  It's going to be chaos as more and more libraries upgrade, given how prolific the use of envoy is.

/cc @krinkinmu @grnmeira @Stevenjin8 do any of you have bandwidth to look into this?

@keithmattix I don't have time at the moment and will look at this on Friday and see what I can do.

Hi, I've extended @ggreenway 's codec approach to make it configurable #37642


#2720 - Adding 1 bits per sample support to tiffs.

Description
Added 1 bits per sample support when writing tiffs (#2720).
Tests
#include <iostream>

#include <OpenImageIO/imagebuf.h>
#include <OpenImageIO/imagebufalgo.h>
#include <OpenImageIO/imageio.h>

using namespace OIIO;

int main(void) {

    std::cerr << "Loading\n";
    OIIO::ImageBuf buf("this_is_a_image.png");

    buf.specmod().attribute("compression", "zip");

    std::cerr << "Writing 3x2bpp\n";
    buf.specmod().attribute("oiio:BitsPerSample", 2);
    buf.write("this_is_a_3x2bit.tiff");

    std::cerr << "Writing 3x1bpp\n";
    buf.specmod().attribute("oiio:BitsPerSample", 1);
    buf.write("this_is_a_3x1bit.tiff");

    auto spec = buf.spec();
    spec.nchannels = 1;
    OIIO::ImageBuf buf2(spec);
    OIIO::ImageBufAlgo::paste(buf2, 0, 0, 0, 0, buf);

    std::cerr << "Writing 1x2bpp\n";
    buf2.specmod().attribute("oiio:BitsPerSample", 2);
    buf2.write("this_is_a_2bit.tiff");

    std::cerr << "Writing 1x1bpp\n";
    buf2.specmod().attribute("oiio:BitsPerSample", 1);
    buf2.write("this_is_a_1bit.tiff");

}

Source image:

Output images (github doesn't support tiff attachments):
written-images.zip
(You'll notice the grand whopping 20 byte reduction in file size between the 2bpp and 1bpp).

Is that all it took? Awesome!

Yep!
All the baseline structure was already in place for this to pop in nicely.

Also backported to 2.2.


Add Code of Conduct

Closes https://github.com/nivenly/genderidentity.io/issues/31
We should get a group e-mail though that we could use for this section:

Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by contacting the project team at<EMAIL_ADDRESS>
Simplest option would be a Google Group? I can create one once we've decided on that.

Google Group sounds good to me Bailey :)

Awesome, I've made one. 🎉
<EMAIL_ADDRESS>


Surface load/save

Adds SPRITERW support to Surface::save and BMP support to Surface::load(filename). Also fixes loading non-paletted SPRITERW.

You are my saviour, thank you. Implementing bitmap loading into the launcher was getting dicey.

You are my saviour, thank you. Implementing bitmap loading into the launcher was getting dicey.


Change as.article type from slice to channel for #41

This PR solves #41

Coverage increased (+0.1%) to 34.211% when pulling 0b02b4d2707467e0e811f53045b8e5729669ce7b on bugfix-handle-nil-article-#41 into 0d09d221f458bcd4fe2ad38ad5b4085302a9e710 on master.


Fix the C++11 build, after #3704

Thanks @K-ballo for doing this. Looks good, but let's wait for the builds to come in. This should have priority over other PRs, since we're currently blind to failures.