Google provider undocumented convetions

Credentials are assumed to be located under /tmp/.gcloud/faasbenchmark.json
The project is assumed to be called faastest
Need to enable "Google Cloud Functions API" and "Cloud Deployment Manager V2 API" in the API & Services Dashboard: https://console.cloud.google.com/apis/dashboard
Some permission setup is required to fix the error Error: Required 'deploymentmanager.deployments.list' permission for 'projects/faastest' (see serverless/serverless-google-cloudfunctions#52)

https://github.com/nuweba/faasbenchmark/issues/43#issuecomment-580695075

I have same problem


Unify remote-repositories parameter

--repositories overrides any repositories already configured either in installed server, or known-feature-packs.
In operations on installed server (update, revert) the repositories defined that way are not persisted.
The values permitted are either comma-separated URLs or pairs or ID::URL
Renamed --local-repo to --local-cache and --channel to --manifest

@TomasHofman could you take a look, do the CLI changes make sense to you?

Seems OK to me after a quick read. I think it's a good change.


macse: init at 2.03

Motivation for this change
Bioinformatic tool used in my laboratory
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[X] Fits CONTRIBUTING.md.

@GrahamcOfBorg build macse

@GrahamcOfBorg build macse

@GrahamcOfBorg build macse


Move node-fetch package out of dev deps

closes #68

Pull Request Test Coverage Report for Build 233

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 57.118%

Totals

Change from base Build 232:
0.0%

Covered Lines:
1212

Relevant Lines:
1868

💛  - Coveralls

Thanks!


new nvim async stuff causing nvim error E475: Invalid argument: expected valid directory

environment

vim: NVIM v0.2.0
vim-airline: newest master commit: e357f88
OS: Solus 3 64 bit
Have you reproduced with a minimal vimrc: in the process of finding the minimal config that reproduces the problem
What is your airline configuration: Also have vim-airline/vim-airline-themes installed. Other than that: let g:airline_powerline_fonts = 1

if you are using terminal:

terminal: GNOME Terminal 3.24.2
$TERM variable: xterm-256color
color configuration (:set t_Co?): Unknown. I'm not setting it to anything in my config, but for some reason running :set t_Co? is showing Key code not set: t_Co?
if you are using Neovim:
does it happen in Vim: No, only in Neovim

actual behavior

With the fugitive plugin and fzf installed (just the program with the default Vim integration, I don't have the extra plugin installed) run this command from Neovim :FZF
It shows the error:

Error detected while processing function airline#extensions#branch#get_head[1]...airline#extensions#branch#head[6]..119_update_untracked[33]..airline#async#nvim_vcs_untracked:
Line 18:
E475: Invalid argument: expected valid directory

expected behavior
Show the fzf buffer with file completion list without airline errors.
Notes
I tried rolling back to commit 5345c8f and I no longer experience the error. I will keep updating this description as I have time with more info as I try to reproduce it with a simpler config, in Vim, my terminal information, etc.
This is pure speculation, but the problem could be with fzf and not with vim-airline. I just know the problem did not show itself until recent commits in airline.
UPDATE
I added much of the missing information requested. Currently I am in the process of figuring out what is the minimal config that will reproduce this issue. Actually that is a proving a rather promising approach as simplifying my config has already removed the problem even though I still have fzf and airline configured somewhat. Strangely enough the problem only appears when I have fzf, ariline, and fugitive enabled at the same time and then follow the instructions above...

I reproduced it with only tpope/vim-fugitive and vim-airline/vim-airline, and with all settings having default value.

I triggered this behavior by just executing :term, with only tpope/vim-fugitive and vim-airline/vim-airline installed in neovim, and with all settings having default value.

okay i made some changes to verify the directory actually exists. please check.

Thanks. I just tried updating, and it seems to be fixed. Interestingly, during the update I saw fzf was also updated. I don't know if it is related to this issue or not, but they do have a recent commit that is Neovim related.

totally unrelated. The issue was, that there was no valid current directory given to the process started neovim.

@chrisbra could you please explain with more details how you fixed this?
I'm experiencing the same error


Add stdout as metrics output type

Overview
This adds a new metric type called 'stdout' which allows metrics to be published to stdout for ingestion into further downstream systems (Elasticsearch was the destination intended during implementation).
Use case
We are currently running Benthos in a serverless (AWS Lambda) environment and without having a statsd or prometheus endpoint to push metrics to, there's currently no way to get metrics out.  By outputting the metrics to stdout (as well as general Benthos logs) we then have another Lambda function (also Benthos ;)) triggered from Cloudwatch Logs that allows us to ingest these events into Elasticsearch.
Example
Configuration:
  "metrics": {
    "type": "stdout",
    "stdout": {
      "static_fields": {
        "foo": "${COLORTERM:defaulty}",
        "bar": {
          "bana": "baz"
        }
      }
    }
  }

Some example metrics output:
{"@service":"benthos","@timestamp":"2019-09-27T14:38:03+10:00","bar":{"bana":"baz"},"component":"input","foo":"truecolor","input":{"batch":{"received":1},"connection":{"failed":0,"lost":1,"up":1},"count":1,"latency":548965374,"received":1,"running":0},"metric":"input"}
{"@service":"benthos","@timestamp":"2019-09-27T14:38:03+10:00","bar":{"bana":"baz"},"component":"output","foo":"truecolor","metric":"output","output":{"batch":{"bytes":70962,"latency":543866729,"sent":2},"count":2,"error":0,"messages":{"received":1,"sent":2},"sent":2}}
{"@service":"benthos","@timestamp":"2019-09-27T14:38:03+10:00","bar":{"bana":"baz"},"batch":{"bytes":35481,"latency":543866729,"sent":1},"component":"output","count":1,"foo":"truecolor","metric":"output.broker.outputs.0","sent":1}
{"@service":"benthos","@timestamp":"2019-09-27T14:38:03+10:00","bar":{"bana":"baz"},"component":"system","foo":"truecolor","metric":"system","system":{"goroutines":5,"uptime":559}}

Further

Metrics are currently 'grouped' by the component that the individual metrics belong to.  This is done by traversing the metric path backwards and assuming an 'integer' in the path is an instance of a component.
During the implementation I originally only had the metrics output when the Close() method was called, but it turns out this is never the case in a serverless environment.  Because of this, I changed to also include an optional push_interval.  This seems to work nicely.
Ideally, I'd also like the counters to be reset to 0 after they have been 'pushed' to stdout.  When looking at the metric interfaces, there doesn't seem to be a reset method (though I guess you could decrement the metric by its value..?).  Would adding a reset function to each of the counter types be palatable? Or is there a better way to achieve this?
I noticed that some processors have 'labels' - it would be cool if all outputs/inputs/etc supported this as well.  We are 'dynamically' building Benthos configurations in a broker output using fan_out, so changing indexes is a bit difficult to track.
What about Cloudwatch Metrics you ask?   I tried having a look to see if I could easily fit the number of metrics Benthos outputs into a model using Cloudwatch Metrics but the cost and usability doesn't make it seem like a good place to put them.

Happy to open issues for separate discussion on some of those points, but wanted to share some of the reasoning for why this is implemented this way.

Hey @aidan-, I like this idea. It would be cool to use the system wide logger for writing these out so we can recycle the formatting fields it has, but that would require changing the way we're printing the metrics. Adding a Flush method to the Local metrics aggregator should be straight forward and would get you what you want.
Adding metric labels to components within Benthos is possible but slightly delicate as for some aggregators there is a very strict requirement that every series of a path have exactly matching label keys, so we'd need to standardise on it.

It would be cool to use the system wide logger for writing these out so we can recycle the formatting fields it has, but that would require changing the way we're printing the metrics.

How were you thinking this would be done?  I was originally using the log.Modular package to do the printing of the metrics, but the current structure doesn't cleanly allow the 'message' to be JSON.  We would possibly want to add another level called METRIC to avoid having to use the INFO/WARN/etc

Adding a Flush method to the Local metrics aggregator should be straight forward and would get you what you want.

I've just done this and rebased!  Testing now but seems it works nicely.

Adding metric labels to components within Benthos is possible but slightly delicate as for some aggregators there is a very strict requirement that every series of a path have exactly matching label keys, so we'd need to standardise on it.

No worries, that can be left as a future enhancement then :)

@Jeffail The flush methods look to be working well!

Cool, yeah if we went with the logger then it would limit you to only writing out metrics using fields, which is the wrong way of going about it. I think ultimately this should be interacting somehow with the logger but let's get this added in as an experimental component and we can work out the kinks later.
Can you add a line EXPERIMENTAL: This component is considered experimental and is therefore subject to change outside of major version releases. to the top of the documentation?

@Jeffail , disclaimer added, docs generated and rebased from master to make the merge clean!

Ace, thanks @aidan-!


FR: On push error check & report app script permission

When no api access, report to user in helpful error message.
It's easy to incorrectly think that you've enabled server side permissions for app script when a project is successfully cloned from the CLI, however the server side permission can be disabled at this point (as seen in #255 ).
When there's no permission to access the server side APIs, please report it to the user (ideally with a link asking them to check: https://script.google.com/corp/home/usersettings ).

Have you tried with version 1.4.1? This is what I get with the Apps Script API disabled:
Push failed. Errors:
User has not enabled the Apps Script API. Enable it by visiting https://script.google.com/home/usersettings then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

Hey @paul-matthews I'm going to go ahead and close this, as I believe it has been solved. Please re-open if the problem still persists for you.


Changed jsdocs for withoutEnlargement and sequentialRead

Changed jsdocs for withoutEnlargement and sequentialRead as per conversation on issue #972

Hi, I changed the jsdoc in files resize.js and input.js. Let me know if the documentation still isn't clear enough.

Coverage remained the same at 99.325% when pulling a8efccdf3d759e98214ad25f4953ecd093f9a764 on valkyrie-101:doc-fixes into bbe897e6073858789d1f251673eaab3141cd9408 on lovell:master.

Thank you!


Add Myna to JavaScript performance benchmarks

See https://sap.github.io/chevrotain/performance/

👍

https://github.com/SAP/chevrotain/pull/477


RuntimeEnv.ALLOW_NULL_ARRAY_ELEMENT is invalid for IdStrategy#ARRAY_STRING_SCHEMA

https://github.com/protostuff/protostuff/issues/251

I only did one thing, moving the construction of XX_SCHEMA into the constructor of IdStrategy.
Let me add some test-cases

@fengjiachun thanks!  I ran your new tests without your patch to IdStrategy applied, and all the tests pass.
mvn test -Dtest=*NullArrayElementTest -Dprotostuff.runtime.allow_null_array_element=true

I was expecting it to fail (which requires your patch to make it pass)

mvn test -Dtest=*NullArrayElementTest -Dprotostuff.runtime.allow_null_array_element=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building protostuff :: runtime 1.6.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-versions) @ protostuff-runtime ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ protostuff-runtime ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /data/dyu/dev/gh-protostuff/protostuff/protostuff-runtime/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ protostuff-runtime ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ protostuff-runtime ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /data/dyu/dev/gh-protostuff/protostuff/protostuff-runtime/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ protostuff-runtime ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ protostuff-runtime ---
[INFO] Surefire report directory: /data/dyu/dev/gh-protostuff/protostuff/protostuff-runtime/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running io.protostuff.runtime.ProtobufNullArrayElementTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.093 sec - in io.protostuff.runtime.ProtobufNullArrayElementTest
Running io.protostuff.runtime.ProtostuffNullArrayElementTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.09 sec - in io.protostuff.runtime.ProtostuffNullArrayElementTest

Results :

Tests run: 20, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.272 s
[INFO] Finished at: 2018-09-19T20:50:41+08:00
[INFO] Final Memory: 14M/212M
[INFO] ------------------------------------------------------------------------

I'm on macos10.13.6, the fields are initialized before the constructor(before IdStrategy.flags )

Do you mind run the test again? use -Dtest=*NullArrayElementInObjectArrayTest
I guess you may have run the wrong test case

Nice catch.  I did run the wrong tests.
Now with the right tests, I now get failures.
Thanks @fengjiachun

:)


VS2019 support

I'll give it a look when it's out of the preview. Otherwise, PRs are welcome :smirk:.

Let's get the party started!

Microsoft launches Visual Studio 2019 for Windows and Mac


Create 0000-01-02-Tommieness.md

created a branch, created a file and made a commit, and opened a pull request


Bringing James's design to life

latest:

@canadianveggie can you take a look? I hope it's good to merge and we can add ✔  etc in a follow-up


some anonymous function arguments, not wrapped in Term.AnonymousFunction

When we have
def curried(a: Int)(b: Int) = a + b

List(1, 2, 3).map(curried(6) _ )

It is expected that curried(6) _  should be wrapped in Term.AnonymousFunction, but it is not.
Also, sometimes a similar thing happens for
List(true, false).map(true && !negate(_) && false)
when  def negate(b: Boolean) = !b

When we have
def curried(a: Int)(b: Int) = a + b

List(1, 2, 3).map(curried(6) _ )

It is expected that curried(6) _  should be wrapped in Term.AnonymousFunction, but it is not.

where's the anonymous function here?

Also, sometimes a similar thing happens for List(true, false).map(true && !negate(_) && false) when def negate(b: Boolean) = !b

what does it mean "sometimes"?

where's the anonymous function here?

I mean in the AST, the parent to Term.Eta should be Term.AnonymousFunction but instead it is directly passed as an argument to Term.Apply
This is a bug @tgodzik

what does it mean "sometimes”?

Basically, sometimes when I test it, it is wrapped in AnonymousFunction, and sometimes not :|

where's the anonymous function here?

I mean in the AST, the parent to Term.Eta should be Term.AnonymousFunction but instead it is directly passed as an argument to Term.Apply
This is a bug @tgodzik

This is not an anonymous function, it's a conversion of a method into a function via eta expansion. An anonymous function requires at least one placeholder (_) argument; in this case, curried(6) _ is an eta expansion while curried(6)(_) is an anonymous function.

@zmerr please reopen if you reproduce additional valid examples.


dockerd fails to delete container and rsync becomes stuck

I have sysbox-ce running Ubuntu jammy.
Sometimes I see a situation where the content of /var/lib/sysbox/docker is not cleaned up. For those containers I see 3 rsync processes stuck, and some errors in the docker logs about not being able to remove the container.
What I suspect is happening is that a request is done to stop the container. At that point sysbox starts an rsync from /var/lib/sysbox/docker/XXX to /var/lib/docker/overlay2/YYY (is that true? What is the purpose of that rsync?). But because of the size of /var/lib/sysbox/docker/XXX, the rsync takes too much time, docker gives up waiting and deletes  /var/lib/docker/overlay2/YYY, which causes rsync to get stuck (instead of crashing, why?) and the content of /var/lib/sysbox/docker/XXX not to be deleted.
Here are the relevant logs:
# du -sh /var/lib/sysbox/docker/53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570
1.6G    /var/lib/sysbox/docker/53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570

# ps axf | grep rsync
1143356 pts/1    S+     0:00      \_ grep --color=auto rsync
 869488 ?        S      0:02  \_ rsync -rauqlH --no-devices --delete --usermap=165637:101,166546:1010,165636:100,165542:6,166536:1000,165536:0 --groupmap=166546:1010,165548:12,166536:1000,165579:43,165578:42,165540:4,165637:101,165544:8,165586:50,165536:0 /var/lib/sysbox/docker/53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570/ /var/lib/docker/overlay2/2db48bae7d36c5bc635f748d9ce02aced58c550a131bd36383314d62fdec6a2d/diff/var/lib/docker
 869489 ?        S      0:00      \_ rsync -rauqlH --no-devices --delete --usermap=165637:101,166546:1010,165636:100,165542:6,166536:1000,165536:0 --groupmap=166546:1010,165548:12,166536:1000,165579:43,165578:42,165540:4,165637:101,165544:8,165586:50,165536:0 /var/lib/sysbox/docker/53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570/ /var/lib/docker/overlay2/2db48bae7d36c5bc635f748d9ce02aced58c550a131bd36383314d62fdec6a2d/diff/var/lib/docker
 869490 ?        S      0:03          \_ rsync -rauqlH --no-devices --delete --usermap=165637:101,166546:1010,165636:100,165542:6,166536:1000,165536:0 --groupmap=166546:1010,165548:12,166536:1000,165579:43,165578:42,165540:4,165637:101,165544:8,165586:50,165536:0 /var/lib/sysbox/docker/53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570/ /var/lib/docker/overlay2/2db48bae7d36c5bc635f748d9ce02aced58c550a131bd36383314d62fdec6a2d/diff/var/lib/docker

# ls /var/lib/docker/overlay2/2db48bae7d36c5bc635f748d9ce02aced58c550a131bd36383314d62fdec6a2d/
ls: cannot access '/var/lib/docker/overlay2/2db48bae7d36c5bc635f748d9ce02aced58c550a131bd36383314d62fdec6a2d/': No such file or directory

$ journalctl   -u sysbox-mgr -u sysbox-fs -u sysbox -u containerd -u docker | grep 53b8fe15f63d
Oct 31 16:18:48 jenkins-agent01 sysbox-mgr[2287]: time="2024-10-31 16:18:48" level=info msg="registered new container 53b8fe15f63d"
Oct 31 16:18:48 jenkins-agent01 sysbox-fs[2312]: time="2024-10-31 16:18:48" level=info msg="Container pre-registration completed: id = 53b8fe15f63d"
Oct 31 16:18:48 jenkins-agent01 sysbox-fs[2312]: time="2024-10-31 16:18:48" level=info msg="Container registration completed: id = 53b8fe15f63d, initPid = 832907, uid:gid = 165536:165536"
Oct 31 16:21:39 jenkins-agent01 sysbox-fs[2312]: time="2024-10-31 16:21:39" level=info msg="Container unregistration completed: id = 53b8fe15f63d"
Oct 31 16:21:48 jenkins-agent01 dockerd[1173]: time="2024-10-31T16:21:48.156229633Z" level=info msg="Container failed to exit within 10s of signal 15 - using the force" container=53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570
Oct 31 16:22:09 jenkins-agent01 dockerd[1173]: time="2024-10-31T16:22:09.177376495Z" level=warning msg="failed to delete container from containerd" container=53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570 error="DeadlineExceeded: context deadline exceeded"
Oct 31 16:22:09 jenkins-agent01 dockerd[1173]: time="2024-10-31T16:22:09.185412210Z" level=error msg="53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570 cleanup: failed to delete container from containerd: cannot delete running task 53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570: failed precondition"
Oct 31 16:22:12 jenkins-agent01 dockerd[1173]: time="2024-10-31T16:22:12.086314438Z" level=error msg="Error removing mounted layer 53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570: unlinkat /var/lib/docker/overlay2/2db48bae7d36c5bc635f748d9ce02aced58c550a131bd36383314d62fdec6a2d/diff/var/lib/docker/overlay2/fc76115298a69bf9185a5ceafb48f88899e0fa0b7870a006b37f3410d6bd8b04/diff/usr/lib/python3.10/__pycache__: directory not empty"
Oct 31 16:22:12 jenkins-agent01 dockerd[1173]: time="2024-10-31T16:22:12.087546214Z" level=error msg="Handler for DELETE /containers/53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570 returned error: container 53b8fe15f63d2e2152bf093ff000a192a687199ec6b77d0f44e4ad7e063a3570: driver \"overlay2\" failed to remove root filesystem: unlinkat /var/lib/docker/overlay2/2db48bae7d36c5bc635f748d9ce02aced58c550a131bd36383314d62fdec6a2d/diff/var/lib/docker/overlay2/fc76115298a69bf9185a5ceafb48f88899e0fa0b7870a006b37f3410d6bd8b04/diff/usr/lib/python3.10/__pycache__: directory not empty"

Hi @cavedon, thanks for trying Sysbox and reporting the issue.
Your observation is correct: when a Sysbox container stops, Sysbox transfers data from /var/lib/sysbox/docker/<uuid> to the container's nominal rootfs on the host (usually /var/lib/docker/overlay2/uuid/...). It uses rsync to do the transfer efficiently. The data it transfers is basically the contents of the container's /var/lib/docker. It's trying to transfer that data to the container's rootfs, which is ideally where it should have been in the first place (but can't during container runtime as it results in overlayfs-on-overlayfs which does not work). This way, if one ever does a docker commit to stop and capture the container state, the resulting container image will have the contents of /var/lib/docker in it, which in turn results in the ability to preload container images into Sysbox containers (more about this in the Sysbox docs).
The problem you are seeing occurs typically when the container's /var/lib/docker has a lot (GBs) of data. Is that the case?
The best way to work-around it is to set this flag in sysbox-mgr to true: disable-inner-image-preload=true.
See here for how to do this.
Hope that helps!

Thank you! I will try disable-inner-image-preload=true as I do not need image preload.

The problem you are seeing occurs typically when the container's /var/lib/docker has a lot (GBs) of data. Is that the case?

I have now 25 GB in /var/lib/docker, but I do not think there was much when the issue occurred he first time, I had just clean up the system to triage that...


Improve finding src directory.

This change try to find src directory like below.

./src
./*/src
./*/*/src

In my experience, src directory should be found in 3 depth.

Ah sorry. this is wrong.

fixed.

I think, it makes sense. Thanks.


Integrate address "alias" feature

Use Mysten Labs address alias file to refactor the DNS-Like feature of Suibase.
Also support alias for all Suibase commands. As an example:
"localnet faucet myalias" to add coins to "myalias" address.
===
Related PR:
https://github.com/MystenLabs/sui/pull/13738
https://github.com/MystenLabs/sui/pull/15162
https://github.com/MystenLabs/sui/pull/15172
The filename is sui.aliases co-located with the client.yaml

Suibase renames only its own generated addresses. It never touches user defined aliases.
Name convention is documented in the Helper docs:
https://chainmovers.github.io/suibase-api-docs/suibase/struct.Helper.html#method.client_sui_address
Example:


selfHosted: add commnets

LGTM

We can actually detect if the requirements are achieved. But this is OK for now I feel.


Restore save as html function

Resolves #24, #50, #62

Quick review of code: LGTM.
Builds and runs without error, and works as intended.
Thank you Soc.

I'm getting an error for the extension when running this fork/branch:

In practice, seems to mean that clicking to open a tab in the popup (e.g. Common mistakes) only works once.
I don't think this relates to this branch in particular — I get the same with the fix-53 branch in #54 (though that only has minor differences with main).
I think I'll keep checking/merging in the meantime.


Make gpg passphrase optional in publish method.

My team uses a private artifact repository (artifactory) which exposes the same API as sonatype.
However, the signing of the artifacts is not required. I'd like to make the gpg passphrase optional in PublishModule#publish, or have another task (publishWithoutSigning) that would not require the passphrase.
Thoughts ?

What happens when you pass null?

1 targets failed
scribe.recursion.publish java.lang.NullPointerException
    java.lang.ProcessBuilder.start(ProcessBuilder.java:1012)
    ammonite.ops.Shellout$.executeInteractive(Shellout.scala:27)
    ammonite.ops.Shellout$.$anonfun$$percent$1(Shellout.scala:14)
    ammonite.ops.Shellout$.$anonfun$$percent$1$adapted(Shellout.scala:14)
    ammonite.ops.Command.applyDynamic(Shellout.scala:118)
    mill.scalalib.publish.SonatypePublisher.poorMansSign(SonatypePublisher.scala:141)

I think that having optional gpg passphrase is reasonable

Maybe we could give publish a separate flag --signed false? The reason is that there are three cases here:

Signed with passphrase
Signed without passphrase
Unsigned

If we're going to change this we might as well make sure we handle all three cases

Closing this as the problem it describes is solved. There is still a problem with publishing to artifactory with the default PublishModule. I need to have a closer look at how it's API differs from sonatype's API to formulate a new issue.

@Baccata Did you succeed publishing to Artifactory?

@ddelautre,  yeah, here's a snippet I used. It might need updating to the latest mill version, but it should do the trick :
import java.math.BigInteger
import java.security.MessageDigest

import ammonite.ops._
import mill.scalalib.publish.{ SonatypeHttpApi, _ }
import mill.util.Logger
import scalaj.http.HttpResponse

// Basically a copy of https://github.com/lihaoyi/mill/blob/0.2.2/scalalib/src/mill/scalalib/publish/SonatypePublisher.scala
// to avoid requiring a gpg passphrase.
class ArtifactoryPublisher(uri: String, snapshotUri: String, credentials: String, log: Logger) {

  private val api = new SonatypeHttpApi(uri, credentials)

  def publish(fileMapping: Seq[(Path, String)], artifact: Artifact): Unit = {
    publishAll(release = true, fileMapping -> artifact)
  }
  def publishAll(release: Boolean, artifacts: (Seq[(Path, String)], Artifact)*): Unit = {

    val mappings = for ((fileMapping0, artifact) <- artifacts) yield {
      val publishPath = Seq(
        artifact.group.replace(".", "/"),
        artifact.id,
        artifact.version
      ).mkString("/")
      val fileMapping = fileMapping0.map { case (file, name) => (file, publishPath + "/" + name) }

      artifact -> fileMapping.flatMap {
        case (file, name) =>
          val content = read.bytes(file)

          Seq(
            name             -> content,
            (name + ".md5")  -> md5hex(content),
            (name + ".sha1") -> sha1hex(content)
          )
      }
    }

    val (snapshots, releases) = mappings.partition(_._1.isSnapshot)
    if (snapshots.nonEmpty) {
      doPublish(snapshots.flatMap(_._2), snapshots.map(_._1), snapshotUri)
    }
    val releaseGroups = releases.groupBy(_._1.group)
    for ((group, groupReleases) <- releaseGroups) {
      doPublish(groupReleases.flatMap(_._2), releases.map(_._1), uri)
    }
  }

  private def doPublish(
    payloads: Seq[(String, Array[Byte])],
    artifacts: Seq[Artifact],
    uri: String
  ): Unit = {

    val publishResults = payloads.map {
      case (fileName, data) =>
        log.info(s"Uploading $fileName")
        val resp = api.upload(s"$uri/$fileName", data)
        resp
    }
    reportPublishResults(publishResults, artifacts)
  }

  private def reportPublishResults(
    publishResults: Seq[HttpResponse[String]],
    artifacts: Seq[Artifact]
  ) = {
    if (publishResults.forall(_.is2xx)) {
      log.info(s"Published ${artifacts.map(_.id).mkString(", ")} to Sonatype")
    } else {
      val errors = publishResults.filterNot(_.is2xx).map { response =>
        s"Code: ${response.code}, message: ${response.body}"
      }
      throw new RuntimeException(
        s"Failed to publish ${artifacts.map(_.id).mkString(", ")} to Sonatype. Errors: \n${errors.mkString("\n")}"
      )
    }
  }

  private def awaitRepoStatus(status: String, stagingRepoId: String, attempts: Int = 20): Unit = {
    def isRightStatus =
      api.getStagingRepoState(stagingRepoId).equalsIgnoreCase(status)
    var attemptsLeft = attempts

    while (attemptsLeft > 0 && !isRightStatus) {
      Thread.sleep(3000)
      attemptsLeft -= 1
      if (attemptsLeft == 0) {
        throw new RuntimeException(s"Couldn't wait for staging repository to be ${status}. Failing")
      }
    }
  }

  private def md5hex(bytes: Array[Byte]): Array[Byte] =
    hexArray(md5.digest(bytes)).getBytes

  private def sha1hex(bytes: Array[Byte]): Array[Byte] =
    hexArray(sha1.digest(bytes)).getBytes

  private def md5 = MessageDigest.getInstance("md5")

  private def sha1 = MessageDigest.getInstance("sha1")

  private def hexArray(arr: Array[Byte]) =
    String.format("%0" + (arr.length << 1) + "x", new BigInteger(1, arr))

}

For those who came here in need to publish to Artifactory. Mill > 0.6.1 now has a artifactory module. See #783


Added support for a stream decorator pattern in TcpSocket

Created this to allow for using different types of .net streams with the TCPSocket. A big reason for this was to support negotiated streams using kerberos.

How can i use these changes as its not merged to main??

you can review this unit test for implementation. Otherwise I would need to dig up the code if this doesn't help. you basically create your own broker connection factory and pass in args and options from there https://github.com/d1820/kafka-net/blob/fa4d3e2957d13e60a44f22767b11cd974e9b8cab/src/kafka-tests/Unit/KafkaTcpSocketTests.cs
let me know if out still can't get it


PLANNER-981: Added a health check + show a semi-readable stack trace when an uncaught exception occurs

@tiagobento What is the status of this PR? I see some suggestions inline. Do you want these changes made or should I merge this as is?

@mbarkley @Christopher-Chianelli It has my approval, none of my comments were blockers.


Icons feature

I use Excalidraw a lot and noticed that sometimes it would be helpful to be able to use some icons presets instead of drawing myself.
I believe that when we use a tool like this we want to quickly communicate an idea and the possibility to use icons would bring a big improvement on the time that we spend in order to express something.
My suggestion is that we create a new tool on the main top menu.
Also, we could utilize font awesome: a icon set that developers/designers area already familiar with.
I could develop this feature if you think that it makes sense.

Hello. I'd say this falls under https://github.com/excalidraw/excalidraw/issues/1923 & https://github.com/excalidraw/excalidraw/issues/1924.
It's not likely we'll want add a separate tool for icons.

I agree with @dwelle we want to keep the things simple..


Gulp Build fails with SPFx 1.8

Gulp build is failing with SPFx 1.8.
Below are error codes from command shell.
C:\SPFx\spfx-react-graphdemo>gulp build
Build target: DEBUG
[18:28:03] Using gulpfile C:\SPFx\spfx-react-graphdemo\gulpfile.js
[18:28:03] Starting gulp
[18:28:03] Starting 'build'...
[18:28:03] Starting subtask 'configure-sp-build-rig'...
[18:28:03] Finished subtask 'configure-sp-build-rig' after 6.16 ms
[18:28:03] Starting subtask 'pre-copy'...
[18:28:03] Finished subtask 'pre-copy' after 49 ms
[18:28:03] Starting subtask 'copy-static-assets'...
[18:28:03] Starting subtask 'sass'...
[18:28:03] Finished subtask 'copy-static-assets' after 34 ms
[18:28:03] Finished subtask 'sass' after 157 ms
[18:28:03] Starting subtask 'tslint'...
[18:28:04] [tslint] tslint version: 5.11.0
[18:28:04] Starting subtask 'tsc'...
[18:28:04] [tsc] typescript version: 2.7.2
[18:28:09] Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,124): error TS1005: ')' expected.
[18:28:09] Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,177): error TS1005: '(' expected.
[18:28:09] Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,185): error TS1005: ':' expected.
[18:28:09] Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,67): error TS1005: ';' expected.
[18:28:09] Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,114): error TS1005: '(' expected.
[18:28:09] Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,136): error TS1005: '(' expected.
[18:28:09] Error - 'tsc' sub task errored after 4.81 s
exited with code 2
[18:28:09] 'build' errored after 5.63 s
[18:28:09]
[18:28:09] Finished subtask 'tslint' after 5.85 s
[18:28:09] ==================[ Finished ]==================
Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,124): error TS1005: ')' expected.
Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,177): error TS1005: '(' expected.
Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,185): error TS1005: ':' expected.
Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,67): error TS1005: ';' expected.
Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,114): error TS1005: '(' expected.
Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,136): error TS1005: '(' expected.
Error - 'tsc' sub task errored after 4.81 s
exited with code 2
[18:28:10] Project spfx-react-graphdemo version:0.0.1
[18:28:10] Build tools version:3.9.7
[18:28:10] Node version:v10.16.0
[18:28:10] Total duration:10 s
[18:28:10] Task errors:7
C:\SPFx\spfx-react-graphdemo>

Chances are you don't have an explicit reference to officeui-fabric-react in your package.json file, but you are using it in your source code.  Make sure you are referencing the version of OUIFR in package.json that you want to use in your solution.

@patmill I found reference was missing, so I added but still no luck. I am attaching package.json.
Project in subject I scaffold using<EMAIL_ADDRESS><EMAIL_ADDRESS>** package.json***
{
"name": "spfx-react-graphdemo",
"version": "0.0.1",
"private": true,
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test"
},
"dependencies": {
"@microsoft/sp-core-library": "1.8.0",
"@microsoft/sp-lodash-subset": "1.8.0",
"@microsoft/sp-office-ui-fabric-core": "1.8.0",
"@microsoft/sp-property-pane": "1.8.0",
"@microsoft/sp-webpart-base": "1.8.0",
"@types/es6-promise": "0.0.33",
"@types/react": "16.4.2",
"@types/react-dom": "16.0.5",
"@types/webpack-env": "1.13.1",
"office-ui-fabric-react": "^6.188.0",
"react": "16.7.0",
"react-dom": "16.7.0"
},
"resolutions": {
"@types/react": "16.4.2"
},
"devDependencies": {
"@microsoft/sp-build-web": "1.8.0",
"@microsoft/sp-tslint-rules": "1.8.0",
"@microsoft/sp-module-interfaces": "1.8.0",
"@microsoft/sp-webpart-workbench": "1.8.0",
<EMAIL_ADDRESS>"0.4.0",
"gulp": "~3.9.1",
"@types/chai": "3.4.34",
"@types/mocha": "2.2.38",
"ajv": "~5.2.2"
}
}
gulp build command produces following error:
C:\SPFx\spfx-react-graphdemo>gulp build
Build target: DEBUG
[09:36:42] Using gulpfile C:\SPFx\spfx-react-graphdemo\gulpfile.js
[09:36:42] Starting gulp
[09:36:42] Starting 'build'...
[09:36:42] Starting subtask 'configure-sp-build-rig'...
[09:36:42] Finished subtask 'configure-sp-build-rig' after 6.24 ms
[09:36:42] Starting subtask 'pre-copy'...
[09:36:42] Finished subtask 'pre-copy' after 49 ms
[09:36:42] Starting subtask 'copy-static-assets'...
[09:36:42] Starting subtask 'sass'...
[09:36:42] Finished subtask 'copy-static-assets' after 35 ms
[09:36:42] Finished subtask 'sass' after 163 ms
[09:36:42] Starting subtask 'tslint'...
[09:36:42] [tslint] tslint version: 5.11.0
[09:36:42] Starting subtask 'tsc'...
[09:36:42] [tsc] typescript version: 2.7.2
[09:36:48] Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,124): error TS1005: ')' expected.
[09:36:48] Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,177): error TS1005: '(' expected.
[09:36:48] Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,185): error TS1005: ':' expected.
[09:36:48] Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,67): error TS1005: ';' expected.
[09:36:48] Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,114): error TS1005: '(' expected.
[09:36:48] Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,136): error TS1005: '(' expected.
[09:36:48] Error - 'tsc' sub task errored after 5.08 s
exited with code 2
[09:36:48] 'build' errored after 5.93 s
[09:36:48]
[09:36:48] ==================[ Finished ]==================
Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,124): error TS1005: ')' expected.
Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,177): error TS1005: '(' expected.
Error - [tsc] node_modules/@uifabric/foundation/lib/ISlots.d.ts(68,185): error TS1005: ':' expected.
Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,67): error TS1005: ';' expected.
Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,114): error TS1005: '(' expected.
Error - [tsc] node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(18,136): error TS1005: '(' expected.
Error - 'tsc' sub task errored after 5.08 s
exited with code 2
[09:36:48] Finished subtask 'tslint' after 6.25 s
[09:36:49] Project spfx-react-graphdemo version:0.0.1
[09:36:49] Build tools version:3.9.7
[09:36:49] Node version:v10.16.0
[09:36:49] Total duration:10 s
[09:36:49] Task errors:7
C:\SPFx\spfx-react-graphdemo>

Fabric react 6.x requires typescript 2.9 or later.  Easiest thing to do is bump your generator up to 1.8.2. Otherwise, you can use fabric react 5, or rush-stack-compiler-2.9.  Again - easiest thing to do is use 1.8.2 - when you choose a react project, we'll use ouifr 6 and an appropriate rush-stack-compiler / typescript version.

Thanks @patmill using 1.8.2 generator solves my issue. Now I see a OUIFR reference in package.json which I manually added previously with 1.8.0. Only question out of curiosity, can I change typescript version in tsconfig.json file ?
Thanks

You need to do a couple of things.  The 1.8.0 release notes discuss it, but this blog post from Elio is probably more explicit.
https://www.eliostruyf.com/define-the-typescript-version-you-want-to-use-in-sharepoint-framework/

Thanks @patmill @andrewconnell


refactor(bump-all-updated-packages): use tag instead of custom commit message

Summary
Having custom commit message script is not an option for main branch, because we have internal tooling, which strips [x] tags from commit messages before merging them into main branch.
Instead of constant commit message, we are now using a tag which will be concatenated with the commit message, which was entered via interactive commit dialog, see demo below.
Changelog
[Internal] - updated validation in bumping packages script
Test Plan
https://user-images.githubusercontent.com/28902667/220163767-015bf37b-6914-4df2-84d9-aa25fb2887d3.mov

(small sidenote: let's make sure to update the wiki to reflect the latest once this is merged)

Hey @hoxyq,
Just a heads up that I believe this won't work sadly. Specifically Phabricator seems to strip @ away when exporting Diffs.
For example D43619512 from @cipolleschi had an @allow-large-files which got stripped on the final commit 05438c33875283b01e321d8c1f3d6d3cf33946e5
So we'd need to either search for publish-packages-to-npm or use [publish-packages-to-npm] or any other notation

Hey @hoxyq, Just a heads up that I believe this won't work sadly. Specifically Phabricator seems to strip @ away when exporting Diffs.
For example D43619512 from @cipolleschi had an @allow-large-files which got stripped on the final commit 05438c3
So we'd need to either search for publish-packages-to-npm or use [publish-packages-to-npm] or any other notation

Thanks for highlighting this, I will check if Phabricator strips only @, maybe we could use ~publish-packages-to-npm or #publish-packages-to-npm


[Bug] streampark status tracking is not correct after task failed retry,and mapping is not work

Search before asking

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

Java Version
1.8
Scala Version
2.11.x
StreamPark Version
2.0.0
Flink Version
1.13.3
deploy mode
yarn-application
What happened
streampark status tracking is not correct after task failed retry，
and is always mapping mode when I execute mapping operate

the status is failed in streampark ,but in yarn the task is running

Error Exception
No response
Screenshots
No response
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!(您是否要贡献这个PR?)

Code of Conduct

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

I encountered the same problem. I fixed it by manually modifying the value of state column in t_flink_app table to 5 and then make a savepoint and restore from it. This problem happened many times. Each time the restart of YARN cluster will trigger it. @wolfboys Do you have any suggestions?

I encountered the same problem. I fixed it by manually modifying the value of state column in t_flink_app table to 5 and then make a savepoint and restore from it. This problem happened many times. Each time the restart of YARN cluster will trigger it. @wolfboys Do you have any suggestions?

You can try the latest version 2.1.0 to see if it solves the issue.

same issue occurs in 2.1.0

fixed, (version >= 2.1.3)


Document potential pitfall of useLocalMicrophoneTrack & useLocalCameraTrack

What kind of problem does this feature solve?
We create tracks using useLocalMicrophoneTrack and useLocalCameraTrack, it returns the same track within the component, but creates a new track when called in a different component down the React tree. This behavior is useful for creating multiple tracks, but can be a common pitfall.
What does the proposed API look like?
I'd like to document in the code comment about this behavior. Happy to make a PR for this myself.

@EkaanshArora
This is a good idea. Can you provide a pr to make this happen? Thanks.

Hi @EkaanshArora Just want to check if you encounter any problem making this PR. You can make a PR in this repo and I'll sync the updates to the official website. Let us know!

Added #168, please review

Thank you. I left a comment in the PR


SVG Visibility Problem

I've hit a problem with using holder.js. It occurs when the placeholder image is larger than the window size but is sized down through CSS to fit the within the window. Because the SVG element that creates the placeholder images is set to visibility: hidden, that element will take up height and width and force scrollbars. Here's a jsfiddle example.
This is especially a problem with me in angular.js where the SVG gets added to the end of the body element and persists between views.

Thanks for reporting this, it definitely needs a fix. I'll add it to 2.5.

Sure. Thanks for fixing it so quickly!

Sure thing, let me know if you encounter the bug in the future.


Non-standard proposals using the wrong PDF template

At least pre-approved PDF's still use the old templates on the latest develop, using horrible tables. I didn't test, but it's highly likely the same thing happens with pre-assesments (as the logic that controls the used template is the same).
I think during the manual merge of the new PDF code the template-select logic was overlooked. The canonical-PDF change moved the logic to outside the main PDF logic, to the proposal model. As that would not have caused conflicts, it's probable that nobody noticed it.

I can confirm that pre-assessment proposals do indeed use the old template. I'm also thinking now, that pre-assessments proposals have really been accounted for in the new PDF workflow, so that should also happen probably. Woops ... Where is the PDF logic you are talking about here located?

In the Proposal model, there's a method called pdf_template_name

Ahh ok. I guess it should be a fairly easy fix then? I will have a look.

I propose that we also get rid of these unused templates, like proposal_pdf_empty.html, proposal_pdf_pre_assessment.html and proposal_pdf_pre_approved.html. As they are no longer neccessary/ cause confusion. I guess I should have done that already in the new pdf PR ... but better late than never

Yeah, it should be an easy fix. Those templates probably just need to go. Didn't do it myself because 1) I wasn't entirely sure what was the cause and 2) I was busy testing something else


No MUI and Failed Prop type

Ever since chapter 2 I have been getting a weird error when running yarn dev-express. The website functions but none of the MUI integration works. I have tried using chapter 2 end and chapter 3 end and made sure to include my .env but nothing seems to work. I have also tried using different node versions(12.16.1 the one in the book doesn't work bc when you run yarn it says error<EMAIL_ADDRESS>The engine "node" is incompatible with this module. Expected version ">=12.22.0". Got "12.16.1") and different yarn versions. The error is in a txt file included
err.txt

@DLamphere47 Thanks for noting.
Here are a couple of starting points that may help:

I do see the problem when you run yarn. We may need to upgrade node. I'll do more digging. For now, try running nvm install 12.22.0. Then run nvm use 12.22.0. Then try yarn again.
From your err.txt file, I see that your yarn version is 1.22.19. In the book, we use 1.22.5 (noted in Chapter 1, section Installing Node.js and Yarn). To switch yarn version, run yarn set version <version> as explained here in the yarn docs. This may not make a difference but good to be consistent with what we use throughout the book.
Starting from Chapter 3, we run the app with yarn dev, not yarn dev-express. We note this change at the beginning of Chapter 3, section Authentication HOC withAuth. Please try running 3-end with yarn dev.

Can you explain what you mean by "none of the MUI integration works" ?

I went ahead and tried switching yarn versions and still got the same error. The only reason I was using 3-begin was because I was already done with the chapter. I went ahead and downloaded a fresh copy of the repo and ran 3-end with my .env included(after running yarn). I still got the same error. As for the mui integration the fonts dont appear to be the same as the screenshots from the book. It was most noticeable in the end of chapter 2 when none of the settings element or avatar icon loaded, so I guess I'm not really sure if it is MUI or not. I attached errors from both chapter 2 and 3 as well as screenshots.

3enderror.txt
![3-logged-out](https://user-images.githubusercontent.com/112280697/192122463-90a64d62-fb6
2enderror.txt
f-4d0d-

98b1-10a718b37689.png)

@DLamphere47 Thanks for sharing screenshots and error messages.

Note that some of our screenshots may be a little outdated. They show the proper information but styles could be different.
Because you see the Button and Avatar (at least in Chapter 3) components, MUI integration worked.
I do see that the font on the "Log in with Google" button looks off. I figured out why:

We previously implemented Muli font for styleLoginButton in SharedStyles.js:

borderRadius: '2px',
textTransform: 'none',
font: '16px Muli',
fontWeight: '400',
letterSpacing: '0.01em',
color: 'white',
backgroundColor: '#DF4930',
};

When we were using Muli, we also added it as a resource in our _document.js file with this line:

<link
   rel="stylesheet"
   href="https://fonts.googleapis.com/css?family=Muli:300,400:latin"
 />

However, we since updated the code and no longer include Muli in _document.js. If you simply remove Muli within styleLoginButton in SharedStyles.js, then your button will have the default font which looks correct.
I'll make this update in the code and text later. Thanks for finding this discrepancy!

As far as your Avatar issue and the warning message, Warning: Failed prop type: Invalid prop `styles[0]` of type `object` supplied to `MyDocument`, expected `string`. -- I will have to review more, but you should be able to run the app.

@DLamphere47 Just letting you know that I fixed the book text to instruct installing Node version 12.22.0 in Chapter 1. That should resolve your initial issue with running yarn.
Are you still having an issue seeing your Avatar in 2-end? I just re-ran each of the end codebases, and I am able see my Avatar for all of them.

Sorry I have been away for a bit but yeah I also re ran 2 end and am still getting no avatars to appear at all.

I made sure that I added the avatarUrl and other values and I still get no avatar to appear or drop down menu even if I click where it would be. It has appeared in all remaining chapters though and I have been using the same .env vars the whole time.

I updated it and that fixed it thanks!

Good to hear! I see how our instructions can lead to this problem. We provided the URL with quotes around it, but MongoDB automatically adds the quotes anyway. I'll remove quotes in our instructions to help avoid this typo going forward.


PullHook breaks page layout

Environment
Onsen 2 rc 17
React 0.7.5
All
Encountered problem
When a PullHook component is added to a page, it's content goes underneath the top toolbar.
How to reproduce
https://codepen.io/anon/pen/jAJGdx?editors=0011

Thank you @airamrguez !

This was fixed in a previous version. Forgot to close this issue.

@argelius If I'm not wrong this is still happening. I've updated the example with the latest releases to reproduce the error (OnsenUI 2.0.0 & react-onsenui 1.0.0). If you switch to the OnsenUI 2.0.0-rc.15 version then you'll see the example works even with the latest release of react-onsenui.
http://codepen.io/airamrguez/pen/QKEjdq?editors=1010

@airamrguez Are you sure?
http://codepen.io/argelius/pen/amkvyr
For me it works fine. What browser are you using?

@argelius I'm using the latest Chrome version. The link above has wrong library versions because I were playing to see which version worked.
Now its pointing to the latest onsen releases:
http://codepen.io/airamrguez/pen/QKEjdq?editors=1010

@airamrguez You only updated the JS library, there were a couple of changes in the CSS of the pull hook also lately.

@argelius Good catch!!! I totally forgot about updating the css. I've tested it now with the new css and it's working fine!
Thank you so much!! You're doing a really great work.


Fixes a crash caused by changing a hash table while it was being enumerated

This problem happened when a thread was changing the scheduledItems hash table, while a timer triggered an
update in another thread. This issue was very rare but caused a crash with an exception like
'Collection <NSConcreteHashTable: 0x170134640> was mutated while being enumerated'.
It was solved by guarding the code parts that read and modify the hash table with a @synchronized block.

@rafaelwinter Sorry for the delay in replying!
Classy should not be used across threads, since it updates UIKit objects which are not thread safe.
Are you sure you are not triggering a classy style update on a background thread?

@cloudkite Hi Jonas, sorry for my really long delay. I had to work in other parts of our software and had to keep this on hold. Thanks for the tip about cross-thread updates. We were triggering UI updates from background, as you suspected. I surrounded my code on a GDC dispatch block to the main thread and worked fine.
Closing the PR now! Thanks a lot!


Is it possible to attach screenshot to the playwright html report

Yes. There is nothing special with playwright-bdd here. Just set config option screenshot to on | only-on-failure.


Shadowrun 5e Character sheet importer not working

The Chummer json importer is not working for https://github.com/Roll20/roll20-character-sheets/tree/master/Shadowrun5thEdition by @clevett
I get the following errors in the console when pressing the import button.
`no attr name app.js?1573152007:552
ReferenceError: importChummer is not defined sheetsandboxworker.js?1573581259381:733
at Array.eval (eval at messageHandler (sheetsandboxworker.js?1573581259381:698), :940:6)
at self.trigger (sheetsandboxworker.js?1573581259381:110)
at messageHandler (sheetsandboxworker.js?1573581259381:702)
ReferenceError: importChummer is not defined sheetsandboxworker.js?1573581259381:734
at Array.eval (eval at messageHandler (sheetsandboxworker.js?1573581259381:698), :940:6)
at self.trigger (sheetsandboxworker.js?1573581259381:110)
at messageHandler (sheetsandboxworker.js?1573581259381:702)`

Did you already email me on this? If not some one else reported it. I have it on my to do list to take a look at the importer and see hat may be going on.

I have sent no email, just posted this issue.


Paket update behavior on pinned version

Hello!
I am investigating a move from NuGet to Paket for our package restore process.
I was able to use convert-from-nuget for starting to play around. It generated a paket.dependencies with pinned versions:
nuget TaskScheduler 1.8.1
I'm not sure I understand 100% what pinned means, but we certainly do want to only use this specific version in our codebase.
I wanted to see how easy it is to update a package version for the whole codebase, this is where our pain is currently with the Package Manager.
When I execute this command:
$ .paket/paket.exe update nuget TaskScheduler version 2.5.5
Paket version <IP_ADDRESS>
Updating TaskScheduler to version 2.5.5 in C:\SVN\Chinook2\paket.dependencies group Main
Resolving packages for group Main:
- TaskScheduler is pinned to 2.5.5
I get a unmodified paket.dependencies:
nuget TaskScheduler 1.8.1
and an updated paket.lock:
TaskScheduler (2.5.5)
Running paket install does not download TaskScheduler 2.5.5
So I reverted those changes and simply edited the paket.dependencies to have:
nuget TaskScheduler 2.5.5
Then  paket install downloaded as expected the new version and I had the behavior I expected.
From what I understood, paket.dependencies shall pilot the version constraints for the codebase, and paket.lock shall reflect a resolution of those constraints.
Am I getting something wrong?

This looks like a bug to me. Paket update nuget should either not allow
that or up the dependencies file. I'm looking into this.
That said:
Usually you want to remove the version numbers in paket.dependencies after
convert-from-nuget and only have versions in paket.lock.
The convert function is very conservative and tries to keep nuget behavior
as good as possible.
But after convert you should start to "clean up" the dependencies file and
remove all restrictions that you don't need when updating packages. The
restore process is always looking into the lock file. So whatever version
no. is specified there will be used.
On Dec 10, 2015 10:56 AM, "Miguel Vazquez"<EMAIL_ADDRESS>wrote:

Hello!
I am investigating a move from NuGet to Paket for our package restore
process.
I was able to use convert-from-nuget for starting to play around. It
generated a paket.dependencies with pinned versions:
nuget TaskScheduler 1.8.1
I'm not sure I understand 100% what pinned means, but we certainly do want
to only use this specific version in our codebase.
I wanted to see how easy it is to update a package version for the whole
codebase, this is where our pain is currently with the Package Manager.
When I execute this command:
$ .paket/paket.exe update nuget TaskScheduler version 2.5.5
Paket version <IP_ADDRESS>
Updating TaskScheduler to version 2.5.5 in
C:\SVN\Chinook2\paket.dependencies group Main
Resolving packages for group Main:

TaskScheduler is pinned to 2.5.5

I get a unmodified paket.dependencies:
nuget TaskScheduler 1.8.1
and an updated paket.lock:
TaskScheduler (2.5.5)
From what I understood, paket.dependencies shall pilot the version
constraints for the codebase, and paket.lock shall reflect a resolution of
those constraints.
Am I getting something wrong?
—
Reply to this email directly or view it on GitHub
https://github.com/fsprojects/Paket/issues/1301.

Thanks Steffen for you feedback.
So what is the recommended process to upgrade a specific package to a specific version for the whole codebase?

The "standard" workflow is: remove version from dependencies file and run
the command as above (or only "paket update" is you want to update
everything). This will change the version number in paket.lock and all
projects get updated version.
As a rule of thumb:
The dependencies file describes all your top level dependencies and
additional version requirements for these. So one possible line could be:
nuget NUnit ~> 2
This will ensure that you get the latest nunit version that is in v2
channel (and don't get breaking changes from v3)
But usually most lines are just:
nuget Newtonsoft.Json
The real improve info is in the paket.lock file where all dependencies
(incl transitive) are pinned to concrete versions.
On Dec 10, 2015 12:02 PM, "Miguel Vazquez"<EMAIL_ADDRESS>wrote:

Thanks Steffen for you feedback.
So what is the recommended process to upgrade a specific package to a
specific version for the whole codebase?
—
Reply to this email directly or view it on GitHub
https://github.com/fsprojects/Paket/issues/1301#issuecomment-163579498.


loadGetInitialProps throw error after reboot server

After reboot server. Browser fetch in on-demand-entries-ping. At this time Component maybe undefined.
/lib/utils.js#L50

Can you provide a way to reproduce this? Then I'll re-open.


Splink4 ComparisonCreator ft. ExactMatch and LevenshteinAtThresholds

This is applying the same sort of idea as #1689 to fully-fledged Comparisons by introducing an abstract ComparisonCreator class which all of our comparison_library and comparison_template_library objects can inherit from. This is a stripped-back form missing quite a few features of the current classes, but enough to show the general shape of things.
Included:

ComparisonCreator base class
comparison_library.ExactMatch
comparison_library.LevenshteinAtThresholds
addition to the new temporary test module to cover using these in settings + running predict

Not included:

any of the bells and whistles currently available for these library comparisons
any mechanism analogous to ComparisonLevelCreator.configure(), as think it will be worth having a think about:

exactly what features we want to expose access to at this level rather than just building a custom comparison (individual m_probability values per level? u_probability?  term frequency stuff??)
what kind of sensible API we could have for providing access for that (using perhaps something more like .configure()), rather than having loads of arguments to individual comparisons in an ad-hoc manner as we currently have

Aside from the issue of dealing with multiple col_name here and in ComparisonLevelCreator that I mentioned elsewhere I think this should be a suitable base to implement further comparison_library and comparison_template_library functions from.

Super-simple testing script:

from splink.comparison_level_library import NullLevel
from splink.comparison_library import ExactMatch
from splink.datasets import splink_datasets
from splink.duckdb.linker import DuckDBLinker

NullLevel("surname").get_comparison_level("duckdb").as_dict()

df = splink_datasets.fake_1000
settings = {
    "probability_two_random_records_match": 0.01,
    "link_type": "dedupe_only",
    "blocking_rules_to_generate_predictions": [],
    "comparisons": [
        ExactMatch("surname"),
    ],
}

linker = DuckDBLinker(df, settings)
linker.predict().as_pandas_dataframe()

settings = {
    "probability_two_random_records_match": 0.01,
    "link_type": "dedupe_only",
    "blocking_rules_to_generate_predictions": [],

}

linker = DuckDBLinker(df, settings)


[SPARK-43801][SQL] Support unwrap date type to string type in UnwrapCastInBinaryComparison

What changes were proposed in this pull request?

Support unwrap date type to string type in UnwrapCastInBinaryComparison. This is similar idea to other instances in UnwrapCastInBinaryComparison. And there is an implementation already but closed later on https://github.com/apache/spark/pull/40294.
Why are the changes needed?

Such that filter such as dt = date '2023-01-01' where dt is a string column can be pushed down to file scan operator.
This will help fix issue such as https://github.com/apache/iceberg/issues/4997
Does this PR introduce any user-facing change?

No.
How was this patch tested?

Unit test.

@wangyum @sunchao @sunchao @cloud-fan Hello, I wonder if you can take a look? Thanks. Previously there was an attempt already but closed later on https://github.com/apache/spark/pull/40294, now I am trying to continue the work.

@wangyum Hi, sorry I did not get a chance to look into this. Will take a look as soon as possible.

A reminder: for predicate like dt = date'2020-01-01', it can match more than one string values, such as 2020, 2020-1, 2020-01, 2020-01-1, etc.
We need to carefully do a reverse of DateTimeUtils.stringToDate, which is hard to get right.

I found the same problem in hive data source, the partition filter cannot be pushed down due to the cast expression. Can we push down date type filter in Shim_v0_13#getPartitionsByFilter? In addition, is it possible to use unquoted date string to pass date filter? Hive metastore will parse unquoted date string into a date type. Refer to https://github.com/apache/hive/blob/7cd3107a76d633ef5fae2ffb8ec16953ac968092/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/parser/Filter.g#L546

My suggestion for this problem is not to abuse the string type. If the column holds timestamp values, it should be timestamp type. If you know that your string-type "timestamp" type always contains standard timestamp string, you can also manually rewrite your predicate to just compare strings.

@cloud-fan Hi, thanks for the suggestion.

We need to carefully do a reverse of DateTimeUtils.stringToDate, which is hard to get right.

Is this the right way to solve the problem? To have a reverse of stringToDate function called DateToPossibleStrings.  The expression will look like Literal.create(possibleString_1, StringType) or Literal.create(possibleString_2, StringType) ...
Thanks

Is this the right way to solve the problem?

In my opinion, it is not. I don't think a large OR predicate is helpful in the pushdown case. As I said, if you believe your string-type "timestamp" column always contains standard timestamp strings, then you can manually do string comparison without OR.

@cloud-fan Thank you, but

if you believe your string-type "timestamp" column always contains standard timestamp strings, then you can manually do string comparison

Aren't we looking for a generic solution here? Wouldn't this create issues if the string-type "timestamp" column do not always contains standard timestamp string?
My goal is merge this change, what change I need to implement to achieve? Would you please suggest, thanks!

@cloud-fan gentle ping, may I have your insights on how to make this PR work? Thanks

@puchengy Could you guarantee that the result returned by the following query is correct?
CREATE TABLE t1(id int) PARTITIONED BY (dt string);

insert into t1 partition(dt = '2023-1-01') select 1;
insert into t1 partition(dt = '2023-01-02') select 2;

select * from t1 where dt = date '2023-01-01';

@wangyum Yes. We won't push out a change that will produce incorrect result.

@wangyum Yes. We won't push out a change that will produce incorrect result.

It seems the result is not correct after this patch:
scala> spark.sql("CREATE TABLE t1(id int) PARTITIONED BY (dt string);")
res0: org.apache.spark.sql.DataFrame = []

scala> spark.sql("insert into t1 partition(dt = '2023-1-01') select 1;")
res1: org.apache.spark.sql.DataFrame = []

scala> spark.sql("select * from t1 where dt = date '2023-01-01';").show
+---+---+
| id| dt|
+---+---+
+---+---+

scala> spark.sql("set spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.UnwrapCastInBinaryComparison")
res3: org.apache.spark.sql.DataFrame = [key: string, value: string]

scala> spark.sql("select * from t1 where dt = date '2023-01-01';").show
+---+---------+
| id|       dt|
+---+---------+
|  1|2023-1-01|
+---+---------+

@wangyum Yes, I know current version is not working. Will change the title to WIP to indicate this is not ready for review.

Aren't we looking for a generic solution here? Wouldn't this create issues if the string-type "timestamp" column do not always contains standard timestamp string?

My take is for a general solution, the generated predicate will be very complicated to handle non-standard timestamp strings, probably with a lot of Or predicates, and the file source pushdown may not work well with such predicates.


966 dpl 710 create the sample sheet configuration for smrt link version 12 for revio

Closes #966

It would be nice to test the csv format at some point in spec/csv_generator/pacbio_sample_sheet_spec.rb but we can review that once the combined work is finished.


⚠ Bofrost.be has degraded performance

In 6b6e378, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1071 ms

Resolved: Bofrost.be performance has improved in 0dfebb5 after 8 minutes.


Deprecation Warning on OSX 10.11

When I run on OS X 10.11.1 sd.play(x, fs) I get the next warning. Does it have to do only with sounddevice? Is there a way to remove it?
WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.

This message is caused by the underlying PortAudio library.
Here's an issue and a mailing list discussion about the topic:
https://www.assembla.com/spaces/portaudio/tickets/243-portaudio-support-for-os-x-10-11-el-capitan/details#
https://lists.columbia.edu/pipermail/portaudio/2015-October/000092.html
I think we'll just have to wait for a new PortAudio version, until then you'll have to ignore this message.

Thank's a lot!

You should leave this open until it is fixed.
An alternative approach would be #11, what do you think about that?

I think it would be nice to remove those messages though I am not familiar with that kind of implementation.
On OSX El Capitan I could not compile PortAudio following their instructions (I could in Yosemite) and I get the errors as you showed in the links above. So as you say, the appropriate solution should come from PortAudio. I installed it using brew install portaudio, and so far sounddevice seems to work as I expect/need.

I made an attempt at silencing PortAudio in the branch "redirect-stdout", see #12.
Can you please try if this works in your case?

I still see the warning. Please let me know if I installed it correctly (I'm sort of a begginer):

I work with virtualenvs, so I created a new one.
I installed some dependencies with pip, but not sounddevice.
I cloned this repo and checkedout redirect-stdout
I executed the command python setup.py install
and ran my HelloSoundDevice.py

Yes, those are the right steps.
However, you should probably change the installation command (as suggested in the "Contributing" section of the docs) to:
python setup.py develop

... because this way you can change stuff in the code and don't need to re-install the module all the time.
You'll have to close and re-start Python, though, for the changes to take effect.
If you are not sure if the correct code is used, you should try to create an obvious error in sounddevice.py and check if this error is raised when you run your test script. Just to be sure ...
Since you still see the warning, maybe it is sent to stdout instead of stderr ...
Can you please try to replace the two occurrences of __stderrp with __stdoutp and run it again?

OK, so I reinstalled as explained and the intentional error is raised!
I see the warning without and with the modification you suggest.
There is something I do not understand in [this part of the code] (https://github.com/spatialaudio/python-sounddevice/blob/69ddc717926b39d7579b61c52bea09c80d0d2c2e/sounddevice.py#L2430-L2436) (the first occurrence is commented?)

Hmmm ... so it looks like the message doesn't come from the PortAudio library but somehow directly from the OS ... I guess ...
There is no code commented, the only comments are actual comments. The first line is just a hint that the following definitions are taken from the file stdio.h.
/* from stdio.h */

Since this doesn't seem to work in your case, you could now try my suggestion from https://github.com/spatialaudio/python-sounddevice/issues/11#issuecomment-155836787.
You can put the first block of code from the above link before you call sd.play() and the second block of code after it.
If it doesn't work, you should try changing the 2 (which is the file descriptor for stderr) to 1 (which means stdout).
If you don't run the second code block (to undo the redirection), you won't see any stdout/stderr messages for your remaining Python session!
If this works for you, you should actually use a with statement to make sure that the redirection is undone, even if an error occurs.

I have followed the instruction on pasting the blocks of code before and after the call to sounddevice and it indeed hides the warning! It worked with the 2.
Could you explain me what you mean by using a with statement?

I'm glad to hear that this method works for you.
I don't think I want to include this into python-sounddevice, but it should be no problem to do this in your own code (see below).
The with statement is part of Python just like the if statement and the for loop.
It should be part of your favorite Python tutorial ...
You can read up on it, e.g.:
http://stackoverflow.com/questions/3012488/what-is-the-python-with-statement-designed-for
https://docs.python.org/3/reference/compound_stmts.html#with
https://www.python.org/dev/peps/pep-0343/
In your case, I would suggest to use the contextlib module from the standard library: https://docs.python.org/3/library/contextlib.html
import contextlib
import os
import sys

@contextlib.contextmanager
def ignore_stderr():
    devnull = os.open(os.devnull, os.O_WRONLY)
    old_stderr = os.dup(2)
    sys.stderr.flush()
    os.dup2(devnull, 2)
    os.close(devnull)
    try:
        yield
    finally:
        os.dup2(old_stderr, 2)
        os.close(old_stderr)

You only need to define this once, then you can use it for all the calls where you want to get rid of the warning message.
You can use it like this:
import sounddevice as sd

with ignore_stderr():
    sd.play(mydata, fs)

This makes sure that after the with statement the old behavior of stderr is restored.
And the important part is that it is also restored if an exception is raised in sd.play() (or in whatever you are doing inside of the with statement).
There are probably some edge cases i'm missing, for more details have a look at: http://eli.thegreenplace.net/2015/redirecting-all-kinds-of-stdout-in-python/

Thank's a lot for your help! That solution is good enough for me ;)

Just for reference, there is another issue in the PortAudio issue tracker: https://www.assembla.com/spaces/portaudio/tickets/218-pa-coreaudio-uses-some--quot-deprecated-quot--apis----this-is-by-design-but-needs-to-be-monitored
it looks like the warning message will stay for some time ...


GPT2-large fails to load the tokenizer

🐛 Bug
Using: GPT2-Large
To Reproduce
When I load the gpt2-large model, in the same way as gpt2 and gpt2-medium I get an NoneType when loading the tokenizer.
self.tokenizer = GPT2Tokenizer.from_pretrained("gpt2-large", bos_token="_start_", unk_token='_unk_', eos_token="_eos_", sep_token="_delimiter_", cls_token="_classify_", pad_token='_pad_' )
self.model = GPT2LMHeadModel.from_pretrained("gpt2-large")

At this point in the debugger self.tokenizer == None is True
The issue is clear when I try to use the tokenizer.
File "gpt2_train.py", line 70, in load
    num_added_toks = self.tokenizer.add_special_tokens(special_tokens_dict)
AttributeError: 'NoneType' object has no attribute 'add_special_tokens'

Expected behavior
Get a tokenizer object
Environment

OS: Linux
Python version: 3.7.3
PyTorch version: 1.1.0
PyTorch Transformers version (or branch): 1.1.0 (last github pull)
Using GPU ? yes
Distributed of parallel setup ? no
Any other relevant information:

Hello! Could you try to install from source (1.2.0)? Is there any warning in your terminal such as
Model name 'gpt2-large' was not found in model name list (gpt2, gpt2-medium). We assumed 'gpt2-large' was a path or url but couldn't...

or something along those lines?

Thank you! Solved with the update. And yes, checking again I got your mentioned error message.


Move funds on end of LBP to XYK

[ ] move funds to xyk
[x] disallow creation of xyk before lbp ends

discord thread

@lumir-mrkva Do we want to also create XYK pool at the end of LBP if the pool doesn't exist?

@lumir-mrkva I have some questions.
What if XYK pool already exists before LBP? (I thing there is nothing we can do to prevent it).
Do we want to create XYK pool immediately at the end of LBP or when remove_liquidity is called? (In the former case, pool creation needs to be somehow automated/scheduled).
I have also discussed architectural design with Martin, and we like the idea of creating a new pallet for it.

The second part of the task was already solved by this PR.

you cannot create LBP if the XYK pool already exists

@lumir-mrkva ability to create XYK at the end of LBP and transfer funds there should be configurable in the config or in the create_pool method? In other words, configurable for all LBP pools without an exception or configurable individually for each pool?

@lumir-mrkva ability to create XYK at the end of LBP and transfer funds there should be configurable in the config or in the create_pool method? In other words, configurable for all LBP pools without an exception or configurable individually for each pool?

This should be decision of the team conducting the LBP. There are different use-cases that you might do with LBP including just transferring token or a sale instead of initializing liquidity. If I'd tackle this I would look at the close / end function and do the logic there where it can be an option if final weights are 50/50.
Optionally the close function could create only partial pool and transfer the rest to the owner.


Feature request: References to both directions between nodes and a custom GraphQL schema

Summary
To integrate my custom GraphQL schema with Gridsome, it would be convenient if I could instantiate Gridsome's NodeInterface manually, and as long as my <page-query> returns a collection of its instances, pages would be generated out of that.
Any other solution to my issue (described below) would also work.
Motivation
I would like to represent a data structure as Gridsome pages. The elements have typed complex metadata which may have multiple links to other elements. A heavily simplified GraphQL schema for the data looks like the following:
type Timer implements NodeInterface {
  id: ID!
  title: String!
  trigger: Trigger
  # ...
}
enum TriggerType {
  TIMER_FINISHED
  # ...
}
interface Trigger {
  type: TriggerType!
  # ...
}
type TriggerTimerFinished implements Trigger {
  type: TriggerType!
  timer: Timer!
}

It is easy to provide a custom GraphQL schema with resolvers for the data structure but I am having hard time finding a way to integrate this with Gridsome.
If (instead of defining the Timer type in my custom schema) I create a Timer type using addContentType and add the metadata fields using addSchemaField, I have two problems:

It is unclear to me how to use to the custom metadata types from my schema. Unless I got it wrong, it seems the createSchema callback is executed after the loadSource callback while I need to reference types from createSchema within loadSource.
It is unclear to me how the custom metadata types in my schema can link to other Timers.

One solution that would be convenient for me is if I could keep my custom schema and manually make the Timer type an instance of a NodeInterface. Gridsome could provide NodeInterface among the data passed to the createSchema callback.

We are going to create APIs for doing this in Gridsome 0.7 :)

You can also look into schema stitching to use your existing GraphQL schema with Gridsome. Here is a gist which shows how it works:
https://gist.github.com/jakedohm/e5736245f35e9b32b29733b2dd37d2c1


Traversing through example/images

Hi,
I am having an issue with the static folder. I want the directory to be as such:
example
--> images
------------> 1
-------------------> image1.jpg
-------------------> image2.jpg
------------> 2
------------> 3
Therefore, how do I use the app.py and pager.py to traverse through the directory, such that I can receive image1.jpg on the index 1, and be able to view image2.jpg with a button on the same html page.

(Bear in mind that I'm not an expert web developer)
So as I understand, you want to 'toggle' another image (image2.jpg) on the same page, but paginate per directories (1, 2, 3) with two images. I'd just do it with javascript:

load two images on the page (so there are two ) but hide the second by default
give the second image an id attribute, and add a button and make it hide/show this element using e.g., jquery toggle

Thank you. How would I be able to scale this such that it is not just two images, but thousands? I feel like using javascript for each  might be counterintuitive, so what would be another solution?

You want to show thousands of images on one page? I'm not sure why you want to do that, but lazy-loading jQuery/javascript libraries are perhaps useful. I don't have much experience here.
(FYI, if what you want is to paginate images in each subdirectories (1, 2, 3 ..), modifying this template's paths/pager should suffice.)


Class "App" is declared twice in code provided in Step #5 on "main.dart"

I ran into this and asked Gemini to review the code as well as the error messages from my terminal.
"App" is declared twice. Once at the top of main.dart and then at the bottom on lines 15,18, and 19 (at the top) and then again on lines 118 and 119 (at the bottom). Lines may vary given comments or other alterations, but in general, these are the locations in the document.
Fix: I just renamed the top class to "MyApp" on the top 3 lines which removes the errors and enables display of the project output to device. I'm suggesting the top class be renamed for the codelab.
Page that I'm looking at and the code is referenced: https://firebase.google.com/codelabs/firebase-get-to-know-flutter#4

The above works but the GoRouter does not. I've corrected the issue and was able to get the navigation to work properly throughout all states. Here is my final main.dart (with the second class inside the first) -
import 'package:firebase_ui_auth/firebase_ui_auth.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'app_state.dart';
import 'home_page.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(ChangeNotifierProvider(
create: (context) => ApplicationState(),
builder: (context, child) => const App(), // Use App as the root widget
));
}
class App extends StatelessWidget {
const App({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp.router(
title: 'Firebase Meetup',
theme: ThemeData(
buttonTheme: Theme.of(context).buttonTheme.copyWith(
highlightColor: Colors.deepPurple,
),
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
textTheme: GoogleFonts.robotoTextTheme(
Theme.of(context).textTheme,
),
visualDensity: VisualDensity.adaptivePlatformDensity,
useMaterial3: true,
),
routerConfig: _router, // Use routerConfig to integrate GoRouter
);
}
}
// Add GoRouter configuration outside the App class
final _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
routes: [
GoRoute(
path: 'sign-in',
builder: (context, state) {
return SignInScreen(
actions: [
ForgotPasswordAction((context, email) {
final uri = Uri(
path: '/sign-in/forgot-password',
queryParameters: <String, String?>{
'email': email,
},
);
context.push(uri.toString());
}),
AuthStateChangeAction((context, state) {
final user = switch (state) {
SignedIn state => state.user,
UserCreated state => state.credential.user,
_ => null
};
if (user == null) {
return;
}
if (state is UserCreated) {
user.updateDisplayName(user.email!.split('@')[0]);
}
if (!user.emailVerified) {
user.sendEmailVerification();
const snackBar = SnackBar(
content: Text(
'Please check your email to verify your email address'));
ScaffoldMessenger.of(context).showSnackBar(snackBar);
}
context.pushReplacement('/');
}),
],
);
},
routes: [
GoRoute(
path: 'forgot-password',
builder: (context, state) {
final arguments = state.uri.queryParameters;
return ForgotPasswordScreen(
email: arguments['email'],
headerMaxExtent: 200,
);
},
),
],
),
GoRoute(
path: 'profile',
builder: (context, state) {
return ProfileScreen(
providers: const [],
actions: [
SignedOutAction((context) {
context.pushReplacement('/');
}),
],
);
},
),
],
),
],
);

I don't think I follow. In the source code, App isn't declared twice.  Can you tell me more about what's going on?


Added new lesson for poolboy

New lesson for poolboy.

Awesome work @ayayalar!  Thank you very much, I'm going to look this over today and get back to you with feedback.

Sounds great! Thank you Sean!
From: Sean Callan<EMAIL_ADDRESS>Sent: Thursday, October 6, 2016 8:04 AM
To: doomspork/elixir-school<EMAIL_ADDRESS>Cc: Arif Yayalar<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [doomspork/elixir-school] Added new lesson for poolboy (#702)
Awesome work @ayayalar https://github.com/ayayalar ! Thank you very much, I'm going to look this over today and get back to you with feedback.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/doomspork/elixir-school/pull/702#issuecomment-251990340 , or mute the thread https://github.com/notifications/unsubscribe-auth/AAH8k1C3SehPaZzweXfc5PERlv8oENSaks5qxQ3TgaJpZM4KPggw .  https://github.com/notifications/beacon/AAH8kwwjGSbRemQkkVJ1xoPrxaBcGTUXks5qxQ3TgaJpZM4KPggw.gif

With the code example I've provided, I was hoping to communicate how poolboy limits unbounded concurrency so that the system doesn't get effected negatively. You think it didn't communicate it well enough?

I'm a poolboy novice, and just worked through this and it was really fun!!
To be honest, I'm still unclear what's going on and how I can use this in the wild. Can we get a section explaining use cases for Poolboy and when to implement it? maybe something else but a test?

@ayayalar this is great!  Thanks again for taking the initiative.  I do agree with @pjhampton that we could use a section that gives an overview of poolboy and some of it's use cases, perhaps either an Introduction or  Use cases section?
I don't think it needs to be anything extensive but covering the basic concepts about pools and why we might want something like this would be helpful for those less familiar with the ideas.

Hey guys,
I will remove the options. Yes we don't need it. I will also add a section for use cases!
On Sat, Oct 8, 2016 at 2:47 PM -0700, "PJ Hampton"<EMAIL_ADDRESS>wrote:
@pjhampton commented on this pull request.
In lessons/specifics/poolboy.md:

+For this example, we'll create a pool of workers that are responsible for handling requests to calculate the square root of a number. We'll keep the example simple so that we can keep our focus on Poolboy.
+
+Let's define the Poolboy configuration options and add it as a child worker as part of our application start.
+
+```elixir
+defmodule PoolboyApp do

use Application

defp poolboy_config do
options = [

 {:name, {:local, :worker}},

 {:worker_module, Worker},

 {:size, 5},

 {:max_overflow, 1}

]

Well spotted @doomspork
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

still a roughcut but what do you think about this?
Why should use Poolboy?
Let's think of a specific example for a moment. You are tasked to build an application for saving user profile information to the database. If you create a process for every user registration, you will end up with unbounded number of connections to your database. And at some point those connections will start competing for the limited resources available in your database server. Eventually you will notice timeouts, or various exceptions due to the overhead from that contention.
The solution to this problem is using set of workers to limit the number of connections to the database instead of spawning a process for every user registration. Then you can easily avoid running out of your system resources. And that's where Poolboy comes in. It can create pool of workers without you need to create and manage it manually.

@ayayalar I like this as a start. It is also a really common application. We can even add a mention of this which is what power's Postgrex's connection pool, which in turn is what is leveraged by Ecto when using psql.

Take two :)
Let's think of a specific example for a moment. You are tasked to build an application for saving user profile information to the database. If you create a process for every user registration, you will end up with unbounded number of connections to your database. And at some point those connections will start competing for the limited resources available in your database server. Eventually you will notice timeouts, and various exceptions due to the overhead from that contention.
The solution to this problem is using set of workers (processes) to limit the number of connections instead of spawning a process for every user registration. Then you can easily avoid running out of your system resources.
That's where Poolboy comes in. It creates a pool of workers managed by a Supervisor without an effort on your part to create and manage it manually. Matter of fact there are many libraries use Poolboy under the covers. For example; Postgrex's connection pool (which in turn leveraged by Ecto when using psql), redis_poolex (Redis connection pool) are some of the popular libraries use Poolboy.

Added new section "Why should you use Poolboy?"

BTW, before the final review please squash all the commits.
Thanks for the new tutorial, @ayayalar !

Squashed all commits

@ayayalar we've decided to move forward with lessons for select libraries with Poolboy being one of them.  Would you please update the meta data for the lesson to reflect the following:
---
layout: page
title: Poolboy
category: libraries
order: 2
lang: en
---

hey @doomspork sounds great! Let me make the changes.

I've created PR #833. This branch got too much going on after merging upstream. I think we should close this PR and merge #833 instead.

Thanks @ayayalar, closing 👍