tensorflow_gpu-1.4.0 requires libcudart.so.10.0 rather than libcudart.so.8.0

System information

OS Platform and Distribution: Linux Ubuntu 16.04
Mobile device if the issue happens on mobile device: N/A
TensorFlow installed from (source or binary): binary
TensorFlow version: 1.4.0
Python version: 3.6.10
Installed using virtualenv? pip? conda?: pip
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: 8.0 / 6
GPU model and memory: Tesla V100-SXM2-16GB

Describe the problem
I tried to use openai's blocksparse, which requires CUDA 8 and Tensorflow 1.4.0. When I import blocksparse, the error tensorflow.python.framework.errors_impl.NotFoundError: libcudart.so.10.0: cannot open shared object file: No such file or directory is raised. Since tensorflow_gpu-1.4.0 is compatible with CUDA 8, I wonder why libcudart.so.10.0 is required rather than libcudart.so.8.0.
Provide the exact sequence of commands / steps that you executed before running into the problem
First I created a conda environment and activated it.
conda create -n py36-bs python=3.6
conda activate py36-bs

Then I installed TensorFlow 1.4.0.
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.4.0-cp36-cp36m-linux_x86_64.whl

Next I installed blocksparse.
pip install blocksparse

When I tried to import bloacksparse, an error occurred.
Python 3.6.10 |Anaconda, Inc.| (default, May  8 2020, 02:54:21)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import blocksparse
/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:469: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:470: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:471: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:472: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:473: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:476: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/blocksparse/__init__.py", line 3, in <module>
    from blocksparse.utils import (
  File "/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/blocksparse/utils.py", line 16, in <module>
    _op_module = tf.load_op_library(os.path.join(data_files_path, 'blocksparse_ops.so'))
  File "/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
  File "/home/ubuntu/anaconda3/envs/py36-bs/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: libcudart.so.10.0: cannot open shared object file: No such file or directory
>>>

Any other info / logs
I checked several things related to CUDA.
(py36-bs) ubuntu@xxx:~$ ls -l /usr/local/cuda
lrwxrwxrwx 1 root root 19 Jul 19 13:13 /usr/local/cuda -> /usr/local/cuda-8.0

(py36-bs) ubuntu@xxx:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

(py36-bs) ubuntu@xxx:~$ echo $PATH
/home/ubuntu/anaconda3/envs/py36-bs/bin:/home/ubuntu/anaconda3/bin:/home/ubuntu/anaconda3/bin:/home/ubuntu/anaconda3/bin:/usr/local/cuda/bin:/usr/local/bin:/opt/aws/bin:/usr/local/mpi/bin:/usr/local/cuda/bin:/usr/local/bin:/opt/aws/bin:/home/ubuntu/.dl_binaries/bin:/usr/local/mpi/bin:/opt/aws/neuron/bin:/home/ubuntu/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin:/home/ubuntu/anaconda3/bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/home/ubuntu/anaconda3/condabin:/home/ubuntu/anaconda3/bin:/usr/local/cuda/bin:/usr/local/bin:/opt/aws/bin:/usr/local/mpi/bin:/usr/local/cuda/bin:/usr/local/bin:/opt/aws/bin:/home/ubuntu/.dl_binaries/bin:/usr/local/mpi/bin:/opt/aws/neuron/bin:/usr/local/cuda/bin:/usr/local/bin:/opt/aws/bin:/usr/local/mpi/bin:/opt/amazon/openmpi/bin:/opt/amazon/efa/bin:/home/ubuntu/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin:/home/ubuntu/anaconda3/bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/home/ubuntu/anaconda3/bin:/usr/local/cuda/bin:/usr/local/bin:/opt/aws/bin:/usr/local/mpi/bin:/usr/local/cuda/bin:/usr/local/bin:/opt/aws/bin:/home/ubuntu/.dl_binaries/bin:/usr/local/mpi/bin:/opt/aws/neuron/bin:/usr/local/cuda/bin:/usr/local/bin:/opt/aws/bin:/usr/local/mpi/bin:/opt/amazon/openmpi/bin:/opt/amazon/efa/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

(py36-bs) ubuntu@xxx:~$ echo $LD_LIBRARY_PATH
/usr/lib64/openmpi/lib/:/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/mpi/lib:/lib/:/usr/local/cuda-9.0/lib/:/usr/lib64/openmpi/lib/:/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/mpi/lib:/lib/:/usr/local/cuda-9.0/lib/:/usr/lib64/openmpi/lib/:/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/mpi/lib:/lib/:/usr/local/cuda-9.0/lib/:/usr/lib64/openmpi/lib/:/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/mpi/lib:/lib/:/usr/local/cuda-9.0/lib/:/usr/lib64/openmpi/lib/:/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/mpi/lib:/lib/:/usr/local/cuda-9.0/lib/:

libcudart.so.8.0 exists but TensorFlow asked for libcudart.so.10.0.
(py36-bs) ubuntu@xxx:~$ ls -l /usr/local/cuda/lib64/libcudart.so.8.0
lrwxrwxrwx 1 root root 19 Jun 17 01:36 /usr/local/cuda/lib64/libcudart.so.8.0 -> libcudart.so.8.0.61

Besides, there exist multiple versions of CUDA on my machine.
(py36-bs) ubuntu@xxx:~$ ls /usr/local/
bin  cuda  cuda-10.0  cuda-10.1  cuda-10.2  cuda-8.0  cuda-9.0  cuda-9.2  etc  games  include  init  lib  man  mpi  sbin  share  src

Is the problem related to GPU driver? When I entered nvidia-smi, CUDA Version is 10.2.
Since I met some wired problems when I tried to run blocksparse with CUDA 10.0, I want to use CUDA 8.0, which is the version authors of blocksparse use. Could anyone help me with the error? Thanks a lot!
tensorflow_gpu-1.4.0 requires libcudart.so.10.0 rather than libcudart.so.8.0

@xuyifangreeneyes I guess this issue is more suitable to be posted on blocksparse repo. Please post your issue there as this repo is related to core Tensorflow.
I am closing this issue. Please feel free to reopen if I am mistaken. Thanks!

Hi,
Did you solve your problem?
I'm using tensorflow 2 but surfering this problem. Can you help me, please?
Thanks in advance.


Page ailment fix and Slider related Changes

Pull Request Checklist

[x] I have added screenshots and videos to show before and after the working of my code.
[x] I have ensured that the screen size is set to 100% while making the video.
[x] I have synced the latest fork with my local repository and resolved any conflicts.
[ ] I understand that if any the above conditions are not met , my PR will not be MERGED .

Final Changes Video
https://github.com/user-attachments/assets/1a777a05-b61d-45e3-9a3a-2487477d574e

Kindly refork and resync

And show the whole website page where you have done changes

this pr is being closed due to lack of response from you


:smile: Allow to search database items by their schemas

@rodrigowirth have you tested if searching tables without schemas (for DB engines like MySQL) still works with this change?

@maxcnunes I have just remove the packge-lock.json file 😄

Hi @BornaP, yes I have performed some tests using MySQL.

Thanks Sir :)


add support for config context in volumes

Netbox version
Agent version
Docker API Version

v3.6.9
/
/

Actual Behavior
There is no way to add config context to be mounted inside a container
Desired Behavior
An new type should be added for volumes, which we can use inside the agent to map mount a config context inside a container
Example of use cases:

you have a config file with for example a nginx configuration, we would use the config context who contains the config and the mount it inside the container where the path should be

Expected structure:
Destination path of the file
Config context
Driver (something like configmap or just configcontext)

Would you plan to keep context on the volume itself as per below ?
buzko@lovespizza:~$ docker volume create dzove  --label croatia,luxembourg
dzove
buzko@lovespizza:~$ docker inspect dzove
[
    {
        "CreatedAt": "2024-05-06T16:25:46+02:00",
        "Driver": "local",
        "Labels": {
            "croatia,luxembourg": ""
        },
        "Mountpoint": "/var/lib/docker/volumes/dzove/_data",
        "Name": "dzove",
        "Options": null,
        "Scope": "local"
    }
]

if not "add host" will make you lose that information


Conan package identifier

Package identifier that performs the file parsing logic for identification of dependency for CONAN packages.

PR looks fine ,we will merge this when we will plan for releasing the conan package clearing.


Improve file chooser menu

Currently, the file chooser is rather annoying: it always starts at the directory that contains the Editor (except when the Editor is inside a ZIP file, in which case it starts at some weird directory).
It would be more convenient if it would start at the directory where the last file was chosen. Furthermore, it would be nice to have some buttons to jump to the Documents/Home folder or to go to another drive.
Or perhaps using bindings for the native file chooser?

The file chooser menu will be replaced in Editor 11.4


jib packages spring boot devtools

Environment:

Jib version: 2.1.0
Build tool: maven
OS: macos

Description of the issue:
I created a Spring Boot app w/ devtools dependency:
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
  <scope>runtime</scope>
  <optional>true</optional>
</dependency>

In the resulting image,  devtool is actually activated. The dependency is in the image's /app/libs directory.
Expected behavior:
Optional dependency ignored? Spring Boot's plugin excludes devtool by default.
https://docs.spring.io/spring-boot/docs/2.2.5.RELEASE/maven-plugin/repackage-mojo.html
Steps to reproduce:

Create a new spring boot app w/ devtool
Package w/ Jib
See that Jib includes Devtool

jib-maven-plugin Configuration:
<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>jib-maven-plugin</artifactId>
  <version>2.1.0</version>
  <configuration>
    <from><image>openjdk:8u222-slim</image></from>
    <to><image>gcr.io/wise-coyote-827/jib-demo</image></to>
    <container><user>nobody:nogroup</user></container></configuration>
</plugin>

Log output:
Additional Information:

Yeah that makes sense, our logic considers it a runtime dependency. We're not checking for optional. How would this work in a container environment? Someone would inject the dependency at runtime?

Someone asked this before: https://github.com/GoogleContainerTools/jib/issues/1254#issuecomment-439478139

Oh this is more about development vs deployment.
I feel like the springboot team should've used profiles in their example, not optional.
Anyway, it still seems within the scope of optional use as an exclusionary mechanism for packaging.
See: Why use optional dependencies? at https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html

how can we resolve this? thinking of..

explicit exclusions by groupId:artifactId
or, simply ignore optionals
or, simply jib the produced JAR, which is something i've been advocating :) since the JAR is what user expects to turn into container.

As a workaround use this solution https://blog.frankel.ch/spring-devtools-jib-intellij-idea/

Yeah, profiles should be the way to go.

We have published a Jib extension for Spring Boot (Maven and Gradle) that covers this issue. You can apply the extension on recent Jib versions.
Details
As discussed in this thread and #1254, Jib is working as intended to package spring-boot-devtools in the image, and the user should properly configure the dependency if they do not want it at runtime. However, we decided to create the extension to help people avoid the chore of manually setting up profiles in their projects.

For future reference, I solved the issue with maven profile & scope.
I have two profiles local (active by default for local development) & cloud in my pom.xml.
<profiles>
  <profile>
    <id>local</id>
    <activation>
      <activeByDefault>true</activeByDefault>
    </activation>
    <properties>
      <dev-tools.scope>compile</dev-tools.scope>
    </properties>
  </profile>
  <profile>
    <id>cloud</id>
    <properties>
      <dev-tools.scope>provided</dev-tools.scope>
    </properties>
  </profile>
</profiles>

When scope is provided jib won't include it in the apps/lib folder
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
  <scope>${dev-tools.scope}</scope>
</dependency>

Then build my docker image with -P cloud like
mvn package myproject -P cloud jib:build -Dimage=myproject```

For future reference: When using the Gradle plugin org.springframework.boot, you can configure Jib to use a configuration called productionRuntimeClasspath that doesn't include the devtools (and possibly other dependencies of the developmentOnly configuration).
Example in build.gradle:
jib {
    configurationName = org.springframework.boot.gradle.plugin.SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME
    from {
        image = 'amazoncorretto:16'
    }
    to {
        image = 'myimage'
    }

The references constant is not public, which is why I've created an issue at the spring boot project: https://github.com/spring-projects/spring-boot/issues/26686
Instead of referencing the constant, you may just as well just use the string "productionRuntimeClasspath".

update: use jib-spring-boot-extension to exclude spring-boot-devtools

Doesn't do
jib {
  container {
    configurationName = 'productionRuntimeClasspath'
  }
}

the trick too?

In the latest version configurationName is defined by val it is not modifiable, how do I set configurationName?

This is not only about devtools but docker-compose too, I assume you use runtimeclasspath? I will open a dedicated issue


FormatXmlHelper constructor throws exception when TransformerFactory does not support attribute

Proposal
Version: 3.10.0
In the FormatXmlHelper constructor, there are a few calls of the TransformerFactory.setAttribute() method.
https://github.com/wiremock/wiremock/blob/7df345b9065b2b7ba75ede12998603a262d8ff6c/src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/helpers/FormatXmlHelper.java#L68-L70
The method may throw an IllegalArgumentException if the attribute is not supported by the underlying implementation of the TransformerFactory.
The underlying implementation is selected by classes present on the classpath. The issue may manifest for the oracle.xml.jaxp.JXSAXTransformerFactory
Workaround:
Set the TransformerFactory implementation explicitly via System.property. E.g., System.setProperty("javax.xml.transform.TransformerFactory", "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
Suggested solution
Instead of searching for the TransformerFactory implementation via TransformerFactory.newInstance() use custom algo which will explicitly prefer supported known implementations present on the classpath.
Reproduction steps

Add Oracle XMLparserv2 dependency to the project: com.oracle.database.xml:xmlparserv2:<IP_ADDRESS>.07
Create instance of the com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.FormatXmlHelper

References

TransformerFactory.setAttribute() documentation.

We are getting this problem with Saxon as the XML parser too.


Error in custom pylint checkery

Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/campaign_management/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/__init__.py", line 23, in run_pylint
    PylintRun(sys.argv[1:])
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/lint.py", line 1731, in __init__
    linter.check(args)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/lint.py", line 1004, in check
    self._do_check(files_or_modules)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/lint.py", line 1165, in _do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/lint.py", line 1252, in check_astroid_module
    walker.walk(ast_node)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/utils/ast_walker.py", line 77, in walk
    self.walk(child)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/utils/ast_walker.py", line 77, in walk
    self.walk(child)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/utils/ast_walker.py", line 74, in walk
    callback(astroid)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/baseplate/lint/db_query_string_format_plugin.py", line 53, in visit_assign
    elif not variable_is_query and node.targets[0].name in self.string_sub_queries:
AttributeError: 'AssignAttr' object has no attribute 'name'

I'm able to trigger this with the following code:
class Foo:
    pass

def bar(x):
    pass

Foo.bar = bar

The error is raised by the last line there.


Name conflict

Hi,
We've been using the Haraka name for around 7 or 8 years now. Can you please pick a new name? Thanks.
https://haraka.github.io/
https://www.npmjs.com/package/Haraka
https://en.wikipedia.org/wiki/Haraka_(software)
https://github.com/haraka/Haraka

Hi,
The name was available on npm, I honestly didn’t know that npm names are case sensitive.
I cannot afford changing the name at the moment because we’re building a product on top of it at the moment, changing the name would be a breaking change.
I doubt that anyone would confuse a mail server with an animation library. I will however look into this, I can assure you that. I do realize now that the name belongs to you.
I would appreciate your patience here. Thanks.

No problem, take your time. I'm mostly trying to help you: searching for
Haraka will usually bring up our project since it's been around for so long.
On Fri, Nov 16, 2018 at 4:21 AM Ain Sal<EMAIL_ADDRESS>wrote:

Hi,
The name was available on npm, I honestly didn’t know that npm names are
case sensitive.
I cannot afford changing the name at the moment because we’re building a
product on top of it at the moment, changing the name would be a breaking
change.
I doubt that anyone would confuse a mail server with an animation library.
I will however look into this, I can assure you that. I do realize now that
the name belongs to you.
I would appreciate your patience here. Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/sonaye/haraka/issues/11#issuecomment-439332060, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAobYyW7iXY56lbKr1dFv8l_tYZkRIN9ks5uvoOZgaJpZM4YguBj
.

I just discovered this today, when I got the wrong Haraka installed with npm i haraka.
Before finding this issue I initiated correspondence with NPM regarding this as I feel variations in name case should not be publishable on NPM. It permits typo-squatting and other such security issues we've observed at the TLDs. If NPM revokes your package from the registry, that will be why.
Interestingly enough, we also own the haraka NPM org which also wasn't enough to prevent this namespace collision.

I forgot to mention, @sonaye could continue using the haraka name by publishing it within a scoped namespace such as @sonaye/haraka. I would not object to that.

I will be moving it to @exodus/haraka, contacted npm to make the name available for you. I will reach out to you through email @baudehlo once the name is cleared.

As requested, the haraka package has been transferred to the @haraka org.


Missing 'act' relookup after creating arguments object

Caught using refzero finalizer torture: 'act' was not property looked up after creation of an Arguments object. This might be quite difficult to trigger in practice though.

Merged to master. The fix can be verified with the finalizer torture option, but I couldn't come up with an actual test case to trigger it (it might be possible though but not trivial).

I don't understand this one, honestly.  Arguments object creation is part of call setup I thought, there should be act re-lookup needed?

Every time there's a potential for side effects thr->callstack may be resized and reallocated which may change its pointer. So any previous act pointers computed based on thr->callstack are potentially invalid and must be computed again.

Ah, I see.  For a testcase you might try synthesizing a very deep recursion (but not infinite!) with no tail calls to force Duktape to resize the callstack.

But the problem for writing a testcase is how to trigger a finalizer (or any other call) during Arguments object creation: all the objects there are internal to Duktape and have no finalizers. Well, perhaps you could add a finalizer to Object.prototype or something weird like that. The torture test causes a concrete error though because it behaves as if every object always had a finalizer, so it catches this.

Well, you have to give me points for tenacity anyway, I'm still trying to come up with a way to generate side effects during arguments object creation.  My latest attempt was to replace Object.prototype with a Proxy.  Needless to say, that didn't work as it's not writable. :)


Make sure Docker Bench for security given credit

Signed-off-by: Daniel J Walsh<EMAIL_ADDRESS>

@vrothberg PTAL


return all hosts, not only sshStatus=true, when querying an endpoint /list-available/

closed in favor of #21


Why is the course being taught in JavaScript?

I have answered this question multiple times on different platforms, however, I feel there's a need to answer it again and get one link to it.
This is a self-reminder issue.

What's the mind map of this course?
Will you teach us Java, Kotlin or Flutter?
Both videos answer the question


[Feature Request]:  add real colour hover on the social icons of hostel management website

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
add actual colour hover  on social icons
Use Case
improve ui
Benefits
loks good
Add ScreenShots
before :
https://github.com/user-attachments/assets/4a89b1e0-24a3-4aac-9d7f-42ff3cc0f9d0
after :
https://github.com/user-attachments/assets/077922b4-2251-4af3-bab8-0e85280728a9
Priority
Medium
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[ ] I'm a SSOC'24 contributor
[X] I have starred the repository

@heysagnik @apu52 please assign me this , i will surely complete all in time

@ANKeshri I have assigned u previously 2 issues. So please try to complete previous 2 issues at first & please don't raise more than 2 issues at a time. After completing previously assigned issues ping me here .Then I will assign u

@a

@ANKeshri I have assigned u previously 2 issues. So please try to complete previous 2 issues at first & please don't raise more than 2 issues at a time. After completing previously assigned issues ping me here .Then I will assign u

sure @apu52 from now i will raise max 2 issue

@apu52 please assign me this issue


[YouTube] This content isn't available, try again later.

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm reporting that yt-dlp is broken on a supported site
[X] I've verified that I have updated yt-dlp to nightly or master (update instructions)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
Norway
Provide a description that is worded well enough to be understood
This error message occurs when attempting to download from a long playlist. I have experienced it starting at around the 180th item on some playlists. Here it starts at about 280. Before the cutoff yt-dlp retrieves information as normal, following the cutoff point all requests generate the error message.
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[X] If using API, add 'verbose': True to YoutubeDL params instead
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
$ yt-dlp -vU -S res:360 --dateafter 20221101 --datebefore 20221130 https://www.youtube.com/@geopoliticshaiphong
[debug] Command-line config: ['-vU', '-S', 'res:360', '--dateafter', '20221101', '--datebefore', '20221130', 'https://www.youtube.com/@geopoliticshaiphong']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>from yt-dlp/yt-dlp [67adeb7ba] (pip)
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-5.15.0-124-generic-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2020.06.20, mutagen-1.45.1, requests-2.32.3, secretstorage-3.3.1, sqlite3-3.37.2, urllib3-2.1.0, websockets-13.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1839 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version<EMAIL_ADDRESS>from yt-dlp/yt-dlp
yt-dlp is up to date<EMAIL_ADDRESS>from yt-dlp/yt-dlp)
[youtube:tab] Extracting URL: https://www.youtube.com/@geopoliticshaiphong
[youtube:tab] @geopoliticshaiphong: Downloading webpage
[debug] [youtube:tab] Selected tab: 'videos' (videos), Requested tab: ''
[youtube:tab] Downloading all uploads of the channel. To download only the videos in a specific tab, pass the tab's URL
[youtube:tab] @geopoliticshaiphong/streams: Downloading webpage
[debug] [youtube:tab] Selected tab: 'streams' (live), Requested tab: 'streams'
[youtube:tab] @geopoliticshaiphong/shorts: Downloading webpage
[debug] [youtube:tab] Selected tab: 'shorts' (shorts), Requested tab: 'shorts'
[youtube:tab] Downloading as multiple playlists, separated by tabs. To download as a single playlist instead, pass https://www.youtube.com/playlist?list=UUOxLhz6B_elvLflntSEfnzA
[download] Downloading playlist: Danny Haiphong
[youtube:tab] Playlist Danny Haiphong: Downloading 3 items of 3
[download] Downloading item 1 of 3
[download] Downloading playlist: Danny Haiphong - Videos
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 1: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 2: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 3: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 4: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 5: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 6: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 7: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 8: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 9: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 10: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 11: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 12: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 13: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 14: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 15: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 16: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 17: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 18: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 19: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 20: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 21: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 22: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 23: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 24: Downloading API JSON
[youtube:tab] UCOxLhz6B_elvLflntSEfnzA page 25: Downloading API JSON
[youtube:tab] Playlist Danny Haiphong - Videos: Downloading 767 items of 767
[download] Downloading item 1 of 767
[youtube] Extracting URL: https://www.youtube.com/watch?v=Y3iAKXC1yho
[youtube] Y3iAKXC1yho: Downloading webpage
[youtube] Y3iAKXC1yho: Downloading ios player API JSON
[youtube] Y3iAKXC1yho: Downloading mweb player API JSON
[debug] Loading youtube-nsig.4e23410d from cache
[debug] [youtube] Decrypted nsig 7i_eeiuYsllQyE2Zu => A9KIFiMQ9nfwCg
[debug] Loading youtube-nsig.4e23410d from cache
[debug] [youtube] Decrypted nsig UK9yBH6AjqDhGcOZe => _foncFj89z8sIQ
[youtube] Y3iAKXC1yho: Downloading m3u8 information
[debug] Sort order given by user: res:360
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, res:360(360.0), quality, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[download] 2024-10-31 upload date is not in range 2022-11-01 to 2022-11-30
[download] Downloading item 2 of 767

[download] 2023-10-20 upload date is not in range 2022-11-01 to 2022-11-30
[download] Downloading item 280 of 767
[youtube] Extracting URL: https://www.youtube.com/watch?v=lssGtjDON8s
[youtube] lssGtjDON8s: Downloading webpage
[youtube] lssGtjDON8s: Downloading ios player API JSON
[youtube] lssGtjDON8s: Downloading mweb player API JSON
[debug] Loading youtube-nsig.4e23410d from cache
[debug] [youtube] Decrypted nsig Nkn-_6po1J2zr4PKj => 44X5uiZpPwu5Bw
[debug] Loading youtube-nsig.4e23410d from cache
[debug] [youtube] Decrypted nsig HfaQKobQaKr954tAc => 84MKNYIuwmSODQ
[youtube] lssGtjDON8s: Downloading m3u8 information
[debug] Sort order given by user: res:360
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, res:360(360.0), quality, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[download] 2023-10-19 upload date is not in range 2022-11-01 to 2022-11-30
[download] Downloading item 281 of 767
[youtube] Extracting URL: https://www.youtube.com/watch?v=H64QQZuw-aA
[youtube] H64QQZuw-aA: Downloading webpage
[youtube] H64QQZuw-aA: Downloading ios player API JSON
[youtube] H64QQZuw-aA: Downloading mweb player API JSON
ERROR: [youtube] H64QQZuw-aA: This content isn't available, try again later.
  File "/home/halvor/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 741, in extract
    ie_result = self._real_extract(url)
  File "/home/halvor/.local/lib/python3.10/site-packages/yt_dlp/extractor/youtube.py", line 4671, in _real_extract
    self.raise_no_formats(reason, expected=True)
  File "/home/halvor/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1275, in raise_no_formats
    raise ExtractorError(msg, expected=expected, video_id=video_id)

[download] Downloading item 282 of 767

It would seem that a rate-limit is being enforced now. Pace yourself. --sleep-requests, --sleep-interval, --max-sleep-interval are some tools available

It would seem that a rate-limit is being enforced now. Pace yourself. --sleep-requests, --sleep-interval, --max-sleep-interval are some tools available

Do you recommend any specific time interval?

you could try:
--sleep-requests 1.25
--min-sleep-interval 60
--max-sleep-interval 90

I tried that a have increased the times incrementally. This got me to item 165 of 769
--sleep-requests 3
--min-sleep-interval 2
--max-sleep-interval 210

I set --sleep-requests 5 and omitted the other commands. It's slow, but I havent timed out running nearly 24/7 since my last post wirthout any timeouts.

you could try:
--sleep-requests 1.25
--min-sleep-interval 60
--max-sleep-interval 90

nice.
it solved my case.

Closing since there's really nothing we could do about a rate-limit aside from implementing Youtube-specific default sleep settings, which wouldn't be appropriate IMO


Setup microbenchmark structure + bfloat conversion bench

duplicate of https://github.com/intel/intel-xpu-backend-for-triton/issues/1123


How to check if a database exists?

What's the way to check if a database exists?

I have a similar issue: I've created a database with new Loki('filename.db'), but the file does not appear when I run my server and there is no error output either, even with verbose: true.
const path = require('path')
const Loki = require('lokijs')

const filename = path.join(__dirname, 'filename.db')

const datastore = new Loki(filename, {
  verbose: true,
  autoload: true,
  autosave: true,
  autosaveInterval: 1
})

const test = datastore.addCollection('test')

test.insert({ key: 'value' })

I've added autosave and autosaveInterval in case LokiJS only writes to the file when collections are modified, but without those options it doesn't work either. Inserting data into the in-memory collection works fine, it's just the persistence part that does not.

I have a similar issue: I've created a database with new Loki('filename.db'), but the file does not appear when I run my server and there is no error output either, even with verbose: true.
const path = require('path')
const Loki = require('lokijs')

const filename = path.join(__dirname, 'filename.db')

const datastore = new Loki(filename, {
  verbose: true,
  autoload: true,
  autosave: true,
  autosaveInterval: 1
})

const test = datastore.addCollection('test')

test.insert({ key: 'value' })

I've added autosave and autosaveInterval in case LokiJS only writes to the file when collections are modified, but without those options it doesn't work either. Inserting data into the in-memory collection works fine, it's just the persistence part that does not.


DOC: add diagram explaining how Docker images get built and used in Gitpod

[skip actions][skip azp]
Credits go to @trallard for creating this diagram.

Also updated the image, it still referred to master (thanks @trallard for the catch).


Refactor to have only one app accessing a mongodb database

As assessed by @rtrompier, it's generally a bad idea to have multiple apps accessing the same database concurrently. Ideally, one app should have access to the database, and expose a REST API for the other apps.

Not directly related, but while working on #763, I'm creating a new MongoConnection class.

Keeping it open for now. It means creating a microservice for the jobs, and a microservice for the cache.


Remove render_resource_wrapper

Objective

Remove all uses of render_resource_wrapper.
Make it easier to share a wgpu::Device between Bevy and application code.

Solution
Removed the render_resource_wrapper macro.
To improve the RenderCreation::Automatic API, ErasedRenderDevice was replaced by Arc. Unfortunately I had to introduce one more usage of WgpuWrapper which seems like an unwanted constraint on the caller.
Testing

Did you test these changes? If so, how?

Ran cargo test.
Ran a few examples.
Used RenderCreation::Manual in my own project
Exercised RenderCreation::Automatic through examples

Are there any parts that need more testing?

No

How can other people (reviewers) test your changes? Is there anything specific they need to know?

Run examples
Use RenderCreation::Manual in their own project

Looks like CI / build-wasm-atomics doesn't like this change.

I think (?) we need to add WgpuWrapper around a bunch of these, which is gross but what I expected from removing the macro.

It was a bit of an ick, but i wrapped everything in WgpuWrapper now...

since it seems like extra functionality (beyond the compile time optimizations) have been added to the render_resource_wrapper/ErasedXXX types, i'm wondering if we should just remove the debug version and continue to use the release version. or maybe we could wrap up the functionality into a single struct which encapsulates the current macro's release-mode behaviour.
i don't think removing the compile-time optimizations should be resulting in any call-site changes though...

since it seems like extra functionality (beyond the compile time optimizations) have been added to the render_resource_wrapper/ErasedXXX types, i'm wondering if we should just remove the debug version and continue to use the release version. or maybe we could wrap up the functionality into a single struct which encapsulates the current macro's release-mode behaviour.
i don't think removing the compile-time optimizations should be resulting in any call-site changes though...

This will work for everything except wgpu::Device which I need to be shared between the application and Bevy. Basically what you're asking for is what was in the PR to begin with?
But I'm wondering what extra functionality you mean? Deref, or the atomics stuff, or both?

Could you check the compilation duration with this PR? The erased types were introduce for compilation speed, see https://github.com/bevyengine/bevy/pull/5950

Basically what you're asking for is what was in the PR to begin with, I think?

maybe? sorry i'm not sure what was in the pr to begin with (i looked when it only addressed the RenderDevice but not since then).

what extra functionality you mean? Deref, or the atomics stuff, or both?

both - i think the call sites should all be unchanged. The macro can (i think) be replaced with a struct that encapsulates the extra behaviour that's been added on top of the compile time optimizations (which were only ever in the debug version of the macro).

both - i think the call sites should all be unchanged. The macro can (i think) be replaced with a struct that encapsulates the extra behaviour that's been added on top of the compile time optimizations (which were only ever in the debug version of the macro).

Any external user that depends on Bevy and wants to use a shared wgpu::Device would need to use this new Bevy-defined struct instead of WgpuWrapper, which doesn't change much, I think? Except that we can implement Deref for it and it doesn't change the call sites.
Do you mean something like this (just a sketch):
struct BevyArc<T> where T: Send + Sync {
    inner: Arc<send_wrapper::SendWrapper<T>>,
}

impl<T: Send + Sync> Deref for BevyArc { //...

It'a bit depressing that we can't just use an Arc, but I'm also not familiar with the problem send_wrapper solves for Bevy, so I am keeping an open mind here.

It'a bit depressing that we can't just use an Arc, but I'm also not familiar with the problem send_wrapper solves for Bevy, so I am keeping an open mind here.

I'm not familiar with the history here, I also agree it's a bit unfortunate we can't just use the arc'd types as well as wgpu's ids. But there's backstory here I'm sure.

I would love some guidance on what to do here. I just wanted a slightly better API for RenderCreation:: Manual 😅

then we just need to run compile timings - are you happy to do that or shall i do it?

I can do it if you teach me how to, but I also think that you doing it yourself might lead to better results. If you don't have an M-series mac on hand, I can do it for mac.

It’s just cargo build --timings, check before and after. If the issue persists (or rather is back, since I did check it was gone a few months ago) you’ll see a ~30% slowdown in debug builds. Release would be unaffected since the macro was only type-erasing in debug.
#5950 had a particularly bad userspace example in the top comment that would get like 95% worse as well.
I’ll run windows tomorrow if nobody else does it in the meantime

MacBook Pro M2 Max - 32GB RAM
Before my changes - commit 5fcbdc137a6e3e636aef3e5fd9190b0bc6ec2887
$ cargo clean
     Removed 148120 files, 123.9GiB total
$ cargo build --timings
...
Finished `dev` profile [unoptimized + debuginfo] target(s) in 47.31s

MacBook Pro M2 Max - 32GB RAM
After my changes - commit 533fa23ae1f675b70df66a36b7c564201a96c527
$ cargo clean
     Removed 19794 files, 6.0GiB total
$ cargo build --timings
...
Finished `dev` profile [unoptimized + debuginfo] target(s) in 43.66s

For release (cargo build --release --timings) the numbers are:
Before - Finished release profile [optimized] target(s) in 1m 33s
After - Finished release profile [optimized] target(s) in 1m 32s

Looks like the wasm issue is back. I think that’s because WgpuWrapper derives Deref even though its contents differ by platform. It should probably have a manual impl with target=T in the wasm case, though I don’t know what the knock on effects would be.

Looks like the wasm issue is back. I think that’s because WgpuWrapper derives Deref even though its contents differ by platform. It should probably have a manual impl with target=T in the wasm case, though I don’t know what the knock on effects would be.

I think the fix is easy, go back to the coersion i used before: layout: layout.as_ref().map(|layout| -> &PipelineLayout { layout }),. If you think it's unclear, I can add comments above to explain.
As I wrote in the review comment:

Your suggestion doesn't work, since WgpuWrapper has a different type signature between wasm32 and everything else, so your specific number of derefs &** only works for the non-wasm32-version.
My version works reliably for both, because the compiler will insert the correct number of derefs at compile time.
What do you want me to do?

Yes go ahead, your original way makes sense. Sorry!

Yes go ahead, your original way makes sense. Sorry!

Great! Updated! Let me know how to proceed.


OTS parsing error: wrong font version for PostScript glyph data

I am converting myRiadPro.ttf to woff file , It is converting but after when i adding this font in html then font not picking by browser . I got a console warning
CSS:
@font-face {
font-family: 'Myriad Pro';
src: url('../fonts/myRiadPro.woff') format('woff');
}
Error on Browser

Failed to decode downloaded font: http://site-url/myriadpro-regular.woff
(index):1 OTS parsing error: wrong font version for PostScript glyph data

woff mimeType is also set in IIS.

Not enough info to investigate. If you enter error text in google, there will be a lot of results by different reasons. To prove problem is in this package, you need narrow it down:

Try html file from local disk (without webserver at all)
Try several font formats in fontface (it should fail with woff and succeed with next)
Try different browsers (that should not be browser-specific issue)

As soon as you provide more details, i will reopen issue.

Hello, I have the same issue.

Try html file from local disk (without webserver at all)

Done, Chrome still fails to parse the font

Try several font formats in fontface (it should fail with woff and succeed with next)

Done, Chrome loads the truetype version

Try different browsers (that should not be browser-specific issue)

Same error in Firefox.
I have also tried to use the converter provided from convert.io using the same ttf source, and that version worked.
How can I help to identify the issue? Do you need more informations?

@edoardocavazza to be honest, i doubt it worth spend time for this package, because woff is outdated. I'd suggest use woff2 via this package https://github.com/fontello/wawoff2.


Fix 'i' character being displayed

When we enter insert mode in neovim the 'i' character appears at the start of every search due to the feedcharacter function being used currently. For example when we select to search through 'Vim Commands' we need to backspace the 'i' character away each time before we can start typing in some text -- unless our search string starts with i of course :)
We can probably remove the entire neovim logic here and make the code more portable but that will need just a few more tweaks
Perhaps earlier versions of nvim did not support startinsert command and is the reason for this added logic, however I have tested on the nightly 5.0 version release as of December 20 and it is now working correctly. These changes will fix the problem as is and should be okay for now.

Thanks for this, I'm glad that nvim has fixed this.
It seems like the fix is in nvim 0.5+ only. I don't want to break fuzzymenu for nvim 0.4.x - I'm on 0.4.4, via latest Ubuntu. Ubuntu LTS installs 0.4.3 I think.
I think this change needs a has('nvim-0.5') around it. Alternatively, something like "startinsert" -> "if mode is not insert mode" -> "feedkeys(i)" might be a more sensible test . Not sure.
I'll test it out later this evening or this week. I'm not too experienced with managing different versions of nvim, but it's about time I tried.

Great suggestion, that's a much better way to do it.. I can give version checking for 0.5 a shot and if it works we probably can push it out without having to wait for 0.5 release then :)
Will let you know how I go

I've tested and pushed a revised version as discussed. This is just a basic fix. It will check for 0.5 and otherwise will revert to feedkeys for all other nvim versions

thanks, it works fine for me on 0.4.x :clap:

btw, in case it wasn't clear, has('nvim-0.5') will resolve to true for future versions like 0.6, 0.7, ...
From my nvim, :echo has('nvim-0.4') and  :echo has('nvim-0.3') both return 1

Aha perfect.. That makes this issue a lot easier then for us. Looks like we might be okay to roll then with what we have now :)
Great to hear testing went good on your end!

yup, all merged now thanks :shipit: :rocket:


Create Development Environment

This ticket aims to track progress in creating a development environment. Item to complete:

[x] Dockerfile for R Shiny app
[x] Dockerfile for PostgreSQL Database

Schema matching
Test Data

[x] Docker Compose file

DB
App
PG Admin

[x] Makefile
[ ] Repo documentation update
[ ] GitFlow (Not this time)

main branch -> Prod
dev branch -> Non Prod
Branch Protection

Working Branch: https://github.com/bcgov/watershedBC/tree/29-dev-environment

Having some issues with using the rocker/rshiny image:

after installing r dependencies total image size is ~2.3GB which is ridiculous. I'm going to try and build my own and hope for improvement
After running app.R using Rscript app.R I get a couple things:

The app listens on different ports every time the container restart? It should default to 3838. I'm wondering if the base image is overwriting usage of that port.
Even setting the port using options=list(port=3838) port forwarding fails
setting network_mode: host gives firewall unrestricted access

Tables that are not created in the local DB because they have no reference in the app:

public.bc_seasonal_regimes_alex_analysis_jan18_21clust
public.bc_seasonal_regimes_alex_analysis_jan18_21clust_wsc_parde_lon
public.bc_seasonal_regimes_alex_analysis_jan18_21clust_wsc_parde_lon_s
public.spatial_ref_sys
public.test
public.vri
public.watershed_statistics
public.wsc_drainagebasin_4326
public.wsc_monthly_with_attri_dams_20240204

Having some issues with using the rocker/rshiny image:

after installing r dependencies total image size is ~2.3GB which is ridiculous. I'm going to try and build my own and hope for improvement

After running app.R using Rscript app.R I get a couple things:

The app listens on different ports every time the container restart? It should default to 3838. I'm wondering if the base image is overwriting usage of that port.
Even setting the port using options=list(port=3838) port forwarding fails
setting network_mode: host gives firewall unrestricted access

Not sure how to solve the container size issue..
Maybe something like r-minimal can be used? https://github.com/r-hub/r-minimal
There is a lot of base functionality missing, but we can add it back as needed.

Container issue fixed. Using rocker/r-ver:4.3.3 as base and installing required system geo packages. Greatly reduced the images size and runs much smoother using the R -e "shiny::runApp(...)" then using an R shiny server image.


Created virtual network may conflict with existing networks

When mkcloud creates the virtual networks in libvirt, it should first check that it is not creating a network that overlaps with any existing virtual network that may be present. Failure to make this pre-check may cause network requests fail in ways that may be difficult to diagnose, especially when there is only a partial overlap, i.e. requests to/from some interfaces work properly and others do not.

precreated in libvirt you mean? or created outside libvirt?

Yes, pre-created in libvirt.


Chrome tab groups sometimes do not pin to fancy zones

Environment
Windows build number: Microsoft Windows [Version 10.0.18363.836]
PowerToys version: v0.18.1
PowerToy module for which you are reporting the bug (if applicable): Fancy Zones

Steps to reproduce

Enable "Hold a non-primary mouse button to activate zones while dragging"
Maximize chrome window
Select tab group (click on first tab then shift+click on subsequent tab)
Drag tab group away and then hold secondary mouse button to activate fancy zones
Let go of primary mouse button while over a fancy zone and tab group will return to maximized window state

Expected behavior

Tab group would snap to the selected fancy zone
Actual behavior

Tab group is returning to maximized window state
Screenshots

I tried to do this too, and it half worked. Selecting a few Chrome Tabs, then dragging them out of the tab bar, then pressing Shift and the Zones are visible for about a second. After that they disappear.

@fwdsimonp
in 0.19 the secondary button will have a different effect: instead of keeping it pressed, clicking on it, it will toggle the zone activation status.
@Jay-o-Way
using Shift while dragging Chrome tabs is a different issue and it's not caused by FZ, if you quit PowerToys and press Shift while dragging a tab, it will be relocated to its original position.

Same as https://github.com/microsoft/PowerToys/issues/2898
The workaround is to use the secondary mouse button to activate the zones since any key pressed while dragging a chrome tab will reset it to it's original position, this can be reproduced without PowerToys running.

Same as #2898
The workaround is to use the secondary mouse button to activate the zones since any key pressed while dragging a chrome tab will reset it to it's original position, this can be reproduced without PowerToys running.

This does not work for me.
Chrome tabs when dragged out of an existing window dont snap to zones but maximize instead.
I use the secondary mouse button, no difference if i keep button pressed or release the secondary button before i release the primary mousebutton.

Same as #2898
The workaround is to use the secondary mouse button to activate the zones since any key pressed while dragging a chrome tab will reset it to it's original position, this can be reproduced without PowerToys running.

This does not work for me.
Chrome tabs when dragged out of an existing window dont snap to zones but maximize instead.
I use the secondary mouse button, no difference if i keep button pressed or release the secondary button before i release the primary mousebutton.

@jimmy927

Chrome tabs when dragged out of an existing window dont snap to zones but maximize instead.

FZ doesn't maximize windows, so this is not caused by FZ per-se.

if i keep button pressed or release the secondary button

The secondary mouse button works as a toggle for activation, you should not keep it pressed, press and release it.

@jimmy927

Chrome tabs when dragged out of an existing window dont snap to zones but maximize instead.

FZ doesn't maximize windows, so this is not caused by FZ per-se.

if i keep button pressed or release the secondary button

The secondary mouse button works as a toggle for activation, you should not keep it pressed, press and release it.


This isn't an issue, more of a question, createRole.principals.create

Can you please explain what is RoleMapping.USER ? I tried to go through the api docs but it's hard to understand,
createdRole.principals.create({
principalType: RoleMapping.USER,
principalId: createdUser.id
},
Is RoleMapping.USER the User Model object ? or is the role user ? or is it just a enum ?
Does it have to change according to the role ? like RoleMapping.ADMIN and RoleMapping.STUDENT (New role i have created) ?

Hi @LetsDoIt- I am not sure to answer this question at the moment as my knowledge of the LoopBack ACL is still under par.
For general questions about LoopBack I recommend you to go to one of these gitter rooms and ask there:
https://gitter.im/strongloop/loopback
https://gitter.im/loopbackers/loopbackers.github.io


Allowing of builder service account to run images as root.

In a Kubernetes environment with multi tenancy enabled, where anything in namespaces are restricted to running pods in a set range of user IDs, or in any other setup where running as root is prohibited by default, it is necessary to create a PodSecurityPolicy and bind that to the service account to permit running as root.
It perhaps should be documented where defining:
apiVersion: v1
kind: ServiceAccount
metadata:
 name: tutorial-service-account
secrets:
 - name: tutorial-registry-credentials

that this would be required.

With https://github.com/pivotal/kpack/pull/161 kpack does not to run any container as root. (Cloud Native Buildpacks execute as a non-root user in non-privileged containers)
This should be released in the next release of kpack which we plan on cutting shortly.

What is USER set to for the image?
If USER is set to a user name, and not an integer user ID, you will still have problems on a platform that has strict pod security policies that don't allow RunAsAny, even if the image doesn't run as root.
This is because in that case would still need to at least rely on a pod security policy with runUser setting of MustRunAs. But for that to work, the image must use an integer user ID so the platform can verify what user ID it does run as. If a user name is used for USER, even if that isn't the string root, it can't be assumed it will not actually run as user ID 0 still as that is dictated by the contents of /etc/passwd in the image which the platform can't check or rely on.
The only other way around this is if the image accommodates being able to run as an arbitrary user ID, which wouldn't even appear in /etc/passwd, where it falls back to running as group ID 0. Setting up images to be able to work this way is tricky and most people don't cater for it.
So do the images use an integer user ID for USER? Even if they do, a note may be still needed about needing a pod security policy which allows running as that user ID, where the platform prevents you from running as any user ID.
If don't use an integer user ID, then still have to use a pod security policy which allows run as any user. Since this is bound to a service account in the project, this isn't ideal as a developer could apply the service account to a deployment of their own which runs as root.
Hopefully you understand what I am trying to explain here.

Builder images will most likely run with a user name. As a an example the io.buildpacks.stacks.bionic stack will run as the cnb user
It sounds like we should add documentation on setting up the pod security policy on service account when necessary.

One could argue that upstream stacks project should switch to using an integer user ID. The benefit of this is that it allows the platform to in part verify that it will not run as root. So good extra check point when wanting to secure things well using pod security policies in Kubernetes.

Created https://github.com/buildpack/samples/issues/44 upstream in what seems to be current project repo for the sample images.


Support for ÆØÅ characters in dictionary

It seems like there is no support for international characters like the norwegian æøå in the dictionary, because I get no passwords who contains those characters even though I have words with them in the dictionary file.
Can this be fixed?

You are correct - at the moment the library actively strips out non-alphanumeric characters from the dictionary. I made the decision to strip accents early in the project's history to simplify the entropy calculations, but with hind-sight I now see that was a mistake.
My plan to fix the problem is to add a configuration variable to turn on or off the suppression of accented characters as desired - users could then chose between a more varied alphabet, or more accurate entropy calculations.

Ah, I see. So it wasn't just my playing tricks on me ;-)
Yes, I'd love the option to turn on these characters.
Is manually defining the special characters we want a good way to go? Like
extrachar = "æøå";
Because that is all the characters I need myself.
Would that help preserve the accuracy of the entropy calculations?
Btw, may I ask what it means that the entropy calculations gets less accurate when introducing this kinds of characters?

This functionality is now ready for testing in the CPAN-Prep branch: https://github.com/bbusschots/xkpasswd.pm/tree/CPAN-Prep

Great :)


[Improve] Using Collections.emptyMap() replaced Collections.EMPTY_MAP

Purpose of this pull request
[Improve] Using Collections.emptyMap() replaced Collections.EMPTY_MAP to avoid 'Unchecked assignment'.

Check list

[ ] Code changed are covered with tests, or it does not need tests for reason:
[ ] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs

Hi FlechazoW, overall LGTM except few nits. The name of your pull request does not include the name of the module involved. A clear name for the pull request would help make the review easier. You can refer to Coding Guide get more details about how to submit a high quality pull request.


[Script]: YouTube Script Writing Tool

Aim
Provide content creators with a user-friendly interface to enter their video topics and expected video length.
Utilize the OpenAI API to generate creative and relevant video script suggestions based on the provided prompts.
Allow users to customize the level of creativity in the generated scripts using a slider control.
Display search engine results related to the provided prompt to help content creators gather additional information for their videos.
Ensure the security of the user's OpenAI API key by encrypting and storing it within the session state.
Details
The YouTube Script Writing Tool will offer the following features:

User Authentication
The tool will require users to input their OpenAI API key through a secure text input in the sidebar. This API key will be used to access the OpenAI API and generate the video scripts.

Prompt Input
Content creators can enter the topic of their video through a text input box. This prompt will act as the basis for generating the video script.

Video Length Input
The tool will provide a text input box where users can specify the expected video length in minutes. This information will be considered while generating the script.

Creativity Slider
A slider control will allow users to adjust the level of creativity in the generated scripts. They can choose from low to high creativity levels, depending on their content requirements.

Script Generation
Upon clicking the "Generate Script for me" button, the tool will call the OpenAI API with the provided prompt, video length, and creativity settings to generate the video script.

Output Display
The generated script and the title of the video will be displayed on the screen. Additionally, an expandable section will show related search engine results to aid content creators in their research.

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'23 contributor
[X] I want to work on this issue

@avinashkranjan This is unique issue. Please assign this to me

/assign


Add an annotation to expose transforms to yaml.

We should add this to all transforms that are simply parameterized.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

R: @Polber

This won't replace the assembly performed in `yaml_transform.py, this merely gives indications of how to use other (posibly not-directly-exposed) Beam transforms directly from yaml.

Any concerns about this?


DBInstance: InvalidParameterCombination: The specified DB Instance is a member of a cluster. Modify vpc security group for the DB Cluster using the ModifyDbCluster API

What happened?

While trying to modify the rds (aurora) instance type of a cluster-owned db instance, an error occurred:
update failed: cannot update DBInstance in AWS: InvalidParameterCombination: The specified DB Instance is a member of a cluster. Modify vpc security group for the DB Cluster using the ModifyDbCluster API
further reading produced, amongst other aligned issues, #1285 #1286
Reading of the AWS docs shows that you may not alter VPC Security Groups  on instances as a part of a cluster:
https://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-instance.html#:~:text=Amazon Aurora (The%20associated%20list%20of%20EC2%20VPC%20security%20groups%20is%20managed%20by%20the%20DB%20cluster
How can we reproduce it?

Try and modify an existing cluster instance; in our case, we are trying to update the instance class.
What environment did it happen in?
Crossplane version: v1.12.2
provider-aws version: v0.41.1

Looks like it needs a check in DBInstance's preUpdate to determine whether this instance is part of a cluster. I believe this required DBClusterIdentifier to be added to DBInstanceObservation. The value is already delivered by AWS as part of the DescribeDBInstances response.

However, the quick way to avoid this problem would be to not set spec.forProvider.vpcSecurityGroupIDs at all.

i guess this is not a proper solution :D
the vpcSecurityGroupIDs must be included in this block
https://github.com/iAnomaly/provider-aws/blob/1fd900eb76877bf4f83faf59df4bd9eb0f4d94a7/pkg/controller/rds/dbinstance/setup.go#L207
as a proper workaround:
manually remove the spec.forProvider.vpcSecurityGroupIDs from your dbinstance if this instance is part of a dbcluster using kubectl edit for example


Add UIVisualEffectView to background

I'm wondering if it's at all possible to add a blur view to the background view. From what I understand, if a mask is set to a superview of a UIVisualEffectView it will fail as mentioned here: https://developer.apple.com/reference/uikit/uivisualeffectview. Not sure if this is the cause of the failure I get when I try.

You should be able to add a TwicketSegmentedControl as a subview of a UIVisualEffectView
This was working for me:
        let visualEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .light))
        visualEffectView.frame = frame
        view.addSubview(visualEffectView)

        let segmentedControl = TwicketSegmentedControl(frame: visualEffectView.bounds)
        segmentedControl.setSegmentItems(titles)
        segmentedControl.delegate = self
        segmentedControl.backgroundColor = .clear // This is important!

        visualEffectView.addSubview(segmentedControl)


[Feature Request]: Add Support Multiple NUT Servers

Enhancement of issue
I like to be able to point to different NUT Servers
Solution
On the HOST definition on the docker compose file, add the option to add multiple hosts separated by coma ","
Alternatives
I like to avoid to run multiple instances and separate dashboards when I have more than 1 NUT instance server
Additional Context
I like to be able to monitor multiple locations or potential customers from a single Docker instance (Centralized).

I'm in the same boat. I have 12 of these UPSs around my house all connected to various devices and 8 NUT servers, so it'd be nice to have a way to view them all.

Oh, yes please.  I only have 4 but would love to unify the view somewhere other than Home Assistant.
BTW, good start!

Oh, yes please. I only have 4 but would love to unify the view somewhere other than Home Assistant.
BTW, good start!

Interesting you note Home Assistant. I uninstalled PeaNUT and went to using Home Assistant since it is the only thing that supports multiple NUT servers.
It's very manual to create the dashboard and set everything up though. Also, getting it to send emails when your power is out isn't that simple. It's so much manual work.

I would also find this a useful feature. I have several UPS, each with a RPi zero dedicated for the nut server.

Same here, would be useful as number of networked UPS is growing with time.

Same request from my side.
I've installed peaNUT for each UPS that I have but I'm not getting the same information as I get on NUT in homeassistant. All peanut containers give the same value. Not sure why ?

I would love this feature. Please implement connecting to multiple NUT servers.

Would someone be able to try out my latest test version?
brandawg93/peanut:test
It should enable multi server support! Simply go to the settings page to add more servers.

Just tried the brandawg93/peanut:test image, it works great with at least two NUT servers.
Thanks

I just tested it as well, I can add all four of my NUT servers without issues. Two of them are on non-standard ports also.
I'm not sure what your current plans are, but being able to set custom names for each server would be useful. The NUT server built into the Synology NAS Diskstation doesn't let you change any info. At least not easily.

@Semicolon7645 I would say that is more of a NUT server side issue than peanut. But there should be configuration files that allow you to set a description. They may not be easy to get to, but I’m sure they’re there somewhere. 😅

The way the it is handled is that the UI scripts rewrite the NUT config files when you hit apply. So if I manually edit the config it will get overwritten the next time the UI writes new settings values. I could edit the scripts, but they will get overwritten when Synology updates their software.

It's certainly not an optional situation.

Oh. That config is different. Take a look at the config folder in this repo. That’s what it should look like. Those are the files I use for testing.

Released in v4.0.0!


Pipeline creation fails when branch names contain slashes

The pipeline-manager component adds the gitRef as a label when new pipelines are created. However, as slashes don't seem to be allowed in pipeline labels, the pipeline cannot be created for branch names like feature/xyz and pipeline-manager logs
cannot create pipeline xyz-feature-test-feature: Pipeline.tekton.dev "xyz-feature-test-feature" is invalid: metadata.labels: Invalid value: "feature/test-feature": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')

Ouch. Regression from #438 I believe. Should we use the pipeline name then as a label? That is already sanitised.


Regressor

Hi !
I am Alexandre's teammate for this AMF project !
I am working on the regressor, this is a first version of the code.
I used the same original repository as the classifier.

Hi @kenzabenjelloun, I am happy to hear that there will be a regressor too! :D
After @AlexandreChaussard merges #3, I suggest pulling the latest changes to keep up to date. Do not hesitate to ask for any assistance if needed!

Sure thing, #3 is almost there !

Thank you @smastelini ! Is it ok to contact you via discord ?

Of course! I am currently in contact with @AlexandreChaussard to align the PR efforts. Feel free to reach me there :)


Feat add ci for charts release

What
This PR add feature to release helm chart repo for kvrocks-operator
Related issue

#19

How
Please create orphan branch named gh-pages before merge this PR
Changes

Add CI for helm lint
Add CI for helm chart release
Correct apiVersion for chart
Fix chart for helm lint works

@xiao-jay @jiayouxujin
please review when you available

The chart release job doesn't work in my repo before adding this line. But your jobexecuted successfully. Can you help me figure this out? @ducviet00

Could you please check your Workflow permissions in Repo Actions settings ?
My forked repo has default Read and write permissions, I think explicit adding your line is the right thing to do.

LGTM! Thanks @ducviet00

@ColinChamber  @jiayouxujin
Please create orphan branch named gh-pages
https://github.com/RocksLabs/kvrocks-operator/actions/runs/6464094901/job/17548218354


[Bug]: Progress Indicator Multiple cColor Support

Prerequisites

[X] I have searched the backlog for duplicate or closed feature requests

Your test device
Huawei Mate 20 Pro
OS Version
10
App version
<IP_ADDRESS>
Describe the issue
is the multi-color progress indicator an Orange supported feature?
Expected Behavior
depending on the design answer -> delete this option or close issue

do not understand the relevence

request for the old demo app


Alternative Hosting

This API is no longer work since Heroku stop free dyno
I apologize for this, it's based on the condition that Heroku where I host this API is no longer able to run for free
https://help.heroku.com/RSBRUH58/removal-of-heroku-free-product-plans-faq
I will try to re-run this bible API so that it can be used as it was

Please rever into new version
https://github.com/erwindosianipar/beeble


Add support for a ddog sink

Allow ktranslate to export flow and snmp data to DataDog. Run by setting these flags: -sink ddog -format ddog. Also set this env variable: DD_API_KEY.
Sends metrics using the V2 API.

One more time plz.


add validation in .offset()

I believe value in .offset(value) must be integer like .limit(value)
However, there is no warning message for this.

@elhigu
https://github.com/tgriesser/knex/blob/master/test/unit/query/builder.js#L6457
I believe this test case covers my PR now.
Is there anything omitted?

Actually that case looks like that it has been designed so that passing null actually clears the offset, thus it shouldn't show warning. Also in case of warning it should check that warning is actually emitted. It can be done by using custom loggers in test.
Also I would prefer throwing an error instead of warning.

@HurSungYun @elhigu Actually, passing null to reset sounds like a valid case, no?

We discussed something like this #2897
It concluded that everything like this should be valid, so I believe this one also should be valid case

@elhigu
I believe this test cases are enough for checking whether warning message is emitted.

Now this prevents using knex.raw / query builder as a parameter for offset, which has been working previously.

My bad. I'll revise it to work properly.

The code of .limit() is like this.
  // Only allow a single "limit" to be set for the current query.
  limit(value) {
    const val = parseInt(value, 10);
    if (isNaN(val)) {
      this.client.logger.warn('A valid integer must be provided to limit');
    } else {
      this._single.limit = val;
    }
    return this;
  },

I tried some tests in Node 8,
> client('test').select().limit(client.raw('3')).toSQL()
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 3 ],
  __knexQueryUid: 'cd175d39-f411-4210-b242-519a0c295d47',
  sql: 'select * from `test` limit ?' }

> client('test').select().limit(client.raw('?', [3])).offset(undefined).toSQL()
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 3 ],
  __knexQueryUid: 'b90d327a-54de-4e40-9ee4-4d6e03e058cf',
  sql: 'select * from `test` limit ?' }

> parseInt(client.raw('3'), 10)
3

So, it does not break using knex.raw as a parameter if the evaluated result of knex.raw can be parsed to int and if that cannot be parse to int, it is invalid input anyway.
I would like to suggest two options for .offset() validation
offset(value) {
  if (
    value instanceof Builder ||
    value instanceof Raw ||
    isNil(value)
  ) {
    this._single.offset = value;
  } else {
    const val = parseInt(value, 10);
    if (isNaN(val)) {
      this.client.logger.warn('A valid integer must be provided to offset');
    } else {
      this._single.offset = val;
    }
  }
  return this;
},
// check all types of value and value = null, undefined case

OR
offset(value) {
  if (isNil(value)) {
    this._single.offset = value; // for resetting
  } else {
    const val = parseInt(value, 10);
    if (isNaN(val)) {
      this.client.logger.warn('A valid integer must be provided to offset');
    } else {
      this._single.offset = val;
    }
  }
  return this;
},
// check case of value = null, undefined

I understand all this should be backward compatible, but I think it's weird that there's no validation code in contrast with .limit()

when will this changes be releaed?

@NeoyeElf I fixed something but i don't know when this PR is merged

Sorry for the delay in reviewing. This can be merged after couple of minor comments are addressed.

what is the default value of offset()

@rjkhan No offset, I believe.


Remove block comment not working in Spyder 3.3.0

Not able to remove block comment in Spyder 3.3.0.
After selecting the necessary lines, Edit-->Remove Block Comment doesnt seem to work.
I installed spyder from pip and here are the dependencies
Python 3.6.3 64bits, Qt 5.9.3, PyQt5 5.9.2 on Windows

Thanks for reporting.
@CAM-Gerlach, are you able to reproduce this one?

@ccordoba12 Adding and removing a block comment worked fine for me, as long as I selected the lines inside the blog comment rather than including the comment lines. @iamjmat can you give an example code snippit where this happens and indicate exactly what was selected when you executed the command?
Also, not directly related, but we need to remove the first =to the right of the # on each added line to follow PEP and avoid warnings by our own pycodestyle real-time checker.

Also, not directly related, but we need to remove the first =to the right of the # on each added line to follow PEP

I think this is fixed in master. Could you try it, please?

@ccordoba12 Yup, it is fixed. Thanks!

@CAM-Gerlach Yeah. It works for me when I select the lines inside the blog comment.
Is it possible to make it work if we select the = lines too ?

Its possible, I suppose, but likely somewhat more complicated. If you'd like to implement it, unless @ccordoba12 says otherwise you're welcome to send us a PR, since Spyder is written in the same language (Python) as you write in it (in fact, Spyder is the primary tool used to develop Spyder itself).

Cool. Will try it out.
Learning Python for a few months and Spyder is by far the best IDE out there. Hats off to everyone for creating such a really good IDE.


Reformat using Black

Reference Issues/PRs

Reformat using Black

Codecov Report

Merging #109 into master will not change coverage.
The diff coverage is 93.12%.

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


Remove extra conditional check in retain

Motivation:
We not need to do an extra conditional check in retain(...) as we can just check for overflow after we did the increment.
Modifications:

Remove extra conditional check
Add test code.

Result:
One conditional check less.

lgtm

Cherry-picked into 4.1 (d44017189eb73d8b1bdc45da1fca84cd05cc228b) and 4.0 (943d4c13dde337007c8954f456f2a4f0ec4d82bd)


Vite defineConfig.define crashes client-side logic

Describe the bug
If I attempt to use vite defineConfig.define, the SSR works correctly but CSR crashes - it appears to treat the define value as raw JavaScript during client side rendering, rather than as a string (e.g., console.log(foo) instead of console.log("foo");)
Reproduction
I created a basic SvelteKit project via npm create svelte@latest my-app; cd my-app; npm install;. I then modified vite.config.js to:
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';

export default defineConfig({
        plugins: [sveltekit()],
        define: {
            World: 'space'
        }
});

And modified src/routes/+page.svelte to:
<script>
        function foo(){
          console.log("Hello World");
        }
        foo()
</script>

<button on:click={foo}>Hello World</button>

Logs
On loading the application, vite console receives:

  VITE v4.4.9  ready in 458 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help
Hello space

To me this indicates the var has been replaced. The button text also renders as 'Hello space'. However, the Browser developer tools logs an error 'ReferenceError: space is not definedonenv.ts:17. I suspect that the browser is attempting to render spacein a JavaScript context but not correctly wrapping the value as a string. If I attempt to double-wrap the string to"'space'"` in vite.config.ts, the vite console treats the inner quotes as part of the value.
https://github.com/sveltejs/kit/issues/10275 indicates that svelte-package does not use vite. I'm a bit lost with the build chain of Svelte/kit, so please accept my apologies if it's something on my end.
System Info
System:
    OS: Linux 6.2 Ubuntu 23.04 23.04 (Lunar Lobster)
    CPU: (2) x64 13th Gen Intel(R) Core(TM) i9-13900K
    Memory: 5.91 GB / 7.75 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - /snap/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
  Browsers:
    Chromium: 116.0.5845.140
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.1.0
    @sveltejs/kit: ^1.20.4 => 1.24.0
    svelte: ^4.0.5 => 4.2.0
    vite: ^4.4.2 => 4.4.9

Severity
serious, but I can work around it
Additional Information
No response

This is not SvelteKit-specific but just how Vite behaves during in dev mode.

Define global constant replacements. Entries will be defined as globals during dev and statically replaced during build.

String values will be used as raw expressions, so if defining a string constant, it needs to be explicitly quoted (e.g. with JSON.stringify).

What fails here on the client, is the attempt to essentially execute window['world'] = space.
As noted by the docs, use JSON.stringify when setting these values, also, given that this just does a global replacement regardless of any context, it is a bad idea to use commonly appearing words as that may break existing code; personally, I use all-caps, sometimes even with an additional prefix to be certain, e.g. VITE_WORLD instead of world.
As the value will be JSON, if you want to replace something in Svelte markup, you can just use an interpolation with the identifier: {VITE_WORLD}

Thanks, that works but took a bit to unpack.
I'll document both the solution and bug for others - the tldr is 'stringify the property value and don't use define values within HTML'. The solution was:
        define:
        {
            "World": JSON.stringify("space") // Evaluates to "\"world\""
        }

and
<script>
        function foo(){
          console.log("Hello " + World);
        }
        foo()
</script>

<button on:click={foo}>Hello {World}</button>

Notably, The button HTML went from Hello World - this seems to compile via npm run dev fine, but npm build fails as something in the build chain attempts to stringify the value - this might be a bug (build output is inconsistent to run dev output) but it's clear now that define kvp's shouldn't be rendered raw within HTML context regardless.
Thanks for your help :)


Idea: add a way of warning users about using deprecated functions

Once #524 is merged, it would be good to deprecate shell.exec() due to its vulnerabilities and bugs. While we can mark it as deprecated in the docs, since it's a security vulnerability, we may also want to provide deprecation warnings at runtime.
However, since exec() still has a valid use case, I don't think we should ever get rid of it (so it's soft deprecation). Also, if we're still allowing people to use it, we should provide an API to skip deprecation warnings if they know what they're doing.
One approach we could take:

add shell.config.showDeprecationWarnings (defaults to true)
then add a function in common) to log a deprecation warning to stderr, only when the above option is true
in the deprecated functions, we can call this log function explicitly, or perhaps add a plugin option for deprecated functions of the form:

deprecationMessage: 'foo is deprecated, use bar instead',

This idea is still open for discussion, so don't implement it yet until the "help wanted" label is applied.

I think the best approach is to implement this as an attribute on plugins/commands. This will also expose one way for plugin authors to deprecate their plugins.
The deprecation message should be shown for these scenarios (in the examples, exec() is the deprecated function):

[ ] using the shelljs command (shell.exec(...))
[ ] using the shelljs command in a pipe (shell.cat('file.txt').exec(...))
[ ] using the shelljs command in global mode (this should be trivial if the first case is addressed)

The best way to do it is probably to check inside common.wrap() for the deprecation flag, and output a warning at runtime.
@freitagbr what are your thoughts on turning deprecation warnings on by default? Or should we wait for the v0.9 release to have warnings on by default?

I think we can turn them on by default for the next release. Deprecation warnings for node v7 itself are printed by default, anyway.

Perhaps it would be nice to also include JSDoc deprecation tags, so that various JS-focused IDEs can hint to the developer of the deprecations. http://usejsdoc.org/tags-deprecated.html

Speaking of JSDoc, it has become a sort of standard, so it would be useful to incorporate JSDoc comments in the code base. ShellJS uses a home-grown comment system that converts //@ comments into markdown, specifically for the README.md. However, JSDoc does not seem to have good support for generating markdown, and other modules like jsdoc-to-markdown and jsdox are hit-and-miss in the markdown that is generated.

No deprecated commands yet, so I'm bumping this back a milestone.

@freitagbr can you take this? It'd be good to have this finished shortly after #866.

Removing the "breaking" label because this issue is about support for deprecating plugins, this does not track deprecating any particular plugin.

Sure, I will tackle this.


Whole day gone! FTW with android video recorder?

Help please!
I have trying switching to various build tools, sdks, simulators..
Video recoding wont work..
Does anyone have it working? Any guesses on what i could be doing wrong?
06-15 01:43:06.418  1685  7434 I NuPlayerDecoder: [OMX.google.vorbis.decoder] resubmitting CSD
06-15 01:43:06.418  1685  7434 I NuPlayerDecoder: [OMX.google.vorbis.decoder] resubmitting CSD
06-15 01:43:06.418  7292  7292 E RCTCameraModule: Media recorder stop error.
06-15 01:43:06.418  7292  7292 E RCTCameraModule: java.lang.RuntimeException: stop failed.
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at android.media.MediaRecorder.stop(Native Method)
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at com.lwansbrough.RCTCamera.RCTCameraModule.releaseMediaRecorder(RCTCameraModule.java:386)
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at com.lwansbrough.RCTCamera.RCTCameraModule.onError(RCTCameraModule.java:130)
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at android.media.MediaRecorder$EventHandler.handleMessage(MediaRecorder.java:1029)
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at android.os.Handler.dispatchMessage(Handler.java:102)
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at android.os.Looper.loop(Looper.java:148)
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at java.lang.reflect.Method.invoke(Native Method)
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-15 01:43:06.418  7292  7292 E RCTCameraModule: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

not sure but i can recommend

try a few different devices
check the issue queue to see if others have the same problem

I know video recording has worked in the past for android so you may have a device bug, or a dependency issue.

Finally got something recorded.. but the quality is pretty bad.. (gif attached)
Seems like the example doesnt work with android version 7 onwards..

You can't record from simulator. Although I believe one could make an extension to the package and make it record the device's screen.

@ramneekhanda How did you manage? I couldn't get the video recording working for Android. I've set the buildToolsVersion to 25.0.3. I've added the permission in the manifest. In the end an mp4 file is indeed created but it is an empty file. The iOS video recording function works fine for me though. Any tip?

Just solved it myself. So indeed as @banandelfiner said I could not make it work on an emulator. But when I run it on my old phone:
Android version: 6.0.1
System version: 24.216.12
The video recording function is working fine.

👍


Problems!

when I try to execute the program the following messages appears:
C:\Users\Vinicius>livestreamer "http://azubu.uol.com.br/therealyetz"
Traceback (most recent call last):
File "", line 6, in
File "main.py", line 128, in
File "main__livestreamer.py", line 9, in
File "livestreamer_cli\main.py", line 886, in main
File "livestreamer_cli\main.py", line 464, in handle_url
File "livestreamer\session.py", line 333, in resolve_url
File "requests\sessions.py", line 415, in head
File "livestreamer\plugin\api\http_session.py", line 128, in request
File "requests\sessions.py", line 349, in request
File "requests\sessions.py", line 287, in prepare_request
File "requests\models.py", line 287, in prepare
File "requests\models.py", line 334, in prepare_url
File "requests\packages\urllib3\util.py", line 397, in parse_url
requests.packages.urllib3.exceptions.LocationParseError: Failed to parse: Failed to parse: --C=:\Program Files (x86)\Livestreamer\rtmpdump\rtmpdump.exe
Please Help!

S A D


Fix YML syntax for pipeline upload block step syntax

The example was invalid yml, now it would work :D

Ah, thanks :) In in this case, the name was actually supposed to be under the block command. block commands can have their named changed so instead of saying "Continue" in the pipeline, it'll say what's in the file :)

I've made this change in master now :)


FileSystemException: FileSystemException: Creation failed, path = '/Users/myname/development/flutter/bin/cache/artifacts/engine/darwin-x64/FlutterMacOS.framework' (OS Error: No such file or directory, errno = 2)

Steps to Reproduce

...
...
...

Logs

Logs
```
#0      _Directory.createSync (dart:io/directory_impl.dart:133:7)
#1      ForwardingDirectory.createSync (package:file/src/forwarding/forwarding_directory.dart:20:16)
#2      ErrorHandlingDirectory.createSync. (package:flutter_tools/src/base/error_handling_io.dart:433:22)
#3      _runSync (package:flutter_tools/src/base/error_handling_io.dart:597:14)
#4      ErrorHandlingDirectory.createSync (package:flutter_tools/src/base/error_handling_io.dart:432:12)
#5      EngineCachedArtifact.updateInner (package:flutter_tools/src/cache.dart:916:19)

#6      CachedArtifact.update (package:flutter_tools/src/cache.dart:810:5)

#7      Cache.updateAll (package:flutter_tools/src/cache.dart:677:9)

#8      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1325:7)

#9      FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1209:27)

#10     AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#11     CommandRunner.runCommand (package:args/command_runner.dart:209:13)

#12     FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)

#13     AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#14     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)

#15     run.. (package:flutter_tools/runner.dart:62:9)

#16     AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#17     main (package:flutter_tools/executable.dart:91:3)

```
flutter doctor
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-x64, locale ja-JP)
    • Flutter version 3.3.10 on channel stable at /Users/myname/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (2 weeks ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/myname/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.74.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • iPhone 14 Pro Max (mobile) • D98F5DF8-830B-451B-A85F-8F0CE81504B2 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)            • macos                                • darwin-x64     • macOS 13.1 22C65 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Hi @koheiokazaki
I see there's an open issue addressing the case you described https://github.com/flutter/flutter/issues/91559
Please follow up on that issue, I'm closing the current one as a duplicate.
If you disagree, please write in the comments and I will reopen it.
Thank you


Inconsistent iterations rate: 30 iterations = 40 seconds?

Hi guys,
Testing very simple bots against each other in realtime mode.
Issues:

Iteration 0 is called in the code at the ~1 minute 21 seconds of the game.
And it is run at different times for each bots. Shouldn't it be run on the first second of the match?

https://i.imgur.com/nuFomNk.png

Once some attacking happens between the workers, the iterations stop ticking at regular intervals. And it can take ~40 seconds to count 30 iterations while normally 1 second contains ~30 iterations.

https://i.imgur.com/QWkUSBn.png
https://i.imgur.com/shcsjR7.png
This makes it impossible to code any reasonable bot strategy. For example it takes multiple minutes for defending bot workers to actually attack each of the invading workers. And there are 10-20 seconds gaps between one target is destroyed and the next target attack command is executed.
Have anyone experienced the same?
My Machine: MacOS 10.13.5, Python 3.6.5, Installed the SC2 client and Python API yesterday.
Source code:
` import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
class DefendingBot(sc2.BotAI):
async def on_step(self, iteration):
if iteration == 0:
await self.chat_send(f"I am a Defending Bot")
if (iteration % 30 == 0): # Detection is run every few frames
await self.chat_send(f"Iteration: {iteration}")
await self.chat_send(f"Enemies detected: {self.known_enemy_units.amount}")
if (self.known_enemy_units.amount > 0):
for worker in self.workers:
await self.do(worker.attack(self.known_enemy_units.first))
class InvadingBot(sc2.BotAI):
async def on_step(self, iteration):
if iteration == 0: # If this is the first frame
await self.chat_send(f"I am an Invading Bot")
for worker in self.workers:
# Send all workers to the other bot's location
await self.do(worker.move(self.enemy_start_locations[0]))
run_game(maps.get("AbyssalReefLE"), [
Bot(Race.Protoss, DefendingBot()),
Bot(Race.Protoss, InvadingBot()),
], realtime=True) `

#29 This might be a bit better for you

Thanks! If I understand the last comment of #29 right, in real-time mode the on_step calls can happen at any time, sometimes rarely, sometimes often. Depending on the computing power of the machine? So a slow machine is not suitable to see a meaningful bot play on a slow machine (as on_step may have delays of multiple seconds).
But in non-realtime mode the on_step calls should be consistently regular. And #29 explains how to get ~game time from the API.
Did I get it right?

I don't know if it's dependent on computing power or not, but yes, there is not a consistent way iterations to handle realTime= False. self.state.game_loop may be more suitable for what you are trying to do

Similar questions: #57 and #29