Feature request: Log class uses macros to optionally remove instrumentation at compile time

I understand from Crystal gitter chat that this has been discussed from time to time. Couldn't find a github issue so decided to create this one to capture this important idea.
AFAIK currently the desired run-time log level is set via environment variable, e.g. CRYSTAL_LOG_LEVEL=DEBUG which means instrumentation like this will cause output: Log.debug { "..." }
And AFAIK if the desired run-time log level effectively disables output of Log.debug { "..." } then currently the code path is optimized as much as possible but still a function is called and an if() statement causes an early return without any output or string manipulation. So if there are e.g. 1 million Log.debug { "..." } statements not outputting, there will still be 1 million functions called, with 1 million if statements, and 1 million returns... as an overhead.
While this is not bad, it means that the more Log.debug { "..." } statements added, the slower a Crystal program will run even if their output is disabled, due to all the unnecessary associated function calls.
And this is particularly bad for multi threaded programs which generally rely more on log instrumentation because debugging such programs with the debugger can sometimes not be practical.
This feature request is to optimize the functionality already there, so that certain log levels can be eliminated at compile time, similar to how this Crystal assert macro works [2] by @sam0x17 .
This idea is that if at least not CRYSTAL_LOG_LEVEL=DEBUG is given at compile time, then Log.debug { "..." } statement will actually disappear from the compiled code, meaning that whether or not CRYSTAL_LOG_LEVEL=DEBUG is specified at run-time, there will be no log function to call and no overhead.
In this way, if CRYSTAL_LOG_LEVEL is not given at compile time, there will be no change to current functionality and the particular Log. instrumentation will always be 'compiled in'. However, if CRYSTAL_LOG_LEVEL is given at compile time, then the corresponding level of Log. instrumentation will be 'compiled out', thus making the output binary slightly smaller and faster.
Thus Crystal developers can -- similar to the idea with the assert macro [2] -- create a 'release' version of their binary, as well as a slightly bigger, slower, and maybe safer 'debug' version of it.
AFAIK the Crystal macro facility could make this all work. But I'm not sure about the actual mechanism to tell the compiler what to compile in and out. The assert macro [2] uses the --release compile-time flag. But it maybe more useful and generic to use the CRYSTAL_LOG_LEVEL instead. The exact mechanism could be discussed in this issue?
Ultimately it would also be potentially useful to consolidate release and debug asserts into the Log class since ultimately asserts will log and one could think of asserts as a type of log instrumentation, and it would be great to have a single mechanism to decide whether to compile out both debug log and debug assert lines at compile time.
[1] https://crystal-lang.org/api/0.34.0/Log.html
[2] https://github.com/sam0x17/assert.cr

Probably it does not need to be a macro. Based on compile flags the method body of Log can be made noop. We need to check if that will be optimized and removed directly.
It is unclear if this will apply to Trace or Debug level entries. But is definitely something on the radar.

When building a program it will be possible to ignore completely as part of the compilation the debug calls. So there is no penalty even to check if those logs should be emitted. The debug methods can be replaced by noop during compile-time.
https://github.com/crystal-lang/crystal/issues/5874#issuecomment-587090645

Also while this is true, there's no call because a call with a block is inlined. If all the method is doing is an if, then logging, then the overhead is just an if. With branch prediction it might not even be noticeable.
It might be nice to do some. benchmarks to learn the real times.

there's no call because a call with a block is inlined

That could also be bad for performance because the inlined if() logic will bloat the code causing the same code to take bigger space causing more cache line usage and fetches in addition to the overhead of the if() business logic. That's why for example, profiling code in the Linux kernel uses a single byte which is either a single byte nop (super fast with minimal code bloat) if not used, or changed at run-time to a single byte int3 if activated... but not if() business logic which is going to be much bigger and slower... :-)

This proposal essentially removes log levels for production builds.  Could additional methods be provided so there is still debug/info logging but developer only extra logging uses xdebug, xinfo etc?

Real usage example for developer logging > info that shouldn't make be used in production ever:
if decryption_failed
  Log.xerror &.emit("decryption failed", key: key, nonce: nonce)
  raise DecryptionFailed.new
end

I have this sprinkled throughout my code but manually commented and removed.  It's very easy to forget and leave this in a production build leaking keys/passwords or other sensitive information.

Log messages that are only relevant in development mode should just have an appropriate log level (such as debug or trace). I don't see the point in duplicating every other log level to have development version, when there are specific log levels for development mode.

I am very sympathetic to the ideas presented by @didactic-drunk because I have used them in development of very high performance production code in the past.
Let's say for example new functionality is created with lots of tests but still problems are infrequently dribbling through from production deployment. There are situation where you don't want to or cannot deploy the fully debug build for performance reasons, but never the less want to be able to increase the verbosity of debug output in the release / production version of the code.
I think a valid alternative to this is to have a more complicated verbosity scheme whereby e.g. debug verbosity can be enabled for particular functions, files, and/or modules individually. In this way, a debug build can run faster without fully enabling debug instrumentation for all functions, files, and/or modules. However, this would be an advanced feature -- which I've seen implemented in C/C++ projects -- and I'm not sure how it could be efficiently implemented in Crystal. Maybe there should be another github issues created for such a feature request?
But I think the 3 ideas -- (a) compiling in/out instrumentation, (b) instrumentation that cannot be compiled out, and (c) function/file/module specific verbosity levels -- are not mutually exclusive and can be mixed and matched for ultimate flexibility. And this github issue only deals with (a) and (b).

Do we really need to stuff stdlib for this?

Using it with a macro and checking it at compile time makes it impossible to configure this at runtime, where it makes sense to do that (for example reading it from a configuration file).
Also, nobody benchmarked this to see if it really matters. Here's a benchmark:
require "benchmark"
require "log"

Benchmark.ips do |x|
  x.report("nothing logged") do
    Log.debug { "hello world!"  I can't imagine how that can slow down something.

Yeah, I agree, although as a newbie I haven't tried out how shards work yet. Can you recommend any tutorial for that?
Coming from the Perl world, one of its best features is CPAN and the tens of thousands of Perl modules available which built up over the years. So many modules that often you can choose between several modules that do the same thing.

Do we really need to stuff stdlib for this?

Hmmm... I'm -- maybe naively -- thinking that the extra functionality would be a few source lines of macros over the existing code. @jhass, do you think it would really be such a lot of code as to warrant the word 'stuff'?
And are you also suggesting that a PR for the existing log module with this proposed functionality would be rejected because of 'stuffing' in favor of a shard wrapper / alternative instead?

So if there are e.g. 1 million Log.debug { "..." } statements not outputting, there will still be 1 million functions called, with 1 million if statements, and 1 million returns... as an overhead.

With the benchmark above, you can see that the overhead for those 1 million calls is 0.004 seconds.

With the benchmark above, you can see that the overhead for those 1 million calls is 0.004 seconds.

hehe yep, that maybe nothing if you are using Crystal as an alternative to e.g. Perl, but that's an eternity if you are using Crystal as an alternative to C/C++ :-) And normally, it wouldn't just be a single Log.debug but many due to more complicated business logic...

that's an eternity if you are using Crystal as an alternative to C/C++

Crystal is already slower than C and C++ because of many reasons (GC being one). If you want that speed, I recommend using those languages. 4 nanoseconds for doing nothing will work fine for 99.99999999999% of the applications out there. For that small remaining percentage, if you want that performance, I recommend doing your own logging framework, or just adding a {% if flag?(:debug) %} puts "..." {% end %}.
We should design for most use cases, not for that tiny use case which doesn't seem to even exist here. This is all hypothetical. YAGNI.

@asterite I gave a non-performance real use example.  Not YAGNI, not hypothetical.  I'm dealing with this problem now.
@straight-shoota Either didn't understand or didn't address my concerns (Flat tone.  Actually flat.  We've misunderstood each other before and I don't see a response).
@simonhf I'm moving this to a shard.  No code yet.  Maybe in a week.  Very busy now.

Maybe the difference in opinions is a typical (possibly web) app needs vs small message processing.  I'm attempting to handle lots of small 256-8k messages.  The log output dwarfs the message size. Much of it is only relevant in development and some of it is never logged in production due to it's sensitive nature.  I can't/won't divide this by log level.  Having multiple debug levels in production is still useful.  I just need the sensitive and undiagnosable without source code messages removed because of security or noisy messages bogging down sysadmins.  Again not based on log level.

If a log shouldn't reach a production sever, I think you need to check the environment (dev, staging, production) before logging this. Then, this has nothing to do with debug level, or being able to hide stuff at compile time.
You can do something like:
ENV = {{ env("APP_ENV") || "dev" }}

def xerror(*args, **nargs, &block)
  Log.error(*args, **nargs) { |dsl| yield dsl }
end

# ...

if decryption_failed
  xerror &.emit("decryption failed", key: key, nonce: nonce)
  raise DecryptionFailed.new
end

The current API already lets you do what you want.

@didactic-drunk As you can see, you can already do what you want. In fact, it seems you were already capable of doing it.
My point is, we shouldn't create a PR or suggestion for every thing that someone finds useful. The current API is already composable: you just wrap it and gate it behind a macro if you need it. There's no need for the Log framework to do that because what defined when something should be stripped out from the final build is not something the log framework can now, much less at compile time.

@simonhf

Yeah, I agree, although as a newbie I haven't tried out how shards work yet. Can you recommend any tutorial for that?

The tutorial is crystal init lib foo, cd foo, vim $stuff, git add ., git commit, git remote add origin https://github.com/user/foo.git, git push origin master :)

You can do something like

@asterite I tried to get the example to work, but even after adding the missing double quote for "production", I only get errors :-( Would it be kindly possible to amend to a working example?

This is for Crystal 0.34.0:
require "log"

{% begin %}
  APP_ENV = {{ env("APP_ENV") || "dev" }}
{% end %}

def xerror(*args, **nargs, &block)
  {% if APP_ENV != "production" %}
    Log.error(*args, **nargs) { yield }
  {% end %}
end

# ...
decryption_failed = true
key = "foo"
nonce = "bar"

if decryption_failed
  xerror { "decryption failed: key: #{key.inspect}, nonce: #{nonce.inspect}" }
  raise "oh no"
end

Try running:
bin/crystal foo.cr

and
APP_ENV=production bin/crystal foo.cr

I see the use of the constant and the macro. Is the macro inside the def really necessary

It's just an example. From that point you can take it forward and code it as you wish.

@asterite hmmm... what could be going wrong for me?
$ crystal -v | head -1
Crystal 0.34.0 [4401e90f0] (2020-04-06)
$ crystal wrap-log.cr
Unhandled exception: oh no (Exception)
  from /usr/share/crystal/src/log/log.cr:36:3 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:105:5 in 'main_user_code'
  from /usr/share/crystal/src/crystal/main.cr:91:7 in 'main'
  from /usr/share/crystal/src/crystal/main.cr:114:3 in 'main'
  from __libc_start_main
  from _start
  from ???
$ APP_ENV=production crystal wrap-log.cr
Unhandled exception: oh no (Exception)
  from wrap-log.cr:20:3 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:105:5 in 'main_user_code'
  from /usr/share/crystal/src/crystal/main.cr:91:7 in 'main'
  from /usr/share/crystal/src/crystal/main.cr:114:3 in 'main'
  from __libc_start_main
  from _start
  from ???

Nothing, the example unconditionally raises an exception and that's what you're seeing.

Shouldn't I be seeing the "decryption failed" error too?

I just updated the example. In 0.34.0 the logger incorrectly didn't log anything unless configure. I had the example working for 0.35.0 but explaining how to run this was going to be harder than porting over to 0.34.0.

Yep, and I learned an alternative way through my newbie experiences too, by adding the following lines to the example:
Log.setup_from_env
STDOUT.flush_on_newline=true

Then the following works:
$ APP_ENV=production crystal build wrap-log.cr && CRYSTAL_LOG_LEVEL=DEBUG ./wrap-log
Unhandled exception: oh no (Exception)
  from wrap-log.cr:23:3 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:105:5 in 'main_user_code'
  from /usr/share/crystal/src/crystal/main.cr:91:7 in 'main'
  from /usr/share/crystal/src/crystal/main.cr:114:3 in 'main'
  from __libc_start_main
  from _start
  from ???
$ APP_ENV=dev crystal build wrap-log.cr && CRYSTAL_LOG_LEVEL=DEBUG ./wrap-log
E, [2020-06-01T19:31:06.494732000Z #92120]   ERROR -- wrap-log:: decryption failed: key: "foo", nonce: "bar"
Unhandled exception: oh no (Exception)
  from /usr/share/crystal/src/log/log.cr:36:3 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:105:5 in 'main_user_code'
  from /usr/share/crystal/src/crystal/main.cr:91:7 in 'main'
  from /usr/share/crystal/src/crystal/main.cr:114:3 in 'main'
  from __libc_start_main
  from _start
  from ???

So if I try this macro technique while doing some timing, how to explain the longer execution time against the empty loop and the loop with a regular Log.debug? I was expecting / hoping the macro version to have the same / similar time to the empty loop. Why does it end up longer than both empty or regular Log.debug?
$ crystal eval --time 'require "log"; x = 0; y = 1000000; while x < y; x += 1; end'
Execute: 00:00:00.012807206

$ crystal eval --time 'require "log"; x = 0; y = 1000000; while x < y; x += 1; Log.debug { "dummy" }; end'
Execute: 00:00:00.019682497

$ crystal eval --time 'require "log"; Log.setup_from_env; {% begin %}; APP_ENV = {{ env("APP_ENV") || "dev" }}; {% end %}; def xdebug(*args, **nargs, &block); {% if APP_ENV != "production" %}; Log.debug(*args, **nargs) { yield }; {% end %}; end; x = 0; y = 1000000; while x < y; x += 1; xdebug { "dummy" }; end'
Execute: 00:00:00.024651870

You include Log.setup_from_env and then not...

Thanks. And I left out the all important APP_DEV= :-) Here are the updated timings, and as you can see the macros appear to be working with the APP_DEV=dev timing end up similar to the regular Log.debug without macros, and the APP_DEV=production timing ending up similar to the empty loop:
$ crystal eval --time 'require "log"; Log.setup_from_env; x = 0; y = 10000000; while x < y; x += 1; end'
Execute: 00:00:00.036791254

$ crystal eval --time 'require "log"; Log.setup_from_env; x = 0; y = 10000000; while x < y; x += 1; Log.debug { "dummy" }; end'
Execute: 00:00:00.133681288

$ APP_ENV=dev crystal eval --time 'require "log"; Log.setup_from_env; {% begin %}; APP_ENV = {{ env("APP_ENV") || "dev" }}; {% end %}; def xdebug(*args, **nargs, &block); {% if APP_ENV != "production" %}; Log.debug(*args, **nargs) { yield }; {% end %}; end; x = 0; y = 10000000; while x < y; x += 1; xdebug { "dummy" }; end'
Execute: 00:00:00.135630305

$ APP_ENV=production crystal eval --time 'require "log"; Log.setup_from_env; {% begin %}; APP_ENV = {{ env("APP_ENV") || "dev" }}; {% end %}; def xdebug(*args, **nargs, &block); {% if APP_ENV != "production" %}; Log.debug(*args, **nargs) { yield }; {% end %}; end; x = 0; y = 10000000; while x < y; x += 1; xdebug { "dummy" }; end'
Execute: 00:00:00.036284051

Also you are not setting APP_ENV=production.
Try this:
require "benchmark"
require "log"
Log.setup_from_env

{% begin %}
  APP_ENV = {{ env("APP_ENV") || "dev" }}
{% end %}

def xdebug(*args, **nargs, &block)
  {% if APP_ENV != "production" %}
    Log.debug(*args, **nargs) { yield }
  {% end %}
end

Benchmark.ips do |z|
  z.report("loop") do
    x = 0
    y = 1000000
    while x < y
      x += 1
    end
  end
  z.report("log") do
    x = 0
    y = 1000000
    while x < y
      x += 1
      Log.debug { "dummy" }
    end
  end
  z.report("log macro") do
    x = 0
    y = 1000000
    while x < y
      x += 1
      xdebug { "dummy" }
    end
  end
end

Run with APP_ENV=production crystal foo.cr --release.
These are my results:
     loop 804.87M (  1.24ns) (± 4.52%)  0.0B/op        1.02× slower
      log 417.00  (  2.40ms) (± 4.31%)  0.0B/op  1962213.56× slower
log macro 818.24M (  1.22ns) (± 5.03%)  0.0B/op             fastest

I guess that's the disadvantage of the benchmark module... you need to run it multiple times for each unique macro combination...


Please add Lithuanian language to Crowdin

Please add Lithuanian language to Crowdin

Hi @welaq. It's been added. https://crowdin.com/project/alkitab/lt


Add Book Recommender AI tool

What does this PR do?

Fixes #39
https://github.com/user-attachments/assets/c92aaff1-5399-4ec1-9802-4a84021148d0
please review this pr thanks! @iamkanhaiyakumar

Type of change

Bug fix (non-breaking change which fixes an issue)
Chore (refactoring code, technical debt, workflow improvements)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
This change requires a documentation update

How should this be tested?

[ ] Test A
[ ] Test B

Mandatory Tasks

[ ] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

@sanjay-kv @GauravKesh  you forgot to add level in it.

@sanjay-kv @GauravKesh you forgot to add level in it.

@sezallagwal really sorry
Now i have added


Add new Green Funds Content Type after December 10.

This is a placeholder ticket for now, just submitting to send IT a heads up that it's happening. We are finalizing the spreadsheet for a new Green Funds content type in the Hub. I should have details and updated instructions ready on or after December 10.
Thanks!

This was completed some time ago so I'm closing this ticket.


Selection is slow on some nodes (e.g. Skeleton or AnimationPlayer) in the scene tree dock

Godot version: 3.1 (commit: ce114e35dda4b3f282abb458f8409db2369b279e)
OS/device including version: Windows 10
Issue description:
When selecting nodes in the scene hierarchy some nodes have a big delay between mouse click and actual selection of the node even with a simple scene.
Steps to reproduce:
Please check the video file.
Minimal reproduction project:
MicroDungeons.zip

This is probably related to the Skeleton's gizmo, which might be recreated each time the node is selected I guess?

I've noticed being slow when selecting the AnimationPlayer node also, not only on Skeleton node.

I've noticed being slow when selecting the AnimationPlayer node also, not only on Skeleton node.

@heretique Can you (or anyone else) still reproduce this bug in Godot 3.3.2 or any later release?
If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.

I'm away from my computer for one week. I could check when I get back if it's not too late.

I can reproduce this bug with 3.4 on the third person shooter when selecting the player skeleton. I suspect it's because it's creating inspector properties for every single bone.


Make A Person is not passing, despite passing in my sandbox environment

Challenge Make a Person has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
var Person = function(firstAndLast) {
				this.firstName = "";
				this.lastName = "";
				this.fullName = "";
				this.setFullName(firstAndLast);
			};
Person.prototype.getFirstName = function() {
				return this.firstName;
			};
			Person.prototype.getLastName = function() {
				return this.lastName;
			};
			Person.prototype.getFullName = function() {
				return this.fullName;
			};
			Person.prototype.setFirstName = function(firstName) {
				this.firstName = firstName;
				this.fullName = firstName + " " + this.lastName;
			};
			Person.prototype.setLastName = function(lastName) {
				this.lastName = lastName;
				this.fullName = this.firstName + " " + lastName;
			};
			Person.prototype.setFullName = function(firstAndLast) {
				var arr = firstAndLast.split(" ");
				this.firstName = arr[0];
				this.lastName = arr[1];
				this.fullName = firstAndLast;
			};

var bob = new Person('Bob Ross');
bob.getFullName();

Fails on tests:
Object.keys(bob).length
bob.firstName should return undefined. (Why?)
bob.lastName should return undefined. (Why?)
Isn't "Object.keys(bob).length" redundant if the other 9 tests that prove the required functions exist (and are working)?

Github issues are not for challenge help. Please visit the Help Chat for assistance. Thanks and happy coding!

I'm not seeking help. The exercise fails my code despite all tests (except 3) are working. The tests that fail are spurious and can be proven to be spurious by the fact that the other 9 tests prove that Object.keys(bob).length is simply not accurate and that bob.firstName and bob.lastName have an obfuscated meaning at the very least. What are these two tests even for? If this issue is not properly reviewed, I'll escalate further.

The tests are not spurious. This challenge says:

These methods must be the only available means for interacting with the object.

This means that exposing the variables as properties of the object is not allowed, which is what these tests are checking for. This challenge is looking for you to hide the actual variables and only expose them through getters and setters. Your code does not fulfill this requirement.

Thanks for the reply - your response - whilst informative - is new information to me. For your reference, the instructions simply say "These methods must be the only available means for interacting with the object." It does not say, per your advice "hide the actual variables and only expose them through getters and setters". Perhaps, to avoid confusion, the instructions could be made a little clearer? I'll look at my code now that I know I'm supposed to hide the variables. Case closed now.


Added minimal support for EDL speed effects.

This only understands EDL FREEZE FRAME and M2 motion effects. It doesn't turn them into OTIO Effects, it just fudges the Clip source_range to match the EDL's record timecode, so the overall timing of the timeline will be correct, but it doesn't properly represent the correct source media that should be displayed.

Also, the test EDL for this is fairly long, which uncovered a performance issue related to copy/deepcopy that I've attempted to address.

FYI, I A/B tested a few variations of deepcopy implementations. The best I could do was to get the core-tests to run in 3.5s (as opposed to 15s without this optimization).
It looks like deepcopy is known to be slow, presumably because it is trying to deal with cycles: https://stackoverflow.com/questions/24756712/deepcopy-is-extremely-slow
In our case, we know that TimeRange and RationalTime are meant to be value types, so we can take a shortcut that saves a lot of overhead.


Update routes.py and test_routes.py for update promotion with given promotion id

Update routes.py and test_routes.py, got code coverage 94%

Update routes.py and test_routes.py, got code coverage 94%

your test for 404 not found was testing the correct endpoint, it was hitting the get endpoint, not post. I fixed this. We are at 95% now. You also did not merge master or lint, I did both. This is ready now.


[PROPOSAL] First-class distributed tracing

Over the past weeks, I've been struggling to get distributed tracing to work.
My observation is that a Java application that uses the Dapr SDK for Java does not propagate the traceparent HTTP-header from a call it receives from the sidecar back to the sidecar (e.g. one that does invokeMethod or publishEvent).
Looking at the code, I think that if the sidecar would use gRPC to invoke the Java application, it wouldn't work either - the grpc-trace-bin, traceparent or tracestate headers are propagated but read from an empty Context, it seems. But I haven't been able to let the sidecar talk gRPC to my Java apps, so I'm not 100% sure about this.
Nevertheless, in a platform that wants to simplify distributed systems, I think tracing is an essential thing. I'd love to see the Dapr SDK for Java make it as easy as possible to leverage what Dapr has to offer in this field.
Describe the proposal
Provide the Dapr client code (at least DaprClientBuilder, DaprHttpBuilder, DaprClientHttp and DaprClientGrpc classes, maybe more) with a "strategy" to get a traceparent header value. Use that strategy to enrich calls from the application to the sidecar.
The default implementation should return an empty value. A user can supply their own implementation based on the frameworks they are using. For instance, I could envision an implementation that uses OpenTelemetry's Span class to find the correct value for the traceparent header.

I am open to make this integration as easy as possible. Have you checked the current example showing how to accomplish this with the current version of the SDK? https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/tracing
I would love to get more details on what "easy" would look like. I have a feeling it will fall into the spring boot part of the SDK since that is where we can inject more opinions on how apps should use Dapr.

I do not think we should put too much into the spring boot part as many use alternatives to spring boot or even grpc. I think the spring boot would just apply the last glue code but we should make it easier to do this manually for everyone.
What would be easier? (without much thought of consequences)
One option would be to add helper methods to DaprClientBuilder like new DaprClientBuilder().withSpan("Method name").build() to start new and new DaprClientBuilder().appendSpan(traceParams).build() to continue an existing trace.
The DaprClient shouldn't need to call client.subscriberContext(getReactorContext()) as the client then already knows about the tracing.

I do not think we should put too much into the spring boot part as many use alternatives to spring boot or even grpc. I think the spring boot would just apply the last glue code but we should make it easier to do this manually for everyone.

Totally agree! In the Java world, Spring is one of many choices, and I don't think Dapr should "push" developers to use one framework or another.

The DaprClient shouldn't need to call client.subscriberContext(getReactorContext()) as the client then already knows about the tracing.

That sounds like a good thing. Manually passing on / creating tracing contexts is error prone and could easily be overseen. I was thinking maybe we could even have a "tracing context enricher" or something similar. That would be a strategy that the Dapr client could invoke to enrich the Reactor context with the necessary tracing data. Ideally, we could pass that when we create the Dapr client. This approach would be somehow similar to the DaprObjectSerializer, which provides the Dapr client with a strategy for serialising application objects.
The only thing I am not sure of yet, is whether a single object could fulfill that role. Maybe the tracing context depends per situation where you want to use the DaprClient.
Another option would be to add an extra overload to all the methods in the DaprClient but I feel that's not the right way to go. Every method already has quite a few overloads, making it a bit of a puzzle for users which one they need. Adding an overload to pass a tracing context will make that even harder.

I don't think Dapr should "push" developers to use one framework or another.
Just to clarify, I am perfectly fine with dapr pushing people to use spring as it is the most common framework but it is important that spring isn't the only framework available.

Having a tracing context enricher sounds like a good way forward. Adding an extra overload will make the api harder to use, as you said, so I am not in favor of doing that.

tracing context depends per situation where you want to use the DaprClient
Not sure I follow here. When wouldn't you want the full trace? Or isn't that what you are suggesting?

Not sure I follow here. When wouldn't you want the full trace? Or isn't that what you are suggesting?

I was thinking about a situation where you would invoke the DaprClient while starting a new span within the current trace. In that case, a global "tracing context enricher" would not be sufficient, as the invocation of the DaprClient was supposed to start a new span.
However, I think we shouldn't allow for that. Starting a span is specific to which tracing framework you use (e.g. OpenTelemetry, or Spring Sleuth, or ....) and just like we don't want to "push" people towards Spring, I think we shouldn't push them to a particular tracing framework either.
Hopefully, that would allow us to treat the "tracing context enricher" as a singleton. And as a consequence, we could then configure the DaprClient with it, rather than configure each call with it.
I hope to experiment with Spring Sleuth & Dapr soon. If I get that to work in a similar way as I did with OpenTelemetry, I want to revisit the ideas so far and see if this approach is still feasible.

@artursouza, this issue was supposed to be a proposal, not a question. The question is in #647 (which is now answered). Could you please label this issue as "proposal" instead?

Good news - I was able to get distributed tracing to work with Dapr & Spring Sleuth, too. Even better, I can make that fit in the same structure as the one that is used with OpenTelemetry: a Function<reactor.util.context.Context, reactor.util.context.Context>.
Since Sleuth auto-populates the Reactor Context with the Sleuth TraceContext, the "tracing context enricher" could be a singleton - it's logic is completely implemented without instance variables.
For OpenTracing, the "enricher" does need an instance variable (see this example) but I think that's not a big of a problem.
Aside
The Sleuth integration works when the app communicaties with the sidecar over gRPC, but does not when they use HTTP. Sleuth puts a few more entries in the React Context and some of their names contain a space, e.g. "interface org.springframework.cloud.sleuth.Tracer". Even when you remove those entries in a Reactor.contextWrite(.....), they pop back up when the Reactor Context is used to write HTTP headers; and HTTP header names do not allow spaces. I think the fact that you can't remove something from the context is a bug, but I need to dive into that further.
So, to get back to the original proposal:
Describe the proposal
Provide the Dapr client with a "strategy" to enrich the Reactor Context with tracing information. The DaprClientGrpc and DaprClientHttp classes will invoke that strategy to enrich calls from the application to the sidecar with a tracing context.
The contract would at the very minimum look like this:
public interface DaprTelemetryInjector
    extends java.util.function.Function<reactor.util.context.Context, reactor.util.context.Context> {
}

In order to push implementors to providing useful values, we could make it a bit more expressive by providing a default implementation, and delegating to unimplemented values:
public interface DaprTelemetryInjector
    extends java.util.function.Function<reactor.util.context.Context, reactor.util.context.Context> {

    @Override
    public Context apply(final reactor.util.context.Context context) {
        // enrich the incoming context with the result of calculateTraceState, calculateTraceParent
        // provided that they do not return null.
    }

    String calculateTraceState(final reactor.util.context.Context);
    String calculateTraceParent(final reactor.util.context.Context);
}

The default implementation could return an empty value. The Dapr SDK for Java could provide out-of-the box implementations for OpenTracing and Sleuth, two popular tracing libraries. A user could of course also supply their own implementation based on the frameworks they are using.
Because those implementations depend on external libraries, we will introduce "optional" dependencies to both the OpenTracing and the Sleuth API's.

Good news - I was able to get distributed tracing to work with Dapr & Spring Sleuth, too. Even better, I can make that fit in the same structure as the one that is used with OpenTelemetry: a Function<reactor.util.context.Context, reactor.util.context.Context>.
Since Sleuth auto-populates the Reactor Context with the Sleuth TraceContext, the "tracing context enricher" could be a singleton - it's logic is completely implemented without instance variables.
For OpenTracing, the "enricher" does need an instance variable (see this example) but I think that's not a big of a problem.
Aside
The Sleuth integration works when the app communicaties with the sidecar over gRPC, but does not when they use HTTP. Sleuth puts a few more entries in the React Context and some of their names contain a space, e.g. "interface org.springframework.cloud.sleuth.Tracer". Even when you remove those entries in a Reactor.contextWrite(.....), they pop back up when the Reactor Context is used to write HTTP headers; and HTTP header names do not allow spaces. I think the fact that you can't remove something from the context is a bug, but I need to dive into that further.
So, to get back to the original proposal:
Describe the proposal
Provide the Dapr client with a "strategy" to enrich the Reactor Context with tracing information. The DaprClientGrpc and DaprClientHttp classes will invoke that strategy to enrich calls from the application to the sidecar with a tracing context.
The contract would at the very minimum look like this:
public interface DaprTelemetryInjector
    extends java.util.function.Function<reactor.util.context.Context, reactor.util.context.Context> {
}

In order to push implementors to providing useful values, we could make it a bit more expressive by providing a default implementation, and delegating to unimplemented values:
public interface DaprTelemetryInjector
    extends java.util.function.Function<reactor.util.context.Context, reactor.util.context.Context> {

    @Override
    public Context apply(final reactor.util.context.Context context) {
        // enrich the incoming context with the result of calculateTraceState, calculateTraceParent
        // provided that they do not return null.
    }

    String calculateTraceState(final reactor.util.context.Context);
    String calculateTraceParent(final reactor.util.context.Context);
}

The default implementation could return an empty value. The Dapr SDK for Java could provide out-of-the box implementations for OpenTracing and Sleuth, two popular tracing libraries. A user could of course also supply their own implementation based on the frameworks they are using.
Because those implementations depend on external libraries, we will introduce "optional" dependencies to both the OpenTracing and the Sleuth API's.

This is an interesting proposal. Will any of the implementations have any Dapr specific logic? We might be OK to make Dapr SDK offer the interface but not offer any implementation - except in examples. This was the original intent for the DaprObjectSerializer interface but we ended up adding a default implementation - which I regret at this point because people tend to depend on that and our code had special cases for the default implementation.
We also want to minimize dependencies, so adding implementations means we need to create new artifacts to publish to Maven, one per framework. This way, users can opt-in to our implementation for each one - but I would like to avoid going down that path initially simply because of the maintenance effort to keep each one up to date and deal with breaking changes in dependencies.

I had a chat with @mthmulders about the state of distributed tracing and he referred me to this thread. Looking at the proposal, I think it's nice to have the interface. We can provide the implementation as an example. I personally prefer a nice blogpost or a repo on Github but I'm open to other suggestions in this regard.


feat(pdk) support kong.response.exit method for L4 proxy mode

In L4 proxy mode, some of the features in here makes little sense. Such
as the JSON encoding support and headers argument. Therefore they have been removed.
Also, I have been looking at the way kong.response.exit is used right now in Kong code, and it appears that the 5xx errors are the most problematic for returning directly to the client as they usually contain textual error message most certainly makes no sense to L4 protocol. Therefore, for 5xx errors we log them to the error log file before simply close the downstream connection.
Feedbacks or comments are welcomed!

Just a note here, this might make automatic PDK document generation to endup with some weird results, so that might need to be updated too on docs repo.

@bungle I did some experiments with LuaDoc and the current code generates duplicate function with the same name in the end result, and is probably not desirable. Therefore I merged them into one. That way the doc at least looks somewhat reasonable. Not sure if there is a better way though.

Note: PR is red because of bad next. Waiting for it to be green before merging.

Hi @dndx , could you rebase this branch? Let's see if tests pass afterwards.


chore(package): update semantic-release to version 6.3.2

https://greenkeeper.io/

Current coverage is 98.90% (diff: 100%)

Merging #17 into master will not change coverage

@@             master        #17   diff @@
==========================================
  Files             8          8
  Lines            91         91
  Methods          19         19
  Messages          0          0
  Branches          8          8
==========================================
  Hits             90         90
  Misses            1          1
  Partials          0          0

Powered by Codecov. Last update 8481f21...e8f0f47


[Challenge] Revamped professional UI for challenges Screen

This is the current UI of the challenges list screen

We need to come up with a revamped professional UI for challenges. This will help good UX & support future enhancements.
Plz share dummy designs and then can implementation

this looks good

@sadanandpai

source: dribbble

Can we revamp the host app with Shadcn UI? I think that will make the app look more professional. @sadanandpai

@Akhil017 sure we can

I think our main filters are JavaScript, react JS, etc. so First we should convert these filters to tabs.

Hi @sadanandpai / everyone
Just came up with some designs, Please share your thoughts..

This looks very attractive


v2.0 incompatible with Cake v3.3 because of use of Cake\ORM\Table::getConnection()

Hello and thanks for this lib, which we make a good use of at my company.
We still use CakePHP v3.3, so I am updating to you v2.0, however, line 296 of DataTablesComponent throws an exception, because you use Cake\ORM\Table::getConnection(), which was only introduced in Cake v3.4...
Line 296 is just this one : if ($this->_table->getConnection()->getDriver() instanceof Postgres) {
For now I just commented this piece of code since we don't use Postgres, but should we switch v1.0 instead or do you consider this a bug on your end that you will fix ?
Thanks for your time !

It does work. :D
From their documentation, Cake\ORM\Table::connection() and Cake\Database\Connection::driver() exists since Cake v3.0.
I will do the PR later, but today.

Fixed in 221f478


Additional unfixed issues with relativeToChangelogfile + logicalFilePath

Description
In #1277 in 4.6.2 we addressed issues with relativeToChangelogFile and logicalFilePath, but there are still reported issuese.
This is a placeholder issue as we figure out the root cause

Doesn't #2073 fix this?
Maybe loadUpdateData is not covered.

I thought it should have, and it seemed the same as your #2060 PR so tried to combine the two.
I'll do a bit more testing to see what is missing/wrong.

I tried a variety of setups with 4.6.3 but was not able to reproduce issues.  I tried with both the CLI and with spring.
Could someone who is having problems give a sample directory structure and details on how they are running liquibase?

@nvoxland Example with the sqlFile  file error sample-liquidbase-4.6.2.zip. The error is not happening with 3.8.6.
I just realized that you mentioned 4.6.3. Where could I get that version?

I can reproduce this problem. I have both Liquibase in Spring and liquibase-maven-plugin. In the Spring one, it works without any problem. But when running liquibase:status on Maven it shows me it would need to run all the database migrations.
Database CSV export
id,author,filename,dateexecuted,orderexecuted,exectype,md5sum,description,comments,tag,liquibase,contexts,labels,deployment_id
01-create-first-tables,joaoqalves,classpath:db/changelog/01-create-first-tables.xml,2022-01-04 16:25:56.878316,1,EXECUTED,8:7119a6ddd5a46c6747e3f1b823b09035,"createTable tableName=configuration; createTable tableName=shedlock; createTable tableName=user; addUniqueConstraint constraintName=uk_user_slug, tableName=user; createTable tableName=team; createIndex indexName=idx_team_marca_id, tableName=team; ...",,,3.10.2,,,1309956214
02-populate-init-data,operez,classpath:db/changelog/02-populate-init-data.xml,2022-01-04 16:25:58.371892,2,EXECUTED,8:3cff518d7668d8a48734e036277d2540,loadData tableName=user; loadData tableName=statistic_type; loadData tableName=week,,,3.10.2,,,1309956214
03-create-prizes-tables,joaoqalves,classpath:db/changelog/03-create-prizes-table.xml,2022-01-04 16:25:58.442448,3,EXECUTED,8:475d9c9f3ed3f8711f362344b8002993,createTable tableName=prize,,,3.10.2,,,1309956214
04-populate-prizes-data,joaoqalves,classpath:db/changelog/04-populate-prizes-data.xml,2022-01-04 16:25:58.899903,4,EXECUTED,8:6118ad1309a4161cc8604ae3829a2748,loadData tableName=prize,,,3.10.2,,,1309956214
05-add-new-statistic-type,joaoqalves,classpath:db/changelog/05-add-new-statistic-type.xml,2022-01-04 16:25:59.274246,5,EXECUTED,8:263f6121ce984a14fcda5eef1b1b39ae,loadData tableName=statistic_type,,,3.10.2,,,1309956214
06-skip-week,joaoqalves,classpath:db/changelog/06-skip-week.xml,2022-01-04 16:25:59.284239,6,EXECUTED,8:f2c0eab9e4dc2d85a38291d8c83826aa,addColumn tableName=week,,,3.10.2,,,1309956214
07-week-matches,joaoqalves,classpath:db/changelog/07-week-matches.xml,2022-01-04 16:25:59.309414,7,EXECUTED,8:3dd34cab61bc90d2c49f67fa19249f80,addColumn tableName=week,,,3.10.2,,,1309956214
08-substitutions-users,joaoqalves,db/changelog/08-substitutions-users.xml,2022-01-05 09:22:16.26741,8,EXECUTED,8:58ddb2cadae22c09e01ee2643b8617b9,addColumn tableName=user,,,4.6.2,,,1370936104

POM file configurations
        <liquibase.sql.url>jdbc:postgresql://localhost:5432/lfm</liquibase.sql.url>
        <liquibase.sql.username>postgres</liquibase.sql.username>
        <liquibase.sql.password>password</liquibase.sql.password>
        <liquibase.sql.driver>org.postgresql.Driver</liquibase.sql.driver>
        <liquibase.sql.changelogfile>src/main/resources/db/liquibase-changelog.xml</liquibase.sql.changelogfile>

        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>4.6.2</version>
        </dependency>

<plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <version>4.6.2</version>
                <configuration>
                    <changeLogFile>${liquibase.sql.changelogfile}</changeLogFile>
                    <driver>${liquibase.sql.driver}</driver>
                    <url>${liquibase.sql.url}</url>
                    <username>${liquibase.sql.username}</username>
                    <password>${liquibase.sql.password}</password>
                    <verbose>true</verbose>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>update</goal>
                            <goal>status</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.postgresql</groupId>
                        <artifactId>postgresql</artifactId>
                        <version>${postgresql.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

Result from Plugin execution
[INFO] Reading from databasechangelog
8 change sets have not been applied to postgres@jdbc:postgresql://localhost:5432/lfm
     src/main/resources/db/changelog/01-create-first-tables.xml::01-create-first-tables::joaoqalves
     src/main/resources/db/changelog/02-populate-init-data.xml::02-populate-init-data::operez
     src/main/resources/db/changelog/03-create-prizes-table.xml::03-create-prizes-tables::joaoqalves
     src/main/resources/db/changelog/04-populate-prizes-data.xml::04-populate-prizes-data::joaoqalves
     src/main/resources/db/changelog/05-add-new-statistic-type.xml::05-add-new-statistic-type::joaoqalves
     src/main/resources/db/changelog/06-skip-week.xml::06-skip-week::joaoqalves
     src/main/resources/db/changelog/07-week-matches.xml::07-week-matches::joaoqalves
     src/main/resources/db/changelog/08-substitutions-users.xml::08-substitutions-users::joaoqalves

Liquibase changelog file
<databaseChangeLog
        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
         http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">

    <include file="changelog/01-create-first-tables.xml" relativeToChangelogFile="true"/>
    <include file="changelog/02-populate-init-data.xml" relativeToChangelogFile="true"/>
    <include file="changelog/03-create-prizes-table.xml" relativeToChangelogFile="true"/>
    <include file="changelog/04-populate-prizes-data.xml" relativeToChangelogFile="true" />
    <include file="changelog/05-add-new-statistic-type.xml" relativeToChangelogFile="true" />
    <include file="changelog/06-skip-week.xml" relativeToChangelogFile="true" />
    <include file="changelog/07-week-matches.xml" relativeToChangelogFile="true" />
    <include file="changelog/08-substitutions-users.xml" relativeToChangelogFile="true" />
</databaseChangeLog>

Thank you, @joaoqalves, I'll take another look.

I checked out tag v4.7.0 changed line liquibase.integration.spring.SpringResourceAccessor:146 in method getCompletePath(String relativeTo, String path). I replaced resourceLoader with new DefaultResourceLoader(resourceLoader.getClassLoader()) then our liquibase 3.10.3 changeSets with <sqlFile path="example.sql"  relativeToChangelogFile="true"/> work without any changes.`
Our case:
Spring boot application 2.6.2 (latest spring-boot version)
In the application.yml
   liquibase:
    change-log: classpath:liquibase/db.changelog-master.xml

In db.changelog-master.xml located in src/main/resources/liquibase
   <include file="example/example.xml" relativeToChangelogFile="true"/>
In example.xml located in src/main/resources/liquibase/example
   <sqlFile path="example.sql" relativeToChangelogFile="true"/>
example.sql is located in src/main/resources/liquibase/example
The workaround and fix for liquibase seems to be the change of liquibase.integration.spring.SpringResourceAccessor:146
The cause of the problem is Spring's AnnotationConfigReactiveWebServerApplicationContext which extends ReactiveWebServerApplicationContext which extends GenericReactiveWebApplicationContext which extends GenericApplicationContext which extends AbstractApplicationContext which extends DefaultResourceLoader and implements ResourceLoader
The DefaultResourceLoader.getResource() works with new DefaultResourceLoader(classloader). However GenericApplicationContext overrides this method. And in GenericApplicationContext.getResources() the resourceLoader is cast to ResourcePatternResolver.
ResourcePatternResolver implements ResourceLoader
I think the same ResourcePatternResolver is also used in getResource(...). It uses the same field ResourceLoader resourceLoader; as getResources(...) without the cast.
I was unclear which implementation of ResourcePatternResolver Spring injects in to this resourceLoader. Any way the resourceLoader is null while debugging so it calls super.getResource() which is DefaultResourceLoader.getResource()
When evaluating on my break point at liquibase.integration.spring.SpringResourceAccessor:146
((AnnotationConfigReactiveWebServerApplicationContext) resourceLoader).getResourcePatternResolver().getResource(relativeTo).exists(); // returns false
((AnnotationConfigReactiveWebServerApplicationContext) resourceLoader).getResource(relativeTo).exists(); // returns false
resourceLoader.getResource(relativeTo).exists(); // returns false
new DefaultResourceLoader(resourceLoader.getClassLoader()).getResource(relativeTo).exists(); // returns true

new DefaultResourceLoader().getResource() and AnnotationConfigReactiveWebServerApplicationContext.getResource() should be the same code.
The result of resourceLoader.getResource(relativeTo):
rootResource = {FilteredReactiveWebContextResource@13641} "ReactiveWebContext resource [liquibase/example/example.xml]"
 path = "liquibase/example/example.xml"

The result of new DefaultResourceLoader(ClassUtils.getDefaultClassLoader()).getResource(relativeTo):
rootResource = {DefaultResourceLoader$ClassPathContextResource@13656} "class path resource [liquibase/example/example.xml]"
 path = "liquibase/example/example.xml"
 classLoader = {RestartClassLoader@13647}
 clazz = null

Spring filters the Resource returned by the getResource() from AnnotationConfigReactiveWebServerApplicationContext and wraps it as FilteredReactiveWebContextResource. The comment in FilteredReactiveWebContextResource: "Resource implementation that replaces the org.springframework.web.context.support.ServletContextResource in a reactive web application. exists() always returns false in order to avoid exposing the whole classpath in a non-servlet environment."
Resource rootResource = new DefaultResourceLoader(resourceLoader.getClassLoader()).getResource(relativeTo) might be a solution on liquibase.integration.spring.SpringResourceAccessor:146?

Hi team and @nvoxland
Issue with 4.x version which i can't see related issue with 3.10.3 for the path given to changelog file.
when upgrade to 4.x below releative path issue coming. please resolve this issue, its thr since 4.x intial verison released.
have been asked many times to resolve it, but no solution given, and now same with 4.8.0. alos ,as vulnerabilities have come before 4.8.0 so has to move to 4.8.0 or latest but this relative path issue not leeting to move.
Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter.
at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:99)
at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:15)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:369)
at liquibase.Liquibase.lambda$update$1(Liquibase.java:224)
at liquibase.Scope.lambda$child$0(Scope.java:180)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:179)
at liquibase.Scope.child(Scope.java:158)
at liquibase.Liquibase.runInScope(Liquibase.java:2405)
at liquibase.Liquibase.update(Liquibase.java:211)
at liquibase.Liquibase.update(Liquibase.java:197)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:314)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:269)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
... 55 more

https://github.com/liquibase/liquibase/pull/2758

I'm also facing the same problem since upgrading to the 4.x loads.  Our project runs liquibase in a docker.  We have no problems running any of the commands with Docker scripts, but many of our users need Singularity, which does not run as root.  All liquibase commands fail when Singularity wraps our docker image - "Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter."
This may not be new information, but I'm adding to let you know of other scenarios where this fails.  At this point I feel the only solution is to drop back to a 3.x version

Worked for me in 4.12.0 but broke again in 4.13.0.
Part of change log file
<changeSet id="id-name" author="author-name">         <sqlFile path="sqlFile.sql"                  relativeToChangelogFile="true"                  splitStatements="true"                  stripComments="false"                  endDelimiter="\nDELIM"         />     </changeSet>
Result from Plugin execution
[java] Exception in thread "main" liquibase.exception.LiquibaseException: liquibase.exception.UnexpectedLiquibaseException: java.io.IOException: The file sqlFile.sql was not found in the configured search path:      [java]     - Spring resources      [java] More locations can be added with the 'searchPath' parameter.      [java]     at liquibase.Liquibase.runInScope(Liquibase.java:2405)      [java]     at liquibase.Liquibase.update(Liquibase.java:208)      [java]     at liquibase.Liquibase.update(Liquibase.java:194)      [java]     at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:314)      [java]     at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:269)      [java]     at com.our.package.liquibase.LiquibaseVerifier.executeChangeLog(LiquibaseVerifier.java:146)      [java]     at com.our.package.liquibase.LiquibaseVerifier.execute(LiquibaseVerifier.java:62)      [java]     at com.our.package.Bootstrap.main(Bootstrap.java:76)      [java] Caused by: liquibase.exception.UnexpectedLiquibaseException: java.io.IOException: The file sqlFile.sql was not found in the configured search path:      [java]     - Spring resources      [java] More locations can be added with the 'searchPath' parameter.      [java]     at liquibase.change.AbstractSQLChange.generateCheckSum(AbstractSQLChange.java:203)      [java]     at liquibase.changelog.ChangeSet.generateCheckSum(ChangeSet.java:312)      [java]     at liquibase.sqlgenerator.core.UpdateChangeSetChecksumGenerator.generateSql(UpdateChangeSetChecksumGenerator.java:33)      [java]     at liquibase.sqlgenerator.core.UpdateChangeSetChecksumGenerator.generateSql(UpdateChangeSetChecksumGenerator.java:16)      [java]     at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30)      [java]     at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:220)      [java]     at liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:105)      [java]     at liquibase.executor.jvm.JdbcExecutor.access$400(JdbcExecutor.java:39)      [java]     at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:410)      [java]     at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:77)      [java]     at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:160)      [java]     at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)      [java]     at liquibase.changelog.StandardChangeLogHistoryService.replaceChecksum(StandardChangeLogHistoryService.java:376)      [java]     at liquibase.changelog.AbstractChangeLogHistoryService.upgradeChecksums(AbstractChangeLogHistoryService.java:75)      [java]     at liquibase.changelog.StandardChangeLogHistoryService.upgradeChecksums(StandardChangeLogHistoryService.java:300)      [java]     at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:1910)      [java]     at liquibase.Liquibase.lambda$update$1(Liquibase.java:223)      [java]     at liquibase.Scope.lambda$child$0(Scope.java:180)      [java]     at liquibase.Scope.child(Scope.java:189)      [java]     at liquibase.Scope.child(Scope.java:179)      [java]     at liquibase.Scope.child(Scope.java:158)      [java]     at liquibase.Liquibase.runInScope(Liquibase.java:2400)      [java]     ... 7 more      [java] Caused by: java.io.IOException: The file sqlFile.sql was not found in the configured search path:      [java]     - Spring resources      [java] More locations can be added with the 'searchPath' parameter.      [java]     at liquibase.change.core.SQLFileChange.openSqlStream(SQLFileChange.java:130)      [java]     at liquibase.change.AbstractSQLChange.generateCheckSum(AbstractSQLChange.java:189)      [java]     ... 28 more

Worked for me in 4.12.0 but broke again in 4.13.0.
Part of change log file
<changeSet id="id" author="author">
        <sqlFile path="file.sql"
                 relativeToChangelogFile="true"
                 splitStatements="true"
                 stripComments="false"
                 endDelimiter="\nDELIM"
        />
    </changeSet>

Result from Plugin execution
[java] Exception in thread "main" liquibase.exception.LiquibaseException: liquibase.exception.UnexpectedLiquibaseException: java.io.IOException: The file file.sql was not found in the configured search path:
     [java]     - Spring resources
     [java] More locations can be added with the 'searchPath' parameter.
     [java]     at liquibase.Liquibase.runInScope(Liquibase.java:2405)
     [java]     at liquibase.Liquibase.update(Liquibase.java:208)
     [java]     at liquibase.Liquibase.update(Liquibase.java:194)
     [java]     at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:314)
     [java]     at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:269)
     [java]     at com.our.package.liquibase.LiquibaseVerifier.executeChangeLog(LiquibaseVerifier.java:146)
     [java]     at com.our.package.liquibase.LiquibaseVerifier.execute(LiquibaseVerifier.java:62)
     [java]     at com.our.package.Bootstrap.main(Bootstrap.java:76)
     [java] Caused by: liquibase.exception.UnexpectedLiquibaseException: java.io.IOException: The file file.sql was not found in the configured search path:
     [java]     - Spring resources
     [java] More locations can be added with the 'searchPath' parameter.
     [java]     at liquibase.change.AbstractSQLChange.generateCheckSum(AbstractSQLChange.java:203)
     [java]     at liquibase.changelog.ChangeSet.generateCheckSum(ChangeSet.java:312)
     [java]     at liquibase.sqlgenerator.core.UpdateChangeSetChecksumGenerator.generateSql(UpdateChangeSetChecksumGenerator.java:33)
     [java]     at liquibase.sqlgenerator.core.UpdateChangeSetChecksumGenerator.generateSql(UpdateChangeSetChecksumGenerator.java:16)
     [java]     at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30)
     [java]     at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:220)
     [java]     at liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:105)
     [java]     at liquibase.executor.jvm.JdbcExecutor.access$400(JdbcExecutor.java:39)
     [java]     at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:410)
     [java]     at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:77)
     [java]     at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:160)
     [java]     at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
     [java]     at liquibase.changelog.StandardChangeLogHistoryService.replaceChecksum(StandardChangeLogHistoryService.java:376)
     [java]     at liquibase.changelog.AbstractChangeLogHistoryService.upgradeChecksums(AbstractChangeLogHistoryService.java:75)
     [java]     at liquibase.changelog.StandardChangeLogHistoryService.upgradeChecksums(StandardChangeLogHistoryService.java:300)
     [java]     at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:1910)
     [java]     at liquibase.Liquibase.lambda$update$1(Liquibase.java:223)
     [java]     at liquibase.Scope.lambda$child$0(Scope.java:180)
     [java]     at liquibase.Scope.child(Scope.java:189)
     [java]     at liquibase.Scope.child(Scope.java:179)
     [java]     at liquibase.Scope.child(Scope.java:158)
     [java]     at liquibase.Liquibase.runInScope(Liquibase.java:2400)
     [java]     ... 7 more
     [java] Caused by: java.io.IOException: The file file.sql was not found in the configured search path:
     [java]     - Spring resources
     [java] More locations can be added with the 'searchPath' parameter.
     [java]     at liquibase.change.core.SQLFileChange.openSqlStream(SQLFileChange.java:130)
     [java]     at liquibase.change.AbstractSQLChange.generateCheckSum(AbstractSQLChange.java:189)
     [java]     ... 28 more

Package Structure
├── pom.xml
├── src
│   ├── assembly
│   │   └── assembly.xml
│   └── main
│       └── resources
│           ├── changelog.xml
│           ├── init.sql
│           └── file.sql

@nvoxland wondering if the searchPath from 4.13 could be used to resolve whatever @danilmalkin is facing?

@kataggart Yeah, I forgot to mention it. I used searchPath and it worked fine. But it looks like a workaround not a solution
Updated original comment

@danilmalkin what do you mean by using searchPath is a workaround and not a solution?

@kataggart I debugged SpringResourceAccessor.
Issue for me in this line
We don't have a "/" prefix before our files. In this case, the regex doesn't match our relativeTo="changeLog.xml" and doesn't replace it. I tried with regex /?[^/]+$ and it works fine.

after releasing the fix in 4.16.0 works for me

It worked in 4.16.1, but after update to 4.17.0 it's broken again.
@uwe42

The version 4.17.2 it's still broken.
This affects the migration to Spring Boot 3.0.1, as it is the version chosen in the dependency management.
https://docs.spring.io/spring-boot/docs/3.0.1/reference/html/dependency-versions.html

This issue seems to be fixed in 4.19.0, with #3355
I've have updated it in my Spring Boot 3.0.1 and it works fine

Also java.io.FileNotFoundException: JAR entry db/1.4.0/../init_objects/procedures.sql not found in /<absolutePath>/build/libs/core-1.15.0-dev.jar appears now if i am using relativePath (4.19.0)
is .. in relative paths (using jars) not allowed? Because the file db/init_objects/procedures.sql exists in the jar

Most reports here are about <include> tag.
I had similar problem with <loadUpdateData> tag.
With these file locations:
src/main/resources/db/changelog/db.changelog-2.0.xml
src/main/resources/db/changelog/data/country.csv

And db.changelog-2.0.xml contains:
<loadUpdateData tableName="country" primaryKey="id" file="data/country.csv" relativeToChangelogFile="true">

With Liquibase 4.17.2 (current default in the latest spring-boot v3.0.5) I had the following error:
java.io.FileNotFoundException: C:\Users\me\project-name\target\classes\db\changelog\..\data\country.csv

For some reason ..\ was added to the path making it incorrect as there is no db\data\country.csv.
After manually overriding Liquibase version to 4.21.1 (the latest at the moment) the problem is fixed. I'm not sure what commit exactly fixed this, but this information could be useful for next people who have the same problem.
To manually override Liquibase in a spring-boot project it's enough to add <liquibase.version>4.21.1</liquibase.version> into the <properties> section.

Hi Team,
Recently we had updated the liquibase library from 4.8.0 to 4.21.1 and we are noticing the below issue when we are executing liquibase.update on a single changeset which is present externally
Caused by: liquibase.exception.DatabaseException: Error creating configured table through liquibase, error liquibase.exception.ChangeLogParseException: The file /var/opt/SIU/tracing_data_15.xml was not found in the configured search path:

/opt/SIU/plugins/com.hp.usage.migratedb_10.11.0/commons-text-1.10.0.jar
/opt/SIU/plugins/com.hp.usage.migratedb_10.11.0/derbyclient-<IP_ADDRESS>.jar
/opt/SIU/plugins/com.hp.usage.migratedb_10.11.0/extension-1.0.1-SNAPSHOT-patched.jar
/opt/SIU/plugins/com.hp.usage.migratedb_10.11.0/liquibase-core-4.21.1.jar
/opt/SIU/plugins/com.hp.usage.migratedb_10.11.0/migratedb.jar
/opt/SIU/plugins/com.hp.usage.migratedb_10.11.0/opencsv-5.7.1.jar
/opt/SIU/plugins/com.hp.usage.migratedb_10.11.0/timesten-types-1.0.1-SNAPSHOT-patched.jar

The code is simple liquibase.update below which used to work with earlier version of library
conn = _dataSource.getConnection();
Database database = DatabaseFactory
.getInstance()
.findCorrectDatabaseImplementation(new JdbcConnection(conn));
ResourceAccessor resourceAccessor = new StreamResourceAccessor(Files.readString(path));
liquibase = new Liquibase(tracingFilePath, resourceAccessor, database);
liquibase.validate();
liquibase.update(CONTEXT);
could you please help me to proceed?

@xak2000 I'm having exact same issue nested changelog relative path was suddenly suffixed with "../". Though at first we tried to fix it with again specifying the child part of the path manual upgrading to new version is the way to go even though now version isn't aligned with our SpringBoot framework version.
Thanks you saved my day!

On 4.21.1 still not fixed. I even tried to use searchPath to "patch" it but with no luck:
`The file C:/Work/IdeaProjects/okr-skif/modules/skif-migration/skif-common-migration-pg/target/database/changelog/changelog-master-ci.xml was not found in the configured search path:
- C:\Work\IdeaProjects\okr-skif\modules\skif-migration\skif-common-migration-pg\target\database\changelog
- C:\Work\IdeaProjects\okr-skif\modules\skif-migration\skif-common-migration-pg\target\database\changelog\base
- C:\Work\IdeaProjects\okr-skif\modules\skif-migration\skif-common-migration-pg\target\database\sql`

PS. Run via liquibase plugin from IDE.

Hello,
I have the same problem with this. After upgrade I have error:
Unexpected error running Liquibase: java.io.IOException:
Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter.
Problem was not happening before....


Inconsistency for tos in atmosphere realm (currently it has been named tso).

If in the taskloader variables are encountered which occur in both the nemopar.json and ifpar.json it has to be distinguished which of both has to be selected. Currently it is inpossible to handle this situation, whereas this doe occur in the data request: tos is an example of this.

rev. 123c147191311b2d2de8d975aa7b05339812a74a


LNK module

This module will parse the Windows Shell Link (LNK) file format, and make a lot of it's data accessible via YARA. The motivation for creating this module is that the LNK file format is non-standard to parse, and would be difficult to do so within a YARA rule itself (see the documentation here: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/16cb4ca1-9339-4d0c-a68d-bf1d6cc0f943). I hope by making this module that it makes life easier to write YARA rules for LNK files.
This module allows for rules like this to be possible:
import "lnk"

rule is_lnk
{
    condition:
        lnk.is_lnk
}

rule machine_id_tracking
{
    condition:
        lnk.tracker_data.machine_id == "chris-xps"
}

rule local_base_path
{
    condition:
        lnk.link_info.local_base_path == "C:\\test\\a.txt"
}

I'd be very interested to hear feedback on the code itself, or the structure of the data surfaced by the module (e.g. is it easy to access/use).

fuzz_lnks.zip
^ I've added the LNKs I used when doing some fuzzing against this module, in case it is helpful!

Updated this branch to be compatible with YARA 4.3.0. At time of this comment, all tests pass as expected.

Updated for compatibility with YARA v4.3.2; tests passing as expected.

I tried to merge this PR but it turns out that the tests are failing in big endian platforms: https://github.com/VirusTotal/yara/actions/runs/5960808590/job/16168792006

I tried to merge this PR but it turns out that the tests are failing in big endian platforms: https://github.com/VirusTotal/yara/actions/runs/5960808590/job/16168792006

That's weird @plusvic , they seemed to be working before (https://github.com/VirusTotal/yara/actions/runs/5772402091/job/15647348631). I'll debug what is failing in the tests and get back to you.


Kia EV6: invalid consecutive frames - failed fingerprint

ff2bd20623fcaeaa|2023-08-28--14-30-14

Fixed by https://github.com/commaai/openpilot/pull/29693

Didn't check the buses, the camera is just failing to respond. 1988 is our messages to the camera, 2000 is our messages to the radar:


Add with (nolock) hint to table queries

Select statements on data tables should have the with (nolock) hint added, to reduce lock contention.

Resolved with PR #21


Create bcpsk12.net

@O2theC lib/domains/net/bcpsk12.net: this request has an incorrect file path format, please ensure that you are familiar with     this repository rules located at the bottom of this page and change     your request accordingly. If you don't know how to change request, close it and open a new one.     If you are not able to make the pull request according the instructions, please send us an email to<EMAIL_ADDRESS>Please mention this request URL in the message.

@philipto fixed it, no clue why i named it as a .net file instead of a .txt file, weird .

@O2theC First stage of verification passed, official domain is bcpsk12.net as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.

@O2theC Thank you for your patience while waiting for a review and processing your request. Pull request merged.


ReLERNN_PREDICT_HOTSPO unable to run

When I run ReLERNN_PREDICT_HOTSPOT with default parameters, I get an error of
File "/project-whj/software/ReLERNN/ReLERNN/ReLERNN_PREDICT_HOTSPOT", line 100, in main
pred_sequence = VCFBatchGenerator(**bds_pred_params)
TypeError: init() got an unexpected keyword argument 'WIN'
Even using the examples file of the software, I don't know how to solve it, please give me your guidance

Hi @Joyce121, unfortunately the hotspot prediction code was exploratory/experimental and is not currently being developed. The working functions of ReLERNN are those that are described in the README. I apologize for the confusion. I will discuss removing the hotspot prediction code from the repo to avoid further confusion. Thank you for bringing this to my attention.


Add initContainer to download model

Description
Add initContainer to download model to avoid the permission conflict issue of the .locks directory in the host modeUseHostPath path, when sharing the host model directory between different services.
Issues
n/a.
Type of change
List the type of change like below. Please delete options that are not relevant.

[x] New feature (non-breaking change which adds new functionality)

Dependencies
List the newly introduced 3rd party dependency if exists.
Tests
Describe the tests that you ran to verify your changes.

Has this been tested with k8s volumes with ReadWriteMany where multiple containers update a shared volume? Or is it expected to work similar to the host path case?

My K8s volume question went unanswered. I guess, I'll be filing issues if it does not work. My bet is that it won't...

@poussa I remembered @yongfengdu has tested the PVC case, but only on NFS storage class if I remembered correctly.


Delete .DS_Store

I think one PR (#1) is enough. :p

Merged! Thanks for the PR...not sure how I missed that in the .gitignore.

this one lives in lib/ while the other is in root directory

Oh, sry. My fault.


Monitor count +1

System Info and Version
 System/Version info
Hyprland, built from branch  at commit  dirty ().
Date:
Tag: , commits:

flags: (if any)

System Information:
System name: Linux
Node name: nixos
Release: 6.6.32
Version: #1-NixOS SMP PREEMPT_DYNAMIC Sat May 25 14:22:56 UTC 2024

GPU information:
07:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:1c03] (rev a1) (prog-if 00 [VGA controller])

os-release: ANSI_COLOR="1;34"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.05.20240606.9b5328b"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 24.05 (Uakari)"
SUPPORT_END="2024-12-31"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.05 (Uakari)"
VERSION_CODENAME=uakari
VERSION_ID="24.05"

plugins:

Bug or Regression?
Bug
Description
Hyprland somehow thinks that I have more than 2 monitors attached (?) with hyprctl monitors providing the following:
....
Monitor Unknown-1 (ID 2):
<EMAIL_ADDRESS>at 4480x0
	description:
	make:
	model:
	serial:
	active workspace: 3 (3)
	special workspace: 0 ()
	reserved: 0 31 0 0
	scale: 1.00
	transform: 0
	focused: no
	dpmsStatus: 1
	vrr: 0
	activelyTearing: false
	disabled: false
	currentFormat: Invalid
	availableModes<EMAIL_ADDRESS>
I do not own any monitors with that size nor are there any additional display devices plugged into the system.
This issue causes my mouse to go out of bounds on the right hand side of the second monitor.
How to reproduce
I have no clue but this happened once I moved to NixOs 24.05 (did not occur on 23.11).  If this issue is not already fixed I'll try to post my nixos config.
Crash reports, logs, images, videos
No response

they should make a medicine that makes you read the wiki https://wiki.hyprland.org/FAQ/#workspaces-or-clients-are-disappearing-or-monitor-related-dispatchers-cause-crashes


scaffolder doesn't use plural from DbSet

new shorter instructions

Create a RP web app named RazorPagesMovie
Follow these instructions EXCEPT - name the DbSet plural
public DbSet<Movie> Movies { get; set; }

This tutorial had 30K confirming it works until an update was made to change to the plural public DbSet<Movie> Movies { get; set; }
-- what follows is essentially the same instructions
In VS, create a new Razor Pages (RP) app named ContosoUniversity
Create a Models folder. In the Models folder, create a class file named Student.cs and replace the code with the following:
using System;
using System.Collections.Generic;

namespace ContosoUniversity.Models
{
    public class Student
    {
        public int ID { get; set; }
        public string LastName { get; set; }
        public string FirstMidName { get; set; }
        public DateTime EnrollmentDate { get; set; }
    }
}

In the Data folder create a new class file named SchoolContext.cs, and replace the template code with the following code:
using ContosoUniversity.Models;
using Microsoft.EntityFrameworkCore;

namespace ContosoUniversity.Data
{
    public class SchoolContext : DbContext
    {
        public SchoolContext(DbContextOptions<SchoolContext> options) : base(options)
        {
        }

        public DbSet<Student> Students { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {

            modelBuilder.Entity<Student>().ToTable("Student");
        }
    }
}

Add SchoolContext to the DI container:
// ADD EF using
// using Microsoft.EntityFrameworkCore;

public void ConfigureServices(IServiceCollection services)
{
    services.AddDbContext<Data.SchoolContext>(options =>
        options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));

    services.AddMvc();
}

Open the appsettings.json file and add a connection string as shown in the following code:
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=ContosoUniversity1;Trusted_Connection=True;MultipleActiveResultSets=true"
  },
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Warning"
    }
  }
}

In the Package Manager Console (PMC), enter the following commands:
Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design -Version 2.0.0
Add-Migration Initial
Update-Database

*Scaffold the model
dotnet aspnet-codegenerator razorpage -m Student -dc SchoolContext -udl -outDir Pages\CU --referenceScriptLibraries
Build the project. You get errors
 error CS1061: 'SchoolContext' does not contain a definition for 'Student' and no extension method 'Student'
Here is the generated code:            _context.Student.Add(Student);
It should be plural
_context.Students.Add(Student);

Related to the issue outlined, the scaffolder also generates singular names for collection properties, which is odd, in my opinion. So instead of
public IList<Student> Students { get; set; }

you get
public IList<Student> Student { get; set; }

And in the Razor Page:
@foreach (var item in Model.Student) {

how do you fix this error from happening, what and where would i change the text?

@philysworld
This issue fixes the problem and has nothing to do with my tutorial.
Globally means in every file where  _context.Student occurs.  If you're using Visual Studio:

Ctrl+Shift+F to bring up the Find and Replace dialog.
Select the Replace in Files tab.
Complete the dialog

am not to sure what page you guys are looking at but i changed in my project every file and coding that had Student to Students and still getting the error.
also for this cmd do i have to input my local database name

Thank you Rick, your tutorials are the best I could find. The last clarification on how to proceed was what I needed. Some of us need as much detail as possible to fully understand the issue and how to fix it.

@Eilon - you mentioned earlier that this was targeted for the March patch.  Can you comment on whether or not that happened?


crd: add hosts max length

controller-gen does not support validating internal list items on list types, see https://github.com/kubernetes-sigs/controller-tools/issues/342
To add host pattern we used perl hack that is hard to extend to multiple validations.
Also #16 added optional tls spec that contains hosts field for which perl hack worked by accident, see https://github.com/szuecs/routegroup-client/pull/16#discussion_r1443561139
This change replaces perl hack for a go hack and adds max length constraint.

:+1:

:+1:


apply node mdl generator

:tada: This PR is included in version 1.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


change preview image

Please cant you tell me how to change the preview images?? i want to use it dynamically.
Thank for help!

thanks @silencerspirit !!


Add log10, log2 and log1p math functions

JavaScript and native platforms have already had log10, log2 and log1p functions for a long time. It's time to add it to SDK.
These functions are not just only convenient aliases

log(x) / ln10 => log10(x)
log(x) / ln2 => log2(x)
log(x+1) => log1p

but also, ones are more accurate. Consider JS REPL:
console.log(Math.LN10)
// 2.302585092994046
console.log(Math.log(1000.0) / Math.LN10)
// 2.9999999999999996

// But native implementation is accurate
console.log(Math.log10(1000.0))
// 3

// let's try more precise constant
let ln10 = 2.3025850929940456840179914546843642076011014886288;
console.log(Math.log(1000.0) / ln10)
// 2.9999999999999996

Thanks for your contribution! Please replace this text with a description of what this PR is changing or adding and why, list any relevant issues, and review the contribution guidelines below.

[x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.

Contribution guidelines:

See our contributor guide for general expectations for PRs.
Larger or significant changes should be discussed in an issue before creating a PR.
Contributions to our repos should follow the Dart style guide and use dart format.

Note that this repository uses Gerrit for code reviews. Your pull request will be automatically converted into a Gerrit CL and a link to the CL written into this PR. The review will happen on Gerrit but you can also push additional commits to this PR to update the code review.

Thank you for submitting this pull request! Let me know if there is anything we can do to help.

@zlumyo we'll close this unless we see follow-up soon on the code review: https://dart-review.googlesource.com/c/sdk/+/310000. Thanks.

Closing as stale.


Add Restart option inside file menu

While if i add new configuration on vscode, i need to restart manually all the time! while i do that, i need a shortcut key, or just add them on file menu at the top, so that it would be easy transition without i hunt and search them all over, or i don't want to open a terminal again to type code all the time.
Hope you could do that soon!

Does the Developer: Reload Window command in Command Palette give you the results you want? If so, you can set up your own keyboard shortcut for it.
If not, please explain why you need to restart so often.

Macros sound like fun for the [Developer: Reload Window] optioning in keyboard extras. Maybe a C++ widget/applet re-call/API to a running instance of VS Code online? or a .yml that reloads the whole thing? Or even better, a mix of both! Hmmm, thinking of Orbs...

@thirumalaivasan95 what kind of "new configurations" are you using that require a VS Code restart?

@gjsjohnmurray The feature you've mentioned just reloads the whole vs code, but it wouldn't restart, this means, while i do c++, the configuration sometimes miss the path for header file, which would turns the header file with a squiggly line.  To help resolve this, i need to do restart each and every time. Why wouldn't it so be useful if you do add restart on file menu on next update, would resolve most of the issues and dependencies, adding paths, etc., would resolve. Hope this answers your question!

@weinand Simply to reset it all back to where it was on, i mean to let the compiler know what configuration i have prefixed it into. Just no more fancy terms

/extCpp
@thirumalaivasan95 this is a problem of the C++ extension. Other language extensions don't require a restart.


Sonoff firmware 3.5.0

Good day
I want to add ewelink to my HA setup but my sonoff ewelink is on 3.5.0 and it does not want to respond with the light switches

I'm also in the same situation and I don't know what I'm doing


Strange border added around pictures in Gmail Android

Here's an example : https://litmus.com/builder/267a3b9 using the demo code on the website
direct link to the bug: https://androidgmailapp.capture.litmuscdn.com/25a39761-d7f7-4a46-b045-92df370a2dcb/results/androidgmailapp-vertical-allowed-1366.png

@fraincs sorry for the slow answer. It seems the link are now expired so we can't really see what is going on. Would be awesome if you could repost them. Apologies for the inconvenience

Well feel free to reopen if you can provide the step to reproduce ! Thanks


How to train Topology Loss in batch images

I'm looking into your example code1 and code2.
From the code2, I can understand how to train network with one image. But as code1 differs from code2 a lot, I can't understand how to train in batch.
What kinds of classes or functions do I have to use to train in batch?

How can I use LevelSetLayer2D in batch training?

Hi! I think the training in "code1" is not the best way to go anymore. However, you can look at "top_batch_cost" in utils to get inspiration to apply a specific diagram cost over a batch. Does this help?

@bruel-gabrielsson Thank you for reply.
Should I have to set $p, q, i$ (from your paper) in the cost_function?
From the code below, cost function deals with only 0-dimension topological feature, right?
https://github.com/bruel-gabrielsson/TopologyLayer/blob/1d6261017a80cff0ee06bb896ded40777b0989b4/topologylayer/functional/utils_dionysus.py#L8-L24
Besides the code, I want to use topology loss in segmentation task but there is a slow speed issue of topology loss. Do you have any idea enhancing it?

Your codes 1 and 2 look so different. Could you let me know the difference of them?
If possible, please indicate where I can refer from your paper or blog.

Hello, I am also interested in getting this to work for batches. @bruel-gabrielsson I will look at the mentioned script in utils and see how far I get.
Thanks for this contribution!

I followed the example code here and altered the forward call in class Toploss in code2 to handle batches.

Nice work! Probably could implement some parallelism if you need to speed things up!

Thanks @bruel-gabrielsson :). Do you mean parallelism on the GPU side or CPU side? One aspect I'm unsure about is: does this loss function push a tensor to the CPU to calculate the PH gradient, then back to the GPU? Or does it all stay on the same device?
Parallelism is def required since my implementation is slow, so thanks for that tip. I'll implement this :+1:


Guidance on upgrading from Samuel's version

Hi!
do you have any guidance on upgrading from Samuel's older version of the boiler plate?  i'm running webpack 4\react17\etc for for a fairly big personal project.
thanks,
Shravan

Maybe check my commit logs at around Oct 26 - 27? I haven't looked at Samuel's code for quite a while now. There are some stuff you need to do when upgrading from webpack 4 to 5, which should be captured in my commit logs.

thanks will do, if i find a procedure that works i will report back


Fix get_meta error and visual bug when editing scene with keyboard

Problem
Working in the scene tree sometimes results in this error message being thrown in console:
ERROR: get_meta: Condition ' !metadata.has(p_name) ' is true. returned: Variant()
   At: core/object.cpp:1059.

This is related to #22021. The error thrown in console
is not very detailed. it just says that something requested some metadata which does not exist. This PR only fixes one possible reason why this error might be thrown.
Cause
The error is thrown in Tree::edit_selected() on s->get_meta("__focus_rect") because the currently selected item does not have this metadata.
The word "selected" has two meanings in the Tree class. The selected item (returned by Tree::get_selected() and used in edit_selected()) is displayed with a grey border.
The selected cell (used in Tree::draw_item() and responsible for setting __focus_rect) is displayed with a grey background. This ambiguity is usually not a problem because you most likely use your mouse to select and rename Nodes in your Scene, so that the selected item also contains the selected cells and thus has a __focus_rect. This bug occurs when selecting nodes with your keyboard because then you only change the selected item (with the grey border) but not the selected cells. If you then try to rename an item which has never been selected (with the grey background) __focus_rect won't be set and this error is thrown.
I also removed a text_exitor->set_position because it causes a visual bug where the text editor to change the name of the currently selected item (with the grey border) is placed above the currently selected cell (with the grey background).
Also, it looks like only 3D scenes have this issue? In a 2D scene, I can't have a selected item with only a grey border.
EDIT it looks like this non-feature of having separate selection types in 3D scenes creates more problems than solutions, so maybe it would be better to remove this behaviour entirely.

Thanks!

I'm getting this error in 2D scenes when I call get_animation() (if the animation doesn't exist) in godot 3.3.2.
Example:
get_node("Sprite/AnimationPlayer").get_animation("AnimationThatDoesNotExist")


Bug OCPBUGS-1646: Make sure LB status is updated immediately

createFullyPopulatedOctaviaLoadBalancer() ends with a call to
WaitLoadbalancerActive(). It'll only exit without error if that
function succeeded. But later on ensureOctaviaLoadBalancer() checks
the LB's ProvisioningStatus again and exists if it's not ACTIVE. The
problem is that the comparison is done on LB instance returned from POST
call and not from one of the GET calls done in
WaitLoadbalancerActive(), so it's always PENDING_CREATE. This means
that for LB to be completely created, ensureOctaviaLoadBalancer()
always needs to be called twice, increasing number of Octavia calls
made, time for LBs to be created and user experience by creating false
positive warning Event.
In case multiple LBs are created in a short period - Service.Status
of the first one will only be populated once all of them are created as
events are processed in order. This increases the time needed to create
LBs even more.
This commit solves that by making sure WaitLoadbalancerActive()
returns last instance of LoadBalancer struct it got from Octavia API
and that that object is later used by ensureLoadBalancer() logic.

/cherry-pick release-4.12


feat: embeddable config-ui

⚠ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

[ ] I have read through the Contributing Documentation.
[ ] I have added relevant tests.
[ ] I have added relevant documentation.
[ ] I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

Does this close any open issues?
Closes https://github.com/apache/incubator-devlake/issues/2241
Screenshots
Include any relevant screenshots here.
Other Information
Any other information that is important to this PR.

thanks for your pr.
@e2corporation can you help for review it?

thanks for your pr.
@e2corporation can you help for review it?

@mappjzc I'm not sure about this ticket Embeddable UI is not something we've discussed or approved in any recent meetings for this milestone. This looks like a foreign addition to this stack.

@mappjzc This seems like a separate UI project, why is it bundled with incubator-devlake project and not a new standalone project?

@mappjzc This seems like a separate UI project, why is it bundled with incubator-devlake project and not a new standalone project?

@e2corporation  This is not my submitted pr. Maybe you would better to communicate with the creator of this pr ?

on hold, to be continued

This attempt will be suspended, and at the same time, because the code is much behind, it will turn off it.


Removed the module.modulemap file from the XCFrameworks

Changed the framework.mk file so that it no longer makes the module.modulemap file as part of its execution. In summary, the module.modulemap file does not serve a purpose within XCFrameworks which bundle up a set of static libraries. See the discussion in Issue #2185 for more detailed rationale. This change fixes issue #2185.

Merge will be done in shortly by the copybara service.


how to set the time zone in the api request ?

I mean  "scheduled_date"  in the below.
data = { "name":"Campaign sent via the API",
"subject":"My subject",
"from_name":"From name",
<EMAIL_ADDRESS>"html_content":"Congratulations ! You successfully sent this example campaign via the SendinBlue API.",
"listid": [2],
"scheduled_date":"2017-01-30 00:00:00"
}

Hi @jpca999 ,
Thank you for contacting us.
You can set the timezone from the front end, You will be not able to set timezone from API.
Setting Time Zone

Thanks got it,
How to send email I've few more questions. Where do I ask you ?
Best Regards,
Jay

On Jan 31, 2017, at 1:14 AM, amitkumarjha<EMAIL_ADDRESS>wrote:
Hi @jpca999 ,
Thank you for contacting us.
You can set the timezone from the front end, You will be not able to set timezone from API.
Setting Time Zone
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi @jpca999 ,
Thank you for contacting us.
You can raise support request from the website and put all the queries in the ticket.
https://account.sendinblue.com/support


Add opencensus spans to retries and auth token retrieval

Here's an example of using CBT with opencensus.
If users have problems, it would be great to get more information about how retries and auth token retrieval affect performance.  Adding opencensus spans around those items would be really useful.

I think auth token retrieval is under the covers in gRPC and may not be possible to instrument with opencensus. Certainly retries could be since they are in our control, and I'd also like to see information in spans that show how many items we are sending in an ApplyBulk operation.

The change to add annotation to ReadRowsResponse is being reviewed.
This has the count for the number of rows sent in ApplyBulk, which should be the same as the number of mutations. Please correct me if I am wrong about it.

We did the best we could with this issue.  Closing it for now, since the rest of the work is not specific to CBT.


Let transcripts be processed by personal assistants

Description
For now we were only able to process transcripts through Shared or Company assistants
Some users complained not understanding why they weren't receiving their transcripts.
This PR addresses the issue and lets personal assistants process the transcripts.

This PR adds Authenticator.fromUserIdAndWorkspaceId

Risk

Deploy Plan
Wait for https://github.com/dust-tt/dust/pull/6222 to be merged, switch the base of this PR to main then merge.

Replaced by https://github.com/dust-tt/dust/pull/6323 after conflicts resolution of UserResource


⚠ Samsung has degraded performance

In 69ec236, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2244 ms

Resolved: Samsung performance has improved in 1846ffd.


[GLUTEN-1690][VL] Header Search Paths do not include the complete velox directory during development

What changes were proposed in this pull request?
Header Search Paths do not include the complete velox directory during development

@zhejiangxiaomai @zhztheplayer @zhouyuan cc

Can you rebase? Thanks.

@zhztheplayer done

@zhztheplayer CI is done.


Update base64 dependency from 0.21 to 0.22

Tonic currently depends on two different versions of base64 - directly on 0.21, and transitively through rustls-pemfile on 0.22. Updating tonic to use 0.22 results in just a single version dependency. This is helpful for ecosystems (like Android) where keeping crates on the latest version of dependencies across various projects helps reduce memory usage and disc space.

Would be nice to have!

Duplicate of #1649.

Merged #1649 so closing this thanks!


Refactor cli

Depends on #208
Refactor cli command. With these changes the cli command works as an interactive command line to set up these four possible scenarios:

full-node (with validator or not)
execution client
consensus client
validator client

Changes:

Refactor cli command

Types of changes
What types of changes does your code introduce?

[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Codecov Report
Base: 62.81% // Head: 53.64% // Decreases project coverage by -9.18% :warning:

Coverage data is based on head (3af7f31) compared to base (ff0908c).
Patch coverage: 10.59% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #228      +/-   ##
===========================================
- Coverage    62.81%   53.64%   -9.18%
===========================================
  Files           66       65       -1
  Lines         4677     4867     +190
===========================================
- Hits          2938     2611     -327
- Misses        1631     2176     +545
+ Partials       108       80      -28

Flag
Coverage Δ

unittests
53.64% <10.59%> (-9.18%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

cli/actions/actions.go
75.00% <0.00%> (-25.00%)
:arrow_down:

cli/actions/installDeps.go
0.00% <ø> (-33.34%)
:arrow_down:

cli/actions/mock/actions.go
30.98% <0.00%> (-3.94%)
:arrow_down:

cli/cli.go
0.00% <0.00%> (-62.10%)
:arrow_down:

cli/utils.go
50.00% <0.00%> (-50.00%)
:arrow_down:

configs/networks.go
46.15% <0.00%> (-6.03%)
:arrow_down:

internal/pkg/clients/utils.go
68.18% <0.00%> (-31.82%)
:arrow_down:

internal/utils/handle_dependencies.go
75.00% <0.00%> (-7.90%)
:arrow_down:

internal/prompter/prompter.go
2.19% <2.19%> (ø)

cli/keys.go
46.34% <6.25%> (-3.66%)
:arrow_down:

... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


download still images?

Is there a way to download a still image from the C210?
The best I've found so far is this:
ffmpeg -y -i rtsp://USER:PASS@camera:554/stream1 -vframes 1 test.jpg

that works, but often ends up with corrupted jpg. Most cameras like this have some URL for still images but I haven't found one yet for the CP210. Anyone know of one?

it looks like the solution is to use rtsp over tcp instead of UDP, like this:
ffmpeg -rtsp_transport tcp -nostdin -y -i rtsp://CMACCamera:legdirt@camera:554/stream1 -vframes 1 out.jpg


Contact info

Is there any way if this script has been updated to get my hands on it for personal use?

We are selling this script for personal use. Please contact me on discord:
okr765#4599