[SPARK-26928][CORE][FOLLOWUP] Fix JVMCPUSource file name and minor updates to doc

What changes were proposed in this pull request?
This applies some minor updates/cleaning following up SPARK-26928, notably renaming JVMCPU.scala to JVMCPUSource.scala.
How was this patch tested?
Manually tested

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

OK. looks like the "Counter" import is unused in JVMCPU too.

Test build #4663 has started for PR 24201 at commit 0192aa2.

Test build #4663 has finished for PR 24201 at commit 0192aa2.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged to master


App not working

When trying to run I get this error
Traceback (most recent call last):   File "C:\Users\youtu\Downloads\OpCore-Simplify-main\OpCore-Simplify.py", line 2, in <module>     from Scripts import acpi_guru   File "C:\Users\youtu\Downloads\OpCore-Simplify-main\Scripts\acpi_guru.py", line 7, in <module>     from Scripts import smbios   File "C:\Users\youtu\Downloads\OpCore-Simplify-main\Scripts\smbios.py", line 3, in <module>     from Scripts import gathering_files   File "C:\Users\youtu\Downloads\OpCore-Simplify-main\Scripts\gathering_files.py", line 1, in <module>     from Scripts import github   File "C:\Users\youtu\Downloads\OpCore-Simplify-main\Scripts\github.py", line 1, in <module>     from Scripts import resource_fetcher   File "C:\Users\youtu\Downloads\OpCore-Simplify-main\Scripts\resource_fetcher.py", line 8, in <module>     from urllib.request import urlopen, Request   File "C:\Users\youtu\AppData\Local\Programs\Python\Python313\Lib\urllib\request.py", line 88, in <module>     import http.client   File "C:\Users\youtu\AppData\Local\Programs\Python\Python313\Lib\http\client.py", line 71, in <module>     import email.parser   File "C:\Users\youtu\AppData\Local\Programs\Python\Python313\Lib\email\parser.py", line 12, in  <module>     from email.feedparser import FeedParser, BytesFeedParser   File "C:\Users\youtu\AppData\Local\Programs\Python\Python313\Lib\email\feedparser.py", line 27, in <module>     from email._policybase import compat32   File "C:\Users\youtu\AppData\Local\Programs\Python\Python313\Lib\email\_policybase.py", line 7, in <module>     from email import header   File "C:\Users\youtu\AppData\Local\Programs\Python\Python313\Lib\email\header.py", line 16, in  <module>     import email.quoprimime   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked   File "<frozen importlib._bootstrap_external>", line 1022, in exec_module   File "<frozen importlib._bootstrap_external>", line 1155, in get_code   File "<frozen importlib._bootstrap_external>", line 784, in _compile_bytecode ValueError: bad marshal data (unknown type code)

Please ensure Python is installed correctly. This is an error related to compiled bytecode files (.pyc files).

I just did a fresh install

Try running a different Python program to see if it works

I also have this same problem, I’ve already changed Python and it didn’t work, does anyone know of any solution?


parser.py and @classmethod

 Issue by gusennan
Wed Feb  1 20:40:16 2017
Originally opened as https://github.com/codelucas/newspaper/issues/328

What are your thoughts on changing many of the @classmethod annotated methods in parser.py into @staticmethod annotated methods, particularly those that don't use the class object?  For example:
@classmethod
def stripTags(cls, node, *tags):
    lxml.etree.strip_tags(node, *tags)

to
@staticmethod
def stripTags(cls, node, *tags):
    lxml.etree.strip_tags(node, *tags)

parser is now a simple module.
static class is removed entirely
v0.9.2


Adding 4 EKS checks

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Adding 4 checks related to EKS cluster settings:

Ensure EKS Control Plane Logging is Enabled
Ensure EKS Clusters are created with Private Endpoint Enabled and Public Access Disabled
Restrict Access to the EKS Control Plane Endpoint
Ensure Kubernetes Secrets are encrypted using Customer Master Keys (CMKs)

Hey @jonjozwiak this is great, thanks for your effort on this. We will have add them to the extras group (at least) and it would be helpful also to create a new group for EKS, maybe eks-cis? It seems to be the born of a larger group for the new EKS CIS benchmark (CIS_Amazon_Elastic_Kubernetes_Service_(EKS)_Benchmark_v1.0.0.pdf), what do you think?


Add mysql env variables to service

The catalogue-db swarm mode service fails because the env variables for MySQL are undefined, this PR adds them.

LGTM, thanks for the fix


Lazy config file creation

What was changed

Why?

resolve https://github.com/temporalio/tctl/issues/312
Checklist

Closes

How was this tested:

unit test TestCreatesConfigFileLazily

Any docs updates needed?

the macos unit test should be addressed here https://github.com/temporalio/tctl-kit/pull/36


#2066 apply timestamp format to file type snapshots

Description
Even though there're timestamp format information when creating a snapshot, we ignored the format for now.
With this PR, timestamp columns will be formatted as expected.
Related Issue : #2066
How Has This Been Tested?

Import & wrangle s5k_1.csv.txt
Set format of column1 with context menu into like "yyyy"
Click "Snapshot"
Click "Done"
Click the new snapshot on right panel.
See "2011", "2012", etc.

Need additional checks?
Yes, please.
Types of changes

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

Checklist:

[ ] I have read the CONTRIBUTING document.
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have added tests to cover my changes.

deploy to 4

deploy to 4

Self-test on testbed4 done.


We should handle browser resizing

Currently we can't resize the browser because the chart would need to redraw itself, along with any child elements.

See #188


Handle Guzzle Exceptions

Today, I had a nice error : "Could not resolve host: www.google.com".
Even if it's probably a problem with my server, it blocked the registration to my service... I think it would be a good idea to send "true" during a Guzzle Exception to avoid this.

OK... @albertcht
Why ?

OK... @albertcht
Why ?


[BUG] Problem with cluster-tools using TTY as input

cnf-testsuite version - v1.3.0
test platform - OpenShift 4.12
I noticed essential test specialized_init_system, single_process_type, zombie_handled, and sig_term_handled were all failing. It looks like there is an issue with running the cluster-tools with TTY as input. See logs below. Similar logs are seen in each of the essential test that failed (specialized_init_system, single_process_type, zombie_handled, sig_term_handled).
I, [2024-06-27 11:52:39 -07:00 #907]  INFO -- cnf-testsuite: KubectlClient::Get.pods command: kubectl get pods --all-namespaces -o json
I, [2024-06-27 11:52:42 -07:00 #907]  INFO -- cnf-testsuite: KubectlClient.exec command: kubectl exec -n cnf-testsuite -ti cluster-tools-skf79 -- crictl inspect cri-o://41d0599dd7f923016a093b27773ec80bba2639b1eff95e4e392bc805aca95a93
I, [2024-06-27 11:52:45 -07:00 #907]  INFO -- cnf-testsuite: KubectlClient.exec stderr: Unable to use a TTY - input is not a terminal or the right kind of file time="2024-06-27T18:52:45Z" level=fatal msg="failed to connect: failed to connect, make sure you are running as root and the runtime has been started: context deadline exceeded" command terminated with exit code 1
E, [2024-06-27 11:52:45 -07:00 #907] ERROR -- cnf-testsuite: container_id not found for: cri-o://41d0599dd7f923016a093b27773ec80bba2639b1eff95e4e392bc805aca95a93

This looks like cluster-tools pod not in "Ready" state.
Please make sure successful execution of
cnf-testuite cnf_setup cnf-config=....

(watch the warning message "The ClusterTools installation timed out. Please check the status of the cluster-tools pods.")
and check status of cluster-tools pods
kubectl get pods -n cnf-testsuite

Note that when having slower network connection, it might get longer time for cluster-tools to get pulled from the registry and this is most frequently the reason of such problems.
Also note that this is being addressed by optimizing cluster-tools image size cnf-testsuite/cluster_tools#24

The cluster-tools are "Ready"
NAME                  READY   STATUS    RESTARTS   AGE
cluster-tools-575wh   1/1     Running   0          14m
cluster-tools-cqttr   1/1     Running   0          14m
cluster-tools-vmxnf   1/1     Running   0          14m

Output from cnf-testsuite specialized_init_system -lINFO > test-run-info.log
test-run-info.log
.log

Openshift uses cri-o container engine. This is not compatible with cnf-testsuite requirements, which states containerd:
https://github.com/cnti-testcatalog/testsuite/blob/main/INSTALL.md#minimum-requirements
I reproduced the same behavior/error on coredns example when deploying minikube with cri-o container engine.

I will create a Feature request to address this issue.

I will create a Feature request to address this issue.


Custom _answers_file value is not taken into account for update and recopy

Describe the problem
When I specify a custom name for the answers file via _answers_file, then the copy command creates the file as expected.
In the template, there is a {{ _copier_conf.answers_file }}.jinja with the content:
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
{{ _copier_answers|to_nice_yaml -}}

The copier.yml contains the option _answers_file: .bootstrap.yml.
When using the recopy command, then the error message is "Cannot recopy because cannot obtain old template references from .copier-answers.yml."
When I change the filename from .bootstrap.yml to copier-answers.yml, then the recopy works as expected.
When using the update command, then the error message is "TypeError: Template not found". Changing the filename again  to copier-answers.yml, makes the command work as expected.
If relevant, I also use --data-file to provide an answers file.
Template
I think the template is not relevant in this case.
The input.yml content looks like this:
customer_name: foo-bar-customer
customer_image_version: 1.2.3
environments:
  - dev
  - prod

The copier.yml content looks like this:
---
_subdirectory: template

_answers_file: .bootstrap.yml

# Parameters / copier questions
customer_name:
  type: str
  help: What is the name of the customer?

customer_name_slug:
  type: str
  help: A slug of the customer name (lower-case + kebap case)
  default: "{% from 'slugify.jinja' import slugify %}{{ slugify(customer_name) }}"

customer_image_version:
  type: str
  help: What is the version of the customer image?

environments:
  type: str
  help: Which environments does the customer use?
  default: ""
  multiselect: true
  choices:
    - "dev"
    - "iat"
    - "prod"

To Reproduce
Update command: copier update --vcs-ref main --data-file input.yml --defaults my-custom-repo
Recopy command: copier recopy --vcs-ref main --data-file input.yml --defaults my-custom-repo
Logs
No response
Expected behavior
Based on the configured _answers_file, it should read the correct answers file in the repository.
Screenshots/screencasts/logs
No response
Operating system
macOS
Operating system distribution and version
14.6.1
Copier version
copier 9.3.1
Python version
Python 3.12.5
Installation method
pipx+pypi
Additional context
No response

You need to specify  --answers-file
copier update --vcs-ref main --data-file input.yml --defaults my-custom-repo --answers-file .bootstrap.yml

Thanks, I did not see that option.


Ability to register new OIDC clients via overlord API

 Issue by sym3tri
Thursday Jul 02, 2015 at 21:41 GMT
Originally opened as https://github.com/coreos-inc/auth/issues/294

Instead of using authctl with db flag. This will make scripting the bootstrapping easier.

moved to #326


imports.k8s not properly typed but marked as typed

Description of the bug:

The k8s directory contains the py.typed marker, indicating that the library is typed but contains 1461 typing errors according to mypy.
Reproduction Steps & Error Log:

$ pipenv install mypy
$ export MYPYPATH=`pwd`
$ pipenv run mypy imports
[...]
Found 1461 errors in 2 files (checked 3 source files)

Environment:

Framework Version: 0.21.0
OS: Linux

This is :bug: Bug Report

@romainmuller any ideas?

What are the errors though? Can you get those into a pastebin or something?

@FlorianLudwig please see @RomainMuller's question above. Would love to dig deeper.

@eladb @RomainMuller  here you go: https://pastebin.com/mabVEJ2u

@FlorianLudwig are you using any particular configuration for mypy, or all default? (I just want to be certain I reproduce your conditions as precisely as possible)

All defaults.

@RomainMuller can you follow up here?

Okay so I'm having a look and the state of things is... not great.
We're definitely generating code that mypy is unable to check (known limitations, but it'll emit an "unsupported" error unless you specifically annotate the unsupported declarations), as well as code that... well... just breaches our own validations.
I'm preparing an update to jsii-pacmak that will emit code that actually validates (or at least - violates the model significantly less).

Great news!


Transferring extensions from certificates to certificate requests and vice versa.

Now x509 utility does not provide the ability to copy extensions from a request to a certificate and from a certificate to a request. This significantly reduces the comfort of using this utility. In my opinion, the best solution in this situation is to add the -copy_extensions option.
Fixes #3638 and #6481.

Checklist

[x] documentation is added or updated
[ ] tests are added or updated

@ca6aqa : change looks good at first glance ; one small thing: no merge commit, please.

Hi @ca6aqa, I wonder why you closed this PR? It was pretty good!

Hi @ca6aqa, I wonder why you closed this PR? It was pretty good!


[Metricbeat] Added daemonsetHostNetworking switch

[x] Chart version not bumped (the versions are all bumped and released at the same time)
[x] README.md updated with any new values or changes
[x] Updated template tests in ${CHART}/tests/*.py
[ ] Updated integration tests in ${CHART}/examples/*/test/goss.yaml

Since https://github.com/elastic/helm-charts/pull/315 has been closed here is a PR to add the hostNetwork setting to the daemonset pods.
Why > some metrics use the pod's name instead of the host name when hostNetwork is not set. This is showing in kibana's Infrastructure panel.

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

I closed that PR because I found a better way of doing it. In my metricbeat config I did
secretMounts:
    - name: elastic-certificate-pem
      secretName: elastic-certificates
      path: /usr/share/metricbeat/config/certs
extraEnvs:
    - name: 'NODE_HOSTNAME'
      valueFrom:
        fieldRef:
          fieldPath: spec.nodeName
    - name: 'NODE_HOST_IP'
      valueFrom:
        fieldRef:
          fieldPath: status.hostIP

and
metricbeat.yml: |
    name: "${NODE_HOSTNAME}"
    metricbeat.modules:
    -  module: kubernetes
        add_metadata: true
        metricsets:
          - container
          - node
          - pod
          - system
        host: "${NODE_HOSTNAME}"
        hosts: ["https://${NODE_HOST_IP}:10250"]
        bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        ssl.certificate_authorities:
          - /var/run/secrets/kubernetes.io/serviceaccount/ca.crt

This config is best when A. the kubelet node name is not routable from within a pod, B. your kubelet is serving https at port 10250. C. Your kubelet has its ip address listed as a "server alternate name" on its certificate
Depending, you may want to use http://${NODE_HOST_IP}:10255 (if you have the insecure read only port enabled on your cluster). In that case, the token file and ssl.certificate_authorities can be left out. If you have to use https but the node ip address isn't on the certificate, you'll have to use insecure mode on the https connection.

thanks @pbecotte , adding name: "${NODE_NAME}" indeed is a better way to solve this problem.


Remove classifier off datahub-ingestion

Checklist

[ ] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
[ ] Links to related issues (if applicable)
[ ] Tests for the changes have been added/updated (if applicable)
[ ] Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
[ ] For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Can we also remove the metadata-ingestion/src/datahub/classification/ folder and its contents?

sure, also took out classify_cli.py


iOs support

Hey Qvatra
did you try this on ios now?
and if yes did you push it to the App Store?

hello, yes I was able to push it to the ios app store.

ah great!
thank you :-D


Renamed all instances of ressource(s) -> resource(s)

Codecov Report

Merging #128 (c198ec4) into master (c27d2ba) will not change coverage.
The diff coverage is 44.11%.

@@           Coverage Diff           @@
##           master     #128   +/-   ##
=======================================
  Coverage   18.19%   18.19%
=======================================
  Files         103      103
  Lines        1506     1506
  Branches      554      554
=======================================
  Hits          274      274
  Misses       1100     1100
  Partials      132      132

Impacted Files
Coverage Δ

src/game/Game.cpp
0.00% <ø> (ø)

src/localization/Localization.cpp
16.00% <0.00%> (ø)

src/localization/Localization.hpp
100.00% <ø> (ø)

src/localization/ResourceString.cpp
0.00% <0.00%> (ø)

src/localization/ResourceString.hpp
0.00% <ø> (ø)

src/main.cpp
0.00% <ø> (ø)

src/localization/ResourceFile.cpp
45.52% <50.00%> (ø)

src/localization/ResourceFile.hpp
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


error logs: NC_ request

Hello, twemprodxy reported some error logs: NC_ request. c: 417 EOF C 249 discarding incomplete req<PHONE_NUMBER>9 len 4096, but I didn't understand what the error was, and then the error was reported. At the same time, the connection timeout occurred in the program at the same time, and the error occurred in the twoproxy at the same time_ The connection also fluctuates, so I want to find out where the problem is with the twoproxy.

The request is incomplete. the client closing the connection caused the eof (end-of-file) to be syslogged (At the same time, the connection timeout occurred in the program at the same time)
The fact that the length was exactly 4096 may or may not be related - the client might have fwrite() to send the first 4096 bytes, but not sent the remaining bytes to twemproxy. What client was used?
    if (conn->eof) {
        msg = conn->rmsg;

        /* client sent eof before sending the entire request */
        if (msg != NULL) {
            conn->rmsg = NULL;

            ASSERT(msg->peer == NULL);
            ASSERT(msg->request && !msg->done);

            log_error("eof c %d discarding incomplete req %"PRIu64" len "
                      "%"PRIu32"", conn->sd, msg->id, msg->mlen);

            req_put(msg);
        }

Programming language of this application is golang, we use an open lib on github for connecting to twemproxy, and the backend is memcached.
the open lib like is : "github.com/bradfitz/gomemcache/memcache"


Numbers2

This pull require is the ground work for further improvements in the type system.

Fixes a nasty bug with the order that special C++ wrappers were created that was causing duplicates for Number and CharSequence
Adds a closure and slot cache for match so that type lookups only occur once per conversion with time saving when matching against overloads.

This pull request is predicated on coverage2 #619, coverage3 #621, and numbers #617, thus it cannot be review until those have been merged.

The style of PRs based upon another base PR becomes unfeasible to review in a sane amount of (free) time. It produces lots of unreleated changes in the review pane and conflicts.
I suggest that we create a base branch (e.g. numbers2) and you open PRs based on this branch (which can live in this repo).

Fully agree.  I will make it happen.

Though in fairness, when the master is updated all those commits will disappear from the other PRs.  And you will notice that I don't hit request review on a PR until time catches back up with the master. For example once this is merged the next 4 reviews will suddenly drop all the commits except the last.  If not then I just freshen the PR and then hit the review button.
If you keep jumping ahead in the book, you are going to spoil the ending.

apache.org is terribly slow, 8mb in 20 minutes. I'm going to skip the rest of the Appveyor jobs.

Okay I admit it... I was wrong, the github system won't fast forward a PR when the master catches up.   I must have dreamed it (partly the result of doing work at 5 AM)....  either way all the PRs are now rebased and thus we have caught back up to the present.


Rebooting with open files can cause "frozen files", returning FX_FILE_CORRUPT everywhere

Describe the bug
I have one file that one way or another is corrupt and there's no way I can get rid of it. I'm not sure how I got into this situation but I believe it relates to rebooting the system with open files. I use exFAT on an SD-card with fault-tolerance enabled.
When I try to open the file, I get FX_FILE_CORRUPT, if I try to delete it I get the same error. Also if I attempt to use fx_media_check to fix the file system, I get the very same returned error. This is where it returns this value
https://github.com/azure-rtos/filex/blob/9e3ad51f2b64ed05df50a211909eef536c0d06ec/common/src/fx_media_check.c#L462
When I try to list all the files in the directory with fx_directory_next_entry_find() I get the files in the folder up until the corrupt file is found, upon which it returns FX_FILE_CORRUPT.
The following is the code to format and mount the file system
    if ((mp->flags & FS_MOUNT_FLAG_NO_FORMAT) == 0)
    {
        LOG_INF("formatting %s, block_size=%u, block_count=%u (%llu MB)",
                mp->mnt_point,
                block_size,
                block_count,
                (uint64_t)block_count*block_size/1000000);
        require_ok(fx_media_exFAT_format(&ctx.media,
                              filex_port_io,
                              &ctx,
                              ctx.buffer,
                              sizeof(ctx.buffer),
                              "DISK",
                              1,
                              0,
                              block_count,
                              block_size,
                              64,
                              0,
                              8192), bail);
    }

    require_ok(fx_media_open(&ctx.media,
                             "DISK",
                             filex_port_io,
                             &ctx,
                             ctx.buffer,
                             sizeof(ctx.buffer)), bail);
    require_ok(fx_fault_tolerant_enable(&ctx.media,
                                        ctx.ft_buffer,
                                        sizeof(ctx.ft_buffer)), bail);

Using version v6.2.0 of FileX on an ST MCU.
Expected behavior
A file that is not closed on system restart file should either be partially written or not exist. It should definitely be possible to delete the file.
Impact
Showstopper since that file is now frozen

Closing as exFAT was removed in the transfer to Eclipse


Rewrites avatars using es6

@bigtiger @rylnd @amy

@itsthatguy A couple environment-based hiccups otherwise it's looking good.

@bigtiger can you elaborate?

@itsthatguy Thank you for this. Comes at a perfect time for me.

@tjmckenzie Are you running your own instance? How are you using Avatars?

@bigtiger I am in the process of it. I am somewhat new to running my own node server. Currently in the process of it.
I am using these as a form of anonymous chat. I made a slight modification to allow transparent backgrounds, as it would help with my front end design.

Cool. We deploy to heroku which worked well for a few years until our traffic took off.

Hope too much of that wasn't me (nothing in production yet). I'm now storing them to S3 to limit API requests, and soon running my own instance.

Haha! Definitely not. There's a few very heavy users and a lot of folks using it one off. But, of late we've been serving nearly 30,000,000 per month.


Update bcrypt version, so it can be compiled in node >12

Thanks @TrueCarry! I pulled your commit in as part of #10 (to help get the CI to pass).

Thank you very much!


Support for cx

is this support for cx and any example to try?

is this support for cx and any example to try?

Did you find anything if so please provide .thanks


feat: enhance skip-link defaults

PR Checklist
Please check if your PR fulfills the following requirements:

Tests for the changes have been added/updated: N
Docs have been added/updated: N
Does this PR introduce a breaking change? N
I have linked any related GitHub issues to be closed when this PR is merged? n/a

Describe the new behavior?
Summary: enhance the skip-link defaults to improve ease of use

Auto add a tabindex="-1" to the target element if a tabindex does not already exist
If a target is not supplied, automatically find and use the first main element as the target. This will use that element's ID, or add an ID if that element does not have one.

Additional information
Looking for feedback before i try to take this any further. Maybe this approach, which includes setting attributes on external elements, is against the Forge ethos.
This assumes that there will only be a single main element present at a time. Maybe that's not a safe enough assumption.
WIP - not in a state that I expect to merge.

This clearly needs work to actually function. Just feeling the waters.
For example, that approach to initializing a target if it is not provided would not currently work in a SPA where the main element would be getting destroyed on every route event.

This is too intrusive for Forge functionality. Closing.


I can write data to the device, but I cannot receive data.

Prerequisites

[X] I checked the documentation and FAQ without finding a solution
[X] I checked to make sure that this issue has not already been filed
[X] I'm sure that question is related to the library itself and not Bluetooth Low Energy or Classic in general. If that so, please post your question on StackOverflow.
[ ] I'm running the latest version

Question
Hi, I can write data to the device, but I cannot receive data. Am I using the library methods wrong? Can anyone help?
My code is here:
import { StatusBar } from "expo-status-bar";
import React, { useEffect, useState } from "react";
import {
  StyleSheet,
  Text,
  View,
  PermissionsAndroid,
  Button,
  Platform,
} from "react-native";
import { BleManager, State } from "react-native-ble-plx";
import { AppRegistry } from "react-native";
import { name as appName } from "./app.json";

const manager = new BleManager();

const App = () => {
  const [isConnected, setIsConnected] = useState(false);
  const [deviceID, setDeviceID] = useState(null);

  const serviceUUID = "6E400001-B5A3-F393-E0A9-E50E24DCCA9E";
  const characteristicUUIDRX = "6E400002-B5A3-F393-E0A9-E50E24DCCA9E";
  const characteristicUUIDTX = "6E400003-B5A3-F393-E0A9-E50E24DCCA9E";

  const encodeToBase64 = () => {
    try {
      const c1 = String.fromCharCode(14);
      const c2 = "5";
      const str = "reset";
      const sum = c1 + c2 + str;

      const unicodeValues = sum.split("").map((char) => char.charCodeAt(0));
      const dataToWrite = new Uint8Array(unicodeValues);

      return btoa(unescape(encodeURIComponent(sum)));
    } catch (e) {
      console.error("Base64 encoding failed:", e);
      return null;
    }
  };

  useEffect(() => {
    const subscription = manager.onStateChange((state) => {
      if (state === "PoweredOn") {
        scan();
        subscription.remove();
      }
    }, true);
    return () => subscription.remove();
  }, [manager]);

  const writeCharacteristic = async () => {
    if (!deviceID) {
      console.log("Device ID is not set");
      return;
    }
    await manager
      .writeCharacteristicWithResponseForDevice(
        deviceID,
        serviceUUID,
        characteristicUUIDRX,
        encodeToBase64()
      )
      .then((value) => {
        console.log("Write success: ", value);
      })
      .catch((error) => {
        console.log("Write Failed: ", error);
      });
  };

  const monitorCharacteristicData = async () => {
    try {
      const device = await manager.isDeviceConnected(deviceID);
      if (device) {
        console.log("Device is connected");
        await manager.monitorCharacteristicForDevice(
          deviceID,
          serviceUUID,
          characteristicUUIDTX,
          (error, characteristic) => {
            if (error) {
              console.log("Monitor failed:", error);
              return;
            }
            console.log("Received data:", characteristic.value);
          }
        );
      } else {
        console.log("Device is not connected");
      }
    } catch (error) {
      console.log("Error: ", error);
    }
  };

  const scan = () => {
    manager.startDeviceScan(null, null, (error, device) => {
      if (error) {
        console.log(error);
        return;
      }
      console.log(device.name);
      console.log(device.id);
      if (device.name === "YDUART") {
        console.log("Device is found!");
        manager.stopDeviceScan();
        setDeviceID(device.id);
        connect(device.id);
      }
    });
  };

  const connect = async (deviceId) => {
    try {
      await manager
        .connectToDevice(deviceId)
        .then((device) => {
          console.log("Connected to device:", device.name);
          setIsConnected(true);
          console.log("Services and characteristics discovered");
          return device.discoverAllServicesAndCharacteristics();
        })
        .catch((error) => {
          console.error("Error connecting to device:", error);
        });
    } catch (error) {
      console.error("Error connecting to device:", error);
    }
  };

  const disconnectFromDevice = async () => {
    try {
      const device = await manager.isDeviceConnected(deviceID);
      if (device) {
        await manager
          .cancelDeviceConnection(deviceID)
          .then((device) => {
            console.log("Disconnect success:", device);
            setIsConnected(false);
          })
          .catch((error) => {
            console.log("Disconnect Failed: ", error);
          });
      } else {
        console.log("Device is not connected");
      }
    } catch (error) {
      console.log("Error: ", error);
    }
  };

  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
      <StatusBar style="auto" />
      <Button title="Connect to Device" onPress={() => scan()} />
      <Button title="Write to Device" onPress={writeCharacteristic} />
      <Button title="Disconnect from Device" onPress={disconnectFromDevice} />
    </View>
  );
};

AppRegistry.registerComponent(appName, () => App);

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
});

export default App;

When I run this code, I get an output like the following.
Write success:  {"_manager": {"_activePromises": {}, "_activeSubscriptions": {}, "_errorCodesToMessagesMapping": {"0": "Unknown error occurred. This is probably a bug! Check reason property.", "1": "BleManager was destroyed", "100": "BluetoothLE is unsupported on this device", "101": "Device is not authorized to use BluetoothLE", "102": "BluetoothLE is powered off", "103": "BluetoothLE is in unknown state", "104": "BluetoothLE is resetting", "105": "Bluetooth state change failed", "2": "Operation was cancelled", "200": "Device {deviceID} connection failed", "201": "Device {deviceID} was disconnected", "202": "RSSI read failed for device {deviceID}", "203": "Device {deviceID} is already connected", "204": "Device {deviceID} not found", "205": "Device {deviceID} is not connected", "206": "Device {deviceID} could not change MTU size", "3": "Operation timed out", "300": "Services discovery failed for device {deviceID}", "301": "Included services discovery failed for device {deviceID} and service: {serviceUUID}", "302": "Service {serviceUUID} for device {deviceID} not found", "303": "Services not discovered for device {deviceID}", "4": "Operation was rejected", "400": "Characteristic discovery failed for device {deviceID} and service {serviceUUID}", "401": "Characteristic {characteristicUUID} write failed for device {deviceID} and service {serviceUUID}", "402": "Characteristic {characteristicUUID} read failed for device {deviceID} and service {serviceUUID}", "403": "Characteristic {characteristicUUID} notify change failed for device {deviceID} and service {serviceUUID}", "404": "Characteristic {characteristicUUID} not found", "405": "Characteristics not discovered for device {deviceID} and service {serviceUUID}", "406": "Cannot write to characteristic {characteristicUUID} with invalid data format: {internalMessage}", "5": "Invalid UUIDs or IDs were passed: {internalMessage}", "500": "Descriptor {descriptorUUID} discovery failed for device {deviceID}, service {serviceUUID} and characteristic {characteristicUUID}", "501": "Descriptor {descriptorUUID} write failed for device {deviceID}, service {serviceUUID} and characteristic {characteristicUUID}", "502": "Descriptor {descriptorUUID} read failed for device {deviceID}, service {serviceUUID} and characteristic {characteristicUUID}", "503": "Descriptor {descriptorUUID} not found", "504": "Descriptors not discovered for device {deviceID}, service {serviceUUID} and characteristic {characteristicUUID}", "505": "Cannot write to descriptor {descriptorUUID} with invalid data format: {internalMessage}", "506": "Cannot write to descriptor {descriptorUUID}. It's not allowed by iOS and therefore forbidden on Android as well.", "600": "Cannot start scanning operation", "601": "Location services are disabled"}, "_eventEmitter": {"_nativeModule": [Object]}, "_scanEventSubscription": null, "_uniqueId": 8}, "deviceID": "16802D6E-0F2E-8CAC-91AA-5E5463A6F61F", "id":<PHONE_NUMBER>4, "isIndicatable": false, "isNotifiable": false, "isNotifying": false, "isReadable": false, "isWritableWithResponse": true, "isWritableWithoutResponse": false, "serviceID":<PHONE_NUMBER>2, "serviceUUID": "6e400001-b5a3-f393-e0a9-e50e24dcca9e", "uuid": "6e400002-b5a3-f393-e0a9-e50e24dcca9e", "value": null}

Hi, I don't see where are you using yours monitorCharacteristicData function.
I manage to make it work after changing your connect function to:
  const connect = async deviceId => {
    try {
      await manager
        .connectToDevice(deviceId)
        .then(device => {
          console.log('Connected to device:', device.name)
          console.log('Services and characteristics discovered')
          return device.discoverAllServicesAndCharacteristics()
        })
        .then(() => setIsConnected(true))
        .catch(error => {
          console.error('Error connecting to device:', error)
        })
    } catch (error) {
      console.error('Error connecting to device:', error)
    }
  }

and adding useEffect to run after successful connection
  useEffect(() => {
    if (isConnected) {
      monitorCharacteristicData()
    }
  }, [isConnected])

Otherwise you can add additional button to run monitorCharacteristicData

Hi, did you manage to solve your issue?

Closing due to inactivity


JBPM-4625 tests polishing

I did some polishing when I was reviewing new tests related to JBPM-4625:

Added type parameters to resolve a few raw type warnings

Added a few missing assertions to RoasterApiTest

Excluded errai-javax-enterprise artifact from dependency tree
It contains custom implementation of java.lang.reflect.Method, which is used in org.kie.workbench.common.services.datamodeller.util.DriverUtils. DriverUtils uses Method#getDefaultValue(), which is missing in the class from errai-javax-enterprise and so I was unable to run the tests in my IDE due to this (depends on class loading order, probably).

Please squash the commits if you are going to merge this.

I have removed the errai-javax-enterprise exclude and squashed the commits so the PR is now really a small update to RoasterApiTest.


needs evaluated even if 'installed: false'

Operating system
Debian stable (12 bookworm)
Helmfile Version
0.163.1
Helm Version
v3.14.4
Bug description
If a release in helmfile.gotmpl.yaml has a needs statement but also its installed directive evaluates to false then the release referenced by the needs still gets installed.
Example helmfile.yaml
For example we had the following where the installed is evaluated on each cluster where only our monitoring cluster sets DEPLOY_ELASTALERT to true.
On the other clusters it'll still install the content from the elastalert-additions release even though elastalert is not being installed.
  - name: elastalert-additions
    namespace: elastalert
    chart: ./helm/charts/elastalert-additions
    values:
      - helm/vars/elastalert.yaml.gotmpl

  - name: elastalert
    namespace: elastalert
    chart: elastalert2/elastalert2
    installed: {{ (env "DEPLOY_ELASTALERT") | default "false" }}
    labels:
      app: elastalert
    needs:
      - elastalert/elastalert-additions
    values:
      - helm/vars/elastalert.yaml.gotmpl

I can fix this by adding the following to the elastalert-additions release as well:
    installed: {{ (env "DEPLOY_ELASTALERT") | default "false" }}

However then on the clusters where installed evaluates to false the following warning is produced:
WARNING: release elastalert needs elastalert-additions, but elastalert-additions is not installed due to installed: false. Either mark elastalert-additions as installed or remove elastalert-additions from elastalert's needs

Error message you've seen (if any)
No error messages. Just that it is installing "needed" releases for releases where installed: false is in place.
Sometimes that in itself can lead to other unrelated errors (say the cluster involved doesn't has the necessary namespace for that release for example).
All the detail is above.
Steps to reproduce
See above.
Working Helmfile Version
This probably never worked.
Relevant discussion
No response

@jim-barber-he PR is welcome.

Would if I could. I don't know go.

@jim-barber-he thanks. could you give me some example.

Ok
Here's an example of using the deliveryhero/cluster-overprovisioner Helm chart that deploys the registry.k8s.io/pause:3.9 image that basically does nothing but sit there.
That image runs with a custom priority class.
Below I've tried to create a self contained helmfile.yaml file with values to demonstrate the problem.
releases:

  - name: prerequisites
    namespace: example
    chart: deliveryhero/cluster-overprovisioner
    values:
      - deployments:
          - replicaCount: 1
            resources:
              requests:
                cpu: 10m
                memory: 8Mi
        priorityClassDefault:
          enabled: false
        priorityClassOverprovision:
          name: prerequisites
        serviceAccount:
          create: false
          name: default

  - name: example
    namespace: example
    chart: deliveryhero/cluster-overprovisioner
    installed: false
    needs:
      - example/prerequisites
    values:
      - deployments:
          - replicaCount: 1
            resources:
              requests:
                cpu: 10m
                memory: 8Mi
        priorityClassDefault:
          enabled: false
        priorityClassOverprovision:
          name: example
        serviceAccount:
          create: false
          name: default

repositories:

  - name: deliveryhero
    url: https://charts.deliveryhero.io/

There is a release called example that needs a release called prerequisites.
These would be deployed into a namespace called example.
I've set installed: false for the example release since I don't want it to install, and by extension that means I don't want prerequisites installed.
Running a deploy like so:
helmfile --interactive apply -l name=example apply --include-needs

Results in it wanting to install the prerequisites release.
$ helmfile --interactive apply -l name=example apply --include-needs
Adding repo deliveryhero https://charts.deliveryhero.io/
"deliveryhero" has been added to your repositories

Comparing release=prerequisites, chart=deliveryhero/cluster-overprovisioner
********************

	Release was not present in Helm.  Diff will show entire contents as new.

********************
example, prerequisites, PriorityClass (scheduling.k8s.io) has been added:
-
+ # Source: cluster-overprovisioner/templates/priorityclass-overprovision.yaml
+ apiVersion: scheduling.k8s.io/v1
+ kind: PriorityClass
+ metadata:
+   name: prerequisites
+   labels:
+     app.kubernetes.io/name: cluster-overprovisioner
+     helm.sh/chart: cluster-overprovisioner-0.7.11
+     app.kubernetes.io/instance: prerequisites
+     app.kubernetes.io/version: "3.9"
+     app.kubernetes.io/managed-by: Helm
+ value: -1
+ globalDefault: false
+ description: "Priority class used for overprovision pods"
example, prerequisites-cluster-overprovisioner-, Deployment (apps) has been added:
-
+ # Source: cluster-overprovisioner/templates/deployments.yaml
+ apiVersion: apps/v1
+ kind: Deployment
+ metadata:
+   name: "prerequisites-cluster-overprovisioner-"
+   namespace: example
+   labels:
+     app.kubernetes.io/name: cluster-overprovisioner
+     helm.sh/chart: cluster-overprovisioner-0.7.11
+     app.kubernetes.io/instance: prerequisites
+     app.kubernetes.io/version: "3.9"
+     app.kubernetes.io/managed-by: Helm
+     app.cluster-overprovisioner/deployment:
+ spec:
+   strategy:
+     type: Recreate
+   replicas: 1
+   selector:
+     matchLabels:
+       app.kubernetes.io/name: cluster-overprovisioner
+       app.kubernetes.io/instance: prerequisites
+       app.cluster-overprovisioner/deployment:
+   template:
+     metadata:
+       labels:
+         app.kubernetes.io/name: cluster-overprovisioner
+         helm.sh/chart: cluster-overprovisioner-0.7.11
+         app.kubernetes.io/instance: prerequisites
+         app.kubernetes.io/version: "3.9"
+         app.kubernetes.io/managed-by: Helm
+         app.cluster-overprovisioner/deployment:
+     spec:
+       serviceAccountName: default
+       priorityClassName: prerequisites
+       securityContext:
+         {}
+       containers:
+         - name: cluster-overprovisioner
+           image: "registry.k8s.io/pause:3.9"
+           imagePullPolicy: IfNotPresent
+           resources:
+             requests:
+               cpu: 10m
+               memory: 8Mi

Listing releases matching ^example$
Affected releases are:
  prerequisites (deliveryhero/cluster-overprovisioner) UPDATED

Do you really want to apply?
  Helmfile will apply all your changes, as shown above.

 [y/n]: n

To give another example, I've got a setup like the following:
releases:
  - name: vizier
    installed: {{ .Values.pixie.enabled }}
    namespace: pl
    createNamespace: true
    chart: pixie-vizier/pixie-vizier
    values: ...
  - name: newrelic-pixie
    installed: {{ and .Values.pixie.enabled .Values.newrelic.pixie.enabled }}
    needs:
      - pl/vizier
      - newrelic/newrelic-bundle
    namespace: pl
    chart: newrelic/newrelic-pixie
    values: ...

( newrelic/newrelic-bundle release not pictured here because it's not really relevant)
If .Values.pixie.enabled is false, then neither vizier nor newrelic-pixie should end up installed. But I still get a warning printed:

WARNING: release newrelic-pixie needs vizier, but vizier is not installed due to installed: false. Either mark vizier as installed or remove vizier from newrelic-pixie's needs

This doesn't make sense, as, while newrelic-pixie does need Vizier, and I'm not installing Vizier, I'm not installing newrelic-pixie either, so the fact that I'm not installing Vizier seems irrelevant.


add pluralize to funcs (fix #51)

I am not very confident about this is the correct way to implement. Please take a look when you have time @kazegusuri
Thanks.

LGTM. could you squash the commits?

LGTM. could you squash the commits?

Sure, done. Thanks @kazegusuri

It's been a while. Could you please release new version with this? @kazegusuri


running ceylon module with 'vertx run'

There are multiple problems with using vertx run and Ceylon:
First, Ceylon support is not enabled by default (!) and this is not mentioned in the Vert.x documentation. Instead it is mentioned here. But it's unreasonable to expect people to know to look for it there.
Second, when vertx is installed via Homebrew, there is no vertx-stack.json file installed, so the instructions don't actually work in that case.
Finally, it seems that in the latest release, vertx run simply doesn't work with Ceylon modules at all, even after running vertx resolve. This command:
vertx run ceylon:examples.core.http.simple.server/1.0.0

Results in this error:
java.lang.ClassNotFoundException: examples.core.http.simple.server/1.0.0

Finally, it seems that in the latest release, vertx run simply doesn't work with Ceylon modules at all, even after running vertx resolve.

OK, that's not right. The problem was that I have to run vertx resolve from within my Vert.x installation directory, which is not mentioned in the instructions, and doesn't even seem to be properly documented here:
http://vertx.io/docs/vertx-stack-manager/stack-manager/#_launching_the_resolution

@cescoffier @vietj I think it's a bug in vertx resolve that it will happily download everything into my project's lib directory without telling me something is wrong.

I also think it's a bug that the vertx homebrew installation doesn't include a vertx-stack.json file. I'm not sure where I should report that one.

report it on the vert-x3/vertx-stack project


Placeholder for inability to use client GsFiles from Jadeite to 3.6.1

Per bugs 49623 and 49007, the server has been changed between 3.2.15 and 3.6.1 such that some kinds of GCI calls cause client user actions, including GsFile operations, to be disabled.  The flags GCI_PERFORM_FLAG_ENABLE_DEBUG and  GCI_PERFORM_noClientUseraction  and GciNb... calls are implicated.
With these server changes, in Jadeite for 3.6.1, if you attempt to execute GsFile openWrite:, it results in a GciTransportError occurred (error 2728), client user action not supported during non-blocking GCI call actionNameOop 4202241.
This may not be an issue for customers... however I'm not going to be able to do any real actual work on any projects or port tools, unless this can be fixed.

Per side discussions, this should be fixed, if possible, in Jadeite that supports later versions of Rowan - probably v3.

I believe this was fixed in the latest, unreleased Jadeite that supports Rowan V3.0. It was done quite some time ago but the nb perform and execute variants Jadeite uses appear to be updated with the proper dbg & flag per issue report.
Simple workspace tests confirm that GsFile>>openRead: and GsFile>>openWrite: work as desired now.
Assigning to Lisa for more thorough testing when Jadeite for Rowan 3.0 is released.

Lisa verified fix. Also see https://github.com/GemTalk/Jadeite/issues/893


fix(es/transforms/compat): capture this context scope for the class method

Part 1 for #2716.
This PR is an attempt to remove explicit binding to this. As a first step trying to remove scoped this in class method.
However, I do not think this is ok to check in as-is due to some of the notable issues to be resolved. I left some comments for the known part, and there may be possibly more.
As Part 1 implies this won't resolve all of the cases. But I found trying to solve all at once would take some amount of effort,  trying to make gradual progress with known possible paths.

/cc @Austaras

I'd like to proceed this PR in these steps, if this sounds acceptable approach:

Resolve immediate questions, notably https://github.com/swc-project/swc/pull/2776#discussion_r750908883. I think it'd be ok to accept immeidate workaround
Land #2786, update code to utilize refactored
See if we can explore https://github.com/swc-project/swc/pull/2776#discussion_r751519526 , probably need separate issue to track
New PR completes remaning work not covered in this PR.

Cool, once this goes in I'll wait for #2786 and apply further progresses on top of it.


Loading Featherlight after using jQuery noconflict

[x] Question.
[x] Feature Request.

I am using featherlight in an environment where jQuery 1.8 is required. This version is too ancient.. so I load jQuery 3 dynamically.
    var $window = window;
    loadScript('//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js', function() {
            var jQ = $.noConflict(true);
            if (!$window.jQuery) {
                $window['jQuery'] = jQ;
                $window['$'] = jQ;
            }
            loadDeps(jQ);
   });

the loadDeps() method call then loadScript's featherlight.
However.. featherlight is instantiated with jQuery 1.8.  Not 3.3.1.
When I inspect the page I can see jQuery 1.8 is loaded.. then I see the jQuery 3.3.1 being loaded.. I then see featherlight 1.7.13 being loaded in that order.
Is what I am trying to do not possible ?  does there need to be a change to featherlight to support this requirement ?

I believe Parsley will use window.jQuery when loaded. So if you loaded it just before calling $.noConflict above (i.e. when window.jQuery is still 3.3.1), you should have what you want.

Thanks @marcandre I'll look into this further.


Square/rectangle/circle/oval drawing tools

Similar to line tool, useful for retros

Rectangle https://github.com/niventc/wally/commit/b8d596d0b0174e41c7043e149a4320c6d19ade12

Square using the same awkward snapping as the line tool https://github.com/niventc/wally/commit/79d7d3d12a62ec676d4531b9fd75cbd31d4dfc56


Added icon to point towards currently selected model and incremental search

Closes #502

@Rachit1313 I found this Stackoverflow post which might be helpful:
https://stackoverflow.com/questions/42573017/in-react-es6-why-does-the-input-field-lose-focus-after-typing-a-character

I like these features @Rachit1313. I like that this shows which model is currently selected, and I like the incremental search too.
I just have the same concern as @kliu57 It seems this bug only occurs after you narrow your possible entries, and then expand the list of possible matches by pressing Backspace a few times.
Notice how as I narrow my possible matches by typing out gpt-4-1106- the text entry remains in focus, but as soon as I hit Backspace until gpt-4-, the list of possible matches increases and the text entry loses focus

Yeah, I see that this behavior is getting caused by re rendering of the Menu when we find more/ less possible matches.

@Rachit1313 I found this Stackoverflow post which might be helpful: https://stackoverflow.com/questions/42573017/in-react-es6-why-does-the-input-field-lose-focus-after-typing-a-character

tried many solutions, nothing works for me.
Tried

use disclosure method
switching the input with ChakraUI's Input
autoFocus property
useEffect to manually focus after setting inputRef

@humphd/ @Amnish04 do you know anything that might help here?

a) This is so freaking awesome!
b) You want to debounce like elsewhere in code to not search while user is typing..eg give user 100ms or so to finish their text before searching
c) you likely lose focus on backspace likely because react is destroying and re-creating the menu..hacky solution is to do setTimeout, get reference to raw element and focus that when it's recreated...but really talk to chatcraft re your approach nd this problem

@Rachit1313 I know you need a bit of help so here is the code to do the useDebounce since I am familiar with it. Already tested on my local so it works.
import { useDebounce } from "react-use";

function MobilePromptSendButton({ isLoading }: PromptSendButtonProps) {
  // Do the same here as I did in DesktopPromptSendButton
}

function DesktopPromptSendButton({ isLoading }: PromptSendButtonProps) {
  const [searchQuery, setSearchQuery] = useState("");
  const [debouncedSearchQuery, setDebouncedSearchQuery] = useState("");

  // I used 1000 milliseconds just as a test to make sure it is working. You can change it to 500 or something I think it may be enough time for a user to finish typing, I actually think 100 milliseconds was not enough time but do some tests and see
  useDebounce(
    () => {
      setDebouncedSearchQuery(searchQuery);
    },
    1000,
    [searchQuery]
  );

  ...
  // notice I changed searchQuery to debouncedSearchQuery below in the {models... } part
            <input
              type="text"
              placeholder="Search models..."
              value={searchQuery}
              onChange={(e) => setSearchQuery(e.target.value)}
              style={{ margin: "10px", padding: "5px", width: "calc(100% - 20px)" }}
            />
            {models
              .filter((model) => !usingOfficialOpenAI() || model.id.includes("gpt"))
              .filter((model) =>
                model.prettyModel.toLowerCase().includes(debouncedSearchQuery.toLowerCase())
              )
              .map((model) => (
                <MenuItem
                  closeOnSelect={true}
                  key={model.id}
                  onClick={() => setSettings({ ...settings, model })}
                >
                  {settings.model.id === model.id ? (
                    <MdOutlineChevronRight style={{ marginRight: "4px" }} />
                  ) : (
                    <span style={{ width: "24px", display: "inline-block" }} />
                  )}
                  {model.prettyModel}
                </MenuItem>
              ))}
  ...
}

More information I uncovered while testing the backspace problem. It is not a backspace problem but a general overall focus problem for the input field. Try clicking on the input search field. It now has focus. Now hover your mouse away from that area and hover on to one of the models. It immediately loses focus. This is the root of the problem. We thought the problem was from the backspace, but actually all the backspace does was change the search query which changed the size of the dropdown, which made your mouse hover over one of the models or hover on something else and the search field lost focus immediately.
I don't know why the search field is losing focus when you hover away, gpt does not seem to know. Maybe look into what code is triggered when you hover over the models? Maybe that code is shifting the focus to something else and thus the focus of the search input field is lost?

If the problem is mouseovers, this is probably an artifact of how react-menu works

If the problem is mouseovers, this is probably an artifact of how react-menu works

Yeah I see, Even the solution @kliu57 gave it not helping us to solve the problem completely. If its a problem of how ChakraMenu is setup, how do we fix this?

The above method would help us stay in focus until we fully erase the text we want while backspacing and not remove focus just after a single match found but I believe this still have some issues as it delays the response time if that matters.

I love this, great work @Rachit1313!  I pulled it locally and made some fixes, which you can use:
diff --git a/src/components/PromptForm/PromptSendButton.tsx b/src/components/PromptForm/PromptSendButton.tsx
index e9ddd5b..2dae5e9 100644
--- a/src/components/PromptForm/PromptSendButton.tsx
+++ b/src/components/PromptForm/PromptSendButton.tsx
@@ -9,8 +9,11 @@ import {
   Tooltip,
   MenuDivider,
   MenuGroup,
+  Input,
+  InputGroup,
+  InputLeftElement,
 } from "@chakra-ui/react";
-import { TbChevronUp, TbSend } from "react-icons/tb";
+import { TbChevronUp, TbSend, TbSearch } from "react-icons/tb";
 import { FreeModelProvider } from "../../lib/providers/DefaultProvider/FreeModelProvider";

 import useMobileBreakpoint from "../../hooks/use-mobile-breakpoint";
@@ -18,7 +21,7 @@ import { useSettings } from "../../hooks/use-settings";
 import { useModels } from "../../hooks/use-models";
 import theme from "../../theme";
 import { MdVolumeUp, MdVolumeOff, MdOutlineChevronRight } from "react-icons/md";
-import { useMemo, useState } from "react";
+import { useMemo, useRef, useState, type KeyboardEvent } from "react";
 import useAudioPlayer from "../../hooks/use-audio-player";
 import { usingOfficialOpenAI } from "../../lib/providers";
 import { useDebounce } from "react-use";
@@ -106,7 +109,7 @@ function MobilePromptSendButton({ isLoading }: PromptSendButtonProps) {
         />
         <MenuList maxHeight={"70vh"} overflowY={"auto"} zIndex={theme.zIndices.dropdown}>
           <MenuGroup title="Models">
-            <input
+            <Input
               type="text"
               placeholder="Search models..."
               value={searchQuery}
@@ -165,15 +168,30 @@ function DesktopPromptSendButton({ isLoading }: PromptSendButtonProps) {
   const isTtsSupported = useMemo(() => {
     return !!models.filter((model) => model.id.includes("tts"))?.length;
   }, [models]);
+  const inputRef = useRef<HTMLInputElement>(null);

   useDebounce(
     () => {
       setDebouncedSearchQuery(searchQuery);
     },
-    500,
+    250,
     [searchQuery]
   );

+  const onStatTyping = (e: KeyboardEvent<HTMLElement>) => {
+    // Check if the inputRef is current and the input is not already focused
+    if (inputRef.current && document.activeElement !== inputRef.current) {
+      // Don't handle the keydown event more than once
+      e.preventDefault();
+      // Make sure we are focused on the input element
+      inputRef.current.focus();
+      // Ignore control keys
+      const char = e.key.length === 1 ? e.key : "";
+      // Set the initial character in the input so we don't lose it
+      setSearchQuery(char);
+    }
+  };
+
   const { clearAudioQueue } = useAudioPlayer();

   const providersList = {
@@ -227,15 +245,26 @@ function DesktopPromptSendButton({ isLoading }: PromptSendButtonProps) {
           title="Choose Model"
           icon={<TbChevronUp />}
         />
-        <MenuList maxHeight={"70vh"} overflowY={"auto"} zIndex={theme.zIndices.dropdown}>
+        <MenuList
+          maxHeight={"70vh"}
+          overflowY={"auto"}
+          zIndex={theme.zIndices.dropdown}
+          onKeyDownCapture={onStatTyping}
+        >
           <MenuGroup title="Models">
-            <input
-              type="text"
-              placeholder="Search models..."
-              value={searchQuery}
-              onChange={(e) => setSearchQuery(e.target.value)}
-              style={{ margin: "10px", padding: "5px", width: "calc(100% - 20px)" }}
-            />
+            <InputGroup>
+              <InputLeftElement pointerEvents="none">
+                <TbSearch />
+              </InputLeftElement>
+              <Input
+                ref={inputRef}
+                type="text"
+                variant="ghost"
+                placeholder="Search models..."
+                value={searchQuery}
+                onChange={(e) => setSearchQuery(e.target.value)}
+              />
+            </InputGroup>
             {models
               .filter((model) => !usingOfficialOpenAI() || model.id.includes("gpt"))
               .filter((model) =>

The main changes:

add a key down handler to listen for the user typing, and when they do, add the first character to the input and then let your exiting code take over
reduce the debounce so updates happen sooner
use Chakra's controls to make it a bit more integrated

I believe for mobile, we can have debounce itself of 600 as probably we would want the keyboard to close after the new models come so that we can select another model based on our search

I believe for mobile, we can have debounce itself of 600 as probably we would want the keyboard to close after the new models come so that we can select another model based on our search

@humphd / @kliu57 / @tarasglek

As discussed with dave, will work on trying to refactor the code to store searchQuery in 1 useState() function in a follow up later as trying to fix that now is causing another bugs.

@rjwignar @Rachit1313 @humphd
Hey Roy, I found out the root of the problem for your backspace issue. It is not anything to do with backspace.
The issue is still to do with hovering your mouse over one of the models in the models list, however now we do not lose focus, which is good. However we do lose the previous content we typed.
Steps to reproduce the issue:

Get ready to type a long word for example I will type openchat (open then chat)
Type open
Wait a second or two so the search results load
Hover your mouse over a model
Now type chat
Your search will be wiped and you will only see chat

It does not matter if you backspaced or you typed a new letter, the previous typed content will be wiped.
@humphd not sure if this is something we can fix? But it does look a lot better than before since we do not lose focus. However the user has to restart typing from scratch if they did not manage to finish typing everything before the useDebounce period. Perhaps we should increase the useDebounce from 250 to something more? If I don't finish typing in under 250 I will need to restart typing from scratch.

When the menu closes, reset the search input

I actually really like the behavior of keeping state in there. I put 22B in and was able to just have various mistral finetunes in the list to compare between them.

Let's get this in before we ship 2.0 please.

It's perfect. These changes fix all the issues I previously had


Rancher server crash when deleting a cluster

What kind of request is this (question/bug/enhancement/feature request):
bug
Steps to reproduce (least amount of steps as possible):
Delete an existing GKE cluster
Result:
rancher server will crash
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): master

@thxCode Please validate it

Validated steps:

Create 2 GKE cluster
Destroy one cluster

Result:
Rancher server doesn't crash
@loganhz   cc @fyery-chen


SSL/TLS (X.509 Certificate) not working

Environment

VerneMQ Version:
OS: Ubuntu 16.04
Erlang/OTP version (if building from source):

Expected behavior
I am expecting a connection via TLS would be working after following this doc for SSL.
https://vernemq.com/docs/configuration/listeners.html
listener.ssl.cafile = /etc/ssl/cacerts.pem
listener.ssl.certfile = /etc/ssl/cert.pem
listener.ssl.keyfile = /etc/ssl/key.pem
listener.ssl.default = vernemq_host:8883
Actual behaviour

Failed connect to vernemq_host at port 8883 with SSL/TLS option using mqttfx
Trying to connect using mosquitto client, it gets into halting state
mosquitto_pub -h vernemq_host -p 8883 --capath certs_directory -t testing/tra -m foo

Steps:
Create root CA and a self-signed SSL certificate and verify it OK (by following this https://jamielinux.com/docs/openssl-certificate-authority)
Generate the root
openssl genrsa  -out ca.key 2048
openssl req -new -x509 -days 7300 -key ca.key -sha256 -extensions v3_ca -out ca.crt
Generate the domain key:
openssl genrsa -out domain.key 2048
Generate the certificate signing request
openssl req -sha256 -new -key domain.key -out domain.csr
Sign the request with root key
openssl x509 -sha256 -req -in domain.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out domain.crt -days 7300
Verify signed cert valid:
openssl verify -CAfile ca.crt domain.crt
Notes domain here is mqtt host.
Config VerneMQ with the certs

Drop ca.key in /etc/ssl in as /etc/ssl/cacerts.pem
Drop domain.com.crt  in /etc/ssl as /etc/ssl/cert.pem
Drop domain.key in /etc/ssl/ as  /etc/ssl/key.pem

@tradduong thanks for the report!
file permissions?
and what does something like openssl s_client -connect your_vernemq_host:8883 indicate?

we don't want to do client certificate authentication, you just want to verify the server cert.
To do this with mosquitto_pub or mosquitto_sub I just have to specify a CA cert or a path to a directory of multiple certificates in order to enable ssl/tls for the connection. For ex
mosquitto_sub --cafile cacerts.pem -t "test" -h vernemq_host -p 8883

Apologies for being unclear. My point was that a command like openssl s_client -connect <IP_ADDRESS>:8883 -CApath "/etc/vernemq/ssl" gives a better trail of what's happening and better error messages.
Does your mosquitto_pub command work with the --insecure option btw?

The response I got from openssl s_client -connect <mqtt_host>:8883 -CApath <certs_directory> :
CONNECTED(00000003)

Another thought...if you happen to have any unexpired CAs for testing purpose or set of instructions to create the CAs for testing we can give it a try to narrow down the causes. Thanks again.

We have some test ssl certificates stored in: https://github.com/erlio/vernemq/tree/master/apps/vmq_server/test/ssl
Here's an example for the http listener:
https://github.com/erlio/vernemq/issues/540#issuecomment-349316122

thanks @larshesel . You have many ssl certs in there. And that is for https
Kindly let me know if we should use [test-root-ca.crt, test-signing-ca.crt,test-signing-ca.key] OR [all-ca.crt,server.crt,server.key]
for  listener.ssl configuration i.e [cafile,certfile,keyfile]?

Hi @ioolkos . I am able to connect via TLS using the --cafile option and --insecure flag as below
$ mosquitto_pub -d --cafile cacerts.pem -t "test" -m "hello" -h <mqtt_host> -p 8883 --insecure.
My question is if I have many devices that need to be authenticated into VerneMQ, we have only 1 CA file configuration  (listener.ssl.cafile=cacerts.pem). Does it mean we need to add all CA certs that will be used in clients to connect to in this cacerts.pem file? Correct? If not, please give us what is the approach we should take.

I'm no TLS expert, but I think the clients have to be able to validate the server cert, that's all. That is, they check it's signed by a trusted CA and that it's not expired.
The problems here seem to come mostly from the self-signed certs.

This url maybe help you.
https://www.cnblogs.com/Anker/p/6018032.html


[BUG] Panic with default config

I tried this code:
./vendor/bin/rr get-binary
./rr serve
I expected to see this happen: explanation
Something running / handled error
Instead, this happened: explanation
2021-05-03T19:00:23.259Z        ERROR   container/init.go:74    error calling internal_init     {"vertex id": "static.Plugin", "error": "static_plugin_init:\n\tstatic_plugin_valid: root directory '/path/to/directory' does not exists"}
github.com/spiral/endure/pkg/container.(*Endure).callInitFn
        github.com/spiral/endure@v1.0.1/pkg/container/init.go:74
github.com/spiral/endure/pkg/container.(*Endure).internalInit
        github.com/spiral/endure@v1.0.1/pkg/container/init.go:26
github.com/spiral/endure/pkg/container.(*Endure).Initialize
        github.com/spiral/endure@v1.0.1/pkg/container/endure.go:378
reflect.Value.call
        reflect/value.go:476
reflect.Value.Call
        reflect/value.go:337
github.com/spiral/endure/pkg/fsm.(*FSMImpl).Transition
        github.com/spiral/endure@v1.0.1/pkg/fsm/fsm.go:180
github.com/spiral/endure/pkg/container.(*Endure).Init
        github.com/spiral/endure@v1.0.1/pkg/container/endure.go:293
github.com/spiral/roadrunner-binary/v2/internal/cli/serve.NewCommand.func1
        github.com/spiral/roadrunner-binary/v2/internal/cli/serve/command.go:53
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.1.3/command.go:852
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.1.3/command.go:960
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.1.3/command.go:897
main.run
        github.com/spiral/roadrunner-binary/v2/cmd/rr/main.go:22
main.main
        github.com/spiral/roadrunner-binary/v2/cmd/rr/main.go:16
runtime.main
        runtime/proc.go:225
2021-05-03T19:00:23.259Z        ERROR   container/init.go:31    error occurred during the call INIT function    {"vertex id": "static.Plugin", "error": "endure_call_init_fn: Function call error:\n\tstatic_plugin_init:\n\tstatic_plugin_valid: root directory '/path/to/directory' does not exists"}
github.com/spiral/endure/pkg/container.(*Endure).internalInit
        github.com/spiral/endure@v1.0.1/pkg/container/init.go:31
github.com/spiral/endure/pkg/container.(*Endure).Initialize
        github.com/spiral/endure@v1.0.1/pkg/container/endure.go:378
reflect.Value.call
        reflect/value.go:476
reflect.Value.Call
        reflect/value.go:337
github.com/spiral/endure/pkg/fsm.(*FSMImpl).Transition
        github.com/spiral/endure@v1.0.1/pkg/fsm/fsm.go:180
github.com/spiral/endure/pkg/container.(*Endure).Init
        github.com/spiral/endure@v1.0.1/pkg/container/endure.go:293
github.com/spiral/roadrunner-binary/v2/internal/cli/serve.NewCommand.func1
        github.com/spiral/roadrunner-binary/v2/internal/cli/serve/command.go:53
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.1.3/command.go:852
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.1.3/command.go:960
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.1.3/command.go:897
main.run
        github.com/spiral/roadrunner-binary/v2/cmd/rr/main.go:22
main.main
        github.com/spiral/roadrunner-binary/v2/cmd/rr/main.go:16
runtime.main
        runtime/proc.go:225
2021-05-03T19:00:23.259Z        ERROR   container/endure.go:392 error during the internal_init  {"error": "endure_internal_init: Function call error:\n\tendure_call_init_fn:\n\tstatic_plugin_init:\n\tstatic_plugin_valid: root directory '/path/to/directory' does not exists"}
github.com/spiral/endure/pkg/container.(*Endure).Initialize
        github.com/spiral/endure@v1.0.1/pkg/container/endure.go:392
reflect.Value.call
        reflect/value.go:476
reflect.Value.Call
        reflect/value.go:337
github.com/spiral/endure/pkg/fsm.(*FSMImpl).Transition
        github.com/spiral/endure@v1.0.1/pkg/fsm/fsm.go:180
github.com/spiral/endure/pkg/container.(*Endure).Init
        github.com/spiral/endure@v1.0.1/pkg/container/endure.go:293
github.com/spiral/roadrunner-binary/v2/internal/cli/serve.NewCommand.func1
        github.com/spiral/roadrunner-binary/v2/internal/cli/serve/command.go:53
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.1.3/command.go:852
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.1.3/command.go:960
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.1.3/command.go:897
main.run
        github.com/spiral/roadrunner-binary/v2/cmd/rr/main.go:22
main.main
        github.com/spiral/roadrunner-binary/v2/cmd/rr/main.go:16
runtime.main
        runtime/proc.go:225
handle_serve_command: Init error:
        endure_initialize:
        endure_internal_init: Function call error:
        endure_call_init_fn:
        static_plugin_init:
        static_plugin_valid: root directory '/path/to/directory' does not exists

The version of RR used: explanation
2.1.1
Errortrace, Backtrace or Panictrace
<backtrace>

What default config did you use?

There is no default configuration, only sample configuration, which is supposed to be configured by you. Specify plugins that you need, provide a path to the worker, configure the log level.


implement ingress support

very hacky but functional

/ping @ideahitme

we should split it into two Producers - one for services, one for ingress both implementing the Producer interface - and then implement the Kubernetes producer by calling them and also implementing the Producer interface.

extracted one producer for both services and ingress. then created another producer that aggregates both. LMKWYT @ideahitme

@linki reviewing :)

@linki idea of having pluggable ingress/service producer is nice. Since for now are not really sure if we are going to support ingress DNS record generation, having current implementation is okay. But going further, we could have improved the structure by allowing each producer independent of another (better structure, better error handling through goroutines, CLI flags etc. )

@ideahitme i totally agree.
also, after thinking about it more, i agree with your proposal of being able to configure multiple producers and consumers. it will be backwards compatible (assuming we provide multiple producers with repeated --producer flags), we can still have both individual service/ingress consumers as well as a combined one, and it will be nice programming exercise dealing with more and diverse things running concurrently.

👍


[Jest27] Cannot add a hook after tests have started running. Hooks must be defined synchronously.

I was forced to update my test dependencies and it seems the module console-fail-test cannot work anymore:
    Cannot add a hook after tests have started running. Hooks must be defined synchronously.

      32 |   server.listen()
      33 |   // eslint-disable-next-line @typescript-eslint/no-unsafe-call
    > 34 |   consoleFailTestModule.cft({
         |                         ^
      35 |     testFramework: 'jest',
      36 |     spyLibrary: 'jest',
      37 |     console: allowConsoleRuntimeConfig,

Any clue how we can fix this?

@codecademydev @codecaaron any chance to get some opinion about this one ? This was one of the coolest tool in our test utils.

Hey @kopax-polyconseil sorry for the delay, this slipped through the cracks!
It's hard to diagnose without a working repro and we don't reproduce the issue in our tests. Do you have a project we could take a look at?

Ping @kopax-polyconseil - I still can't reproduce this. Is there some sample code you could send?

Closing as aged away. To anybody reading: if you see this again, please do post back with info and we can re-open!

hello @JoshuaKGoldberg , sorry for the delay, I never got the notification of your reply.
We have a project here https://github.com/pass-culture/pass-culture-app-native/pull/3306 with the issue, but basically, you should be able to reproduce just by configuring jest as we did for cft, in our setupTest.js


Rancher logs have continuous errors [ERROR] error syncing 'rancher-rke2-charts' and Failed to find system chart fleet-crd will try again

Rancher Server Setup

Rancher version: 2.6-head commit id: 68eb5d126
Installation option (Docker install/Helm Chart): docker install

Describe the bug
Rancher logs have continuous errors [ERROR] error syncing 'rancher-rke2-charts' and Failed to find system chart fleet-crd will try again
To Reproduce

Deploy Rancher server.
docker logs shows these errors

Result
Rancher logs:
2022/04/25 01:57:29 [ERROR] error syncing 'rancher-rke2-charts': handler helm-clusterrepo-download: git -C /var/lib/rancher-data/local-catalogs/v2/rancher-rke2-charts/675f1b63a0a83905972dcab2794479ed599a6f41b86cd6193d69472d0fa889c9 reset --hard HEAD error: exit status 128, detail: fatal: Unable to create '/var/lib/rancher-data/local-catalogs/v2/rancher-rke2-charts/675f1b63a0a83905972dcab2794479ed599a6f41b86cd6193d69472d0fa889c9/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
, requeuing
2022/04/25 01:57:32 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:57:37 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:57:42 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:57:47 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:57:52 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:57:52 [ERROR] error syncing 'rancher-charts': handler helm-clusterrepo-download: git -C /var/lib/rancher-data/local-catalogs/v2/rancher-charts/4b40cac650031b74776e87c1a726b0484d0877c3ec137da0872547ff9b73a721 reset --hard HEAD error: exit status 128, detail: fatal: Unable to create '/var/lib/rancher-data/local-catalogs/v2/rancher-charts/4b40cac650031b74776e87c1a726b0484d0877c3ec137da0872547ff9b73a721/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
, requeuing
2022/04/25 01:57:57 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:57:58 [ERROR] error syncing 'rancher-partner-charts': handler helm-clusterrepo-download: git -C /var/lib/rancher-data/local-catalogs/v2/rancher-partner-charts/8f17acdce9bffd6e05a58a3798840e408c4ea71783381ecd2e9af30baad65974 reset --hard HEAD error: exit status 128, detail: fatal: Unable to create '/var/lib/rancher-data/local-catalogs/v2/rancher-partner-charts/8f17acdce9bffd6e05a58a3798840e408c4ea71783381ecd2e9af30baad65974/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
, requeuing
2022/04/25 01:57:59 [ERROR] error syncing 'rancher-rke2-charts': handler helm-clusterrepo-download: git -C /var/lib/rancher-data/local-catalogs/v2/rancher-rke2-charts/675f1b63a0a83905972dcab2794479ed599a6f41b86cd6193d69472d0fa889c9 reset --hard HEAD error: exit status 128, detail: fatal: Unable to create '/var/lib/rancher-data/local-catalogs/v2/rancher-rke2-charts/675f1b63a0a83905972dcab2794479ed599a6f41b86cd6193d69472d0fa889c9/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
, requeuing
2022/04/25 01:58:02 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:05 [ERROR] error syncing 'git-webhook': handler apiservice: failed to create cattle-fleet-system/stv-aggregation /v1, Kind=Secret for apiservice git-webhook: namespaces "cattle-fleet-system" not found, requeuing
2022/04/25 01:58:07 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:12 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:17 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:22 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:27 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:28 [ERROR] error syncing 'rancher-partner-charts': handler helm-clusterrepo-download: git -C /var/lib/rancher-data/local-catalogs/v2/rancher-partner-charts/8f17acdce9bffd6e05a58a3798840e408c4ea71783381ecd2e9af30baad65974 reset --hard HEAD error: exit status 128, detail: fatal: Unable to create '/var/lib/rancher-data/local-catalogs/v2/rancher-partner-charts/8f17acdce9bffd6e05a58a3798840e408c4ea71783381ecd2e9af30baad65974/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
, requeuing
2022/04/25 01:58:29 [ERROR] error syncing 'rancher-rke2-charts': handler helm-clusterrepo-download: git -C /var/lib/rancher-data/local-catalogs/v2/rancher-rke2-charts/675f1b63a0a83905972dcab2794479ed599a6f41b86cd6193d69472d0fa889c9 reset --hard HEAD error: exit status 128, detail: fatal: Unable to create '/var/lib/rancher-data/local-catalogs/v2/rancher-rke2-charts/675f1b63a0a83905972dcab2794479ed599a6f41b86cd6193d69472d0fa889c9/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
, requeuing
2022/04/25 01:58:32 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:37 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:42 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:47 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:52 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:58:57 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:59:02 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:59:07 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:59:12 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:59:17 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:59:22 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:59:27 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:59:32 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found
2022/04/25 01:59:37 [ERROR] Failed to find system chart fleet-crd will try again in 5 seconds: configmaps "" not found

This may be a network issue, however if it keeps happening please escalate it.

As stated by @jakefhyde, this seems to be a temporary network issue. Please keep an eye on it and, if it happens again or more regularly, reach out so we can take a look.

Ticket #37457 - Test Results
With Docker on a single-node instance:
Reproduction failure on rancher v2.6-68eb5d1267679e02eb2383f0ec965b3f896ae3e3-head:

Fresh install of rancher v2.6-head
Reproduction failure - No continuous errors for: [ERROR] error syncing 'rancher-rke2-charts' and Failed to find system chart fleet-crd will try again;

Screenshot:
Final Rancher Logs - [when bringing up rancher server]

Verified on rancher ``:

Fresh install of rancher v2.6-head
Verified - No continuous errors for: [ERROR] error syncing 'rancher-rke2-charts' and Failed to find system chart fleet-crd will try again;

Screenshot:
Final Rancher Logs - [when bringing up rancher server]


Skipped tests reported as passing

Hello, I'm using assume to skip tests dynamically based on what's described in the documentation here: https://scalameta.org/munit/docs/filtering.html#ignore-single-test-case-based-on-a-dynamic-conditions, however the tests that fail the assertion are reported as passing (even though nothing is run). I'm not sure if I've misunderstood the documentation, from reading through some issues it looks like sometimes the final test report includes a "skipped" and sometimes not. I would like it to report as "n tests skipped", or at least ignore them completely but not report them as passing. I use the IntelliJ test API but it also happens when running with sbt.
The test itself is here but if I simply run assume(false) in either test(...) or in beforeEach, it doesn't run the test but reports it as passed.
If I manually use test("description".ignore) then it is reported as skipped, both on IntelliJ and SBT.

Thanks for reporting! I think we should show is as ignored, although I am not sure if that was the initial intention.
You can also ignore a test based on a TAG and that shows up correctly. We have some examples in scalameta/metals repository around here https://github.com/scalameta/metals/blob/main/tests/cross/src/main/scala/tests/BasePCSuite.scala#L159

Thanks for the help! I couldn't quite figure out how to set a tag dynamically, is that possible? If the test gets skipped is something that is determined after the fixture beforeEach is called. So I need to have instantiated the test already, but not called any asserts. It looks like:
class Test extends munit.FunSuite {
  val graph: Fixture[TestGraph] = new Fixture[TestGraph]("Graph") {
    override def beforeEach(context: BeforeEach): Unit = <... initialize graph ... >
  }

  test(testdir) {
     val g = graph()
     // if g.skip contains some property, then I need to skip the test
  }

I'm not quite sure how to get the tags to be set after I've already entered test, which is the same problem I had with using <testname>.ignore. Is there a workaround possible?
Thank you!

Maybe, you could just use test transforms, but not sure if it will be possible to mark anything as ignored there.
The best option for you is probably what you tried before https://scalameta.org/munit/docs/filtering.html#ignore-entire-test-suite but you will lose the information about it being ignored.

Ok, I will do some refactoring, thanks for the help!


Deleting Elements Issue

Hello, thanks for an amazing library! I discovered a bug. These are the steps to reproduce it.

Start with a tableview with 3 cells.
Scroll down so the nav bar disappears.
Delete 2 of the cells.
Scroll up to get the nav bar back.

Step 4 doesn't work. Since the nav bar doesn't disappear when there are a few cells, it won't reappear. Not sure if you've noticed this before.

Closing this issue. Please refer to this https://github.com/andreamazz/AMScrollingNavbar/issues/146


ng init does not create all required files or folders

Please provide us with the following information:

OS?
Linux Ubuntu 16.10
Versions.
angular-cli: 1.0.0-beta.26
Repro steps.
ng init on existing folder structure
The log given by the failure.
no failure ... but ng test does not work
Mention any other details that might be useful.
when running ng init on an existing node project, the new files are created successfully and the project is "converted" into an angular-cli project
however, when running ng test the following errors are shown
 ng test

ENOENT: no such file or directory, lstat '/home/ubuntu/workspace/src/assets'
Error: ENOENT: no such file or directory, lstat '/home/ubuntu/workspace/src/assets'
    at Object.fs.lstatSync (fs.js:901:18)

this is fixed by manually creating an empty "assets" folder
then
> ng test

ENOENT: no such file or directory, lstat '/home/ubuntu/workspace/src/favicon.ico'
Error: ENOENT: no such file or directory, lstat '/home/ubuntu/workspace/src/favicon.ico'
    at Object.fs.lstatSync (fs.js:901:18)

there are obviously some files which are missed out when using ng init instead of ng new

Odd, will investigate. Thanks for the report!

as mentioned here #2813 this, however unexpected, is intentional by design

Closing is as obsolete ng init is no longer available command.


Serenty-js 2.0 == > Step definition files not found while execution

Hello @jan-molak !
Your answer on our previous issue has helped! There is another issue that we are stuck up with.
The protractor.conf.js uses cucumberOptions like this:

cucumberOpts: {
   require: [
     "features/step_definitions/**/*.ts",
     "core/common-util/hooks.ts",
     "core/persona.ts",
     "core/stage.ts",
   ],
   format: 'pretty',               // enable console output
   compiler: 'ts:ts-node/register'   // interpret step definitions as TypeScript
 },

On execution, we learn that it is unable to find the location for step_definition files. The error reads:

[test:acceptance] [16:27:53] E/launcher - Error: Error: ENOENT: no such file or directory, lstat 'C:\gitrepo\WebFX\XXX\features\step_definitions\**'
[test:acceptance]     at Object.realpathSync (fs.js:1454:7)
[test:acceptance]     at Object.expandPathWithExtensions (C:\gitrepo\WebFX\XXX\node_modules\cucumber\lib\cucumber\cli\path_expander.js:14:23)
[test:acceptance]     at C:\gitrepo\WebFX\XXX\node_modules\cucumber\lib\cucumber\cli\path_expander.js:8:27
[test:acceptance]     at Array.map (<anonymous>)
[test:acceptance]     at Object.expandPathsWithExtensions (C:\gitrepo\WebFX\XXX\node_modules\cucumber\lib\cucumber\cli\path_expander.js:7:31)
[test:acceptance]     at Object.expandPaths (C:\gitrepo\WebFX\XXX\node_modules\cucumber\lib\cucumber\cli\support_code_path_expander.js:6:38)
[test:acceptance]     at getSupportCodePaths (C:\gitrepo\WebFX\XXX\node_modules\cucumber\lib\cucumber\cli\configuration.js:73:49)
[test:acceptance]     at Object.getSupportCodeLibrary (C:\gitrepo\WebFX\XXX\node_modules\cucumber\lib\cucumber\cli\configuration.js:125:30)
[test:acceptance]     at Object.getSupportCodeLibrary (C:\gitrepo\WebFX\XXX\node_modules\cucumber\lib\cucumber\runtime.js:44:46)
[test:acceptance]     at Object.start (C:\gitrepo\WebFX\XXX\node_modules\cucumber\lib\cucumber\runtime.js:12:37)
[test:acceptance] [16:27:53] E/launcher - Process exited with error code 100
[test:acceptance] npm ERR! code ELIFECYCLE
[test:acceptance] npm ERR! errno 100
[test:acceptance] npm ERR<EMAIL_ADDRESS>test:acceptance: `protractor ./protractor.conf.js`
[test:acceptance] npm ERR! Exit status 100
[test:acceptance] npm ERR!
[test:acceptance] npm ERR! Failed at the<EMAIL_ADDRESS>test:acceptance script.
[test:acceptance] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Could you please help us with this?
P.S: It is able to find the feature files with *. It works when file path is an absolute path (without /**)
Thanks,
Akshaya

Hey @akshayadesh,
The structure of the cucumberOpts has changed a bit with the newer versions of Cucumber, but I don't think that this is what's causing the issue.
Could you see if you can run the following project on your machine?
https://github.com/serenity-js/serenity-js-cucumber-protractor-template
If that works, then you'd need to figure out the difference between the two. If it doesn't then let me know :-)
Best,
Jan

Hi Jan, While above project works with recursive wildcard /** in Step definition path. It does not give unimplemented steps warning and Step_definitions code snippet to be implemented.
For example I tried adding another scenario
Feature: Super Calculator

  In order to learn how to use Serenity/JS with Cucumber and Protractor
  As a Curious Developer
  I'd like to see an example

  Scenario: An actor interacts with a web page

    The ["Super Calculator"](https://juliemr.github.io/protractor-demo/) was developed by Julie Ralph,
    the author of Protractor, to demonstrate what Protractor is capable of.

    By the way, did you notice that with **Serenity/JS** you can use [Markdown](https://en.wikipedia.org/wiki/Markdown)
    to better describe each `Feature` and `Scenario`?

    Given Callie decides to use the Super Calculator
     When she adds 19 and 23
     Then she should see that the result is 42

  Scenario: I am trying with another scenario

    Serenity-js Screenplay - A Step forward towards Meaningful actor centric automation

    Given I am using cucumber 5.1.0
    When I run the unimplemented feature
    Then I should get Unimplemeted exception with a helper code snippet.

Console Log:
[clean] > rimraf target
[clean]
[failsafe] Script 'clean' exited with code 0
[test:execute]
[test:execute] ><EMAIL_ADDRESS>test:execute C:\Users\patilraj\Desktop\koki\temp\serenity-js-cucumber-protractor-template
[test:execute] > protractor ./protractor.conf.js
[test:execute]
[test:execute] [13:06:37] I/launcher - Running 1 instances of WebDriver
[test:execute] [13:06:37] I/direct - Using ChromeDriver directly...

DevTools listening on ws://<IP_ADDRESS>:7814/devtools/browser/7c901dc6-1198-4002-8785-ce0c07d529c8
[test:execute] [13:06:47] I/launcher - 0 instance(s) of WebDriver still running
[test:execute] [13:06:47] I/launcher - chrome #01 failed 1 test(s)
[test:execute] [13:06:47] I/launcher - overall: 1 failed spec(s)
[test:execute] [13:06:47] E/launcher - Process exited with error code 1
[test:execute] npm ERR! code ELIFECYCLE
[test:execute] npm ERR! errno 1
[test:execute] npm ERR<EMAIL_ADDRESS>test:execute: `protractor ./protractor.conf.js`
[test:execute] npm ERR! Exit status 1
[test:execute] npm ERR!
[test:execute] npm ERR! Failed at the<EMAIL_ADDRESS>test:execute script.
[test:execute] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[test:execute]
[test:execute] npm ERR!      C:\Users\patilraj\AppData\Roaming\npm-cache\_logs\2019-10-09T07_36_47_792Z-debug.log
[failsafe] Script 'test:execute' exited with code 1
[test:report]
[test:report] ><EMAIL_ADDRESS>test:report C:\Users\patilraj\Desktop\koki\temp\serenity-js-cucumber-protractor-template
[test:report] > serenity-bdd run --features ./features
[test:report]
[test:report] Spawning: C:/Program Files/Java/jdk1.8.0_221/bin/java.exe -DLOG_LEVEL=warn<EMAIL_ADDRESS>-jar<EMAIL_ADDRESS>--features ./features --destination target/site/serenity --source target/site/serenity --project serenity-js-cucumber-protractor-template
[test:report] -------------------------------
[test:report] SERENITY COMMAND LINE INTERFACE
[test:report] -------------------------------
[test:report] Loading test outcomes from target\site\serenity
[test:report] Writing aggregated report to target\site\serenity
[test:report]
[test:report] Report generation done
[failsafe] Script 'test:report' exited with code 0
npm ERR! Test failed.  See above for more details.

Though Report shows Steps as Pending , It does not provide us with any warning regarding unimplemented steps on Console and does not show any Code Snippet to implemented as normally cucumber shows.

Adding new ConsoleReporter() printed the unimplemented error:
☕Then I should get Unimplemeted exception with a helper code snippet.
[test:execute]         ImplementationPendingError: Step not implemented

 serenity: {
        runner: 'cucumber',
        crew: [
            ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
            Photographer.whoWill(TakePhotosOfInteractions),     // or Photographer.whoWill(TakePhotosOfFailures),
            new SerenityBDDReporter(),
            new ConsoleReporter()
        ]
    }

But still the I am not able to print helper code snippet that will be of huge help for any developer in implement step definitions.

Hey @rajeshwarp!
So, a lot has changed in Cucumber since version 1...
TL/DR
In protractor.conf.js add:
    cucumberOpts: {
        require: [ 'features/**/*.ts', ],
        'format': [ 'snippets:snippets.txt' ],
    },

Long answer
Cucumber now ships with several built-in formatters. For example, the snippets formatter prints the code snippets for the pending steps, so that's what you're after.
However, the below config won't work:
    cucumberOpts: {
        require: [ 'features/**/*.ts', ],
        'format': [ 'snippets' ],
    },

That's because Cucumber can support only one formatter printing to a given output (where "output" is either the "standard output", a.k.a. the terminal, or a file), and both Serenity/JS and snippets want to print to the same standard output and Serenity/JS wins because it's registered last.
A quick workaround for this problem would be to print the snippets output to a file ( snippets:some-file-name.txt), which means that if there were pending steps, a developer would need to check the file to copy the snippets. Not ideal, but better than not having them.
Having said that, I think that ideally it should be the ConsoleReporter that takes care of both reporting the progress and suggesting any code snippets.

Thanks @jan-molak for the workaround ! It works :)

Cool, I'm glad it helped! And thanks for mentioning this issue, by the way. I'm planning to implement something similar to cucumber's code snippets suggestions in #358