Authentication

How do you want the API to handle Auth @philngo ?

For now, let's not worry about getting new tokens. Let's manually issue oauth tokens and put them in a config file or maybe even just store them in plaintext - i.e. supply a token when loading the client.

On Tue, Feb 9, 2016 at 10:42 AM, Phil Ngo<EMAIL_ADDRESS>wrote:

For now, let's not worry about getting new tokens. Let's manually issue
oauth tokens and put them in a config file or maybe even just store them in
plaintext - i.e. supply a token when loading the client.

Got it.


Fix ingress name conflict

Fixes https://github.com/istio/istio/issues/31833
I am fairly sure, but not 100% sure, that this will not break anyone as the name is internal impl detail only.

@howardjohn: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests_istio
d740a7c425d0d713f882a9f8968f8e1b5863e349
link
true
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Our recommendation has been to have the Gateway live in the same namespace
as the Deployment so I figured I would keep it. There is even a env var to
enforce it happens
On Thu, Sep 23, 2021 at 6:13 PM Zhonghu Xu @.***> wrote:

@.**** commented on this pull request.
why not make the ingress ns as gateway ns
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/istio/istio/pull/35339#pullrequestreview-762620119,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEYGXOUS4YPWYYQECIJZTTUDPGDVANCNFSM5EUY7MNQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@howardjohn: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-security-multicluster-tests_istio
c9b6c6731106bc489d4550691aa91df8d91defd9
link
true
/test integ-security-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@howardjohn: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-security-k8s-tests_istio
c9b6c6731106bc489d4550691aa91df8d91defd9
link
unknown
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Add a rgw name check to prevent non-ascii rgw name

Just check the rgw name when it is being create to make sure we have ascii name.

update the patch to a earlier function colon_separated into a try block


fix: tests are working again with L5.7

I replaced $this->artisan() with Artisan::call() in the failing tests. I could not really figure out why 5.7 would make the tests using $this->artisan() fail.
Anyhow, all tests are passing again, with backwards compatibility.

Thanks!


Create diderot.txt

Institution/School Name
Lycée Polyvalent Diderot
Instiution/School Website
http://www.diderot.org/
Email Users
Please place an x between the square brackets if yes

[ x] Students
[ x] Academic/Teaching Staff
[ ] Other/Support Staff
[ ] Alumni

Education Levels
Please place an x between the square brackets if yes

[ ] Post-graduate research
[ ] Graduate School
[x ] College (University) or Undergraduate School or equivalent
[ ] Community College or equivalent
[ x] High School or equivalent
[ ] Elementary School or equivalent

Page showing a >1 year formation :
http://www.diderot.org/index.php/l-enseignement-superieur/bts-sn-ir


Future of our person model

For hoglets: This PR is a follow-up to https://github.com/PostHog/product-internal/pull/240, outlining one area of improvement.
I suggest reading the proposal via rich diff, hit the following button in Files tab:

Have read through - this feels like it'll mainly cause issues around reactivation... which is a very late stage (ie Facebook size) company problem where you've already saturated the market and aren't hunting for new users. The area it'd harm doesn't reflect what our existing customers focus on - activation for example. That's demonstrated through the tiny percentage impact it'd have in the data.
We should document this behavior very clearly in the docs.
It's also a significant data parity win not changing historical graphs. Again, this needs documenting somewhere too very clearly so we don't have users thinking this is a bug when they expected the reverse behavior - ie graphs that are historic would change.
The top reason to do this from a customer view is performance issues are frequent and worth solving.

Just cross-posting some user context/pain from Slack


fix-316

Codecov Report

Merging #320 (e66e5bd) into master (d943327) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #320      +/-   ##
==========================================
- Coverage   90.64%   90.55%   -0.10%
==========================================
  Files          45       45
  Lines        1786     1789       +3
==========================================
+ Hits         1619     1620       +1
- Misses        112      113       +1
- Partials       55       56       +1

Impacted Files
Coverage Δ

dataflow/utils.go
87.50% <100.00%> (-5.61%)
:arrow_down:

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 d943327...e66e5bd. Read the comment docs.


⚠ Orpheus has degraded performance

In 6130704, Orpheus ($OPS) experienced degraded performance:

HTTP code: 200
Response time: 2285 ms

Resolved: Orpheus performance has improved in 4d188f8 after 5 minutes.


run  cmake using VS15Arm64 failed

it says:
CMake Error at CMakeLists.txt:2 (project):
  Generator

    Visual Studio 15 2017

  could not find any instance of Visual Studio.

-- Configuring incomplete, errors occurred!

I known it need load environment by exec C:\\Program Files (x86)\\Microsoft Visual Studio\\${version}\\Enterprise\\VC\\vcvarsall.bat, but I don't how to fix it in the action.

@iovw the CMake's Visual Studio generator is usually able to find any instance of Visual Studio you request.
Can you point out an actual error log that reproduces the problem?
Note that the action does not try to setup the environment (i.e. running vsdevcmd.bat). You can use msvc-dev-cmd action for that specific purpose.
The only case run-cmake sets up the build environment is when using its integration with run-vcpkg action (i.e. when useVcpkgToolchainFile : true): in this case vcpkg env is being run, which in turn runs the aforementioned 'vsdevcmd.bat'. This is needed when you want to use exactly the same toolset and environment to build your app and your dependencies.

##[debug]CMake arguments:  -G "Visual Studio 15 2017" -A x64 -DCMAKE_BUILD_TYPE=Release D:\a\Notepad--\Notepad--
##[debug]Generating project files with CMake in build directory 'D:\a\_temp/build' ...
"C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 15 2017" -A x64 -DCMAKE_BUILD_TYPE=Release D:\a\Notepad--\Notepad--
CMake Error at CMakeLists.txt:2 (project):
  Generator

    Visual Studio 15 2017

  could not find any instance of Visual Studio.

-- Configuring incomplete, errors occurred!

CMakeLists.txt
cmake_minimum_required(VERSION 3.15)
project(Notepad)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(Qt5 COMPONENTS Widgets LinguistTools PrintSupport REQUIRED)

set(TS_FILES Notepad_zh_CN.ts)
add_executable(Notepad
        main.cpp
        notepad.cpp
        notepad.h
        notepad.ui
        ${TS_FILES}
        )

target_link_libraries(Notepad PRIVATE Qt5::Widgets Qt5::PrintSupport)
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})

install(TARGETS Notepad DESTINATION bin)

from this
the windows2019 vm haven't installed vs2017, but VS2019, it seems the reason.
And when i use
      - uses: ilammy/msvc-dev-cmd@v1
        if: "contains(matrix.os, 'windows')"
        with:
          toolset: 14.16

it had the same problem.

@iovw right, if there is no Visual Studio 2017 installed, the only way is to use the self hosted runners, and  ensure you have the software you require.
Let me know if there is anything I could improve in this action, thanks!

I think it need a hint, such as:
Unless use the self hosted runners, it just has VS16*, Ninja, Makefile, these cmake generator a available.
More info about Software installed on GitHub-hosted runners, goto https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners.
Maybe better?

@iovw yes, it should be documented indeed.


NullReferenceException, pawn was null

Exception in RimWorld.FloatMenuMakerMap.ChoicesAtFor: System.NullReferenceException: Object reference not set to an instance of an object
at AchtungMod.FloatMenuMakerMap_AddJobGiverWorkOrders_Patch.GetPriority (Verse.Pawn pawn, Verse.WorkTypeDef w) [0x00017] in <6f207119076743cb8a497a51481c0da8>:0
at RimWorld.FloatMenuMakerMap.AddJobGiverWorkOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts, System.Boolean drafted) [0x00445] in <95de19971c5d40878d8742747904cdcd>:0

Does this still happen with v3.8.2?

@pardeike, yes, it does.

I can't see how this can happen. Can you describe the situation a bit more? What are you doing? Is it easy to reproduce?

Vanilla Psycasts Expanded has constructs, when selected, right-click causing this exception.


2.7.0 gem contains a .orig file

Hi,
I noticed that the 2.7.0 gem  contains test/tc_parser.rb.orig, which probably shouldn't be there.

This was removed.


[Bug] Result not generated

I go the following error after everything was scraped:
Traceback (most recent call last):
  File "/usr/bin/kicost", line 9, in <module>
    load_entry_point('kicost==0.1.41', 'console_scripts', 'kicost')()
  File "/usr/lib/python2.7/site-packages/kicost-0.1.41-py2.7.egg/kicost/__main__.py", line 194, in main
    scrape_retries=args.retries)
  File "/usr/lib/python2.7/site-packages/kicost-0.1.41-py2.7.egg/kicost/kicost.py", line 182, in kicost
    id, url, part_num, price_tiers, qty_avail = result.get()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 567, in get
    raise self._value
TypeError: unhashable type: 'list'
Exception TypeError: TypeError("'NoneType' object is not callable",) in <bound method tqdm.__del__ of Progress:  98%|############################################################################################4 | 58/59 [00:00<00:09,  9.09s/part]> ignored
mv: cannot stat 'BOM_15288proto.xlsx': No such file or directory

I know that it is not much, but maybe you have a hint where to start looking?

At last version of KiCost something wrong is happening, using the XML of #112 , the process still freeze in 0%. Even debugging, no part return as scraped.
@xesscorp, this started fill commits ago.

It think that it is usefull to "cache" scraped information in a local xml file.  Through an option the user of kicost could either ignore the cache, define the default maximum age of the cache information, etc.
It could be done using a "caching proxy" internal to kicost which could read/fill an sqlite database or xml file using the same format as the existing virtual "local" pricing information.
I am not sure that this is the solution for this issue though.

Testing a little more, my error is related with the Farnell scrap module  / web site. The newark is also slow but just slow.
To work around this issue I am using --include digikey mouser rs tme newark or --exclude farnell. So the process not freeze in 0% anymore.


Meta and Concurrency

Some meta annotations and a concurrency handler class.

That should have fixed it @Spartan322

Also, a good idea could be creating a isClient and isServer method for side enums (in which case isServer just checks if it isn't CLIENT and isClient just checks if it isn't SERVER)

I just removed it in a new commit, that i'll be pushing soon.

@Spartan322 How would you suppose to do that? isClient(Class specClass)

more like:
public boolean isClient() {
   this != Side.SERVER;
}

How about checking if a class called net.minecraft.client.Main exists and if it exists, return Side.CLIENT.

NO, that is not something you ever want to do, you don't want reliance on any specific class, let the developer define that annotation

Maybe this:
public Side getSide(Class specifiedClass){
    if(!specifiedClass.isAnnotationPresent(Side.class)){ return null; }
    Side annotation = (Side) specifiedClass.getAnnotation(Side.class);
    return annotation.value();
}

No, because that enum is not only for annotations, just give it the type of method I said, we don't need to test outside the enum itself.

So like this?
public static final Side apiSide = Side.CLIENT;

public boolean isClient(){
    if(apiSide == Side.CLIENT()){
        return true;
    }
    return false;
}

thats a huge waste, and better way is like this:
public boolean isClient() {
   return this != Side.SERVER;
}

public boolean isServer() {
   return this != Side.CLIENT;
}

All objects used and made for and in the Quantum API environment are expected to be universal. Having a tag for which side an object belongs would be redundant.
As for the concurrency, I haven't looked at that yet. I'll look at it now.

Speaking of which I should probably push the month's worth of code 😅


tsserver and emacs

I am currently using emacs with tide package to write an angular 4 application. Thanks to language service, emacs/tide checks my inline templates. Unfortunately for external templates(html) emacs does nothing more display exception thrown by tsserver. I am using TypeScript  2.4.1. When I looked at TSS log, after throwing an exception, it actually returns error messages in the template.
I changed the line at 79728 in tsserver.js from
    var diagnostics = selector(project, file);
to
    var diagnostics = selector(project, file) || [];
and emacs now correctly shows all error messages in the external template too!

Uh, what's the difference between them, it seems 100% the same thing, and it's L79721 not L79728...

I changed the line to
ts     var diagnostics = selector(project, file) || [];
I have edited the opening post.
Looks like selector(...) is returning undefined. And I get map not defined on undefined exception.

Indeed, TS itself does not enable the strictNullChecks, so there are always some undefined-related issues.

I see that, typescript 2.4.2 released and the problem still exists for me and perhaps many angular users using emacs. Fix  looks really simple. Just change line L79743 to
ts var diagnostics = selector(project, file) || [];
Using [] list if selector(...) returns null.
Can this be fixed any time soon?

Can you give a try with typescript@next? since this kind of issue will usually be considered in next minor release (see milestone).
If this issue still reproduce in typescript@next, you may have to consider sending a PR directly or somehow ping them, since this issue may be overlooked.

Nathan's the only one on our team who uses tide, but I'm curious - VS Code manages to operate on templates correctly. Why do you believe this is an issue in TSServer rather than tide itself?

can you check if this still repros. If it repros can you please share your tsserver log to see whats going on. Thank you.

@perveziqbal

Thanks to language service, emacs/tide checks my inline templates.

How did you get it to do that? How can tide check Angular template syntax?

@rtm Check this repo for instructions:
https://github.com/perveziqbal/angular-tide-demo
As for this error, it is still occurring. What can I provide and how?

@wesselvdv instructions for tracing the log to a file are here:
https://github.com/ananthakumaran/tide#debugging

I think the issue lies in https://github.com/angular/angular/blob/master/packages/language-service/src/ts_plugin.ts#L77 where it returns undefined. The definition for getSyntacticDiagnostics expects array as return value. https://github.com/Microsoft/TypeScript/blob/master/src/services/types.ts#L254

Closing this since this isn't issue with typescript repository.


More flexible regions

Currently the latitudinal bands "North Midlatitudes", "Tropics" etc are hardcoded in the select_region() function. This is possibly something which should be defined in the config ?

Unfortunately It is not possible since they need to have corresponding climatologies precomputed. There is #105 which is however looking into that in order to support more regions

Closing this since it is not currently possible


Preserve parameters in paths

Fixes #64

Can you please provide an example the symptom in #64 being ameliorated?

Test added

@nsmith- tests do not pass:

Please add python 3.12 to test matrix if possible?


"BlackJack" card game in python

Describe the project you want to add with tech stack

I'd create a BlackJack game in python, with the rules being same as that of the standard Blackjack game.
Expected behavior

User starts the game and is given a random card.
The player then chooses their own card
All the cards yet choosen by player would be displayed along with the points.
After user's card selection, the dealer's cards would be displayed to the user, along with dealer's score.
Player wins if he scores more than the dealer.

Screenshots (optional)

@MohitGupta121 ,@TusharKesarwani Can you assign this task to me?

Hi @MohitGupta121 I've added a PR corresponding to the issue. PLease have a look at the PR. Thanks!


Handle exception from iterdir while discovering static files

Close https://github.com/patroni/patroni/issues/3151

Pull Request Test Coverage Report for Build<PHONE_NUMBER>9
Details

4 of 4 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 99.874%

Totals

Change from base Build<PHONE_NUMBER>5:
0.0%

Covered Lines:
14292

Relevant Lines:
14310

💛  - Coveralls


md-radio: check by keyboard doesn't trigger 'input' event

What is affected?
Component
Description
Checking radio in a radio group via keyboard arrows should trigger 'input' and 'change' event. <md-radio> dispatches 'change' event only: code.
Reproduction
Can be observed here
Workaround
None
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
1.1.1
Browser/OS/Node environment
Browser: Chrome/<IP_ADDRESS> Safari/537.36 Edg/<IP_ADDRESS>
OS: Windows NT 10.0; Win64; x64

I can confirm using arrow key to change the Radio doesn't trigger input event (and I assume change as well).
Lit Playground


Linter ran and Various Bug Fixes

The linter was run in order to properly format the files, which caused a large amount of edits that are just reformatting the previous code
Other Changes

Created initial test file for the tuple factory methods
Changed references to Rui and Concept to be to rui and concept
Renamed metadata_accessory to metadata
Renamed NtoNTuple and NtoRTuple TupleTypes to be NtoN and NtoR for consistency sak

I'm still getting the same errors as w/PR 10. I even tried deleting my local clone of the repo entirely, recloning, re-fetching the PR, and running pytest.
_____________________________________________________________________________ ERROR collecting tests/test_meta_tuple.py _____________________________________________________________________________
tests/test_meta_tuple.py:30: in
print_d_tuple(dt1)
tests/test_meta_tuple.py:8: in print_d_tuple
print("<", dt.ruit.uuid, "> did a(n) ", dt.event, " to tuple <", dt.ruit_ref.uuid, "> because of ", dt.event_reason, " at ", str(dt.td))
E   AttributeError: 'RtChangeReason' object has no attribute 'uuid'
_____________________________________________________________________________ ERROR collecting tests/test_ntoxtuple.py ______________________________________________________________________________
tests/test_ntoxtuple.py:63: in
NtoNTuple = NtoNTuple(None, True, "part of", [x, s], "part of", Rui.TempRef())
src/rt_core_v2/rttuple.py:248: in init
self.p_list = p.copy() if p else []
E   AttributeError: 'str' object has no attribute 'copy'

Or is the fix in the next PR, and I just misunderstood? I feel like at one point you said we had to let these errors ride?

Or is the fix in the next PR, and I just misunderstood? I feel like at one point you said we had to let these errors ride?

Those issues should be fixed in this PR and seem to be on my end, which is concerning. I cloned a new repo, fetched the pr, setup pipenv, and pytest seemed to work correctly for me. I'll see if I can replicate the problem.

If I rename Rui.py to rui.py and Concept.py to concept.py myself, then I
get a different set of 6 errors
On Sun, Aug 18, 2024 at 12:40 PM Mitchell Ward @.***>
wrote:

Or is the fix in the next PR, and I just misunderstood? I feel like at one
point you said we had to let these errors ride?
Those issues should be fixed in this PR and seem to be on my end, which is
concerning. I cloned a new repo, fetched the pr, setup pipenv, and pytest
seemed to work correctly for me. I'll see if I can replicate the problem.
—
Reply to this email directly, view it on GitHub
https://github.com/mcwdsi/rt2/pull/11#issuecomment-2295336569, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJR55TXM5QABV5AKZUZVJTZSDMBHAVCNFSM6AAAAABMUUGISOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMZTMNJWHE
.
You are receiving this because you commented.Message ID:
@.***>

Great - that's what I figured
On Sun, Aug 18, 2024 at 12:42 PM Mitchell Ward @.***>
wrote:

@.**** commented on this pull request.
In src/rt_core_v2/metadata.py
https://github.com/mcwdsi/rt2/pull/11#discussion_r1721027667:

INVALIDATE = 2

REVALIDATE = 3

+class RtChangeReason(ValueEnum):

"""For each event that a D tuple represents, what is the reason we are doing it?
These reasons include:

 (1) change in belief

 (2) change in reality

 (3) change in relevance

 (4) recognition of an error or mistake"""

BELIEF = 4
REALITY = 5
RELEVANCE = 6
MISTAKE = 7

It is in a future PR.
—
Reply to this email directly, view it on GitHub
https://github.com/mcwdsi/rt2/pull/11#discussion_r1721027667, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJR55XJWJIKWN2XS34GMF3ZSDMJRAVCNFSM6AAAAABMUUGISOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENBUGM3DQNZSGY
.
You are receiving this because you commented.Message ID:
@.***>

If I rename Rui.py to rui.py and Concept.py to concept.py myself, then I get a different set of 6 errors
…
On Sun, Aug 18, 2024 at 12:40 PM Mitchell Ward @.> wrote: Or is the fix in the next PR, and I just misunderstood? I feel like at one point you said we had to let these errors ride? Those issues should be fixed in this PR and seem to be on my end, which is concerning. I cloned a new repo, fetched the pr, setup pipenv, and pytest seemed to work correctly for me. I'll see if I can replicate the problem. — Reply to this email directly, view it on GitHub <#11 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJR55TXM5QABV5AKZUZVJTZSDMBHAVCNFSM6AAAAABMUUGISOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMZTMNJWHE . You are receiving this because you commented.Message ID: @.>

You shouldn't have to rename the files to lowercase rui and lowercase concept.py. They are already renamed in this PR, so something else might be going wrong.

Ok I have the issue. After fetching the PR, I forgot to git checkout the
branch. Apologies, I'm used to working with PRs where the branch is already
in the GitHub repo and thus one command to get the PR instead of two.
On Sun, Aug 18, 2024 at 12:44 PM Mitchell Ward @.***>
wrote:

@.**** commented on this pull request.
In src/rt_core_v2/factory.py
https://github.com/mcwdsi/rt2/pull/11#discussion_r1721028187:

+def insert_rttuple(tuple_arguments: dict, type: TupleType):

return rttuple_factory(dict, type, TupleEventType.INSERT, RtChangeReason.BELIEF)

+# TODO Create testing that creates every tuple type using this functions
+def rttuple_factory(tuple_arguments: dict, type: TupleType, event: TupleEventType, event_reason: RtChangeReason):

DTuples should only be created in tandem with another tuple

if type is TupleType.D:

   return None

try:

   concrete_tuple = type_to_class[type](**tuple_arguments)

   meta_tuple = DTuple(

       concrete_tuple.ruit,

       concrete_tuple.t,

Sounds good.
—
Reply to this email directly, view it on GitHub
https://github.com/mcwdsi/rt2/pull/11#discussion_r1721028187, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJR55TURPU5ZIB5MACO6I3ZSDMQ3AVCNFSM6AAAAABMUUGISOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENBUGM3DSNRZG4
.
You are receiving this because you commented.Message ID:
@.***>


Small broken reference fix

A weird bug was happening with indentation that was making the reference_manager script to not load. I also fixed a typo I found there.

Thanks!


DMRG enhancements

Not to be done before #39 is finished.

[x] Convergence issues in some cases. When exactly? Why?
[ ] Userguide for DMRG setup as separate document in doc/
[x] allow diagonalization without the tenpy lanczos, e.g. by full ED for for small bond dimensions.
[ ] Variable number of environment sweeps
[ ] Examples how to reuse environments
[x] don't warn about bad conditioning in Lanczos during first 5 sweeps or so.
[ ] Do we need finite DMRG for L=2?
[ ] Optimize for less transpositions: Store RP in MPO Envrionments in order vL, vL*?
[x] Increase min_sweeps if chi_list contains non-zero keys.
[ ] ITensor is using a Jacobi-Davidson solver instead of Lanczos. Allow for this option?

See also #95

New DMRG parameter diag_method indtroduced in 02936b4d4712e79f8e7339810f337c8b26000293

Jacobi-Davidson is much more complicated, and I don't know why it should be so much better. We have now the option diag_method for ED and arpack (=lanczos), I think that suffices for now.


Failed to process transaction_list

The Issue
Calling transaction_list or clicking on wallet ballance in the app results in the following error:
2017-09-22 15:13:36,791 ERROR    lbrynet.daemon.auth.server:398: Failed to process transaction_list: 'tiphistory'
Traceback (most recent call last):
File "/home/miroslav/Source/lbry/lbry-venv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
result = f(*args, **kw)
File "/home/miroslav/Source/lbry/lbrynet/daemon/Daemon.py", line 2142, in jsonrpc_transaction_list
d = self.session.wallet.get_history(include_tip_info)
File "/home/miroslav/Source/lbry/lbrynet/core/Wallet.py", line 995, in get_history
d = self._get_history(include_tip_info)
File "/home/miroslav/Source/lbry/lbrynet/core/Wallet.py", line 1461, in _get_history
return self._run_cmd_as_defer_succeed('tiphistory')
File "/home/miroslav/Source/lbry/lbrynet/core/Wallet.py", line 1286, in _run_cmd_as_defer_succeed
cmd = known_commands[command_name]
KeyError: 'tiphistory'
The same with claimhistory.
Steps to reproduce

Call transaction_list

Expected behaviour
Method returns list transactions belonging to wallet
Actual behaviour
Abovementioned error is thrown
System Configuration
{
"build": "dev",
"lbrynet_version": "0.16.1-2-g875d512",
"lbryschema_version": "0.0.11rc1",
"lbryum_version": "3.1.7rc5",
"os_release": "4.10.0-35-generic",
"os_system": "Linux",
"platform": "Linux-4.10.0-35-generic-x86_64-with-Ubuntu-16.04-xenial",
"processor": "x86_64",
"python_version": "2.7.12"
}
Screenshots

Is this happening in the v16 release or just on the source?

@tzarebczan This does not happen on v16 release.


Test Issue created at Sat, 19 Feb 2022 02:22:29 GMT

Test issue body  Sat, 19 Feb 2022 02:22:29 GMT

Comment on issue at Sat, 19 Feb 2022 02:22:31 GMT


Add documentation for new config file feature

We should add some docs describing how the config file stuff works. Any examples we give in this should (ideally) be included in the tests. That is, the tests and the docs should source the same file to avoid the possibility of the examples getting out-of-date with the actual tests.

I would like to write the documentation because I added the feature. Would you kindly assign this issue to me?


Did not receive any reward yet. Why?

Hi,
I installed the node following the Github documentation. It is running from yesterday. I checked the following URL:
https://etherscan.io/address/0xEabCF7171c7c4ea66bd3a03a1E9459057506Ed5D#tokentxns
and found no reward was transferred.
I also transferred 80TNT to the public etherium address that you suggested for credit. Please check txHash: 0x96dde31102c2b6789e5b9c81ea3884e51b1d96acb4ac271a40f69b05f76a4292
Please suggest what should I expect. And if there is anything that I am missing.

Rewards are not guaranteed. Your Node must be chosen randomly from all Nodes that pass all audit tests.
I see that you have 11830 credits in the Database at this time.


Cannot Add Annotation to Pool via New Context Pad

Describe the bug
I no longer have the ability to add a Text Annotation to a Pool with the "New" context menu. I can add Text Annotations to other elements using the new Append Element Context Menu (Blue Plus Icon).
This was an action that was previously available with the "Old" context menu.
Steps to reproduce

Select Pool
No options available to add a Text Annotation

Expected behavior
Steps from "Old" Context Menu

Select Pool
Select Append Text Annotation

Expected Steps with "New" Append Element Menu

Select Pool
Select Append Element Context Menu (Blue Plus)
Select Add Text Annotation

Environment

OS: [e.g. MacOS 10.2, Windows 10]
Camunda Modeler Version: [e.g. 2.0.0]
Execution Platform: [e.g. Camunda 7, Camunda 8]
Installed plug-ins: [...]

Additional context
Available Workaround: I can still add a Text Annotation to the Pool if I copy/paste a Text Annotation attached to another element and then connect the Pool to the pasted Text Annotation via the "Connect to other element" action off of the "New" Context Menu.

Thank your for your report. This is a known issue https://github.com/camunda/improved-canvas/issues/69, and there's already an upstream PR which should fix this: https://github.com/camunda/improved-canvas/pull/71

Assigning @philippfromme as the author of the upstream PR.

@philippfromme I assume this is fixed upstream since https://github.com/camunda/improved-canvas/issues/69 is closed. Let's make sure the dependency is updated in the Modelers.

WIP branch: https://github.com/camunda/camunda-modeler/compare/electron-32-adjustment?expand=1


[glib] Build error

vcpkg-tool version: 2023-01-24-8a88d63f241d391772fbde69af9cab96c3c64c75
vcpkg-scripts version: 547c030 2023-02-16 (24 minutes ago)

Host Environment

OS: Ubuntu 16.04 WSL on Windows 10
Compiler: gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1~16.04)

Steps to reproduce the behavior:
`./vcpkg install opencv
Failure logs
Building glib[core]:x64-linux...
-- Downloading https://download.gnome.org/sources/glib/2.75/glib-2.75.3.tar.xz -> glib-2.75.3.tar.xz...
-- Extracting source /mnt/g/Local/vcpkg-linux/downloads/glib-2.75.3.tar.xz
-- Applying patch use-libiconv-on-windows.patch
-- Applying patch libintl.patch
-- Using source at /mnt/g/Local/vcpkg-linux/buildtrees/glib/src/glib-2-8ca74e7d19.clean
-- Getting CMake variables for x64-linux-dbg
-- Getting CMake variables for x64-linux-rel
-- Configuring x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
Command failed: /usr/bin/python3 /mnt/c/src/Local/vcpkg-linux/installed/x64-linux/tools/meson/meson.py -Dselinux=disabled -Dlibmount=disabled -Dgtk_doc=false -Dinstalled_tests=false -Dlibelf=disabled -Dman=false -Dtests=false -Dxattr=false --buildtype plain --backend ninja --wrap-mode nodownload --libdir lib --native /mnt/g/Local/vcpkg-linux/buildtrees/glib/meson-x64-linux-dbg.log -Ddebug=true --prefix /mnt/g/Local/vcpkg-linux/packages/glib_x64-linux/debug --includedir ../include -Dcmake_prefix_path=['/mnt/g/Local/vcpkg-linux/installed/x64-linux/debug','/mnt/g/Local/vcpkg-linux/installed/x64-linux'] /mnt/g/Local/vcpkg-linux/buildtrees/glib/src/glib-2-8ca74e7d19.clean
Working Directory: /mnt/g/Local/vcpkg-linux/buildtrees/glib/x64-linux-dbg
Error code: 1
See logs for more information:
/mnt/g/Local/vcpkg-linux/buildtrees/glib/config-x64-linux-dbg-err.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_meson.cmake:433 (vcpkg_execute_required_process)
ports/glib/portfile.cmake:31 (vcpkg_configure_meson)
scripts/ports.cmake:147 (include)

Attach every failure log file mentioned in the console output.

$ cat  /mnt/g/Local/vcpkg-linux/buildtrees/glib/config-x64-linux-dbg-err.log
Traceback (most recent call last):
File "/mnt/c/src/Local/vcpkg-linux/installed/x64-linux/tools/meson/meson.py", line 26, in
from mesonbuild import mesonmain
File "/mnt/g/Local/vcpkg-linux/installed/x64-linux/tools/meson/mesonbuild/mesonmain.py", line 205
mlog.error(f'Error in {script_name} helper script:')
^
SyntaxError: invalid syntax

Attach every failure log file mentioned in the console output.
/mnt/g/Local/vcpkg-linux/buildtrees/glib/config-x64-linux-dbg-err.log

@galbro Have you installed python3？

Attach every failure log file mentioned in the console output.
/mnt/g/Local/vcpkg-linux/buildtrees/glib/config-x64-linux-dbg-err.log

The whole failure log was 7 lines, so I had inlined it. It's attached now.

@galbro Have you installed python3？

Yes, that was the first thing I thought about. I even went back and set up the aliasing so that "python" launches "python3".
administrator@JALBRO:/mnt/c/src/Local/vcpkg-linux$ python
Python 3.5.2 (default, Jan 26 2021, 13:30:48)
[GCC 5.4.0 20160609] on linux
I was able to get past this on a WSL images of Ubuntu 20 and Ubuntu 22, which have Python 3.8.10 and Python 3.10.6 respectively.
I'm going to try to get a later Python on to my Ubuntu 16 image, that should do it.

I built Python 3.8 from source, then set it as the preferred alternative for python3 with "sudo update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 1"
This has resolved the issue. There must be a (inadvertant?) python language dependency in the build scripts somewhere.

Attach every failure log file mentioned in the console output.
/mnt/g/Local/vcpkg-linux/buildtrees/glib/config-x64-linux-dbg-err.log

The whole failure log was 7 lines, so I had inlined it. It's attached now.

I apologize @galbro. Even though I read through the original post line-by-line I did not recognize it.

No problem
Get Outlook for iOShttps://aka.ms/o0ukef

From: StarGate-One @.>
Sent: Friday, February 17, 2023 1:21:19 PM
To: microsoft/vcpkg @.>
Cc: Jerry Albro @.>; Mention @.>
Subject: Re: [microsoft/vcpkg] [glib] Build error (Issue #29698)

Attach every failure log file mentioned in the console output.
/mnt/g/Local/vcpkg-linux/buildtrees/glib/config-x64-linux-dbg-err.log

The whole failure log was 7 lines, so I had inlined it. It's attached now.
I apologize @galbrohttps://github.com/galbro. Even though I read through the original post line-by-line I did not recognize it.
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vcpkg/issues/29698#issuecomment-1435065033, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABKLVPJT4I2N5KLTHUJ2PEDWX66R7ANCNFSM6AAAAAAU6TP2HQ.
You are receiving this because you were mentioned.Message ID: @.***>

There must be a (inadvertant?) python language dependency in the build scripts somewhere.

The python requirement is from the meson build system used by glib.
On my Ubuntu 18.04 machine I build and use the python3 port.

This has resolved the issue. There must be a (inadvertant?) python language dependency in the build scripts somewhere.

Maybe we should add a warning message about the python version request. 🤔

@galbro

This has resolved the issue. There must be a (inadvertant?) python language dependency in the build scripts somewhere.

For the meson build of vcpkg, we will automatically detect and download the python3 environment.
https://github.com/microsoft/vcpkg/blob/07da05c20c56d3df4b488a16d5bcfeebb761e754/scripts/cmake/vcpkg_configure_meson.cmake#L328
Close this issue by

This has resolved the issue.


Relax pydantic version strictness

The pydantic version peg here is a bit strict, and tests pass on newer versions

makes sense. thanks for the pr!


Feature Request: Order for Enum-Columns

I like this project a lot, but hit a road block when I was using an enum field and wanted to sort it like this:
data, err := client.ZTask.Query().Order(ent.Desc(ztask.FieldPriority))

The field is defined like this:
...
		field.Enum("priority").
			Values("low", "middle", "high").
			Default("middle").
			Optional(),
...

Intuitively I thought the field might be modeled as integer and mapped to the strings (in the order I gave them when defining the field), but it seems the actual strings are used and thus I get alphabetical order when sorting.
Is there a way to keep my "order" instead of using an integer field and mapping the values myself? I am using the SQLite backend.
Thank you for any pointer to the right direction and this great tool!

Hey @jojomi and thanks for the kind words!

but it seems the actual strings are used and thus I get alphabetical order when sorting.

This was changed lately and I think we're going to revert it. However, in SQLite (and PostgreSQL), we use varchar for storing the enum values and only MySQL supports the index-based ordering - because it's the only driver that supports the builtin enum type.
I think, the ideal solution is to add support for "numeric-enums" - it's not really supported by the underlying database, but it works better for some cases (like yours).
My suggestion for you, is to configure something as follows, and maybe migrate it to the "numeric enum" in the future:
// Fields of the Task.
func (Task) Fields() []ent.Field {
	return []ent.Field{
		field.Int("priority").
			GoType(Priority(0)).
			Default(int(PriorityMid)).
			Validate(func(i int) error {
				return Priority(i).Validate()
			}),
		// More fields.
	}
}

type Priority int

const (
	PriorityLow Priority = iota
	PriorityMid
	PriorityHigh
)

func (p Priority) String() string {
	s := "unknown"
	switch p {
	case PriorityLow:
		s = "low"
	case PriorityMid:
		s = "mid"
	case PriorityHigh:
		s = "high"
	}
	return s
}

func (p Priority) Validate() error {
	switch p {
	case PriorityLow, PriorityMid, PriorityHigh:
		return nil
	default:
		return fmt.Errorf("invalid priority value: %v", p)
	}
}

See the usage for this example here.

This was changed lately and I think we're going to revert it.

Change was reverted and we'll be added in v0.4.1
Closing, thanks!

@a8m any update for "numeric enum"?

Hey @syssam, please see the suggested example https://github.com/ent/ent/issues/713#issuecomment-683403919

@a8m just idea, use this statement field.Enum("priority").Values("low", "middle", "high").Default("middle").Optional(),, but we can implement func (p Priority) Value() (driver.Value, error) and func (p *Priority) Scan(val interface{}) error {

Hey, @a8m any feedback?


Fix: description for issue template to be more generalized.

What would you like to share?
Issue templates for this repo should be more generalized as, these ones are used as default issue template for all other projects in the org.

For the General Feature Request template, the description should be modified to something like:
Suggest features, propose improvements, discuss new ideas!

Additional information
Modifications should be made in this feature_request.yml file.

Nice catch; thank you! Would you like to work on this?

For sure, would love to work on this!


Autocomplete: Prepare for StarCoder evaluation experiment

### Tasks
- [x] Add support for fireworks across the backend stacks
- [x] Change the clients to use the SG A
- [x] rollout cody gateway changes
- [x] Feature flag to use fireworks as the default

We're good from the tech side


shared storage for additional prometheus config | AWS ECS dockers metrics

I have prometheus-operator running in k8s created by kops on top of AWS. I'm trying to gather metrics from various tasks running on ECS. Tasks are placed on random container instance so metrics are available under random $IP:$PORT/metrics. To generate list of those tasks I've used https://github.com/signal-ai/prometheus-ecs-sd . Python script in prometheus-ecs-sd container generates following JSON
~ # cat 1m-tasks.json
[
    {
        "labels": {
            "instance": "<IP_ADDRESS>:41007",
            "ecs_task_id": "920f786643a2de",
            "metrics_path": "/metrics",
            "instance_id": "i-07e2d1fb084f",
            "ecs_task_version": "22",
            "job": "jobname",
            "ecs_cluster": "stage",
            "ecs_container_id": "36020d488",
            "port": "41007"
        },
        "targets": [
            "<IP_ADDRESS>:41007"
        ]
    },
    {
        "labels": {
            "instance": "<IP_ADDRESS>:33251",
            "ecs_task_id": "114cf40a-0f304585",
            "metrics_path": "/metrics",
            "instance_id": "i-02717222d7bc5",
            "ecs_task_version": "22",
            "job": "jobname",
            "ecs_cluster": "stage",
            "ecs_container_id": "343145093",
            "port": "33251"
        },
        "targets": [
            "<IP_ADDRESS>:33251"
        ]
    }

which should be loaded (and checked for changes once in a while) by prometheus.
My idea was to use some shared storage and mount it both in prometheus-ecs-sd container and prometheus. Since there are no shared storages in AWS that are natively supported by k8s I've used efs-provisioner and created pv and pvc:
kubectl get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM         STORAGECLASS   REASON   AGE
pvc-07e09798-19f2-11e9-a16a-02ebebe129b0   10Gi       RWX            Delete           Bound    default/efs   aws-efs                 1h

kubectl get pvc
NAME   STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
efs    Bound    pvc-07e09798-19f2-11e9-a16a-02ebebe129b0   10Gi       RWX            aws-efs        1h

Now I'm having big problem generating manifest (or even modifying things on the fly) to be able to mount that shared storage to prometheus, to be able to load generated JSONs. I'm running 2 replicas so each of them should have same volume mounted. Could you provide me some hints how to modify example.jsonnet to have that efs volume mounted under let's say /etc/prometheus/conf/extras?
Since I'm quite new in prometheus and k8s maybe there is some easier way of doing what I'm trying to do.

There is already a volume for sharing ephemeral config data with sidecars, if you look at the Pods, it's the "config-out" volume. You can anything in there and it'll be mounted in /etc/prometheus/config_out in the Prometheus container.

Closing due to inactivity. If you feel there is still an issue here, please feel free to open a new issue.


Update tapir-core, tapir-http4s-server, ... to 1.10.6

About this PR
📦 Updates

com.softwaremill.sttp.tapir:tapir-core
com.softwaremill.sttp.tapir:tapir-http4s-server
com.softwaremill.sttp.tapir:tapir-json-circe
com.softwaremill.sttp.tapir:tapir-openapi-docs
com.softwaremill.sttp.tapir:tapir-refined
com.softwaremill.sttp.tapir:tapir-swagger-ui

from 1.10.5 to 1.10.6
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.softwaremill.sttp.tapir" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.softwaremill.sttp.tapir" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, version-scheme:early-semver, commit-count:1

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 50.00%. Comparing base (8ed1788) to head (22d0b93).
Report is 3 commits behind head on develop.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #536   +/-   ##
========================================
  Coverage    50.00%   50.00%
========================================
  Files            5        5
  Lines           84       84
  Branches         1        1
========================================
  Hits            42       42
  Misses          42       42

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


chore(deps): update common-dev-assets digest to d58f089

This PR contains the following updates:

Package
Update
Change

common-dev-assets
digest
41d5196 -> d58f089

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline


Android: Intercepting the push event received when the app is closed.

I'm having trouble intercepting the push event received when the app is closed on Android.
The notification is created in the status bar, but no event is called.
OnNotificationReceived is only triggered when I have the application open or when I click on the notification.
Which event is triggered to create the notification when the push is received, with the app closed?
Bug Information
Version Number of Plugin: 3.1.6
Device Tested On: Asus Zenfone 4
Simulator Tested On:
Version of VS:  2019 16.4.4
Version of Xamarin Forms: 4.3.0

Still works for me with the latest version. (Updated from 2.3.6 to 3.1.6)
OnNotificationReceived is called.
If you are debugging, you must kill the app, launch the app normally and kill it again. After stop debugging OnNotificationReceived is not triggered.


Dev

Pull Request Test Coverage Report for Build 99

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 66.172%

Totals

Change from base Build 87:
0.0%

Covered Lines:
500

Relevant Lines:
722

💛  - Coveralls


Add the ability to create a subscription for a channel, stream id, and session id triplet

Rather than subscribe for all sessions on a stream id and channel paring it would be useful to be able to create a subscription for a specific session. This would be useful for setting up the recording of a specific publication or could be used for the subscribing to the replay of a specific recording.
Later the ability to create a publication with a specific session could be added for pairing up request and response channels.

This should be fairly straight forward. It does change a couple checks, but it should not require new state be added. It will require a new tombstone in the data packet dispatcher for the possibility of unwanted session Ids.

The session-id can be a filter as a channel param so the API does not need to be modified.

This is done now for the Java driver and needs porting to C.


Update org.yaml

@terrytangyuan I just made this PR to resolve a typo in one of the sample notebooks kubeflow/metadata#242

Thanks. It would be great to see more contributions before we add you as a member. Feel free to ping here when you are ready. Looking forward to seeing your contributions!

@terrytangyuan ah, I see. I was just following the contributor's guide here. would be helpful to make it clear, that it's not needed for every PR. thanks!


refactor IR tests

This PR includes a trivial clippy fix and a quick refactor to split the IR tests into modules to make them more manageable and easier to update later.

Thank you @grjte, looks good to me. One question is if we should replace boundary_constraints and integrity_constraints in function names to their abbreviated forms (bc and ic) to be consistent except for boundary_constraints() and integrity_constraints()? If you agree with this change maybe it can be done with this PR?

Do you mean the accessor functions? I would probably leave them as it is and keep this PR as a tests refactor

No I actually meant just for test names. For eg, renaming boundary_constraints_with_constants to bc_with_constants etc.

No I actually meant just for test names. For eg, renaming boundary_constraints_with_constants to bc_with_constants etc.

Ah, I see. The way I had done it was to shorten it in the error case and leave it unshortened for the main test, but I don't feel strongly. I've changed it in all cases except when there's nothing else in the name (e.g. boundary_constraints)


Get an error TypeError: port should be int or None, got <class 'str'>

BigchainDB version: BigchainDB Version 1.1.0
Operating System: Linux
Deployment Type: [Docker|Host|IPDB|Other] Docker

If you are using IPDB, please specify your network type [test, prod]
and the bdb_url(BigchainDB URL) you are using.
For every other type of deployment, please specify the documentation/instructions
you are following.

BigchainDB driver: [yes|no] yes

If using a driver please specify, driver type [python|js|java] java
and version.

Description
I see  following error in log Get an error TypeError: port should be int or None, got <class 'str'>
Steps to Reproduce
On bigchaindb startup
What I Did
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback/error message here.

@yrozhkov Could you share you .bigchaindb config file?

I run it using env variables with default .bigchaindb config file
BIGCHAINDB_DATABASE_HOST: xxxx
BIGCHAINDB_DATABASE_CONNECTION_TIMEOUT: 25000
BIGCHAINDB_DATABASE_MAX_TRIES: 20
BIGCHAINDB_DATABASE_NAME: bigchain
#BIGCHAINDB_DATABASE_PORT: 28015
#BIGCHAINDB_DATABASE_BACKEND: rethinkdb
BIGCHAINDB_DATABASE_REPLICASET: bigchain-rs
BIGCHAINDB_DATABASE_PORT: 27017
BIGCHAINDB_DATABASE_BACKEND: mongodb
    BIGCHAINDB_SERVER_BIND: <IP_ADDRESS>:9984
    BIGCHAINDB_SERVER_LOGLEVEL: debug
    BIGCHAINDB_SERVER_WORKERS: 5

    BIGCHAINDB_WSSERVER_SCHEME: ws
    BIGCHAINDB_WSSERVER_HOST: <IP_ADDRESS>
    BIGCHAINDB_WSSERVER_PORT: 9985

    BIGCHAINDB_BACKLOG_REASSIGN_DELAY: 120

    BIGCHAINDB_GRAPHITE_HOST: localhost

@yrozhkov based on the error you described previously I think the value of port was specified as a string rather than integer i.e. "9985" or "27017" instead of 9985 or 27017

as you see there is no quotes around ports that is why I find this message confusing


[Feature] Sub-orders/conditional orders

Activate a buy/sell order right after a specific order is filled.

Do you have more information or references of how this kind of orders should work?

Do you have more information or references of how this kind of orders should work?
@ebirbe, thx for asking.

It would enable exchange legos, as there are already DeFi legos in services like zapper.fi.
With conditional orders, Loopring Exchange will have: "if this, do that".
I'm open to propose new ideas about how it could work and its usefulness.

What's the difference with conditional transfer ?
"3. Conditional Transfers
Conditional transfers are transfers that are approved on-chain by the account owner or an agent of the account owner. No signature or other authorization is needed for the operator to do an off-chain transfer that was approved like this. Conditional transfers allow any (custom) on-chain mechanism (done by the account owner himself or by an agent) to decide if a transfer can be executed or not on layer 2."
https://medium.com/loopring-protocol/loopring-3-5-is-code-complete-and-ready-for-review-3a1e8c1c692

Thanks for posting this suggestion @DaniellMesquita
I believe this is exactly encapsulated by what @vanmoortel mentions above, "conditional transfers" which are in v3.5 (to be deployed as v3.6 in 2 ~months).

I believe this is exactly encapsulated by what @vanmoortel mentions above, "conditional transfers" which are in v3.5 (to be deployed as v3.6 in 2 ~months).

In this case, "conditional orders" is a different concept than "conditional transfers"?
It is fully for L2.


add a pause/resume functionality to the player

finally gave in and looked it up. turns out it was an easy fix 🤦♀

@adarob added an isPaused, ptal?

omg or, and hear me out: we could expose the tone.transport state? it's started/stopped/paused. Maybe that's the best instead of these weird 2 functions?


Add gcc build

This will run post-submit as part of the Buildkite pipeline testing
various configurations. Only checks that things build, doesn't run any
tests.
This is mostly in support of releases. It uses gcc 9, even though the
latest on Ubuntu 18.04 is 7. We get some errors building with 7 and
debugging gcc errors is not high priority right now 🙂 There are also
oodles of warnings, mostly because we haven't correctly split the
diagnostic flags for gcc vs clang. Again, not a priority right now.
Tested:
Ran a build locally in the docker image. Kicked off a buildkite run
https://buildkite.com/iree/iree-build-configurations/builds/823
Fixes https://github.com/google/iree/issues/6959

Well the gcc build failed after 2 hours :-/ When linking iree-opt: collect2: error: ld returned 1 exit status. Given that I just ran the same command in the same docker container successfully on my machine, I'm guessing that this is a resources issue and that ld OOMed while linking iree-opt

Oh: ld.lld: error: failed to open iree/tools/iree-translate: No space left on device. So switching to lld was mostly a red herring except that it actually gives error messages.

I cleaned out 30G of space. Mostly of docker images. Another issue is that each pipeline that runs has its own copy of the git repository:
$ du -xh --max-depth 1 /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/ | sort -rh | head -11
83G     /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/
40G     /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations
23G     /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-samples
9.8G    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-benchmark
7.4G    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-android-benchmark
3.5G    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-android-arm64-v8a

That's mostly stupid build directories:
$ du -xh --max-depth 1 /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/ | sort -rh
40G     /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/
37G     /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/build
1.7G    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/third_party
1.3G    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/.git
17M     /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/iree
1.4M    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/build_tools
1.2M    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/integrations
1.1M    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/docs
1.1M    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/colab
864K    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/llvm-external-projects
740K    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/bindings
356K    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/experimental
124K    /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/scripts
60K     /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/.github
48K     /var/lib/buildkite-agent/builds/gcp-buildkite-ubuntu-4/iree/iree-build-configurations/benchmarks

I filed https://github.com/google/iree/issues/7139

And of course by rebuilding the docker images I've somehow broken TF. I guess something isn't pinned:
  File "/usr/local/lib/python3.7/dist-packages/keras/mixed_precision/loss_scale_optimizer.py", line 257, in <module>
    class LossScaleOptimizer(tf.__internal__.tracking.DelegatingTrackableMixin,
AttributeError: module 'tensorflow.compat.v2.__internal__.tracking' has no attribute 'DelegatingTrackableMixin'

https://source.cloud.google.com/results/invocations/ec46153a-be75-4b54-a64f-4e7a35bd19b0/targets/iree%2Fgcp_ubuntu%2Fcmake-bazel%2Flinux%2Fx86-swiftshader%2Fpresubmit/log
Looks like it moved in https://github.com/tensorflow/tensorflow/commit/5c68b5922b939dbe85da915d8051816427d92064

1h30m is long, but this pipeline mainly runs on post-submit. Maybe we can use ccache to speed things up?

We certainly could use ccache :-) It (and/or distcc) was one of the things on my list for improving CI this quarter, which is something we decided not to prioritize.


support macos & windows

Links

react-native-macos
react-native-windows

I write a windows similar project，react-native-windows-svg.
Welcome to contribution code!

react-native-windows-svg had supported SVG components, as follows:

[x]SVG
[x]Rect
[ ]Text
[x]Circel
[x]Line
[x]Ellipse
[x]G
[x]Path
[x]Polygon
[x]Polyline

@msand Why not add macOS as a target? that should cover react-native-macos

@sonaye I'm considering a rewrite in c++ or rust because of the fabric rewrite of react native, check here: https://github.com/react-native-community/react-native-svg/issues/878
This would simplify cross-platform efforts significantly

@msand Seems Fabric is buildable in OSS, so maybe it's time! I would love to discuss it and provide any help I can.

@shergin Great to hear, what approach did you have in mind?

@RazrFalcon Any suggestions on what would be the best way of integrating resvg in react-native? Is the azul approach (uses the resvg parser, usvg simplification and the lyon triangulation libraries) reasonable? The content in this case is dynamic rather than static, and would need fill and stroke hit testing / event handling for touch and gestures.
https://github.com/maps4print/azul/wiki/SVG-drawing
Thanks for your excellent work on resvg btw, I'm a huge fan.

@msand If you plan to use resvg not from Rust then you probably should convert SVG to uSVG via usvg. resvg is just a renderer, so you don't need anything from it. And usvg doesn't have a C-API, and I'm not sure it ever will be.
Note that with this approach you still have to implement the text layout (see below) and filters manually. This is the hardest part. Everything else should be relatively easy (1000-2000 LOC in most of the languages).
Also note, that text elements will soon be converted into paths, so you don't have to worry about this either. And text layout is one of the hardest parts of SVG.

I am not sure about the exact approach to render stuff (use custom implementation or resvg). I think we should find a balance between cross-platform-ness and performance (relying on CoreAnimation primitives and CALayers should perform best... probably?).
From RN/Fabric perspective, the implementation should be similar to existing Text implementation ( https://github.com/facebook/react-native/tree/master/ReactCommon/fabric/components/text ) where a bunch of ShadowNodes of different kinda construct some plain C++ object (that represent whole SVG structure) and pass that to main-threaded renderer on View-layer.
So, compare to existing implementation (on iOS) all SVG nodes will be represented as a single UIView subclass that "knows" how to draw the SVG object. And only this part will be platform-specific.

@RazrFalcon At least for e.g. windows and linux, we don't have any logic/support at all yet. Also, some of the content people use this library with is entirely static, these cases could perhaps benefit from the whole resvg > usvg > lyon setup no?
So rather than double the number of codebases and programming languages used in this project, we would utilize or create some c/c++/rust svg stack and ffi glue to share as much as possible across platforms. Svg rendering shouldn't have any platform dependant output anyway, and the tessellation from lyon should be efficient to render with OpenGL, Vulkan or D3D. Using e.g. OpenGL on iOS and allowing to apply natively animated transforms on separate layers should allow significant performance improvements compared to the current implementation.
I've also noticed that text layout seems like the hardest part to get right, and text-on-a-path doesn't make it any easier. Also, only about 50% of the filters have been implemented in the filters branch  which has become stale by now. That's only on iOS, as I haven't ported them to Android yet, partly in anticipation for the fabric rewrite of react-native, and possible cross-platform rewrite of react-native-svg. So I've been thinking perhaps it would make most sense to combine efforts somehow rather than keep reinventing the same logic in many languages/libraries.

@shergin Any example of a react-native-module built using fabric (ideally something which has custom rendering of some sort)? Or some collection of commits showing a rewrite from ViewManagers to the new pattern? Will art be rewritten to use it as well?

@msand I'm not familiar with lyon's tessellation and GPU rendering in general, so I can't help here for sure.

benefit from the whole resvg > usvg > lyon setup

Not sure about this order. Currently, it's the other way around. resvg is basically a rendering backend which translates usvg's render tree into backend's primitives. The only logic it has right now is filters. But they are CPU bound and mostly backend specific. And probably will be useless on a GPU. So you doesn't really need resvg, only usvg, which does all the magic.

people use this library with is entirely static

It's possible for usvg, but it still links to the system libraries for fonts querying (directdraw, coretext, fontconfig+freetype). So it's not completely self-contained.
I think usvg is the perfect (and only) foundation for this kind of project, so I'm willing to help as much as possible.

@shergin I've collected most of the IDL specs needed for svg in the idl/ folder. I've tried to get the Fabric version of RNTester to build, but haven't got it working yet. Is there any specific commit on the master branch which works? Or a bit more instructions on how to get started?
I understand the codegen is supposed to use js/flow as the source of truth, but couldn't figure out how to set that up yet either, the repo/web seems very thin on guidance/examples with regards to this. I was thinking I'd generate the flow types from the idl (as they're the source of truth in this case). And probably make it work for some minimal subset first, like rendering Rect elements with e.g. varying dimensions, transforms, fill and stroke, to ensure that the foundation is solid, native animations and gestures work correctly and have everything optimized before building more on top.
I'm thinking it probably makes sense to have a rendering backend abstraction, to allow using different renderers and compare performance for specific workloads.
https://github.com/servo/pathfinder (will be used in webrender for e.g. svg)
https://github.com/intel/fastuidraw (pure gpu based, very fast)
https://blend2d.com/ (nice Anti-Grain Geometry implementation)
https://skia.org/ (fast and relatively complete/stable)
These all have very interesting approaches/performance characteristics and would be interesting to compare to the native backend (android is largely built on skia anyway, using skia on all platforms would make rendering more consistent, without changing the current output on android, also, chrome/firefox/flutter etc use skia).
Doing all the rendering in rust or c++ and the gpu, and then merely rendering the resulting bitmap/texture using the native view layer, would eliminate all extra marshalling/ffi overhead between e.g java and c++. The js would construct the shadow nodes with JSI, then the renderer does all the work in c++, and makes a single call into java/obj-c and the native view hierarchy where a single native View object represents the entire svg element and all its ancestors. The native view would call back into the c++ to handle hitTesting, alternatively the necessary bounds, paint and path data would need to be made available to java/obj-c as well.
@shergin Does the new architecture allow animating properties of shadow nodes which don't have a corresponding native view? And how do I redirect touch events to the correct element and event handler in javascript , if only the root creates an actual native view (rather than just a shadow node)?
I'm not sure how well usvg would play together with the gesture responder / hit testing system, as any rendered element can have event handlers.
@RazrFalcon is there any way to know what parts of the output correspond to what parts of the input, to allow us calling the correct handler? To what degree do the elements get merged? It might not be an issue, if we can somehow forbid specific elements from getting merged/simplified too much, e.g if they have event handlers and thus need to have a bijection for their identities between input and output.

usvg is purely static. It's hard to explain what usvg actually does, but the resulting SVG/render tree is very different from the original one. It will be easier if you tell me what kind of information do you plan to query. Like objects list, their bboxes, etc.
Also, text rendering is a big question, since usvg converts text into paths. So you can't select it (this can be fixed).

@RazrFalcon The current gesture responder system seems to require that each element, with touch event related handlers, has correct bounds on the View representing it and all its ancestors, otherwise the tracking system only recognizes the first touch event correctly, and thinks it's outside the bounds if any movement happens, disabling touch handlers to trigger on release/ending of the gesture. Bounds and ctm would be the very minimum. Ideally supporting all the SVGBoundingBoxOptions for getBBox https://www.w3.org/TR/SVG/types.html#InterfaceSVGGraphicsElement
Currently the hit testing triggers if the point is either inside the fill or the stroke of the element. But, ideally, we would support all pointer-events values from https://www.w3.org/TR/SVG/interact.html#PointerEventsProp
And the GeometryElement interface:
boolean isPointInFill(optional DOMPointInit point);
boolean isPointInStroke(optional DOMPointInit point);
float getTotalLength();
DOMPoint getPointAtLength(float distance);
https://www.w3.org/TR/SVG/types.html#InterfaceSVGGeometryElement
With regards to text, we also convert everything to paths at the moment, except if the inline-size is set, in that case we use the native paragraph rendering api, but this is likely to need rewriting to get shape-inside and shape-outside support. Converting the text to paths, allows using e.g. text for clipping/masking, and as the path for other text inside a textPath element, so you can render text along the curves of glyphs from other fonts, possibly with animation of font-weight and other fontFeatureSettings and fontVariationSettings for opentype fonts which have variable font support.

Oh, and the SVGSVGElement interface has these as well:
  NodeList getIntersectionList(DOMRectReadOnly rect, SVGElement? referenceElement);
  NodeList getEnclosureList(DOMRectReadOnly rect, SVGElement? referenceElement);
  boolean checkIntersection(SVGElement element, DOMRectReadOnly rect);
  boolean checkEnclosure(SVGElement element, DOMRectReadOnly rect);

@msand It's hard, but possible. The main problem is that resvg/usvg doesn't have any rendering code in it, so I don't know if a point is inside a stroke or fill. Same with intersections. So all the algorithms should be written from scratch.
Also, I'm not sure how links (a) should be handled.
The real problem is that usvg provides an interface for a read-only render tree via C-API. You can query some information, but you can't change it. Any kind of modifications are available only from Rust.

@RazrFalcon Doing the rewrite in rust is certainly a possibility. Although I haven't done any significant work in it, I've read quite a bit, enjoy the syntax and semantics, and been looking for some project where it would make sense to apply. Also, it seems rust might attract more contributors than c++ for this kind of project. There's also a react-native project written mostly in rust: https://github.com/paritytech/parity-signer/
Writing the algorithms from scratch wouldn't be an issue. If it would be cross-platform it would still make the long term development and maintenance burden smaller, to get other platforms than ios and android working with consistent output and behavior.
In this case, the new svg user agent could be embedded either as a standalone svg solution for native apps, or used thru bindings from some javascript environment, e.g. using JSI in react-native. The main/first use case would be for react-native, but the idea would be to make it work in flutter and other similar frameworks as well.
So in these cases we already have a runtime available, where we can have event handlers on the elements and use that to handle changes in navigation/application state, so there's no real need for the script element or hyperlinks. There's no guarantee of a uri like address/location, so an svg a element would behave just like a g element. Except if the download attribute is set, in which case a download dialog for the href might make sense if the platform/runtime supports it, but that could also be an event handler without side-effects, allowing the developer to handle it appropriately themselves.
Also, animation would probably be provided by the framework/runtime (we might add the animation parts from the spec, if everything else is done) we just need to provide property setters for all the elements, functions to do layout/calculate a render tree, render tree to pixels/texture, and implementations for the aforementioned element interfaces (hopefully as much as possible of the svg 1.1 and 2.0 specs). Ideally a render tree could reuse almost everything, if only a single property of a single element is animated.

I have no plans on doing animations, mainly because of complexity. And since SVG has no reference implementation, no one know how they should work anyway. The official test suite for SVG 1.1 has like 80 tests and that's it. But since those test have PNG images for references - they are useless.
As for API, I will slowly try to add the required methods.

I realized the href could be used to open a browser, or even other installed apps depending on what protocol handlers are registered. But, this probably belongs in user provided event handlers and/or platform specific but reusable components wrapping/overriding the plain a element.

If I'd implement support for the animation part of the spec, and there's any ambiguities, I would probably align it with the current behavior in whatever set of browser have the most users in common, or if they're all inconsistent, with what seems the most expectable/desireable from a user perspective, or with the Animated library used in react-native. As the native animation driver from Animated can be used to keep several animations in sync with acceptable performance, and has significant use in the community.
There might be some performance optimizations which can be done, by limiting the logic to the subset of data types used in the svg spec, but the core logic already exists in Animated and I'd like to preserve compatibility with it.
It might even be possible to implement the animation spec by converting it to Animated components (or react-native-reanimated if limitations come up) using either the plain js api, or, if we want to support animating the properties and attributes of the animation elements as well, then we'd need to have native shadowNodes representing them. But essentially just helpers to define interpolations using Animated in a declarative way.
So in this sense, the renderer backend just needs to support setters for the input values and to re-render the output. Animation wouldn't be a concern for the rendering abstraction, but enabling reuse of the unchanged parts of the render tree, if a setter is called on some element in a svg fragment and a new render tree is requested, would likely make a large impact on the memory and cpu pressure for this use case, or any where the state/input can change and re-rendering is needed, not only animations.
Would probably require having the output as an immutable data structure, and correctly invalidate dependant parts when values change, and lazily recompute when a new render tree is requested. So the complexity tradeoff might be quite significant, and possibly, much of the time would be spent elsewhere even if the entire render tree is recomputed, depending on use case. Simple static trees would get slower, but complex scenes with many changing values, and significant unchanging parts, would likely see big benefits when the changing/unchanged ratio goes low.

Here's an example of an animation translated to the Animated and Easing api:
https://snack.expo.io/@msand/animated-svg-with-bezier-spline-calcmode
import * as React from 'react';
import { Animated, Easing } from 'react-native';
import { Svg, Circle } from 'react-native-svg';
const AnimatedCircle = Animated.createAnimatedComponent(Circle);
/*
  <circle cx="16" cy="16" r="16">
    <animate
      attributeName="r"
      values="0; 4; 0; 0"
      dur="1.2s"
      repeatCount="indefinite"
      begin="0"
      keytimes="0;0.2;0.7;1"
      keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8"
      calcMode="spline" />
  </circle>
*/
const values = [0, 4, 0, 0];
const dur = 1.2 * 1000;
const keyTimes = [0, 0.2, 0.7, 1];
const keySplines = [
  [0.2, 0.2, 0.4, 0.8],
  [0.2, 0.6, 0.4, 0.8],
  [0.2, 0.6, 0.4, 0.8],
];
export default () => {
  const t = new Animated.Value(keyTimes[0]);
  const splines = keySplines.map((spline, i) => {
    const [x1, y1, x2, y2] = spline;
    const fromValue = keyTimes[i];
    const toValue = keyTimes[i + 1];
    return Animated.timing(t, {
      toValue,
      duration: dur * (toValue - fromValue),
      easing: Easing.bezier(x1, y1, x2, y2),
      useNativeDriver: true,
    });
  });
  Animated.loop(Animated.sequence(splines)).start();
  return (
    <Svg width="100%" height="100%" viewBox="0 0 32 32">
      <AnimatedCircle
        cx="16"
        cy="16"
        r={t.interpolate({
          inputRange: keyTimes,
          outputRange: values,
        })}
      />
    </Svg>
  );
};

@RazrFalcon I'm thinking that implementing some immutable structure with proper invalidation is probably a bit high on the complexity side. But, at least for e.g. pan, zoom and rotate gestures, it would be great if a changing transform can be applied while reusing most/all of the render tree. I think it's only the vector-effects which depend on the CTM and would require special treatment, or in the worst case, recalculating the entire tree.
The responsibility to optimize and split content into separate svg roots, with varying frequency of change and static parts, would be on the developer in this case. React already provides a layer for doing diffs on immutable trees, and short circuiting when the results are correctly memoized.
Having yet another layer of dependency tracking/invalidation logic in the rendering backend might just slow things down, especially for content where almost all the content / properties keep changing at full framerate. I would expect VR applications to have tailor made rendering logic, but I would already aim for 100+ fps to enable those kinds of use cases as well.
For the zoomAndPan attribute, the logic can stay completely on the native side, and doesn't need to call into the runtime/javascript/react, unless there are registered event listeners. So in this case there is no dependency tracking overhead or diff checking in use. The gesture handler could merely set the currentScale and currentTranslate, and cause a rerender of the render tree with the updated transform. Adding a currentRotate attribute to enable rotation while zooming and panning would also be great. Forcing that to be much more expensive or use a very different api doesn't seem like the most developer/user friendly approach.
https://svgwg.org/svg2-draft/struct.html#InterfaceSVGSVGElement
attribute float currentScale;
[SameObject] readonly attribute DOMPointReadOnly currentTranslate;
https://svgwg.org/svg2-draft/types.html#InterfaceSVGZoomAndPan

I'm not sure how this is related to resvg. usvg converts an input SVG into a very simple render tree. Then resvg traverses this tree and renders its nodes. That's it. There are no state to store and animate.
So you have to write a new resvg backend for your drawing library that will support animation. It cant be done in a backend-independent way.
Moreover, the main part is to parse animation properties from the SVG itself. Which is far from trivial.
As for currentScale and currentTranslate, I don't think that this should be implemented on the resvg side. It should be done by a viewport itself, which resvg doesn't have.

Well, in our case the svg input is created on the fly, and the Animated api handles animating all properties sufficiently well for most use cases already.
The svg animation spec isn't necessary, just making a few helpers to translate the common usage patterns to Animated, probably does more than 99% of what's actually used of smil.
So I'm just saying, that if we've given a svg fragment as input already, and only the outermost transform changes, it would be great if we could reuse the unchanged parts.
We can of course give the entire svg fragment again, but just wrapping the render tree with a group transform which we can change without recomputing the rest, would allow sharp rerendering when the scale changes / parts move inside the clipbounds.

Will usvg support vector-effects (at least non-scaling-stroke)?
https://svgwg.org/svg2-draft/coords.html#VectorEffectProperty
It requires adding the property to path and image, as they're the only graphics elements in the output. Vector effects/non-scaling-stroke at least depends on the viewport (and nested viewports):
https://svgwg.org/svg2-draft/coords.html#VectorEffectsCalculation
https://svgwg.org/svg2-draft/coords.html#NestedVectorEffectsCalculation

So I'm just saying, that if we've given a svg fragment as input already, and only the outermost transform changes, it would be great if we could reuse the unchanged parts.

Are you talking about the render tree or the rendered layers/objects? resvg doesn't have a state, so you cannot apply a transform to it.
resvg has nothing similar to a web browser, were you can modify some node/attribute and it will update the viewport. resvg simply renders nodes to a canvas. One after another.

Will usvg support vector-effects

SVG 2 is out of scope.

Well, if we don't have any reuse when reconstructing a render tree for some svg fragment where some properties have just changed, then I'd fall back to at least optimizing the case of only changing the outermost transform, by reusing the entire render tree, wrapping it in a G element, and mutate the transform of that outermost G element when needed. And, recompute the entire render tree if something else changes. The rendering backend should certainly be stateless, it's just the display list / render tree I would like to reuse as much as possible.

I don't understand why do you need to recompute anything. Transform impacts only rendering. It doesn't affect a render tree in any way.

Yes that's correct, which is why I would optimize that at the very least. I was thinking if you intended to simplify the paths with vector-effects into ones without it, then the render tree would depend on the CTM.
In general the event listeners can cause any kind of state change, and any or all properties can change or not. If the entire render tree needs to be recomputed even if a single property changes deep in some fragment, it might be worthwhile to optimise reusing of the tree. But until it's a replicated and measured issue, it might not require further consideration.

Again, there is nothing to optimize, because resvg doesn't work like that. It always renders the whole tree. It's not a browser.

@RazrFalcon Sorry if I'm not expressing myself very well, a bit slow weekend atm.
Yeah, I'm thinking of usvg, as that's what constructs the render tree for resvg-(skia/qt/raqote) to consume, no? Usually we wouldn't have/create any xml strings (unless there is only a static svg file a user wants to render), we already have a vdom in react which corresponds to a svg xml fragment/dom.
Instead when react commits a new output, we would have our bindings call into usvg/svgdom to create an input for usvg to process, this would create and output render tree, which resvg would use with whatever rendering backend it's been built together with, and the resulting bitmap would be given to the native render api and composited into the window using a single native view.
When react commits some changes, only the changed property setter get called, at this point our bindings would change the values in the current usvg/svgdom representation, create another render tree with usvg > render with resvg > native compositing. Does this sound reasonable to you?

Yes, this is exactly how it works. Everything depends on what properties do you plan to change.
If you want to scale a particular shape than there is not need in render tree recalculation. Also, you don't even need an SVG file, since you can create a render tree from scratch. It just a tree of commands for resvg.
But this is an usvg side. The problem is that resvg doesn't know anything about tree modifications. There are no event loops or anything. And resvg doesn't preserve anything. So if you want to move one shape by 5px along the X axis - you have to render the whole image again.
As long as you need a dynamic SVG, you need a dynamic, stateful renderer (like in browser or vector editor), which resvg doesn't have. But it can be implemented.

I think for now the current approach we have is fine. At least it seems to work good enough in the current renderers. We preserve the paths for elements and groups where it's safe, but the entire svg fragment still causes render calls to happen on every render, and resets the paint for each element. Right now it has lots and lots of state trashing, making it much slower than it could be, and people certainly ask for better performance. But that's more about optimizing the rendering logic, than reuse of a displaylist/render tree.
Android has support for RecordingCanvas in the upcoming API 29. I'm not sure how much of that depends on skia, and how much of it is in other layers. And not sure how big the possible benefits are. But if it's possible to create relatively easily with skia, it might be an interesting optimization opportunity for e.g. resvg-skia. This would make it available across more android api levels as well.
https://developer.android.com/reference/android/graphics/RecordingCanvas

The easiest and most robust variant is to simply cache all the data (like browser does). But this should be implemented for each backend separately (because it will be slower and will consume much more RAM than the current algorithm). So we don't need to create layers, native paths, styles, etc. each time.
But, there are also a lot of things that can't be optimized. Like complex paths rendering, filters (especially blur), compositing, clipping and masking.

So, with regards to the code that would be in this library in the bindings, the main optimization opportunity would be to know when we need to redo the usvg render tree calculation, and when can we reuse what from the existing one. Either just change the values there directly, or if we treat it immutably, create a new one with structural sharing.
Some reuse in renderer backends can possibly be built as a layer on top of existing ones, but should probably be optional, to allow tuning for various tradeoffs. Having the developer split static parts into separate roots and position them absolutely to achieve caching of unchanging content, delivers a lot of the possible benefit with no additional complexity or logic needed in the lower layers. So that's probably good enough as is for now. But, making an alternative backend with bindings to the android RecordingCanvas would be an interesting benchmark, once we have the main pipeline working.

You can change any part of usvg render tree as you want. There is no need in recalculation, since it doesn't have any inheritable properties, unlike the SVG itself.
As for resvg, the most expensive part is layers. An we need a lot of them. Currently, resvg is specifically designed to reuse those layers. But this method is completely unsuitable for your case.

The things is, the input we get is normal svg including inheritance (no cascading, as we don't support css selectors), and when the properties of some ancestor changes, and descendant elements inherit that property, we would need to recalculate the render tree, ideally only for the parts of the tree where inheritance actually has an effect, that would be the main optimization in comparison to recalculating the entire render tree as soon as some inherited property changes. Similarly, if the element is referenced in a clippath or mask element. But this would require having dependency tracking in the shadowNodes, to know what parts of the usvg output is invalidated by changes in the svgdom input.

If you want to change a property in the SVG itself, than you have to recreate a render tree from scratch. I don't think that it's possible to do a partial update. SVG is too complex and interconnected for that.
PS: svgdom was removed in the master.

You can think of an react-native app a bit like compiling your own tailor made browser, and we're providing the svg idl implementation for it, such that react can be used to render the ui and attach event handlers.

I understand, but resvg has a far different architecture from a browser.

Sure, but for now I still think svgtree+usvg+resvg+resvg-skia is the main candidate to base a rewrite on, although fastuidraw seems very interesting as well, it could be built as another resvg backend instead.
We can just recalculate the entire render tree as soon as any inherited property changes, or any referenced element has changed in any way. The case for only changing the outermost transform can probably be handled without recalculating the render tree, at least if we skip vector-effects / any ctm dependant behavior.
Although non-scaling-stroke would only require passing the vector-effects value through usvg to the backend, such that it can be utilized if the specific rendering backend has chosen to implement support for it.

Are there any optimisations / opportunities for reuse if the same icon is rendered several times with e.g. different bitmap size?

Sort of. You can skip the parsing/preprocessing stage by keeping the usvg::Tree around. But in most cases, rendering is like 80% and parsing is just 20%. It's heavily depend on the file itself, but usually, the parsing is fairly fast. You can use the --perf flag on rendersvg CLI tool to see the real numbers.

The faq / answer here is a bit confusing

usvg dumps a preprocessed, simplified SVG. But to load it back, I have to do all the parsing all over again, because I can't guarantee that this file was actually created by usvg and was not modified. So we still have to do all the checks.
Yes, we can write a dedicated parser just for SVG files generated by usvg, but it will take like 2000-3000 LOC and wouldn't be that much faster.
Anyway, my point is that parsing time in like 90% of cases is neglectful. Something like a Gaussian blur will take times longer.

So, can we open this up again, since MS are supporting windows + macOS?

how to use svg in react-native-macos

Hey, this discussion kinda went over my head, but are there any news on this front? there is also a duplicated ticket now: https://github.com/react-native-community/react-native-svg/issues/1426

any updates?

While Googling around I saw that MS announced that they started to support SVG natively with React Native for Windows in this post dating to Feb 2020. https://microsoft.github.io/react-native-windows/blog/2020/02/010/m4updates#svg-image-support I guess this library probably provides more flexibility and configuration options?

FYI I think this library already works on MacOS as long as the build target is > MacOS 10.14. See this question: https://stackoverflow.com/questions/68510491/react-native-macos-component-exception I also tried it myself and it worked out of the box :)


Add filter to article index page

Hello Sir,  Can I work on this issue.
I am a frontend developer and i am very serious to work on this issue.
THANK YOU...

OK!
Thankyou for responding.


debug: Dummy change to test shaka bot

@shaka-bot help

@shaka-bot help

@shaka-bot help

@shaka-bot help

@shaka-bot help

@joeyparrish: I understand the following commands:

help: Show this help message
test: Start lab tests (maintainers only)

@shaka-bot test

@shaka-bot help

@shaka-bot help

@shaka-bot help

@joeyparrish: I understand the following commands:

help: Show this help message
test: Start lab tests (maintainers only)

@shaka-bot help

@joeyparrish: I understand the following commands:

help: Show this help message
test: Start lab tests (maintainers only)

@shaka-bot test

@joeyparrish: I failed to start the lab test workflow.
Please check GitHub Actions logs for details.


Group share with another group fails on a second run

The bug description
There is an awesome new feature to add a group as a member to another group.
Added in #233 by fantastic @andrewjw
Unfortunately it fails to recognise existing shares (created manually or by GitLabForm itself).
Steps to reproduce:

Create config with a group as another group member
Run GitLabForm (a successful run)
Run GitLabForm again (it fails)

Anonymized error:
Warning: Error occurred while processing group groupb, exception:
Request url='https://gitlab.example.com/api/v4/groups/groupb/share', method=POST, data='{'group_id': 28, 'expires_at': None, 'group_access': 40}' failed - expected code(s) [200, 201], got code 409 & body: 'b'{"message":"Shared group The group has already been shared with this group"}''
Traceback (most recent call last):
  File "/gitlabform/gitlabform/gitlabform/core.py", line 466, in process_all
    self.group_processors.process_group(
  File "/gitlabform/gitlabform/gitlabform/processors/group/__init__.py", line 36, in process_group
    processor.process(group, configuration, dry_run, output_file)
  File "/gitlabform/gitlabform/gitlabform/processors/util/decorators.py", line 42, in method_wrapper
    return method(self, project_and_group, SafeDict(configuration), *args)
  File "/gitlabform/gitlabform/gitlabform/processors/abstract_processor.py", line 47, in process
    self._process_configuration(project_or_project_and_group, configuration)
  File "/gitlabform/gitlabform/gitlabform/processors/group/group_shared_with_processor.py", line 81, in _process_configuration
    self.gitlab.add_share_to_group(
  File "/gitlabform/gitlabform/gitlab/groups.py", line 180, in add_share_to_group
    return self._make_requests_to_api(
  File "/gitlabform/gitlabform/gitlab/core.py", line 111, in _make_requests_to_api
    response = self._make_request_to_api(
  File "/gitlabform/gitlabform/gitlab/core.py", line 210, in _make_request_to_api
    raise UnexpectedResponseException(
gitlabform.gitlab.core.UnexpectedResponseException: Request url='https://gitlab.example.com/api/v4/groups/groupb/share', method=POST, data='{'group_id': 28, 'expires_at': None, 'group_access': 40}' failed - expected code(s) [200, 201], got code 409 & body: 'b'{"message":"Shared group The group has already been shared with this group"}''

There is a check in code that should end up with "Nothing to change for group '%s' - same config now as to set.",, but it seems to be not working for some reason.
GitLabForm version
🏗  GitLabForm version: 2.1.0 = the latest stable 😊
GitLab version
14.0.1

Debug logs show:
Group shared with BEFORE: [{'group_id': 28, 'group_name': 'Groupa', 'group_full_path': 'groupa', 'group_access_level': 40, 'expires_at': None}]
Adding group 'groupa' who previously was not a member.

Notice the register.
Looks like gitlabform/gitlabform/gitlabform/processors/group/group_shared_with_processor.py uses names to figure out weather group needs updating or not. I'd suggest to switch to the group_full_path.
I'll try to make a local change to see if works any better.

Hi,
I wasn't able to reproduce this, but I agree much better to use path than name. Were any of your groups subgroups? I've created a PR #237 which adds support for subgroups.
Thanks,
Andrew

Actually, I have managed to reproduce it now. Hopefully I'll have a fix soon 😄

I've confirmed that this is caused when you have a name that has non-url safe character in it (e.g. a space replaced by a hyphen in the path). This is fixed by #237.
Cheers,
Andrew

@andrewjw you're pure speed!
Thanks!

Regular 2.1.1 with this fixed has been (finally) releases today. Please reopen this ticket if it doesn’t fix your issue, @ejiek .
Thanks again for the PR, @andrewjw ! 😊

Works like a charm =]
@andrewjw, @gdubicki, thanks!

Got the same issue in 2.2.0:
$ gitlabform -c test-config.yml ei/scm/scm-test-zone
🏗  GitLabForm version: 2.2.0 = the latest stable 😊
:: # of groups to process: 1
:: # of projects to process: 2
@ (1/1) Processing group: ei/scm/scm-test-zone
Warning: Error occurred while processing group ei/scm/scm-test-zone, exception:
Request url='https://my.gitlab.server//api/v4/groups/ei%2Fscm%2Fscm-test-zone/share', method=POST, data={'group_id': 4095, 'expires_at': None, 'group_access': 30} failed - expected code(s) [200, 201], got code 409 & body: 'b'{"message":"Shared group The group has already been shared with this group"}''
Traceback (most recent call last):
  File "/gitlabform/gitlabform/core.py", line 339, in run
    self.group_processors.process_group(
  File "/gitlabform/gitlabform/processors/group/__init__.py", line 46, in process_group
    processor.process(group, configuration, dry_run, effective_configuration)
  File "/gitlabform/gitlabform/processors/util/decorators.py", line 42, in method_wrapper
    return method(self, project_and_group, SafeDict(configuration), *args)
  File "/gitlabform/gitlabform/processors/abstract_processor.py", line 46, in process
    self._process_configuration(project_or_project_and_group, configuration)
  File "/gitlabform/gitlabform/processors/group/group_shared_with_processor.py", line 77, in _process_configuration
    self.gitlab.add_share_to_group(
  File "/gitlabform/gitlabform/gitlab/groups.py", line 166, in add_share_to_group
    return self._make_requests_to_api(
  File "/gitlabform/gitlabform/gitlab/core.py", line 125, in _make_requests_to_api
    response = self._make_request_to_api(
  File "/gitlabform/gitlabform/gitlab/core.py", line 221, in _make_request_to_api
    raise UnexpectedResponseException(
gitlabform.gitlab.core.UnexpectedResponseException: Request url='https://my.gitlab.server//api/v4/groups/ei%2Fscm%2Fscm-test-zone/share', method=POST, data={'group_id': 4095, 'expires_at': None, 'group_access': 30} failed - expected code(s) [200, 201], got code 409 & body: 'b'{"message":"Shared group The group has already been shared with this group"}''

The config snippet:
projects_and_groups:

  # settings for ALL projects in 'scm-test-zone' group
  "ei/scm/scm-test-zone/*":

    group_shared_with:
      ei/reviewers/helm:
        group_access_level: 30

Do you also observe the issue on the second run only, @aleung ? If so, then I was not reproduce it easily yet, see commit above...

Can you please check this again with v2.8.0 released a moment ago, @aleung ? The implementation for sharing group with groups has changed a bit there.

I ran into this issue and found the problem was that I was using the Group name rather than the path. The name was something like "group-Name" and had capitals while the path was more like "group-name" and did not. GitLabForm should fail on the first run if sharing a group by name rather than path, but it can be easily mitigated by always using the path.

For whatever it's worth: I get the error with version 3.8.0 on the second run, even if I use paths.
I have
group/sub-group/sub-sub-group:
  group_members:
    groups:
      group/sub-group/another-sub-group:
        group_access: developer
  enforce: true
  keep_bots: false

The first run succeeds, the second run fails to do any updates to sub-sub-group with:
Request url='https://my.gitlab.host.url/api/v4/groups/group%2Fsub-group%2Fsub-sub-group/share', method=POST, data='{"expires_at": null, "group_access": 30, "group_id": 1111}' failed - expected code(s) [200, 201], got code 409 & body: '{"message":"Shared group The group has already been shared with this group"}'

What I mean with "any updates" is that if it has multiple another-sub-group-1, another-sub-group-2 it will fail. Also the enforcement fails, i.e., superflous shares aren't deleted (logically).

Maybe this will be fixed when https://github.com/gitlabform/gitlabform/issues/633 has been done. Would anyone be able to help with that?