Not possible to use with SQLITE mail database?

Is it possible to use this with the mail server being sqlite? the MAIL_DATABASE_URL by default is set to mysql but my database is an sqlite database, so it's unable to reach the sqlite3 via mysql requests

Yes it is not possible yet, but you actually can modify it to connect to sqlite


Elasticsearch 5.x Support

This issue serves as a central spot to enumerate compatibility fixes that need to be done to support the breaking changes in the 5.x series.

[x] bin/plugin changes (now under bin/elasticsearch-plugin)
[x] Several tests use the "string" field mapping; string has been replaced by either keyword (for non-analyzed fields) and text (for large analyzed fields)
[x] Ensure there's no fallout from a change which removes the cluster name from the data path
[x] Repository URLs have changed for yum/apt
[x] Certain command-line JAVA_OPTS parameters (https://www.elastic.co/guide/en/elasticsearch/plugins/master/_other_command_line_parameters.html#_proxy_settings) - all -Des.* settings need to be replaced with -E*
[ ] Handle management of the 5.x logging configuration file, log4j2.properties

where are we upto with this?  now that Elastic search 5.0 is GA, it would be helpful to deploy it with Puppet.

The main blocker right now is that last item, wherein Elasticsearch command-line options need to be translated from -Des.* to -E* for all versions >= 5.x. I don't have any fixes in the pipeline right now, though I'll be looking to fix that when I get some time to give the module some attention (PR's are also welcome).

bummer!  smashed up my elasticsearch cluster due to me thinking this would work with ver5.

I think the rpm / deb repo urls are different now also.

I'm going to see if I can't knock this out. The repository URLs are an easy fix, but I'm going to have to go with one of two options for changing the Java options:

Implement some sort of solution with a native type/provider in order to access the Package[elasticsearch] type's version parameter. This is the "most correct" option since Puppet is managing the package natively and can find out the version of the installed package through normal means.
Hack around it by looking at the repo_version or package URL and trying (with a regex?) to guess at the Elasticsearch version to use the correct flags.

Option 1 is the preferable option, but I honestly do not know how I would do that. From within a native provider, I can call @resource.catalog.resource('Package[elasticsearch]').provider.properties[:version] and get a known, reliable, installed version number across distros, but because templates are evaluated at catalog compilation time, and the provider can get called mid-run on an agent (and thus can't be relied upon when writing the template), using this method call to write the right flags isn't straightforward.
Option 2 should be workable, and it's probably the  route I'll take, but I'm wary of the implications down the road given that the init script content will rely upon a regex to parse a version from a few potential sources in the module.
/cc @jarpy here, I'd be curious if you have other potential solutions. I'm going to see what option 2 looks like for the time being.

Yesterday I had a play with Elastic Search 5 and the puppet module, my findings are:
new files, jvm.options and log4j.properties probably need to be copied into the instance directory, for each instance type.
JVM memory ideally should then be set with jvm.options  - although it seemed to be ignored - anyone know how it works?
The augeas component that writes the /etc/sysconfig/elasticsearch-instancename
file needs to not write CONF_FILE, as this file is I think not compatible with Elastic Search 5.  See the default init script even has a elasticsearch-systemd-pre-exec script which checks to see it's not set.
WorkingDirectory needs to be set in the systemd startup for an instance I think
Checks must be in place, because WORK_DIR, CONF_DIR, DATA_DIR and LOG_DIR variables cannot be empty, elastic search won't start with empty values
A number of other params are in the standard systemd file, that maybe should exist in the instance version, such as:
TimeoutStopSec=0
KillSignal=SIGTERM
SendSIGKILL=no
SuccessExitStatus=143

The alternative, I used because jvm.options seems ignored, was to set ES_JAVA_OPTS in /etc/sysconfig/elasticsearch-instance

Don't forget that bootstrap.mlockall changed to bootstrap.memory_lock. You also can't set the default scripting language or index parameters in elasticsearch.yml, and Elasticsearch won't start if it sees logging.yml in its config directory.
From personal experience.

I would be more inclined to create a new major version of the module that sacrifices backward compatibility for simplicity. The module could even be released as "version 5" to make explicit which version of Elasticsearch it supports in a really obvious way that is aligned with the versioning scheme of the Elastic products themselves.
Maintaining backward compatibility clearly means more conditional logic/more complexity that will grow over time. I think there is a definite threshold at which the benefits of simplicity and maintainability outweigh the advantages of backward compatibility. Where that threshold lies is, of course, not a provable fact, but a matter of taste. For me, now is an excellent time for a new major version which would allow the shedding of a good deal of conditional complexity.
I like the user story that says "Elasticsearch v5? Use the version v5 Puppet module". I also like the stability that this could offer to people who will be running pre-v5 Elasticsearch versions for a while. A new major version would enable aggressive refactoring and API changes where appropriate, without breaking people's v2 clusters as they track minor fixes in the (relatively static) V2 compatible module.

I'd be more inclined to release a new major version that sacrifices backward compatibility for simplicity. As more conditional logic is added, any code base gets harder to read, maintain, and test. I believe there is a threshold somewhere at which conditional complexity costs more than the value of backward compatibility. While the location of that threshold is not a provable fact, but of course, a matter of taste, I think now is a great time to consider a new major version. It could even be labeled as "version 5" of the module, making it immediately obvious which version of Elasticsearch it's intended for, and aligning the versioning with the core Elastic products themselves.
I like the user story that says: "Elasticsearch v5? Use the v5 Puppet module". I also like the stability that this could offer people who will be running v2 clusters for a while yet. A new major module version could enable aggressive refactoring and API changes, without breaking things for people who are tracking minor fixes to the (now relatively static) v2 Puppet module branch.

Apologies to those who are watching this issue and received roughly the same message from me twice! I thought that GitHub had black-holed my first, lovingly crafted attempt. 😖

I would share my point of view...
Puppet is done for automation. Breaking change and no backward compatibility means potential manual tasks to be performed.
Indeed, if you are handling a small cluster and you have no strong constraint on outages, this is fine.
I think developing a separated module can be interesting, but everything should be wrapped by a "meta" puppet module which will include the 2.x or 5.x depending on the version we are willing to use.

@tylerjl I've been mucking with this a little bit. Would it make sense to add another fact to Facter named elasticsearch_version and leverage that globally? I can PR an example of what I'm thinking if it would help. With this fact and the repo_version parameter, this should cover all bases for the remaining downstream configs right? This would allow for maintaining backwards compatibility with 2.x while allowing us to make the necessary changes for 5.x.

@rcalixte a fact would be great, but there are issues with that solution: from what I understand, facts are loaded at puppet start time (before catalog compilation) and thus if Elasticsearch is not installed, the fact won't be populated for any clean install of Elasticsearch using this module. You mention repo_version, which would help, but there are lots of other was people can install Elasticsearch without relying on the repository (for example, just passing a deb/rpm to package_url) so there are a couple of different sources that the Elasticsearch package can come from.
That being said, if there is some way to "delay" the loading of a fact until it's absolutely necessary (that is, by the time the package has been installed) then that might provide a way to get the package version consistently. Bear in mind that the current way init scripts are written would have to be changed, though, since any calls to template() happen on the puppetmaster at catalog compile time and would have to be delayed until later in the puppet run.
(For those following; @jarpy and I spoke offline about this, and I'm going to see what a backwards-compatible fix looks like, but we're not writing off the idea of separate branches for the module. This solution has the potential to look like just a big list of different versions on the Forge like 1.0, 2.0, 5.0, and so on, so you'd need to retrieve the right branch of this module for the version of Elasticsearch being used.)

@tylerjl I haven't tested this yet but it seemed promising if it works (https://github.com/hercynium/puppet-refacter). I'd love to find a solution that allowed 2.x users to upgrade to 5.x (and beyond).
While I'm not 100% opposed to having to use a different module version for each corresponding version of Elasticsearch, this might become cumbersome if there are things in 5.1 or if 6.0 comes out but isn't horribly different, etc.

@rcalixte by all means, do feel free to experiment! PR a solution if you find something that works well and we can brainstorm solutions. puppet-refacter looks potentially useful, though we should vet it thoroughly as it hasn't been updated in over three years and mentions it may not work with Puppetmasters.

Out of curiosity, in many of the webinars and in Elastic training, configuration management is the recommended way to deploy Elasticsearch.  So the question is, which tool is the one Elastic actually uses and supports for their own purposes?   Seems the chef cookbook is getting some love regarding 5.0 support: https://github.com/elastic/cookbook-elasticsearch.   Is chef what you guys prefer to use in general?

@pythianali configuration management or devops tools of any form are certainly recommended for managing deployments of Elasticsearch. Internally, we dogfood Elastic Cloud heavily, as it serves our needs well.
When it comes to "which ops tool do you recommend to use with Elasticsearch?", there's no other reasonable answer than "it depends". If your operations team is familiar with and using Puppet, then by all means, use the Puppet module. If you're a Chef shop, then leverage the experience of your team to make use of the Chef cookbook. Same goes for the Docker images; etc. - there's not a degree of favoritism in regards to support across the tools.
Though the module is lagging behind 5.x at the moment, rest assured time is being taken to make the module safe to use, backwards compatible, and supportive of future releases moving forward.

Perhaps I'm working in the wrong direction, but I wrote a little patch to experiment the v5 compatibility:
https://github.com/stregatto/elasticsearch/blob/master/es_v5.patch

Hi @stregatto - note that if we wanted to derive the major version number from top-level parameters, there's a few different sources that the package can be installed from, including package_url. You can see an experiment I went with here to try and take the same approach - though the solution here seems to be more reliable by pulling out the version number natively from a Package[elasticsearch] resource.

As a matter of fact, releasing those fixes are IMO worth doing.

actual version 0.14.0 deploys only elasticsearch package 5.0.0_alpha5-1
OS specific repos are using wrong urls (ugly if someone wants to update)

Consequently, for user wanting to use ES 5.x this module is not production ready.
(as a devops concerned user ... I don't want to update Puppet code outside of a release)
So could someone tell us if a release is on the way.

@tylerjl Yes of course my approach is little naive, only a test to check all the component, like logs, init and plugins , also there is a bug in a plugin management for ver > 2.3 (but perhaps another topic).
Perhaps, guess the package info from the name of the package is imho is not the right way. In my idea is int the user the choice of version of the package

Managing jvm.options should probably also be in scope. I just tried this on vagrant, and ran into "Execution of '/bin/systemctl start elasticsearch-es-01.service' returned 1: Job for elasticsearch-es-01.service failed because a configured resource limit was exceeded"

@smougenot, I'll be releasing as soon as I merge in #733, which should make the 5.x changes compatible with OpenBSD.
@stregatto as of this writing, the 5.x code in the module pulls the version out of the package { 'elasticsearch' : } Puppet resource, which seems to work correctly. I'm always open to refactoring how that works in the future though if we come up with a better way.
@CoaxVex I agree that file should probably be managed - though I'll probably leave that for another issue since my testing seems to work correctly without that file under puppet management and these changes need to get out soon. We do need to manage it at some point, though.

Execution of '/bin/systemctl start elasticsearch-es-01.service' returned 1: Job for elasticsearch-es-01.service failed because a configured resource limit was exceeded"

I ran into this same issue also with Vagrant

This has been released in version 0.15.0. For additional features/bugfixes to support other parts of 5.x, please create an issue and we can iterate on additional needs as they come up.


use artman v0.16.2 in CI

Bumping artman version in CircleCI config to v0.15.9.

We can bump this further?

Codecov Report

Merging #2353 into master will decrease coverage by 0.05%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #2353      +/-   ##
============================================
- Coverage      86.8%   86.74%   -0.06%
+ Complexity     5365     5197     -168
============================================
  Files           459      454       -5
  Lines         21180    20665     -515
  Branches       2309     2231      -78
============================================
- Hits          18385    17926     -459
+ Misses         1972     1959      -13
+ Partials        823      780      -43

Impacted Files
Coverage Δ
Complexity Δ

...m/google/api/codegen/metacode/InitValueConfig.java
72.22% <0%> (-27.78%)
12% <0%> (ø)

...n/java/com/google/api/codegen/util/StringUtil.java
50% <0%> (-25%)
1% <0%> (-1%)

...gen/configgen/transformer/LanguageTransformer.java
86.36% <0%> (-13.64%)
5% <0%> (+2%)

...ansformer/ruby/RubyGapicSurfaceDocTransformer.java
81.81% <0%> (-12.3%)
15% <0%> (+1%)

...a/com/google/api/codegen/config/DiscoApiModel.java
67.64% <0%> (-11.67%)
9% <0%> (ø)

...google/api/codegen/config/PageStreamingConfig.java
45.23% <0%> (-10.48%)
7% <0%> (-4%)

...m/google/api/codegen/config/LongRunningConfig.java
40% <0%> (-6.74%)
8% <0%> (-1%)

...n/transformer/php/PhpImportSectionTransformer.java
93.33% <0%> (-6.67%)
5% <0%> (-1%)

.../transformer/StandardImportSectionTransformer.java
84% <0%> (-5.48%)
10% <0%> (-5%)

...sformer/nodejs/NodeJSImportSectionTransformer.java
91.3% <0%> (-5.13%)
5% <0%> (-4%)

... and 104 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 722a23a...3c68cb9. Read the comment docs.

We can!

LGTM when all tests (except for the long artman_smoke_tests job, which isn't tested here b/c it uses the latest version of artman) pass.


[Publisher] Field alignment error when entering a long text for the summary of a resource

When providing the summary for a resource at the publisher, if a very long text is given, the field alignment changes as follows:

Seem fixed in AM 3.0.0 beta


Question about DummyVecEnv and observation buffer

There seem to be something i fail to understand in DummyVecEnv.
I have made a custom gym environment, and I am trying to run PPO2 on it with MLP feature extractor, running only one environment.
My input (which is what I think is the observation space), is a vector of 512 D, so I set my observation space as:
self.observation_space = spaces.Box(low=np.finfo(np.float32).min,
    high=np.finfo(np.float32).max, shape=(1, 512), dtype=np.uint8)

When I run my code, I get the message: "Wrapping the env in a DummyVecEnv."
After many attempts my code failed to learn a policy and converge, I looked at the PPO2 file in this line and I noticed that the observation I got from the step() function, was not the same observation that my environment produced, but was completely random.
I started debugging, and I realized that in the dummy_vec_env.py file, in the step_wait function, the save_obs function did not actually save the observation to the obs_buffer, resulting that the returned observation was just random values, and different than the ones that my own custom environment's step function produced.
I changed the return line to be:
return (obs.reshape(1,1,512), np.copy(self.buf_rews),
    np.copy(self.buf_dones),deepcopy(self.buf_infos))

and that seemed to solve it and I noticed that the observations are equivalent, both the one produced by my custom environment and the one in _run() function of PPO2.py
Is this normal? should the observations produced by my custom environment be equivalent to the observation in the _run() function of PPO2.py? I don't understand how the algorithm will succeed to learn with random numbers as the observation in _run() function
Thanks for the clarification, apologies if this was not properly written this is my first question asked here.

I'm sorry, the mistake was on my side, the observation space dtype was not defined correctly. closing this issue


Incorrect module path when using .NET interactive

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.

Steps to reproduce
When running Install/Update-PSResource in a .NET interactive notebook the installation path is incorrectly set as Documents\WindowsPowerShell, even though powershell core is being used
Notebook code (.dib file)
#!pwsh

$PSVersionTable
Install-PSResource -Name 'Az.Accounts' -Repository PSGallery -Scope CurrentUser -Verbose -TrustRepository

Output:
Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0
VERBOSE: All paths to search: 'C:\Users\henry.buckle\Documents\WindowsPowerShell\Modules'
VERBOSE: All paths to search: 'C:\Users\henry.buckle\Documents\WindowsPowerShell\Scripts'
VERBOSE: Performing the operation "Install-PSResource" on target "package to install: 'Az.Accounts'".
VERBOSE: Parameters passed in >>> Name: 'Az.Accounts'; Version: ''; Prerelease: 'False'; Repository: 'PSGallery'; AcceptLicense: 'False'; Quiet: 'False'; Reinstall: 'False'; TrustRepository: 'True'; NoClobber: 'False';
VERBOSE: Attempting to search for packages in 'PSGallery'
VERBOSE: Untrusted repository accepted as trusted source.
VERBOSE: Null Type provided, so add PSGalleryScripts repository
VERBOSE: Searching in repository PSGallery
VERBOSE: <IP_ADDRESS>
VERBOSE: Null Type provided, so add PSGalleryScripts repository
VERBOSE: Searching in repository PSGallery
VERBOSE: Searching through package path: 'C:\Users\henry.buckle\Documents\WindowsPowerShell\Modules\Az.Accounts'
VERBOSE: Searching through package path: 'C:\Users\henry.buckle\Documents\WindowsPowerShell\Modules\Az.Accounts'
show more (open the raw output data in a text editor) ...

VERBOSE: Attempting to move 'C:\Users\henry.buckle\AppData\Local\Temp\76e3ca5f-c444-4a13-8225-6e7b6b1069f0\az.accounts\2.5.2' to 'C:\Users\henry.buckle\Documents\WindowsPowerShell\Modules\Az.Accounts\2.5.2'
VERBOSE: Successfully installed package 'Az.Accounts' to location 'C:\Users\henry.buckle\Documents\WindowsPowerShell\Modules'
VERBOSE: Attempting to delete 'C:\Users\henry.buckle\AppData\Local\Temp\76e3ca5f-c444-4a13-8225-6e7b6b1069f0'
VERBOSE: Successfully deleted 'C:\Users\henry.buckle\AppData\Local\Temp\76e3ca5f-c444-4a13-8225-6e7b6b1069f0'

Expected behavior
Installation path should be `Documents\PowerShell`

Actual behavior
Installation path is `Documents\WindowsPowerShell`

Error details
No response
Environment data
ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     3.0.11     beta       PowerShellGet                       {Find-PSResource, Get-Install…

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals
No response

Seems like for some reason the host version in .NET interactive is 0.0.1
function FunctionName {
  [cmdletbinding()]
  param ()
  Write-Host $PSCmdlet.Host.Version
}
FunctionName
0.0.1

@hbuckle thanks for reaching out!
Could you share your PS Modules path output with us by running:
$env:PSModulePath
We haven't yet done testing in the .NET interactive notebook and will test this scenario.

This is PSModulePath from the .NET interactive kernel
C:\Users\henry.buckle\.nuget\packages\microsoft.dotnet-interactive\1.0.240403\tools\net5.0\any\Modules
C:\Users\henry.buckle\Documents\PowerShell\Modules
C:\Program Files\PowerShell\Modules
c:\users\henry.buckle\.nuget\packages\microsoft.dotnet-interactive\1.0.240403\tools\net5.0\any\runtimes\win\lib\net5.0\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

I'm not sure when exactly this may have been resolved, but it looks like it is no longer an issue as of 3.0.14-beta14.  I'm going to close this issue as resolved, but if you're still having this issue or see this issue pop up again in the future please let us know either here or in a new issue. Thanks!

@alerickson - I just tried this again and get the same issue with 3.0.17

@alerickson, @anamnavi any update?

If it helps this is how PowerShellEditorServices does it
https://github.com/PowerShell/PowerShellEditorServices/blob/main/src/PowerShellEditorServices/Utility/VersionUtils.cs

@hbuckle thanks for providing such thorough info, we'll investigate into this.

@alerickson @alerickson - will it be fixed for GA? It looks like psCmdlet.Host.Version is still in use

This is also an issue when using RubyPwshPSHost which is what Puppet uses to call PowerShell.

It would definitely be nice to have this fixed.


Error when using searchAllTweets() with parameter "recursiveCall" set to true

The searchAllTweets() method throws an error when setting the "recursiveCall" parameter to true:
ERROR AbstractRequestHelper - (GET) Error calling https://api.twitter.com/2/tweets/search/all {"title":"Unsupported Authentication","detail":"Authentication with OAuth 1.0a User Context is forbidden. Please, make the request with OAuth 2.0 Bearer Token authentication.","type":"https://api.twitter.com/2/problems/unsupported-authentication"} - 403
This however does not happen when "recursiveCall" is set to false.
I should note that I am using credentials issued for the Academic Track.

Hi @ckakalou , thanks for the issue. I'm going to check that tonight or tomorrow. I'll keep you informed quickly.

It's ok, the problem should be solved now. The fix will come with the next release 2.5 :)

You can now use v2.5 :) https://github.com/redouane59/twittered/releases/tag/v2.5


Fix compilation error

auto-deref coercion wasn't doing anything here, so it wouldn't compile.

PR only accepted to pending branch.
This fixed in this branch but just don't come to master now.

https://www.reddit.com/r/rust/comments/5xi4qm/gtkrs_new_cratesio_versions_available/deivvei/
People are encountering this bug when trying to get started with gtk-rs. Pending hasn't been committed to in 24 days. When will you sync master with pending? It might be time.

Hum indeed. I need to update docs as well. Might be the good time.

I actually think this PR might be closed now. Just reopen it if I'm wrong.


i need video

Problem encountered on https://dotnet.microsoft.com/en-us/learn/aspnet/hello-world-tutorial/modify
Operating System: windows
Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

Thanks for your feedback @ap4298. Adding a video to our tutorials is on backlog and something we're considering it doing.

@mairaw since it's in the backlog, I think we can close the issue.
And if the backlog item is in a public repo, do you mind linking it here?

Keep it open and assigned to me @carlossanlop. Unfortunately, we don't have a public repo I can link to.

Alright, no problem.


How to toggle Karabiner-Elements Disable Built-in Keyboard setting？

I want to toggle the Disable Built-in Keyboard  setting so that I can use one keyboard at a time and switch to another at the other time(never use them both at the same time).
Thank you for helping.

Are there some defaults write org.pqrs.Karabiner-Elements.Preferences disableBuiltInKeyboard Yes thing?

disable_built_in_keyboard_if_exists in karabiner.json

Thank you very much. ☺


AudioCueEditor Drag & dropping acbs/awbs doesn't work

Whenever I try to drag and drop an acb/awb, it shows this error.

It doesn't generate any error in the ACE log by the way.

Drag and drop is only implemented for audio files currently (doing so will add a new track).
I'll look into allowing ACB files to be loaded that way in the future.

feature added with the load times fix update


cadvisor spawns "du -s /var/lib/docker/overlay/[ID]" (too) often on small instance

[moved from rancher/os]
originally reported with Rancher 1.0.1-rc1 & OS v0.4.3
Rancher Version: 1.0.1
Docker Version: 1.10.1 - 1.10.3
OS: RancherOS 0.4.3 / 0.4.4
Steps to Reproduce: run smaller instance, esp burstable AWS instances (t2.*) - pull startup container requirements, unzip data (spin disks, tax machine fairly significantly)
Results: cadvisor spawns regular du -s /var/lib/overlar/[id] - these processes contend too much for cpu + disk with other operations on the host. host exhibits very high load avgs, user-initiated jobs may fail, exhaust host cpu cause host failure, etc.
Expected:  cadvisor should not interfere with normal operations on the host
a t2.micro instance seems like it should be able to run RancherOS, rancher-agent (cadvisor) and operate normally with moderate loads - startup time is a known taxing time for a host while it pulls & untars potentially many docker images required for operation.

exacerbating this is when this may cause jobs launched via Rancher in a stack then repeatedly fail to launch, and are repeatedly restarted on the same host by rancher. this will cause host failure.

============ moved issue
Rancher-Server 1.0.1-rc1
RancherOS 0.4.3 HVM
AWS AMI install
t1.micro, t2.nano,t2.micro,t2.small
on an example t1.micro instance, I see that .cadvisor is apparently checking space with du -s in docker's overlayfs directory.
 6988  6373 root     R    53428   9%  50% apt-extracttemplates /var/cache/apt/archives/libroken18-heimdal_1.6~git20131207+dfsg-1ubuntu1.1_amd64.deb /var/cache/apt/archives/libasn1-8-heimdal_1.6~git20131207+dfsg-1ubun
 6991 10638 root     R N   9408   2%  15% du -s /var/lib/docker/overlay/33df627b819df85ad5243d0c186d459e9685a4e8754c301ba3c4bc9213d30e77
 6926 10638 root     R N  10136   2%   9% du -s /var/lib/docker/overlay/10dc13125073024dda9b1d6251109e2b2bc4973c75d1df55732c2894f5f471bb
10638 10589 root     S     464m  79%   5% /var/log/rancher/.cadvisor -logtostderr=true -listen_ip <IP_ADDRESS> -port 9344 -housekeeping_interval 1s -docker_root /var/lib/docker
10274   946 root     S     119m  20%   5% python /var/lib/cattle/pyagent/main.py
 6981 10638 root     R N   9368   2%   3% du -s /var/lib/docker/overlay/a3879200ddd342346814070d7eb783a23785fa02ffa156b2b6b2c891df93e1ae`
`````

In general this seems to be the primary cause of several failures I'm seeing on smaller instances. Blocking drive OS load avg up instantly, and most importantly, production processes do not operate as intended or desired:
  - time sensitive services fail (i.e. etcd)
  - simple operations may hang, and possible fail to complete (i.e. apt-get in a container, bzip -d on a large multiGB file)
  - finally, the machine may become so overload that the instance fails

It may be the case that a t1.micro (or t2.nano/t2.micro) is simply too small to run RancherOS connected to Rancher. If this is the case, it should be noted in the docs.

The t2.XXX instances have a higher propensity to instance failure in this situation due to AWS' use of "CPU Credits" - the instance runs out of CPU credits very quickly, and is throttled at ~25-30% capacity - with certain load types the instance will fail.

As I write this issue up, I have been attempting to install git into a ubuntu container - obviously in a production environment this is not what we would do, but, nonetheless people do this ;)
`apt-get install -qq -y git` has taken nearly 1hr to complete as it contends for resources with `du -s` (primarily)

on a t2.micro (which is the default to add an ec2 host in the rancherUI)
The primary operation here is non-typical of a production workload (for us), and is again, not the most effective means of moving the data in question (should I really have to spin up an m4.xlarge to move a few dozen GB of data?)
note the du -s processes are clearly "backing up"  - this has the load avg around 17, and we've only managed to copy about 2.5GB into glusterfs overnight.
In my experience, essentially any significant user-initiated disk activity contends too heavily with the du -s on overlay dirs in /var/lib/docker to make smaller hosts usable for anything but the very lightest, non-disk-related services.
6961 root     python /var/lib/cattle/pyagent/main.py
7200 root     /var/lib/cattle/bin/rancher-metadata -log /var/log/rancher-metadata.log -answers /var/lib/cattle/etc/cattle/metadata/answers.yml -pid-file /var/run/rancher-metadata.pid
7281 root     {process_watcher} /bin/bash /var/lib/cattle/pyagent/cattle/process_watcher.sh
7286 root     host-api -cadvisor-url http://<IP_ADDRESS>:9344 -logtostderr=true -ip <IP_ADDRESS> -port 9345 -auth=true -host-uuid d36339b3-7e89-45a0-933c-bce11e03672e -public-key /var/lib/cattle/etc/cattle/api.crt -cattle-url h
7287 root     {cadvisor.sh} /bin/bash /var/lib/cattle/bin/cadvisor.sh cadvisor -logtostderr=true -listen_ip <IP_ADDRESS> -port 9344 -housekeeping_interval 1s -docker_root /var/lib/docker
7382 root     /var/log/rancher/.cadvisor -logtostderr=true -listen_ip <IP_ADDRESS> -port 9344 -housekeeping_interval 1s -docker_root /var/lib/docker
7673 root     /usr/bin/monit -Ic /etc/monit/monitrc
7802 root     /usr/local/sbin/charon --debug-dmn 1 --debug-mgr 1 --debug-ike 1 --debug-chd 1 --debug-cfg 1 --debug-knl 1 --debug-net 1 --debug-asn 1 --debug-tnc 1 --debug-imc 1 --debug-imv 1 --debug-pts 1 --debug-tls 1
7822 root     /var/lib/cattle/bin/rancher-net --log /var/log/rancher-net.log -f /var/lib/cattle/etc/cattle/ipsec/config.json -c /var/lib/cattle/etc/cattle/ipsec -i <IP_ADDRESS>/16 --pid-file /var/run/rancher-net.pid --gcm
8545 root     sleep 300
8714 root     du -s /var/lib/docker/overlay/0418b41b46c0b30343a90b5a259406ba1194c37e4a9ff45b1515fb59d6354172
8772 root     du -s /var/lib/docker/overlay/d7772dbbb9a57aa7cc0fa9ab5e0433a54d0f316581638ae728c915defb914bc1
8777 root     du -s /var/lib/docker/overlay/8aa2b4d24adafe5b4c50b08fc15903f8e9e72698ade835b3e2a59b1ae2362742
8819 root     [kworker/0:1]
8959 root     du -s /var/lib/docker/overlay/66bb7edf665a8731efb1ceab763821169821e7f18dc8cc83d5c429f3c6e5d1cd
9031 root     sshd: rancher [priv]
9070 103      haproxy -p /var/run/haproxy.pid -f /etc/healthcheck/healthcheck.cfg -sf 13417
9081 rancher  sshd: rancher@pts/2
9088 rancher  -bash
9097 root     du -s /var/lib/docker/overlay/81399a010f0fb744fe66ef30a6841d9de47222af4a06b0b8ee38d3472a693fd5
9101 root     du -s /var/lib/docker/overlay/c8fde9ee03e147b10a49ba66cec335357dbef47a2b84a7037632757b0dd7a0d6
9106 root     du -s /var/lib/docker/overlay/c70470a6dc19af47622b6c9b58c8c6a8d19436097cce15b295d940d7d3997ff3
9232 root     du -s /var/lib/docker/overlay/65652a9df88a23aa69df0cb6e3af1adf77d6331a4d444f71a90503200c0be72c
9233 root     du -s /var/lib/docker/overlay/a190ce9ee167710b264d77ab7f890acdaf1d8ec7676536f72b6a3f66d3fca33d
9236 root     du -s /var/lib/docker/overlay/89a0f81bc9e81225bd00c9512dd500b39c4cf7a4829864152d1d54f8f359a94b
9237 root     du -s /var/lib/docker/overlay/b5b3cf78d2fe893984e4bd108195e472b26b749e0c673dbbc330729b6944ac4c
9238 root     du -s /var/lib/docker/overlay/89b3344494b9564a15718696641bfc3033a7b2738da1288732de8db0b69a21b0
9239 root     du -s /var/lib/docker/overlay/58eb9d404a799f0f4226eb4fa86bb61c314622791e0ccb9fbf172717aab31ed5
9241 root     du -s /var/lib/docker/overlay/83510c5e2193f6915512355e13d4f0762f1f6aba1cdf2d18546aea3ce7f5c56f
9242 root     du -s /var/lib/docker/overlay/5d6f838692596a933ca9e0193e622b8a55d80d0f9a9179128de62fd182dd2923
9268 root     {peerprobe.sh} /bin/bash /opt/rancher/peerprobe.sh container:glusterfs-server
9269 root     gluster pool list
9270 root     grep -v UUID
9271 root     wc -l
9272 rancher  ps -aef
9273 root     sleep 2
15604 root     [kworker/u30:3]
16578 root     {peerprobe.sh} /bin/bash /opt/rancher/peerprobe.sh container:glusterfs-server
16929 root     glusterd -p /var/run/gluster.pid --no-daemon --log-file=-
17801 root     /usr/sbin/glusterfsd -s <IP_ADDRESS> --volfile-id mazaclub_data.<IP_ADDRESS>.data-glusterfs-brick1-mazaclub_data -p /var/lib/glusterd/vols/mazaclub_data/run/<IP_ADDRESS>-data-glusterfs-brick1-mazaclub_d
17820 root     [glusterfs]
17822 root     [glusterfs]
17823 root     [glusterfs]
17828 root     /usr/sbin/glusterfs -s localhost --volfile-id gluster/glustershd -p /var/lib/glusterd/glustershd/run/glustershd.pid -l /var/log/glusterfs/glustershd.log -S /var/run/gluster/fdf75ce30be3b9c95acb6e94385a1485
18064 root     [kworker/u30:2]
18322 root     /var/lib/cattle/bin/rancher-dns -log /var/log/rancher-dns.log -answers /var/lib/cattle/etc/cattle/dns/answers.json -pid-file /var/run/rancher-dns.pid -ttl 1
27015 root     [kworker/0:2]
30033 root     /var/lib/cattle/bin/host-api -log /var/log/haproxy-monitor.log -haproxy-monitor -pid-file /var/run/haproxy-monitor.pid
31159 root     [kworker/u30:0]
31280 root     {launch} /bin/bash /launch volume-agent-glusterfs
31500 root     /var/lib/docker/overlay/8aa2b4d24adafe5b4c50b08fc15903f8e9e72698ade835b3e2a59b1ae2362742/merged/var/lib/rancher/convoy-agent/share-mnt --stage2 /var/lib/rancher/convoy/convoy-gluster-5aaa321f-c4ff-4d79-b97
31579 root     convoy-agent --url http://rancher.mazaclub:8080/v1 --access-key F7304C537F6E98F44720 --secret-key PQyjZ9jYvExix9JbbE8C61bCrnFmAKnda5ZDkqVq --storagepool-driver convoy-gluster --socket /host/var/run/convoy-
31660 root     convoy --socket=/host/var/run/convoy-convoy-gluster.sock daemon --driver-opts=glusterfs.defaultvolumepool=mazaclub_data --driver-opts=glusterfs.servers=glusterfs --root=/var/lib/rancher/convoy/convoy-glust
31763 root     /usr/sbin/glusterfs --volfile-server=glusterfs --volfile-id=/mazaclub_data /var/lib/rancher/convoy/convoy-gluster-5aaa321f-c4ff-4d79-b974-8647df87053c/glusterfs/mounts/mazaclub_data
32213 root     cp -a /data/nfs-exports/exports/home/user1 /home
32250 root     cp -a /data/nfs-exports/exports/home/user2 /home
32275 root     cp -a /data/nfs-exports/exports/home/user3 /home
32374 root     cp -a /data/nfs-exports/exports/home/user4 /home
32673 root     cp -a /data/nfs-exports/exports/home/user5 /

I also note, this issue should have been posted in the rancher/rancher repo, as this isn't a RancherOS specific issue, but a rancher-agent issue.

We are no longer using cadvisor as of v1.2.0 instead we're using docker stats for container stats and https://github.com/shirou/gopsutil for host stats.


new else statement

The loop should be continued to find the match handler from all of handlers, it does not work if return None in else statement.


Added support for pausing when phone in call

I've added some comments to the PR in places that caught my attention at first sight.
Generically i have the following comments:

Kore isn't still prepared to use Android's 6 permission mechanism, but it will soon. Accessing READ_PHONE_STATE is a "Dangerous permission", so it should be guarded. This means that it probably can't be declared on the manifest, and it should ask the user for permission when he activates the corresponding setting, and then use registerReceiver to register the receiver (though, when to unregister is something to think about...).

Not sure about the BroadcastReceiver lifecycle. This implementation probably works, because you start the HostConnectionObserver, but it is not guaranteed to be kept alive.

I'm not familiar with Android 6's permission mechanism (Still waiting for LG to update my device). How will it work with older devices that don't have >6.0?
I see your point about the BroadcastReceiver lifecycle, I'll move handleState() to a Service class.

When an app is compiled against SDK >23 (which Kore isn't yet) and when in Android 6, the permission system changes. It is expected that, when the app needs a permission, it asks the user for it, and recovers gracefully if the user doesn't grant it (as opposed with the "old" system when permissions were granted at install time). This means that, if the app doesn't prompt the user and just assumes it has permission for it (for accessing the phone, in this case), it will break.
For android < 6, the permissions will be asked on install time, nothing changes.

Accessing the phone state is a dangerous permission, and one that is difficult to justify why a remote app needs it (at install time). The new system is much more clear in these situations: when the user goes into the app's settings, sees that setting (disabled by default), taps it and a prompt shows up asking for the permission. In this context it is clear why it needs the permission.
I was looking at the developer documentation and come across this: http://developer.android.com/reference/android/telephony/PhoneStateListener.html
which seems to be a better way of handling this functionality. Haven't played with it, but looks straightforward and simpler than the alternative (service or broadcastreceiver).
I would say that this could be done like this:

Declare the permission on the manifest;
In the settings, when the user checks the setting for the first time, ask for the permission. There are standard APIs for this (check http://developer.android.com/training/permissions/requesting.html). If the user doesn't give permission, uncheck the option;
Create a PhoneStateLister that overrides onCallStateChange. Going this way avoids all the state book keeping that you have done in this PR. Just check the play status of Kodi and issue a Play Pause accordingly (no need to use HostConnectionObserver.

Now, there's the question on when to register the previous object with TelephonyManager.listen and when to unregister it... This might need to be a service similar to NotificationService that gets started when something starts playing and gets stopped when it stops (unregistering there).

I updated the commit with the PhoneStateListener but I still need to request for permissions.
I have the code for checking settings ready but I think it's best you will check everything else is ready for SDK v23 first.
Do you want to add this in the meantime or wait for everything?

I'll do the update to the permissions later, when i update the rest of Kore. Just wanted to make sure that it was in a state where the change would be easy to do.
I won't be able to review and test this right now, so give me a few more days.

Sorry for not replying earlier. I still think there are some issues with the design of this. Consider these issues:

The listener is being registered and unregistered in the RemoteActivity. Registering it there is ok imo, but unregistering isn't guaranteed to be called. Imagine that, after starting playback the user exits Kore, then if the video stops "naturally" or by some other means, the listener won't be unregistered.

Try this: disable the notification option and enable this option. Start playing something and exit Kore. Lock your phone. Now receive a call and answer it and you'll notice that the video isn't paused. That's because Kore isn't running, so the listener callbacks don't get called.

I'll give it some more thought on the weekend, but i think that this needs to be a service that implements PhoneStateListener, but the service part needs to be kept. It should be started in the RemoteActivity, and in the OnStart register itself with TelephonyManager. On the playerOnStop and playerOnConnectionError it should unregister itself and call stopSelf (this needs some thought in the case of music or playlist playing, as i guess that this way it would only run for one item. Maybe sending a delayed message to a handler, that then unregisters and stops it if nothing is playing).


add link for NeuronBlocks

Coverage remained the same at 53.255% when pulling 47c057987388a64d2054963534130a2111a0ac31 on ljshou:master into 4edb3054de0256de2cdd615f8fb1df3de2c5d393 on Microsoft:master.

Coverage remained the same at 53.255% when pulling 47c057987388a64d2054963534130a2111a0ac31 on ljshou:master into 4edb3054de0256de2cdd615f8fb1df3de2c5d393 on Microsoft:master.

Coverage remained the same at 53.255% when pulling 47c057987388a64d2054963534130a2111a0ac31 on ljshou:master into 4edb3054de0256de2cdd615f8fb1df3de2c5d393 on Microsoft:master.

Coverage remained the same at 53.255% when pulling 47c057987388a64d2054963534130a2111a0ac31 on ljshou:master into 4edb3054de0256de2cdd615f8fb1df3de2c5d393 on Microsoft:master.

@scarlett2018  could you help merge this pull request?


Evaluate use of Python Poetry

https://python-poetry.org

https://github.com/mmEissen/pacakge_template


"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in

Here is my ansible yaml file
- name: Find the green asg with matching tags
  ec2_asg_info:
    tags:
      service_name: cps_wallet
      Environment: "{{ name_env }}"
      service_state: green
  register: asgs_payment

- name: Show the ASG Payment name
  debug:
    msg: "{{ asgs_payment.results[0].auto_scaling_group_name}}"

- set_fact:
    asg_payment_name: "{{ asgs_payment.results[0].auto_scaling_group_name}}"

When running from jenkins i was getting
fatal: [<IP_ADDRESS>]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in '/opt/software/jenkins/workspace/payment-react-ui/srv/payment-ui-110/payment-ui/roles/inspect/tasks/cps_green_deploy.yml': line 9, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Show the ASG Payment name\n  ^ here\n"}
If the update it as
- name: Show the ASG Payment name
  debug:
    msg: "{{ asgs_payment}}"

- set_fact:
    asg_payment_name: "{{ asgs_payment}}"

I don't get error but my result doesn't have an output
    "msg": {         "changed": false,          "failed": false,          "results": []     }
The result list in empty i want it to get ASG name from tags

@NitinKalburgii Hi! Your problem seems related to aws, not to ceph-ansible. I will close this issue, feel free to reopen it necessary.


Decide on quoting when it comes to APIs exposed from the extensions

Currently we have two APIs that we expose:

getRemoteLauncherCommand : Paths in the returned array are quoted.
getExecutionCommand : Paths in the returned array are not quoted.

Provide a new API replacement for getRemoteLauncherCommand that does not quote and eventually drop it.


fix(input): ensure that property bindings work

Developers are currently not able to use property bindings for required, disabled, type and placeholder.
This commit ensures that the Angular input setters are in sync with the native input element.
Adds test to ensure that the property bindings work for the native input element (and not for the component instance as before)

cc. @mmalerba
Fixes #2428

Please also look at #2363 as I think it's the same issue, but targeting the value property.

@arciisine I looked into the [value] issue, but decided to address it in another PR because it does not relate to the getters and setters.

Thanks @DevVersion. No worries, just wanted to make sure it wasn't overlooked if it fell into the same bucket.

@DevVersion Can you rebase real quick?

@kara Done. Waiting for one saucelabs task to finish.


Merge ui-helper and renderer

The reason for this is that ui-helper is not a helper and is only used by the renderer. Additionally, the main and the details section of the contract data was split into two files.


clear() proceeds asynchronously in 2.4.0

This test, which is similar to the one shown on the Control Flow page, worked fine in 2.3:
    this.element(this.by.model('ctrl.inputKeywords')).clear();
    this.element(this.by.model('ctrl.inputKeywords')).sendKeys(keywords);
    this.expect(this.element(this.by.model('ctrl.inputKeywords')).getText())
      .to.eventually.equal(keywords)
      .and.notify(callback);

However, in 2.4 clear ends up happening after sendKeys and the error AssertionError: expected '' to equal 'Add Show Remove Test Capsule'.
I'm able to fix it by changing the test to:
    this.element(this.by.model('ctrl.inputKeywords')).clear().then(function () {
      this.element(this.by.model('ctrl.inputKeywords')).sendKeys(keywords);
      this.expect(this.element(this.by.model('ctrl.inputKeywords')).getText())
        .to.eventually.equal(keywords)
        .and.notify(callback);
    }.bind(this));

Using selenium 2.47.1 and chromedriver 2.19

Nevermind, turned out to be an issue with a promise from another step that was resolved too early.


Maven recipe : enforce reproducible builds

Read more : https://reproducible-builds.org/

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-tool-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireReleaseDeps>
                                    <!-- This rule should only be executed when the version is a non-SNAPSHOT version -->
                                    <onlyWhenRelease>true</onlyWhenRelease>
                                    <message>No Snapshots Allowed during a release!
                                        Read more : https://reproducible-builds.org/
                                    </message>
                                </requireReleaseDeps>
                            </rules>
                        </configuration>
                    </execution>
                         </executions>
            </plugin>

This is a good idea, I think we want to hold off adding this recipe until we have added plugin/plugin management to the semantic model, see #585
The reason for this is that in a multi-module maven project, we only want to add this plug-in to those maven projects that either have no parent or a parent that is external to the project.


gtk3-macros: make the doc example building

Reopening of https://github.com/gtk-rs/gtk3-rs/pull/496 which was closed for whatever reasons...

CI passed. \o/


Error when quering a big page number.

When retrieving a huge page number from the Clearing House, the following exception occurs (when querying for page number 246 of a PID):
document-api [2022-03-21][07:10:28][document_api::doc_api][ERROR] Error while retrieving document: Error(Mongodb(Error { kind: Command(CommandError { code: 292, code_name: "QueryExceededMemoryLimitNoDiskUseAllowed", message: "Executor error during find command :: caused by :: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in." }), labels: {} }), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })

Looks like the option allowDiskUse can only be set when the query is sent. It cannot be set in the mongodb settings or environment.
Therefore, it must be set in the clearing house document API when the query is sent.


Generate the documentation of the SDK - arguments as markdown instead of block quotes

The previous way of generating the SDK doc meant that we had to change from the default Google docstring.
For example, this:
def my_func():
       """Returns a new Client configured with profile data from configuration files.

        Args:
            profile_name (str, optional): Name of the profile to load.
                Defaults to 'default'.
            retry_timeout (int, optional): Number of seconds before attempting a retry call in case
                of timeout. Defaults to 5 minutes.

        Returns:
            Client: The new client.
        """

Gave something like this:
Returns a new Client configured with profile data from configuration files.

Args:
    profile_name (str, optional): Name of the profile to load. Defaults to 'default'. retry_timeout (int, optional): Number of seconds before attempting a retry call in case of timeout. Defaults to 5 minutes.

Returns: Client: The new client.

so we had to insert newlines in the docstring:
def my_func():
       """Returns a new Client configured with profile data from configuration files.

        Args:

            profile_name (str, optional): Name of the profile to load.
                Defaults to 'default'.

            retry_timeout (int, optional): Number of seconds before attempting a retry call in case
                of timeout. Defaults to 5 minutes.

        Returns:

            Client: The new client.
        """

Furthermore, any link inserted in the docstring, like it must follow the [DataSampleSpec schema](sdk_schemas.md#DataSampleSpec). would not be rendered.
So, to stop having to change the docstring for the markdown, I updated the way the markdown was generated for the SDK. Instead of using pydocmd, it uses a manual script with the docstring-parser library to parse the docstring and display the arguments as a list.
What does it fix
This fixes the links in the doc, for example: https://github.com/SubstraFoundation/substra/blob/master/references/sdk.md#add_data_samples
data (Union[dict, schemas.DataSampleSpec]): data samples to add. If it is a dict,     it must follow the [DataSampleSpec schema](sdk_schemas.md#DataSampleSpec).
And the annoying newlines that we had to add in the Client method docstrings.

I'm loving this! This could allow for a smooth transition to proper google-style docstrings, something we already attempted to do but in the end didn't pursue because the generate doc was so bad.


InaccessibleTensorError: The tensor cannot be accessed here: it is defined in another function or code block.

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Ubuntu 20.04 LTS (GNU/Linux 4.4.0-18362-Microsoft x86_64)
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): Source
TensorFlow version (use command below): 2.3.0
Python version: 3.8.2
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version:
GPU model and memory:

Describe the current behavior
I was trying to create a custom model using the Subclassing API by subclassing the tf.keras.models.Model class. After creating the model and compiling, while training the model the following issue was raised
InaccessibleTensorError: The tensor 'Tensor("mul:0", shape=(), dtype=float32)' cannot be accessed here: it is defined in another function or code block. Use return values, explicit Python locals or TensorFlow collections to access it. Defined in: FuncGraph(name=build_graph, id=139645200248064); accessed from: FuncGraph(name=train_function, id=139645180620608).
Describe the expected behavior
I have tried using the Subclassing API before but i haven't seen such an error raised. Maybe some new updates in TF.
Standalone code to reproduce the issue
Link to the gist
https://gist.github.com/Gokul-S-Kumar/4834f19e78a3415caf8612327812b599
Other info/logs
Link to the error description, in case useful:
https://gist.github.com/Gokul-S-Kumar/8d36b7fd40aded0fbc7a7a3c3a3a1baa
PS:- I may be committing a simple mistake, if yes please help in pointing it out so that I can rectify it.

@Gokul-S-Kumar
Please, refer #32477 and see if it helps you.Thanks!

@Gokul-S-Kumar You code example it is not runnable:
NameError: name 'train_test_split' is not defined
We need a very minimal standalone or colab example that we could copy, paste and run (so please prefer "dummy inputs" that doesn't rely on filesystem) to reproduce your issue.

@Gokul-S-Kumar You code example it is not runnable:
NameError: name 'train_test_split' is not defined
We need a very minimal standalone or colab example that we could copy, paste and run (so please prefer "dummy inputs" that doesn't rely on filesystem) to reproduce your issue.

@bhack Sorry for the error as some of the imports were missing. I have updated the gist (link given below):
https://gist.github.com/Gokul-S-Kumar/4834f19e78a3415caf8612327812b599

@Gokul-S-Kumar
Please, refer #32477 and see if it helps you.Thanks!

@ravikyram Thanks for the response but this reference isn't of much help as I couldn't figure out any solution to my case from it. Maybe because the said issue revolves around BatchNormalization( ) being used in custom layers whereas mine doesn't employ BN layers at all.

@Gokul-S-Kumar Who is calling your build?
Remember that:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/keras/engine/training.py#L325-L328

@Gokul-S-Kumar Who is calling your build?
Remember that:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/keras/engine/training.py#L325-L328

@bhack That works!! Thanks a lot for letting me know the details as I am a beginner whos finding his way around the framework :)

I am facing the same issue, so what is the solution? Could you explain it?


User auth from Helm not working.

From
helm upgrade m9sweeper m9sweeper/m9sweeper -i --create-namespace --namespace m9sweeper-system \
  --set<EMAIL_ADDRESS>\
  --set dash.init.superAdminPassword="Pa22word" \
  --set-string global.apiKey="YOUR-API-KEY" \
  --set dash.ingress.hosts[0]=m9sweeper.rfed.io \
  --set dash.ingress.k8sIngress.enabled=true

I am getting Invalid auth credential in the gui. Here is the message from the dash pod.
 UnauthorizedException: Invalid auth credential
    at NonRedirectableLoginController.localAuthLoginAction (/usr/src/app/main.js:2697:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

What am I doing wrong?

You could try helm delete and re-installing. It shouldn't do this, but my guess is that for whatever reason it failed to setup the first user properly.

Clean install I am getting
m9sweeper-system   m9sweeper-dash-init-877nw                               0/1     Error       0               52s
with the following in the logs:

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
(node:29) [DEP0152] DeprecationWarning: Custom PerformanceEntry accessors are deprecated. Please use the detail property.
Error: Invalid argument provided: the specific seed "super-admin-seed.ts" does not exist.
    at FsSeeds.getSeeds (/usr/src/app/node_modules/knex/lib/migrations/seed/sources/fs-seeds.js:47:15)
    at async Seeder.run (/usr/src/app/node_modules/knex/lib/migrations/seed/Seeder.js:22:19)
    at async Promise.all (index 0)
error: select "u"."id" as "_id", "u"."first_name" as "_firstName", "u"."last_name" as "_lastName", "u"."email" as "_email", "u"."phoneadjusted" as "_phone", "u"."is_active" as "_isActive", "u"."password" as "_password", "u"."source_system_id" as "_sourceSystem_id", "u"."source_system_type" as "_sourceSystem_type", "u"."source_system_user_id" as "_sourceSystem_uid", "authority_levels"."id" as "_authorities__id", "authority_levels"."name" as "_authorities__name" from (select *, COALESCE(u.phone, '') AS "phoneadjusted" from "users" as "u" where "email" = $1 order by u.id asc limit $2) as "u" left join "user_authorities" as "user_auth" on "u"."id" = "user_auth"."user_id" and "user_auth"."active" = $3 left join "authority_levels" on "user_auth"."authority_id" = "authority_levels"."id" order by "u"."id" asc - relation "users" does not exist
    at Parser.parseErrorMessage (/usr/src/app/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/usr/src/app/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/usr/src/app/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/usr/src/app/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:514:28)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  length: 105,
  severity: 'ERROR',
  code: '42P01',
  detail: undefined,
  hint: undefined,
  position: '521',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'parse_relation.c',
  line: '1180',
  routine: 'parserOpenTable'
}
npm notice
npm notice New major version of npm available! 9.6.7 -> 10.2.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.1>
npm notice Run `npm install -g<EMAIL_ADDRESS>to update!
npm notice

current helm command
  --set<EMAIL_ADDRESS>\
  --set dash.init.superAdminPassword="Pa22word" \
  --set global.jwtSecret="changeme" \
  --set global.apiKey="YOUR-API-KEYYOUR-API-KEYYOUR-API-KEYYOUR-API-KEY" \
  --set dash.ingress.hosts[0]=m9sweeper.rfed.io \
  --set dash.ingress.k8sIngress.enabled=true

Can you guys confirm the command you ran to add m9sweeper to your helm registries? (the one you ran before you installed it)

Trying to confirm which helm repository you're using (we had switched to using github recently)

helm repo add m9sweeper https://m9sweeper.github.io/m9sweeper --force-update

helm upgrade m9sweeper m9sweeper/m9sweeper -i --create-namespace --namespace m9sweeper-system \
  --set<EMAIL_ADDRESS>\
  --set dash.init.superAdminPassword="Pa22word" \
  --set global.jwtSecret="changeme" \
  --set global.apiKey="YOUR-API-KEYYOUR-API-KEYYOUR-API-KEYYOUR-API-KEY" \
  --set dash.ingress.hosts[0]=m9sweeper.rfed.io \
  --set dash.ingress.k8sIngress.enabled=true

Okay, so digging into this, there's a race condition because the init job is getting booted up at the same time as the web api and the init job is running (sometimes) before the migrations have run. We had it set to post-install but I guess helm post-install doesn't mean that the apps booted up yet, just that they exist in etcd :D

We'll have a fix out later today or tomorrow. In the meantime, you can theoretically just restart the init job 5 minutes later and it'll work.

Circling back - we released a new version of the app that fixes this race condition last week. Give that a try (you may have to uninstall and reinstall) and let us know if the problem persists.

confirmed working. thanks


Issue using user token

First thanks for this great library, very helpful for Outseta project !!
I have an issue when I want to get the activities of a user.
I initialize OutsetaApiClient using the user accessToken and when I want to get its activity, I have the error message:
The API client was not initialized with API keys
Does this mean we can't access activities only with the user accessToken or should it be possible?
I use the last version 1.1.0
Thanks a lot for your help, Valentin

I dig a little into your project and found that for the crm functions you indeed do authenticateAsServer that prevent to use of these requests if authenticated as a user.
But if I check the API, it seems to be doable using user access token: https://documenter.getpostman.com/view/3613332/outseta-rest-api-v1/7TNfr6k#124f8b75-dc80-4de4-a38c-0e0cac5604f4
Is it possible to change that.?
I would be happy to make a PR if someone explain to me how to best manage this issue.
Thanks a lot!


RAC Input defaultValue causes error

Provide a general summary of the issue here
Setting defaultValue for Input doesn't do what it's supposed to and causes an error.
🤔 Expected Behavior?
Input should remain uncontrolled and initialized with the given value.
😯 Current Behavior
value is set to empty and the defaultValue is ignored. Both attributes existing at the same time also causes an error in the console, since controlled inputs can't have a defaultValue.
💁 Possible Solution
No response
🔦 Context
No response
🖥 Steps to Reproduce
Here's an example TextField input that would cause the described issue.
<TextField>
  <Label>Rows</Label>
    <Input
      name="rows"
      type="number"
      step={1}
      min={MazeController.DIMS_RANGE.minSize}
      max={MazeController.DIMS_RANGE.maxSize}
      placeholder={MazeController.DEFAULTS.dimensions.rows.toString()}
      autoComplete="off"
      defaultValue={MazeController.DEFAULTS.dimensions.rows}
      className="remove-input-arrows h-full w-full bg-transparent px-3"
    />
    {/* Error message */}
    <FieldError />
  </div>
</TextField>

Version
1.2.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response

You're meant to put the value on the TextField, not the Input. Please see https://react-spectrum.adobe.com/react-aria/TextField.html#controlled-value
I'm going to close this as working as intended. Let us know if you run into other issues.

Ah 🤦♂


loads returned dict instead of object

I have two py files: profile.py and celery_test.py
I use jsonpickle.dumps(xx) in profile.py to dump the object to redis. Then, I load the object from redis in celery_test.py
The problem is that I got a dict instead of object when I use jsonpickle.loads(xx) in a celery task like this:
celery_test.py:

@app.task
def runprofile(ID):
    obj = jsonpickle.loads(obj_str_from_redis)  <- obj is a dict !

However, it works well if I use same code in main like this in same file:
celery_test.py:

if __name__ == '__main__':
    obj = jsonpickle.loads(obj_str_from_redis)  <- obj is the object

Looks like there is issue with celery and jsonpickle? Am I doing something wrong?

is it possible that the picked classes are defined in the main module?
They have to be globally importable. I would recommend trying to move the class definitions into their own, importable module. That should hopefully make it work.
Hope that helps!

I defined class Profile in profile.py, then import it in celery_test.py
celery_test.py:

import profile

@app.task
def runprofile(ID):
    obj = jsonpickle.loads(obj_str_from_redis)  <- obj is a dict !

Is it the correct way? And, does it matter if I dumps the object from other py file?


Dear author, any posibility about a dockerfile?

Really thanks.

Hi! Unfortunately, we do not have a Dockerfile for this project. If you have any problems with running the code please open an issue with a detailed description of the problem. Thank you!


HOSTEDCP-1938: Remove saas template in 4.17

What this PR does / why we need it:
Removing saas_template.yaml and related scripts as this is no longer used in app-interface
Which issue(s) this PR fixes:
Fixes HOSTEDCP-1938
Checklist

[x] Subject and description added to both, commit and PR.
[x] Relevant issues have been referenced.
[ ] This change includes docs.
[ ] This change includes unit tests.

/lgtm


Getting html formatted text

Reddit API provides both self-text and comment text formatted in html (body_html). How can i get HTML formatted submission text and comment text in JRAW?

JsonModel.data(String) will let you retrieve the value of any node in the JSON.
This will get the body HTML of a submission:
Submission s = ...
String bodyHtml = s.data("body_html");

Same thing for a comment


HTML output for rendered citations and bibliography

Hey, I'm trying to use hayagriva as a library to parse and render citations and bibliography on a HTML website. Generally it works quite well, but when rendering the data the library includes ANSI escape codes in the output by default. This isn't a major problem, because I can for example do something like .replace("\u{1b}[0m", "") to strip them, but this is less than ideal.
For example given this bibliography
@book{dojg-advanced,
  title     = {A dictionary of advanced Japanese grammar},
  author    = {Makino, Seiichi and Tsutsui, Michio},
  isbn      = {9784789012959},
  lccn      = {2017414531},
  year      = {2008},
  publisher = {Japan Times}
}

When rendering this entry as a String I get:

[\u{1b}[0m1\u{1b}[0m]\u{1b}[0m
 \u{1b}[0mMakino S\u{1b}[0m and \u{1b}[0mTsutsui M\u{1b}[0m \u{1b}[0m2008\u{1b}[0m \u{1b}[0m\u{1b}[3mA dictionary of advanced Japanese grammar\u{1b}[0m (\u{1b}[0mJapan Times\u{1b}[0m)\u{1b}[0m

Ideally (HTML) these would be something along the lines of:

[1]
 Makino S and Tsutsui M 2008 A dictionary of advanced Japanese grammar (Japan Times)

If this currently can't be accomplished, it could potentially be added as an alternative API to the default ToString, if it can then it would be useful to add the way to accomplish this to the documentation.
This is how I am currently processing the bibliography:
    let bib = match res.bibliography {
        Some(ref bib) => {
            let test = bib.items.iter()
                .map(|x| x.content.to_string().replace("\u{1b}[0m", ""))
                .collect::<Vec<_>>();
            Some(test)
        },
        None => None,
    };

Note that you can also iterate over the ElemChildren yourself, the ANSI escapes are just a default. A direct-to-HTML feature might still be nice.

I took a look at the code, and I found that you can format HTML like this (via ElemChildren):
let mut buffer = String::new();
x.content.write_buf(&mut buffer, BufWriteFormat::Html).unwrap();
buffer

Result string looks like this:
 Makino S and Tsutsui M 2008 A dictionary of advanced Japanese grammar (Japan Times)

One different issue I found along the way is that the BibliographyItem is marked as pub, but it isn't exported from the package, so it can't be accessed in the documentation, even though you can use it in code as library consumer.

Oh, I completely missed that HTML is already implemented. I also noticed the problem with the re-export and had opened https://github.com/typst/hayagriva/issues/157 for it.


Specify Timestamp instead of forced time.time()

Hi,
First, thank you for your work.
You need to know that I'm not familiar with OpenTSDB, but anyway I need to make it compatible with my current project and I want to use your library for that. I have a problem with your way to handle timestamp in the send function.
def send(self, name: str, value, **tags) -> dict:
        tags.update(self.static_tags)
        if self.host_tag is True and 'host' not in tags:
            tags['host'] = socket.gethostname()

        self._validate_metric(name, value, tags)
        metric = dict(metric=name, timestamp=int(tags.pop('timestamp', time.time())), value=value, tags=tags)

        if not self._close_client.is_set():
            self._push_metric_to_queue(metric)

return metric

I can see that you are doing a "time.time()", do you think there would be a way to make it configurable ?
Something like that:
def send(self, name: str, value, **tags, timestamp=time.time()) -> dict:
        tags.update(self.static_tags)
        if self.host_tag is True and 'host' not in tags:
            tags['host'] = socket.gethostname()

        self._validate_metric(name, value, tags)
        metric = dict(metric=name, timestamp=int(tags.pop('timestamp', timestamp)), value=value, tags=tags)

        if not self._close_client.is_set():
            self._push_metric_to_queue(metric)

return metric

And allow the user to specify the timestamp when using Gauge (for example)
tsdb.ACTIVE_USERS.set(12, timestamp=my_personal_timestamp)

Thank you !

Hi, I created a PR #8 related to this problem, don't hesitate to tell me if something bothers you!
@scarchik

Hi @Kayoku,
There is actually a way to specify your custom timestamp by using tags.
You can see this in code: int(tags.pop('timestamp', time.time())).
time.time() is a default way of getting timestamp in python, so I am don't understand why you need something else.
About your PR, it breaks compatibility with Prometheus library for me. I want to save some compatibility to switch between opentsdb and prometheus.

Sorry for wasting your time, thanks.


[ScrollView] add defaultZoomScale

Hi,
ScrollView is missing a defaultZoomScale that would allow to define the initial zoom scale.
The current zoomScale prop is controlled and flickers a lot. In my use-case, I just want to be able to define the initial zoom scale, not to control it.
I've also attempted to do this in componentDidMount:
this.refs.myScrollView.setNativeProps({
  zoomScale: 3
});

but this create inconsistency issue on the scrollview: I can basically zoom out of the bounds (it totally breaks the scrollview)
Thanks

I also have this problem - I load an image into a ScrollView that is larger than the viewport, and I want to to start zoomed out, so it fits the screen.  This is simply not possible with the current implementation.

submitted https://productpains.com/post/react-native/scrollview-defaultzoomscale-prop-feature-request/

I think we can consider this done with https://github.com/facebook/react-native/commit/963f26cea8b921caba1f98d45e91992d00e96664
scrollResponderZoomTo(aRect, false) can be used to initialize the scrollview without animation

I being able to define the default zoom would be a much more elegant way of doing this. Calling scrollResponderZoomTo method requires measuring the component, actually calling the method somewhere like componentDidMount and calculating the width and height of the scale that you need. People will inevitably lean towards setting the zoomScale property to accomplish this.

Having a more elegant solution for this would be great, but this has been stagnant for a while so I think this is relatively low-pri.

Any updates on this?


Geopackage format support #291

DO NOT MERGE YET
@rochoa I still have to test this, including editor importing as well, but it seems that the basic export works. As you see is almost a duplication from SpatiaLite format.
I have issues with the second test because of my SQLite ignorance. I'd like to check that gpkg_contents, one of the GeoPackage metadata columns, exist, but it won't work. If I export the file I can query both sqlite_master and gpkg_contents, but the test triggers this error for the second one:
  1) geopackage query gets database and geopackage schema:
     Uncaught AssertionError: {"errno":1,"code":"SQLITE_ERROR"} == null
      at test/acceptance/export/geopackage.js:47:24
      at Statement.errBack (node_modules/sqlite3/lib/sqlite3.js:16:21)

Can you see what I am doing wrong?

@dgaubert could you take a look, please?

for sure!
On Mon, May 9, 2016 at 11:54 AM, Juan Ignacio Sánchez Lara <
<EMAIL_ADDRESS>wrote:

@dgaubert https://github.com/dgaubert could you take a look, please?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/CartoDB/CartoDB-SQL-API/pull/292#issuecomment-217823066

--
Daniel García Aubert
Developer
CartoDB
Plaza de Callao 4, 2 28013 Madrid
www.cartodb.com

As you can see, test is returning an error, but assert is not showing it very well. For asserting errors is better to use assert.ok(!err, err). Then you can see the following error:
1) geopackage query gets database and geopackage schema:
     Uncaught
  AssertionError: Error: SQLITE_ERROR: no such table: gpkg_contents
      at /vagrant/repos/CartoDB-SQL-API/test/acceptance/export/geopackage.js:50:24
      at Statement.errBack (/vagrant/repos/CartoDB-SQL-API/node_modules/sqlite3/lib/sqlite3.js:16:21)

It seems that gpkg_contents does not exist.
I hope this helps to you!

Yep, check my previous comment. I know that the problem is that table, but I don't know why. If you download that database file and open it the table exists. It's likely to be related to SQLite or the connector. I've checked the docs but I saw nothing and thought that maybe you could be aware of this kind of issue, If you're not I'll keep on trying.
Thanks about the assertion suggestion!

Just one last thing: please, could you move binary file to test/fixtures?

@dgaubert , @rochoa CR this, please.

👍

LGTM 👍 .
Nice addition to the family of formats. 🚢 🇮🇹 !!!


Add support for node tags

Nodes will have an attribute "tags" which will be a set (usually of strings). This will allow addressing nodes by tags. For example compute could take one or more tags as a parameter, rather than a list of nodes.
add_node should take an optional parameter "tags".
Additional methods add_tags and remove_tags to set or unset one or more tags on one or more nodes. These methods should not raise exceptions if a tag is re-added, or a tag that is not present is removed.

Node tags are added by 3b88252b6db4c43ee60d41fcf7ea79c41a868b9d. remove_tags was renamed to clear_tags, and singular versions are also provided.
An additional method get_nodes_by_tags is required to get a list of nodes with a specific tag or tags, so I am leaving this issue open.

Added nodes_by_tag method in 2f30c0ba155570436c0cff089ff28266f8845234.


fixing include error when using clang (tested on OSX)

Came across this, when trying out bgfx.
Fixed it for me on osx using XCode6.1.1, should fix it for others.

To minimize ifdefery, this is place where you should put your change:
https://github.com/bkaradzic/bx/blob/master/include/compat/ios/malloc.h

aha. somehow compat/osx was not included in the header search-path of the examples.
got fresh copies of bx and bgfx. all worked out of the box then.

Cool! :)


SIGNATURE VERIFICATION FAILED!

Error Code: GENERIC_VERIFY_FAIL
Three options come next, and verification seems to be the one (vs attack or network problem).

No Tor in Bionic Ubuntu MATE. :(

I tried importing the key with curl -s https://openpgpkey.torproject.org/.well-known/openpgpkey/torproject.org/hu/kounek7zrdx745qydx6p59t9mqjpuhdf |gpg --import -
But I have not fixed...


Not able to render graph component

Working graphs without webpack (react-timeseries-charts).  Needed to start using webpack so I used this starter project. Graph only partially renders (labeled x-axis only) now.
Simple test using graph sample code and including in navigation page...
/const Navigation = () => (
//

//

//
<Link to="/">Home</Link>

//
<Link to="/about">About</Link>

//
<Link to="/sample">Sample</Link>

//

//    <ChartTest/>
//

//);

Could you provide more information about what you're trying to do here? Or maybe create a branch of your work and share them.

I'll try to create a branch and see if I can replicate the same issue here.


Openshift 4.12 certification

We have a production Openshift cluster that we would like to upgrade from 4.10 to 4.12. Can you tell us when is Openshift 4.12 certification planned?

Once this has merged https://github.com/k8s-operatorhub/community-operators/pull/2463 we can start the process with Red Hat. We've completed all the work on our end for OpenShift 4.12 certification.

@datamattsson This has been merged 3 weeks ago, any updates on this?
Also, is it recommended to just install via Helm chart on OpenShift 4.12 as of now?

@sijeesh is responsible for creating the release, not sure what is holding things up.

Have you checked https://scod.hpedev.io/container_storage_provider/hpe_alletra_9000/index.html#remote_copy_with_peer_persistence_synchronous_replication_parameters?

@sijeesh Any updates on this? :smile:

@siegy22 thanks for verifying. We've tested and verified OpenShift 4.13 already but it's not fully certified and probably won't be until the next release. Follow https://scod.hpedev.io/partners/redhat_openshift/index.html#certified_combinations for updates.


When releasing 2.0.1 remove the support for import obs as its not done

When releasing 2.0.1 remove the support for import obs as its not done and editing it is throwing a error

Done as part of v2.1.0


image.doorbell_event_image broke after HA upgrade to 2023.10

Hi,
Upgraded yestarday to Home Assistant Core 2023.10.0 from 2023.9.3.
After this upgrade the image.doorbell_event_image does not update on my dashboard.
Others with the same issue?
Thanks,
Ase

Not just the event image. There are more things broken here. The binary_switch.doorbell_ringing isn't working either.

Not just the event image. There are more things broken due to 2023.10. The binary_switch.doorbell_ringing isn't working either.

Thanks for the reply! Then it is not only my instance and no idea to dig too deep!

hey all, I am using one ptz indoor, 4 pieces 2c and one S100. I am also in the latest version of HA, my cards are refreshing as expected. Moreover, there is a reason why I have created issue template as it gives me all required information to understand the problem. Resolving this, open another one following the template.

Not just the event image. There are more things broken due to 2023.10. The binary_switch.doorbell_ringing isn't working either.

I think you are right there, it is the binary_switch.doorbell_ringing that is not working, The Human detection works fine and the dashboard get updated, it was ringing the bell I tested with!

@fuatakgun, Can we reopen the case now that we understand that the binary_switch.doorbell_ringing seems to be the issue?


fix library-loading issues in editable installs

Contributes to https://github.com/rapidsai/build-planning/issues/118
The pattern introduced in #551 breaks editable installs in devcontainers. In that type of build, libkvikio.so is built outside of the wheel but not installed, so it can't be found by ld. Extension modules in kvikio are able to find it via RPATHs instead.
This proposes:

try-catching the entire library-loading attempt, to silently do nothing in cases like that
adding an import of the kvikio Python library in the devcontainers CI job, as a smoke test to catch issues like this in the future

Notes for Reviewers
How I tested this
Reproduced that with the CUDA 12.5 pip devcontainers today:
build-all
python -c "import kvikio"
# OSError: libkvikio.so: cannot open shared object file: No such file or directory

Confirmed that the changes in this PR fix that.

/merge


Eager tensors always report being on CPU Device despite documentation

I'm playing with https://www.tensorflow.org/swift/tutorials/introducing_x10. Both locally and on Colab, the eager tensor shows up on the CPU. The text says If you are running this notebook on a GPU-enabled instance, you should see that hardware reflected in the device description above.
Even if I try to force it to the GPU, it seems to stay on the CPU:
let eagerGPU = Device(kind: .GPU, ordinal: 0, backend: .TF_EAGER)
let eagerTensor1 = Tensor([0.0, 1.0, 2.0], on: eagerGPU)
let eagerTensor2 = Tensor([1.5, 2.5, 3.5], on: eagerGPU)
let eagerTensorSum = eagerTensor1 + eagerTensor2
eagerTensor1.device

Output:
▿ Device(kind: .CPU, ordinal: 0, backend: .TF_EAGER)
  - kind : TensorFlow.Device.Kind.CPU
  - ordinal : 0
  - backend : TensorFlow.Device.Backend.TF_EAGER

So I'd say there may be 2 bugs here:

Either the documentation is wrong and eager tensors are only supposed to be able to use the CPU, or the documentation is right and code is buggy and doesn't use the GPU, and
If the documentation is wrong, creating a tensor with an eager GPU should fail rather than silently run on the CPU.

I believe this is due to a bug in the way that eager tensors report their device location. The eager tensors have their operations dispatched on the default accelerator, but always report themselves as being located on the CPU. If you run operations using them on your local machine, you can verify that they're running on the GPU by monitoring GPU activity via nvidia-smi or similar tools.
Likewise, eager tensors currently ignore the device you specify for them, so if you tell them to run on the CPU when there's a GPU available, they'll still run on the GPU.
X10 tensors are accurate in reporting which device they're attached to, as well as respecting manual device placement, just not eager tensors.

It looks like this line is always returning the CPU device. I'll figure out how to surface the actual device being used.

Once swift-apis#1156 is merged, TFE_TensorHandleDeviceType and TFE_TensorHandleDeviceID will be available, making this a straightforward fix.

Tentative changes here.

I ran into a problem adding eager/c_api_experimental.h since it contains C++ syntax in the initialization of the TFE_CustomDevice struct.
/home/michellecasbon/repos/out/libtensorflow-prefix/src/libtensorflow/tensorflow/c/eager/c_api_experimental.h:446:14: error: expected ';' at end of declaration list
  int version = TFE_CUSTOM_DEVICE_VERSION;
             ^

It's unclear how to get around this without pursuing custom import rules or modifying upstream.


how to lint "must give optional props default values" in typescript

For example, is there a rule to lint below is wrong:
const MyInput: FunctionComponent<IProps> = ({ label, type }) => {
  return (

      {label}
      <input type={type} />

  );
};
interface IProps {
  label: string;
  type?: string; // it's an optional prop
}

but below is right:
const MyInput: FunctionComponent<IProps> = ({ label, type='text' }) => {
 // ... same as above
}

I known there is a react/require-default-props rule , but it's not suitable for typescipt.

It’s not wrong; the issue is that in both flow and typescript, there are actually two props signatures for a component: the external one (propTypes) and the internal one (propTypes + defaultProps).
If you’re not defining both, and you have any optional props, your types are wrong.

Separately, no, it’s not right to use default arguments. Using .defaultProps is the proper method.

Thanks for reply.
So do you mean I must use PropTypes definition to let eslint work for my purpose？
And no other rules or plugins can do this without writing PropType？

You should always write a runtime .propTypes imo - but eslint should be able to work as long as your external and internal props are typed somehow.

Fwy according to Den Abramov, defaultProps will be deprecated

a) cite your source; b) dan is not the emperor of react; c) the best practice may change when react actually deprecates these things in a non-alpha release, but not a moment before.

Hope there is a specific  rule for typescript component without writing PropTypes. 👐
Closed because don't know what to discuss.

If someone gets into the same problem, here are some of the sources that discuss deprecating defaultProps

Dan's tweet
RFC

It’s approaching 3 years since that RFC was opened, and no movement yet. It would be a very poor decision for that rfc to land, so it’s best to wait until there’s actual movement there.


Failing real life example

Hi guys,
I tried to generate a pdf of one of my tutorial.
To do so, I made a fresh install in a virtual machine to test everything. I installed a clean zds-site (branch zmarkdown-notes) and fetch the template. Anyhow, after few things, I managed to get it compiling...almost. I have a ton of error and latex just give up after 100 of them.
Here is a gist with the md/tex/log data
https://gist.github.com/Eskimon/1a0c9751f84b85186119a33c0ed964e8

Thanks for this nice example ;)
There is actually 3 things that are "wrong" in that document:

Since the recent improvement of @Heziode, the syntax of \licence has changed, and I guess that it is not up to date in the parser, but it is probably us that should mention that ^^
The images. Obviously, they are not provided here, but anyway there is another bug that I mention in https://github.com/zestedesavoir/zmarkdown/issues/137 (but since there were many bugs mentioned, so I'll resignal it :p )
Finally, there is something that rebber does with the youtube video: it transforms the !(youtube.com/xxx) into an image ... But use the url to this image directly in LaTeX, which does not knows how to fetch urls (yeah, LaTeX is an old language :p ).

I'll open an issue into zmarkdown repo, but thanks for trying :)

For licence => zmd is still not released @sandhose
for youtube/rebber it's known and not so simple to fix
for the extension issue, It's a zds issue I think (or a latex issue). Perhaps as we now use lua you can perform some "temp file operation" when you detect more than one dot?

I like your idea for the third point, if I find some time, I'll look in that direction :)

I think we are done here ;)
(until next time)


This doesn't work in iframe?

This isn't working in iframe, tried adding the script in the iframe head tag, then using demo examples, the copy button doesn't do anything

Do you have a simple code sample that demonstrates the issue?

@i9w any sample code?

Thanks @Ruffio for asking these questions.

I have an iframe in an iframe on mobile and I’m potentially seeing this same issue

To clarify the events are triggering and I see the correct text being identified in the console but I’m getting a blank clipboard.

Why was this closed? It simply doesn't work for iframes, where the selector probably needs to append .contentDocument? I've tried:
var clip = new ClipboardJS('button', {
    container: document.getElementById('#target').contentDocument
});

But that doesn't seem to work. Can we re-open and address this? Thanks!

iframe? Isn't that outdated? At stackoverflow I found this: https://stackoverflow.com/a/1088569
Try to use that

I have an app running on an iframe that needs to copy either parent URL (document.referrer) or another string. When I use the app directly (ie, without being embedded with an iframe), it copies fine, but when the app runs inside the iframe, it doesn't.
Can you people please help me solve it? Is it possible?

I have this same issue. Could we please re-open? I'm running an panel window of my main app in a seprate child window. This fails to work because the check here - https://github.com/zenorocha/good-listener/blob/master/src/is.js#L9
value instance of HTMLElement will only return true for elements create by the window in scope.This causes clipboardjs to throwFirst argument must be a String, HTMLElement, HTMLCollection, or NodeList` when constructing with an dom ref from another frame. If we could amend this check some how, that'd be great.
See here for why that check fails - https://stackoverflow.com/questions/384286/how-do-you-check-if-a-javascript-object-is-a-dom-object#comment12920435_384380

So this still isn't possible?

Yeah I caught this problem. There would be ways around it, but for me it was a nice-to-have.

Hi @zenorocha, could you please reopen this? Some code was provided by @derender and even with the change suggested by @Ruffio – using iframe.contentDocument || iframe.contentWindow.document – it is not working. If you want complete code, here is a minimal file (zipped to make Github accept the attachment): I have created an IFrame and filled it using the open method, then added buttons to try three ways of copying the Iframe content. The first button simply copies the empty IFrame element without content. The second (using the content document as a target) throws an error. The third (using the HTML element within the content document as a target) reports success but noting is copied. Tried in current versions of Chromium and Firefox under Linux.
clipboardjs-iframe.html.zip


ENHANCEMENT Prevent test DBs persisting after testing

Hmm - keeping test DBs on failure can be a useful debugging tool - would it be better to introduce a task one could run manually - or maybe only kill the DB if there's no failure?

We have a task, but then you have to manually run it yourself. A good testing environment leaves no additional artifacts to clean up; Scouts rule.

Can we pass any additional flags to phpunit like --keep-db ?

Possibly! it might be a bit more architecture to build in cli args -> environment args.

Hmm - keeping test DBs on failure can be a useful debugging tool - would it be better to introduce a task one could run manually - or maybe only kill the DB if there's no failure?

This was never the intended use-case, this PR just fixes a bug. 👍  to thies patch from me, assuming that the tests pass.
--keep-db could be an extra feature but given that this patch fixes a bug in the current system I'm inclined to merge this one first.

Tests are green so . :D


amplify add codegen gives error

Describe the bug
I am following the steps outlined in the blog https://aws.amazon.com/blogs/mobile/aws-appsync-releases-new-guided-api-builder/ . However step 8 gives me the following error:
bash-3.2$ amplify add codegen --apiId XXXXXXXXXXXXXX
There are no Code Gen APIs available.
Add by running amplify codegen add
If I try to put "add" after codegen I get same error.
bash-3.2$ amplify codegen add --apiId XXXXXXXXXXXXXX
There are no Code Gen APIs available.
Add by running amplify codegen add
Either this is a bug or the documentation is not clear.

Can you please provide the version of amplify-cli that you are using?

Please use the latest version of the CLI -> 0.1.24 for the cod gen function you’re trying to implement.


Link to v1.25 docs, in the version selector, is wrong

This is a Bug Report

Problem:
Link to v1.25 docs, in top nav 'Versions' menu, is wrong

Proposed Solution:
Update https://github.com/kubernetes/website/blob/main/config.toml#L190-L216 to:
[[params.versions]]
fullversion = "v1.25.5"
version = "v1.25"
githubbranch = "v1.25.5"
docsbranch = "release-1.25"
url = "https://v1-25.docs.kubernetes.io"

[[params.versions]]
fullversion = "v1.24.9"
version = "v1.24"
githubbranch = "v1.24.9"
docsbranch = "release-1.24"
url = "https://v1-24.docs.kubernetes.io"

[[params.versions]]
fullversion = "v1.23.15"
version = "v1.23"
githubbranch = "v1.23.15"
docsbranch = "release-1.23"
url = "https://v1-23.docs.kubernetes.io"

[[params.versions]]
fullversion = "v1.22.17"
version = "v1.22"
githubbranch = "v1.22.17"
docsbranch = "release-1.22"
url = "https://v1-22.docs.kubernetes.io"

File to Update:
https://github.com/kubernetes/website/blob/main/config.toml#L190-L216

/good-first-issue

/assign @chinu-anand

/assign @chinu-anand

/assign @chinu-anand

What is the update ?
Can I work on this issue

@maddy020
Sorry but @chinu-anand already opened a PR #38415.

/triage accepted

/priority important-soon

/close
Fix is merged.
Thanks @jihoon-seo and @chinu-anand


Add support for border-spacing

Was just looking at the reference (http://acss.io/reference) and noticed there was no support for border-spacing. Would be great if it could be added!
Thanks!

Should be easy to add, I'll take care of this one soon.

Blocked by issue #221

In v3.1.1


consensus/logs: multiple "error adding vote" entries from the same peer

Bug Report
Setup
CometBFT version (use cometbft version or git rev-parse --verify HEAD if installed from source): v0.37.4 from https://github.com/osmosis-labs/cometbft
Have you tried the latest version: no
Environment: Osmosis v23 mainnet
Config
No config changes
What happened?
Every now and then, we get error log spam (maybe 40 lines) of a single peer failing to process a VoteMessage. The time stamp slowly increments, so it seems like multiple attempts from the peer and not just a single function call.
What did you expect to happen?
If the peer fails to add a vote, it seems like this should be only attempted once and logged once. I could be misunderstanding the logic flow though, so what is happening here could make sense.
How to reproduce it
Running a node on Osmosis mainnet v23. It could have always been present, but our infra has just set up a betterstack logs instance, and I am going through all the errors that happen regularly and attempting to reduce the noise we see from all parts of the stack.
Logs

Also an important note, these error logs are showing maybe every 200 blocks or so, but every time it is the same peer.

@czarcas7ic the "same peer" part is very interesting.
This should be a validator, have you reached out?

The furthest I researched was this screenshot sadly, was hoping there was a more straight forward explanation for what was happening

So, with Info log level, you can see the reason:
https://github.com/cometbft/cometbft/blob/v0.37.x/consensus/state.go#L2055-L2063
I agree that the operation here is not really great, as the returned error is standard, a generic "error adding vote", and this is the only information provided in Error level.

If the peer fails to add a vote, it seems like this should be only attempted once and logged once.

So, when a node receives several invalid votes from the same peer, do you expect us to only produce a single Error log entry? I assume that once per peer and per height (and per vote type)?

The point is that different errors can be provided for different votes. Also for this reason, it is not really trivial to only the first error of some type, vote type, height, etc.

An alternative solution is really to punish peers that send us invalid votes: https://github.com/tendermint/tendermint/issues/1281

That would be the desire yes, both reducing the error to a single log and punishing the peer. From watching our logs, these typically come from the exact same peer every time, so maybe there could be some automatic temporary blacklisting that is stored (and continues to be stored even after node reboot).
If the former is not possible I think that is fine, as long as the later prevents them from continually causing this to appear in logs.

I don't see any immediate action we can take in order to address this issue. It is not clear whether the peer that sends several invalid votes is misbehaving or if it is just slow and sending old votes.
We would need to improve the logging for this situation, as the produced Error level message is insufficient to understand the reason for the error.

That makes sense to me, so should the action item be to just increase logging in this area?


AMI-1159 Use https or http depending on env var

PLEASEREVIEW @declanshanaghy @cgaspardSplunk @ranandwala
Add an environment variable config option to use either http or https (with default to http to preserve behavior on microservices not yet updated) for the health check.  The port/proto used for the health check is what is reported to eureka, which is what hydra uses for connections.

:zap:
reviewed with Matt and Mike R.


Support setting the electron app path in start()

[x] I have read the contribution documentation for this project.
[x] I agree to follow the code of conduct that this project follows, as appropriate.
[x] The changes are appropriately documented (if applicable).
[x] The changes have sufficient test coverage (if applicable).
[x] The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:
The start command allows the caller to specify the directory for the electron forge project, and then assumes that its main module is the electron application. However, some projects may contain multiple electron applications, or may want to specify an html file or a URL as the electron application (see https://github.com/electron/electron/blob/cf694ef32b78f0904219c6c8ba554d3d5cbea037/default_app/main.js#L338).
So, this adds an optional 'appPath' API option (and corresponding '-p'/'--app-path' CLI option) the is the path to the electron application relative to the electron forge project (the 'dir' option).
NOTE: This allows ember-electron to use electron-forge to implement its test command, and is part of that migration effort.

This now isn't as fluid as I would like, having to do --app-args and then quote everything correctly seems like it would cause a bit of trouble.  Perhaps we can manually strip out the from the argv the params that the start command handles.

@malept @MarshallOfSound I believe I've addressed your feedback. If you have any more, let me know. If it looks good, then please give me a heads-up before merging as I'd like the chance to rebase some of the code review feedback commits for a cleaner git history before it hits master.

@bendemboski Looks good to me, just need to squash and pull in latest master 👍


Add Domain for Ain Shams University, Faculty of Computer and Information Sciences

Add domain for an Egyptian accredited university: Ain Shams University, Faculty of Computer and Information Sciences.
Website: https://cis.asu.edu.eg

@amr-abdelfattah I am sorry, the domain cis.asu.edu.eg is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).


slider: minimum value should always of zero position in range mode

重现
Angular
https://stackblitz.com/edit/angular-n2vcdt?file=src/app/app.component.ts
gif:

React
https://codepen.io/cipchk/pen/wYZazP?editors=0010
gif:

@wilsoncook I noticed that you would refactor this component so I would reassign this issue to you.

Ref #1547.