text:
wagtail.contrib.forms causes database issues

Issue Summary
Using wagtail.contrib.forms seems to interact with the database in unprecedented ways and by that blocks certain command flows.
I use django-extensions' reset_db command and migrate in a custom management command called bootstrap. It looks something along the lines of the following:
class Command(BaseCommand):

    def handle(self, *args, **options):
            call_command('reset_db', noinput=True, interactive=False)
            self.stdout.write(
                self.style.SUCCESS('Successfully reset database.'))

        call_command('migrate')
        self.stdout.write(self.style.SUCCESS('Successfully ran migrations.'))

As soon as I started using the forms app this failed with either:
/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 413, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: Problem installing fixture '...': Could not load auth.User(pk=1): attempt to write a readonly database

for the local SQLite database or
File "/usr/local/lib/python3.7/site-packages/django_extensions/management/commands/reset_db.py", line 175, in handle
remote:            cursor.execute(drop_query)
remote:        psycopg2.errors.ObjectInUse: database "db_test_ftb_jansen_de" is being accessed by other users
remote:        DETAIL:  There is 1 other session using the database.

for the production PostgreSQL database and I couldn't figure out why. Though disabling the wagtail.contrib.forms app (and my custom ones that were relying on it) made the issue disappear.
When debugging today I found out that the culprit is here:
https://github.com/wagtail/wagtail/blob/30b90a0f6563d0aa385f9b717f67a489450c377d/wagtail/contrib/forms/models.py#L166-L174
Overriding AbstractFormField._migrate_legacy_clean_name like so
@classmethod
    def _migrate_legacy_clean_name(cls):
        return None

also makes the issue disappear.
I know that is a very special case but since I spent some time debugging this I wanted to see if there is a more sophisticated fix or even one that can be made upstream?

Hi @matthiasrohmer,
Presumably this is happening because the system check in wagtail.contrib.forms is performing a database operation, and postgres/sqlite won't let you drop the database once the running command has made a connection to it. If so, I think the solution would be to set requires_system_checks = False on your command class.
This does raise the question of whether Wagtail is breaking a Django convention or policy by making a database connection inside a system check... I'm not aware of any rule against it, but if there is one, then I'd be open to reviewing this and looking for alternative ways of making this system check work.

I'm not saying this should or shouldn't be changed, just adding my 2 cents: I'm running into a similar problem, I can work around it but it feels a bit wrong.
My scenario: when running python manage.py makemigrations I normally switch to the Dummy database: this prevents issues under certain conditions in my setup, and makemigrations is completely database-independent so it shouldn't matter. Except that now Wagtail tries to use the DB which triggers a crash.
Because I use Django's standard management command I can't actually use requires_system_checks = False. I'll switch to SQLite for now.
$ python manage.py makemigrations

Traceback (most recent call last):
  File "/x/y/project-with-wagtail/website/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/core/management/base.py", line 393, in execute
    self.check()
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/core/management/base.py", line 419, in check
    all_issues = checks.run_checks(
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/core/checks/registry.py", line 76, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/core/checks/model_checks.py", line 34, in check_all_models
    errors.extend(model.check(**kwargs))
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/wagtail/contrib/forms/models.py", line 170, in check
    messages = cls._migrate_legacy_clean_name()
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/wagtail/contrib/forms/models.py", line 143, in _migrate_legacy_clean_name
    if objects.count() == 0:
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/models/query.py", line 412, in count
    return self.query.get_count(using=self.db)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/models/sql/query.py", line 519, in get_count
    number = obj.get_aggregation(using, ['__count'])['__count']
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/models/sql/query.py", line 504, in get_aggregation
    result = compiler.execute_sql(SINGLE)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1162, in execute_sql
    sql, params = self.as_sql()
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 527, in as_sql
    from_, f_params = self.get_from_clause()
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 806, in get_from_clause
    clause_sql, clause_params = self.compile(from_clause)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 445, in compile
    sql, params = node.as_sql(self, self.connection)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/models/sql/datastructures.py", line 168, in as_sql
    base_sql = compiler.quote_name_unless_alias(self.table_name)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 436, in quote_name_unless_alias
    r = self.connection.ops.quote_name(name)
  File "/x/y/project-with-wagtail/virtual/lib/python3.8/site-packages/django/db/backends/dummy/base.py", line 20, in complain
    raise ImproperlyConfigured("settings.DATABASES is improperly configured. "
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

authors: gasman matthiasrohmer quinox


text:
Fix mis-formatted treebeard link in docs/reference/pages/model_reference.md

Fixes a mis-formatted link in docs/reference/pages/model_reference.md which wasn't migrated correctly from RST to MD.
Please check the following:

[x] Do the tests still pass?[^1]
[x] Does the code comply with the style guide?

[x] Run make lint from the Wagtail root.

[ ] For Python changes: Have you added tests to cover the new/fixed behaviour?
[ ] For front-end changes: Did you test on all of Wagtail’s supported environments?[^2]

[ ] Please list the exact browser and operating system versions you tested:
[ ] Please list which assistive technologies [^3] you tested:

[ ] For new features: Has the documentation been updated accordingly?

Please describe additional details for testing this change.
Old:

New:

[^1]: Development Testing
[^2]: Browser and device support
[^3]: Accessibility Target

Thanks @dkirkham !

source: gharchive/pull-request

authors: dkirkham lb-

repo: wagtail/wagtail

license_type: permissive

license_source: github-api


text:
Concurrent editing notifications - add is_editing flag and recently-saved revision IDs to ping endpoint

Implements #12079 and #12080

Superseded by #12109.

authors: gasman laymonage


text:
Prevent duplicate nested streamblocks to have duplicated UUIDs - Fix #7712

Fix #7712
Description
When duplicating a block in a StreamField, nested StreamBlock UUIDs remain.
This change removes the UUIDs from nested blocks so that they are generated server-side on Page's save.
This is still a work in progress as I am not sure if I made this change in the right place. Once I get confirmation that this properly fixes the issue, I will add some tests.
TODO

[x] Add a description
[ ] Write tests

Thanks a lot for your review/insight @gasman !
I will look into this, and try to get a better understanding of current StreamField frontend architecture before pushing new changes.

@jacobtoppm FWIW, I think the existing version of this code does the same thing - see the childState.id = null; line that's been removed here. Looks like bd606ab15cc847fec2d1666bbd9a87350192a7ee added client-side UUID generation, but only did it for insertions (or maybe I'm reading the code wrong, and _getChildDataForInsertion does actually get called on duplication further down the line).

@gasman Good point! Clearly something we missed. But if we're revisiting this point, I would suggest doing client side id generation for duplication as well.

Closing as it was fixed in #9108

authors: fabienheureux gasman jacobtoppm


text:
Action

this will install the package properly before running the tests

this alone is helpful for testing, to ensure the package does indeed install correctly
it's always safe to first update pip
adding the ".[dev]" installs the "dev" dependencies as well, which are needed for testing

pip will pull the list of these from pyproject.toml
depending on the OS, you don't need the quotes around ".[dev]". On my machine, with Bash, you don't need them. But it's probably safe to just keep the quotes so you don't need to worry about it.

remove the comment at top of file which I had accidentally copied from another GH Action

rename Action "Test and Deploy"

please note I did not bump the version

Please make pytest explicitly use the tests/ directory.

efb96cd28a49f2b697d6bad54e4636baf376e36a

repo: waifuvault/waifuVault-python-api

license: MIT


text:
🛑 cyconet.org is down

In c1e9fbb, cyconet.org (https://www.cyconet.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: cyconet.org is back up in 00f797b after 2 hours, 54 minutes.

source: gharchive/issue

repo: waja/cyconet-upptime


text:
🛑 Portainer platform is down

In ab51a43, Portainer platform (https://$CONTAINER_HOST/ui/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Portainer platform is back up in ed7c57c after 8 minutes.


text:
Comparing go-waku vs nwaku performance under different traffic load

Here are the results of comparing nwaku vs gowaku performance under different traffic load in a network with the following characteristics:

Simulation ran using waku-simulator using this branch
50 nwaku nodes with statusteam/nim-waku:v0.18.0-rc.0
50 gowaku nodes with statusteam/go-waku:v0.7.0
Just relay protocol is enabled and discv5 is enabled
Connected peers per node and rx messages/size are shown to ensure the experiment is valid.
Different traffic loads:

scenario1 rate: 10msg/second, size_per_msg: 1kB = 10kB/s
scenario2 rate: 10msg/second, size_per_msg: 5kB = 50kB/s
scenario3 rate: 30msg/second, size_per_msg: 3kB = 90kB/s
scenario4 rate: 30msg/second, size_per_msg: 6kB = 180kB/s
scenario5 rate: 100msg/second, size_per_msg: 3kB = 300kB/s
scenario6 rate: 10msg/second, size_per_msg: 50kB = 500kB/s

Legend is.

🔵 nwaku
🔴 gowaku

scenario1
10msg/second, size_per_msg: 1kB = 10kB/s

All nwaku nodes consume less in and out bandwidth.
All gowaku nodes consumes more cpu and more memory

scenario2
scenario2 rate: 10msg/second, size_per_msg: 5kB = 50kB/s

nwaku nodes consume more in traffic. Quite interesting since in the previous scenario it was the opposite
gowaku consumes more cpu and memory but remains stable. nwaku memory increased a bit compared to previous scenario.

scenario3
scenario3 rate: 30msg/second, size_per_msg: 3kB = 90kB/s

nwaku consumes more in bandwidth. gowaku consumes more out bandwidth, 6 times more.
nwaku and go waku cpu consumption gets closer
nwaku memory increases with respect to previou scenario but still less than gowaku.

scenario4
scenario4 rate: 30msg/second, size_per_msg: 6kB = 180kB/s

similar to previous scenario

scenario5
scenario5 rate: 100msg/second, size_per_msg: 3kB = 300kB/s

nwaku nodes consume more in bandwidth, 4x times more
go waku consumes ore out bandwidth, 4x more.
nwaku consumes now more cpu and memory than go waku.
messages per second fluctuate a lot. There might be some messages lost. Note that in this simulation we are not measuring amout of dropped messages.

scenario6
scenario6 rate: 10msg/second, size_per_msg: 50kB = 500kB/s

similar patterns in in/out bandwidth as previous scenarios
nwaku consumes way more cpu and memoru than gowaku
some issues with the connections, both nwaku and gowaku amount of connections dropped every now and then. Unsure if its related to nwaku or gowaku.

overview
All the previous 6 scenarios in one plot.

conclusions

With low traffic load, up to 200 kB/s injected in the network, nwaku perform better than gowaku in terms of cpu and memory usage.
We can observe huge differences in the in/out bandwdith consumed by nwaku and gowaku, which can't explain. Both metrics were taken from cadvisor (which should count all traffic in/out of the node). The metrics are container_network_receive_bytes_total for in and container_network_transmit_bytes_total for out.
With traffic loads of more than 300 kB/s, gowaku performs better than nwaku in terms of cpu and memory. gowaku also shows a more stable memory consumption.
In some cases with high traffic load (>300kB/s) we can observe some drops in the amount of connected peers.

These are very useful simulations. Thanks!
Some initial comments:
(1) I think this was commented elsewhere, but nwaku's in seems to be mainly determined by go-waku's out and vice versa.
(2) huge increase in nwaku memory usage at high rates possibly related to send queues. In any case, a good reminder to see if we can improve when and how often garbage collection is triggered.
Great work.

Thanks! Will redo the experiment once https://github.com/waku-org/go-waku/pull/590 is merged. This seems to fix the issues causing gowaku to use a lot of bandwidth (seems it wasnt related to gossipsub). With this fix in place comparing nwaku/gowaku should be more fair.

authors: alrevuelta jm-clius

repo: waku-org/research


text:
关于client_id服务重启后重置

你好，每次restart或者reload 服务，client_id都会从00000001 开始重新开始，能否有办法让client_id生成类似uuid的永久不会重复的id呢？即使服务重启也不会重复

看了这个issue：https://github.com/walkor/Workerman/issues/286，创建了新类，继承了GatewayWorker\Gateway类，自定义了这个方法gateway::generateConnectionId，但是不知道这个新类该如何使用？请指点一下

将gatewayworker/src/Lib/Context.php 里 addressToClientId 和 clientIdToAddress 替换。这样就加了一个时间戳前缀，避免重启后client_id冲突
    /**
     * 通讯地址到 client_id 的转换
     *
     * @param int $local_ip
     * @param int $local_port
     * @param int $connection_id
     * @return string
     */
    public static function addressToClientId($local_ip, $local_port, $connection_id)
    {
        return bin2hex(pack('NNnN', time(), $local_ip, $local_port, $connection_id));
    }

    /**
     * client_id 到通讯地址的转换
     *
     * @param string $client_id
     * @return array
     * @throws Exception
     */
    public static function clientIdToAddress($client_id)
    {
        if (strlen($client_id) !== 28) {
            echo new Exception("client_id $client_id is invalid");
            return false;
        }
        return unpack('Ntime/Nlocal_ip/nlocal_port/Nconnection_id', pack('H*', $client_id));
    }

测试了可用，非常谢谢～，我在GatewayClient\Gateway里也做了一样处理。不过这样修改源码不方便升级

将gatewayworker/src/Lib/Context.php 里 addressToClientId 和 clientIdToAddress 替换成如下代码。这样就加了一个时间戳前缀，避免重启后client_id冲突
    /**
     * 通讯地址到 client_id 的转换
     *
     * @param int $local_ip
     * @param int $local_port
     * @param int $connection_id
     * @return string
     */
    public static function addressToClientId($local_ip, $local_port, $connection_id)
    {
        return bin2hex(pack('NNnN', time(), $local_ip, $local_port, $connection_id));
    }

    /**
     * client_id 到通讯地址的转换
     *
     * @param string $client_id
     * @return array
     * @throws Exception
     */
    public static function clientIdToAddress($client_id)
    {
        if (strlen($client_id) !== 28) {
            echo new Exception("client_id $client_id is invalid");
            return false;
        }
        return unpack('Ntime/Nlocal_ip/nlocal_port/Nconnection_id', pack('H*', $client_id));
    }

替换了之后有个问题，同一设备上下线的时候client_id不一致了
比如
onConnect时client_id是613f033d7f0000010b5400000001
onClose时client_id是613f035b7f0000010b5400000001
这是为何？

将gatewayworker/src/Lib/Context.php 里 addressToClientId 和 clientIdToAddress 替换成如下代码。这样就加了一个时间戳前缀，避免重启后client_id冲突
    /**
     * 通讯地址到 client_id 的转换
     *
     * @param int $local_ip
     * @param int $local_port
     * @param int $connection_id
     * @return string
     */
    public static function addressToClientId($local_ip, $local_port, $connection_id)
    {
        return bin2hex(pack('NNnN', time(), $local_ip, $local_port, $connection_id));
    }

    /**
     * client_id 到通讯地址的转换
     *
     * @param string $client_id
     * @return array
     * @throws Exception
     */
    public static function clientIdToAddress($client_id)
    {
        if (strlen($client_id) !== 28) {
            echo new Exception("client_id $client_id is invalid");
            return false;
        }
        return unpack('Ntime/Nlocal_ip/nlocal_port/Nconnection_id', pack('H*', $client_id));
    }

替换了之后会出现client_id混乱，onConnect/onMessage/onClose会出现三个不同的client_id
比如
onConnect时，client_id=613f0a567f0000010b5400000001
onMessage时，client_id=613f0a7f7f0000010b5400000001
onClose时，client_id=613f0a997f0000010b5400000001
这是为何？

return bin2hex(pack('NNnN', time(), $local_ip, $local_port, $connection_id));

改成
if (!$this->time) {
    $this->time = time();
}
return bin2hex(pack('NNnN', $this->time, $local_ip, $local_port, $connection_id));

试下。
时间戳应该是个定值，只有进程重启了才能变化。

非常感谢回复！可以了！

authors: 7iv walkor wzfjesun

repo: walkor/GatewayWorker

license: mit

license_source: bigquery


text:
Plugin Version for Kibana 6.8.0

Could you please confirm if there will be a release compatible with Kibana v6.8.0

Hey! Just released v6.8.0 you can find the download here: https://github.com/walterra/kibana-milestones-vis/releases/tag/v6.8.0
Let me know if it works for you! Would also love to learn about your use case, if you're willing to share, let's catch up on via twitter.com/walterra

@walterra I know I have requested you to provide version for 6.7.1, but by then we moved to 6.8.0. I have tested it and this works perfectly fine.
Thanks a lot.

authors: deadzg karnamonkster walterra

repo: walterra/kibana-milestones-vis


text:
Team table restructure and routing

Consolidated separate NHL, NFL, MLB, NBA tables into a unified Team table structure, implemented cohesive logic. Introduced product tags for teams and established corresponding routes. Conducted thorough testing to ensure proper functionality, including successful seeding of tables. Confirmed server connectivity and responsiveness of leagues and teams routes. Ready for a pull request.

Yes, that's all working and looks good.

I'd like to approve this, so far it's just letting me add a comment.  Green light from me.

authors: kwubbenhorst waltscode


text:
[Q] Error trace with Sweeps

I was wondering were we can obtain the error trace of the internal model with hyperoptim sweeps.
Right now all I get in logs and stdout is:
Run axtblwew errored: TypeError("'float' object is not subscriptable")
wandb: ERROR Run axtblwew errored: TypeError("'float' object is not subscriptable")

A line number or ideally a error backtrace would go a long way towards debugging complex models/configs.

Hey @GillesJ
Could you share your sweep.yaml file with us?
We will keep the better error loggin in mind, thanks for the ticket! 😄

I programmatically set the hyperparam config in the Python script as per this tutorial with layer-wise nested parameter settings:
layer_parameters = {f"layer_{i}-{i + 6}": {"min": 0.0, "max": 5e-5} for i in range(0, 24, 6)}

sweep_config = {
    "name": "layerwise-sweep-batch-16",
    "method": "bayes",
    "metric": {"name": "f1_macro", "goal": "maximize"},
    "parameters": {
        "num_train_epochs": {"min": 1, "max": 40},
        "params_classifier.dense.weight": {"min": 0, "max": 1e-3},
        "params_classifier.dense.bias": {"min": 0, "max": 1e-3},
        "params_classifier.out_proj.weight": {"min": 0, "max": 1e-3},
        "params_classifier.out_proj.bias": {"min": 0, "max": 1e-3},
        **layer_parameters,
    },
    "early_terminate": {"type": "hyperband", "min_iter": 6,},
}

sweep_id = wandb.sweep(sweep_config, project="Hyperparameter Optimization")

"params_classifier.dense.weight": {"min": 0, "max": 1e-3},
"params_classifier.dense.bias": {"min": 0, "max": 1e-3},
"params_classifier.out_proj.weight": {"min": 0, "max": 1e-3},
"params_classifier.out_proj.bias": {"min": 0, "max": 1e-3},

My guesses are the keys with the . are not well handled as parameter names. We automatically flatten nested parameters, so if you pass us a dictionary we will turn it into a dot-separated name. If we have dot-seperated names there is a clash of conflicts.
Could you check to change these keys and report back, please?

Changed the names to not include '.' but got the same error.
I have confirmed that the train() methods works just fine though, so the error is somewhere in the wandb sweep handling.
pdb and pycharm interactive debuggers don't seem to work when using wand.agent so it's difficult to figure out what's going on.

Could you share a colab for us to reproduce this error?

Thanks for your responses. I don't have colab notebooks set up and I currently can not spare the time. Code used is from this tutorial.

@GillesJ : I'm having exactly the same issue, after following the same tutorial. Could you figure out what was going wrong?
@ariG23498: I don't have any dots in the parameters... please, see below.
sweep_config = {
"name": "trial 1",
"method": "bayes",
"metric": {"name": "accuracy", "goal": "maximize"},
"parameters": {
"num_train_epochs": {"min": 3, "max": 20},
"learning_rate": {"min":0, "max": 0.1},
},
"early_terminate": {"type": "hyperband", "min_iter": 6,}
}
Many thanks to both of you for your time!

hi @NaRuecker,
I believe this is due to your mixing of float and int types in learning_rate,
Please try changing
{"min":0, "max": 0.1} -> {"min":0.0, "max": 0.1}
Does that fix the issue?

@dannygoldstein : Great catch, but unfortunately same error.

Working on integrating wandb into another codebase now and the lack of default python stack trace makes development really difficult. The original question remains unanswered as focus shifted towards specific issues, but I still want to know:
How can I get logging or wandb to print/log the default interpreter stack trace on error, especially with context/line number for improved debugging?

authors: GillesJ NaRuecker ariG23498 dannygoldstein

repo: wandb/client


text:
codis集群的proxy全部挂掉

凌晨2点，业务最低峰的时候，线上一个codis集群的所有代理全部挂掉，帮忙定位一下是啥原因，非常感谢。下面是proxy和zk的日志：
proxy的日志：
2015/10/12 01:59:30 router.go:437: [fatal] suicide {Id:codis-proxy_52 Addr:localhost.localdomain:19000 LastEvent: LastEventTs:0 State:online Description: DebugVarAddr:localhost.localdomain:11000}
zk的日志：
2015-10-12 01:59:30,091 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /10.10.32.10:8677
2015-10-12 01:59:30,091 [myid:1] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@793] - Connection request from old client /10.10.32.10:8677; will be dropped if server is
in r-o mode
2015-10-12 01:59:30,091 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@839] - Client attempting to establish new session at /10.10.32.10:8677
2015-10-12 01:59:30,114 [myid:1] - INFO  [CommitProcessor:1:ZooKeeperServer@595] - Established session 0x14c0dad0972ae7f with negotiated timeout 30000 for client /10.10.32.10:8677
2015-10-12 01:59:30,159 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1001] - Closed socket connection for client /10.10.32.10:8677 which had sessionid 0x14c0dad
0972ae7f
2015-10-12 01:59:30,486 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /10.10.32.17:13740
2015-10-12 01:59:30,486 [myid:1] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@793] - Connection request from old client /10.10.32.17:13740; will be dropped if server i
s in r-o mode
2015-10-12 01:59:30,486 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@839] - Client attempting to establish new session at /10.10.32.17:13740
2015-10-12 01:59:30,503 [myid:1] - INFO  [CommitProcessor:1:ZooKeeperServer@595] - Established session 0x14c0dad0972ae80 with negotiated timeout 30000 for client /10.10.32.17:13740
2015-10-12 01:59:30,504 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /10.10.32.17:13741
2015-10-12 01:59:30,504 [myid:1] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@793] - Connection request from old client /10.10.32.17:13741; will be dropped if server i
s in r-o mode
2015-10-12 01:59:30,504 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@839] - Client attempting to establish new session at /10.10.32.17:13741
2015-10-12 01:59:30,521 [myid:1] - INFO  [CommitProcessor:1:ZooKeeperServer@595] - Established session 0x14c0dad0972ae81 with negotiated timeout 30000 for client /10.10.32.17:13741
2015-10-12 01:59:30,550 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1001] - Closed socket connection for client /10.10.32.17:13740 which had sessionid 0x14c0da
d0972ae80
2015-10-12 01:59:30,569 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1001] - Closed socket connection for client /10.10.32.17:13741 which had sessionid 0x14c0da
d0972ae81

关注

zk的log意义不大，proxy又更完整的log吗

另外如之前在其他issue说的，升级到最新版的话可以用外部脚本/程序来监控proxy的进程，一旦退出就自动重启。

proxy整个日志内容都是新建连接和断开连接的内容，没有其他信息，所有我只贴了 报错信息，同一个集群不能同时存在不同版本的proxy吧，我之前搞 过，一个集群两个不同版本的proxy，proxy会挂掉

挂掉应该不是因为版本不同是有其他问题

authors: navyaijm yangzhe1991 ztskycn

repo: wandoulabs/codis


text:
编辑区 z-index 默认值太大

目前的值是10000，然后我的modal就被挡住了，无法交互。如图：

也许可以能弄成可配置的？

本周末发布新版，增加这块的可配置，请关注新版本发布的动态

已解决


text:
Light and sensor

Hello,
First I'd like to thank you for this plugin, it's awesome.
I just don't have a light on my garage and don't know how to not use this functionality.
Plus I don't have yet sensors the door and would like to send the state close or open only after sending the correspond command, because right now it is always detected as open.
If you could help me, thank you and thank you for the plugin.
Regards

First I'd like to thank you for this plugin, it's awesome.

Thank you.

I just don't have a light on my garage and don't know how to not use this functionality.

Remove the lightName field from your HomeBridge config:
"lightName": "Garage Light",

Plus I don't have yet sensors the door and would like to send the state close or open only after sending the correspond command, because right now it is always detected as open.

Remove the doorState fields from your HomeBridge config:
"doorStateMethod": "GET",
"doorStateUrl": "/controller/door/status",
"doorStateField": "door-state",

...also, set the doorOperationSeconds field to the number of seconds it takes for your door to open/close (to simulate the door opening/closing in HomeKit):
"doorOperationSeconds": 0,

Thank you for your fast response, however I now get a "not supported" message into the home app.
Here is a copy of my config.json, note that I use your Arduino programme into my esp8266.
{
"accessory": "HttpGarageDoorController",
"name": "Portail",
"doorOperationSeconds": 20,
"httpHost": "192.168.0.76",
"httpPort": 80,
"httpSsl": false,
"httpStatusPollMilliseconds": 4000,
"httpRequestTimeoutMilliseconds": 10000,
"httpHeaderName": "X-API-Key",
"httpHeaderValue": "MyAPIKey",
"oauthAuthentication": true,
"oauthSignatureMethod": "HMAC-SHA1",
"oauthConsumerKey": "username",
"oauthConsumerSecret": "pass",
"oauthToken": "MyOAuthToken",
"oauthTokenSecret": "MyOAuthTokenSecret",
"apiConfig": {
"apiConfig": {
"apiType": "Generic",
"doorSuccessField": "success",
"doorOpenMethod": "PUT",
"doorOpenUrl": "/controller/door/open",
"doorCloseMethod": "PUT",
"doorCloseUrl": "/controller/door/close"
}
}
Thank you

authors: AxoIIpaoli washcroft


text:
Initialize ABI functions lazily

regexp provides a large API to satisfy many use cases, but code will commonly only exercise a small portion of the surface, meaning only a small portion of our wazero ABI. Because each initialized function costs a relatively expensive call stack, we can reduce memory usage for such cases by initializing as needed. Even if all of the ABI is exercised, the negative performance impact should not be significant given we already have a mutex guarding, so there is no extra safety needed and it's a simple check.
After
goos: darwin
goarch: arm64
pkg: github.com/wasilibs/go-re2
BenchmarkCompile
BenchmarkCompile/Onepass
BenchmarkCompile/Onepass-10         	   18510	     61832 ns/op	  296924 B/op	      88 allocs/op
BenchmarkCompile/Medium
BenchmarkCompile/Medium-10          	   14674	     79494 ns/op	  296926 B/op	      88 allocs/op
BenchmarkCompile/Hard
BenchmarkCompile/Hard-10            	    3724	    317359 ns/op	  296882 B/op	      88 allocs/op
PASS

Before
goos: darwin
goarch: arm64
pkg: github.com/wasilibs/go-re2
BenchmarkCompile
BenchmarkCompile/Onepass
BenchmarkCompile/Onepass-10         	   16719	     68467 ns/op	  352925 B/op	     122 allocs/op
BenchmarkCompile/Medium
BenchmarkCompile/Medium-10          	   13615	     86617 ns/op	  352925 B/op	     121 allocs/op
BenchmarkCompile/Hard
BenchmarkCompile/Hard-10            	    3567	    324546 ns/op	  352930 B/op	     122 allocs/op
PASS

https://github.com/wasilibs/go-re2/pull/43

authors: anuraaga mathetake


text:
Merge with upstream

This patch pulls in the latest changes from upstream. In particular, the latest release of wasm-tools, which includes the upstreamed stack-switching feature.
@frank-emrich, I think after merging this patch, that binaryen will be broken, as it is currently using the old binary format.

Interesting.. I cannot observe the failure:
Running `target/debug/wasmtime wast -W=exceptions,function-references,stack-switching tests/misc_testsuite/stack-switching/cont_twice.wast`
Error: failed to run script file 'tests/misc_testsuite/stack-switching/cont_twice.wast'

Caused by:
    0: failed directive on tests/misc_testsuite/stack-switching/cont_twice.wast:15:1
    1: expected 'continuation already consumed', got 'error while executing at wasm backtrace:
           0:   0x46 - <unknown>!<wasm function 1>

       Caused by:
           wasm trap: triggered debug assertion'

On my machine. The trap encoding has been revamped such that trap codes are byte encoded. There is probably some machine-specific bug here, which manifests on the CI machine.

Interesting.. I cannot observe the failure on my own machine:
Running `target/debug/wasmtime wast -W=exceptions,function-references,stack-switching tests/misc_testsuite/stack-switching/cont_twice.wast`
Error: failed to run script file 'tests/misc_testsuite/stack-switching/cont_twice.wast'

Caused by:
    0: failed directive on tests/misc_testsuite/stack-switching/cont_twice.wast:15:1
    1: expected 'continuation already consumed', got 'error while executing at wasm backtrace:
           0:   0x46 - <unknown>!<wasm function 1>

       Caused by:
           wasm trap: triggered debug assertion'

On my machine. The trap encoding has been revamped such that trap codes are byte encoded. There is probably some machine-specific bug here, which manifests on the CI machine.

I think I understand it now. The test is supposed to fail, but the CI expects it to fail with code 132. After the revamp of the trap encoding, it seems the new exit code is 1.

@frank-emrich I think I will redo this merge, as the whole fiber interface has changed. There are a few intricacies...

I would appreciate that, I'm concerned that too many changes will get lost in, say, the noise from some files also being moved. May I recommend the following, if it's not too much work:

Merge everything up to and including ec3b2d2 (i.e., the last commit before Alex updated wasm-tools) in one PR. This should hopefully be simple.
Afterwards, merge with 6844ed1 (i.e., the commit where Alex update wasm-tools) separately? This would involve all the work to use the upstream wasm-tools stack switching stuff.

Then after these two steps we can at some point merge with the actual upstream main.

Parts of the FiberStack has to be reengineered or the pooling allocator, which to me seems like a significant change.

Sadly it is not possible to split the PR :-( because of the trap encoding. To pass the testsuite I need the much later commit on encoding traps as a byte, because the a prior commit steals one of our encodings. There are 17 traps, but only 16 possible encodings...

authors: dhil frank-emrich

repo: wasmfx/wasmfxtime


text:
sqlite3 dependency error

I get the following error with trying to npm install waterline-sqlite3.
My node version is v7.9.0
My npm version is 4.5.0
I used yarn 0.22.0 to run the installation
My OS is Ubuntu 16.10
error Couldn't find a package.json file in "/home/jamrizzi/Contributions/trailpack-swagger/node_modules/waterline-sqlite3/node_modules/sqlite3/node_modules/node-pre-gyp"

I've seen this error occur with yarn and other packages as well. Can you try with npm?

I tried it with npm. Same error.

authors: jamrizzi tjwebb


text:
https fixes and a new feature

I needed a fix and a feature for my application, if you are interested in merging these I can squash the refactor and cosmetic changes to the appropriate commit.

Looks good to me. Can you remove .ruby-version? - It shouldn't be needed for gems.

Sorry, removed it. I added it to work around some local quirks.

@pigoz Thanks!

authors: pigoz waterlink

repo: waterlink/rack-reverse-proxy


text:
Build a RegEx for detecting left out comments

We want to detect left-out multi-line comments across major programming language. For example:
```typescript
const someFn = () => {
// const oldLeftoverVar = 10;
const x = 5;
return x;
}

A first step would be to simply build this RegEx. Then, I can build the complete logic to comment file diffs on the corresponding GitHub repo.

Deployed a version of this!

repo: watermelontools/watermelon


text:
Handle overwrite output response

hi,  i am trying to figure out how to overwrite the output in
middleware.after = function(message, conversationResponse, callback)
i tried to modify the last line to
conversationResponse.output.text = 'This is my custom output line';
however I'm guessing its read only as this causes it to crash. in previous lines i use  conversationResponse.output.text to obtain what the bot will say so i know its valid. it just won't let me overwrite it.
we plan on using a database to get custom responses. however I'm stuck trying to figure out how to overwrite the default output.
any help is appreciated.
thanks
Dion

APP/0Fatal TypeError: message.watsonData.output.text.join is not a functionFeb 13, 2017 8:49:13 AM
APP/0 at /home/vcap/app/node_modules/botkit/lib/CoreBot.js:866:32Feb 13, 2017 8:49:13 AM
APP/0 at Object.Botkit.botkit.trigger (/home/vcap/app/node_modules/botkit/lib/CoreBot.js:779:49)Feb 13, 2017 8:49:13 AM
APP/0 at Object. (/home/vcap/app/node_modules/botkit/lib/CoreBot.js:753:28)Feb 13, 2017 8:49:13 AM
APP/0 at /home/vcap/app/node_modules/botkit/node_modules/ware/node_modules/wrap-fn/index.js:121:18Feb 13, 2017 8:49:13 AM
APP/0 at next (/home/vcap/app/node_modules/botkit/node_modules/ware/lib/index.js:82:27)Feb 13, 2017 8:49:13 AM
APP/0 at /home/vcap/app/node_modules/botkit/lib/CoreBot.js:862:21Feb 13, 2017 8:49:13 AM
APP/0 at /home/vcap/app/node_modules/botkit-middleware-watson/lib/middleware/index.js:154:9Feb 13, 2017 8:49:13 AM
APP/0 at Promise._settlePromise (/home/vcap/app/node_modules/botkit-middleware-watson/node_modules/bluebird/js/release/promise.js:580:21)Feb 13, 2017 8:49:13 AM
APP/0 at Promise._settlePromises (/home/vcap/app/node_modules/botkit-middleware-watson/node_modules/bluebird/js/release/promise.js:691:18)Feb 13, 2017 8:49:13 AM
APP/0 at Promise._settlePromise0 (/home/vcap/app/node_modules/botkit-middleware-watson/node_modules/bluebird/js/release/promise.js:612:10)Feb 13, 2017 8:49:13 AM
APP/0 at Promise._settlePromiseFromHandler (/home/vcap/app/node_modules/botkit-middleware-watson/node_modules/bluebird/js/release/promise.js:510:31)Feb 13, 2017 8:49:13 AM
APP/0 at Object. (/home/vcap/app/bot-facebook.js:120:55)Feb 13, 2017 8:49:13 AM
APP/0 at Promise._fulfill (/home/vcap/app/node_modules/botkit-middleware-watson/node_modules/bluebird/js/release/promise.js:636:18)Feb 13, 2017 8:49:13 AM
APP/0 at tryCatcher (/home/vcap/app/node_modules/botkit-middleware-watson/node_modules/bluebird/js/release/util.js:16:23)Feb 13, 2017 8:49:13 AM
APP/0 at Object.bot.findConversation (/home/vcap/app/node_modules/botkit/lib/Facebook.js:103:13)Feb 13, 2017 8:49:13 AM
APP/0npm ERR! argv "/home/vcap/app/vendor/node/bin/node" "/home/vcap/app/vendor/node/bin/npm" "start"Feb 13, 2017 8:49:13 AM
APP/0npm ERR! Linux 4.4.0-45-genericFeb 13, 2017 8:49:13 AM
APP/0npm ERR! botkit-middleware-watson-multi-bot-example@0.0.1 start: node server.jsFeb 13, 2017 8:49:13 AM
APP/0npm ERR! node v4.7.2Feb 13, 2017 8:49:13 AM
APP/0npm ERR! code ELIFECYCLEFeb 13, 2017 8:49:13 AM
APP/0npm ERR! Exit status 2Feb 13, 2017 8:49:13 AM
APP/0npm ERR! Feb 13, 2017 8:49:13 AM
APP/0npm ERR! This is most likely a problem with the botkit-middleware-watson-multi-bot-example package,Feb 13, 2017 8:49:13 AM
APP/0npm ERR! npm v2.15.11Feb 13, 2017 8:49:13 AM
APP/0npm ERR! node server.jsFeb 13, 2017 8:49:13 AM
APP/0npm ERR! Tell the author that this fails on your system:Feb 13, 2017 8:49:13 AM
APP/0npm ERR! npm owner ls botkit-middleware-watson-multi-bot-exampleFeb 13, 2017 8:49:13 AM
APP/0npm ERR! not with npm itself.Feb 13, 2017 8:49:13 AM
APP/0npm ERR! npm bugs botkit-middleware-watson-multi-bot-exampleFeb 13, 2017 8:49:13 AM
APP/0npm ERR! There is likely additional logging output above.Feb 13, 2017 8:49:13 AM
APP/0npm ERR! Or if that isn't available, you can get their info via:Feb 13, 2017 8:49:13 AM
APP/0npm ERR! Feb 13, 2017 8:49:13 AM
APP/0npm ERR! Please include the following file with any support request:Feb 13, 2017 8:49:13 AM
APP/0npm ERR! /home/vcap/app/npm-debug.log

Hi,
The output must adhere to the format of Conversation Service's output, which is a list of Strings.
Also, unless you change the middleware.interpret's callback function, you don't have to change the output yourself. You just have to return the Conversation response object in the after function.
Let me know if you have more questions,
Steven

Hello People, sorry but i use this way to request some help to have votes for my idea here in my country to use Watson and the power of bluemix to help the tourism in my country. So, could you bring me your vote.
http://comunidad.socialab.com/ideas/ver/31815
Thanks a lot.


text:
chore(master): release 1.1.229

:robot: I have created a release beep boop
1.1.229 (2023-10-27)
Bug Fixes

deps: update dependency rfc4648 to v1.5.3 (e99b994)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/wayofdev/keywind/releases/tag/v1.1.229 :sunflower:

repo: wayofdev/keywind


text:
[BUG] systemd unit file is world inaccesible, creates log spam

Describe the bug
systemd complains about the wazuh-dashboard unit file being world unreadable. This spams the journal every couple of seconds with an entry like this:
Feb 11 05:07:10 XXXXXXX systemd[1]: Configuration file /etc/systemd/system/wazuh-dashboard.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.

To Reproduce
Steps to reproduce the behavior:

open journalctl -e, there should be a message every couple of seconds

Expected behavior
There is no such error message
OpenSearch Version
The one packaged with the wazuh-indexer v4.7.2
Dashboards Version
v4.7.2
Plugins
n/a
Screenshots
see above for the error message
Host/Environment (please complete the following information):

OS: RHEL 8
Install method: RPM (but also affects DEB)

Additional context
https://github.com/wazuh/wazuh-dashboard/blob/b24c15f198ed9c031ebf882061c245c83728a91b/dev-tools/build-packages/rpm/wazuh-dashboard.spec#L395
https://github.com/wazuh/wazuh-dashboard/blob/b24c15f198ed9c031ebf882061c245c83728a91b/dev-tools/build-packages/deb/debian/rules#L99

I'm experiencing the same issue.

I'm experiencing this issue as well.

authors: FuzNuts fernandogont leba-atr

repo: wazuh/wazuh-dashboard


text:
Disconnect and multi server issue

The bot will refuse to reconnect once it has been disconnected but it will still claim to be working
The bot also does not support playing music in mutiple servers at once and maintains the song it is playing from the previous server when jumping between them
overall its a good bot and i cant wait to see whats in store for it next

Hi. Thank you for taking your time and testing my bot. I'm aware of these issues and have already planned on fixing them in the next releases. Nether than less I'm very grateful for your feedback 🙂

Hi. Thank you for taking your time and testing my bot. I'm aware of these issues and have already planned on fixing them in the next releases. Nether than less I'm very grateful for your feedback 🙂

repo: wberdowski/Woofer


text:
fix: 3297 typo correction

#3297

thanks!

authors: checkomkar moklick

repo: wbkd/react-flow-docs


text:
Feat/lock

This PR contains a very small feature to allow users to lock the interaction, and eventually, unlock it with the nodes and edges.
It's used through a button on Controls plugin.
Notes:

The svg used where just for testing purposes and could be improved.
Following the README directions to start development lacks a step, that is installing the deps for the examples.
I've tried my best to follow the pattern for commit messages and branch names.

It's my first time contributing here, so please any changes to this PR will be applied immediatly.

This looks really good! Thanks for your work. Could you open the unlocked lock a little wider?

Thanks for the feedback!
I will move the button to the last vertical position and try my best to update this SVG.
Will keep you updated.

Icon is updated, svg manipulation is not my best skill.

Thanks again for your help :) It's merged now. We will do a new release in the next days

Amazing process!.
I am actively using the library so, I am actually writing a dev.to article about it.
So if you need anything else I will be happy to help!
Thanks and keep this excellent work.

Nice! Let us know when you publish the article :)

Will do

Hello, I have a question: How can I access this function (the lock) via code? I want to automatically trigger the lock button when another event happens.
Thank you!

authors: D-Niermann alvarezgarcia moklick raichuk

repo: wbkd/react-flow


text:
Redhat comp. Selinux. extra var.

Added compatibility with Redhat (centOS), also added SELinux for Redhat. Also added 1 variable (allow_writeable_chroot=YES) in the etc-vsftpd.conf.j2 template file.

Hi and thamks! I merged your RedHat support but refactored it so it's shorter and confirms with my other role's coding conventions. Please note that you might need to adapt your tags if you use them.
In order to be more flexible, I removed your hard coded sebooleans and added a variable called vsftpd_seboolean. so pleas do sth like:
...
vsftpd_seboolean:
   ftp_home_dir: yes
   ftpd_full_access: no
...

authors: franklinkim jonasVermassen

repo: weareinteractive/ansible-vsftpd


text:
Mysterious flush of underutilised chunks 1hr after ingester rollout

On the 15th of June:

On the 19th of June:

Both of these happened approximately one hour after an ingester upgrade in which chunks were successfully transferred from terminating ingesters. Chunk max idle is 1h, possibly related?
CC @tomwilkie any thoughts?

Do you know if these are spurious?  Or did 800k/3 timeseries stop being
written to?
On Mon, Jun 19, 2017 at 5:34 PM Adam Harrison notifications@github.com
wrote:

On the 15th of June:
[image: screenshot from 2017-06-19 17-23-20]
https://user-images.githubusercontent.com/1504438/27295498-13ea51d0-5515-11e7-8d8c-2de8b93238b2.png
On the 19th of June:
[image: screenshot from 2017-06-19 17-23-33]
https://user-images.githubusercontent.com/1504438/27295513-1ff314b2-5515-11e7-8fcd-2e25cbcdf091.png
Both of these happened approximately one hour after an ingester upgrades
in which chunks were successfully transferred from terminating ingesters.
Chunk max idle is 1h, possibly related?
CC @tomwilkie https://github.com/tomwilkie any thoughts?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/weaveworks/cortex/issues/467, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAbGhRfyCvo82TNSkCcmdJGS3qxnMfk2ks5sFqMvgaJpZM4N-e40
.

Oh - could those be series from metrics related to the ingesters which have now gone away?

Querying for {job="cortex/ingester"} returns only 1406 time series.

I assume this was part of a rolling upgrade of all of cortex?  What does count({job=~"cortex/.*"}) return?

9862, and no, in both cases it was just the ingester that was rolled out (in the first instance we had upgraded all of cortex but delayed the ingester whilst we understood #458, and in the second instance we only needed to do the ingester to deploy #460)

It's almost like the state reconstructed from transferred chunks in the new ingesters is not identical to that in the old, and so they are making different decisions about what should be flushed...

This is also happening on rolling reboots.

As @awh said, we just had a single ingester replaced, due to a node reboot, and the queue peaked at 600K

I've been doing a bit of digging into the code around transferring chunks.
It looks like all chunks are transferred to a new ingester which was found in the PENDING state.
However whether this is the correct ingester to transfer to depends on whether

Oops

I had a brainwave last night; during ingester handover the old and new ingesters are no longer in ACTIVE state, so the distributor will pick an extra ingester, which was not selected before the handover started.
After the handover has finished, it will return to selecting ingester covering the original part of the ring (the new ingester), and the extra ingester will no longer be selected.
After $idleChunkTime the extra ingester will flush these idle chunks.

To prevent the ingester picker from picking a temporary node (and allow N concurrent upgrades), we'd need to ensure replication - quorum - N > 1, and allow the picker to select fewer nodes during a handover (quorum < X < replication).

Good catch!
We can work round this by including leaving ingesters in the N, but not
writing to them, as you suggest. Should be an easy fix.
On Thu, 3 Aug 2017 at 12:21, Marcus Cobden notifications@github.com wrote:

To prevent the ingester picker from picking a temporary node (and allow N
concurrent upgrades), we'd need to ensure replication - quorum - N > 1,
and allow the picker to select fewer nodes during a handover (quorum < X
< replication).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/weaveworks/cortex/issues/467#issuecomment-319941721,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAbGhfUg4ZQygo1EX_9poQbrKIZNs3Juks5sUa1WgaJpZM4N-e40
.

Aye, good spot :clap:

authors: awh leth tomwilkie

repo: weaveworks/cortex


text:
Is it possible to do multimesh releases

We currently have 4 k8s cluster deployed with prod settings. Is it possible to fail all of them if any of the deployments in any of those clusters fails?

With the current implementation multi-cluster rollout/rollback is not supported. Maybe when Kubernetes federation v2 becomes stable Flagger could use FederatedDeployment kind instead of Deployment.

authors: stefanprodan tzilist

repo: weaveworks/flagger


text:
Docker mapper can miss containers

I see some processes running in containers that aren't appropriately tagger with the container metrics.
I wonder if its a race between docker events and the api.

We believe it's fixed when we changed to listen to the events that we listen to from the Docker event stream.

authors: peterbourgon tomwilkie

repo: weaveworks/scope


text:
external ui build is very occasionally broken

E.g. scope@bf73460f1a407f2927bc
This is following on from #2502.

Any more details on this?

No =/, only place you're gonna see this is in the standalone scope ui hiding on dev/prod admin.
Its not really an "officially supported" way of using scope anymore so I would close.

authors: foot rade


text:
Also serve UI under /ui

Part of https://github.com/weaveworks/service/issues/671

LGTM

authors: paulbellamy tomwilkie


text:
documentation: least required permissions for a github api token

Research and document what is the least required permissions set for a GitHub Token that can:

List PullRequest for a repository
Get PullRequest information
List Comments for a PullRequest (it will count as "issue comment")
Make a comment under a PR.

Type of tokens:

Fine-grained personal access tokens
Personal access tokens (classic)

Fine-grained token sounds good, but can we use and recommend it? It's still marked as "Beta".
Expected outcome:
There is a document that describes how to create a GitHub API Token, what permissions it needs to work with the branch-based planner, and what type of token is recommended.

We should also include how the token will be used for multiple repos https://github.com/weaveworks/tf-controller/pull/644#discussion_r1229255503

authors: yiannistri yitsushi

repo: weaveworks/tf-controller


text:
add private repo flag

Okay I will mention I am not a fan of all the err returns but I couldnt really figure out another way using the ginko tests.

Instead of:
err = foo()
Expect(err).ShouldNot(HaveOccurred())

you can say:
Expect(foo()).Should(Succeed())

repo: weaveworks/weave-gitops


text:
make docker daemon initiated container (re)start work properly

The docker daemon can decide to (re)start containers, e.g. after a reboot or when a --restart policy was specified for the container.
We want this to work properly for a) the weave container and any similar weave infrastructure containers (such as weavedns), b) application containers. In the latter case this would entail re-attaching to the weave network, and re-registering with weavedns.
This does require bits of #230/#312/#117.

It would be nice if the container came back with the same IP address after a restart, as described in #1047.

Presumably any containers started via the proxy will hang in weavewait when restarted by docker.
The proxy, or a separate container, could take care of re-attaching containers. This won't work on docker restart though, since the proxy may not be running yet. Though I guess we could scan all containers on proxy startup and attach any that are weavewait-ing.

This won't work on docker restart though, since the proxy may not be running yet

The Docker Event mechanism allows clients to fetch events from before the time they were started, so this is not an issue.
Doing that brings a different issue: what if the proxy itself is restarted, and queries for past events, and thus gets told of the start of containers that it already attached to weave (before the proxy was restarted)?
Maybe we can rely on attachment being idempotent, or maybe we can check before attaching.

The fix in #1210 does not do (a) in the original description - dealing with restart of weave itself.

authors: bboreham rade

repo: weaveworks/weave


text:
Add anchors to faq questions

Fixes #2223

Documentation changes:
modified faq
modified ipam/stop-remove-peers-ipam
modified operational-guide/tasks

Documentation changes:
modified faq
modified ipam/stop-remove-peers-ipam
modified operational-guide/tasks

Documentation changes:
modified faq

authors: awh bboreham


text:
What's the issue with Safari (Mac) 6, 7 & 8?

Browser support for this polyfill is currently listed as 9+ for Safari Mac
My app currently supports Safari Mac 6+, so I'm a little hesitant to raise that to 9+ (as this polyfill seems to require).
I was just wondering what the issue is with 6/7/8? If I use this polyfill and my app simply won't animate, then that will be fine. But if it breaks my app, then that may be a problem for me.
(Specifically, I hope to use it to animate my Angular 2 routes)

I have the same question too. I want to know what browser function is lacking on them, so I can detect it and disable animation

Note that we don't test with old browser versions, and we encourage movement to modern browser versions for the security benefits.
A known issue with early Safari versions is that they have webkitRequestAnimationFrame and not requestAnimationFrame.
If you change
var originalRequestAnimationFrame = window.requestAnimationFrame;
to
var originalRequestAnimationFrame = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame;
then the polyfill is likely to work with early Safari versions.
We haven't merged this change as we encourage movement to modern browser versions for the security benefits.

@ewilligers Obviously as a developer I'm all for latest versions! It's our user bases that are the trouble, and having a broken site reflects on the business rather than on the user's need to upgrade. For such a small addition, any chance you can reconsider?
Thanks for the info though

authors: code-tree ewilligers maxisam

repo: web-animations/web-animations-js


text:
[Bug]: Bun: Reading from "bun:test" is not handled by plugins (Unhandled scheme).

Version
System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 162.45 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Brave Browser: 125.1.66.118
    Chrome: 124.0.6367.119
    Safari: 17.5
  npmPackages:
    storybook-react-rsbuild
    @rsbuild/plugin-node-polyfill: ^0.7.2 => 0.7.2
    @rsbuild/plugin-react: ^0.7.2 => 0.7.2

Details

also the stream/web should resolve to "node:stream/web"
I added this to the main.ts
import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill';
import { pluginReact } from '@rsbuild/plugin-react';
import { StorybookConfig } from 'storybook-react-rsbuild';

const config: StorybookConfig = {
  stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],

  addons: [
    '@storybook/addon-links',
    '@storybook/addon-essentials',
    '@storybook/addon-interactions',
    '@storybook/preset-create-react-app',
    '@storybook/addon-styling',
    '@chromatic-com/storybook'
  ],

  framework: 'storybook-react-rsbuild',
  rsbuildFinal: (config) => {
    config.resolve = {
      ...config.resolve,
      alias: {
        'stream/web': 'node:stream/web'
      }
    };
    // modify the final webpack config
    if (config.plugins) {
      config.plugins.push(pluginNodePolyfill(), pluginReact());
    } else {
      config.plugins = [pluginNodePolyfill(), pluginReact()];
    }
    return config;
  },
  staticDirs: ['../react-public'],

  docs: {}
};

export default config;

Reproduce link
hopefully not needed
Reproduce Steps

create a storybook
add bun tests to it
add the storybook bundler
run storybook

I'm not sure if Bun supports Storybook v8 now, there is an issue: https://github.com/oven-sh/bun/issues/3794

yea, I am not using Bun to build. I am using storybook-react-rsbuild. bun:test is only used to test the jsx components. Webpack worked so I kept using webpack which would be this one @storybook/react-webpack5

I don't know much about bun:test, can you provide an reproduction?

authors: ErreMalote chenjiahan

repo: web-infra-dev/rsbuild


text:
[Bug]: lazyCompilation does not trigger invalidation for initial page

System Info
npx envinfo --system --npmPackages '@rspack/*' --binaries --browsers
System:
OS: macOS 14.7
CPU: (12) arm64 Apple M3 Pro
Memory: 203.03 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.15.1 - ~/.local/state/fnm_multishells/1121_1730396689623/bin/node
Yarn: 4.5.0 - ~/.local/state/fnm_multishells/1121_1730396689623/bin/yarn
npm: 10.7.0 - ~/.local/state/fnm_multishells/1121_1730396689623/bin/npm
Browsers:
Chrome: 130.0.6723.70
Safari: 18.0.1
npmPackages:
@rspack/cli: ^1.1.0-beta.0 => 1.1.0-beta.0
@rspack/core: ^1.1.0-beta.0 => 1.1.0-beta.0
@rspack/plugin-react-refresh: 1.0.0-beta.5 => 1.0.0-beta.5
Details
Setting lazycompilation option
// doesn't matter either entries true | false or imports true | false, as long as one or both of them are enabled
{
          entries: true,
          imports: false,
          backend: {
            server: {
              key: fs.readFileSync(PROXY_CERT.keyPath, 'utf-8'),
              cert: fs.readFileSync(PROXY_CERT.certPath, 'utf-8'),
            },
          } as any,
        }

makes compiler watch invalidation does not trigger the compilation. It shows initial path is found and will be compiled
 [LazyCompilationBackend] /Users/ohjoong.kwon/github/redacted/node_modules/whatwg-fetch/fetch.js is now in use and will be compiled.
    [LazyCompilationBackend] builtin:react-refresh-loader!builtin:swc-loader%3F%3FruleSet%5B1%5D.rules%5B1%5D.use%5B0%5D!/Users/ohjoong.kwon/github/redacted/src/command/index.js is now in use and will be compiled.

But it stops there. Peeking through, it looks like invalidate is not triggered by hitting here (https://github.com/web-infra-dev/rspack/blob/0db8b9441a8bf9447ce11cc69292df773482cec8/packages/rspack/src/Watching.ts#L206) which seems to be set in here (https://github.com/web-infra-dev/rspack/blob/0db8b9441a8bf9447ce11cc69292df773482cec8/packages/rspack/src/MultiCompiler.ts#L498)
but not sure why watching is blocked. Is there additional log to configure to see what's going on? I set below for the logging:
infrastructureLogging: {
    colors: true,
    level: 'verbose',
    debug: true,
  },

Reproduce link
https://github.com/kwonoj/rspack-lazy-try-import
Reproduce Steps
Setup lazycompilation and run rspack, open the initial page

It looks like if I manually touch one of the entry file (Users/ohjoong.kwon/github/redacted/src/command/index.js) looks like invalidation start to kicks in.

@JSerFeng fyi, I think I was able to narrow down repro
https://github.com/kwonoj/rspack-lazy-try-import/blob/main/src/index.js#L4-L12
If a promise returned by dynamic import is awaited later, seems it is stuck in the watcher and lazycompilation doesn't trigger the invalidation.

Actually repro seems wrong :/ it was reproducible on the actual codebase, but in the repro module's being loaded.

If a promise returned by dynamic import is awaited later, seems it is stuck in the watcher and lazycompilation doesn't trigger the invalidation.

Yeah, I tried a demo with endless promise, seems fine.

Any diagnostic I can run to grab more details? It's not easy to create a repro since I don't have a clue where / why it happens even.

Are you using multiCompiler ? seems it's the only place to modify this, sorry we don't have enough trace here to debug

Cause if compiler A is running, and compiler B depends on A, compiler B is blocked
I don't know if this is the reason, I'll give that a try when I'm available

Yes, we have multi compiler config. A depends on B, but B does not depends on anything. (and seeing A is waiting indefinitely)

Got it, I'm trying to reproduce this

authors: JSerFeng kwonoj

repo: web-infra-dev/rspack


text:
fix: emit asset with compat source should equal JsCompatSource

Summary

Checklist

[ ] Tests updated (or not required).
[ ] Documentation updated (or not required).

!canary


text:
FCM 404

Hello,
I cannot find anyone with this problem, yet... However, in the past week the fail push rate started increasing from 0.1% to 5%. Now, after 1 week, it's already in its 50s%.
Setup
Just a bit of a summary of what I have and what I do with this library:
I have a queuing system that produces push notifications batches to be sent for a specific database. This queue is consumed but php workers that use web-push-php library to send the notifications. Most of my subscribers are registered via VAPID protocol, and the php senders, use the public and private key, for the VAPID header. I do not use the pem file, since everything worked just with public and private string keys.

Operating System: Linux with nginx and php-fpm
PHP Version: 7.2
web-push-php Version: latest

All php mentioned extensions are enabled.
For now this only happens with FCM, so Chrome browser is the real deal.
Problem
I got a lot of 404 Not found responses from FCM google server. I found that this code and message is a "lie", cause sometimes the same user, I'm pushing the notification, is available to retrieved it. Last week, FCM started increasing the fail rate with that specific message, 404 Not found. However, I tried to send manually the same message to the same users that failed, and some of them were working. I tried it again (manually) and some failed and other were able to receive the push notification. It almost seems random response by FCM google server.
If I'm being a bit superficial on this issue please ask me for more details, but that's it... I'm using VAPID with FCM. Pretty simple, it worked for a year, and last week the failure rate increased a lot. Maybe cause my user database increased as well. I have something like 500k unique users.
Other
Sorry for any inconvenience, but I'm not used to write issues in github. If I missed something please tell me. Just wanted to discussed this situation with the community.
Thanks!

Hi,
It's look like there is no problem on FCM ( https://status.firebase.google.com/ )  We also send millions of push everyday and we didn't notice any problem since november. Do you erase expired endpoints from your system regularly ? What is your normal error rate ?

Hey!
I clean the Mismatch user id/ Not registered and 500 errors returned by FCM. The thing is that sometimes the error is the 404 Not found, but I cannot remove that ones, cause if I retry to push the message again it has a 50% chance to work.
Last week the error rate was about 1%, not more than that. Today is around 52%! It's increasing and increasing... Don't know what to do. It's like I'm losing the control on my users.
This is my piece of code that was working. I'm using only VAPID headers for authentacation. I always used this, since December.
`$auth = [
'VAPID' => [
'publicKey' => 'mypublickey',
'privateKey' => 'myprivatekey',
],
];
$webPush = new WebPush($auth, ['batchSize' => 35], 6, ['verify' => false]);
$webPush->setAutomaticPadding(false);
$webPush->setReuseVAPIDHeaders(true);
foreach ($subscriptions as $item) {
    $payload = '{"push_id":' . $item['id'] .
            ', "batch_id":' . $batchid .
            ', "msg_id":' . $msg
     .'}';

$notification = array(
'subscription' => Subscription::create([
'endpoint' => ( substr($item['push_id'], 0, 8) == 'https://' ? '' : 'https://fcm.googleapis.com/fcm/send/') . $item['push_id'] ,
'publicKey' => $item['p256dh'],
'authToken' => $item['auth'],
]),
'payload' => $payload,
);
$webPush->sendNotification($notification['subscription'], $notification['payload'], false);
}
foreach ($webPush->flush() as $report) {
        if ($report->isSuccess()) {
            $success++;
        } else {
            $failure++;
            $reason = $report->getReason();
            $endpoint = $report->getRequest()->getUri()->__toString();
            if (strpos($reason, 'NotRegistered') !== false || strpos($reason, 'InvalidTokenFormat') !== false
                    || strpos($reason, 'UnauthorizedRegistration') !== false || strpos($reason, 'MismatchSenderId') !== false
                    || strpos($reason, '401 Unauthorized') !== false) {

                $reasons[] = $reason;
            } else {
                $reasons[] = $reason;
            }
        }
    }

`

I think I found the problem, I was adding a parameter for control, after

https://fcm.googleapis.com/fcm/send/PUSHIDSTRING?parameter=integervalue

Looks like FCM stopped accepting parameters, since last week. I use this integervalue in order to point in my user database that it failed, pushid string is too long (PUSHIDSTRING).
I think that's the only way to achive the integervalue, when flushing and check report but report, since the report has the endpoint I made.
Thanks for listening :)

I think I found the problem, I was adding a parameter for control, after

https://fcm.googleapis.com/fcm/send/PUSHIDSTRING?parameter=integervalue

Looks like FCM stopped accepting parameters, since last week. I use this integervalue in order to point in my user database that it failed, pushid string is too long (PUSHIDSTRING).
I think that's the only way to achive the integervalue, when flushing and check report but report, since the report has the endpoint I made.
Thanks for listening :)

How can we pass some parameters without this method ? This is important to identify the subscriber. Otherwise we need to look for the endpoint in db which is really expensive

The report message array will have the same index order as the subscriber/notification array, you constructed before. Having that index you can easily identify which subscriber are you dealing with.
You can access it something like this:
$counter = 0;  foreach ($webPush->flush() as $report) {    $specificsubscriber = $subscriberarray[$counter];    $counter++;  }

authors: AngryElephant ozgurhangisi spankandex

repo: web-push-libs/web-push-php


text:
Pasting text work twice

In a text file I copied some text to the clipboard and within term2 I press ctrl-v which pastes the text from the clipboard twice. I'm on Ubuntu 14.04, if that matters.

http://cl.ly/3z1x1Q242N1B/pates-atom-term2-issue.mov

authors: MoOx jurgenhaas


text:
Fe: View metadata about the asset

This can go near the section for provenance. Metadata worth mentioning is (borrowed from https://github.com/webaverse/app/issues/890):

edition number
file type (jpg, png, vrm, etc)
file size (305kb, 24MB, etc)
resolution (eg: 1000x1000 px)
who are the collaborators of the NFT?
does it have unlockable content?

repo: webaverse/app


text:
Design media border

For wrapping around screenshots. It doesn't need to have any text or logos, but it should be distinguishable.

Note: needs to be transparent PNG

Ideally transparent SVG, not PNG.

Done; there is a square and a rectangular version in this folder, as well as the AI file.
Kept it a bit simpler than the concept sheet template, but it matches the same theme. Should work for essentially any screenshot.
https://drive.google.com/drive/folders/1_vO-tTxeqByNxOU5Teyqu3jabnrukRM_?usp=sharing

Think this design might be a bit too simple. I really like what's originally posted at the top of this thread, its a jpg tough. Another idea is trying out a border, for example:

Perhaps it can use the same arrow texure as the lanes on the street

Arrows texture .ai here: https://github.com/webaverse/app/blob/master/assets/street.ai

Perhaps some inspiration can come from the logo https://github.com/webaverse/app/issues/1283

Definitely should reflect the logo. There are several textures and themes to use:
rainbow line gradient
fake generated kanji texture
chevron booster

Sweet, I'll take another swing at this today then! I'll just make a few versions.
I would caution against any super bright colors or busy textures though; they will look good when it is just the border but as soon as an image is added behind the, they will take interest away from the more important content.
I'll also make one that's just a copy of the initial image Jin posted - I made that template, so I have all the assets needed to make it SVG easily.
I'll see what I can do to pull in the logo elements on a few of them too!

Made a few more versions, they are all SVG's. I think the rainbow one toward the top is most likely to be what you're looking for.
Any of these can be easily changed for color/gradients/etc.
Also, here's a screenshot so you don't have to download the AI file to look at them.

https://drive.google.com/drive/folders/1_vO-tTxeqByNxOU5Teyqu3jabnrukRM_?usp=sharing

There are some interesting ideas here, but I don't think it needs to be this complicated, it just needs to be more symbolic.
For example there are multiple Webaverse rhombuses here, along a path -- is that supposed to imply there being many versions of Webaverse, in clusters? Are these UI elements? UI of what software? There are things that look like scrollbars but not quite. It could be circuitry but it's not any kind of circuitry we have anywhere else.
We could incorporate the arrows, and also this texture, since the plan is to use it for avatars in the background:

IMO the border from Jin's presentation, including the inversions, was the best so far.

2.

This looks pretty good for something like presentations, but perhaps screenshots should have something smaller, like a logo watermark.
Figuring out those policies would be a separate issue though, so I think we can close this.

authors: GaladWarder avaer madjin


text:
MetaMask + Discord integration - with Weba-Wallet

Added Login modal with two buttons, MetaMask, and Discord respectively.
Integrated Discord Login
Integrated Weba-Wallet storage module.
Flow:
On login, a popup will be opened, along with the postMessage carrying the user's privateKey(mnemonic).
If the user is not already using storage, he will enter a password(a popup will be open) and weba-wallet will be creating the user's data object and return encrypted mnemonic.
By using that encrypted mnemonic user can either get his data or save new key-value data in weba-wallet storage (using hidden iframe).

This PR also needs a description.

Is this a hardcoded password? If so it should at least be a constant.

It is now being handled by weba-wallet.

This PR also needs a description.

Added description and updated Title.

authors: avaer mujabmuneeb


text:
Create new BitMap resource from scratch

I was hoping this would let me create a new BitMap resource from scratch, but if it does I have yet to figure out how. I get the attached errors about the width being 0. Which is of course true, when you create a new BitMap it is 0x0. In the screenshot of this plugin I saw a size editor though so I was hoping I would simply be able to change it from 0x0.

Ummm I didn't enable the plugin :facepalm:. Sorry for the noise!

repo: webcatzz/godot-bitmap-editor


text:
How to best subsample a dataset?

Hi, I'm trying to subsample a large dataset (LAION 400M) represented in the web dataset format and was hoping for some pointers. Just based on the documentation I am unsure what the best approach is.
Basically, I have a list of metadata info and want to create a new dataset containing only samples that match this metadata. I'm currently just adding a wds.select(filter) to the pipeline, where roughly
def filter(sample):
    return sample['metadata'] in metadata_list

This obviously slows down the iteration speed through the dataset. Where before it was ca. 1.26it/s it is now only 4.52it/s.
So the question is what the best way to construct such a subsampled dataset would be that doesn't slow down iteration speed too much, ideally with saving the generated dataset iterator for future uses, but without making copies of the data because disk space is somewhat limited.

There are a bunch of different tradeoffs you need to consider for optimal performance.
First, you can speed up loading by doing the select(...) before the decode and any data augmentation; image decompression/augmentation is usually the slowest part of the whole pipeline.
If you only retain a small percentage of the samples, your best bet is to generate that subset ahead of time as a new dataset. You can use either a small WebDataset/TarWriter pipeline to generate the subset (using e.g. ray for parallelization), or you can just use tarp proc ... | tarp split ....
If you need to do the selection dynamically, your best bet is to split your dataset into shards based on the categories you want to split on.
This seems cumbersome, but this is necessary if you want high performance I/O. Any file format that lets you select subsets dynamically (e.g., zip, lmdb, etc.) ends up using random file accesses, which is a big part of slowing down input pipelines.

authors: ThaddaeusWiedemer tmbdev

repo: webdataset/webdataset


text:
Add getValue command

Proposed changes
Add getValue command.
Let me know if we should handle the error differently or we should do something else.
Types of changes

[ ] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

[x] I have read the CONTRIBUTING doc
[x] I have added tests that prove my fix is effective or that my feature works
[x] I have added necessary documentation (if appropriate)

Further comments
Reviewers: @webdriverio/technical-committee

Updated.


text:
Plans to publish 0.2.14?

Just saw you implemented the passthrough of .only for mocha specs. Any plans to publish this version to NPM in the near future?

yes, probably this weekend or next week

authors: christian-bromann rnreekez

repo: webdriverio/wdio-mocha-framework


text:
Can Rotativa save pdf directly on network folder?

Hi guys,
anyone can say to me if rotativa can save pdf on network folder?
Thank you in advance

You may use the BuildFile(ControllerContext) method to generate a byte[] result. Then save that like any other normal file—even a network folder, assuming you have all the security and stuff worked out already.

repo: webgio/Rotativa


text:
Build dropbear & scp & rsync; disable lastlog; fix default PATH.

Fixes #27.

Patch dropbear DEFAULT_PATH to include both a convenient temporary location (/home/root) and the HBC bin directory
Removed lastlog that is not very useful and displays crap at startup because of permission issues
Refactored the script to increase parallelism & renamed it (yes it's becoming a small build system at this point :sweat_smile: )

Tested & working on my hardware.

FYI for future integration, this works just fine in start-devmode.sh (explainshell):
# Start root SSH server (change IP or use 0.0.0.0 if you know what that implies)
/home/root/.local/bin/dropbear -p 192.168.1.40:2222 -E -R -m -s

repo: webosbrew/webos-homebrew-channel


text:
Recommended Practice doesnt work?

Operating System:
Node Version:9.11.0
NPM Version:
webpack Version:4.7
webpack-serve Version:latest any

This issue is for a:

[x] modification request

Code
Simple enough - you mention using the "serve' in the webpack config which is not allowed - it would be a good idea to say "if you use extremely old versions of webpack you can do this but you cant on Webpack 2 +

@bradennapier the various sections of the issue template aren't optional, unless the template states as much. please don't ignore the issue/PR template instructions.
your assertion in the issue however, is not correct. if it were, oodles of tests would fail and there would be an army of angry open source users with pitchforks and torches posting issues to that effect. you're likely not using the package correctly in your environment. since you didn't follow the issue template, I honestly can't tell where/how you're using the package.
regardless, it's probably best for you to work from one of the test test/fixtures/basic configs, and if needs be, seek support using one of the options listed in the issue template, as the issues section here is not for support:

👉🏽 Need support, advice, or help? Don't open an issue.
Head to StackOverflow or https://gitter.im/webpack/webpack.

authors: bradennapier shellscape

repo: webpack-contrib/webpack-serve


text:
[Docs] Typescript Usage

The documentation for worker-loader here
https://webpack.js.org/loaders/worker-loader/
Has a section at the end titled 'Integrating with Typescript'. That has sections showing how to create a typings/custom.d.ts file, and how to import into App.ts.
However it does not show how the web worker should be defined in Typescript.
Also the code in the other examples won't work in a Typescript file as self.postMessage({ result: 'Fred'}) won't transpile in Typescript.
It seems the function signature for postMessage in Typescript is different from what works in Javascript.
Can someone complete the documentation with a functioning Typescript example please.

If it's any help, this is what I've been doing.
// src/MyWorker/worker.ts

const ctx: Worker = self as any;

ctx.onmessage = event => {
    // ...

    ctx.postMessage(/* response */);
};

// src/MyWorker/custom.d.ts

declare module 'worker-loader!*' {
    class WebpackWorker extends Worker {
        constructor();
    }

    export = WebpackWorker;
}

// src/MyWorker/index.ts

import './custom'; // Not necessary if you import your custom.d.ts elsewhere
import MyWorker = require('worker-loader!./worker');

export default MyWorker;

And then I import and use the worker like any other module
// src/index.ts

import MyWorker from './MyWorker';

const myWorker = new MyWorker();

myWorker.onmessage = event => {
    // ...
};

myWorker.postMessage(/* ... */);

My actual implementation uses subclasses of Worker so I can add type safety to my events as well, but that might not be necessary for a basic usage example. The general idea is just that I use a custom event interface that extends MessageEvent, and set its data field to be a union type of all possible events. Each event must have a type field set to an enum value, then I can narrow it to the specific event type using a switch statement.

@grind086 Mind spinning up a PR to add this example to the docs ?  Please as minimal && generic as possible and intead of // src/index.ts (Comment) =>
*index.ts*
```ts
// Code here ...
```
index.ts
// Code here ..

@grind086 Do you then use guard functions to differentiate between message types?
Do you use a string as type? Or shape of properties?

@qm3ster I use a string enum for types, but a regular enum would work just as well. Shape of properties would work too, but might require a bit more involved type checking than a simple switch. It also wouldn't let you differentiate between events that have the same shape, though depending on preference that isn't really necessary anyway. Here's a full example of my current setup:
First define all of your message types
// MyWorker/types.d.ts

// Enumerate message types
export const enum MESSAGE_TYPE {
    READY: 'ready',
    REQUEST: 'request',
    RESULT: 'result',
    ERROR: 'error'
}

// Define expected properties for each message type
interface IReadyMessage {
    type: MESSAGE_TYPE.READY;
}

interface IRequestMessage {
    type: MESSAGE_TYPE.REQUEST;
    paramA: string;
    paramB: number;
}

interface IResultMessage {
    type: MESSAGE_TYPE.RESULT;
    data: Float32Array;
}

interface IErrorMessage {
    type: MESSAGE_TYPE.ERROR;
    error: string;
}

// Create a union type of all messages for convenience
type MyWorkerMessage = IReadyMessage | IRequestMessage | IResultMessage | IErrorMessage;

// Extend MessageEvent to use our messages
interface IMyMessageEvent extends MessageEvent {
    data: MyWorkerMessage;
}

// Extend Worker to use our custom MessageEvent
export interface IMyWorker extends Worker {
    onmessage(this: IMyWorker, ev: IMyMessageEvent): any;
    postMessage(this:  IMyWorker, msg: MyWorkerMessage, transferList?: ArrayBuffer[]): any;
    addEventListener(type: 'message', listener: (this: IMyWorker, ev: IMyMessageEvent) => any, useCapture?: boolean): void;
    addEventListener(type: 'error', listener: (this: IMyWorker, ev: ErrorEvent) => any, useCapture?: boolean): void;
}

Then write a worker as above, but use your worker's interface instead of the generic one.
// MyWorker/worker.ts

import { IMyWorker, MESSAGE_TYPE } from './types';

const ctx: IMyWorker = self as any;

ctx.onmessage = event => {
    const msg = event.data;

    switch (msg.type) {
        case MESSAGE_TYPE.REQUEST:
            const paramA = msg.paramA; // string
            const paramB = msg.paramB; // number

            try {
                const data: Float32Array = getResultSomehow(paramA, paramB);
                ctx.postMessage({ type: MESSAGE_TYPE.RESULT, data });
            } catch (e) {
                ctx.postMessage({ type: MESSAGE_TYPE.ERROR, error: e.message });
            }
            return;
    }
};

ctx.postMessage({ type: MESSAGE_TYPE.READY });

I like to wrap the whole thing up in a simple module like so
// MyWorker/index.ts

import MyWorker = require('worker-loader!./worker');

export { MESSAGE_TYPE } from './types';
export default MyWorker;

And then use it like this
// index.ts

import MyWorker, { MESSAGE_TYPE } from './MyWorker';

const worker = new MyWorker();
let isReady = false;

worker.onmessage = event => {
    const msg = event.data;

    switch (msg.type) {
        case MESSAGE_TYPE.READY:
            isReady = true;
            return;
        case MESSAGE_TYPE.RESULT:
            doSomethingWith(msg.data);
            return;
        case MESSAGE_TYPE.ERROR:
            console.error(msg.error);
            return;
    }
};

function makeRequest(paramA: string, paramB: string) {
    if (!isReady) {
        throw new Error('The worker is still loading!');
    }

    worker.postMessage({ type: MSG_TYPE.REQUEST, paramA, paramB });
}

I didn't bother with differentiating between messages meant to go from or to the worker, but if you wanted you could certainly split them up.

I see. Very similar to what I was doing. Enums might be the way to go, as differentiating by shape forced me to use "guard functions", it didn't just refine into a specific union member by doing if (msg.property) like it did in flow.

So, really, I'm not getting this to fly at all and the only thing I can come up with that could be different is the webpack.config - how does it look like in the simple scenario outlined in this issue?

The main docs did not work for me - but @grind086 's solution does!
Specifically, this fails (from the Readme):
import Worker from 'worker-loader!./Worker.js';

And this works:
import Worker = require('worker-loader!./worker');

Using import and require feels awkward... can someone please explain what's going on? :)
Also - I ended up just casting the worker to any like const worker:Worker = new (MyWorker as any)();, which isn't the end of the world... but just putting that out there ;)

@dakom - That's because apparently someone changed the official docs without understanding why they were the way they were. When you have a module that exports a single object (ie module.exports = ...) you import it with import ... = require('...'). This is the code structure worker-loader uses, and the updated docs are incorrect.

Is there an example where you can just import worker from worker.ts where the custom.d.ts is centrally loaded and that your webpack loader config is more in this style, just like how it works in the js version?
{ 				test: /\.worker\.ts$/, 				use: [ 					{ 						loader: 'worker-loader', 						options: { name: '[name].[hash].js' } 					}, 					{ 						loader: 'babel-loader', 						options: { 							cacheDirectory: true 						} 					} 				] 			}

I made this library for worker-loader.
https://www.npmjs.com/package/session-typed-worker
You can guarantee deadlock-free, and you can infer the type of the received value.

I got this working with the plain .worker.ts filename convention. Not a fantastic solution, but you can add this line to the bottom of your .worker.ts file:
// Expose the right type when imported via worker-loader.
export default {} as typeof Worker & {new (): Worker};

This makes it so, from a type system perspective, the other side imports it as the sort of Worker class exposed by worker-loader. Unfortunately, it also means that the worker file now exports an empty object {}, which is weird but doesn't cause any problems.
I'd recommend alway setting "esModuleInterop": true in your tsconfig.json, which makes it so import A from 'A' and import A = require('A') are the same, so you can always use regular import syntax. This puts the import behavior in-line with Babel, Webpack, and Node.js rather than the legacy TypeScript approach, and the only reason it's not enabled by default is to avoid breaking older projects. More details here: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#support-for-import-d-from-cjs-form-commonjs-modules-with---esmoduleinterop

It seems to move even if const ctx: Worker = self as any; is written as declare const self: Worker;.

Is there an example where you can just import worker from 'worker' (so without the !worker-loader) where the custom.d.ts is centrally loaded and that your webpack loader config is more in this style, just like how it works in the js version?
{
	test: /\.worker\.ts$/,
	use: [
		{
			loader: 'worker-loader',
			options: { name: '[name].[hash].js' }
		},
		{
			loader: 'babel-loader',
			options: {
				cacheDirectory: true
			}
		}
	]
}

is it support that now?

Yes

Yes

it looks well~~but the publicPath option doesn't work. equal default webpackConfig.output.publicPath value.
i use worker-loader@3.0.2
i use inlined loader
import Worker from 'worker-loader?filename=[name].[hash:8].js&publicPath=./test/!./worker';

or webpack config:
{
	test: /\.worker\.ts$/,
	use: [
		{
			loader: 'worker-loader',
                        publicPath: './test/',
			options: { name: '[name].[hash].js' }
		},
		{
			loader: 'babel-loader',
			options: {
				cacheDirectory: true
			}
		}
	]
}

both of them can't find /test/ on the result of the compiled file.

{
			loader: 'worker-loader',
			options: { name: 'test/[name].[hash].js' }
		},

Don't touch publichPath.
You are confusing file location and publicPath. Webpack@5 will have publicPath: auto and we will recommend do not touch publicPath.

{
			loader: 'worker-loader',
			options: { name: 'test/[name].[hash].js' }
		},

Don't touch publichPath.
You are confusing file location and publicPath. Webpack@5 will have publicPath: auto and we will recommend do not touch publicPath.

ok, thanks for your reply.

authors: Neutrino-Sunset SamanthaAdrichem ahuglajbclajep alangpierce dakom evilebottnawi flq grind086 michael-ciniawsky qm3ster zquancai

repo: webpack-contrib/worker-loader


text:
Update README.md

Add Loop hook description

Thanks

authors: daweilv sokra

repo: webpack/tapable


text:
WP5 Module Federation refresh remoteEntry and/or external modules

Feature request

What is the expected behavior?
An external component should be able to invalidate the remoteEntry and cause a refresh of the external module - currently we would have to do a full page reload.
What is motivation or use case for adding/changing the behavior?

If the app is able to detect a new release of the external component a reload might be required - instead of a full page reload we could refresh the module. (it would likely be the module it self knowing if a refresh is needed)
If there was an issue in the loaded module eg. a UI Component having an issue - it would be nice to provide a pr. module refresh eg. letting the user trigger a "retry"
If the external service is down for some reason the fallback module/component could likely detect when the service is up again and trigger a refresh of modules from that service

How should this be implemented in your opinion?
Client code could import a magical import {refresh} from "webpack/module/federation/refresh"
If used as an external module it would communication with the remoteEntry refresh mechanism updating module loader and resetting module cache. (If used in the main application it could either be ignored or trigger a full page reload?)
Are you willing to work on this yourself?
yes, despite being low on time and domain knowledge regarding the webpack code base - although the initial work would likely be figuring out if feasible / practical or if a full page reload is better.

You can do it on application side... Don't know what you expected from webpack here

You can do it on application side... Don't know what you expected from webpack here

@alexander-akait the module remoteEntry files containing the module loading with hashed urls etc. is afaik loaded as part of the main bundle. Unless we create our own custom loading of remote modules I don't quite see how it would be possible to reload the remoteEntry files and resetting the remote modules for that entry.
(By custom I mean our own module loader eg.: Example of manually loading modules from container)
I might be missing out on some documentation of the internal webpack api's?

@alexander-akait the module remoteEntry files containing the module loading with hashed urls etc. is afaik loaded as part of the main bundle. Unless we create our own custom loading of remote modules I don't quite see how it would be possible to reload the remoteEntry files and resetting the remote modules for that entry.
(By custom I mean our own module loader eg.: Example of manually loading modules from container)
I might be missing out on some documentation of the internal webpack api's?

I have the same problem. I'm loading remotes that can be updated. A full refresh is required.
@alexander-akait can you elaborate a bit on how to do this from application side?

Just reload browser browser, do you know when it happens?

@alexander-akait well that's what I'm doing now but it feels like we are in the 2000s forcing a full refresh like that for something that happens in the background.
Ideally, unloading and/or refreshing a lazily loaded bundle should be as easy as loading it for the first time... a full browser reload feels like a slap in the face at that point.

@rojasjandro89 I undestand your feelings, but bidirectional hmr for module federation is not an easy thing, it is in our roadmap, you can always send a PR
It was closed because we already have an issue about it, it is just duplicate...

authors: alexander-akait raix rojasjandro89

repo: webpack/webpack


text:
Files on server not being updated when using Webpack HMR

Hello,
I have tried using different tools for hot reloading code on the server but it doesn't seem to work. I have tried, webpack-dev-server, webpack-hot-middleware, webpack-dev-middleware, webpack --watch, webpack/hot/signal, webpack/hot/poll, piping and delete require.cache. Followed many tutorials, researched many issues.
I am using reactjs for the client and react-transform with webpack. When I edit my files, the changes are taking place on the client and webpack seems to be rebundling the changes on the server because I get a message like this:
Version: webpack 1.12.9
Time: 631ms
                               Asset      Size  Chunks             Chunk Names
                           bundle.js   2.21 MB       0  [emitted]  main
                         1.bundle.js    145 kB       1             IntlBundle
0.08d991a0f88c05497b95.hot-update.js   4.64 kB       0  [emitted]  main
08d991a0f88c05497b95.hot-update.json  36 bytes          [emitted]
webpack: bundle is now VALID.

However, when I reload my webpage, react complains with the following message;
Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
 (client) =10=22.b:$/=10.5.0">So we are <
 (server) =10=22.b:$/=10.5.0">We are </

I guess that means that the code on server was not updated at all. Is this an issue with react or webpack? If it is for webpack, then what can I do to solve it?

@Dindaleon Is file watching working for you at all, regardless of hot loading?
File watching seems broken in my project and in a test directory following the steps at https://webpack.github.io/docs/tutorials/getting-started/
Neither webpack --watch nor webpack-dev-server seem to do anything on a source file change.
I cloned webpack (v1.12.11) and 8 NodeWatchFileSystem tests fail locally, reporting timeout.
4473 passing (3m)
  32 pending
  8 failing

  1) NodeWatchFileSystem should register a file change (change delayed):
     Error: timeout of 10000ms exceeded. Ensure the done() callback is being called in this test.
    at [object Object]. (/home/calvin/projects/webpack/node_modules/mocha/lib/runnable.js:189:19)
    at Timer.listOnTimeout (timers.js:89:15)

  2) NodeWatchFileSystem should register a file change (watch delayed):
     Error: timeout of 10000ms ...
I'm new to webpack, so I thought I'd compare notes before filing a new issue. I'm unsure if my issue is my own setup or not.

Can you set up a little example repo to study? It's hard to say anything concrete without.
Basically the error says that your server returns different markup than what the client expects. Maybe you could drop server side rendering for development usage.

authors: Dindaleon bebraw calvinrachuy


text:
[Bug/Feature] Module file timestamps are only recorded on change events.

Do you want to request a feature or report a bug?
Both-ish. I think it's a bug, but could be a feature.
What is the current behavior?
Webpack is only recording file timestamps for modules after changing a file. This is bad because it causes full rebuilds when dynamically adding to a compiler.
If the current behavior is a bug, please provide the steps to reproduce.
I created a demo repository.
git clone git@github.com:gdborton/webpack-build-as-needed.git
cd webpack-build-as-needed
npm install
node server

In your console you should see that file1.bundle.js was compiled.
building: multi /Users/gary_borton/code/webpack-filetimestamp/src/file1.bundle.js
Listening on port: 3000
building: /Users/gary_borton/code/webpack-filetimestamp/src/file1.bundle.js

webpack: Compiled successfully.

If you request http://localhost:3000/dist/file2.bundle.js, we'll add it to the compiler, and invalidate. You'll see a message about that, and then you'll see that file1.bundle.js was compiled again, despite having no changes.
Found a request for an unbuilt bundle "file2.bundle", adding to compiler: "myFancyCompiler"
webpack: Compiling...
building: /Users/gary_borton/code/webpack-filetimestamp/src/file1.bundle.js
building: multi /Users/gary_borton/code/webpack-filetimestamp/src/file2.bundle.js
webpack: wait until bundle finished: /dist/file2.bundle.js
building: /Users/gary_borton/code/webpack-filetimestamp/src/file2.bundle.js

What is the expected behavior?
Since file1.bundle.js has already been compiled successfully and hasn't changed, it shouldn't need to be recompiled.
If this is a feature request, what is motivation or use case for changing the behavior?
Performance! I think Airbnb (and others) could see huge dev performance benefits by only compiling/recompiling assets as needed.
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
This isn't really relevant.
cc: @sokra @TheLarkInn @ljharb @iancmyers

To fix it in webpack, we would need to get the timestamps when calling invalidate, but this requires a change of the WatchFileSystem interface. So this would be a breaking change. We can do that for webpack 4.

Why would it have to be a breaking change; could it not be additive?

This would likely be an improvement for most people, plus vs. a new config
option+opt in, this makes sense to me.
On Fri, Nov 17, 2017, 7:55 AM Jordan Harband notifications@github.com
wrote:

Why would it have to be a breaking change; could it not be additive?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/webpack/webpack/issues/5970#issuecomment-345282143,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADQBMJGr9n5KXoSdLoZtfz58BgIpsUa9ks5s3axUgaJpZM4Qhh0c
.

@sokra the workeraround looks nice.
We've also hit by this issue at Next.js.
As a workaround we touch a file when starting the app. Then it invalidates first.
And it introduce many other issues.
Looking forward for a proper fix.
But again the workaround looks cleaner than what we have now.

Why would it have to be a breaking change; could it not be additive?

The WatchFileSystem has no interface method to getTimes. We can add this method to the NodeWatchFileSystem, but if somebody provided a custom watch filesystem this will be broken. So it's a breaking change, but I guess only 1-3 people provided a custom watch filesystem and need to change their code.
Anyway webpack 4 is in the pipeline. We can add it there.

I'm totally fine with waiting until webpack 4 for this. We've implemented
the workaround in our server, waiting for more data to see the impact, but
I expect to see some significant dev performance boosts.
On Fri, Nov 17, 2017 at 11:26 PM, Tobias Koppers notifications@github.com
wrote:

Why would it have to be a breaking change; could it not be additive?
The WatchFileSystem has no interface method to getTimes. We can add this
method to the NodeWatchFileSystem, but if somebody provided a custom watch
filesystem this will be broken. So it's a breaking change, but I guess only
1-3 people provided a custom watch filesystem and need to change their code.
Anyway webpack 4 is in the pipeline. We can add it there.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/webpack/webpack/issues/5970#issuecomment-345424523,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD-pIyd_W2chHABjMDO6Z-b_9U7GJH6cks5s3oaSgaJpZM4Qhh0c
.

@sokra Just a quick update here. We've been working on getting on webpack 4 and I tried removing our workaround for this and the problem seems to still be there. For now we'll just keep our workaround, but it would be nice if this just worked without it.

I just hit on this issue as well, because I was trying to figure out why the compilation.fileTimestamps is always empty on first compile.
I would say that this bug has definitely not been fixed. Too bad, as it makes it really hard to check for changed source files etc. (Really biting me with service workers where they install/activate for any change which this bug is causing)

authors: TheLarkInn arunoda gdborton jharris4 lencioni ljharb sokra