text:
scylla-image-setup service is started when stopping the source instance

Description
I found scylla-image-setup service was started when stopping the source instance.
It should be unexpected, and it's interrupted during coredump setup.
When new instance is created, another scylla-image-setup will be executed. It will overwrite some change of first scylla-image-setup.
The problem was found in master AMI: scylla_2020-08-03T23-11-29Z (ami-05b55eb1eb02c4a3a)
I also reproduced with my AMI (us-east-1: ami-0005610b660b7d0b0)
New instance system log: (include system log of creating AMI)
log-from-begin.txt
ami-build-log.txt
AMI build log:

the source instance was stopped around 13:36:57

2020/08/05 13:36:57 [INFO] (telemetry) ending shell
2020/08/05 13:36:57 ui: ESC[1;32m==> amazon-ebs: Stopping the source instance...ESC[0m
2020/08/05 13:36:57 ui: ESC[0;32m    amazon-ebs: Stopping instanceESC[0m
2020/08/05 13:36:58 ui: ESC[1;32m==> amazon-ebs: Waiting for the instance to stop...ESC[0m
2020/08/05 13:37:14 ui: ESC[1;32m==> amazon-ebs: Enabling Enhanced Networking (SR-IOV)...ESC[0m
2020/08/05 13:37:15 ui: ESC[1;32m==> amazon-ebs: Enabling Enhanced Networking (ENA)...ESC[0m
2020/08/05 13:37:16 ui: ESC[1;32m==> amazon-ebs: Creating AMI scylla_2020-08-05T13-33-11Z from instance i-0aace976ce6ef80d6ESC[0m
2020/08/05 13:37:17 ui: ESC[0;32m    amazon-ebs: AMI: ami-0005610b660b7d0b0ESC[0m
2020/08/05 13:37:17 ui: ESC[1;32m==> amazon-ebs: Waiting for AMI to become ready...ESC[0m
2020/08/05 13:43:52 ui: ESC[1;32m==> amazon-ebs: Modifying attributes on AMI (ami-0005610b660b7d0b0)...ESC[0m

uptime of new instance
[scyllaadm@ip-10-99-0-244 ~]$ uptime -s
2020-08-05 13:49:17

System log of new instance

scylla-image-setup service was started in stopping source instance
it's after :

basic scylla_setup

scylla_setup --ntp-domain amazon --no-coredump-setup --no-sysconfig-setup --no-raid-setup --no-io-setup --no-bootparam-setup --no-ec2-check --no-swap-setup
scylla.slice was created and started

sudo amazon-linux-extras install kernel-ng
cloud.cfg update

[scyllaadm@ip-10-99-0-244 ~]$ sudo journalctl  -S '2020-08-05 13:30:00' |less

Aug 05 13:33:39 ip-172-30-0-169 systemd[1]: Starting Network.

<install scylla>
<install scylla-machine-image, scylla-debuginfo>
</opt/scylladb/scripts/scylla_setup --ntp-domain amazon --no-coredump-setup --no-sysconfig-setup --no-raid-setup --no-io-setup --no-bootparam-setup --no-ec2-check --no-swap-setup>

Aug 05 13:36:33 ip-172-30-0-169.ec2.internal systemd[1]: Created slice scylla.slice.
Aug 05 13:36:33 ip-172-30-0-169.ec2.internal systemd[1]: Starting scylla.slice.

<sudo amazon-linux-extras install kernel-ng>

2020/08/05 13:36:33 ui: ESC[0;32m    amazon-ebs: ESC[1;31mNo swap is configured, it is highly recommended to setup swap on Scylla node.ESC[0mESC[0m
2020/08/05 13:36:33 ui: ESC[0;32m    amazon-ebs: ScyllaDB setup finished.ESC[0m

Aug 05 13:36:56 ip-172-30-0-169.ec2.internal systemd[1]: Stopping Dynamically Generate Message Of The Day...
Aug 05 13:36:56 ip-172-30-0-169.ec2.internal systemd[1]: Starting Dynamically Generate Message Of The Day...
Aug 05 13:36:56 ip-172-30-0-169.ec2.internal systemd[1]: Created slice Slice used to run Scylla. Maximum priority for IO and CPU.
Aug 05 13:36:56 ip-172-30-0-169.ec2.internal systemd[1]: Starting Slice used to run Scylla. Maximum priority for IO and CPU.
Aug 05 13:36:56 ip-172-30-0-169.ec2.internal systemd[1]: Starting Scylla Cloud Image Setup service...
...
<scylla-image-setup was interruptted during coredump setup>

Aug 05 13:36:58 ip-172-30-0-169.ec2.internal systemd[1]: Stopped target Cloud-init target.
Aug 05 13:36:58 ip-172-30-0-169.ec2.internal sshd[3679]: Received signal 15; terminating.
Aug 05 13:36:58 ip-172-30-0-169.ec2.internal systemd[1]: Stopping Cloud-init target.
Aug 05 13:36:58 ip-172-30-0-169.ec2.internal systemd[1]: Stopped Scylla Cloud Image Setup service.

...
<scylla-image-setup during new instance init>
Aug 05 13:49:32 ip-172-30-0-169.ec2.internal systemd[1]: Starting Scylla Cloud Image Setup service...

Aug 05 13:50:25 ip-10-99-0-244.ec2.internal scylla_image_setup[3574]: 4+0 records in
Aug 05 13:50:25 ip-10-99-0-244.ec2.internal scylla_image_setup[3574]: 4+0 records out
Aug 05 13:50:25 ip-10-99-0-244.ec2.internal scylla_image_setup[3574]: 4294967296 bytes (4.3 GB) copied, 32.5004 s, 132 MB/s
Aug 05 13:50:39 ip-10-99-0-244.ec2.internal dhclient[3529]: XMT: Solicit on eth0, interval 64950ms.
Aug 05 13:51:14 ip-10-99-0-244.ec2.internal scylla_image_setup[3574]: Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)
Aug 05 13:51:14 ip-10-99-0-244.ec2.internal scylla_image_setup[3574]: no label, UUID=bc86a46c-5b41-4987-b492-dbe0353bbfce

This issue can be workarounded by moving enable of scylla-image-setup.service to the end.
But I saw scylla-server is starting during stopping source instance, need to find the root reason.
diff --git a/aws/ami/files/scylla_install_ami b/aws/ami/files/scylla_install_ami
index 8b16dcb..78e917b 100755
--- a/aws/ami/files/scylla_install_ami
+++ b/aws/ami/files/scylla_install_ami
@@ -76,8 +76,6 @@ if __name__ == '__main__':
     if args.repo_for_update:
         run('curl -L -o /etc/yum.repos.d/scylla.repo {REPO_FOR_UPDATE}'.format(REPO_FOR_UPDATE=args.repo_for_update))

-    run('systemctl daemon-reload')
-    run('systemctl enable scylla-image-setup.service')
     with open('/etc/cloud/cloud.cfg') as f:
         lines = f.readlines()
     with open('/etc/cloud/cloud.cfg', 'w') as f:
@@ -99,3 +97,5 @@ if __name__ == '__main__':
     with open('/etc/cloud/cloud.cfg', 'w') as f:
         f.write(cfg2)
     shutil.move('{}/99_user_alias.cfg'.format(homedir), '/etc/cloud/cloud.cfg.d')
+    run('systemctl daemon-reload')
+    run('systemctl enable scylla-image-setup.service')

Hi @slivne
Currently node_exporter.service will be enabled and started during scylla_setup, is it expected?
it should be fine to start node_exporter after restart.
I tried to disable start of node_exporter.service in scylla_setup (node_exporter_install), the scylla-server can still be started during stopping source instance.

I saw the scylla-image-setup.service or scylla-server.service is always started after created and started scylla.slice.
I didn't find a way to disable this.
Aug 06 01:40:06 ip-172-30-0-92.ec2.internal systemd[1]: Created slice scylla.slice.
Aug 06 01:40:06 ip-172-30-0-92.ec2.internal systemd[1]: Starting scylla.slice.
Aug 06 01:40:06 ip-172-30-0-92.ec2.internal systemd[1]: Created slice Slice used to run Scylla. Maximum priority for IO and CPU.
Aug 06 01:40:06 ip-172-30-0-92.ec2.internal systemd[1]: Starting Slice used to run Scylla. Maximum priority for IO and CPU.
Aug 06 01:40:06 ip-172-30-0-92.ec2.internal systemd[1]: Starting Scylla Server...
Aug 06 01:40:06 ip-172-30-0-92.ec2.internal systemd[1]: Created slice Slice used to run companion programs to Scylla. Memory, CPU and IO restricted.
Aug 06 01:40:06 ip-172-30-0-92.ec2.internal systemd[1]: Starting Slice used to run companion programs to Scylla. Memory, CPU and IO restricted.

@amoskong It's not clear to me what's the bug here ? what are the changes the are overwritten ? how does it manifest before swap configuration was enabled ?

@amoskong It's not clear to me what's the bug here ? what are the changes the are overwritten ? how does it manifest before swap configuration was enabled ?

We don't expect scylla-image-setup service is started in creating AMI, right? we expect it firstly starts when the new instance is creating /initing.

Up until the swap issue, we didn't really cared if it was started during the stop of the instance or not.
the logic on instance boot wasn't related to that fact.
If there still a real issue with this happening ? if not, I don't see a point in chasing this issue.

Up until the swap issue, we didn't really cared if it was started during the stop of the instance or not.
the logic on instance boot wasn't related to that fact.
If there still a real issue with this happening ? if not, I don't see a point in chasing this issue.

In my tests, the scylla-ami-setup service will be interrupted after coredump setup, swap setup isn't really executed.
The curious question is why it's started after enable?

I think we found the root cause this issue, it's scylla-fstrim.timer that spin up scylla-server in all kind of cases.
we seen it as part of the scylla-cloud installations, that any systemd services that Wants timers, would kick this dependency again

@fruch Any idea if it's relevant ? 4.3 is long gone

The root cause was the fstrim.timer, and we are not using it anymore on master.

authors: amoskong fruch yaronkaikov

repo: scylladb/scylla-machine-image


text:
azure: use "Resource Disk" to store swap file

Microsoft recommends to use "Resource Disk" to store swap file, which is mounted at /mnt by default.
So let's use /mnt as swap directory for Azure, and use / as other IaaS.
Fixes #398

Testing at:
https://jenkins.scylladb.com/job/scylla-master/job/releng-testing/job/azure-image/322

The test passed.

@syuu1228 Since you did changes which related also the ami and gce, please run both tests as well, and also next-machine-image

GCE passed:
https://jenkins.scylladb.com/job/scylla-master/job/releng-testing/job/gce-image/695/
Other jobs are still running.

next-machine-image passed:
https://jenkins.scylladb.com/job/scylla-master/job/releng-testing/job/next-machine-image/469/

@syuu1228 AMI passed as well, merging ,. thanks :+1:

source: gharchive/pull-request

license_type: permissive

license_source: github-api


text:
Destruction of collections of CqlValue is needlessly costly

If you deserialize a collection into a CqlValue e.g. as CqlValue::List which holds a Vec<CqlValue> or if you create a Vec<CqlValue> directly to pass it as a parameter to the driver, the deallocation of such vector can take significant amount of time due to calling the destructors of individual items. This shows as drop_in_place being high in the profile.
The compiler does not know if the items stored in the collection are of primitive type like e.g. CqlValue::Float or more complex objects that must be actively dropped.
This problem could be solved by providing your own wrapper for Vec<CqlValue> that could register if all inserted values are of primitive types at runtime, and if so, could just skip the destruction of them (I'm quote surprised you don't even need unsafe for that!), hence going from O(n) destruction to O(1). Such wrapper then could be used as the representation for CqlValue::List, CqlValue::Set, CqlValue::Vector.
You can look in the #1022 (it is not perfect solution, but I got about 60% speedup on float vectors just from that optimization).

I think this may not be needed soon with the deserialization refactor (@wprzytula )

@pkolaczk Thanks for pointing out this nonobvious inefficiency! With the new deserialization refactor (see #1057), CqlValue won't be even created, so its destructor's cost stops being an issue for most users (apart from those who are going to keep using Row and CqlValue for dynamic purposes). Having said that, I believe introducing the optimisation you suggested is not worth the increase in code complexity. Do you agree?

source: gharchive/issue

authors: Lorak-mmk pkolaczk wprzytula

repo: scylladb/scylla-rust-driver


text:
Add helper script for generating attributes file boilerplate from config files

I've been meaning to create this for awhile, but never quite got motivated. Perhaps you might be a good person to offer feedback, as it seems like it complements this cookbooks goals.
This stems from the decision that I liked generating yaml/json/ini config dynamically via attributes namespace (ie. node["mycookbook"]["config"]["key"] = "value") rather than using included erb templates. I assume the maintainer of this cookbook probably agrees.
The thought was that it's tedious to generate the attributes.rb file the first time, and downright inconvenient for users trying to migrate old config files (or config files from tutorials) into a format this sort of cookbook accommodates. Also, kinda tedious to understand updates to the default config when, for example, migrating between major version in the package repo, as diffs are no longer useful when the format has been completely changed to attributes.rb
Anyhow, think a little helper ruby script (for running outside the chef context) would make sense to include. Would likely fit as a Thorfile or Rakefile, as I imagine it.
Appreciate any feedback on whether you'd find it useful

I agree, it's certainly inconvenient and tedious to migrate. We made the transition to this style by adding shims in our ERB templates, so we could use the new "attribute-driven" style alongside the old "hardcoded" stuff:
# attributes/default.rb
default['config'] = {
  'abc' => 'foo',
  'xyz' => 'bar'
}
default['config_shim'] = {
  'ns3' => {
    'baz' => 'bap'
  }
}

# templates/default/example.ini.erb
[ns1]
abc=<%= node['config']['abc'] %>

[ns2]
xyz=<%= node['config']['xyz'] %>

<% node['config_shim'].each do |namespace, config| %>
[<%= namespace %>]
<% config.each do |key, value| %>
<%= key %>=<%= value %>
<% end %>
<% end %>

Painful, but we were rewriting all our Chef code anyway.
I will say now that we have this kind of general, autogenerated configuration, we're able to build tools on top so we don't necessarily define attributes in Chef at all. So I think it's a useful concept, and the code I've written for the config generators here in the Magic cookbook are just plain Ruby. They could easily be abstracted out into a library gem for import in a Rakefile or any Ruby project.
We've also been thinking about how to manage configuration changes over time, and I've got a little experiment around defining "attribute schemas" and then creating a conformant document in JSON: https://github.com/sczizzo/smort (sorry it's very rough, I really just started this past week). I have some ideas around versioning the schemas, so Chef will raise an exception if you try to deploy an application with a configuration scheme it doesn't support
tl;dr Yeah, totally agree

Thanks!

we're able to build tools on top so we don't necessarily define attributes in Chef at all

At risk of side-tracking, can I ask what you're using?
Interesting with the attr spec'ing. Don't have time to test it atm, but I'll try to come back to this later, as I'm intrigued :)

Smort is one such application. Smort actually doesn't know about Chef at all, but we make API requests against Smort from Chef to pull in JSON documents. We might use those documents on their own or merge them into the node object. For the API request we have a simple function smort_lookup defined in a library:
module Smort
  require 'net/http'
  require 'json'

  def smort_lookup schema, document=node.environment, endpoint=node.smort.endpoint
    lookup = URI.join endpoint, ::File.join('l', schema, document)
    results = Net::HTTP.get lookup
    JSON.parse(results) rescue nil
  end
end

Then in a recipe we might use it like so:
metric_checks = smort_lookup 'metric_checks'

metric_checks.each do |check_defn|
  sensu_config check_defn['name'] do
    checks \
      check_defn['name'] => {
        type: 'check',
        standalone: true,
        handlers: [ check_defn['handler'] ],
        interval: check_defn['interval'],
        command: check_defn['command']
      }
  end
end

Chef is still writing our configuration (sensu_config), but the attributes are pulled from Smort rather than Chef Server.

Rockin! I don't want to presume you don't know about them, but here's some prior art just in case. Chef explicitly chose to bundle the config registry with the whole config management tool, but previous tools had separation, and some people have tried to split that back out with chef.
Noah
http://blog.lusis.org/blog/2013/01/20/future-of-noah/ (good links at the bottom)
https://github.com/lusis/Noah
https://github.com/lusis-cookbooks/noah (the magic to replace attrs, iirc)
etcd
If it seems like it doesn't version config, it just uses a wonky term called "index".
https://coreos.com/etcd/docs/2.0.8/api.html#setting-a-key-from-a-file
zookeeper
Actually here's just a good SO question with links: https://stackoverflow.com/questions/6047917/zookeeper-alternatives-cluster-coordination-service
(Consul wasn't even in the picture when I was doing my own research, so that's how behind I am!)
Anyhow, curious to hear if I've misunderstood. The thought was perhaps it might make more sense to use these established tools and write a tool that handles the schema validation, but not the actual storage/notification. To clarify, this isn't a space I'm especially strong in, so I don't want to mislead! But the thought it that the core of this might be something that exists already for more general use at large scale.

Yeah I took a lot of inspiration from Consul's KV store (which looks like etcd's Index concept) when I wrote DBum (https://github.com/sczizzo/dbum). The original idea for Smort was it would just be an interface to define and manage schemas, and I would use DBum/Consul/&c as my database. Right now, Smort is implemented with a local DB, but I'm not doing anything too fancy; it should translate fairly easily to a different backing store.

Gotcha! Sorry, hard to know where everyone falls in terms of experience, so thought I'd be liberal with info. I'll follow along -- I'm sure I could learn something :)

authors: patcon sczizzo

repo: sczizzo/magic-cookbook

license: isc

license_source: bigquery


text:
Link roto en el penúltimo paso de la instalación de Python

En el penúltimo paso de la instalación de Python el enlace está roto. Entiendo que se debe a una reestructuración de los repositorios. "Buceando" por el repo edubase veo que el enlace correcto debería ser este:
https://raw.githubusercontent.com/sdelquin/edubase/main/docs/files/.mypy.ini

Muchas gracias @amarzar! La verdad es que al hacer la migración eso se me quedó atrás.
En cualquier caso he aprovechado para rehacer unas cuantas cosas. Lo mejor es que ahora obtengo la última versión estable de Python de manera programática, así el tutorial sirve para cualquier momento en el que se siga.
https://github.com/sdelquin/edubase/blob/main/docs/python-install.md

authors: amarzar sdelquin

repo: sdelquin/edubase

license: MIT


text:
Add option on profile page for deleting a Good Card account.

There should be some button that a user can click to delete their account with Goon Card (not a single social media account, but the actual Goon Card account that we have stored in the database). This button should have some kind of confirmation message or alert asking if they really want to delete their account, then call the backend API for account deletion.

We could put this on the profile page where you add social media accounts. If we do, we would just need to have headers or some divider and then we can put the button on the page in a way that makes sense.
We should change the name of the social media accounts link to Profile to encompass this

Maybe we should put the option to delete the account on the settings page instead of social media accounts page. but i agree with sterly, we should rename that social media links page to "Profile" and i went ahead and did it, I just want to hear everyone's opinion on whether they think we should have the delete option in the settings page instead. usually that's where it is for other apps or services

yep! i'll take this issue, sorry i didn't get a chance to self-assign it earlier

@paytonshaltis you just need me to get the button on the profile page right? so, will you work on the deletion on the backend side?

@paytonshaltis you just need me to get the button on the profile page right? so, will you work on the deletion on the backend side?

Yup! Just have a button that maybe does the same confirmation alert that Leah has for deleting an individual linked account ("are you sure you want to delete?" type of message), and I will connect it to the backend.

authors: paytonshaltis sderacy thadakn1

repo: sderacy/gooncard


text:
Laravel 8.x Shift

This pull request includes the changes for upgrading to Laravel 8.x. Feel free to commit any additional changes to the shift-33396 branch.
Before merging, you need to:

Checkout the shift-33396 branch
Review all pull request comments for additional changes
Update your dependencies for Laravel 8
Run composer update (if the scripts fail, add --no-scripts)
Thoroughly test your application (no tests?)

If you need help with your upgrade, check out the Human Shifts. You may also join the Shifty Coders Slack workspace to level-up your Laravel skills.

:warning: Laravel 8 renamed the CheckForMaintenanceMode middleware to PreventRequestsDuringMaintenance. Shift automated the changes for your middleware and Http\Kernel, but detected potential references to CheckForMaintenanceMode in the following files. You should review these files and update any references accordingly.

[ ] app/Ship/Kernels/HttpKernel.php

:warning: The RouteServiceProvider no longer prefixes the controller namespace by default in Laravel 8. While you may still set this property, you are encouraged to register your routes using static ::class references.
You may automate the conversion to static class references using the Shift Workbench.

:information_source: Laravel 8 introduced class based factories. Shift automated this change. However, if you were using a community package for factories or other custom code, you should review your factories for additional changes.
If you encounter an issue, you may revert this commit and temporarily install the laravel/legacy-factories package. You may then automate the conversion to class based factories using the Shift Workbench.

:warning: Shift upgraded your configuration files by defaulting them and merging your true customizations. These include values which are not changeable through core ENV variables. This is an effort to make maintaining your config files easier.
You should review this commit for any additional customizations. If you have a lot of customizations, you may wish to undo this commit with git revert and make these config file changes manually.

:information_source: Shift updated your dependencies for Laravel 8. While many of the popular packages are reviewed, you may have to update additional packages in order for your application to be compatible with Laravel 8.
Watch dealing with dependencies for tips on handling package incompatibilities.

:information_source: Laravel 8 reintroduced the app/Models folder by default. This is an optional change. Laravel and the artisan commands will automatically detect if you are using the app/Models folder or not.
If you wish to modernize your application to use the app/Models folder, you may run the Namespace Models Shift for free.

:warning: The paginator now uses Tailwind for its default styling in Laravel 8. If you wish to continue using Bootstrap, you should add the following snippet to the boot method of your AppServiceProvider:
\Illuminate\Pagination\Paginator::useBootstrap();

:tada: Congratulations, you're now running the latest version of Laravel.
The following Shifts may be used ensure your application is fully upgraded and easier to maintain in the future:

Upgrade Checker ensures your application is fully upgraded by detecting any outdated code.
Laravel Fixer automates many of the suggestions found by the Laravel Linter and other Shifts.
Tests Generator intelligently generates model factories, HTTP Tests, and unit tests for your application to give you a head start on testing.

You may run these Shifts and stay upgraded forever as well by subscribing to a Shifty Plans.

repo: sdjrppl/apiato


text:
How to compute the geo-bias score

Hi, I'm wondering how to compute the geo-bias score mentioned in the main paper. Since I haven't found any script that includes this process in this project, could you please provide some guidance? I look forward to your reply! :)

Hi, I'm wondering how to compute the geo-bias score mentioned in the main paper. Since I haven't found any script that includes this process in this project, could you please provide some guidance? I look forward to your reply! :)

Hi, Thank you for your interest in TorchSpatial!
We will share a functional version for geo-bias calculation next week, with the complete code and instructions available by the NeurIPS camera-ready deadline (January 15). We will keep you updated.

Hi, I'm wondering how to compute the geo-bias score mentioned in the main paper. Since I haven't found any script that includes this process in this project, could you please provide some guidance? I look forward to your reply! :)

Hi, We have another repository specifically designed for geo-bias calculations: PyGBS. In this repository, the base geo-bias and relative geo-bias discussed in current TorchSpatial paper are referred to as the Presence vs. Non-Presence SSI Score (PNP SSI) and Relative Performance SSI Score (RP SSI). More detailed explanations and illustrations will be added to that repository. Thank you for your patience.

authors: neminwu tongnie

repo: seai-lab/TorchSpatial


text:
id + parseAlias + etc.

在 1.0.2 之前，对 define(id, ...) 中的 id 不会做 parseAlias
1.0.2 后会做解析
不做解析的最佳实践是：id 永远由 spm 自动生成，这样，默认支持同一模块的多个不同版本，不会冲突。不足之处是：对需要手写 id 的场合（比如内嵌模块）支持存在隐患，同时对于 libs 下的模块，无法直接通过 combo 服务合并。
1.0.2 强制要先通过 alias 配置，比如 alias: { jquery: 'jquery/1.6.4/jquery' }
在 jquery.js 里，都写成了 define("jquery", ...)
define(id, ...) 会对 id 进行 parseAlias
好处是：可以 combo 了，对内嵌模块支持也非常直观简单。不足之处也很明显：不再能支持同一模块的不同版本，以及不再支持 require("jquery/1.6.4/jquery")  这种直接写法
如何两全齐美呢？

一种思路
凡是 base 目录（http://a.tbcdn.cn/libs/） 下的模块，define 中的 id 要写全：
define('jquery/1.6.4/jquery', ...)

同时对 define(id, ...) 中的 id 做 parseAlias
这样，可以做到：

可 combo
支持内嵌模块写法
支持多版本
支持 require('jquery/1.6.4/jquery') 的直接调用

但由很明显的一个 bug:
seajs.config({
   alias: {
     jquery: 'jquery/1.6.4/jquery'
   }
});

seajs.use('jquery');

这时不能正常工作，因为 define("jquery/1.6.4/jquery", ...) 经过  parseAlias 虚拟到了 jquery/1.6.4/jquery/1.6.4/jquery

目前的解决思路
很明显，如果用 define('jquery/1.6.4/jquery') 封装， 则对于 libs 下的模块，define(id, ...) 中的 id 是真实 id，无 alias
问题在于，无法自动获知 define('xxx', ...) 是 libs 下的实际文件，还是内嵌等虚拟到 libs 路径下的模块。
对于内嵌等虚拟到 libs 路径下的模块，需要 parseAlias
对于 libs 路径下的真实模块，是不需要 parseAlias 的
因此，增加一个约定来解决：
凡是 libs 下的真实文件，比如 jquery.js, define 有 id 时，增加约定：
define("#jquery/1.6.4/jquery", ...)

凡是以 # 号开始的 id, 无需 parseAlias
通过这样一个约定后，可以解决上面的所有需求。唯一的不足是：增加了一个约定。

alias 调整
alias 不再推荐用来加时间戳：
// 不推荐
alias: {
  'a': 'a.js?t=xxx'
}

推荐使用 map 来加时间戳：
map: [
  ["a.js", "a.js?t=xxx"]
]

repo: seajs/seajs

license: mit


text:
增加一个 pc show 指令

在提问之前...

[X] 我填写了简短且清晰明确的标题，以便开发者在翻阅 issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
[X] 我基本确定这是一个新功能/建议，而不是遇到了 bug（不确定的话请附上日志）

说说你遇到的问题？
通过pc指令保存的角色卡不能直接查看，只能先通过pc load读取出来再st show，而这又会造成当前的群组临时角色卡失掉。
有什么好的想法？
仿照st show，增加一个pc show <角色名>指令，直接列出指定角色的属性。
其他内容
No response

先再看看，按去年设计思路是有点不太想要多功能指令的

repo: sealdice/sealdice-core


text:
Make plugin's "on" support |

Issue Description
When i write a plugin, i can use "on" to specify where should it run.
Now, "on" support master/node, HOWEVER, when i want one plugin run on both master and node, i need to write two same plugin, and only "on" is different.
So, i think maybe "on" can support "|" operation, just like "action".
For example, when i specify "master|node", that plugin will run on both master and node.
Type: feature request
Describe what feature you want
Additional context
Add any other context or screenshots about the feature request here.

https://github.com/sealerio/sealer/blob/main/pkg/plugin/utils.go#L37

I'm going to get this done.

authors: VinceCui YTGhost bxy4543

repo: sealerio/sealer


text:
Make the tests self-contained

Hi there 😊
Right now, the tests are not self-contained, as you manually need to start Consul that the tests can connect to.
It would be great if starting and stopping an appropriate Consul server with the correct setup could be done automatically by the tests.

Thank you very much for your suggestion! 😃
In the next couple of weeks, we have to update our build configuration for CircleCI. This will be the perfect opportunity to also rework the test setup.
I created an internal issue and close this one to prevent duplicates.

authors: goloroden seal-mis

repo: sealsystems/node-http-server


text:
Update build configuration

The build configuration of this project is outdated and may no longer work.
This pull request will be merged automatically if there are no conflicts.

:tada: This PR is included in version 4.0.30 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

repo: sealsystems/node-request-service


text:
Foreground Filtering

new feature to manually set foreground filters in search controller via config

It looks like the foreground filters are affecting the page history.
If you search for a term (ie. shorts), the foreground filter is applied as expected. But if you press the back button, it only removes the foreground filters and leaves behind the query being searched instead of going back to the previous page.
Also noticed that it doesn't seem to apply the foreground filters when integratedSpellCorrection occurs. Try searching for 'blu' on the demo store to see this.

repo: searchspring/snap


text:
Hide measurement tool when unavailable

Workshop participants most wanted the measurement tool before they drew a shape (I start fishing 1km offshore...), often to get the first point and a sense of scale. Suggestion to completely hide the measurement tool until it's available to use.

Thought this through with Abby a bit... Seems like the solution would be to kick the user into the "List Shapes" screen and out of the drawing context if they attempt to measure before drawing their first shape.
The better solution would be to support measurement at any point in the drawing process, but that's difficult to coordinate with mapbox-gl-draw on a technical level.

authors: avmey underbluewaters

repo: seasketch/next


text:
SAGA模式事务回滚只能通过补偿方法完成么

seata团队你好。SAGA模式下，假如我的实际业务非常复杂，涉及到很多表的增删改，这种场景下写补偿方法对冲掉正向的操作很难保证完全不出错。对于某些简单的事务我们可以写补偿方法，对于复杂的事务，是否有其他的途径可以实现回滚？
另外，假如补偿方法也失败了，这个时候如何处理？
期待解惑，谢谢！

@453166913 Saga provides two strategies for retrying forward and compensating backward.

目前正在尝试将lcn集成到AT模式上，看看能不能解决因为补偿导致的问题

目前正在尝试将lcn集成到AT模式上，看看能不能解决因为补偿导致的问题

authors: 453166913 lhtGit slievrly

repo: seata/seata


text:
Use executable-find to detect where TEE CLI is installed.

As per the feedback when publishing the package to MELPA, I should use  (executable-find "tf.cmd").
The catch is, the exact command name depends on the platform.
Also, I don't know "the right way" to run code on first load. Maybe something like "tfsmacs-config", like elpy does, can do the trick, and it sounds less intrusive than something running behind the scenes.

As per the feedback when publishing the package to MELPA, I should use (executable-find "tf.cmd"). The catch is, the exact command name depends on the platform.

that's fine because you are only changing the default value of a defcustom. Anyone can change the default value to something else.

authors: DamienCassou sebasmonia

repo: sebasmonia/tfsmacs


text:
Question: Comment Parser

Is there any comment parser similar to Commented in the Sprache library?

Would it make sense to configure the ParseContext.WhiteSpaceParser to also include the comments syntax?
Or should it be a separate property ParseContext.CommentParser.

I believe keeping it separate would be beneficial, in the event someone wants to do something with the comments instead of ignoring them.

authors: sebastienros shift-eleven

repo: sebastienros/parlot


text:
What happens if db pool or aiohttp session break?

currently this stops the script

Can we use something like this https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.Application.on_shutdown to recreate a session?

authors: ethanleifer zackgow

repo: secretanalytics/sn-mono


text:
SecureBoost组件的

Issue Type
Others
Source
binary
Secretflow Version
secretflow 1.5.0b0
OS Platform and Distribution
centos7
Python version
3.10.13
Bazel version
No response
GCC/Compiler version
No response
What happend and What you expected to happen.
按照官网的设置去运行组件，发现运行错误，该怎么配置

Reproduction code to reproduce the issue.
File \"/usr/local/lib/python3.10/site-packages/secretflow/device/device/heu.py\", line 645, in init
    'evaluators' in self.config and len(self.config['evaluators']) > 0
AssertionError: The current version does not support HEU standalone deployment mode

已经按照官网的组件组合去连接

https://github.com/secretflow/secretflow/issues/1237

代码意思是懂，那在平台上该如何操作呢

This error may raise if you try to train sgb in a single party. (There are no evaluators.) ，平台怎么设置才会可以多个parties

你好，特征列选择的时候，确保每一方的特征都有被选呢

你好，右边预测的数据是这样的，通过日志预测错误的原因在哪呢

预测特征列填的是x和y

训练的时候的特征要和预测保持一致

预测和特征都已经设置了x和y

XGB预测的时候报了这个错误，要怎么设置一下呢

使用双方特征训练出来的模型，然后预测的时候，不是需要用双方的特征去预测吗？
例如：
A节点：id1、f1、f2、y
B节点：id2、f3
训练出来模型后
使用新的一组数据
id、f1、f2、f3 去做预测。
预测结果，以上报错

hello， train_test_split 来确保训练集和测试集一样哈

你的意思是要对数据进行随机分割处理一下才不会报错么

如果训练预测集的特征列真的是对齐的，那也不应该有报错。随机分割的数据集 两个特征列肯定是对的上的，你把你现在的训练和预测数据做个全表统计之类的观察一下两边特征到底是不是对齐的？

想问以下NN分类的组件怎样才能够显示c出来使用的呢

authors: da-niao-dan xuzhijin

repo: secretflow/secretflow


text:
Fix chicken-egg issue for CircleCI integration tests workflow

The automatic config.yml pre-validation will fail if a dev orb is older than 90 days, so when that happens, the pipeline to update the dev orb can never be ran.
The fix is to not specify dev:latest as the default version (because it may be expired), but to use a stable prod version instead. I've also added some doc comments in the config.yml that clarify how these default parameters are overridden in the integration tests workflow.

See the next line: https://github.com/CircleCI-Public/Orb-Project-Template/blob/1.1.3/.circleci/config.yml#L21

A "dev:alpha" version must exist for the initial pipeline run.

What if it doesn't? And that's exactly what this PR solves.
And good point about using the description field for the comment, I'll do the same.

repo: secrethub/secrethub-circleci-orb


text:
Integrating Firebase Database in Django

We ask that you please be patient as our team works through approving and publishing all articles/tutorials in a timely manner. Allow 1-3 days for a topic to be reviewed and/or approved - allow 3-7 days for an articles to be reviewed and/or published.
Be sure to visit our Resources Page for tools, resources, and example articles to go over.
NOTE: (Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)
NOTE: We tend to stray away or tend not to publish reviews/comparisons of commercial product offerings.
We're looking for the first 2-3 paragraphs of the article that appropriately summarize what your article will be about.
Proposed title of article
Integrating Firebase Database in Django
Introduction paragraph (2-3 paragraphs):
This article seeks to introduce the reader to how the firebase database can be integrated in a django application.
Key takeaways:

Introduction to firebase
Using firebase as a database in Django app
Using an online database

References:
NA
Templates to use as guides

How To Guide Template
Software Review Template
Tutorial Template

Good afternoon and thank you for submitting your topic suggestion. @shosenwales
Your topic form has been entered into our queue and should be reviewed (for approval) as soon as a content moderator is finished reviewing the ones in the queue before it.

@shosenwales
How will this article differ from what is published our other blog sites

@hectorkambow
Readers will also learn how to authenticate using google

Okay, let's ensure that it adds value to the community. Thanks

authors: WanjaMIKE ahmadmardeni1 hectorkambow shosenwales


text:
[Machine Learning] Building a Web Crawler using BeautifulSoup and Scrapy Python Framework

Building a Web Crawler using BeautifulSoup and Scrapy Python Framework
With the advent of enormous data and the need for networking transmission has expanded globally. Various associations retrieve remote data from the web for various reasons. Pursuit updates in specific markets, collect daily supply and analyze rivals. In other words, Web crawlers are heading to become very important to the internet.
Web Crawler is essential in our search engines if we want to be able to gather updates from prominent websites. That is why I will be showing you how to build this spider robot using python. With specified rules, web crawlers which are also called spider or spider bots automatically surf or grab information from the internet.
Key takeaways
At the end of this tutorial you should be able to:

Understand basic Python syntax
Set up Python Environment
Understand the BeautifulSoup Library.
Understand the Scrapy Python Framework.
Build a Web crawler with the Information Gathered.

Article quality
I have been thinking about this project for a while and I found out that there are other tutorials on web crawlers, that is why I will be using BeautifulSoup and Scrapy python framework which are some of the most helpful python projects to find up-to-date information. You will need to use a multi-thread idea for this tutorial and I will be showing you how to use Python’s request module to make the crawler bot. It is Python’s open-source web crawling framework explicitly designed for web scraping and pulling data by using APIs.
Conclusion
With the quick advancement of technology over the internet, the web crawler is one of the most needful parts of our search engines to keep up with updates from favorite websites and blogs.
Thank you.

Thank you for submitting your topic @Adespscientist.
However, after some careful consideration, it struck us that this topic may be a bit over-saturated throughout other blog sites and official documentation.
We typically refrain from publishing content that is covered widely on the net or other blogs. As we're more interested in original, practitioner-focused content that takes a deeper dive into programming-centric concepts.
Please feel free to suggest an alternative topic.

authors: Adespscientist Kayere


text:
Using Tensorflow to implement Deep Q-Learning

Topic Suggestion
Proposal Submission
Proposed title of article
[Machine Learning] Using Tensorflow to implement Deep Q-Learning
Proposed article introduction
TensorFlow has received a lot of attention in recent years because of its deep learning capabilities. An AI subclass known as Deep Learning mimics the human brain's neural network in order to learn. There are many similarities between the human nervous system and the network created by Deep Learning models. It simulates the human brain's thought process. There are nodes in deep learning, each of which acts as a neuron. There is a great deal of discussion about deep learning.
Key takeaways
By the end of this article the reader will be able to understand:

What deep learning entails in TensorFlow
The reasons why we need Deep Learning Models in solving complex problems
Stepwise implementation of TensorFlow Algorithm
Reinforcement learning vs Q-learning

Article quality
It is imperative that I go into great detail to make my article stand out. Many approaches to the topic will be discussed in this article, with examples and explanations provided. Screenshots may also appear in my article when suitable. It's my intention to make it more appealing and accessible to beginners by simplifying the vocabulary. I will incorporate the significance of TensorFlow-based deep learning as well as its advantages. The implementation will be step by step.
References
N/A

Thank you for submitting your topic. @gracy20
After some careful consideration, it struck us that this topic may be a bit over-saturated throughout other blog sites and official documentation.
We believe this is the best way for students to build a great portfolio (for potential employers) is by building what does not exist and what can provide the most value.
Please feel free to suggest an alternate topic to explore. 🚀


text:
Auto expand rows

When running the app on iPhone 6, after adding the third picture, it should be on a line below, instead of scrolling off to the side. The same way the text entry field expands downwards, the container of the cells should also expand accordingly.
(BTW, fantastic work done on the StackViewController)

The demo app's implementation (ImageAttachmentView) uses a UIStackView to lay out the thumbnail images horizontally and UIStackView is limited to a single row or column.
Laying the thumbnails out in a single line is a limitation of a stack view, not a bug with the project.
From Apple's docs on UIStackView:

The UIStackView class provides a streamlined interface for laying out a collection of views in either a column or a row

@GJNilsen This was intentional, as explained by @jessedc (thanks!)

authors: GJNilsen indragiek jessedc

repo: seedco/StackViewController


text:
Feature/image slider

** Please provide as much detail as possible, but feel free to remove irrelevant sections **
We would like to build a image slider to display clients logo and search result by data from API
http://agile.seekasia.com/confluence/display/dbSEO/Featured+Companies+-+jobsDB
BREAKING CHANGE:
new image slider to display images and it is clickable.
it can rotate logo 1 by 1 every 5 seconds.
when mouse over, slider will stop to move. and after mouse left, it will move again.
RFC URL:
http://agile.seekasia.com/confluence/display/dbSEO/Featured+Companies+-+jobsDB
MIGRATION GUIDE:
Before:
After:
EXAMPLE USAGE:

Preview URL: http://seek-asia-style-guide--b595370cb0e8c6b2ba9d9d2a17f2f181676d48e0.surge.sh/ImageSlider

authors: andychanSA mengtzu

repo: seekinternational/seek-asia-style-guide


text:
Fix Cmake and include issues on linux.

Currently, following the instruction cannot compile successfully on Ubuntu 14.04 (my workspace).

nice commit!

repo: seetaface/SeetaFaceEngine


text:
deal with nans in my tutorial

Need to deal with nans encountered in the despiking function, and in turn make sure that zeros are not encountered in the denominator when trying to compute reflection coefficient series.

I actually see this warning message as well, however it doesn't seem to throw an error. I think what is happening here is that the despike function isn't written to deal with nan values or missing values. I should update the notebook on GitHub, especially since it has been about a year and a half since I wrote this, and it's surely not as comprehensive or elegant as it could be / should be. In the meantime, let me suggest three changes to you, that you should be able to get you back on track.
Change 1: add the following two lines of code to the despike function.
curve = np.nan_to_num(curve)
curve_sm = np.nan_to_num(curve_sm)
Change 2: we need to undo this change when we convert slowness (dt) into pvelocity. We can't divide by zero, but we can (oddly enough) divide by a nan
so add the following line of code before computing the pvelocity
dt[dt==0] = np.nan
Change 3: modify Z before computing reflection coefficients. Do this,
rho[rho==0] = np.nan
Z = pvelocity * rho
instead of this...
Inline image 3
So we don't encounter zeros in the denominator (which will cause an error) when doing this ,
Inline image 4

repo: seg/tutorials


text:
fix typos, add links

Hi all,
congratulations for this plugin release! Amazing to see SAM in Fiji! This PR just adds two links (please check if they make sense) and fixes some typos.
I hope these modifications are useful.
Best,
Robert

Yes they actually make a lot of sense! Thanks a lot and I hope you find it useful!

repo: segment-anything-models-java/SAMJ-IJ


text:
[BUG] Unable to run validator node.

Can somebody help to figure out what we should do here to fix the issue?  Stuck somehow here. Couldn’t find any support on Discord.

Can you provide more context of what you are trying to do here? Run a validator node locally? Or join an existing testnet?

Hi I'm trying to join existing testnet - Atlantic 2 testnet. Trying to run validator node there.
https://app.nodejumper.io/sei-testnet/sync I was following this guide and stuck with the following code
sed -i 's|^mode = "full"|mode = "validator"|g' $HOME/.sei/config/config.toml
seid tx staking create-validator
--amount=1000000usei
--pubkey=$(seid tendermint show-validator)
--moniker="$NODE_MONIKER"
--chain-id=atlantic-2
--commission-rate=0.1
--commission-max-rate=0.2
--commission-max-change-rate=0.05
--min-self-delegation=1
--from=wallet
-y
It doesn’t work to setup the validator. I'm just a new guy with little bit coding understanding. Any help is highly appreciated 🙏

@philipsu522 @yzang2019

@Shariful999 have you checked out https://docs.sei.io/full-node/run-a-sei-node yet? Most folks are able to get things working with those instructions. If you're still having issues, please follow up in our Discord server (https://discord.gg/sei).  Github issues might not be the best place to do this. Github issues are more relevant for actual bugs in the code rather than debugging help.

repo: sei-protocol/sei-chain


text:
maximumSelectionLength is overridden by other configuration options

The property "maximumSelectionLength" does not work when "closeOnSelect" is set to false. I can select more items without any effective limit.
Check out this fiddle where both situations are shown.
http://jsfiddle.net/f9jszen1/

Is there a way to work around this bug?

I'm also having this issue.

Here is a workaround (depending on your exact needs). Enable closeOnSelect and let the select2 dropdown reopen automatically each time the selection has changed:
       var poiCatSelection = $('#poi_cats');
poiCatSelection
	.select2({
		multiple               : true,
		closeOnSelect          : true,
		maximumSelectionLength : 3})
	.on('select2:selecting', function(){
		setTimeout(function() {
           poiCatSelection.select2('open');
	    }, 0);
	});

`

@Candyffm not really a perfect solution, because container would flash and options' position  may change

@mayashavin has identified that this is an issue with a few other configuration options as well.  From her issue (#4900):
Some of the following fields will override maximumSelectionLength:

query
tokenSeperators
closeOnSelect (set it to false with cause maximumSelectionLength) not working.

Libraries

jQuery version:1.11.1
Select2 version: 4.0.3

Browsers: Google Chrome
Operating System: Windows/Mac OS
Investigation: The dataAdapter prototypes get decorated with methods when maximumSelectionLength first, and with tokenSeperators later. Unfortunately, they both have same method name "query", and one will override the other in dataAdapter respectively.
Demo: https://jsfiddle.net/dpnminh/76shLmt2/

Having same issue fireFox 65

Yes. This issue is closed but not fixed.

Ok I found a workarround for this with little Js on select2.
We need to know that maximumSelectionLength is only not allowing user to open the dropdown, it doesn't limit the select inside dropdown if the dropdown kept opened with closeOnSelect.
So as a workarround I just added a listener on my select2 and dispatch a close once it attempts the value of limit :
I used this two options on my select 2 :
                closeOnSelect          : false,                 maximumSelectionLength: 3
And I added a condition on it change event :
 $('#appbundle_member_bachlormajors').on('select2:select', function (e) {                 if($(this).select2('data').length >= 3){                     $(this).select2("close");                 }             });

I found a solution that worked for me. #5533

until there is a merge of bug fix as @RedaMakhchan mentioned , his solution works perfectly. I made small mod to even pick the value automatically in solution here, so all you have to do now is configure as usual & copy paste the code here changing the element id..
The solution code below forces the dropdown to close if the user reaches the configured maximumSelectionLength
 $("#select2-element").on("select2:select", function(e) {
        if (
          $(this).select2("data").length >=
          $(this).data("select2").results.data.maximumSelectionLength
        ) {
          $(this).select2("close");
        }
      });

authors: Candyffm JacobLuckhardt RedaMakhchan alexweissman fkranenburg grunmin jmiguel-localvox nileio sparkhee93


text:
Speedup the Page object initialization

The problem
Page object initialization takes some time searching by selectors (css, xpath) and increasing proportionally to the fields count. Let's speed it up by simply init in a few threads
Details
org.openqa.selenium.support.PageFactory#proxyFields
private static void proxyFields(FieldDecorator decorator, Object page, Class<?> proxyIn) {
    Field[] fields = proxyIn.getDeclaredFields();
    for (Field field : fields) {
      Object value = decorator.decorate(page.getClass().getClassLoader(), field);
      if (value != null) {
        try {
          field.setAccessible(true);
          field.set(page, value);
        } catch (IllegalAccessException e) {
          throw new RuntimeException(e);
        }
      }
    }
  }

fields init can be parallelized. Or create the extension point of the framework to let end user init the fields in the bulk and use many threads using FieldDecorator.
Tell us about your environment

Selenide Version: 3.12.0
Chrome\Firefox\IE Version: does not matter
Browser Driver Version: does not matter
Selenium Version: does not matter
OS Version: does not matter

@deventh Hi there.
Do you get some metrics related to this improvement?
Can you please provide profit in numbers?

interested to see the gains, typically page objects should be small, having a huge class with many many locators is bad design and probably quite rare.

@deventh If I am not mistaken, Selenide doesn't load web elements immediately, but uses lazy loading. So, probably this optimisation doesn't have any effect...

@asolntsev page object fields are inited with the proxies. Now without changing the current API the one way to speed it up is call getters on fields in many threads.
Or provide the own implementation of how the fields are inited. Since the Selenide is the framework and for the org.openqa.selenium.support.pagefactory.FieldDecorator there is the default proxy-based implementation it would be nice to make it a bit more flexible for this purpose.
org.openqa.selenium.support.pagefactory.FieldDecorator could look like:
public interface FieldDecorator {
  Object decorate(ClassLoader loader, Collection<Field> fields);
}

instead of
public interface FieldDecorator {
  Object decorate(ClassLoader loader, Field field);
}

This will allow to build the custom FieldDecorator with fields init in many threads. It could be other implementation than default one.
I will provide the PR with example later

@deventh wait, it seems to be a bit over-engineering. Do you want to actually disable Selenide built-in lazy loading mechanism, and load all fields immediately (in many threads) to gain speed? How many milliseconds will you gain? Did you really try it?

Do you know that every following call to any of page object fields will intercept with the browser anyway? So, there will be many calls anyway. You cannot avoid all of them.
And what about the fact that lazy loading is really useful? Some elements may not exist at the moment when the page object is being initialised. Your solution will break many tests.

@asolntsev

Do you want to actually disable Selenide built-in lazy loading mechanism, and load all fields immediately (in many threads) to gain speed?

Surely no. But since there is a framework and as the end user I can choose the implementation I need for my particular case. FieldDecorator as interface allows me replace with a different implementation if needed. But this interface could be changed a bit to accept the Collection of fields instead of one by one

And what about the fact that lazy loading is really useful?

Yes, it is useful

Do you know that every following call to any of page object fields will intercept with the browser anyway? So, there will be many calls anyway. You cannot avoid all of them.

Yes. Also the model of keeping webdrivers (now are kept per each thread) could be changed to try load them in parallel. I will try to experiment

@deventh I am not sure I really understand what are you trying to achieve. How many milliseconds can this approach save? Do you have any numbers?
Anyway, we cannot change FieldDecorator because it's a Selenium, not Selenide class.
But well, if your experiments succeed, fell free to send pull request (even some draft variant). I am ready to discuss it. :)

@deventh I am closing the issue due to inactivity.
Feel free to reopen if you wish.

authors: asolntsev deventh rosolko symonk

repo: selenide/selenide


text:
downgrade WebDriverManager from 5.4.x to 5.3.x to support Java8

Starting from 5.4.0, WDM requires Java11+. But Selenide still supports Java8.
Let's upgrade to Java11 in major release Selenide 7.0.0

@asolntsev 5.3 wdm doesn't support chrome more than 114.

@asolntsev 5.3 wdm doesn't support chrome more than 114.

Hm... In some sense, it's even good news.
It means that we don't have other options than just require Java 11. :)

authors: BorisOsipov asolntsev


text:
How to set decimal precision in a column?

First, thanks for this great lib. I'm filling a table with data from a double array. However, I can't manage to print the table with exactly two digits after decimal point without generating extra columns.
Here's the code to generate the table:
double data[3][3] = {
  {3.4403, 5.1802, 0.0071},
  {18.931, 22.004, 0.0000},
  {  74.5, 100.01, 9.1110}
};

fort::char_table t1;

t1 << fort::header << "#" << "arrival time" << "departure time" << "waiting time" << fort::endr;

t1.column(0).set_cell_text_align(fort::text_align::center);
t1.column(1).set_cell_text_align(fort::text_align::right);
t1.column(2).set_cell_text_align(fort::text_align::right);
t1.column(3).set_cell_text_align(fort::text_align::right);

// Fill with data
for (int i = 0; i < 3; i++) {
  t1 << i;
  for (int j = 0; j < 3; j++)
    t1 << data[i][j];

  t1 << fort::endr;
}

std::cout << t1.to_string() << std::endl;

Output:
+---+--------------+----------------+--------------+
| # | arrival time | departure time | waiting time |
+---+--------------+----------------+--------------+
| 0 |       3.4403 |         5.1802 |       0.0071 |
| 1 |       18.931 |         22.004 |            0 |
| 2 |         74.5 |         100.01 |        9.111 |
+---+--------------+----------------+--------------+

I tried using std::setprecision and std::fixed from <iomanip> to print every cell with two digits after decimal point, but it did not work.
My attempts:

Adding std::cout << std::fixed << std::setprecision(2); before the line std::cout << t1.to_string() << std::endl;. Output is the same as before.

Replacing t1 << data[i][j]; by t1 << std::fixed << std::setprecision(2) << data[i][j];. Output:

+---+--------------+----------------+--------------+--+--+--------+--+--+------+
| # | arrival time | departure time | waiting time |  |  |        |  |  |      |
+---+--------------+----------------+--------------+--+--+--------+--+--+------+
| 0 |              |                |         3.44 |  |  | 5.18   |  |  | 0.01 |
| 1 |              |                |        18.93 |  |  | 22.00  |  |  | 0.00 |
| 2 |              |                |        74.50 |  |  | 100.01 |  |  | 9.11 |
+---+--------------+----------------+--------------+--+--+--------+--+--+------+

As you can see, it actually prints the values as expected, but it generates empty columns and disarranges the table.

Adding t1 << std::fixed << std::setprecision(2); before the first for loop. Output has issues similar to 2nd attempt:

+---+--------------+----------------+--------------+------+------+
| # | arrival time | departure time | waiting time |      |      |
+---+--------------+----------------+--------------+------+------+
|   |              |              0 |         3.44 | 5.18 | 0.01 |
| 1 |        18.93 |          22.00 |         0.00 |      |      |
| 2 |        74.50 |         100.01 |         9.11 |      |      |
+---+--------------+----------------+--------------+------+------+

Other attempts also did not produce the expected output. I'm sorry, but I did not find in the tutorials something related to this issue. What am I missing here? Thanks in advance.

Hi!
That's a bug. Thanks for reporting. I'll try to fix if possible.

Hi!
That's a bug. Thanks for reporting. I'll try to fix if possible.

Merged to develop.
Resolving.
Please reopen if it doesn't work for you.

Merged to develop.
Resolving.
Please reopen if it doesn't work for you.

Worked by adding t1 << std::fixed << std::setprecision(2) right after fort::char_table t1. Thanks for the fast fix.

repo: seleznevae/libfort


text:
Compares badly with PlasmaConfigSaver

I am trying to manage profiles. Right now I have three.

Card - light creamy, light latte with contrasting text in Event Calendar. Also matching default Konsole profile needs switching, and Dolphin terminal also.

Gruv is a grey-green dark profile for comfort, with matching colours in latte/konsole profile etc.

Nordic - (less dark) cold colours theme.

I was testing switching this morning, using shortcuts for restarting plasma and restarting kwin without logging out.
konsave fails to switch terminal (konsole and dolphin) and requires manual latte restart, and is vastly inferior to the plasmaconfigsaver.
konfsave fails to switch terminal (konsole) and fails to update the event calendar colours in latte.
As I say, PlasmaConfigSaver usually succeeds, though I sometimes need to do kwin restart and plasmashell restart again.
It is obviously interesting that you will have a config file. I would like to add a new default profile save path (i.e. default to ~/Dropbox/.config) and also add qbittorrent settings, as the dark icon works with profile 1, light icon with 3, and plasma icon with 2.

Since 0.4.0, the profile home path and a couple other things are configurable.

Assuming this is safe to close.

repo: selplacei/konfsave


text:
Add output prometheus-alertmanager

This adds a output plugin that allows to use query results from elasticsearch, transform and send them as to prometheus alertmanager API.
That way one can re-use existing prometheus alertmanager infrastructure that has lots of alert providers (email, slack, pagerduty, ...).
Note: prometheus alertmanager automatically starts alerts and deduplicates them when sent again. Alerts are closed after defined timeout time (configured in alertmanager).
See https://prometheus.io/docs/alerting/clients/

Thanks @bsingr .  Any chance you could add a bit of docs for this over in https://github.com/sematext/docs ?

@otisg fixed wording issue.
Please find documentation update here https://github.com/sematext/docs/pull/64

@bsingr thank you very much for the contribution. Would you like to write a guest blog post about your Logagent/Elasticsearch/Prometheus use case? If so, pls drop me a mail stefan.thies@sematext.com

authors: bsingr megastef otisg

repo: sematext/logagent-js


text:
Sending the Same Email to Multiple Recipients new version ?

documentation was not enough,
Can you help us with sample code to send an email to multiple people with php api
The example structure used in this link was not very helpful:
https://sendgrid.com/docs/for-developers/sending-email/personalizations/

Hello @hurkan-sert,
I believe this example may be helpful.
With Best Regards,
Elmer

authors: hurkan-sert thinkingserious

repo: sendgrid/docs


text:
Added full stop after statement

addtion of a full stop at the end of statement.
Description of the change:
Reason for the change:
Link to original source:

Closes #

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


text:
Update 2017-11-01.md

Description of the change: Missing space
Reason for the change: Typo fix
Link to original source:

Closes #

Changes done.

Hello @iamnishantmishra,Thanks again for the PR! It's HACKTOBERFEST! We want to show our appreciation by sending                                              you some special Hacktoberfest swag. If you have not already, could you please fill out                                              this form so we can send it to you? Thanks!                                             Team SendGrid DX

authors: iamnishantmishra thinkingserious


text:
Merging Old develop into Old master 4.23.2019 - Deleting and redirecting Event webhook pages, EASE API getting started

Description of the change:
Reason for the change:
Link to original source:

Closes #

Hello @Whatthefoxsays,Thanks again for the PR! We appreciate your contribution and look forward to                                              continued collaboration. Thanks!                                             Team SendGrid DX

authors: Whatthefoxsays thinkingserious


text:
Setting Content-Transfer-Encoding in v3

Issue Summary
A large number of our clients use Microsoft Outlook. Arbitrary line breaks have popped up across our emails. SendGrid's resources document this type of error:
https://sendgrid.com/docs/for-developers/sending-email/send-mime-messages-with-sendgrid/
We want to be able to set the Content-Transfer-Encoding as documented there. I think that this should be possible through SendGrid's SMTP API, which I believe was folded into v3 of this API, but I can't figure out how to set it. When I tried setting via the headers option, I get a "Can't set reserved headers error."
Steps to Reproduce

Pass "Lorem ipsum" paragraph into Dyanmic Template
Send to Outlook email
Get this response:

Should look like this (renders in Gmail):

Code Snippet
await sgMail.send(
       {
            to: xxxx,
            from: xxxx,
            templateId: templateId,
            dynamicTemplateData: dynamicTemplateData,
        }
);

Exception/Log
Error from using .send: https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#-Headers-Errors, error message Header can not be one of the reserved keys.
Technical details:

sendgrid-nodejs version: 6.3.1
node version: 11.15.0

Hello @nkumarcc,
The v3 API does not currently support overriding the Content-Transfer-Encoding setting.
The SMTP API library for node is located here.
I suggest you reach out to https://support.sendgrid.com to request support for overriding the Content-Transfer-Encoding setting.
Thank you!
With best regards,
Elmer

authors: nkumarcc thinkingserious

repo: sendgrid/sendgrid-nodejs


text:
"Home" bug

After loggin in, the home tab is displayed. It looks good, but once you press on one of the "latest" animes. You are automaticly logged out.
Once you login, you end up at "home" again. Meaning this represents a loop.

I've look into this and you don't log out but instead you are redirected to the the login screen because it's the default page when the app is unable to find the link (404 not found). The onclick function in the home page for the latest episode list is not implemented so I just need to add a link that will start playing the episode automatically.
In other words, it's implemented yet and It will be fix in the next version.
Thanks!

Great!
ty

repo: senpaiski/TopAnimeStream


text:
Typing information not available with moduleResolution: nodenext

Its possible I am misunderstanding something, or this setup is unsupported in which case feel free to close.
My environment is all esm:
"dynamodb-onetable": "2.6.2",
Typescript v5 with "moduleResolution": "nodenext"
package.json with "type": "module"
The issue is I have is no typing information available for imports. So if we e.g:
import { Table, Entity } from 'dynamodb-onetable'
The type of Entity is just import Entity.
Typescipt can see into:
node_modules\dynamodb-onetable\dist\mjs\index.d.ts
But the imports inside that are all broken as:
A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './Table.js' instead?ts(2846)
Adding import type I get:
Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './Table.js'?ts(2835)
I can fix this by adding the .d.ts extensions to the imports manually, or changing my moduleResolution back to node.

Which lines did you need to change in which files (adding .d.ts). I'd like to check if this change works for moduleResolution "node". i.e. can we safely make that change for all?

The solution may be to update the package.json exports types:
    "exports": {
        ".": {
            "import": "./dist/mjs/index.js",
            "require": "./dist/cjs/index.js",
            "types": "./dist/mjs/index.d.ts"
        },
        "./Dynamo": {
            "import": "./dist/mjs/Dynamo.js",
            "require": "./dist/cjs/Dynamo.js",
            "types": "./dist/mjs/Dynamo.d.ts"
        }
}

These are my current tsc compiler options if it's helpful:
    "target": "es2022",                                  /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
    "module": "es2022",                                /* Specify what module code is generated. */
    "moduleResolution": "Node16",
    "esModuleInterop": true,                             /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
    "forceConsistentCasingInFileNames": true,            /* Ensure that casing is correct in imports. */
    "strict": true,                                      /* Enable all strict type-checking options. */
    "skipLibCheck": true,                                /* Skip type checking all .d.ts files. */

Can you mock up a simple repo that demonstrates the issue.
We use the following with a pure TS app fine.
        "moduleResolution": "nodenext",
         "lib": ["esnext"],
        "module": "esnext",
        "target": "esnext"

authors: RalphSleigh frmrm mobsense

repo: sensedeep/dynamodb-onetable


text:
sensu_pushover_userkey & sensu_pushover_token

Hi
i understand i have to create a host_vars directory and inside that a yaml file like debian7.yml to define pushover key and token.
Exactly how do i find where these files are located  so i can define their paths?

As described in http://docs.ansible.com/ansible/intro_inventory.html#splitting-out-host-and-group-specific-data, they are relative to the inventory file. Please make sure to check the official documentation before asking questions that aren't specific to this role.

hi
my question was not how to write a hostvar file . I know how to do that.
I asked where is the path for the pushover and token keys

do i have to register somewhere to obtain such a pushover user and token ? this is what i don't understand

That section is just an example to show how things are deployed, if you want to actually use the pushover plugin for notifications, you'll need to sign up for https://pushover.net/, which is a paid service.

ok i do not want to sign up for this at this time so how do i bypass this ?

Again, that section is just an example to demonstrate how things are deployed.

ok i set sensu include plugins to false and i will re run the role
thank you

ok no more errors for these :)

repo: sensu/sensu-ansible


text:
Are the address and custom attributes for a proxy client possible?

I a normal client definition like below it's possible to configure the "address" attribute and add custom attributes like "environment".
{
  "client": {
    "address": "10.15.1.10",
    "application": "myapp",
    "class": "myapp-tomcat-prd",
    "environment": "prd",
    "keepalive": {
    },
    "name": "myapp-tomcat-01p.example.org",
    "role": "tomcat",
    "safe_mode": true,
    "socket": {
      "bind": "127.0.0.1",
      "port": 3030
    },
    "subscriptions": [

    ]
  }
}

Is that also possible for a proxy client?
I have the following definition:
{
  "checks": {
    "otherhost1_check_total_procs": {
      "command": "/usr/lib64/nagios/plugins/check_nrpe -H 172.0.0.10 -t 20 -c check_total_procs",
      "interval": 60,
      "name": "check_total_procs",
      "source": "otherhost1",
      "standalone": true
    }
  }
}

So how can I add a custom attribute "environment" to this proxy client above?

@pietervogelaar you can create and manage Proxy Clients with the Sensu API or the latest version of Uchiwa (or the Sensu Enterprise Dashboard). The documentation for the POST /clients endpoint can be found at https://sensuapp.org/docs/1.0/api/clients-api.html#clients-post, you can add your "environment" attribute 👍

@portertech Are these changes persistent after reboot of rabbitmq, redis or sensu server?

@pietervogelaar they persist in Redis (which is persisted to disk), in the Sensu client registry.

authors: pietervogelaar portertech

repo: sensu/sensu


text:
Update sbt-scoverage to 2.0.11

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

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scoverage", artifactId = "sbt-scoverage" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scoverage", artifactId = "sbt-scoverage" }
}]

labels: sbt-plugin-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #299.


text:
Add class S1IWWCSInput() and class S1IWWMSInput()

It might be premature to add it now considering no examples based on S1 GRD data are provided on readthedocs, but it still took me a little too long to figure out how to query S1 IW data.
I don't think it hurts to have it available already for testing purposes.

Thanks, @wouellette, appreciated. Keep the pull requests coming :)

authors: batic wouellette

repo: sentinel-hub/eo-learn


text:
添加：自定义表数据加载函数 loadData

对于一些特殊情况不便修改接口请求参数时，通过  options.loadData  来支持自定义请求格式
table.render({
    elem: '#demo'
    , limit: 10
    , height: 312
    , loadData: function (page, limit, success, error) {
        data = request.get(api)
        if (data.result) {
            success({
                code: 0,
                msg: '加载成功',
                count: data.result.total,
                data: data.result.rows
            })
        } else {
            error(data, data.error.message)
        }
    }
    , page: true //开启分页
    , cols: [[ //表头
        { field: 'id', title: 'ID', width: 80, sort: true, fixed: 'left' }
        , { field: 'title', title: '标题', width: 200 }
    ]]
});

Coverage decreased (-0.06%) to 25.049% when pulling eb65907edc8a6e69ca72bc8f9399fc2a4957d580 on dxkite:master into efb865266164af6e570cc99514f6e830f04c858d on sentsin:master.

authors: coveralls dxkite

repo: sentsin/layui


text:
Example of best practices in production?

I would love to see an example of current best practices when using Umzug for Sequelize migrations in a production system.
Can someone point me to a good example?
Thanks.

Sorry for delayed answer.
We don't have any real world examples right now. For now, if you look around the internet for projects using Sequelize you might find some example migrations too. In this or next year, I plan to play a lot with Umzug migrations in my lab. But it wont help you right now.

In v2.0 I'll add some usage examples.

authors: HolySamosa jukkah

repo: sequelize/umzug


text:
Map Rust's snake_case fields to/from Json's camelCase

I'm not sure if this is possible in serde, but it would be nice if json fields in camel case could be mapped to snake case rust field names, either explicitly via some macros or automatically by the deserializer. This way one could adhere to conventions in naming both on the frontend and backend (camel in json/JS, snake in Rust).
My apologies if this feature exists and I simply missed it, I'd appreciate some pointers.

You can use serde(rename_all = "camelCase") on a struct to map the fields this way.
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
struct Mandreyel {
    aaa_aaa: u8, // deserializes from json "aaaAaa"
    bbb_bbb: u8,
}

That is exactly what I'm looking for, thanks! :relaxed:

authors: dtolnay mandreyel

repo: serde-rs/json


text:
Decide whether Syntex bumps require a Serde major version change

@alexcrichton https://github.com/serde-rs/serde/pull/346#issuecomment-223723712

Changes like this which update syntex, a public dependency of serde_codegen (e.g. it reexports types from syntex) are actually a breaking change for the serde crate. Could this be signaled with a major version update or holding off the upgrade? This unfortunately breaks any other crate which is depending on serde_codegen as it may get a mismatch of syntex versions otherwise.

We're probably damned either way. If Serde were on version 0.33, the 275 crates that depend on Serde would be fragmented across all of them (about half are still on ^0.6) and would not work together.
On the one hand (no major version change), we occasionally break crates that use a ^ dependency on Serde and also have another dependency on Syntex. Where this is unacceptable, you could use an = dependency.
On the other hand, we would never break ^ dependencies but practically every time you do cargo update you would end up in a broken state until 275 crates synchronize their Serde dependency.

Seconding what @alexcrichton said, publishing breaking changes as a "patch" version breaks our published crate (which has a ^ dependency) pretty regularly.  Semantic versioning exists to address this issue, and publishing breaking changes as a patch violates semver and makes useless the entire syntax for dependency version specification.
Correctly incrementing versions according to semver would allow the 275 crates that depend on Serde to synchronize their dependencies in a meaningful way, instead of discovering breaking changes when published crates with ^ dependencies suddenly break, which patch version increments should not cause.  It may be difficult but it is at least correct, and meaningful.

Except that anything goes before a project is 1.0 in SemVer, and Serde is very much pre-1.0, so if you are using SemVer's rules for your argument, it doesn't apply here.
I think the way it works now, though painful, is acceptable and correct. The pain we're feeling is because we're depending on a bleeding edge library for a bleeding edge feature of a young programming language. Monkeying around with SemVer at the library level is just using low quality band-aids in an attempt to treat the fundamental issue, which is that this is all built on top of an unstable compiler feature. No one is forced to use Serde if they need more stability. Our pain should just be a signal back to the Rust team about how important a long term solution for this is. And they are already aware. That's what the macro reform RFCs are for.

Ultimately, my concern is a practical one - I'd like to be reasonably sure that when I publish a crate, it won't be broken retroactively by a patch to one of its dependencies.  I think serde is mature enough and widely enough adopted that it should make an effort to avoid that if it can.
It is true that "anything goes" pre-1.0.0 with SemVer, but that doesn't mean the idea behind it should be thrown out just because it technically can.  The goal is to avoid dependency hell, and I think there's a perfectly reasonable middle ground between following post-1.0.0 semver to the letter and publishing large, breaking changes in a "patch" release.

@adimarco this is not a case of "publishing large, breaking changes in a "patch" release."
The breakage we are discussing is a result of Syntex version bumps. Why are we bumping Syntex versions? Because the nightly compiler has changed, and the previous Syntex does not compile anymore!
If we are bumping a Syntex version, your code already doesn't compile on nightly even without the bump.
Consider the following situation:

adi-lib 0.1.0 depends on serde ^0.7 and syntex ^0.33
serde 0.7.8 depends on syntex ^0.33

Suppose the next nightly breaks Syntex and 0.33.0 no longer compiles. We fix it and release syntex 0.34.0.
Before any version bumps in adi-lib or serde, what does the situation look like? Well, on the old nightly things still work. But on the new nightly nothing works because syntex 0.33.0 does not compile.
There are two ways to proceed.

Bump serde to syntex ^0.34 and release serde 0.7.9.
Now what does the situation look like? On the old nightly, adi-lib has been broken because of the syntex version clash. On the new nightly, adi-lib is also broken but the majority of other Serde users probably work.

Bump serde to syntex ^0.34 and release serde 0.8.0.
What does the situation look like? As in (1), adi-lib is broken on both old and new nightly. But also literally all other Serde users are broken and need to individually bump their Serde dependency before anything works.

Given this, please justify why (2) is better without hand-waving about SemVer.
Yes we break your code on the old nightly, but we give your code a nonzero chance of working on the new nightly, which is the one I hope people care about.

I think part of the disagreement here stems from the fact that I don't care
about nightly builds at all - the crate I'm publishing is targeted at
stable Rust.
If the priority is nightly builds, and the expectation really is that
libraries dependent on serde publish a new version every time there's a
syntex version bump, I simply need to find a more stable way to parse JSON.
On Tue, Jun 7, 2016 at 10:24 AM David Tolnay notifications@github.com
wrote:

@adimarco https://github.com/adimarco this is not a case of "publishing
large, breaking changes in a "patch" release."
The breakage we are discussing is a result of Syntex version bumps. Why
are we bumping Syntex versions? Because the nightly compiler has changed,
and the previous Syntex does not compile anymore!
If we are bumping a Syntex version, your code already doesn't compile on
nightly even without the bump.
Consider the following situation:

adi-lib 0.1.0 depends on serde ^0.7 and syntex ^0.33
serde 0.7.8 depends on syntex ^0.33

Suppose the next nightly breaks Syntex and 0.33.0 no longer compiles. We
fix it and release syntex 0.34.0.
Before any version bumps in adi-lib or serde, what does the situation look
like? Well, on the old nightly things still work. But on the new nightly
nothing works because syntex 0.33.0 does not compile.
There are two ways to proceed.

Bump serde to syntex ^0.34 and release serde 0.7.9.
Now what does the situation look like? On the old nightly, adi-lib has
been broken because of the syntex version clash. On the new nightly,
adi-lib is also broken but the majority of other Serde users probably work.
2.
Bump serde to syntex ^0.34 and release serde 0.8.0.
What does the situation look like? As in (1), adi-lib is broken on
both old and new nightly. But also literally all other Serde users are
broken and need to individually bump their Serde dependency before anything
works.
Given this, please justify why (2) is better without hand-waving about
SemVer.
Yes we break your code on the old nightly, but we give your code a
nonzero chance of working on the new nightly, which is the one I hope
people care about.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/serde-rs/serde/issues/356#issuecomment-224352299, or mute
the thread
https://github.com/notifications/unsubscribe/AAZr_PtimrNXfQCv72qkmm72IbLo_t2Wks5qJalFgaJpZM4IvOmq
.

@adimarco

Ultimately, my concern is a practical one - I'd like to be reasonably sure that when I publish a crate, it won't be broken retroactively by a patch to one of its dependencies

Then what is the problem with you doing what @dtolnay advised in the issue itself?

Where this is unacceptable, you could use an = dependency.

I think part of the disagreement here stems from the fact that I don't care about nightly builds at all - the crate I'm publishing is targeted at stable Rust.

I guess that's the root of it. For users of nightly these aren't breaking changes because they don't even use Syntex. It is the opposite - the nightly compiler broke their code, we fix it for them, and because there is no major version change they get the fix immediately.
That makes this is a decision about whether Serde caters toward nightly or stable users.
If nightly, the current versioning behavior is correct. Stable users occasionally get broken in exchange for having a share of the codegen fun.
If stable, we should just never bump Syntex versions and stop supporting nightly - no breakage ever.
The best of both worlds is that we keep the current behavior of not changing major versions on Syntex bumps, and stable users use an = dependency.

If there were an extra digit in semver (0.x.y.z) we could use a scheme where "z" is incremented on non-breaking changes, "y" is incremented on syntex bumps, and "x" is incremented on breaking changes. Nightly users would depend on ^0.x and stable users would depend on ^0.x.y. Does anyone know whether we can make this work?
The only difference from an = dependency is that stable users receive non-breaking changes...

@jmesmon - The problem with an = dependency, as @indiv0 points out in another discussion is:

Wouldn't that fix result in any crate which uses both rusoto and another crate depending on serde failing to compile unless the serde versions match exactly?

I guess that's what you want but that means that downstream crates can't lock the serde dependency to a common version between rusoto and other packages, unless it's exactly the one you specified.

But as @dtolnay points out above, the root question here is whether the priority is nightly builds (which are actually fixed by these updates) or stable (which has published code broken by them).  As my crate targets stable Rust, I obviously fall in the latter camp, but I suspect the answer is going to be a priority of nightly.
I'll have to think on it, but requiring stable users to use an = dependency for the desired behavior seems reasonable to me at first glance.

If there were an extra digit in semver (0.x.y.z) we could use a scheme where "z" is incremented on non-breaking changes, "y" is incremented on syntex bumps, and "x" is incremented on breaking changes. Nightly users would depend on ^0.x and stable users would depend on ^0.x.y. Does anyone know whether we can make this work?

@dtolnay - it looks like that might work - http://semver.org/#spec-item-9

Wouldn't that fix result in any crate which uses both rusoto and another crate depending on serde failing to compile unless the serde versions match exactly?

I would think additional major version changes only make this worse.

If there were an extra digit in semver (0.x.y.z) we could use a scheme where "z" is incremented on non-breaking changes, "y" is incremented on syntex bumps, and "x" is incremented on breaking changes. Nightly users would depend on ^0.x and stable users would depend on ^0.x.y. Does anyone know whether we can make this work?
@dtolnay - it looks like that might work - http://semver.org/#spec-item-9

Good find. If Cargo supports this, let's start doing "0.x.y-z".

Ah the awkward thing will be those are "pre-release" versions, so if Serde is on 0.7.8-0 then ^0.7.8 will not see it. I suspect this will cause a lot of confusion.
How about we bite the bullet and release the next breaking change as 1.0.0, then follow an x.y.z scheme where z is incremented on non-breaking changes, y is incremented on syntex bumps, and x is incremented on breaking changes? We don't need to complicate things to stay away from 1.0 - it means only what we say it does.
Whatever we decide, I filed #357 for me to remember to document it in the readme.

How about we bite the bullet and release the next breaking change as 1.0.0, then follow an x.y.z scheme where z is incremented on non-breaking changes, y is incremented on syntex bumps, and x is incremented on breaking changes?

Once 1.0 is reached, minor versions are not supposed to cause breaking changes, but the entire discussion revolves around syntax updates being a breaking change. Using this model would cause serde to deviate from semver significantly.

Right, but we discussed our version numbers are catered toward nightly, for which the minor version changes would not be breaks (they would un-break things). The proposal conforms to semver for nightly users, and allows stable users to take advantage of semantic information in the version number (although different from semver).
The proposed schemes so fare are:

0.x.y (current scheme)

Nightly users depend on ^0.x
Stable users depend on =0.x.y
Pros:

simplest

Cons:

stable doesn't receive non-breaking changes

0.x.y-z

Nightly users depend on ^0.x
Stable users depend on ^0.x.(y-1) (I think...?)
Pros:

semver
nightly and stable both receive non-breaking changes

Cons:

unconventional for Rust crates
the (y-1) is confusing

x.y.z

Nightly users depend on ^x
Stable users depend on ~x.y
Pros:

nightly and stable both receive non-breaking changes
second-simplest

Cons:

not conformant with semver for stable users
tilde requirement is unusual

I vote for the current scheme, with second choice being x.y.z. Note that the latter is SemVer-compatible, because all of this is unstable.

Keep in mind downstream crates can also do >= 0.x.y, < 0.u.v, where u > x. (e.g. >= 0.31.0, < 0.33.0) and then bump the maximum version as they test it for breakages (unless they've changed it recently, this is what diesel-rs does).

Also I don't like the categorical separation of "nightly" and "stable" users. I write all my code on nightly, but test it on both nightly and stable. I never let builds break on master for stable, though.

Also I don't like the categorical separation of "nightly" and "stable" users.

I am using "nightly" to mean "users of the compiler plugin" and "stable" to mean "users of syntex."
Unfortunately Serde doesn't have any control over this categorical separation. We need the same serde-codegen code to compile against both Syntex and nightly rustc libsyntax. When libsyntax breaks serde-codegen, we fix serde-codegen (or quasi or aster) which requires committing the new libsyntax code into Syntex which turns into a breaking change for some Syntex users.
Essentially we end up with versions A and B of Serde where A doesn't compile on nightly and B doesn't compile on stable. Given a single Serde dependency, there would be no way for you to declare it in such a way that it consistently works on both.

I write all my code on nightly, but test it on both nightly and stable. I never let builds break on master for stable, though.

I guess maintain separate Cargo.toml and Cargo.lock files for the two. For the nightly one use ^0.x and for the stable one use =0.x.y (or as appropriate, based on what scheme we settle on).
There is probably some lift here that could be provided by tooling, if we are able to distill this into a Cargo feature request.

Can we make this work through features? Only bumping the syntex dep for the nightly feature?

@dtolnay
Thanks for opening this issue! I'll see if I can weigh in and perhaps help out a bit. The motivation for my comment was that I have a few things here and there which are using serde, but I personally try to avoid nightly like the plague so they're all on stable Rust. From my perspective it should be the case that usage of stable serde is like Rust, it's stable and you have a nice experience beyond the ergonomics.
I think it makes sense for nightly users to continuously have to upgrade serde in order to literally fix compatibility with upstream libsyntax, but one major release of serde to me needs to pin to one version of syntex. This basically means that the entire 0.7 release series on stable Rust has only one version of syntex_syntax and can parse basically one revision of the language. This in turn means that all active usage of syntex_syntax in codegen scripts (e.g. when you register generators) will all work together.
I disagree that the solution here is = dependencies on stable and ^ dependencies on nightly. In theory we want the usage of serde on stable to be idiomatic, right? Additionally, as a stable serde user, I'd also like to pick up bug fixes without having to perform major upgrades. Unfortunately it's also a violation of Cargo's interpretation of semver for 0.a.b to break compatibility with 0.a.(b-1), and this ends up causing a lot of problems in the ecosystem as that's the idiomatic way to depend on things.
The codegen crates understand if they're using nightly Rust, right? In theory they could have two code paths, one for the nightly version of syntax and one for the stable version of syntex_syntax I would think. This would be a pain to maintain but would probably be less work overall than trying to drag both the nightly and stable ecosystems forward.
I guess basically what I'm getting at is that if we really want to promote serde we can't hamstring the stable usage. There either needs to be a way to solve this at the heart (e.g. don't make syntex_syntax a public dependency, not sure if this is possible), or I think it's worth going to great lengths to ensure that stable serde has the most ergonomic experience possible.

Just to clarify, when people are saying "major" version in this thread, they are actually meaning the minor version according to SemVer, right? i.e. MAJOR.MINOR.PATCH

To me this is less so about strictly following the semver spec and instead delivering stability as a feature of serde itself. This is then communicated in Cargo through semver versions, but the crux of it is what the stability story of serde is.
Cargo today considers 0.7.1 semver compatible with 0.7.2, despite what the spec says otherwise. This means that the practical expectation of the Rust community is that the two are compatible and only bug fixes or new additions were made in 0.7.2.
I think when I personally refer to a major version upgrade what I really mean is any semver-incompatible upgrade, not necessarily specifically the major version in the semver number.

It's worth considering (as has been hinted at in previous comments) that pure semver (or rust's "practical expectation" semver) could be insufficient for serde to provide a stability guarantee while still achieving it's development goals (ie: allow use with nightly rust to obtain actual line numbers, or stable rust for deployment).
Perhaps we should consider what extensions to semver would be needed for practical use.

I added the naive implementation of Alex's proposal to the chart in https://github.com/serde-rs/serde/issues/356#issuecomment-224456303 as 0.xy.z (as distinct from 0.x.yz). That means increment the middle number both for ordinary breaking changes and for Syntex bumps which are breaking changes only for stable.

I filed #358 to investigate whether we can do away with the public dependency on Syntex. That way Syntex bumps would not be breaking changes for anybody (except in the rare case that Rust itself breaks backward compatibility).
This would solve all problems right?

@dtolnay yeah if syntex is not a public dependency that'd definitely solve the problem! (not sure if that's possible though)
Note that my suggestion is to have serde 0.x.* track essentially just be bug fixes, and the way it would work is that when the nightly feature is enabled on serde-codegen it links to libsyntax and exports those APIs (issuing bug fix releases to update this dependency when it breaks) and when the nightly feature is not enabled it just tracks one stable version of syntex_syntax. This should mean that the codegen crate itself may get complicated as it has two divergent code paths, but the benefit is stability which is quite nice!

PR #362 allows using serde_codegen on stable without exposing the Syntex dependency.

Serde 0.7.9 adds an alternative way of writing build.rs that avoids exposing Serde's dependency on Syntex.
// build.rs
pub fn main() {
    let out_dir = env::var_os("OUT_DIR").unwrap();
    let src = Path::new("src/main.rs.in");
    let dst = Path::new(&out_dir).join("main.rs");

    // no more public Syntex dependency
    serde_codegen::expand(&src, &dst).unwrap();
}

For stable users using serde_codegen::expand, Serde bumping its Syntex dependency will no longer be a breaking change so we will plan to stick with the current versioning scheme. We can remove serde_codegen::register in 0.8.0 unless someone has a reason to keep it - that discussion can continue on #358.
Thanks everyone for the ideas and feedback.

@dtolnay: this is great! nice job. For 0.8, we should just get rid of serde_codegen::register if it'll fix these problems. Having users have to do multiple passes doesn't seem to be that bad of an option.

authors: adimarco alexcrichton dtolnay erickt indiv0 jimmycuadra jmesmon jwilm oli-obk

repo: serde-rs/serde


text:
de: Make flattened structs and aliases interact correctly.

The issue is that FlatStructAccess has no access to the aliases of the struct
it's deserializing.
Ideally we'd try to serialize the key rather than checking whether we're going
to use it before-hand, then actually take the value out, but that happens to be
tricky with the current seed API.
So we need to somehow get the aliased names back to FlatStructAccess. Introduce
a serialize_struct-like API that takes them in a backwards-compatible way. For
parallelism, and since we also support aliases on enum variants, also extend the
struct_variant API in a similar way. I'm open to better ways to fix it, but I
can't think of any other that isn't a breaking change...
Fixes #1504.

r? @dtolnay

That's sort-of a breaking change, plus other serialize_struct implementations that use the fields use it as a hint to pre-allocate storage, which in the case of aliases may vastly over-allocate.

Ah, I haven't heard of Deserializer impls pre-allocating storage based on deserialize_struct. Do you have an example of a format like that? Ordinarily it would be the other way around; the Deserializer impl is aware how much data is in the input, and the Deserialize impl needs to pre-allocate based on MapAccess::size_hint.

Blerg, I was misreading code (was reading Serializer impls indeed).
But searched for a bit and found bits that would look at best fishy with that change. For example bincode serializes structs as tuples, and takes fields.len():

https://searchfox.org/mozilla-central/rev/06578bfadb5bdc5faee81f7e9b3c3fed21e616e0/third_party/rust/bincode/src/de/mod.rs#361

I haven't dug about whether this would break bincode for sure. I'm happy to dig out a bit. If it's just lying about a too large size hint it may be ok I guess....

Is there any change to the status of this PR? I just ran into this issue in one of my projects, and it would be nice to have it fixed assuming this implementation covers all bases

Same here. It's August and no movement. @dtolnay @emilio can this conversation be resuscitated or should we take up the mantle?

Ping @dtolnay

Ran into this while trying to make field name changes in a backward-compatible way.

authors: cosmicchipsocket dmarcuse dtolnay emilio jnicholls jplatte


text:
Use copier manager

Ref: https://github.com/serious-scaffold/ss-pybind11/pull/31
copierConstraint

I try to set constraint for copier with the below snippet but renovate schema can't recognize it.
{
  "constraint": {
    "copier": "4.9.1"
  }
}

I try to set constraint for copier with the below snippet but renovate schema can't recognize it.
{
  "constraint": {
    "copier": "4.9.1" // or "==4.9.1"
  }
}

I got the same problem. :-(

authors: huxuan msclock

repo: serious-scaffold/ss-python


text:
Handle phantom mouseevents

I abandoned the other PR and created a new one. I had some weird crap happen with git that I didn't want to try and fix :confounded:
Suffice to say, this PR has the coffee file updated. I don't know why the html file is different than what you have in your master. But that's what the grunt docco task spat out.
Here is the comment from the other PR:

I was waiting and waiting for my idle event to occur but it never would. After turning on monitorEvents(window) in Chrome devtools I could see why. There were mousemove events occurring when the mouse wasn't actually moving! I have a wireless mouse, so I just turned it off with the switch. Still, phantom mousemove events kept pouring in at random intervals. I did some Googling and I'm not crazy. This does happen to other people. So I put in this bit of code to filter out mousemove events where there is no actual movement. It fixed my problem.

I'll implement your changes to new version. Thanks

authors: mikesigs serkanyersen


text:
🛑 [Tiana Lemesle] Portfolio is down

In e7bd7fe, [Tiana Lemesle] Portfolio (https://tianalemesle.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: [Tiana Lemesle] Portfolio is back up in c12a26d after 17 minutes.

repo: server-KaTys/status


text:
Set serverless-http and @aws-sdk/client-s3 as peerDependencies.

These two packages are not specifically required to run open-next.
However, they are required in order for the lambda functions to be bundled correctly. Therefore, it makes sense to require them to be installed as dependencies of the Next.js application we are trying to bundle and not as dependencies of open-next itself.
This enables open-next to be used with stricter package managers such as pnpm.

Hey @Shiroy, I make some progress on this over the holidays. I didn't want to have the users install packages "OpenNext" uses. I will share what I have later today, just have to iron out some kinks.

My point is that package managers such as pnpm won't install open next dependencies as the application dependencies.
This prevents the lambda bundler from finding the package required by your lambda functions.
You don't have this issue with npm as everything is merged together.
Let me know if I can help you.
Best,

Got makes sense!
OpenNext used to move the adapters to user's app .open-next/.build and perform the build there, which break pnpm b/c the two dependencies won't be found as u describe.
I just published v0.4.2. It will do the build inside the OpenNext folder, and write to .open-next/.build. This way, it will find the dependencies.
Can you see if v0.4.2 works for ur setup?
^ Here's the pr #20

@fwang it works on my setup !
I haven't tried the result on Lambda yet, but now functions are bundled ant built correctly.

authors: Shiroy fwang

repo: serverless-stack/open-next