Fix for issue #1922

I'm not sure if i'm approaching this correctly. The target situation is:

do not block Google OAuth2 callback requests (we need to whitelist it)
make sure that GOAuth2 whitelist won't open new holes in the firewall

This would be an easy task if 'logical OR' was available in SecRule or in chaining of multiple SecRules (i don't know of any at least similar functionality in modsecurity).
I decided to create a detection rule (930050) for Google OAuth2 callback, which is as tight as possible to not allow any bypass or data injection. Finally, i chained rule 930120 (which was triggering with Google OAuth2 callback) with new one which checks if Google OAuth2 callback request was detected.

@azurit can you squash into just one (or three) commit(s)?

@azurit can you squash into just one (or three) commit(s)?

@azurit can you squash into just one (or three) commit(s)?

Should i send new PR?

@azurit can you squash into just one (or three) commit(s)?

Should i send new PR?

Meeting decision monthly chat Jan 2020:
@dune73 will review this. Not the least the architecture of the new rule and how the various rules are chained together.

Meeting decision monthly chat Jan 2020:
@dune73 will review this. Not the least the architecture of the new rule and how the various rules are chained together.

Hey @dune73, i was able to find more info to my previous message (see above).
The problem arises from the fact that only the last match by @pmFromFile is accessible to chained rules because it is passed using the tx.0 variable. For example, if rule is using @pmFromFile and matches, for example, two patterns in two different arguments within ARGS (/?a=.bashrc&b=.bash_history), only the last matched argument is passed to chained rule (.bash_history in this case). Chained rule has no standard way how to access all matched patterns so it cannot add score for them - it will add score only for one match.
See this, rule:
SecRule ARGS "@pm test1 test2" \
   "id:999999999,\
   phase:2,\
   block,\
   capture,\
   logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',\
   chain"
   SecRule MATCHED_VARS "@unconditionalMatch" \
       "setvar:'tx.lfi_score=+%{tx.critical_anomaly_score}',\
       setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}'"

Testing URL:
/?a=some/test1/thing&b=some/test2/thing
Logs:
... [data "Matched Data: test2 found within ARGS:a: some/test1/thing"] ...
... [data "Matched Data: test2 found within ARGS:b: some/test2/thing"] ...

Notice that tx.0 is test2 in both cases.

Hey @dune73, i was able to find more info to my previous message (see above).
The problem arises from the fact that only the last match by @pmFromFile is accessible to chained rules because it is passed using the tx.0 variable. For example, if rule is using @pmFromFile and matches, for example, two patterns in two different arguments within ARGS (/?a=.bashrc&b=.bash_history), only the last matched argument is passed to chained rule (.bash_history in this case). Chained rule has no standard way how to access all matched patterns so it cannot add score for them - it will add score only for one match.
See this, rule:
SecRule ARGS "@pm test1 test2" \
   "id:999999999,\
   phase:2,\
   block,\
   capture,\
   logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',\
   chain"
   SecRule MATCHED_VARS "@unconditionalMatch" \
       "setvar:'tx.lfi_score=+%{tx.critical_anomaly_score}',\
       setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}'"

Testing URL:
/?a=some/test1/thing&b=some/test2/thing
Logs:
... [data "Matched Data: test2 found within ARGS:a: some/test1/thing"] ...
... [data "Matched Data: test2 found within ARGS:b: some/test2/thing"] ...

Notice that tx.0 is test2 in both cases.

The thing about MATCHED_VAR
OK, here we go. First about your latest comment. You got this right. The reason being, in a chained rule, ModSec loops throught he first rule with all parameters and then advances all these matches to the chained rule. The MATCHED variables always refer to the previous / latest execution of a rule. This is very annoying sometimes and it's something you just need to keep in mind when writing rules. As a side note: When you think how ModSec works internally, you maybe realize this is the easiest way to construct rule execution. Running through a chain first with the 1st argument and then the 2nd argument through the full chain would feel more natural, but it is much harder to do. At least this is what I think.
Rule order
Your conclusion, that you need to do &TX:google_oauth2_callback_detected|TX:google_oauth2_callback_detected first is wrong AFAICT. Your observation does not hold true in my test. However, due to the MATCHED problem pointed out above, you still need to run this first, so you can do the proper logdata with the MATCHED vars in place. I would prefer this oauth2 var check to go 2nd, but it would disrupt the logdata. So the order is OK.
Review of PR
At first, I thought this whole construct was a sophisticated backdoor to bypass 930120. But then I came to the conclusion that you make a lot to prevent an attacker from using this bypass as a means to execute an attack. Maybe still not enough, but let's look at this in detail.
The rule 930050 tries to identify OAuth2 requests. It does this by counting the number of ARGS and by making sure the names are correct. This makes it very hard to abuse this functionality to deliver an exploit around 930120 since you can not longer pick the variable name freely. So this is very strong.
It is not very strong when it comes to REQUEST_COOKIES and XML, though. Rule 930120 checks for exploits via cookies and XML. When you combine such an attack with a bogus OAuth2 query string, you bypass 930120. In the case of XML that's because the XML processor does not add the XML parameter to the the list in ARGS.
So I think we should try and avoid this by splitting the rule.
Cookies and XML should be shifted to 930121.
Various nitpicking

Your rule 930050 carries tags. But it does not log at all. I think you can remove them.
I think 930050 can be simplified by replacing the var counter with this construct: SecRule ARGS_NAMES "!@rx ^(code|scope|state)$" . I load tested this. It takes only half as long as your 3-story check due to the fewer SecRules.
It would probably further strengthen the construct, if 930050 would check the REQUEST_METHOD as well. It's just that I do not know whether this is GET or POST.
If ARGS:scope is only submitted as query-string, then you can limit this to ARGS_GET:scope in 930050.
I wonder how we will react when google changes the API for the OAuth2 call. We are ossifying their API with this workaround here. There is little we can do to avoid this, so let's just keep it in mind.

If you are able to execute these updates, I think we are ready to merge. I would not mind some explanation in the comments what you are doing and why you are doing it. Since you have to split 930121, this is probably a good location to explain 930050 together with it.

The thing about MATCHED_VAR
OK, here we go. First about your latest comment. You got this right. The reason being, in a chained rule, ModSec loops throught he first rule with all parameters and then advances all these matches to the chained rule. The MATCHED variables always refer to the previous / latest execution of a rule. This is very annoying sometimes and it's something you just need to keep in mind when writing rules. As a side note: When you think how ModSec works internally, you maybe realize this is the easiest way to construct rule execution. Running through a chain first with the 1st argument and then the 2nd argument through the full chain would feel more natural, but it is much harder to do. At least this is what I think.
Rule order
Your conclusion, that you need to do &TX:google_oauth2_callback_detected|TX:google_oauth2_callback_detected first is wrong AFAICT. Your observation does not hold true in my test. However, due to the MATCHED problem pointed out above, you still need to run this first, so you can do the proper logdata with the MATCHED vars in place. I would prefer this oauth2 var check to go 2nd, but it would disrupt the logdata. So the order is OK.
Review of PR
At first, I thought this whole construct was a sophisticated backdoor to bypass 930120. But then I came to the conclusion that you make a lot to prevent an attacker from using this bypass as a means to execute an attack. Maybe still not enough, but let's look at this in detail.
The rule 930050 tries to identify OAuth2 requests. It does this by counting the number of ARGS and by making sure the names are correct. This makes it very hard to abuse this functionality to deliver an exploit around 930120 since you can not longer pick the variable name freely. So this is very strong.
It is not very strong when it comes to REQUEST_COOKIES and XML, though. Rule 930120 checks for exploits via cookies and XML. When you combine such an attack with a bogus OAuth2 query string, you bypass 930120. In the case of XML that's because the XML processor does not add the XML parameter to the the list in ARGS.
So I think we should try and avoid this by splitting the rule.
Cookies and XML should be shifted to 930121.
Various nitpicking

Your rule 930050 carries tags. But it does not log at all. I think you can remove them.
I think 930050 can be simplified by replacing the var counter with this construct: SecRule ARGS_NAMES "!@rx ^(code|scope|state)$" . I load tested this. It takes only half as long as your 3-story check due to the fewer SecRules.
It would probably further strengthen the construct, if 930050 would check the REQUEST_METHOD as well. It's just that I do not know whether this is GET or POST.
If ARGS:scope is only submitted as query-string, then you can limit this to ARGS_GET:scope in 930050.
I wonder how we will react when google changes the API for the OAuth2 call. We are ossifying their API with this workaround here. There is little we can do to avoid this, so let's just keep it in mind.

If you are able to execute these updates, I think we are ready to merge. I would not mind some explanation in the comments what you are doing and why you are doing it. Since you have to split 930121, this is probably a good location to explain 930050 together with it.

Thank you for the review!

It is not very strong when it comes to REQUEST_COOKIES and XML, though. Rule 930120 checks for exploits via cookies and XML. When you combine such an attack with a bogus OAuth2 query string, you bypass 930120. In the case of XML that's because the XML processor does not add the XML parameter to the the list in ARGS.

There's NEVER a XML in OAuth2 callback, so XML itself this can be handled inside rule 930050:
SecRule &XML "@eq 0" ...
What do you think?

* I think 930050 can be simplified by replacing the var counter with this construct: `SecRule ARGS_NAMES "!@rx ^(code|scope|state)$" `. I load tested this. It takes only half as long as your 3-story check due to the fewer SecRules.

I'm, probably, misunderstanding you here. Did you mean @rx instead of !@rx?

Thank you for the review!

It is not very strong when it comes to REQUEST_COOKIES and XML, though. Rule 930120 checks for exploits via cookies and XML. When you combine such an attack with a bogus OAuth2 query string, you bypass 930120. In the case of XML that's because the XML processor does not add the XML parameter to the the list in ARGS.

There's NEVER a XML in OAuth2 callback, so XML itself this can be handled inside rule 930050:
SecRule &XML "@eq 0" ...
What do you think?

* I think 930050 can be simplified by replacing the var counter with this construct: `SecRule ARGS_NAMES "!@rx ^(code|scope|state)$" `. I load tested this. It takes only half as long as your 3-story check due to the fewer SecRules.

I'm, probably, misunderstanding you here. Did you mean @rx instead of !@rx?

Yes, that is a solution for XML, but how about the cookies?
And if you need to do something about the cookies, then I think you can move XML into said rule too. Makes for a simpler rule 930120.
rx vs !rx: You are right of course.

@dune73 can you check this now? Thank you.

Thank you @azurit.
For the record: We talked about my SecRule ARGS_NAMES "!@rx ^(code|scope|state)$" idea during the monthly meeting. It's not working because it does not take the necessary uniqueness of the parameters into consideration. So @azurit's less elegant approach is better.
We're good to go now and the following are just optimizations:

Please cut your comments at 80 chars width.
Your rule 930050 is very clean and logic - and unnecessarily slow. You can save a SecRule call for > 99% of requests by   putting the argument counters (-> @eq 1) first. In your construct most requests will be positive on the first rule in the chain and then drop out with the 2nd rule in the chain. If you cant the state ARGS first, > 99.99% of the requests will drop out in the first rule in the chain. You thus save a SecRule for most requests. It's less beautiful, but more effective.
Could you provide some tests for 930121, please?
Please refer to 930120 in the comment for 930050
930121 is in fact close to a stricter sibling of 930120 (the same rule without the restriction - applied to different ARGS). I think you should call it that way since it's the keyword we use.
Please be very concise with the comments for 930120. First you say what you do, then how you do it. The original rule / comment is weak in this regard. Let's improve it. Proposal:

# -=[ OS File Access ]=-
#
# We check for OS file access with the help of a local file with OS files data.
#
# Ref: https://github.com/lightos/Panoptic/blob/master/cases.xml
#
# We need to avoid false positives with Google OAuth2 callback requests. We detect
# those with the help of rule 930050. The OS file access detection rule itself is split in
# a simple version 930121 and a chained version 930120 that takes said callback
# requests into consideration in a chained rule. 930120 has to start with the OAuth2
# check, since we want to log information in MATCHED_VAR in logdata and that
# variable points to the infos from the last chained rule.
#
# 920120 OS Files Access check for ARGS
# 920121 OS Files Access check for REQUEST_COOKIES and XML (stricter sibling)
#

@dune73 Thanks, i will process your comments ASAP.
I have one problem with the new form of rule 930120 - i'm not able to exclude it using exclusion rule. Can you, please, advice me how exclusion rule should look for one specified ARGS? Btw, exclusion is definitely not backward compatible.

Thank you for pointing this out to me. I really think I have never stumbled over this behaviour. Great you noticed this.
Confirmed, it's not possible to do a runtime rule exclusion for an individual argument.
I did a minimal recipe that shows this behaviour:
SecAction               "id:1000,phase:2,pass,log,\
                        ctl:ruleRemoveTargetById=1001;ARGS:foo,\
                        ctl:ruleRemoveTargetById=1002;ARGS:foo"

SecRule DURATION        "@gt 0"         "id:1001,phase:2,pass,log,chain"
  SecRule ARGS:foo      "HIT"

SecRule ARGS:foo        "HIT"           "id:1002,phase:2,pass,log,chain"
  SecRule DURATION      "@gt 0"

This will trigger 1001, while 1002 is successfully excluded.
Need to think how to work around this without getting a bad log message due to MATCHED_VAR.

All done but i suggest not to merge this yet, see:
https://github.com/coreruleset/coreruleset/pull/1958#issuecomment-774157512
https://github.com/coreruleset/coreruleset/pull/1958#issuecomment-776867902

Yes, we need to come to a conclusion here.
I think we should go with a variant that works with rule exclusions even if the alert message will lack some information that way. That's annoying but still better than not being able to do a reasonable rule exclusion that generally works.

Meeting decision chat meeting May: @azurIt will finish he PR for excludability.

@dune73 This is done BUT i was able to find a way how to make logs a little better, no sure if it's worth it though.
We can change the first rule like this:
SecRule ARGS_NAMES|ARGS "@pmFromFile lfi-os-files.data" \
    ...
    logdata:'Matched Data: %{TX.0} found within %{tx.930120_matched_var_name}: %{tx.930120_matched_var}',\
    ...
    setvar:'tx.930120_matched_var_name=%{MATCHED_VAR_NAME}',\
    setvar:'tx.930120_matched_var=%{MATCHED_VAR}',\
    chain"
    ...

Logs before (with current version of this PR):
ModSecurity: Warning. Operator EQ matched 0 at TX. [file "/usr/share/modsecurity-crs-new/rules/REQUEST-930-APPLICATION-ATTACK-LFI.conf"] [line "149"] [id "930120"] [msg "OS File Access Attempt"] [data "Matched Data: etc/passwd found within TX: 0"]
Logs after applying changes above:
ModSecurity: Warning. Operator EQ matched 0 at TX. [file "/usr/share/modsecurity-crs-new/rules/REQUEST-930-APPLICATION-ATTACK-LFI.conf"] [line "151"] [id "930120"] [msg "OS File Access Attempt"] [data "Matched Data: etc/passwd found within ARGS:a: /etc/passwd"]
What do you think?

Great idea. Let's do this! Given it only happens on hits, there is no performance impact for normal users outside of the known OAuth2 requests and they will be able to swallow this since it avoids their FPs.

Thank you for this welcome pull request and the extensive optimization. Merging now.


AttributeError while running tornado tests

When running tests with tornado 6.2.0:
FAILED tests/test_tornado.py::TornadoLDAPConnectionTest::test_add_and_delete - AttributeError: 'TornadoLDAPConnectionTest' object has no attribute 'should_close_asyncio_loop'
FAILED tests/test_tornado.py::TornadoLDAPConnectionTest::test_connection - AttributeError: 'TornadoLDAPConnectionTest' object has no attribute 'should_close_asyncio_loop'
FAILED tests/test_tornado.py::TornadoLDAPConnectionTest::test_modify_and_rename - AttributeError: 'TornadoLDAPConnectionTest' object has no attribute 'should_close_asyncio_loop'
FAILED tests/test_tornado.py::TornadoLDAPConnectionTest::test_obj_err - AttributeError: 'TornadoLDAPConnectionTest' object has no attribute 'should_close_asyncio_loop'
FAILED tests/test_tornado.py::TornadoLDAPConnectionTest::test_paged_search - AttributeError: 'TornadoLDAPConnectionTest' object has no attribute 'should_close_asyncio_loop'
FAILED tests/test_tornado.py::TornadoLDAPConnectionTest::test_paged_search_with_auto_acq - AttributeError: 'TornadoLDAPConnectionTest' object has no attribute 'should_close_asyncio_loop'
FAILED tests/test_tornado.py::TornadoLDAPConnectionTest::test_recursive_delete - AttributeError: 'TornadoLDAPConnectionTest' object has no attribute 'should_close_asyncio_loop'
FAILED tests/test_tornado.py::TornadoLDAPConnectionTest::test_search - AttributeError: 'TornadoLDAPConnectionTest' object has no attribute 'should_close_asyncio_loop'
FAILED tests/test_tornado.py::TornadoLDAPConnectionTest::test_whoami - AttributeError: 'TornadoLDAPConnectionTest' object has no attribute 'should_close_asyncio_loop'

I have an easy fix.

I've just recently fixed it on the dev branch. (https://github.com/noirello/bonsai/commit/ccf9ce3ffb68680917ebfc977c1a65e3eccd122e)

1.5.0 is just released with the fix.


Support for Eldom Smart boilers

Like this one.

This would be great! Tried to adjust the current version by changing flat by smart and referring to the 0.2.0 package but I get an error and I don't have the knowledge to solve it.

Hello, and what about the heaters like that: https://eldominvest.com/en/category/20.html
I will buy you more than 1 beer :)
Cheeers,
Juraj

@juras72, I'd love to support those as well! 😄 The only problem is that I cannot get a hold of the APIs for those devices. 😕 I tried reaching out to Naturela (the developers of those APIs), but they weren't super keen on giving me some docs.

@jeroenb21, I just released 1.0.0 and I added support for smart boilers.
Can you try out the integration and let me know if it works well for you?

@juras72, I'll reopen a new issue requesting support for the devices that you've shown.

This issue is resolved with 1.0.0.

@jeroenb21, I just released 1.0.0 and I added support for smart boilers.
Can you try out the integration and let me know if it works well for you?

Hi Daniel,
I installed the newer version, it says 2.0.0 ?
I can login now and see the boiler. But there is not a lot I can do with it. Only some consumption numbers.

Hi, @jeroenb21!
Oh, that's interesting. You should also see the water heater entity itself. 😕
I'm testing with the following smart boiler: https://eldominvest.com/bg/product/502.html
I'm getting this functionality:

The functionalities are:

Water heater entity functionalities
Powerful mode enabling
Sensor data (that you already see)

Can you try updating the integration again? I just pushed a minor version to fix two smart boiler API calls that I had mistaken. And let me know if it works well this time.

Hi @danielgospodinow,
I edited the above comment but I see it doesnt really show. But after a hour it was working like it should.
Thank you !

Hi Daniel,
I got this message when adjusting the tempreture. Seems its looking at the wrong url.

@jeroenb21, yes, that's correct. I had a bug a while back that's fixed now. Can you try and update to the latest version? It's 2.2.3. The issue should no longer be there.


Make project Python2 compatible

This simple commit performs syntax changes to make the project work in Python 2. This is fully backwards compatible.
EDIT: Made a second commit removing an unnecessary pprint import

Hi!
Well, it is your call. At our company many projects are still stuck with legacy code based on python 2, and I believe that there may be others in such a situation. I belive that even after Django drops its support for security backwards into python 2, a lot of legacy code will be stuck in Python 2 and it will be hard for companies to port due to the changes required (mainly regarding string handling).
My personal opinion is that I would accept this pull request but not make Python 2 support a required feature, leaving it as a "could have" instead of a "must have". This is because supporting python 2 could eventually become a hinderance, though at the moment it does not seem to be the case. I am also a great fan of python 3, but, alas, I am stuck with legacy code.

Any update on this?

Hi! I agree with @apirobot, the suggested fix should be implemented, though this has not been an issue we have faced yet.

@Jorl17 cool! I'm just looking to use this feature so I'm hoping to get this stabilized soon :)


[BUG]

Describe the bug
While requesting livekit-cli start-track-egress --request room-composite.json
i'm getting EgressID: EG_3UzEqE7DtZ9a Status: EGRESS_STARTING.
But its raising an error on Egress docker.
Egress Version
What version are you running?
v1.6.0
room-composite.json

{
  "room_name": "mxxxxd3-standup-call",
  "track_id": "TR_VCf7WP7uviGNYx",
  "file": {

      "filepath": "out/track-test.mp4",
      "s3": {
        "access_key": "",
        "secret": "",
        "region": "us-east-1",
        "bucket": ""
      }
  }
}

egress config.yaml

log_level: debug
api_key: access_token
api_secret:
ws_url: wss://URL
insecure: false

redis:
    address:
    db: 0
    username: default
    password:
    use_tls: true
s3:
    access_key:
    secret:
    region: us-east-1
    # endpoint:
    bucket: lkbk

Logs
   WARN    egress  service/handler_deprecated.go:145       egress failed   {"nodeID": "NE_KBH9nyimMXGh", "handlerID": "EGH_k3kCwaYyeJ6d", "clusterID": "", "egressID": "EG_XcbrVakMMr4p", "egressID": "EG_XcbrVakMMr4p", "request_type": "track", "output_type": "file", "error": "could not establish signal connection"}

This is not a bug - the egress failed after it was started, because it could not connect to your livekit server.
It will send an egress_ended webhook with status FAILED, and the ListEgress API will also show that it failed

udp port 7882 should be enabled ?

@frostbyte73 Room composite is working this is only for track composite


freeplay bug

Describe your bug here.
freeplay crashes everytime i open it
Command Prompt/Terminal logs (if existing)
objects/HealthIcon.hx (line 35)
objects/HealthIcon.hx (line 15)
states/FreeplayState.hx (line 109)
flixel/FlxGame.hx (line 640)
flixel/FlxGame.hx (line 727)
flixel/FlxGame.hx (line 680)
flixel/FlxGame.hx (line 559)
openfl/events/EventDispatcher.hx (line 426)
openfl/display/DisplayObject.hx (line 1398)

Uncaught Error: Null Object Reference
Please report this error to the GitHub page: https://github.com/ShadowMario/FNF-PsychEngine

> Crash Handler written by: sqirra-rng

Are you modding a build from source or with Lua?
Source
What is your build target?
Linux
Did you edit anything in this build? If so, mention or summarize your changes.
titlestate.hx

Not a bug
Missing character icon

oh


render file not work

mu issue is when i'm trying to print file based on blade but what i get is blank page so what's wrong

maybe check your path again

my blade path is correct but it dont work for me.


"FlutterLoader.loadEntrypoint" is deprecated and Local variable for "serviceWorkerVersion" is deprecated.

Steps to reproduce

Add Lottie animation to index.html.
Launch the app in debug mode for web (e.g., flutter run -d chrome).
The console shows deprecation warnings for:
serviceWorkerVersion
FlutterLoader.loadEntrypoint
Follow the suggestion to replace FlutterLoader.loadEntrypoint with FlutterLoader.load as per the Flutter Web documentation.
Try building the app for release.

Expected results
The app should build and work as expected after replacing deprecated methods with the suggested alternatives.
Actual results
When I replace FlutterLoader.loadEntrypoint with FlutterLoader.load, the app fails to build. However, when keeping the deprecated code, the app builds successfully, but the warnings remain.
Code sample
<!DOCTYPE html>

    <base href="$FLUTTER_BASE_HREF" />

    <meta charset="UTF-8" />
    <meta content="IE=Edge" http-equiv="X-UA-Compatible" />
    <meta name="description" content="Brainbow" />

    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="apple-mobile-web-app-title" content="example" />
    <link rel="apple-touch-icon" href="icons/Icon-192.png" />

    <meta
      property="og:image"
      content="https://d2036qg8j5zv6p.cloudfront.net/static/brainbow-logo.png"
    />
    <meta property="og:title" content="Brainbow" />
    <meta
      property="og:description"
      content="
Brainbow is a self-improvement platform designed to help individuals enhance their productivity, set personal growth goals, and track progress. It provides a range of tools and resources, from personalized plans to community-driven support, all aimed at fostering development and achieving success."
    />

    <meta
      itemprop="image"
      content="https://d2036qg8j5zv6p.cloudfront.net/static/brainbow-logo.png"
    />
    <meta itemprop="title" content="Brainbow" />
    <meta
      itemprop="description"
      content="
Brainbow is a self-improvement platform designed to help individuals enhance their productivity, set personal growth goals, and track progress. It provides a range of tools and resources, from personalized plans to community-driven support, all aimed at fostering development and achieving success."
    />

    <meta
      name="twitter:card"
      content="https://d2036qg8j5zv6p.cloudfront.net/static/brainbow-logo.png"
    />
    <meta name="twitter:title" content="Brainbow" />
    <meta
      name="twitter:description"
      content="
Brainbow is a self-improvement platform designed to help individuals enhance their productivity, set personal growth goals, and track progress. It provides a range of tools and resources, from personalized plans to community-driven support, all aimed at fostering development and achieving success."
    />
    <meta
      name="twitter:image"
      content="https://d2036qg8j5zv6p.cloudfront.net/static/brainbow-logo.png"
    />

    <link rel="icon" type="image/png" href="favicon.png" />

    <title>Brainbow</title>
    <link rel="stylesheet" href="splash/style.css" />
    <link rel="manifest" href="manifest.json" />

    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.2/cropper.css"
    />

          <lottie-player
            src="splash/splash.json"
            background="transparent"
            speed="1"
            style="width: 164px; height: 164px"
            autoplay
          ></lottie-player>

Screenshots or Video

Logs
No response
Flutter Doctor output
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-arm64, locale en-BA)
• Flutter version 3.24.3 on channel stable at /Users/asmiralic/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (6 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/asmiralic/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.94.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.98.0
[✓] Connected device (5 available)
• QUAD CORE A133 c3 (mobile)      • <IP_ADDRESS>:5555           • android-arm    • Android 10 (API 29)
[✓] Network resources
• All expected network resources are available.
• No issues found!

Thanks for the report @asmiralic

Add Lottie animation to index.html.

Does the reported error occur without this step ? Or just using the default index.html that Flutter generates ?

With default index.html that Flutter generates error does not occur.

Thanks for the update. Seeing the same behavior upon following steps to replicate and code sample provided.
stable : 3.24.3
master : 3.27.0-1.0.pre.231

@asmiralic You need to add the {{flutter_build_config}} template token into your index.html or flutter_bootstrap.js file for the flutter tool to inject some build information. There is some information documented here: https://docs.flutter.dev/platform-integration/web/initialization#customize-initialization

I appreciate your help @eyebrowsoffire. I followed the documentation you provided, but I still have an issue, the loader stays on the browser and I can not access my app.
This is an updated index.html with added template token:
`

<meta charset="UTF-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<meta name="description" content="A new Flutter project." />

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="example" />
<link rel="apple-touch-icon" href="icons/Icon-192.png" />

<link rel="icon" type="image/png" href="favicon.png" />

<title>Flutter Web Console Template</title>
<link rel="stylesheet" href="splash/style.css" />
<link rel="manifest" href="manifest.json" />

`

Thank you so mutch for your time and effort, I SOLVED this issue following your's instruction. I will separate js script in another file, but for easier reading I will provide my index.html that is working now:
`

<meta charset="UTF-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<meta name="description" content="Brainbow admin console" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="example" />
<link rel="apple-touch-icon" href="icons/Icon-192.png" />

<meta property="og:image" content="https://d2036qg8j5zv6p.cloudfront.net/static/brainbow-logo.png">
<meta property="og:title" content="Brainbow admin console">
<meta name="twitter:card" content="https://d2036qg8j5zv6p.cloudfront.net/static/brainbow-logo.png">


How can i port my distro on m1?

i want to port my os on apple silicon, is there a guide?

Here it is: https://github.com/AsahiLinux/docs/wiki/Open-OS-Ecosystem-on-Apple-Silicon-Macs


Fixing permissions in the sample code

Thank you for the wonderful documentation! I am a beginner currently studying Microsoft Security DevOps.
I encountered an issue where the sample code did not work properly, specifically during the "Upload alerts to Security tab" step, where I can see an error. The issue stemmed from not having granted the security-events: write permission. The "CodeQL Action" used in this step requires the security-events: write permission.

All advanced setup code scanning workflows must have the security-events: write permission. Workflows in private repositories must additionally have the contents: read permission. For more information, see "Assigning permissions to jobs."

↑(Quoted from the README of the CodeQL Action repo)

@dcurwin
IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off


How to bind confirm completion correctly

Hey :wave:
So this got removed a while ago.
I'm using the delimitMate plugin for completing parenthesis etc with some smart features. The issue: this maps the return key as well. So this is my current approach how to do it based on the docs for this and the other plugin:
inoremap <expr> <CR>  pumvisible() ? complete_info()["selected"] != "-1" ?
      \ "\<Plug>(completion_confirm_completion)" :
      \ "\<C-e>\<Plug>delimitMateCR" :
      \ "\<Plug>delimitMateCR"

So I type myFunction. While doing that the completion menu opens automatically. But I'm already mostly done typing and the flow is so fast, so I don't use completion. Then I type (<CR> at the end to pass the paramters in the new lines. The expected result with delimitMate should be:
myFunction(
  <cursor>
)

Actual result (note the missing opening parenthesis as well):
myFunction<Plug>delimitMateCR)

PS: I have toggled the completion_enable_auto_paren but it doesn't change anything.

 Ofc does <expr> not work for non-recursive mapping commands.
But I'm still missing the parenthesis. An idea?

My setting work on golang code using this configuration.
-- my indentation on lua
vim.o.autoindent = true
vim.o.smarttab = true
vim.o.cindent = true
vim.o.tabstop = 2
vim.o.softtabstop = 2
vim.o.shiftwidth = 2
vim.o.expandtab = true
vim.cmd('filetype indent off')

vim.g.delimitMate_expand_cr = 1
--vim.cmd('let delimitMate_expand_cr=1')
vim.g.delimitMate_jump_expansion = 1

On LSP completion
vim.g.completion_confirm_key = ""
vim.cmd([[imap <expr> <cr>  pumvisible() ? complete_info()["selected"] != "-1" ? "<Plug>(completion_confirm_completion)"  : "\<c-e>\<CR>" : "\<Plug>delimitMateCR"]])

As I switched over to compe, I gonna close this issue.


minihtml reference index

Is it important to note the CSS and/or tags supported by minihtml?

I don't believe they need to be indexed, or at least I personally don't need them to be. Opening the docs on the minihtml page should be enough, where they can be easily seen without scrolling.


Revert "Fix parsing of retry codes from config json."

Reverts googleapis/gax-nodejs#108.
This was originally done to get gax-nodejs into a working condition until a decision was made on whether to remove retry_codes_def. We have decided to remove retry_codes_def so this fix is now unnecessary.

Codecov Report

Merging #111 into master will decrease coverage by -0.19%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
- Coverage   93.07%   92.89%   -0.19%
==========================================
  Files          10       10
  Lines        1227     1224       -3
  Branches      246      245       -1
==========================================
- Hits         1142     1137       -5
- Misses         85       87       +2

Impacted Files
Coverage Δ

lib/gax.js
90.47% <ø> (-0.23%)
:x:

lib/api_callable.js
95.16% <ø> (-1.62%)
:x:

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 842a24e...9ad55e8. Read the comment docs.


Sync to live

Docs Build status updates of commit 48f1aaa:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/consume-packages/Package-Restore.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 53fed0e:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/consume-packages/Package-Restore.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


adding mandatory field server.host and Drone UI

Without specifying server.host in the <scheme>://<hostname> format, pods fails because there is a validation for this in the DRONE code. This behavior is at least on Kubernetes 1.9.2 with Github.
Without having DRONE_OPEN, you cannot get inside the DRONE UI (you don't get authorized) and I don't really see any usage for it without this flag.

There is already a PR open about this problem, please see https://github.com/kubernetes/charts/pull/3594. The host is actually set, but it doesn't satisfy the constraint that has been added to the version 8.4.
Thank you for your PR but I think that once https://github.com/kubernetes/charts/pull/3594 will be merged then everything will work again as expected. You can close this PR.

Yeah, sure! That PR looks much better.


Implement the home page

Coverage increased (+0.03%) to 93.31% when pulling 8f1c2ac95c27f93bb4d95f51018c8f57f7a6d131 on implement-home-page into a71b43c26b9fda1c1976c55e82c84339efdc0c1c on master.

Coverage increased (+0.03%) to 93.31% when pulling 8f1c2ac95c27f93bb4d95f51018c8f57f7a6d131 on implement-home-page into a71b43c26b9fda1c1976c55e82c84339efdc0c1c on master.

Coverage increased (+0.03%) to 93.31% when pulling 4e477b59ca05dfabe19c7b5b758fd31a5a7d6d31 on implement-home-page into a71b43c26b9fda1c1976c55e82c84339efdc0c1c on master.


Update 'Get my applied mentors' endpoint to return only 1 mentor

Is your feature request related to a problem? Please describe.
In sx-february edition, we are not allowing mentees to apply for multiple mentors. So we don't need to return a list of mentors when mentees check their applied mentor.
Describe the solution you'd like

Change the method names(controller-getAppliedMentor, service-getAppliedMentorOfMentee)
Remove the menteeState path param
Use the findByProgramIdAndProfileId repository method to get the mentee object
Throw NoContentException if the mentee doesn't exist
Return the mentee
Update the unit tests

Describe alternatives you've considered
N/A
Additional context
N/A

Hi @Piumal1999,
I would like to try working on this, could you assign it to me?


Support code folding

It would be nice to be able to collapse blocks, chapters, etc., similar to what this extension does.

:+1:


Show indicatorTextLabel.text on top of progress instead of getting overlapped

Hi,
First of all, what a great library. Thank-you for the effort!
My question.
I was wondering if it would be possible to have the indicatorTextLabel text show above the progress instead of getting overlapped (see screenshot where the text "SOME TEXT" starts to hide behind the progress bar)

NSArray *tintColors = @[[UIColor colorWithRed:33/255.0f green:180/255.0f blue:162/255.0f alpha:1.0f],
                            [UIColor colorWithRed:149/255.0f green:37/255.0f blue:36/255.0f alpha:1.0f];
  _progressBarRoundedSlim.progressTintColors        = tintColors;

    _progressBarRoundedSlim.hideStripes = YES;
    _progressBarRoundedSlim.trackTintColor = [UIColor whiteColor];
    _progressBarRoundedSlim.progressBarInset = 3;

    _progressBarRoundedSlim.indicatorTextLabel.text = @"SOME TEXT";
    _progressBarRoundedSlim.hideGloss = YES;

    _progressBarRoundedSlim.indicatorTextDisplayMode = YLProgressBarIndicatorTextDisplayModeTrack;
    _progressBarRoundedSlim.indicatorTextLabel.font  = [UIFont fontWithName:@"Arial-BoldMT" size:20];
    _progressBarRoundedSlim.indicatorTextLabel.textColor = [UIColor blackColor];

Thank-you.

Hi,
Sorry for the late, I just published a new pod version with the possibility to do that with the YLProgressBarIndicatorTextDisplayModeFixedRight enum case. :)
_progressBarRoundedSlim.indicatorTextDisplayMode = YLProgressBarIndicatorTextDisplayModeFixedRight;

I hope it'll be ok for you!

Brilliant! Thank-you :)


Allow readonly arrays on enum definitions

Sometimes you want to do something like this:
const AVAILABLE_OPTIONS = ["a", "b", "c"] as const

const optionsSchema = t.enum(AVAILABLE_OPTIONS)

but you get the following error:
Argument of type 'readonly ["a", "b", "c"]' is not assignable to parameter of type 'Value[]'.
  The type 'readonly ["a", "b", "c"]' is 'readonly' and cannot be assigned to the mutable type 'Value[]'

Could you also allow readonly V[] on the parameter to allow this sort of usage?

At the JSON Schema level, you can only attach readOnly to a field, so to do this, you need to define a readonly array of enum items
What you have shown is just a type assertion/override that doesn't actually translate into anything special at runtime.
Attaching a commit w/ an example showing how to do this, and below is the intellisense to prove the inference is what you want


Facet picker

Just like the license and date pickers we want to use in our UIs for various views, we want to have a facet picker that lists the facets and allows users to select a facet. The main scenario for this is on the Full Details page for a component.
We will likely need to iterate on the design/flow of this. Starting off simple, perhaps something and leveraging the following assumptions:

There are exactly 6 facets
The core facet is not user-defined. Rather it is whatever is left over from not being in another facet
Each facet is a list of globs
Facets can overlap. that is, one file can be in multiple facets
A very common case is that a folder and its transitive children are assigned to a facet

So a first cut might be something like

facet
definition

core
"everything that is not otherwise assigned a facet"

data
**/*.csv

dev

doc

examples
src/examples/**/*.js

test
test/**/*.js, testrunner.js

Where

the right side is just and editable CSV with each entry being a valid glob
the right side may be empty. in fact it will typically start empty
the core entry is a fixed string with content roughly as shown

Note: The table format above is just illustrative. Not intending this compoentn to show up actually as a table with borders etc.
Evolutions
As we go forward this component can get richer and richer. We should prioritize improvements based on user feedback.

Facet specs are validated
rather than being a plain, single line text input, the glob spec is a multi-line (one CSV element per line) UI affordance with the ability to add, delete, and modify rows. Each entry would have content assist for helping to complete the folder names etc.
As the user edits the entries above, the entries in the filelist are updated with their recomputed facet tags. If the file list is filtered by facet then the user will see just the files that are in the selected facet. That allows them to see the effect of their facet edits.
In the file list a user can select a folder and tag it with one or more facets. that would compute the relevant glob and add it to the specified facet(s).
Potentially users are able to click on a file in the file list and mark it with facets. The challenge here is in creating and maintaining the facet spec if the user is enumerating many individual files rather than creating a glob pattern

addressed by #248


About custom day items，like backgroundColor ...

If I get the following data from the server ，like [{date: '2019-9-1', status:'work'},{date: '2019-9-1', status:'rest'},]
Can I change the style of the specified date according to the status? like if status is ‘work’， I will set that day’s background red， but rest is green. Can I do it？how? thank you...

Interesting! We currently don't have lots of options in distinguishing the status. This will be in our consideration in future releases. Thanks for the issue!

As I have understood, the thing you need is an ability to provide your own build function for a specific day in the calendar. I was going to add a feature of coloring current week (https://github.com/dooboolab/flutter_calendar_carousel/issues/140), but after thinking a bit I think it would be better to give users an ability to provide their build function for days, through which they would color current week themselves or do whatever they want.

@maxgmer You're right. Supporting build function would be excellent since there are some other related issues.

I think you can still make this work by using markedDateShowIcon to true.
      markedDateIconBuilder: (event) {
        return event.icon;
      },

Give event different options and render the widget.


fix(ui_firestore): fixed pagination issue

Description
Current Behavior: Excessive Document Querying on Page Change
Upon each page transition, the package is querying not only for the documents on the current page but also for all preceding documents. This leads to an unnecessary increase in total read operations from Firebase.
The Solution: This pull request implements the usage of Firebase Firestore query cursors to exclusively retrieve data pertaining to the current page, optimizing data retrieval. When the page size changes, the package no longer re-fetches from first page.
Related Issues
This PR will resolve Pagination Issue.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (melos run analyze) does not report any problems on my PR.
[x] All unit tests pass (melos run test:unit:all doesn't fail).
[x] I read and followed the Flutter Style Guide.
[x] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change.
[x] No, this is not a breaking change.

The proposal sounds good, but this needs testing :pray:

If I understand correctly this would be a major breaking change as the list would no longer update for changes in previously loaded docs?
According to this StackOverflow response if "you have local caching enabled and/or attach the new snapshot listener before removing the old one" the previously fetched documents would be pulled from the cache rather than being fetched from Firestore again. That would allow this package to keep previously fetched documents updated and avoid extra reads.

@rrousselGit is any action required on this PR from @a-s-k-u?

@rrousselGit is any action required on this PR from @a-s-k-u?

@lesnitsky Well tests are failing, so those need to be fixed.

@rrousselGit , @lesnitsky  - I'll fix that.
@rorystephenson - by local caching, do you mean offline capability through PersistenceEnabled property ? https://firebase.google.com/docs/firestore/manage-data/enable-offline. My understanding is that even if we have  enabled Offline capability, for a new query, it'd still try to read from server than cache unless app is offline. I'll try to confirm that by enabling PersistenceEnabled  for Web and inspecting the network tab in chrome. Please let me know if there is any other way to confirm.

Another thing to be careful of is, previously fetched items will no-longer be available with this PR.
Meaning a ListView cannot use QueryBuilder as it is, as to show the latest page, it needs all items up to the current one.

So, with the current implementation, I enabled offline cache (through this commit ) and below is how the pagination looks like.

It's still making cumulative reads on the server, even with local cache enabled.
And, now coming back to this PR ( tested with this commit), pagination looks like below

It's performing incremental reads from server as expected.
From the above tests, I'm inclined to believe that just enabling local cache will not reduce server reads; and underlines the need of employing query cursors to achieve effective pagination.

It would be great if the Firebase team could weigh in on this, the aforementioned StackOverflow answer from a Google Cloud employee indicates that it is possible to subscribe to the same query with a larger limit and receive cached data for the already-fetched items. This would be the optimal solution.

Correct. That is the original reasoning for using this approach of increasing the limit instead of using startAt

I've created a DarkPad, so that it's easy to test out the above mentioned claim.
https://dartpad.dev/?id=ec5d9b700a73f9b67f14073e7f6057bd
However, I'm unable to find any real benefit from keeping the connection open and subscribing to another one with a larger, overlapping set. Observing the results in chrome network tab, I can see that the first page is getting queried multiple times even though it's part of overlapping data. Maybe there is a better way to quantify server reads ?  Please feel free to edit or suggest modifications to the above dumbed down version of FirebaseListView.
Just jotting down a few additional references I could find in StackOverflow regarding the above claim.
https://stackoverflow.com/questions/73637044/does-firestore-have-an-in-memory-cache-for-optimistic-updates-separate-from-inde
https://stackoverflow.com/questions/38423277/does-firebase-cache-the-data/38423694#38423694
However, I'm afraid these pertain to reuse of same query; and not cumulative queries.
The official documentation does recommend to use query cursors or page tokens for large result set.

Maybe it was thing with Real Time Database and not CloudFireStore anymore ?

As long as tests are green locally, I'm good. CI setup is currently very fragile, I'm doing some work to make it more stable.

@rrousselGit , @lesnitsky  - I'll fix those unit tests.
Additionally, I've discovered a simpler and more reliable method for measuring server reads using firestore metrics exposed by google cloud api..
To assess server reads, I conducted the following tests with a Firestore collection containing just 100 documents while enabling offline caching for all three scenarios. I left the page size as 10 and scrolled down to the bottom to ensure all documents are read:
a.) Current Implementation - I measured 559 reads. 10 + 20 + 30 + 40 + 50 + 60 + 70 + 80 + 90 + 100 + 9 additional reads ( due to our n+1 document query approach)
b.) Current Implementation with querySubscription.cancel() commented out to keep listeners open - I observed the same 559 server reads.
c.) This PR - Precisely 100 Reads
Below is the image from Google Cloud API

So, it seems that going with the third approach using query cursors is the way to go.

We would need new tests for this.
In particular, we need an e2e test to verify that adding/removing items in previous "pages" correctly update the current page.

So Firebase apparently supports reading already-fetched items from the cache when running a query which should return a superset of results from a previous query but @a-s-k-u 's examples pretty clearly demonstrate that this is not happening. Is this because there is some other requirement (e.g. ordering must be applied as well), a bug somewhere or is it not actually true?

Well, that would be the tricky part as explained here. Given that it'll listen only to the "current" page, any updates on the "current" page can be handled smoothly. However, it won't detect updates on previous pages. And, having multiple listeners for each page sounds cumbersome.
Alternatively, we could let the end user decide how they want to handle this situation.
For instance, consider a project where posts are sorted by 'lastModifiedOn.' If any updates are made to the collection, the end user can effortlessly capture them by listening to the most recent document. In the event that such updates occur, they can trigger a refresh on FirebaseListView.

It is something supported today though.

@rrousselGit if I'm understanding right you've confirmed that it should be possible to avoid repeat reads when increasing the limit on the query however the examples that @a-s-k-u has provided seem to show that it is not working. In order to avoid a breaking change we should keep listening to all documents but it sounds like some input is needed from the firestore team on how exactly (ideally with a demonstration) we can increase the limit and avoid re-fetching all previously fetched documents.

Rather than increasing the limit, we could simply have a List of queries. One per "page".
And then find a way to combine in all in a single big "snapshot".

Rather than increasing the limit, we could simply have a List of queries. One per "page".
And then find a way to combine in all in a single big "snapshot".

Is this approach robust in the case of an insertion at the page boundary? If there is a page size of 3 and we load the initial page:

A, order 1
B, order 2
C, order 3

Then another page is loaded:

A, order 1
B, order 2
C, order 3
D, order 4
E, order 5
F, order 6

So now we have two listeners, one for the first page (currently returning A B C) and one for the second page (D E F).
Finally a new document, C', is inserted with an order value of 3. If the second page snapshot uses startAfter with the last item in the first page then we could potentially miss C':
First page, start at beginning limit 3:

A, order 1
B, order 2
C, order 3

Second page, start after order 3 limit 3:

D, order 4
E, order 5
F, order 6

@rrousselGit any feedback on this?

Is this approach robust in the case of an insertion at the page boundary? If there is a page size of 3 and we load the initial page:

That's indeed a possible concern. Although I'm not sure we can find a solution that satisfies all problems at once here.
It'd be great if firestore offered a "startAtIndex" instead of starting at values/documents

If page boundary is the concern, maybe we can introduce a single document overlap to mitigate that. Say, in the above example, for a page size of 3, each listener should listen to 4 docs with one doc overlap - and track docs at both left and right edges for each page.
say,
1st listener listens for 4 docs from A     ->   A,B,C,D
2nd listener listens for 4 docs from D  -> D,E,F,G
3rd listener listens for 4 docs from G   -> G,H,I,J
So, just by cross checking the left edge and right edge item of the page every time a page event happens, it'd be possible to tell if the page has expanded or compressed.  For eg: if C' gets added at position 4, right edge doc on page01 is no longer D, so, the page size can be adjusted/incremented by 1 until D is reached.
Having said that, this will introduce additional layers of complexity if we are to cover all possible scenarios - say if D gets deleted as well. Then, edges needs to be verified and possibly realigned for every page change.
Maybe, a simpler approach could be just tracking whether the page has changed and exposing a callback for users to handle that change. This callback could trigger actions like scrolling to the top and refreshing the content as needed.

If page boundary is the concern, maybe we can introduce a single document overlap to mitigate that

I think that overlap kinda exist when using startAfterDocument where the document is the end of the previous page. I'm not sure a content overlap is necessary

Maybe, a simpler approach could be just tracking whether the page has changed and exposing a callback for users to handle that change. This callback could trigger actions like scrolling to the top and refreshing the content as needed.

I'm not sure. That would certainly decrease the developer experience and default behaviour. I think it'd be valuable to have the most optimal experience out of the box.


make console.info opt-in

By default all logs with level info are disabled.  A user can opt into them by adding a custom logger.
I have also exported the default logger that is currently being using throughout this code so it is an easier interface to opt-in.
import createSagaMiddleware, { logger } from 'redux-saga';

const sagaMiddleware = createSagaMiddleware({ logger });

This was me just messing around, I can try to add tests if we feel like this is a decent path.
Relates to #614 #991 #945

Awesome, looks similar to what @gajus and @bradennapier were thinking!
Thoughts @Andarist ?

As posted in the other threads, would definitely like to see this merged!  Each hot reload can spam the console quite a bit and would like that to be cleaner !

I promise to take a look at it as soon as possible, just having tons of work on my plate right now and unfortunately redux-saga gets a little bit neglected in the process :/

Hey @Andarist - I've been checking the status of this PR about once a week. 😄  Any chance you might have some time to review this soon?  Our integration test output is flooded with "has been cancelled".  It would be really nice to have that cleaned up.  Thank you for all your work on this project!  It's an integral part of one of our apps.

Im on my honeymoon right now, but I promise (for real this time) that I'll get this cleaned up (and some other things too) when I get back.

@Andarist you're awesome! But, please don't stress and enjoy your honeymoon 😄

Wow, that would be great :)
I hope you're enjoying your time there, @Andarist!

https://github.com/redux-saga/redux-saga/commit/f4b52b04eb6bb9094ab07661c98178b55b401a85
Gonna do a release in a moment.
@neurosnap thanks for the PR, I've analyzed the issue and havent found much merit in keeping this log altogether. Dunno why it was added in the first place ¯\(ツ)/¯ so I've just removed it. Hope you dont mind closing this PR.

Fine w me!  Thanks for taking a look at it


Polyglot options not working consistently with JS

I'm currently facing an issue where some JS engine options work while others do not. More specifically, I'm trying to disallow the usage of JavaScript's eval function with the option js.allow-eval set to false, the option is listed as available here.
Note that I'm using Clojure for the implementation.
(let [str "eval(600+16)"
      src (Source/create "js" str)]
  (-> (Context/newBuilder (into-array ["js"]))
      (.allowExperimentalOptions true)
      (.option "js.allow-eval" "false")
      (.build)
      (.eval src))) ;; => #object[org.graalvm.polyglot.Value 0x42e3f064 "616"]

The above code evaluates without any errors returning a valid polyglot Value of 616 instead of an exception as expected from setting the allow-eval option to false.
On the other hand, the example given in the link above, does work.
(let [str "new SharedArrayBuffer (1024)"
      src (Source/create "js" str)]
  (-> (Context/newBuilder (into-array ["js"]))
      (.allowExperimentalOptions true)
      (.option "js.shared-array-buffer" "false") ;; <= set to false
      (.build)
      (.eval src)))
;; when set to false:
;; =>  org.graalvm.polyglot.PolyglotException ReferenceError: SharedArrayBuffer is not defined
;; when set to true:
;; => #object[org.graalvm.polyglot.Value 0xaad68c8 "SharedArrayBuffer{}"]

Is there any documentation on how or when these options work and when they don't?
I've implemented this following the Run GraalVM JavaScript on a Stock JDK guide and the polyglot-embedding-demo these are the jars/dependencies being used:
JDK:
OpenJDK 21 (temurin-21.0.2+13.0.LTS)
JVM options:
"-XX:+UnlockExperimentalVMOptions"
"-XX:+EnableJVMCI"
"-XX:+UseJVMCICompiler"
Maven dependencies:
org.graalvm.polyglot/polyglot version "23.1.2" jar
org.graalvm.polyglot/js-community version "23.1.2" pom
Upgrade module path jars (and dependencies): based on the example's pom
compiler-23.1.2.jar
collections-23.1.2.jar
truffle-compiler-23.1.2.jar
word-23.1.2.jar

This is a misunderstanding. Note that the help/documentation of the option says
--js.allow-eval=true|false   Allow or disallow code generation from strings, e.g. using eval().

Your example invokes eval() with a number argument. When eval() is invoked with non-string argument then this argument becomes the return value (and no "code generation from string" occurs). Try eval("600+16") instead of eval(600+16) to see the difference.

This is a misunderstanding. Note that the help/documentation of the option says
--js.allow-eval=true|false   Allow or disallow code generation from strings, e.g. using eval().

Your example invokes eval() with a number argument. When eval() is invoked with non-string argument then this argument becomes the return value (and no "code generation from string" occurs). Try eval("600+16") instead of eval(600+16) to see the difference.

Wow, I can't believe I missed that. I totally get what the doc says now, thank you! I don't know if it'd be worth adding examples to the doc to avoid this kind of misunderstandings, although I think my ESL is what's mostly to blame.
For all intents and purposes if eval cannot evaluate strings that should be enough to satisfy my "disallow using eval" requirement as I can't come up with a scenario where evaluating non-string arguments with eval might result in a security concern, as usual though, there might be.
Anyways, thank you again, I appreciate the clarification :)


Onclick node data retrieval

Hi there,
I added an onClick-data-retrieval-feature for node objects. You can define an onClickHandler as an optional Neo4jGraphRenderer prop. Whenever a node is clicked, the onClickHandler will return node data e.g. the properties of the node.
This feature lets information flow back to the system using the Neo4jGraphRenderer and will therefore create more usecases for this project e.g. a user driven query refinement or simply a visualization of the nodes properties.

+1


feat: add keys and clear methods

Implementation for iOS, Android, Windows and Browser is done, as well as tests and docs update.
For Windows, I do not have device and env setup for me to run the test, please help me to test it.
And please review my code, esp. the native implementation for iOS and Windows, since I never write ObjC code before, and never tried code for Win10 platform.
For JS, I write all my code in plain old ES3 ways for best compatibility.
This PR is mentioned in issue #64.

Awesome! Thank you!
It will take me a while till I get to this since I am in between moving houses but will do so eventually :)

Hi @sgrebnov , since you have implemented the windows version, could you help me test my newly added code works or not?
I have included windows implementation with test script, but I do not have windows device or emulator to run the test.

Your iOS implementation is just fine, I will look into the windows one this week what at the office.

Adding @vladimir-kotikov to help w/ Windows test

@sgrebnov I have already implemented the windows version in src/windows/SecureStorage.js, and I think the api should be enough.
But I'm not sure if my code works or not since I do not have a Windows device with proper dev env setup.

The windows has some problems, namely that exceptions are thrown when there are no credentials. Fixing these and updating tests, should be able to release today.

Thanks all for the work, merged and released.

@ggozad You forgot to push a git tag for the  v2.6.0 for the releases.

@yyfearth ops :)


using latest 2.x-dev, everything is working except I don't see events (Server Activity) in the dashboard

Using the very latest 2.x-dev on a fresh installation of Laravel 8.
My backend can correctly broadcast to my front-end. peer events work such as typing indicators. I can see statistics in the dashboard and I can see stats filling up in the database table.
However I cannot see any events in the dashboard, previously I was on 1.3.0 and I could see all events.
This is on my localhost. My front end is running on localhost:8080 and my backend is running on api.mydomain.test
The laravel-websockets is running on its own domain which is socketmaster.test
I use Valet and everything is secured with https using valet --secure
I'm curious about these new app parameters which I wasn't using before.. are they important?
            'host' => env('PUSHER_APP_HOST'),
            'path' => env('PUSHER_APP_PATH'),
            'capacity' => null,
            'allowed_origins' => [
                //
            ],

I've left them as the above defaults for now.. I can't find anything about them in the documentation.
This is my front-end config
  pusherConfig = {
    broadcaster: 'pusher',
    key: '7kWyUamVkIa', // laravel-websockets
    wsHost: 'socketmaster.test',
    wssPort: 6001,
    disableStats: true,
    enabledTransports: ['ws', 'wss'],
    forceTLS: true,
  };

This is the app entry inside config/websockets.php
        [
            'id' => '6641070',
            'name' => 'soulvue',
            'key' => '7kWyUamVkIa',
            'secret' => 'iLKvyU3f3ft',
            'enable_client_messages' => true,
            'enable_statistics' => true,

            'host' => env('PUSHER_APP_HOST'),
            'path' => env('PUSHER_APP_PATH'),
            'capacity' => null,
            'allowed_origins' => [
                //
            ],
        ],

And this is the pusher config in my backend
        'pusher-dev' => [
            'driver' => 'pusher',
            'key' => env('PUSHER_APP_KEY'),
            'secret' => env('PUSHER_APP_SECRET'),
            'app_id' => env('PUSHER_APP_ID'),
            'options' => [
                'cluster' => env('PUSHER_APP_CLUSTER'),
                'encrypted' => true,
                'host' => '<IP_ADDRESS>',
                'port' => 6001,
                'scheme' => 'https',
                'curl_options' => [
                    CURLOPT_SSL_VERIFYHOST => 0,
                    CURLOPT_SSL_VERIFYPEER => 0,
                ],
            ],
        ],

Would really love to get the events showing in the dashboard. Any advice @rennokki ?
Many thanks!

Sometimes asking the question leads to the answer eh? I figured it out.. I disable cookies globally and then whitelist the sites I want to allow cookies on. Well I hadn't whitelisted socketmaster.test yet.. after I did the events started appearing : )


hotfix_yaml_file_wrong_format

Issue: Wrong yaml format caused GTM found invalid metadata.yaml file. So dropped whole template from gallery.
Fixing format

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Scaffold-DbContext  SqlServer decimal

Microsoft.EntityFrameworkCore.Model.Validation|WARN|
No type was specified for the decimal column 'BtlastYearCompleteValue' on entity type 'BranchTarget'.
This will cause values to be silently truncated if they do not fit in the default precision and scale.
Explicitly specify the SQL server column type that can accommodate all the values using 'ForHasColumnType()'.

in sql server
this column type is decimal(18,2) not null
Scaffold-DbContext generate this Code
//in model
public decimal BtlastYearCompleteValue { get; set; }
//in dbcontext
entity.Property(e => e.BtlastYearCompleteValue).HasColumnName("BTLastYearCompleteValue");

Why report this warning?

Duplicate of #12241

If I do not fix these warnings what is the truncated behavior? Does it do any rounding or just truncates to the proper decimal point precision?
No type was specified for the decimal column. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values using 'ForHasColumnType()'

@bigswede74 Is there a reason to not fix the warnings?

@ajcvickers We are currently evaluating if we absolutely need to fix the warnings as the release is going out the door in a few weeks. If it does not do any rounding we will most likely deffer the issue until our next release.

@bigswede74 I believe in some cases you may seen truncation to the default, which is decimal(18, 2). However, this won't always happen, and I'm not 100% you will see truncation, not rounding. @AndriySvyryd  may remember more.

AFAIK the values will be truncated on insertion, but in queries where they need to be converted to a value with lower precision for some operation they would be rounded.


3661 magic link user not accepted terms

Trello Ticket
https://trello.com/c/MmpNfxk3/3661-s-magic-link-user-who-has-not-accepted-terms
Context/Problem
If magic link is turned on and the user attempts on via magic link and they have not accepted terms (i.e. accept_terms_date_utc is nil) then receive 500 on Pubish (403 Foribidden from API).
This is because the API UserController action generate_and_send_magic_link is only allowed to be called if the user has accepted terms.  https://github.com/DFE-Digital/teacher-training-api/blob/master/app/controllers/api/v2/users_controller.rb#L6
To replicate

enable magic link locally
update your user in the db to have accept_terms_date_utc to nil
login via magic link
watch the fire

To fix

Update the UserController check_terms_accepted skip before action to include generate_and_send_magic_link
Write a spec

Changes proposed in this pull request
It prevents users from getting an error when using magic links if they have not accepted the terms and conditions.
Guidance to review
Checklist

[x] Make sure all information from the Trello card is in here
[x] Attach to Trello card
[x] Rebased master
[x] Cleaned commit history
[x] Tested by running locally

 [S] - Magic link: User who has not accepted terms


feat: added function js in utils assets

Hi leolmcoelho,
Thank you for your contribution! I appreciate the effort you put into this PR.
There are a couple of changes I'd like to request to ensure consistency and align with best practices across the project:

Check if $name is empty before rendering the script tag. This will avoid generating an invalid script element when no name is provided.

Set defer to true by default. It's a good practice to defer script execution unless explicitly required otherwise.

Use heredoc syntax for returning the HTML, as this is the preferred style across the project. This will maintain consistency with the existing codebase.

Please feel free to add any other improvements you think would be beneficial. Once these updates are in, I'll be happy to merge the PR.
Thanks again for your help and for contributing to the project!
Best regards,
Thiago C. Pereira
Dux Tecnologia


Start webpack fails on Internet Explorer 11

Part of it is cause by an angular beta xx issue described here,
https://github.com/angular/angular/issues/6501
but another part is cause by what I imagine to be the prod configuration of webpack, since I get no error with the dev config, but IE 11 complaining about a missing '(' for the prod configuration. Will investigate further later, probably just use the dev config for now... Was going to try removing the screw ie8 flag in uglify see if that helps.

Realized it was a problem with the original shim for IE 11 not uglify itself, updated original angular2 issue.


Environments update to 3.0

.

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

ID: ceffa6a2-770c-1cd9-5145-dcd423f9dd22
Version Independent ID: 1cb5eb30-dd84-e5e1-5826-d74243fabf04
Content: Use multiple environments in ASP.NET Core
Content Source: aspnetcore/fundamentals/environments.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

IHostingEnvironment is deprecated

Yes, I'll be getting to this topic soon ... either Saturday or Sunday I think.

Enjoy your weekend

I just realized ... @Rick-Anderson reassigned this to himself. GOOD! :smile: I've got too much on my plate for this release. 🏃🏃🏃🏃🏃🏃🏃🏃🏃🏃🏃😅

@dougbu  besides IHostingEnvironment is deprecated - anything else changed for 3.0 we should document?

Have a look at the 3.0.0 announcements @Rick-Anderson

So just to understand, if ASPNETCORE_ENVIRONMENT either isn't set or is set to Production, means that we are on a Production environment. Is this the same for AZURE_FUNCTION_ENVIRONMENT? I find it difficult to make a distinction between those two. Especially when the azure Function is written in. NET Core.

It seems like the prefix has changed:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.host.createdefaultbuilder?view=dotnet-plat-ext-3.0
        //     • load host Microsoft.Extensions.Configuration.IConfiguration from "DOTNET_"
        //     prefixed environment variables ///

A least for generic host it is not ASPNETCORE_ENVIRONMENT  but DOTNET_ENVIRONMENT

@AvgTang They both work.


merge from arlac77/template-github-action,arlac77/template-kronos-component

README.md

docs(README): update from template

Codecov Report

Merging #813 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #813   +/-   ##
=======================================
  Coverage   28.94%   28.94%
=======================================
  Files           1        1
  Lines          76       76
  Branches        1        1
=======================================
  Hits           22       22
  Misses         54       54

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 429ca2e...80b9630. Read the comment docs.


[release-0.23] Prepare kubevirt for libvirt 5.6.0 without switching

What this PR does / why we need it:
This is a cherrypick of #2909
Prepare kubevirt for libvirt 5.6.0 without actually switching.

Libvirt 5.6.0 wants to set XATTRS when remember_owner is set to 1. Since we don't want to grant SYS_CAP_ADMIN privileges, disable remember_owner.
There is an issue with dynamic_ownership. It stopped working for us. Taking this as an opportuinity to clean up the code and set the ownership in a consistent fashion for all disks.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
dynamic_ownership should work in dependent of XATTRS. We will investigate this further, but for now just set the ownership of disks ourselves in a consistent way.
https://github.com/kubevirt/libvirt/pull/39 prepared kubevirt/libvirt.
#2893 actually switches to libvirt 5.6.0. This switch is done separately, since the 5.6 version there has slirp disabled. This can be sorted out separtely.
Release note:
<!--  Write your release note:

```release-note
NONE
```

/cc @stu-gott

/approve


fix(material/tabs): add aria-hidden to inactive tabs

Make accessibility fix for Tabs component. Add aria-hidden="true" to inactive tab panels. Fix issue where chromevox would read the names of inactive tab panels when navigating past the active tab panel (#27741). Fix this by adding aria-hidden="true" to inactive tab panels to exclude them from the a11y tree.
I believe what was happening is that the inactive tab panels had an aria-labelled by references that pointed to the tab header. Existing behavior seems to be that Chromevox was following the aria-labelledby references and announcing the labels of the inactive tabs. With this commit applied, Chromevox no longer reads panels of inactive tabs.
Fix #27741

I'm merging this PR, because the equivalent internal change was merged already.


Kamel bind step index unclear

I was playing with kamel bind command and I realized that we use 0 index start when we play with step properties. Ie kamel bind ... --step my-step -p step-0.my-key=value. For usability I think we should improve this and let the user start with 1 index instead.

+1

Hi, I'm an Outreachy applicant and I'd like to be assigned this issue

Thanks for the interest. Please, reach out to me if you need any help.

Hi @squakez, I tried reaching out to you on Zulip with a few questions. Could you please help with them?

Hello, I've already answered in the chat, though, it's easier for me following up here asynchronously. As a reference you can used the output produced by the following statement:
$ kamel bind timer:foo log:bar --step first --step second -p step-0.var1=1 -p step-0.var2=2 -p step-1.vara=a -o yaml

We must convert that index starting with 0 to start with 1 and having the very same output. Likely a unit test as the one available at https://github.com/apache/camel-k/blob/main/pkg/cmd/bind_test.go#L61 will help you making some good TDD approach.

I'm trying to test my changes locally by building the repository and replacing the binary in my /usr/bin, however, I get this error. I was successfully able to build this project earlier. Could you please help resolve this error? I'm not sure what is wrong here

@SaumyaSachdev are you still working on this issue?


[Bug][api] Different users cannot use the same project name

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened
Different users cannot use the same project name .

What you expected to happen
The current user can't see other people's project lists and should theoretically be able to own projects that don't exist under the current user
How to reproduce
Create two users. When user 1 creates a project named ETL, user 2 reports a project name error when creating another project named ETL
Anything else
No response
Version
2.0.3
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi @Hou-Shuaishuai this is a easy issue, can you try to submit a pr to fix it?

Yes, since I'm not familiar with the code and have work to do, it may not be that fast.
------------------ 原始邮件 ------------------
发件人:                                                                                "apache/dolphinscheduler"                                                                                @.>;
发送时间: 2022年3月15日(星期二) 下午5:09
@.>;
<EMAIL_ADDRESS>主题: Re: [apache/dolphinscheduler] [Bug][api] Different users cannot use the same project name  (Issue #8862)
Hi @Hou-Shuaishuai this is a easy issue, can you try to submit a pr to fix it?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: @.***>

Yes, since I'm not familiar with the code and have work to do, it may not be that fast

OK, I assign this issue to you, and you can fix it at your own pace.

In the process of modification, I found that 'projectMapper.queryByName(projectName)' was used in 'dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java', and I learned the concept of work flow user through 'pydolphinscheduler/src/pydolphinscheduler/core/default_config.yaml'. It was then discovered that user 1's project could be authorized to user 2.
If user 1 has an ETL project, and user 2 has an ETL project, and grants user 1's ETL project to user 2, then user 2's project list will have two ETL projects, one from user 1 and one from user 2. The problem is that the PyDolphinScheduler module queries projectCode by projectName and it may not be clear to the PydolphinScheduler user which user the project is from. It may be neither default.user.name nor default.workflow.user in 'pydolphinscheduler/src/pydolphinscheduler/core/default_config.yaml'. So it makes sense that the projectName global is unique in the PyDolphinScheduler module.

In the process of modification, I found that 'projectMapper.queryByName(projectName)' was used in 'dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java', and I learned the concept of work flow user through 'pydolphinscheduler/src/pydolphinscheduler/core/default_config.yaml'. It was then discovered that user 1's project could be authorized to user 2.
If user 1 has an ETL project, and user 2 has an ETL project, and grants user 1's ETL project to user 2, then user 2's project list will have two ETL projects, one from user 1 and one from user 2. The problem is that the PyDolphinScheduler module queries projectCode by projectName and it may not be clear to the PydolphinScheduler user which user the project is from. It may be neither default.user.name nor default.workflow.user in 'pydolphinscheduler/src/pydolphinscheduler/core/default_config.yaml'. So it makes sense that the projectName global is unique in the PyDolphinScheduler module.

@zhongjiajie can you take a look?

Will take a look tomorrow

If multiple projectnames are the same when scheduling dependencies because of project authorization, it does create ambiguity, so projectName that are globally unique should not be a bug

In the process of modification, I found that 'projectMapper.queryByName(projectName)' was used in 'dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java', and I learned the concept of work flow user through 'pydolphinscheduler/src/pydolphinscheduler/core/default_config.yaml'. It was then discovered that user 1's project could be authorized to user 2.
If user 1 has an ETL project, and user 2 has an ETL project, and grants user 1's ETL project to user 2, then user 2's project list will have two ETL projects, one from user 1 and one from user 2. The problem is that the PyDolphinScheduler module queries projectCode by projectName and it may not be clear to the PydolphinScheduler user which user the project is from. It may be neither default.user.name nor default.workflow.user in 'pydolphinscheduler/src/pydolphinscheduler/core/default_config.yaml'. So it makes sense that the projectName global is unique in the PyDolphinScheduler module.

Hi @Hou-Shuaishuai, It should not be a problem for pydolphinscheduler, At least we could grant projects to a specific user in web UI. For now pydolphinscheduler will raise error when one user have more than one project with same name. But if our web UI find out how to handle this situation, pydolphinscheduler could also do it.

If multiple projectnames are the same when scheduling dependencies because of project authorization, it does create ambiguity, so projectName that are globally unique should not be a bug

I think we should correct it and make it support to user-group-level but not for global. Global is odd in this situation

I add a label discussion for this issue. It need more discuss before we do it

You mean projectName is unique within the user-group and can be displayed with the same projectName from different user-groups during scheduling? I think we can confirm with Issue #9016 how to modify

You mean projectName is unique within the user-group and can be displayed with the same projectName from different user-groups during scheduling?

Yeah, that's what I mean. And it seems this issue is related to many other code we have to deal with it carefully

remove stale

remove stale

If multiple projectnames are the same when scheduling dependencies because of project authorization, it does create ambiguity, so projectName that are globally unique should not be a bug

I agree with you, so I close this issue. If someone has other suggest, we can discuss again.


Crosswalk Android

Hi!
For what I've read, this plugin it's amazing, but..
How can I set up a Cordova - Crosswalk webview with actually Node.js (like Electron, or NW.js) in Android, build the .apk and upload it to Google Play?
Are you telling me that I can run node, and all node modules like electron in a Crosswalk Web View and deploy it to Android?
If that ever happened, I have to see it. And reproduce it. Please.

Yes, this is the goal for Android.  Will support both Crosswalk and native WebView on Android >4.4  (the latter to avoid the 20Mb overhead of Crosswalk, the former for those who need the advanced WebGL and more modern Chromium).      Note that only Node modules that don't have native GYP compilations will work, but this is a huge part of the Node.js ecosystem (just not "all node modules") and even those that do use native often don't really need to.
Check back in 6 weeks for an Android sample that you can reproduce.


Can't run any example

Steps to reproduce:

Pull the latest docker image docker pull ghcr.io/fusion-energy/fusion-neutronics-workflow
Run a new container docker run -it -v $PWD:/local_dir ghcr.io/fusion-energy/fusion-neutronics-workflow
Navigate to folder cd example_01_single_volume_cell_tally
Run step 1 python3 1_create_cad_and_convert_to_dagmc.py
Produces:

Saved file as  steel.stl

Run neutronics step python3 2_run_neutronics_simulation.py
Produces:

Using the DOUBLE-DOWN interface to Embree.
Loading file dagmc.h5m
Initializing the GeomQueryTool...
Using faceting tolerance: 1.81323e-317
Building acceleration data structures...
Illegal instruction

Same is true for all the examples. I simply cannot run anything 😢
I've investigated it a bit and it seems to be related to the call
odw.Geometry(h5m_filename='dagmc.h5m')

I think I might need to change the was a compile is done as I think this is the same issue
https://openmc.discourse.group/t/dagmc-geometry-open-mc-aborted-unexpectedly/1369/25?u=pshriwise

I'm now not sure what is happening. I've rebuilt the image but getting the same error when trying to attach artifacts to the release
https://github.com/fusion-energy/fusion_neutronics_workflow/runs/4465224057?check_suite_focus=true

I wonder if it's an issue with openmc-dagmc-wrapper rather than fusion-neutronics-workflow

So I tried reproducing the issue with odw.

Create a container from openmc-dagmc-wrapper:dependencies image
Install dependencies
Create dagmc.h5m file from example-01 (in fusion-neutronics-workflow)
Copy-paste the file in the container created in 1.
Run the code below

import openmc
import openmc_dagmc_wrapper as odw
import openmc_plasma_source as ops
# from dagmc_bounding_box import DagmcBoundingBox
# from openmc_mesh_tally_to_vtk import write_mesh_tally_to_vtk

# from cad_to_h5m import cad_to_h5m

# cad_to_h5m(
#     files_with_tags=[
#         {'cad_filename':'steel.stp', 'material_tag':'mat1'},
#     ],
#     h5m_filename='dagmc.h5m',
#     cubit_path='/opt/Coreform-Cubit-2021.5/bin/',
#     # imprint=False, # as there are no geometry contact between volumes
# )

# could set to dagmc.h5m if the imprinted and merged geometry is preferred
my_h5m_filename = "dagmc.h5m"

material_tag_to_material_dict = {
    "mat1": "copper"
}

materials = odw.Materials(
    h5m_filename=my_h5m_filename,
    correspondence_dict=material_tag_to_material_dict,
)

tally = odw.CellTally(
    tally_type="heating",
    target="mat1",
    materials=materials
)

tallies = openmc.Tallies([tally])

geometry = odw.Geometry(h5m_filename=my_h5m_filename)

settings = odw.FusionSettings()
settings.batches = 1
settings.particles = 100
# assigns a ring source of DT energy neutrons to the source using the
# openmc_plasma_source package
settings.source = ops.FusionPointSource(fuel="DT", coordinate=(1000, 1000, 1000))

my_model = openmc.Model(
    materials=materials, geometry=geometry, settings=settings, tallies=tallies
)
my_model.run()

This produces the following error:
                                %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%
                ##################     %%%%%%%%%%%%%%%%%%%%%%%
                ###################     %%%%%%%%%%%%%%%%%%%%%%%
                ####################     %%%%%%%%%%%%%%%%%%%%%%
                #####################     %%%%%%%%%%%%%%%%%%%%%
                ######################     %%%%%%%%%%%%%%%%%%%%
                #######################     %%%%%%%%%%%%%%%%%%
                 #######################     %%%%%%%%%%%%%%%%%
                 ######################     %%%%%%%%%%%%%%%%%
                  ####################     %%%%%%%%%%%%%%%%%
                    #################     %%%%%%%%%%%%%%%%%
                     ###############     %%%%%%%%%%%%%%%%
                       ############     %%%%%%%%%%%%%%%
                          ########     %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                 | The OpenMC Monte Carlo Code
       Copyright | 2011-2021 MIT, UChicago Argonne LLC, and contributors
         License | https://docs.openmc.org/en/latest/license.html
         Version | 0.13.0-dev
        Git SHA1 | 0157dc219ff8dca814859b3140c6cef1e78cdee1
       Date/Time | 2021-12-09 10:49:29
   MPI Processes | 1
  OpenMP Threads | 12

 Reading settings XML file...
 Reading cross sections XML file...
 Reading materials XML file...
 Reading geometry XML file...
Using the DOUBLE-DOWN interface to Embree.
Loading file dagmc.h5m
Initializing the GeomQueryTool...
Using faceting tolerance: 0.01
Building acceleration data structures...
Traceback (most recent call last):
  File "test.py", line 50, in <module>
    my_model.run()
  File "/opt/openmc/openmc/model/model.py", line 547, in run
    openmc.run(particles, threads, geometry_debug, restart_file,
  File "/opt/openmc/openmc/executor.py", line 276, in run
    _run(args, output, cwd)
  File "/opt/openmc/openmc/executor.py", line 116, in _run
    raise RuntimeError(error_msg)
RuntimeError: OpenMC aborted unexpectedly.

Which is yet another error message.
Could the problem come from the cad_to_h5m package @shimwell?

I've just run your example locally (without docker) and it works. I shall keep investigating

Intel(R) Xeon(R) E-2186G CPU @ 3.80GHz, 3792 MHz

I can rebuild the docker file and see if changing the Embree compile flags back helps

We could also try rebuilding without embree and double down as a backup option

I've made a couple of new docker images with and without AVX enabled
Would you be able to try these two and let me know if either work for you
https://github.com/fusion-energy/fusion_neutronics_workflow/pkgs/container/fusion-neutronics-workflow-no-avx
https://github.com/fusion-energy/fusion_neutronics_workflow/pkgs/container/fusion-neutronics-workflow-avx

One more docker image, I think this one has no embree usage in dagmc https://github.com/fusion-energy/fusion_neutronics_workflow/pkgs/container/fusion-neutronics-workflow-no-dd

Wondering if you have seen this before @pshriwise

Can't say I've seen an error like this, no. To isolate the problem can we maybe try some of the DAGMC based tools to make sure the problem isn't in OpenMC? (build_obb, overlap_check, etc.)

One more docker image, I think this one has no embree usage in dagmc https://github.com/fusion-energy/fusion_neutronics_workflow/pkgs/container/fusion-neutronics-workflow-no-dd

This image fixed the bug for examples 1, 2, 4. Example 5 is not working but it's not related to this.
I guess this means there's an issue with embree?
Thanks for taking the time to investigate this @shimwell

Super, thanks for testing, all the feedback is super useful. I shall write up some details on the docker images and tidy things up a bit before closing the issue.


fix: async call to log

What does this PR do?
Fixes async call that stopped logging.
Screenshot / video of UI
<!-- If this PR is changing UI, please include
N/A

### What issues does this PR fix or reference?

Fixes #209.

### How to test this PR?

Build, confirm log file is correct now.

still missing unit tests

https://github.com/containers/podman-desktop-extension-bootc/assets/6422176/2b8906cc-b206-4152-9305-8e70d7c0243a
I can confirm it now works, thank you 👍

looks like the call should be
await logContainer(build.engineId, containerId, progress, data => {
 // update the log file asynchronously
fs.promises.appendFile(logPath, data).catch((error:unknown) => {
console.debug('Could not write bootc build log: ', e);
});
});

I don't see why wrap add an extra async call.

Ahhh, that's what you meant. Sorry for being dense. It started with a 'traditional' try { } catch, which the linter flags as needed await, which caused me to go down the rathole of trying to make it happy while still working. Re-pushed with your suggestion, agree it is much better, linter happy, and most importantly it works.

yes I was not clear enough


Allow modification of some options for the template used for preparing the OVA image

https://github.com/ppc64le-cloud/pvsadm/blob/master/cmd/image/qcow2ova/prep/templates.go

I see "<IP_ADDRESS>" hardcoded in the script, and that won't work in some network where firewall blocks external DNS lookups. You can default to it, but should allow overrides with a custom DNS server/IP which would be the trusted DNS server inside the firewall.

It will be good to make the following configurable

DNS address
Yum repo for the RPMs
Direct RPM urls

The default will be what it is today, but it can be updated via a conf/yaml file

It will be good to make the following configurable

DNS address
Yum repo for the RPMs
Direct RPM urls

The default will be what it is today, but it can be updated via a conf/yaml file

I'm also thinking about exposing an option to have as user-defined script to run part of prep step, this will even give flexibility in terms of what really they want to run part of it for an advanced user.


Not working with React Native

This is a Hacktoberfest task!
You can read more about Hacktoberfest on our blog and see all tasks on our Hacktoberfest Project Board.
Summary
This library isn't working with React native because it tries to access localstorage.
Details
In ReactNative, there is no localstorage, it is instead AsyncStorage. We need to rewrite any calls to localstorage to guard against this. It might be better to split out all storage calls to a helper file so that we can extend it in the future.

Possible alternative approach by Yuyi: https://github.com/yuya-fujimoto/supabase-js/commit/986d6f09c99df371c01beb50bd84bdb81de6f3f5

I got it to work on react-native app (#14 ) but only auth.signIn doesn't seem to work as expected on react-native app.
after digging through the code it seems like api.signInWithEmail results retruns 400 Could not read password grant params: EOF on React-Native app. It work fine on postman and on example app.
my Implementation. (the same as in /example/src/app.js)

Hey @izqalan I merged your changes as they are a great start. I'll leave this open until we have a chance to fix the bug on api.signInWithEmail, which I will need some time to research

Hey @izqalan - can you please describe how you used AsyncStorage in your PR https://github.com/supabase/gotrue-js/pull/14?
I've created a PR with an example here https://github.com/supabase/gotrue-js/pull/21 but it doesn't look like AsyncStorage matches the interface:

Did you add a full wrapper around AsyncStorage to make it compatible?

Hey @kiwicopple
hmm that's strange.
I just import AsyncStorage from @react-native-community/async-storage and specify it on localStorage option.
This is how I initialize GoTrueClient class previously on my React Native app.

Also, it might be worth mentioning I'm using JavaScript for the app.

Hey @izqalan  I mentioned you here, but I thought I'd drop a notification in this thread too since you're subscribed.
Do you have any public code for your RN app?

@kiwicopple I've tried looking into this, but it appears your problem was fixed already with #24.
The example in your PR builds fine now.

thanks for testing @tjg1 - I saw your comment in the PR 🙏
Could I get a small favour, could you confirm the PR in our main repo works for you? https://github.com/supabase/supabase/pull/315
If it is, can you let me know if you're on Android or iOS? (I only have iOS and I'm still getting the error: Could not read password grant params: EOF. Looks like a server error, but the code works when I run it in a browser.

hi @kiwicopple,
I have just tried this out. Indeed that error gets returned by the server. It works in a browser and in React Native with a debugger attached. But it seems that while debugging, the RN code is actually running in a web worker in my browser.
I will dig deeper into this. I have a jailbroken iOS device setup with https://github.com/nabla-c0d3/ssl-kill-switch2, so I can get the actual HTTP request made by RN and compare it to the one made by the browser.

I've done that and reproduced it with cURL.
React Native on iOS sends Content-Type: application/x-www-form-urlencoded even though the body of the request is UTF-8 JSON. Your server gets confused and returns 400 {"code":400,"msg":"Could not read password grant params: EOF"}.
Changing the header to Content-Type: text/plain, the same request succeeds.

Hi! This issue persists on the latest version of supabase-js (^1.17.0):
undefined is not an object (evaluating 'this.localStorage.getItem')
react-native: 17.0.1
Supabase-js: 1.17.0
Happens with and without react-native-url-polyfill v. 1.3.0 (see https://github.com/facebook/react-native/issues/23922#issuecomment-648096619)

it's work!
"react-native": "0.64.3",
"@react-native-async-storage/async-storage": "^1.15.17",
"@supabase/supabase-js": "^1.30.0",
import { createClient } from '@supabase/supabase-js'
import AsyncStorage from '@react-native-async-storage/async-storage';

const supabaseUrl = "xxxxx"
const supabaseAnonKey = 'xxx'

export const supabase = createClient(supabaseUrl, supabaseAnonKey, {localStorage: AsyncStorage})