Small errors in preprocessing script for GLUE data

Hi,
I try to fine-tune the roberta model on the GLUE data as explained in the example directory. While preprocessing the data with the preprocess_GLUE_tasks.sh script I stumbled upon some small bugs:

gpt2_bpe_utils.py uses the package regex, which is not mentioned anywere. It needs to be installed with pip install regex as the ImportError prints. You could mention that in the tutorial.
The script calls the fairseq preprocess.py script directly. As the preprocess_GLUE_tasks.sh is located in the example directory this fails. Easy fix is using the command-line interface: fairseq-preprocess at this line: https://github.com/pytorch/fairseq/blob/d82517e9553ab690b8a264f7ca5be46a41eee700/examples/roberta/preprocess_GLUE_tasks.sh#L162

Thanks!


[#3386] fix(web): fix font family of the gravitino title

What changes were proposed in this pull request?
Fix font family of the Gravitino title.
Before:

After:

Why are the changes needed?
Fix: #3386
Does this PR introduce any user-facing change?
Change to the true font family.
How was this patch tested?
N/A

LGTM

@ch3yne please fix the conflicts

@ch3yne please fix the conflicts

Done.


Cut/Paste is fine, but trying to move location by too many lines with the ALT combo locks up the application and it must be shutdown via the Task Manager.

@BitwiseGuy
I could not reproduce. Perhaps this happens in a certain file and when moving certain lines?

This appears to be related to an extension. I opened VS Code with extensions disabled and there was no problem. Now to narrow it down to which extension.
Thank you for the reply.


feature  iceberg write  support insert overwrite and optimize hive write transaction statistics and

iceberg support insert overwrite

Iceberg transaction adds insert overwrite feature
2.Iceberg transaction merge the commit functions of table and partition
3.Use class SimpleTableInfo to replace the internal class DatabaseTableName of HmsTransaction
4.Unified the file statistics of hive and iceberg write

run buildall

run buildall

run buildall

run buildall

run buildall

run buildall


gcc version

It looks like we actually do use gcc 9 in the CI, so it should actually work with that older compiler as well.
What was the exact situation in which something didn't work well ? Could it have been a mix in compilers ?

https://github.com/antmicro/yosys-systemverilog/issues/1041#issuecomment-1234965084


Setting does not save value

This is my code to save setting
setting(['access_token',$user->access_token])
here $user->access_token is not null and i've checked that.
But setting is not being saved into my database.
What is issue here?
settings.php
'driver'           => 'database',

use \Setting::save(); after \Setting::set()

For me also not working..
setting()->set('default.currency', 'EUR');
setting()->save();
And the database is empty.
config/app.php
 'providers' => [ ...
Akaunting\Setting\Provider::class,
php artisan migrate - done
Laravel 5.4
PHP 7.2

so in my case:
file: Akaunting\Setting\Contracts\Driver
function public function set($key, $value = null)
on line 76 - if (!$this->checkExtraColumns()) { return; } hapen "return" 😁
It is because I use required_extra_columns in config/setting.php:98
That means, before setting any value, I must setExtraColumns, for example:
setting()->setExtraColumns([ 'user_id' => 1, 'connection_id' => 123 ]
setting()->set('default.currrency', 'EUR');
and it works, date is on DB :) Hope for some one will be helpful 😁
@BaiMaoLi

Yes, if you should set the required columns first, that's the purpose of that field in config.


Resolve Issue #6

Resolved [Issue #6]: (https://github.com/adbertram/SoftwareInstallManager/issues/6)
Modifies line 101 to insert -ErrorAction Ignore between Get-ChildItem HKU: and | Where-Object

Thanks. I changed it to SilentlyContinue for anyone not using PSv4+ yet.


Issues with VR?

Hi,
For internal scientific research (so no direct issues with licenses) I want to use your runtime option of the recorder. In a default project it works fine, but using VR (legacy XR because of using OpenVR with HTC Vive Pro) in 2019.4.1 with HDRP 7.4.1 the camera stops reacting to the headset. So there is an image, no errors, just the tracking stops. There is also no video saved in the project's root folder.
Is this recording solution compatible with the legacy XR in Unity? If so, are there any special settings?
Cheers!
Marco

I don't have any experience on VR, so I'm not sure what's happening in it, but I think you can't grab the main camera (headset) without interrupting VR things. It might be better to add a second camera and capture it, I'm not sure how it can be done with VR though.

I think you can create a new GameObject with a Camera attached and put it under the main Camera.


Monitor Users Login Sessions - dashboard gadget does not display any data

Steps to re-create

Log in to the dashboard with super admin credentials.
Click on 'Monitor Users Login Sessions'.

Expected: Login information to be displayed for each user.
Actual: No data is displayed.
Type/Bug
Affected/5.5.0-Alpha
Severity/Major
Priority/High

Need to configure analytics to work with this feature https://docs.wso2.com/display/IS550/Terminating+User+Sessions


Made CharSeq.toJavaArray() GWT compatible again

Related to #1895

Codecov Report

Merging #1898 into master will not change coverage.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master    #1898   +/-   ##
=========================================
  Coverage     98.07%   98.07%
  Complexity     5052     5052
=========================================
  Files            88       88
  Lines         11402    11402
  Branches       1503     1503
=========================================
  Hits          11183    11183
  Misses          113      113
  Partials        106      106

Impacted Files
Coverage Δ
Complexity Δ

...ng/src/main/java/javaslang/collection/CharSeq.java
100% <100%> (ø)
344 <1> (ø)
:x:

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 8043332...c70dcbd. Read the comment docs.

@ruslansennov I will merge to see if the triggered build runs ok. (it should)

GWT is OK, but jackson fails :)
will fix it this evening

Cool, thx!


google cloudrun updated their limits on maxscale based on memory and cpu count

if you don't set an explicit limit on container scaling, then google defaults to 100
google recently updated the limits on container scaling, such that if you set up datasette to use more memory or cpu, then you need to set the maxScale argument much smaller than 100.
would be nice if datasette publish could do this math for you and set the right maxScale.
Log of an failing publish run.
ERROR: (gcloud.run.deploy) spec.template.spec.containers[0].resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 15.
Consider running your workload in a region with greater capacity, decreasing your requested cpu-per-instance, or requesting an increase in quota for this region if you are seeing sustained usage near this limit, see https://cloud.google.com/run/quotas. Your project may gain access to further scaling by adding billing information to your account.
Traceback (most recent call last):
  File "/home/runner/.local/bin/datasette", line 8, in <module>
    sys.exit(cli())
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/runner/.local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/runner/.local/lib/python3.8/site-packages/datasette/publish/cloudrun.py", line 160, in cloudrun
    check_call(
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'gcloud run deploy --allow-unauthenticated --platform=managed --image gcr.io/labordata/datasette warehouse --memory 8Gi --cpu 2' returned non-zero exit status 1.

maybe a simpler solution is to set the maxscale to like 2? since datasette is not set up to make use of container scaling anyway?

I'm going to default maxscale to 2 but provide an extra command line option for datasette publish cloudrun which lets people set it to something higher if they want to.

Actually I disagree that Datasette isn't setup to make use of container scaling: part of the idea behind the Baked Data pattern is that you can scale to handle effectively unlimited traffic by running multiple copies of your application, each with their own duplicate copy of the database.
So I'm going to default maxScale to 10 and still let people customize it.

Here's the relevant part of the datasette publish command from that failed Actions workflow:
  datasette publish cloudrun f7.db nlrb.db opdr.db old_nlrb.db voluntary_recognitions.db work_stoppages.db lm20.db chips.db \
    --memory 8Gi \
    --cpu 2

Tried duplicating this error locally but the following command succeeded when I expected it to fail:
datasette publish cloudrun fixtures.db --memory 8Gi --cpu 2 --service issue-1779

Maybe I need to upgrade:
% gcloud --version
Google Cloud SDK 378.0.0
alpha 2022.03.18
bq 2.0.74
core 2022.03.18
gsutil 5.8
Updates are available for some Google Cloud CLI components.  To install them,
please run:
  $ gcloud components update

% gcloud components update
Beginning update. This process may take several minutes.

  For the latest full release notes,
please visit:
  https://cloud.google.com/sdk/release_notes

% gcloud --version
Google Cloud SDK 397.0.0
alpha 2022.08.05
bq 2.0.75
core 2022.08.05
gsutil 5.11

datasette publish cloudrun fixtures.db --memory 8Gi --cpu 2 --service issue-1779 still works.

Just spotted this in the failing Actions workflow:
gcloud config set run/region us-central1

I tried that locally too but the deploy still succeeds.

Just tried this instead, and it still worked and deployed OK:
datasette publish cloudrun fixtures.db --memory 16Gi --cpu 4 --service issue-1779

@fgregg I'm not able to replicate your deployment failure I'm afraid.

(I deleted my issue-1779 project using the UI at https://console.cloud.google.com/run?project=datasette-222320)

Here's the start of the man page for gcloud run deploy:
NAME
    gcloud run deploy - deploy a container to Cloud Run

SYNOPSIS
    gcloud run deploy [[SERVICE] --namespace=NAMESPACE] [--args=[ARG,...]]
        [--async] [--command=[COMMAND,...]] [--concurrency=CONCURRENCY]
        [--cpu=CPU] [--ingress=INGRESS; default="all"]
        [--max-instances=MAX_INSTANCES] [--memory=MEMORY]
        [--min-instances=MIN_INSTANCES]

I'm going to expose --max-instances and --min-instances as extra option to datasette publish cloudrun.

Tested that with:
datasette publish cloudrun fixtures.db --service issue-1779 --min-instances 2 --max-instances 4

thanks @simonw!


Y24-035 Targeted NanoSeq - update configuration for pipeline and add submission for ISC prep

User story
As PSD we would like to fix the targeted nanoseq pipeline configuration to better reflect the reality of what the lab users are doing, and allow them to loop back to the LTN AL Lib and process different subsets of samples as many times as they like.
Who are the primary contacts for this story
Sara W and team
Andrew S
Who is the nominated tester for UAT
Sara W team
Acceptance criteria
To be considered successful the solution must allow:

[x] update config for Targeted NanoSeq to better reflect reality

only re-ISC end route is required, remove other duplex seq route
shearing may or may not be done at the beginning, leave the two routes for that part

[x] allow the submission for re-ISC to be done on the LTN Lib PCR XP plate rather than require a cherrypick into an LB Lib PCR-XP plate - this is likely to require the plate to be added to the acceptable plate purposes for the re-ISC submission template (SS config change and rails console fix in databases), plus add the relationship for transfer from LTN Lib PCR XP plate into LB Lib PrePool plate
[x] add an automated close off of the library prep requests at creation of the LTN Al Lib plate (use :state_changer_class: StateChangers::AutomaticPlateStateChanger and   :work_completion_request_type lines in the purpose config) - [Edit: maybe Ok to use Charge and Pass as currently. But we MUST close these before continuing.]
[x] add an automated submission at creation of AL Lib Dil for a customer request 'name TBC' [Edit: see comments below - have decided manual is the way to go, given the submission the name: Targeted NanoSeq ISC Prep, but TBC]
[x] automatically close the new customer request at creation of the LTN Lib PCR XP plate
[x]  improve code that identifies correct request to use when inserting poly-metadata on creating the LTN Al Lib Dil plate, as it currently only looks in aliquot.request, needs to look in the receptacles.requests_as_source for the newly created active requests [CORRECTION: no change required as it looks in aliquot.request on the CHILD well, which is right]
[x] update the integration suite test for this pipeline to match what the users are doing (subsets of samples and a loop back)

Dependencies
None
References
This story has a non-blocking relationship with:

#1628

Additional context
Currently the centre part of this pipeline where they loop back to the LTN AL Lib plate is not tracked with a submission.
Plus all samples are tracked as moving from LTN Al Lib plate through to LTN Lib PCR XP despite only a subset physically being transferred through.
Plus they are editing the Hamilton driver file to remove the unneeded samples manually.

Options for manual vs automatic submissions:
1. Create a manual submission on the AL Lib for the samples.
Then check at Customer upload for Dil creation that all wells with requests are present in file. i.e. changes to file upload validations:
a. requests for library prep must be closed off on the plate (user must have charged and passed the library creation requests)
b. must be an active submission on the Al Lib plate with the correct request type BEFORE file can be uploaded
c. file must contain values for all wells with active requests of the expected type on the plate
Then create the Dil plate, transferring only those wells with requests (partial transfer). [change to well filter on Dil labware creator]
2. Create auto submission on upload of the customer file based on which wells have values. Wait for requests to be created by SS, then create the Dil plate.
Is this a viable option?
Does Heron do this?
Not exactly. Heron uses SubmissionPlatePresenter which displays submission options to choose on source plate.
This is not the same, as we need a partial submission based on the file upload contents. i.e. in the labware creator rather than the Presenter.
If we do it at file upload, we will need to do extra validations:
a. Are there already open requests on the plate? Must be completed or failed or cancelled.
b. ?
If we do it at the labware creator, we will need to filter the wells AFTER the submission is created to make the transfers. i.e. steps are:
a. validate the file uploaded
b. create the submission based on wells with values in the file
c. wait for the submission to be made [THIS MAY TAKE SOME TIME- what if we timeout??]
d. create the empty child Dil plate
e. filter the wells by request to create the transfers for the Dil plate

For deployment:
Need to check that the LTN plate purpose is added to the reISC request type by the deployment (record loader has update for this so may be fine). Add if not set up.
In rails console: check and add the LTN purpose to Reisc
rt = RequestType.find_by(name: 'Limber REISC')
rt.acceptable_purposes
pp = PlatePurpose.find_by(name: 'LTN Lib PCR XP')
rt.acceptable_purposes << pp

Waiting on lab team for UAT

Meeting for Monday 17th June to discuss UAT testing

UAT testing is completed, no additional concerns. Happy to deploy to live.
Now just waiting on users to agree a date (as this is a change to an existing pipeline).

To be deployed to live on Thursday 25th July at 1pm.


Update ring_attention.py to fix typo in import

ring_flash_attn_cuda was mistyped as ring_flash_attention_cuda in the import

ah nice find, yea i ran out of time before testing the ring cuda integration with attention
want to bump the patch version and i'll release it?

Actually, do you want me to get the code using 8 A100's with the NCCL backend running before bumping the version? I can batch the PR's however you'd like. I haven't been able to get it running yet, and found a few other things, for example:
Another change I had to make was to replace the isend/irecv requests in send_and_receive_ with batched ones:
def send_and_receive_(x, receive_buffer, send_to_rank, receive_from_rank):
    _ops = []
    send_op = dist.P2POp(dist.isend, x, send_to_rank)
    recv_op = dist.P2POp(dist.irecv, receive_buffer, receive_from_rank)
    _ops.append(send_op)
    _ops.append(recv_op)

    reqs = dist.batch_isend_irecv(_ops)

    for req in reqs:
        req.wait()
    dist.barrier()

Otherwise, the code would hang on the dist.isend request. Not sure if this is specific to my machine setup, but it does seem most codebases seem to prefer the dist.batch_isend_irecv, so maybe it's less buggy.

@Damjan-Kalajdzievski sure! i didn't use the batched version as for the autoregressive case i just concatted the key / values and sent them in one go, but if somehow it is more mature, let's go with that

@lucidrains Sorry for the delay, but I got stuck after running into some hard to debug issues. I have changed this PR to a draft which hopefully progresses to tackling these issues, which I describe in the edited first comment.

@Damjan-Kalajdzievski yea hard for me to debug this and I'm out of time. however, for the striped case, try adding under this line https://github.com/lucidrains/ring-attention-pytorch/blob/main/ring_attention_pytorch/ring_flash_attention_cuda.py#L666 the exact same line but with q substituted with o

@Damjan-Kalajdzievski thanks for the time you've put into this
could you try 0.2.8 and see how that fares for both striped and unstriped?

Cool, did not see those changes. For striped I get the same error during the ring attention backward in flash_attn_cuda.bwd
dq, dk, dv, softmax_d, = flash_attn_cuda.bwd(
RuntimeError: dout must have shape (batch_size, seqlen_q, num_heads, head_size_og))

and for non striped I get through the computation, but the allclose assert check fails for the output
assert torch.allclose(ring_out, flash_out, atol=1e-6), "output is not the same"

When I examine how close the two tensors are, I get
a = ring_out - flash_out
a.max()
> tensor(0.6748, grad_fn=<MaxBackward1>)
a.mean()
> tensor(0.0011, grad_fn=<MeanBackward0>)

@Damjan-Kalajdzievski ok, try yet again for striped?

Great, that brought striped attention in line with what is happening for non-striped (ie the alclose of the forwards pass fails with about the same magnitute, but the gradients closeness check passes). It is merged in. Yes I should be able to debug the forwards pass, I will get to that after some other things I have to prioritize as well. Thanks!

Thank you Damian 🙏

@Damjan-Kalajdzievski hey Damjan, thanks for the PR once again
finally found some off time to test this out myself, and I believe the non-striped causal version is working fine. it is the striped version that is broken, and i will probably get to the bottom of that by end of week. could you verify this on your end?

going to close this PR, as the main branch now contains most of the fixes

@Damjan-Kalajdzievski found the offending issue with stripe ring attention. turns out at the moment it only works for 1 bucket per machine
added an assert for now, but will plan on supporting multiple buckets

@Damjan-Kalajdzievski all tests should pass now, please open an issue if it doesn't

@Damjan-Kalajdzievski decided to just power through this before my next wave of interviews. should all work now

@Damjan-Kalajdzievski nice, good to hear! yes understandable.. no worries


Assigning Some instead of calling replace triggers Miri under some unsafe conditions

This is hopefully a small enough repro snippet:
#[test]
fn family() {
    struct Parent {
        value: u8,
        child: Option<Box<Self>>,
    }

    impl Parent {
        fn declare_child(&mut self, value: u8) {
            self.child.replace(Box::new(Self { value, child: None }));
        }

        fn declare_child_too(&mut self, value: u8) {
            self.child = Some(Box::new(Self { value, child: None }));
        }
    }

    // create the first ancestor
    let mut progenitor = Parent {
        value: 0,
        child: None,
    };

    // we record the lineage as a stack of raw pointers to each generation
    // we cannot have &mut as there would be aliasing/memory overlap
    // (e.g. both `x` and its child `y` could write into `x.child.value` <-> `y.value`)
    let mut past_parents = vec![];
    // to make this safe to use, we keep around one exclusive &mut reference
    // through which we perform all read and writes
    let mut parent_today = &mut progenitor;

    for i in 1..4 {
        // today's parent is becoming tomorrow's grandparent, so:
        // record it in the lineage (as a pointer)
        past_parents.push(parent_today as *mut Parent);
        // generate the new child
        parent_today.child = Some(Box::new(Parent { value: i, child: None }));
        // and make that the new parent for tomorrow
        parent_today = parent_today.child.as_mut().unwrap();
    }

    // now we can use the stack to navigate up the lineage
    while let Some(ptr) = past_parents.pop() {
        // SAFETY:
        // - ptr is valid (obtained directly from a valid &mut)
        // - aliasing is respected (there are no other references to the data, just this one &mut)
        parent_today = unsafe { ptr.as_mut().unwrap() };
    }

    // we should have reached the ancestor
    assert_eq!(parent_today.value, 0);
}

I am experimenting with unsafe, so apologies if the code/comments above are wrong or misleading.
Running cargo miri test, possible UB is detected because
help: <192863> was created by a SharedReadWrite retag at offsets [0x0..0x10]
   past_parents.push(parent_today as *mut Parent);
                     ^^^^^^^^^^^^
help: <192863> was later invalidated at offsets [0x0..0x8] by a write access
   parent_today.child = Some(Box::new(Parent { val...
   ^^^^^^^^^^^^^^^^^^

I am not really sure I understand the problem here. If I rewrite that assignment as parent_today.child.replace(Box::new(Self { value, child: None })); then Miri is happy and reports no issue. Could I get some insight on this?
If I declare helper methods

impl Parent {
    fn declare_child(&mut self, value: u8) {
        self.child.replace(Box::new(Self { value, child: None }));
    }

    fn declare_child_too(&mut self, value: u8) {
        self.child = Some(Box::new(Self { value, child: None }));
    }
}

which just wrap the two different behaviours of the previous point, then Miri reports no issue when using either (in place of the incriminated assignment). In particular, I would expect declare_child_too to trigger the same error reported originally.

If I rewrite that assignment as parent_today.child.replace(Box::new(Self { value, child: None })); then Miri is happy and reports no issue. Could I get some insight on this?

By writing it that way, you are creating a two-phase borrows (that's how Rust handles implicit mutable references for function calls). Sadly two-phase borrows are incompatible with Stacked Borrows so Miri treats them like raw pointers, which in this case then happens to allow the code.
That is a Stacked Borrows/Miri limitation, and we are actively working on a better aliasing model that can properly track two-phase borrows. If you write (&mut parent_today.child).replace, you should see the error come back, since that explicit &mut will be a regular (not-2-phase) borrow.
That also explains why these wrapping functions help -- they, too, will be called using two-phase borrows.

The problem with this code is that you are doing parent_today as *mut Parent, which creates a raw pointer that may be used until the next time parent_today is used again, and then you immediately use parent_today again, which invalidates the raw pointer. For code with rampant aliasing like this, you need to make sure to use raw pointers throughout. parent_today should be a raw pointer, not a reference.

aliasing is respected (there are no other references to the data, just this one &mut)

This seems to indicate a fundamental misunderstanding: for aliasing to be respected, there must be no other pointers to this data that are being used. An &mut and *mut that alias will lead to UB when both are being used. The uniqueness guarantees of &mut would be worth absolutely nothing if we would allow aliasing raw pointers.

Thanks for your answer, that was extremely helpful!
What should I do about this issue? Is there an already open tracking issue for two-phase borrows I can link to, so I can close this? Or feel free to just close as answered.

I don't know that there is one tracking issue, but you can start from here and follow links: https://github.com/rust-lang/rust/pull/96268 (your opening this issue is basically the problem I was concerned about)
This is a classic problem with sanitizers: When you expect them to complain but they don't, it's nearly impossible to figure out why. We do have some special functions (they are documented in the README) which you can use to print out borrow stacks at runtime. Though I wonder if miri_print_borrow_stacks will be all that enlightening because when the program is UB, the problematic tag is 189400. Perhaps a Miri debugger could do better, but that doesn't on its own solve the data volume issue.

The tracking issue is at https://github.com/rust-lang/unsafe-code-guidelines/issues/85. It's a model issue, not a Miri implementation issue, which is why it is in another repo.


Propagate VERBOSE to the inner make script

Please retest

No idea why sim stack is failing here. (cc: @ferdonline )

Retest this please


v1.0.17 - double left hand menus

Per the above screenshot, a double left hand menu displays if you follow these steps:

Click Music Assistant in left menu
Click on Album,Artists or Tracks
Click the back arrow next to Album,Artists or Tracks

Click arrow next to Music Assistant

Double menu is displayed

see this one: #73

#73 is a different problem?

Nope it is a side effect of the current workaround.

Refer #73


Recolor causes crash on pre Lollipop

Tested the sample app on 4.1.1 and pressing the "TAP ON ME" button in the "Recolor transition" sample causes a StackOverflowError:
com.andkulikov.transitionseverywhere E/AndroidRuntime: FATAL EXCEPTION: main
  java.lang.StackOverflowError
      at java.lang.Integer.<init>(Integer.java:88)
      at java.lang.Integer.valueOf(Integer.java:707)
      at android.util.IntProperty.set(IntProperty.java:45)
      at android.util.IntProperty.set(IntProperty.java:45)
      at android.util.IntProperty.set(IntProperty.java:45)
      at android.util.IntProperty.set(IntProperty.java:45)
      ...

On Android 5.0.0 the same sample works as expected.
Replacing COLORDRAWABLE_COLOR  with "color" at Recolor.java#L124 fixes the issue:
    return ObjectAnimator.ofObject(endColor, "color",
            new ArgbEvaluator(), startColor.getColor(), finalColor);

Hm. Yeah. its because of a bug fixed only in 4.2.2.
https://android.googlesource.com/platform/frameworks/base/+/c5d43f76fd7c3ccb91f1b75618a9c9e8f202505b
I didn't know about it

Eek, I had no idea either. I just took to easiest (admittedly also quite lazy) approach to preventing the Stackoverflow with the caveat that providing ObjectAnimator#ofObject with the "color" parameter means it will use Reflection to call the setColor method.
Alternatively a ValueAnimator could be used to remove the use of Reflection?

Basically we can use just Property, not IntProperty. There is will be no reflection, but autoboxing for Integer->int.
But I want to use IntProperty starting for 4.2 in that case. I need to think about it more.

fixed in 1.6.8. thank you!


MINOR: Double Quote CLASSPATH to prevent shell glob expansion.

In the event that the CLASSPATH does not have an ending ":", the shell
can expand the CLASSPATH globs to be space-separated list of paths/jars,
which is not how the JVM CLI accepts arguments to -cp switch. So
double quote the variable to prevent pattern expansion, and pass the
glob pattern directly to the JVM.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Thanks for the PR. Can you include a description of how this was validated?

As I'm sure @ijuma is aware, this is occurring on Confluent's proprietary fork, so I'll attempt to highlight the problem, and the fix, and provide a further justification on the fix without reproducing directly on AK-Kafka.
First I added an echo before the exec to highlight what the issue is:
[centos@ip-172-31-11-17 ~]$ tail -14 /bin/kafka-run-class
CLASSPATH=${CLASSPATH#:}
echo "CP = $CLASSPATH"

# If Cygwin is detected, classpath is converted to Windows format.
(( CYGWIN )) && CLASSPATH=$(cygpath --path --mixed "${CLASSPATH}")

# Launch mode
if [ "x$DAEMON_MODE" = "xtrue" ]; then
  nohup $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@" > "$CONSOLE_OUTPUT_FILE" 2>&1 < /dev/null &
else
  echo $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@"
  exec $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@"
fi

Now we run it:
[centos@ip-172-31-11-17 ~]$ sudo /bin/zookeeper-server-start /etc/kafka/zookeeper.properties
CP = /bin/../share/java/kafka/*
java -Xmx512M -Xms512M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -XX:MaxInlineLevel=15 -Djava.awt.headless=true -Xloggc:/var/log/kafka/zookeeper-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dkafka.logs.dir=/var/log/kafka -Dlog4j.configuration=file:/etc/kafka/log4j.properties -cp /bin/../share/java/kafka/activation-1.1.1.jar /bin/../share/java/kafka/aopalliance-repackaged-2.5.0.jar [... more jars ...] org.apache.zookeeper.server.quorum.QuorumPeerMain /etc/kafka/zookeeper.properties
Error: Could not find or load main class .bin....share.java.kafka.aopalliance-repackaged-2.5.0.jar

It comes down to the fact that CLASSPATH="/bin/../share/java/kafka/*" with no other : appended on it. This can vary across all deployments this code, so there could be anything in this script that appends more class paths to this variable based on the existence of other things, take this for example:
for file in "$clients_lib_dir"/kafka-clients*.jar;
do
  if should_include_file "$file"; then
    CLASSPATH="$CLASSPATH":"$file"
  fi
done

Any of these blocks may be appending class paths. The main point is, in Confluent's current master deployment is no longer appending paths, and just contains CLASSPATH="/bin/../share/java/kafka/*" - Why is this a problem? Because the shell (bash) expands this glob to path locations. If there was something else appended (like CLASSPATH="/bin/../share/java/kafka/*:/path/to/other.jar") that prevents shell glob expansion, because nothing can match a file path with : in it.
I now make the change by quoting $CLASSPATH:
[centos@ip-172-31-11-17 ~]$ tail -14 /bin/kafka-run-class
CLASSPATH=${CLASSPATH#:}
echo "CP = $CLASSPATH"

# If Cygwin is detected, classpath is converted to Windows format.
(( CYGWIN )) && CLASSPATH=$(cygpath --path --mixed "${CLASSPATH}")

# Launch mode
if [ "x$DAEMON_MODE" = "xtrue" ]; then
  nohup $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp "$CLASSPATH" $KAFKA_OPTS "$@" > "$CONSOLE_OUTPUT_FILE" 2>&1 < /dev/null &
else
  echo $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp "$CLASSPATH" $KAFKA_OPTS "$@"
  exec $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp "$CLASSPATH" $KAFKA_OPTS "$@"
fi

Class path is now no longer expanded (-cp /bin/../share/java/kafka/*)
[centos@ip-172-31-11-17 ~]$ sudo /bin/zookeeper-server-start /etc/kafka/zookeeper.properties
CP = /bin/../share/java/kafka/*
java -Xmx512M -Xms512M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -XX:MaxInlineLevel=15 -Djava.awt.headless=true -Xloggc:/var/log/kafka/zookeeper-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dkafka.logs.dir=/var/log/kafka -Dlog4j.configuration=file:/etc/kafka/log4j.properties -cp /bin/../share/java/kafka/* org.apache.zookeeper.server.quorum.QuorumPeerMain /etc/kafka/zookeeper.properties
[2020-02-28 19:15:29,952] INFO Reading configuration from: /etc/kafka/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-02-28 19:15:29,961] INFO clientPortAddress is <IP_ADDRESS>:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-02-28 19:15:29,961] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-02-28 19:15:29,963] INFO autopurge.snapRetainCount set to 3 (org.apache.zookeeper.server.DatadirCleanupManager)
...
[2020-02-28 19:15:29,994] INFO Server environment:java.class.path=/bin/../share/java/kafka/jersey-client-2.28.jar:/bin/../share/java/kafka/confluent-metrics-6.0.0-ce-SNAPSHOT.jar

The JVM does the glob expansion itself from -cp /bin/../share/java/kafka/* - you can see that in the log line above.
Further justification: This is a common shell scripting bug folks run into, and hence why the shellcheck tool has an entire lint/page about this very thing:
https://github.com/koalaman/shellcheck/wiki/SC2086

Verified that kafka-server-start and zookeeper-server-start still work with this change, merged to trunk.


Reorder instances of the same program in taskbar

Description of the new feature / enhancement
Usually, I have (at least) two separate instances of the same program and they are sorted on the taskbar by order they were opened (I think). It would be nice to be able to sort them on the taskbar.
Scenario when this would be used?
The scenario is where for example I have two instances of IntelliJ opened and accidentally I opened the fronted project before the backend project. The result of that is in the following picture (frontend project then backend project):

It would be nice to be able to reorder them like so (backend project and then frontend project):

Supporting information
I used 7+ Taskbar Tweaker, a 3rd party program to reorder taskbar instances in order to take print screens.

/feedbackhub


Invalid parameter on Openldap_database for all options new since 1.6.5

I recently upgraded the openldap module from 1.6.5 to 1.14.0 to take advantage of the replication configuration options that were added.  But when I tried to update the node, I got an error similar to the following:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter synctype on Openldap_database[dc=my-domain,dc=com] at /etc/puppet/environments/production/modules/openldap/manifests/server/database.pp:60 on node [nodename]

Not needing to override that option from the default, I tried just removing it from manifests/server/database.pp, at the bottom, where it is actually making the call.  Unfortunately, it then just complained about a different parameter.  I iterated through all errors until it didn't complain, just to see, and I ended up having to remove ALL of the new (to me) parameters from lib/puppet/type/openldap_database.rb (synctype, timelimit, readonly, initdb, mirrormode, sizelimit, syncusesubentry, updateref, syncrepl, limits, and dboptions).
This is being run on RedHat 6.7 using puppet version 3.8.2 (both client and server).  Looking through the type file and the olc provider file for the database part of the module, I couldn't see anything that stood out as obviously wrong.  Anyone have any ideas?  Any additional information I can provide?
I could see having some problems arising from having an already installed database failing to update completely with all the new features, but I wasn't expecting a failed catalog.

Did you launch Puppet on your server to pluginsync the new types?

For me, a restart of puppet master helped. Seems that these types are cached and not reloaded automatically...


Reapply ip monitor check

Depends on #332

Coverage decreased (-0.6%) to 69.321% when pulling 138d55af654a365ab0fa0625dc766afa8c7fae48 on EdDev:reapply-ip-monitor-check into c09d3c4ac0d3a179998ac32b6d8a055fb168b28b on nmstate:master.

Coverage decreased (-0.6%) to 69.321% when pulling 138d55af654a365ab0fa0625dc766afa8c7fae48 on EdDev:reapply-ip-monitor-check into c09d3c4ac0d3a179998ac32b6d8a055fb168b28b on nmstate:master.

Coverage decreased (-0.6%) to 69.321% when pulling 138d55af654a365ab0fa0625dc766afa8c7fae48 on EdDev:reapply-ip-monitor-check into c09d3c4ac0d3a179998ac32b6d8a055fb168b28b on nmstate:master.

Coverage decreased (-0.6%) to 69.321% when pulling 138d55af654a365ab0fa0625dc766afa8c7fae48 on EdDev:reapply-ip-monitor-check into c09d3c4ac0d3a179998ac32b6d8a055fb168b28b on nmstate:master.


Stop posting duplicates. This is your last warning.

Stop posting duplicates. This is your last warning.
You can't manage sorting preferences.
If "it does actually happen" post complete report as requested in new issue template - there are no telepathists here.

Originally posted by @dstftw in https://github.com/ytdl-org/youtube-dl/issues/25386#issuecomment-633161870
I don't want to post duplicates, it's just that there is no other way to respond to your comment if the issue is closed ,right? It would be helpful if you'd let the original issue open, since the issue isn't fixed yet.
So it's just a limitation of youtube-dl in that it can't do what im asking?
Kind regards,
Hidde

@dstftw


Possible to block a packet like WPE Pro?

Title says it all. @MotionFlex0 Is it possible?

Also, it works great this packet editor the only thing I think it might be missing is a block packet function.

I have added a drop packet option to the filter but I do have plans to add a better way to drop/edit/forward packets on the fly.


Castle Windsor 4.0 support

Hi,
Can you add a support for Windsor 4 please ?
Thanks

@svilenstefanov your request makes no sense, this is Windsor and Windsor 4 hasn't shipped yet.

Sorry
Thanks for the response


Can't change which Mono version is being used

Symptoms similar to the Unity issue, but I'm opening this specificaly so maybe we can put some attention into the possibility of changing which Mono LSP-Omnisharp is using.
I'm really interested in this since this (SLP-OmniSharp) is currently the only option for Sublime Text users in regards to C#/Unity projects.
I realise it may not be simple and/or easy.
Thanks to all the devs for the hard work.

v1.39.0 removed the bundled mono, so we'll have to take care of this anyway: https://github.com/OmniSharp/omnisharp-roslyn/releases/tag/v1.39.0
See: https://github.com/OmniSharp/omnisharp-roslyn/issues/2339

Obsolete issue as of PR #40.


Service Request: Gaana.com

Homepage: http://gaana.com
Old Lanchpad bug

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

This ticket is ancient and I'm not sure whether it is still relevant. If anybody is interested in this service, please create a new ticket :+1:


BookendAI Embeddings

Description: https://bookend.ai/ langchain embeddings integration
Dependencies: n/a (just using requests)
Tag maintainer: stvhu-bookend
Twitter handle: https://twitter.com/bookendai

🙏🏽 hope it's okay, but I closed https://github.com/langchain-ai/langchain/pull/12789 and opened a new PR since it's been 3 weeks from last correspondence

bumping to see if we may get some traction here!


StackOverflowError on Span end when zipkin is sampling

Describe the bug
Using version 3.1.3 of spring-cloud-starter-sleuth-zipkin, a StackOverflowError sometimes happen when ending a Span.
Stacktrace
java.lang.StackOverflowError: null
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
	at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.base/java.net.URLClassLoader.defineClass(Unknown Source)
	at java.base/java.net.URLClassLoader$1.run(Unknown Source)
	at java.base/java.net.URLClassLoader$1.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.net.URLClassLoader.findClass(Unknown Source)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	at brave.internal.handler.NoopAwareSpanHandler.end(NoopAwareSpanHandler.java:59)
	at brave.internal.recorder.PendingSpans.expungeStaleEntries(PendingSpans.java:133)
	at brave.internal.collect.WeakConcurrentMap.getIfPresent(WeakConcurrentMap.java:50)
	at brave.internal.recorder.PendingSpans.get(PendingSpans.java:59)
	at brave.Tracer.swapForPendingContext(Tracer.java:197)
	at brave.Tracer.toSpan(Tracer.java:381)
	at brave.Tracer.toSpan(Tracer.java:376)
	at brave.LazySpan.span(LazySpan.java:141)
	at brave.LazySpan.context(LazySpan.java:40)
	at org.springframework.cloud.sleuth.brave.bridge.BraveSpan.context(BraveSpan.java:49)
	at org.springframework.cloud.sleuth.instrument.prometheus.SleuthSpanContextSupplier.getSpanId(SleuthSpanContextSupplier.java:52)
	at org.springframework.cloud.sleuth.instrument.prometheus.LazySleuthSpanContextSupplier.getSpanId(LazySleuthSpanContextSupplier.java:48)
	at io.prometheus.client.exemplars.DefaultExemplarSampler.doSample(DefaultExemplarSampler.java:46)
	at io.prometheus.client.exemplars.DefaultExemplarSampler.sample(DefaultExemplarSampler.java:34)
	at io.micrometer.prometheus.PrometheusCounter.updateExemplar(PrometheusCounter.java:79)
	at io.micrometer.prometheus.PrometheusCounter.increment(PrometheusCounter.java:58)
	at zipkin2.reporter.metrics.micrometer.MicrometerReporterMetrics.incrementSpans(MicrometerReporterMetrics.java:111)
	at zipkin2.reporter.AsyncReporter$BoundedAsyncReporter.report(AsyncReporter.java:252)
	at zipkin2.reporter.brave.ConvertingSpanReporter.report(ConvertingSpanReporter.java:44)
	at zipkin2.reporter.brave.ConvertingSpanReporter.report(ConvertingSpanReporter.java:29)
	at zipkin2.reporter.brave.ZipkinSpanHandler.end(ZipkinSpanHandler.java:148)
	at brave.internal.handler.NoopAwareSpanHandler$CompositeSpanHandler.end(NoopAwareSpanHandler.java:107)
	at brave.internal.handler.NoopAwareSpanHandler.end(NoopAwareSpanHandler.java:57)
	at brave.internal.recorder.PendingSpans.expungeStaleEntries(PendingSpans.java:133)
	at brave.internal.collect.WeakConcurrentMap.getIfPresent(WeakConcurrentMap.java:50)
	at brave.internal.recorder.PendingSpans.get(PendingSpans.java:59)
	at brave.Tracer.swapForPendingContext(Tracer.java:197)
	at brave.Tracer.toSpan(Tracer.java:381)
	at brave.Tracer.toSpan(Tracer.java:376)
	at brave.LazySpan.span(LazySpan.java:141)
	at brave.LazySpan.context(LazySpan.java:40)
	at org.springframework.cloud.sleuth.brave.bridge.BraveSpan.context(BraveSpan.java:49)
	at org.springframework.cloud.sleuth.instrument.prometheus.SleuthSpanContextSupplier.getSpanId(SleuthSpanContextSupplier.java:52)
	at org.springframework.cloud.sleuth.instrument.prometheus.LazySleuthSpanContextSupplier.getSpanId(LazySleuthSpanContextSupplier.java:48)
	at io.prometheus.client.exemplars.DefaultExemplarSampler.doSample(DefaultExemplarSampler.java:46)
	at io.prometheus.client.exemplars.DefaultExemplarSampler.sample(DefaultExemplarSampler.java:34)
	at io.micrometer.prometheus.PrometheusCounter.updateExemplar(PrometheusCounter.java:79)
	at io.micrometer.prometheus.PrometheusCounter.increment(PrometheusCounter.java:58)
	at zipkin2.reporter.metrics.micrometer.MicrometerReporterMetrics.incrementSpans(MicrometerReporterMetrics.java:111)
	at zipkin2.reporter.AsyncReporter$BoundedAsyncReporter.report(AsyncReporter.java:252)
	at zipkin2.reporter.brave.ConvertingSpanReporter.report(ConvertingSpanReporter.java:44)
	at zipkin2.reporter.brave.ConvertingSpanReporter.report(ConvertingSpanReporter.java:29)
	at zipkin2.reporter.brave.ZipkinSpanHandler.end(ZipkinSpanHandler.java:148)
	at brave.internal.handler.NoopAwareSpanHandler$CompositeSpanHandler.end(NoopAwareSpanHandler.java:107)
(...)

This only happens when the trace is sampled by zipkin, since error has not been reproduced with spring.sleuth.sampler.probability set to 0.
Looks like the Span being ended is also one of the staleEntries to expunge by brave.internal.recorder.PendingSpans.
Context is the end of the treatment of Kafka consumer that leads to other messages being produced with the same traceId if that helps.

That's interesting! Do you have a reproducer by any chance?

Not at the moment, I will try to make one

Unfortunately, I have not been able to reproduce with a simple application. We will try to set sampler propbabilty to 1 later in our sprint to verify if it happens randomly or every time Zipkin is sampling. I'll keep you updated with our results

We manage to do the test today on our preprod. Setting spring.sleuth.sampler.probability to 1, we reproduced the error.
Strangely, the error does not occur on every trace but still appears more often than with propbability of 0,05 that we had on the first event (6 times in 4 hour vs once a day).
After about 5 minutes, when kafka lag start to get up, we got the error. That causes consumer to shutdown with "Stopping the container due to an error" with the stacktrace from the issue.
After restarting the consumer, it consumes well and about 5 minutes then the error reproduces again.
We had the errors on differents micro services, that were in same condition of relatively big workload but always on a kafka consumer.
We dont find the trace in zipkin since it fails sending it, but we can assume looking at other tests that are similar than the number of span is about 10 000 by trace.

10 000 spans for a trace sounds like a lot. Do you find this number of spans useful instead of overwhelming when debugging issues?

yes this is rather overwhelming :  the code flow goes through multiple services, mainly using bus messages with spring cloud stream, and there is indeed lot of spans we just don't need but are there nonetheless. For example : handle/streambridge/send/handle/tx. These span as useless for us ...

Can I dial this down ?
But as you suspected this is useless for now, that's why we're on the verge on completely disabling zipkin and just keeping sleuth for log correlation....

If you're using Sleuth with Brave you can create a SpanHandler where you could decide which ones to filter out. The question is if the final result will not be broken in Zipkin.

It seems to be problem with recursive closure overflow. We've got similar problem in one of our systems but it shouldn't produce that big traces in our case. We've got a service that handles kafkareceiver with concatmap and according to metrics it's around 5 records per second on average with occasional spikes. It should generate around 15-20 spans for each of those records so it would be like 5 * 20 = 100 spans per second, which isn't that much. The problem actually seems to be starting with exemplars. So when it actually wants to add exemplar to zipkin metric for spans.total counter it goes to PrometheusCounter which then asks for exemplarsampler to return an exemplar. This one goes to prometheus DefaultExemplarSampler which then calls upon sleuth to provide current span context, going to brave tracer, that goes for pending spans, ending a span, which increases counter for spans.total on zipking and it goes and goes again blocking the thread until there's nothing more on PendingSpans queue or StackOverflowError is thrown (whichever comes first, but occasionally we get that error which then completely breaks our kafka consumer).
Our trace looks like this:
java.lang.StackOverflowError: null
	at brave.internal.collect.WeakConcurrentMap.getIfPresent(WeakConcurrentMap.java:50)
	at brave.internal.recorder.PendingSpans.get(PendingSpans.java:59)
	at brave.Tracer.swapForPendingContext(Tracer.java:197)
	at brave.Tracer.toSpan(Tracer.java:381)
	at brave.Tracer.toSpan(Tracer.java:376)
	at brave.LazySpan.span(LazySpan.java:141)
	at brave.LazySpan.context(LazySpan.java:40)
	at org.springframework.cloud.sleuth.brave.bridge.BraveSpan.context(BraveSpan.java:49)
	at org.springframework.cloud.sleuth.instrument.prometheus.SleuthSpanContextSupplier.getSpanId(SleuthSpanContextSupplier.java:52)
	at org.springframework.cloud.sleuth.instrument.prometheus.LazySleuthSpanContextSupplier.getSpanId(LazySleuthSpanContextSupplier.java:48)
	at io.prometheus.client.exemplars.DefaultExemplarSampler.doSample(DefaultExemplarSampler.java:46)
	at io.prometheus.client.exemplars.DefaultExemplarSampler.sample(DefaultExemplarSampler.java:34)
	at io.micrometer.prometheus.PrometheusCounter.updateExemplar(PrometheusCounter.java:79)
	at io.micrometer.prometheus.PrometheusCounter.increment(PrometheusCounter.java:58)
	at zipkin2.reporter.metrics.micrometer.MicrometerReporterMetrics.incrementSpans(MicrometerReporterMetrics.java:111)
	at org.springframework.cloud.sleuth.autoconfig.zipkin2.ZipkinAutoConfiguration$TraceMetricsMicrometerConfiguration$NoReporterMetricsBeanConfiguration$LazyMicrometerReporterMetrics.incrementSpans(ZipkinAutoCo  nfiguration.java:293)
#### Below lines are repeated X times and are basically a copy of above lines up to a point####
at zipkin2.reporter.AsyncReporter$BoundedAsyncReporter.report(AsyncReporter.java:252)
at zipkin2.reporter.brave.ConvertingSpanReporter.report(ConvertingSpanReporter.java:44)
at zipkin2.reporter.brave.ConvertingSpanReporter.report(ConvertingSpanReporter.java:29)
at zipkin2.reporter.brave.ZipkinSpanHandler.end(ZipkinSpanHandler.java:148)
at brave.internal.handler.NoopAwareSpanHandler$CompositeSpanHandler.end(NoopAwareSpanHandler.java:107)
at brave.internal.handler.NoopAwareSpanHandler.end(NoopAwareSpanHandler.java:57)
at brave.internal.recorder.PendingSpans.expungeStaleEntries(PendingSpans.java:133)
at brave.internal.collect.WeakConcurrentMap.getIfPresent(WeakConcurrentMap.java:50)
at brave.internal.recorder.PendingSpans.get(PendingSpans.java:59)
at brave.Tracer.swapForPendingContext(Tracer.java:197)
at brave.Tracer.toSpan(Tracer.java:381)
at brave.Tracer.toSpan(Tracer.java:376)
at brave.LazySpan.span(LazySpan.java:141)
at brave.LazySpan.context(LazySpan.java:40)
at org.springframework.cloud.sleuth.brave.bridge.BraveSpan.context(BraveSpan.java:49)
at org.springframework.cloud.sleuth.instrument.prometheus.SleuthSpanContextSupplier.getSpanId(SleuthSpanContextSupplier.java:52)
at org.springframework.cloud.sleuth.instrument.prometheus.LazySleuthSpanContextSupplier.getSpanId(LazySleuthSpanContextSupplier.java:48)
at io.prometheus.client.exemplars.DefaultExemplarSampler.doSample(DefaultExemplarSampler.java:46)
at io.prometheus.client.exemplars.DefaultExemplarSampler.sample(DefaultExemplarSampler.java:34)
at io.micrometer.prometheus.PrometheusCounter.updateExemplar(PrometheusCounter.java:79)
at io.micrometer.prometheus.PrometheusCounter.increment(PrometheusCounter.java:58)
at zipkin2.reporter.metrics.micrometer.MicrometerReporterMetrics.incrementSpans(MicrometerReporterMetrics.java:111)
at org.springframework.cloud.sleuth.autoconfig.zipkin2.ZipkinAutoConfiguration$TraceMetricsMicrometerConfiguration$NoReporterMetricsBeanConfiguration$LazyMicrometerReporterMetrics.incrementSpans(ZipkinAutoConfiguration.java:293)

Found the reason why it might happen for us. For some of the records the amount of db queries executed is bigger than normal (business reasons), which makes it so that for some of the records we get like 20 spans, but for some it can be even 100 or more. But not in thousands :) at most a hundred and a few.

Could it be related with this as well ? https://github.com/spring-cloud/spring-cloud-sleuth/issues/2244. That way we would have a lot of pending spans that are executing above scenario, when there's a lot of them.

Any updates on this issue?  I think we just diagnosed this same root cause with some of our applications.

Hi, Any updates on this issue ? We are facing the exact same problem.

Please upgrade to Micrometer Tracing. Spring Cloud Sleuth is feature complete and out of OSS support.


Add effective_on support to disallowed_attributes

Also, use the same go version in all modules. Failure to do so causes issues when generating docs.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (044ebf5) to head (efe20ef).
Report is 5 commits behind head on main.

Additional details and impacted files

@@            Coverage Diff            @@
##              main     #1118   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files          115       115
  Lines         5737      5749   +12
=========================================
+ Hits          5737      5749   +12

Files with missing lines
Coverage Δ

policy/release/sbom_cyclonedx.rego
100.00% <100.00%> (ø)

policy/release/sbom_cyclonedx_test.rego
100.00% <100.00%> (ø)


Upgrade to latest antv/x6 drawing package

Describe what problem your feature request solves:
we have a lot of niggles with the drawing package, and this may be because we are using an old version :
    "@antv/x6": "^1.32.7",
    "@antv/x6-vue-shape": "^1.4.0",

Describe the solution you'd like:
upgrade to latest version 2.x - note that this is a breaking change:
    "@antv/x6": "^2.13.1",
    "@antv/x6-vue-shape": "^2.1.1",

Additional context:

use of  @antv/x6-vue-shape v2.x
migration  for @antv/x6 v2.x

This may solve issue #1041

closed by pull request 'Migrate to version 2.x antv/x6' #1099
a mammoth effort from @lreading and @jgadsden which contains 34 commits


[Azure Analysis Services] Add new version of API spec and update backup configuration

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information

[x] The title of the PR is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
[x] Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
[x] If applicable, the PR references the bug/issue that it fixes.
[x] Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

[x] I have read the contribution guidelines.
[x] My spec meets the review criteria:

[x] The spec conforms to the Swagger 2.0 specification.
[x] The spec follows the guidelines described in the Swagger checklist document.
[x] Validation tools were run on swagger spec(s) and have all been fixed in this PR.

@taiwu,
Thanks for your contribution.  To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.
The agreement will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot

@sarangan12 Based on my previous review of https://github.com/Azure/azure-rest-api-specs/pull/1287#discussion_r121547676, I am taking look into this so i'll assign it to me . If other reviews comes up on my plate, I'll give you if you have time :)

Hi There,
I am the AutoRest Linter Azure bot. I am here to help. My task to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:
File: arm-analysisservices/2017-06-09/swagger/analysisservices.json
Number of linter errors/warnings before the PR: 0
Number of linter errors/warnings after the PR: 11
Thanks for your co-operation.

Hi There,
I am the AutoRest Linter Azure bot. I am here to help. My task to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:
File: arm-analysisservices/2017-06-09/swagger/analysisservices.json
Number of linter errors/warnings before the PR: 0
Number of linter errors/warnings after the PR: 10
Thanks for your co-operation.

Thanks @taiwu for fixing the indentation and camelCase. I'd appreciate if you can comment on each of the general questions that we have asked. That's help me understand and get more insights into the status of the service. Thanks!

Hi @taiwu
Can you please address the comment soon :)

Is this service live / deployed? yes
Do you have /operations api modeled/exposed? yes
For linter errors and warnings, still working on them.

@taiwu Thanks for the answers, Let us know once you have worked through the linter issues. Thanks!

After discussions with our team, we decide to close this pull request. What we will change is keep the current version instead of creating new version, and add new mutable property for our backupBlobContainerUri. Sorry for the inconvenience.
The original planned to remove property is actually not working hence deprecated, it is no harm to delete them.

I will create a new pull request for the change.

Closing this PR in favor of https://github.com/Azure/azure-rest-api-specs/pull/1326


Tweak the crate/workspace setup so that fuzz binaries are built in root target/ directory.

Because the fuzzing crate was previously in its own Cargo workspace, its
build process placed its binaries in fuzz/target/.... Other
infrastructure (such as OSS-Fuzz) doesn't expect this. This PR instead
makes the fuzzing crate an ordinary part of the main workspace, and
tweaks the build-option overrides to work with this new setup. Followup
to #106.
Sorry for the tedium of little tweaks here!

Urgh, something's wrong with the build-option overrides; standby...

Oh this is where if the fuzzers are a member of the main workspace then cargo test --all will try to test the fuzzers which isn't what you want.
We fixed this in Wasmtime with some extra directives which, while ugly, at least get the job done.


Missing Type Annotations

There are missing type annotations for some functions in this library.
The typing module does not exist on CircuitPython devices so the import needs to be wrapped in try/except to catch the error for missing import. There is an example of how that is done here:
try:
    from typing import List, Tuple
except ImportError:
    pass

Once imported the typing annotations for the argument type(s), and return type(s) can be added to the function signature. Here is an example of a function that has had this done already:
def wrap_text_to_pixels(
    string: str, max_width: int, font=None, indent0: str = "", indent1: str = ""
) -> List[str]:

If you are new to Git or Github we have a guide about contributing to our projects here: https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github
There is also a guide that covers our CI utilities and how to run them locally to ensure they will pass in Github Actions here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code In particular the pages: Sharing docs on ReadTheDocs and Check your code with pre-commit contain the tools to install and commands to run locally to run the checks.
If you are attempting to resolve this issue and need help, you can post a comment on this issue and tag both @foamyguy and @kattni or reach out to us on Discord: https://adafru.it/discord in the #circuitpython-dev channel.
The following locations are reported by mypy to be missing type annotations:

[ ] adafruit_wsgi/wsgi_app.py:46
[ ] adafruit_wsgi/wsgi_app.py:69
[ ] adafruit_wsgi/wsgi_app.py:98
[ ] adafruit_wsgi/wsgi_app.py:107
[ ] adafruit_wsgi/request.py:21
[ ] adafruit_wsgi/request.py:74
[ ] adafruit_wsgi/request.py:84

@FoamyGuy can probably mark this done

closed by #10


ciao-controller: should not ask launcher to create invalid configurations

Controller should do some validation on the configuration it sends to launcher. In particular it should check that if image_uuid is empty then there must be a valid volume to use.

A portion of this (eg: volume exists) is in PR #700
The broader validation of user-input workload is tracked in a separate ticket issue #244

Closing as duped in the broader #244


Update "Twitter" Text to "X" in Footer Links

Description:
The website currently references Twitter in the footer navigation links as shown in the attached image. Given Twitter's recent rebranding to "X", we need to update the footer to reflect this change.
Expected Behavior:
The link text should be updated from "Twitter" to "X".
Actual Behavior:
The footer link still displays "Twitter".
Screenshot:

@stdlib-bot I feel this is a valid issue and I'm working on it now.

These changes have already been upstreamed. They will be public once we deploy an updated build of the website. As such, I am closing this issue.


Update Github Actions CI and add Windows

Add one Windows build to Github Actions
Remove Appveyor config
Move a few build steps out of the script
Use Ninja as the generator (makes for more readable logs)
Add build cache (except on Windows where it seems to break)

Change-Id: Ida90ee1842af98aff86e5144ab7b9766480378c9
Signed-off-by: Kevin Petit<EMAIL_ADDRESS>

This has two approvals and has been open a while, so merging.


Need to figure out how to add menu/navigation

See https://biodata-club.github.io/githubPagesTutorial/#modifying-the-menu
In the example: http://planetjekyll.github.io/snippets/nav-with-data.html.  It looks like the YML needs to be processed into an HTML fragment and then included into the Markdown somehow maybe like this https://jekyllrb.com/docs/includes/
more research https://github.com/forestryio/jekyll-menus/issues/15 - not supported?

An example with a menu  https://github.com/jekyll/minima
It's appears that this uses a Jekyll pre-processor to generate the site (with menu) as opposed to GitHub pages doing all of the processing.
If we go this route, we might want to put the pre-generated files in a _src folder and the post generated files in a _site folder.
Refresh DC does something like this https://github.com/jgarber623/refresh-dc.org

I think we should use pandoc with a two stage processor.
Stage 1: generate HTML include file for menu
Stage 2: generate HTML page from each markdown file
something like this example https://tylercipriani.com/blog/2014/05/13/replace-jekyll-with-pandoc-makefile/

Hey so

Sorry I was trying to view this and accidentally clicked the close button!


Add support for projecting instanced models to 2D in ModelExperimental

This PR adds support for projecting instanced models and .i3dm tilesets to 2D / CV when they are loaded with ModelExperimental. Most of this code is done in InstancingPipelineStage, though let me know if it seems better to move this to SceneMode2DPipelineStage instead.
Here's a side-by-side comparison with Model: with ModelExperimental the trees load into the correct places 🌳

Model
ModelExperimental

Sandcastles:

San Diego CDB dataset (trees)
3D Tile Formats sandcastle -- side note, I found that point clouds are crashing in 2D / CV mode, so I'll have to check that out soon
ModelExperimental sandcastle (different instanced models at the top)

Thanks for the pull request @j9liu!

:heavy_check_mark: Signed CLA found.
:grey_question: CHANGES.md was not updated.

If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.

@j9liu Sandcastles look good aside from the point cloud errors you mentioned in the description.

@ptrgags updated!

@j9liu looks good, thanks!


Form field has aria-invalid attribute when error is false

Bug Report
Steps
Use a form field, for example:
<Form.Field     id='form-input-control-error-email'       control={Input}       label='Email'<EMAIL_ADDRESS>     error={false}     />
Expected Result
The aria-invalid attribute should not be present (or should be false)
Actual Result
The aria-invalid attribute is set to true:
<input aria-describedby="form-input-control-error-email-error-message" aria-invalid="true"<EMAIL_ADDRESS>id="form-input-control-error-email" type="text">
Version
1.2.0

Thanks for reporting. It seems that condition there should be simpler 🐱
src/collections/Form/FormField.js
    'aria-describedby': ariaDescribedBy,
-   'aria-invalid': error !== undefined ? true : undefined,
+   'aria-invalid': error ? true : undefined,

Would you like to submit a PR?

Done, I added some tests as well

A fix was released in<EMAIL_ADDRESS>🎉


SeisSol crashes with Illegal instruction

We've tried to run the training docker with Manel Prada at Barcelona, and we got unexpected errors when running SeisSol.
We used:
docker pull seissol/training:pr-23
cpuinfo:
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 42
model name    : Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
stepping    : 7
microcode    : 0x2f
cpu MHz        : 3210.242
cache size    : 6144 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 4
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts md_clear flush_l1d
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips    : 6219.84
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

Error: Illegal instruction (core dumped)

Training is compiled for Haswell: https://github.com/SeisSol/Training/blob/main/Dockerfile#L111
The CPU is Sandy bridge: https://www.intel.de/content/www/de/de/products/sku/52207/intel-core-i52400-processor-6m-cache-up-to-3-40-ghz/specifications.html
which came before Haswell
-> The CPU is too old for the compile settings (snb compile setting should work though but is a lot slower than hsw for non-ancient cpus)

I see.

Would it make sense to have an exe compiled with Sandy Bridge in the docker?
Or let's say a set or architectures?
Could we then detect the architecture within the docker and use the correct exe?

The easiest fix is to compile for ARCH=snb. This is going to lead to a significant performance loss on more modern architectures (=everything released since 2013...). The libxsmm_JIT backend does the compilation of some kernels during runtime but of course not all of them.
Not sure how well it performs on sandy bridge.
Your idea is possible but a lot of work for a very small minority of the users. Even the Haswell architecture (for which we are compiling) is ~9 years old. Most people in computational science update their computers more often than that...

ok fair enough. But we will need to do that anyway for the new Mac architecture at some point.


Usssd Demo Jar file missing some fix !

Project kastri.apk raised exception class EJNI with message 'Java type JDWUssdResponseCallback could not be found'.
i rename package demo to this:
com.delphiworlds.kastri
according to the java files :
package com.delphiworlds.kastri;

import android.telephony.TelephonyManager;

public class DWUssdResponseCallback extends TelephonyManager.UssdResponseCallback {

  private DWUssdResponseCallbackDelegate mDelegate;

  public DWUssdResponseCallback(DWUssdResponseCallbackDelegate delegate) {
    mDelegate = delegate;
  }

  @Override
  public void onReceiveUssdResponse(TelephonyManager telephonyManager, String request, CharSequence response) {
    mDelegate.onReceiveUssdResponse(telephonyManager, request, response);
  }

  @Override
  public void onReceiveUssdResponseFailed(TelephonyManager telephonyManager, String request, int failureCode) {
    mDelegate.onReceiveUssdResponseFailed(telephonyManager, request, failureCode);
  }
}

--
package com.delphiworlds.kastri;

import android.telephony.TelephonyManager;

public interface DWUssdResponseCallbackDelegate {

  public void onReceiveUssdResponse(TelephonyManager telephonyManager, String request, CharSequence response);

  public void onReceiveUssdResponseFailed(TelephonyManager telephonyManager, String request, int failureCode);
}

how to fix this ?

You need to add dw-telephony.jar to the Android 32-bit target, as per the demo project

Check out my repository here:
JarBuilder
I developed JarBuilder as a tool to create a custom UssdLib.jar instead of using dw-telephony.jar. This allows me to generate the JAR file tailored to my application's package name
i always get that error above!!
does the java files works only on Android 32 bit ?

does the java files works only on Android 32 bit ?

Adding it to the 32-bit target just means that the .jar will be compiled for 32-bit and/or 64-bit.

i always get that error above!!

Are you actually adding it to the project?

yes i add it successfully
my phone is android 5.1 (21 Api)
my delphi is Athens  first build version

Are you using the same source files? Do you have a copy of UssdLib.jar somewhere?

https://github.com/mben-dz/JarBuilder/blob/main/Tested.rar

You are receiving the message Java type JDWUssdResponseCallback could not be found because you have used your own class names in your sources. You will need to change the imports in this unit to match your Java source.

You will also need to modify the source in this unit. Leaving everything as it was would have been much easier, and would also indicate the code came from me.

i do all of that before and still no chance, even with the default demo i have same issue,
i try to test the jar dw-telephony.jar with Java2OP.exe and he tell me this:
android.telephony.TelephonyManager$UssdResponseCallback: not found
 com.delphiworlds.kastri.DWUssdResponseCallback: the parent class (android.telephony.TelephonyManager$UssdResponseCallback) is not found

I believe the issue isn't on my end.

Is this still an issue?

Yes, the TelephonyManager.sendUssdRequest function only works on Android API Level 26 and above. Initially, I was developing my own custom solution without embedding any external JAR files. However, since my phone is running Android 5.1, I had to abandon the project because the sendUssdRequest function is unsupported. I also noticed that on newer devices, apps using this function often experience slow response times.
To address this issue, I explored another solution: embedding NDK files into the project. By using the Android Native Development Kit (NDK), I was able to interact directly with the Radio Interface Layer (RIL), which operates at a lower system level. This allowed me to request USSD responses efficiently without needing root access.
For example, you can create a simple NDK module that communicates with the RIL. Here's a brief outline of how it might look:

Create an NDK C++ file that interacts with RIL:
extern "C" JNIEXPORT jstring JNICALL Java_com_example_ussd_RilRequest_getUssdResponse(JNIEnv* env, jobject /* this */, jstring ussdCode) {  // Interact with RIL here to send the USSD code and receive the response.  // Return the USSD response as a string. }
--

Compile the NDK files into a shared library (.so file) and include it in your Android project.

In your Android app, call the native method from Java:
`public class RilRequest {
static {
System.loadLibrary("ril-ndk");
}
public native String getUssdResponse(String ussdCode);
}

// Example usage
String response = new RilRequest().getUssdResponse("*123#");
`
By using this approach, you bypass the limitations of sendUssdRequest on older Android versions and achieve faster results, all while keeping your app lightweight without the need for external JARs.

Yes, the TelephonyManager.sendUssdRequest function only works on Android API Level 26 and above. Initially, I was developing my own custom solution without embedding any external JAR files. However, since my phone is running Android 5.1, I had to abandon the project because the sendUssdRequest function is unsupported. I also noticed that on newer devices, apps using this function often experience slow response times.
To address this issue, I explored another solution: embedding NDK files into the project. By using the Android Native Development Kit (NDK), I think to interact directly with the Radio Interface Layer (RIL), which operates at a lower system level is not impossible. This allowed us to request USSD responses efficiently without needing root access.
For example, you can create a simple NDK module that communicates with the RIL. Here's a brief outline of how it might look:

Create an NDK C++ file that interacts with RIL:
extern "C" JNIEXPORT jstring JNICALL Java_com_example_ussd_RilRequest_getUssdResponse(JNIEnv* env, jobject /* this */, jstring ussdCode) {  // Interact with RIL here to send the USSD code and receive the response.  // Return the USSD response as a string. }
--

Compile the NDK files into a shared library (.so file) and include it in your Android project.

In your Android app, call the native method from Java:
`public class RilRequest {
static {
System.loadLibrary("ril-ndk");
}
public native String getUssdResponse(String ussdCode);
}

// Example usage
String response = new RilRequest().getUssdResponse("*123#");
`
By using this approach, you bypass the limitations of sendUssdRequest on older Android versions and achieve faster results, all while keeping your app lightweight without the need for external JARs.
my solution not complete yet ..!!

Yes, the TelephonyManager.sendUssdRequest function only works on Android API Level 26 and above. Initially, I was developing my own custom solution without embedding any external JAR files. However, since my phone is running Android 5.1, I had to abandon the project because the sendUssdRequest function is unsupported. I also noticed that on newer devices, apps using this function often experience slow response times.
To address this issue, I explored another solution: embedding NDK files into the project. By using the Android Native Development Kit (NDK), I think to interact directly with the Radio Interface Layer (RIL), which operates at a lower system level is not impossible. This allowed us to request USSD responses efficiently without needing root access.
For example, you can create a simple NDK module that communicates with the RIL. Here's a brief outline of how it might look:

Create an NDK C++ file that interacts with RIL:
extern "C" JNIEXPORT jstring JNICALL Java_com_example_ussd_RilRequest_getUssdResponse(JNIEnv* env, jobject /* this */, jstring ussdCode) {  // Interact with RIL here to send the USSD code and receive the response.  // Return the USSD response as a string. }
--

Compile the NDK files into a shared library (.so file) and include it in your Android project.

In your Android app, call the native method from Java:
`public class RilRequest {
static {
System.loadLibrary("ril-ndk");
}
public native String getUssdResponse(String ussdCode);
}

// Example usage
String response = new RilRequest().getUssdResponse("*123#");
`
By using this approach, you bypass the limitations of sendUssdRequest on older Android versions and achieve faster results, all while keeping your app lightweight.
my solution not complete yet ..!!

my solution not complete yet ..!!

What error messages are there, if any?

https://github.com/mben-dz/MyVideos/blob/main/UssdKastri.mp4

As per my earlier comment:

You need to add dw-telephony.jar to the Android 32-bit target, as per the demo project

Note Android 32-bit target. Adding it there it will compile for both 32-bit and 64-bit

https://chatgpt.com/share/66f87dce-6398-8005-8c03-a93c7d10b2ee

Can you provide some explanation of what the link is for?

I’ve embedded the JAR file correctly and ensured that the delegate function is implemented, but unfortunately, the delegate still doesn't work on my phone running Android 5.1. After some investigation, I found that this might be due to the fact that the delegate is not being properly registered or supported on this version of Android.
Even though the Java code is correct and should work on more recent Android versions, it appears that Android 5.1 has some limitations or differences in the way it handles TelephonyManager callbacks, which prevents the delegate from functioning as expected.
For this reason, I had to fall back to using native JNI methods to handle the USSD responses, which is more reliable across different Android versions.

For this reason, I had to fall back to using native JNI methods to handle the USSD responses, which is more reliable across different Android versions.

OK - did you manage to get this working?

Here is what I've recently reached regarding the topic of Java Code Native:
NativeUssdResponseCallback.java
`package com.MBenDelphi.NativeUssdDemo;
import android.telephony.TelephonyManager;
import android.os.Handler;
public class NativeUssdResponseCallback extends TelephonyManager.UssdResponseCallback {
private Handler callbackHandler;

// Constructor with the handler parameter
public NativeUssdResponseCallback(Handler aHandler) {
    this.callbackHandler = aHandler;
}

@Override
public void onReceiveUssdResponse(TelephonyManager telephonyManager, String request, CharSequence response) {
    // Ensure that this callback runs on the provided handler thread
    callbackHandler.post(() -> {
        nativeOnReceiveUssdResponse(request, response.toString());
    });
}

@Override
public void onReceiveUssdResponseFailed(TelephonyManager telephonyManager, String request, int failureCode) {
    // Ensure that this callback runs on the provided handler thread
    callbackHandler.post(() -> {
        nativeOnReceiveUssdResponseFailed(request, failureCode);
    });
}

// Declare native methods that will be implemented in Delphi
public native void nativeOnReceiveUssdResponse(String aRequest, String aResponse);
public native void nativeOnReceiveUssdResponseFailed(String aRequest, int aFailureCode);

}`
NativeUssdHandler.java
`package com.MBenDelphi.NativeUssdDemo;
import android.telephony.TelephonyManager;
import android.os.Handler;
import android.os.Looper;
public class NativeUssdHandler {
private TelephonyManager delphiTelephonyMgr;
private Handler nativeHandler;
private NativeUssdResponseCallback nativeUssdCallback;

public NativeUssdHandler(TelephonyManager aTelephonyMgr) {
    this.delphiTelephonyMgr = aTelephonyMgr;

    // Initialize the handler for the main looper
    this.nativeHandler = new Handler(Looper.getMainLooper());

    // Pass the handler to the NativeUssdResponseCallback constructor
    this.nativeUssdCallback = new NativeUssdResponseCallback(this.nativeHandler);
}

// Method to send a USSD request
public void nativeSendUssdRequest(String aUssdCode) {
    telephonyManager.sendUssdRequest(aUssdCode, this.nativeUssdCallback, this.nativeHandler);
}

}`
The last class will need some minor adjustments to fully adapt to all phones. Currently, it uses the sendUssdRequest code, which doesn't work on phones with Android versions lower than 8.
I hope you like the idea initially.

`  Androidapi.JNI.NativeUssdCall;  // Include the JNI binding for NativeUssdHandler
type
TUssdHandler = class//(TJavaLocal, JNativeUssdHandler)
strict private
[weak] // Use weak references to prevent memory leaks
fTelephonyManager: JTelephonyManager;
[weak] // Use weak references to prevent memory leaks
fNativeUssdHandler: JNativeUssdHandler;
[weak] // Use weak references to prevent memory leaks
fNativeUssdResponseCallback: JNativeUssdResponseCallback;
procedure UnregisterNativeUssdJNI; inline;
procedure RegisterNativeMethods; inline;
procedure InitUssdHandler; inline; // Marked as inline for potential performance gain

private
procedure nativeOnReceiveUssdResponse(aRequest: JString; aResponse: JString); cdecl;
procedure nativeOnReceiveUssdResponseFailed(aRequest: JString; aFailureCode: Integer); cdecl;
protected
constructor Create(aTelephonyMgr: JTelephonyManager); overload; virtual; // Constructor to initialize the TelephonyManager
public
class function Wrap: TUssdHandler; overload;
destructor Destroy; override;
procedure Send_UssdRequest(aUssdCode: String);

end;
implementation
uses
FMX.Dialogs;
function GetTelephonyManager: JTelephonyManager;
begin
Result := TJTelephonyManager.Wrap(
(TAndroidHelper.Context
.getSystemService(TJContext.JavaClass.TELEPHONY_SERVICE) as ILocalObject).GetObjectID);
end;
{ TUssdHandler }
procedure TUssdHandler.InitUssdHandler;
begin
// Initialize the Java NativeUssdResponseCallback..
fNativeUssdResponseCallback :=
TJNativeUssdResponseCallback.JavaClass.init;
// Initialize the Java NativeUssdHandler with the Delphi fTelephonyManager
fNativeUssdHandler := TJNativeUssdHandler.JavaClass.init(fTelephonyManager);
RegisterNativeMethods; // register the native methods ..
end;
// This method registers the native methods with the Java class
procedure TUssdHandler.RegisterNativeMethods;
var
LMethods: array[0..1] of JNINativeMethod;
LJNIEnv: PJNIEnv;
LJavaClassID: JNIClass;
begin
LJNIEnv := TJNIResolver.GetJNIEnv;
LJavaClassID := TJNIResolver
.GetJavaClassID('com/MBenDelphi/NativeUssdDemo/NativeUssdResponseCallback');
// Set up native method array for registration
LMethods[0].Name := 'nativeOnReceiveUssdResponse';
LMethods[0].Signature := '(Ljava/lang/String;Ljava/lang/String;)V';
LMethods[0].FnPtr := @TUssdHandler.nativeOnReceiveUssdResponse;
LMethods[1].Name := 'nativeOnReceiveUssdResponseFailed';
LMethods[1].Signature := '(Ljava/lang/String;I)V';
LMethods[1].FnPtr := @TUssdHandler.nativeOnReceiveUssdResponseFailed;
// Register the native LMethods with the JVM
if LJNIEnv^.RegisterNatives(LJNIEnv, LJavaClassID,
PJNINativeMethod(@LMethods[0]), Length(LMethods)) < 0 then
begin
raise Exception.Create('Failed to register native methods');
end;
end;
procedure TUssdHandler.UnregisterNativeUssdJNI;
var
LJNIEnv: PJNIEnv;
LJavaClassID: JNIClass;
begin
// Obtain the JNI environment
LJNIEnv := TJNIResolver.GetJNIEnv;
// Retrieve the Java class where the native methods were registered
LJavaClassID := TJNIResolver
.GetJavaClassID('com/MBenDelphi/NativeUssdDemo/NativeUssdResponseCallback');
// Unregister the native methods
if LJNIEnv^.UnregisterNatives(LJNIEnv, LJavaClassID) < 0 then
begin
raise Exception.Create('Failed to unregister native methods');
end;
end;
constructor TUssdHandler.Create(aTelephonyMgr: JTelephonyManager);
begin inherited Create;
// Assign the provided TelephonyManager to the class variable
fTelephonyManager := aTelephonyMgr; // Use the passed TelephonyManager
InitUssdHandler; // Initialize the Java handler
end;
class function TUssdHandler.Wrap: TUssdHandler;
begin
// Call GetTelephonyManager to get the current TelephonyManager instance
Result := Self.Create(GetTelephonyManager);
end;
destructor TUssdHandler.Destroy;
begin
UnregisterNativeUssdJNI;
inherited;
end;
procedure TUssdHandler.NativeOnReceiveUssdResponse(aRequest, aResponse: JString);
begin
// Handle the received USSD response
ShowMessage(JStringToString(aResponse)); // Display the response in a message box
end;
procedure TUssdHandler.NativeOnReceiveUssdResponseFailed(aRequest: JString; aFailureCode: Integer);
begin
// Handle the failed USSD response
ShowMessage(Format('USSD request failed. Code: %d', [aFailureCode])); // Display failure message
end;
procedure TUssdHandler.Send_UssdRequest(aUssdCode: String);
begin
// Call the Java method to send the USSD request
if Assigned(fNativeUssdHandler) then
fNativeUssdHandler.sendUssdRequest(StringToJString(aUssdCode), fNativeUssdResponseCallback);
end;
end.`

the updated Java files are here
I’ll post the complete demo as soon as it’s finished and working properly

Excellent, thanks!

I've finally succeeded in getting the native methods to work exactly as I expected!
the complete demo is here.


RE: /installing-airbrake/installing-airbrake-in-a-react-app

This may not be an issue.  But for me, I had to use
import { Notifier } from '@airbrake/browser';
instead of
import { Notifier } from '@airbrake/notifier';
Also, not sure if adding export default is appropriate or not.  (I'm a bit of a noob, so maybe that goes without saying).

You are totally right @khulani! Thanks for catching that.