Firewall restrictions are reported as bad credentials

Expected Behaviour
When I use aio-lib-state from outside my company's firewall, Cosmos DB reports an error Request originated from client IP x.x.x.x This is blocked by your Cosmos DB account firewall settings. This circumstance should be somehow reflected in the exception returned from aio-lib-state.
Actual Behaviour
I'm getting an exception with message [StateLib:ERROR_BAD_CREDENTIALS] cannot access underlying DB provider. This gives the impression that the credentials are bad and leads me up the wrong track.
Reproduce Scenario (including but not limited to)
Outside company firewall that has access rules.
Steps to Reproduce
Run code locally that uses aio-lib-state.
Platform and Version
macOS 10.15.3, node v10.18.0
Sample Code that illustrates the problem
const stateLib = require('@adobe/aio-lib-state');
function main(params) {
  const state = await stateLib.init();
  const obj = await state.get('foo');
}

Logs taken while reproducing problem

Cause of issue is: https://github.com/adobe/aio-lib-state/blob/d25172ef01efb5c143bb8a27a446200cea6daaf0/lib/impl/CosmosStateStore.js#L32
which replaces the message about firewall settings with the generic credentials message seen.

Thanks @dominique-pfister !
I am not sure whether we should specifically mention the DB type as we are abstracting storage and providing hooks for other implementations.
But agreed that the current error message is misleading and must be rephrased in this scenario.
Ideally, the different error types should also be explained in the repository documentation.

One improvement here could be adding a logger.debug on the error itself, so you can see it in the logs.

I am not sure whether we should specifically mention the DB type as we are abstracting storage and providing hooks for other implementations.
Of course, I'd rephrase the expected outcome that the error message should read:
[StateLib:ERROR_BAD_CREDENTIALS] cannot access underlying DB provider due to firewall rules

@shazron the state lib already logs the error, but this might be an addition to the underlying error sdk

@moritzraho I mean in _wrap, log the naked e there itself (before any conditionals), since for a 403 you are not logging that specifically

@moritzraho I mean in _wrap, log the naked e there itself (before any conditionals), since for a 403 you are not logging that specifically

Ah ok yes got you now, good point

@moritzraho could you have a look at it while we're working on the Files SDK?

@meryllblanchet sure, this relates to state, but there might be a similar issue in files

@moritzraho exactly, we should do it for both.

Fixed.


Statistics Dashboard - No Data

No data in the Statistics dashboard with the following error:
pq: function date_trunc(unknown, timestamp without time zone, unknown) does not exist
Object
status:400
statusText:"Bad Request"
data:Object
results:Object
message:"pq: function date_trunc(unknown, timestamp without time zone, unknown) does not exist"
config:Object
url:"api/tsdb/query"
method:"POST"
data:Object
retry:0
headers:Object
hideFromInspector:false
message:"pq: function date_trunc(unknown, timestamp without time zone, unknown) does not exist"

You probably need to upgrade your DB.  See #974

Upgrading to postgres 13 and modifying the docker-compose.yml file to match the latest version under the installation guide solved the issue.


1.4.4test2 Coordinates

@glouel The new location(coordinates) have leftover values(Eiffel tower?) I suggest possibly leaving them blank when moving to production build.. it's confusing as per my screenshot because of the times of sun rise/set. ;)

Haha nice catch ! Indeed that's the Eiffel Tower coordinates, those were my test coordinates, forgot to remove them as I rushed that build to fix the translation crash :) I'll leave these blank with a placeholder in next build !

Maybe add a find my coordinates and I got this:

I just spamed it and it gave me a time it had NO numbers in it?

And I got this to with the brightness
Screen Recording 2018-10-24 at 4.43.55 PM.zip

@glouel sorry to re-open this..
I wanted to get your opinion.. Apparently(if you didn't notice), when you enter your own lat/long, say from opening the 'Maps' app, the sun rise/set is different than what apple is reporting for night-shift.. any thoughts on helping make them the same values, or another option would be to not display the night shift option if it's not available or disabled..?
Secondly, if the Mac supports/has enabled Night-Shift, does the OS store the coordinates used to calculate the system value for sun rise/set? if so, can the SS pre-populate those values in the text boxes when checked?
I guess I don't personally see the need to have both nightshift option and manual lat/long, unless your accounting for users wanting to set their time based on an alternate location..
Lastly, I also noticed the text boxes auto-round when you leave them. is that intended?

No worries !

I think they use a slightly different calculation, not a coordinates issues, that may differ a bit. I use this to calculate https://github.com/ceek/solar

Here, I get about a +/- 7 min difference with night shift indeed, using the "official" calculation mode. There are several ways to calculate (I was pondering adding them), but Apple is a bit between official and "civil" calculation (closer to official).
See this : https://www.timeanddate.com/astronomy/different-types-twilight.html
To give you an idea, civil is -/+40 compared to "official" here. My guess is Apple is using official + 1° or something like that. I'm not sure if "copying" their stuff is a good idea, although I understand the discrepancy can be troubling. Maybe I can explain it better with the multiple calculation modes (and maybe add a mode that gets close to night shift would solve the thing, as an option with civil and regular, etc).

In theory you can get coordinates through location services. This has a few issues though, the first one being I didn't manage to get it to work in my early testing 😅 But even then, one issue is you may get a prompt which can be an issue as I need to be able to rely on Aerial starting with no UI when the screensaver launches itself. I can't prompt there, and there can be reasons why you may need to get reprompted (maybe you disabled location services or something and I need to ask permission again). That's why I went with night shift, it's much easier, there's no permissions and it fixes itself if you travel. It's probably possible to implement something robust for the other mode with CoreLocation but that's probably more work than I wish to  undertake right now as the permission thing is not easy to fix I think, especially since it's a fallback solution for older macs.

Arg, that one is my fault 🙈 It's the thing that make sure you don't put letters in that does that, I'll fix it in next version ;)

@dVIAN13 so according to these guys : https://www.timeanddate.com
The "official" mode that the library I used give are the "correct" times (modulo a few seconds). The library uses 90.83 degrees to calculate that value (per
https://www.timeanddate.com/astronomy/different-types-twilight.html). If I use 90°, I get pretty much exactly the values from night shift, so it looks like Apple rounded that value :)
What I did for beta 2 is put a new menu right of the lat/long to pick the calculation mode with these values:

Strict (0°)
Official (0.83°)
Civil (6°)
Nautical (12°)
Astronomical (18°)

Strict is the Apple like one, I'll keep Official as default, and add a help bubble describing the values.

beta 2 :
https://github.com/JohnCoates/Aerial/releases/download/v1.4.4beta2/Aerial.saver.zip

Thanks @glouel. you're work and continued pursuit to improve this app is GREATLY appreciated.

I love the ability to choose among Civil, Nautical, and Astronomical twilight (in addition to Strict and Official, which are so close to the Night Shift values as to make no practical difference unless you can see the horizon).
I agree with dVIAN13 that it would be useful to pre-populate the latitude and longitude fields with the values from the user's current location (either as used to calculate the user's time zone e.g. in the Time & Date Preference Pane, or from Maps or some other method).

Yep it's about 7 mins diff here between official and strict,  but strict is about even to night shift, that's why I put it there.
Personally I prefer Civil so far but I think it's gonna be season dependent !
You can look here https://github.com/JohnCoates/Aerial/issues/580#issuecomment-433134834 about the difficulty to get user coordinates, in theory it's easy but bit of a mess with permissions. Maybe some day I'll get to it.
It's fairly easy to input them from maps as a user (well, it's a bit of a mess, you need to right click your location, send to mail, then extract coordinates from the link that's in mail 😱). It's much easier from other sources, or maybe some geocoding (input your location, get coordinates). I may look at that one as an easy cope-out ;)
Getting user location programmatically afaik requires permission which is messy (but very good from a user stand point, just messy for our very specific usage).

Ah, privacy, of course! Should have thought of that.  :)

@glouel So does it give you the correct coordinates?
Or do you have to get them from maps?

@glouel So does it give you the correct coordinates?
Or do you have to get them from maps?

I don't get your question. This is a manual option for now yes, where you have to enter your coordinates yourself. It's a fallback mode for those who don't have nightshift.

Perhaps (for the future) a button in Aerial's Time pane to "Get current coordinates", so that any permissions dialog will appear only when the user has manually requested the current coordinates.

Yep that's what I'm looking at. CoreLocation on MacOS is a bit weird though, we'll see where I get with this.

@SeanMSmith & @dVIAN13
After looking for pretty much everything, and finding a way to make it work on Mojave only, it's just that using location services on MacOS requires that the app/plugin is signed. This isn't documented as far as I know and kept me looking everywhere (and finding that "workaround" on Mojave). So in beta 4 I've added a small button next to lat/long :

It will autofill for you based on your coordinates after asking for permission (probably once per build as far as I see). Can you let me know if that works for you?
If that works well, I might move that option up above night shift in the dialog, as I  think it's better for most people to be able to calculate using your favorite method.

I'm still on High Sierra (I have a Fusion drive that will be converted to APFS upon upgrading to Mojave, and out of an abundance of caution, I'm waiting until at least 10.14.1), so  I won't be able to test that.

@SeanMSmith I probably wasn't clear, but with a signed build this should work on anything > 10.6.

Yep works fine nice addition

If that works well, I might move that option up above night shift in the dialog, as I think it's better for most people to be able to calculate using your favorite method.

I like it better to

Will fix tomorrow thanks!

Getting my current coordinates works well in High Sierra (and the coordinates are very close to those shown in Apple Maps - they diverge at the fourth decimal place, which is close enough).

Good ! Core Location gets pretty close usually, it's really good.

Change "Today's" to "Today’s" (i.e. use a proper apostrophe)

Is that the default apostrophe on QWERTY keyboard ?

Don't capitalize "sunrise" and "sunset"
More importantly, when the user has chosen to calculate from Civil, Nautical, or Astronomical, then change "Today’s sunrise" to "Today’s dawn" and change "Today’s sunset" to "Today’s dusk".

Ok.

The help text should probably also be changed to make clear that Civil, Nautical, and Astronomical are ways of calculating the time of dawn and of dusk, not of sunrise and sunset. Perhaps something like the following:
There are two ways to calculate the sunset and sunrise time:

Strict (0°): Calculate when the center of the Sun crosses the horizon
Official (0.83°) : Calculate when the Sun completely crosses the horizon

Or instead of sunrise and sunset, you can pick from three options for the time of dawn and dusk:

Civil (6°) : Calculate when the natural sunlight stops/starts requiring artificial light compensation
Nautical (12°) : Calculate when stars stop/start being seen
Astronomical (18°) : Calculate the point when the sun no longer interferes with astronomical observations

(Note also that I have suggested swapping "start/stop" for "stop/start" in the help text above to correspond with dawn/dusk, adding "center of" to the definition of Strict, and correcting the spelling of "interfere".)

Added as is, thanks ! I also moved up coordinate mode on top of the panel as the preferred method.

(sorry for the spam, using this for the new screenshots)

Change "Today's" to "Today’s" (i.e. use a proper apostrophe)

Is that the default apostrophe on QWERTY keyboard ?

The default apostrophe on a QWERTY keyboard is “ ' ”, what is sometimes called a “typewriter apostrophe.”
See https://en.wikipedia.org/wiki/Apostrophe#Typographic_form and the following two sections, in particular https://en.wikipedia.org/wiki/Apostrophe#Entering_apostrophes.
On a Mac, pressing Option-Shift-] is the easiest way to type a proper “typographic apostrophe” (if your word processor doesn’t automatically convert typewriter to typographic apostrophes, as many now do).
Macs have had this ability to easily produce proper typographic apostrophes since 1984, and the fact that even today, 34 years later, Windows users must type Alt+0146 on the number pad to enter one (if their word processor or text editor doesn't have a function to produce one) just boggles my mind. (And this is why I cringe when I see typewriter apostrophes in Mac software!)  :-)

Change "Today's" to "Today’s" (i.e. use a proper apostrophe)

Is that the default apostrophe on QWERTY keyboard ?

The default apostrophe on a QWERTY keyboard is “ ' ”, what is sometimes called a “typewriter apostrophe.”
See https://en.wikipedia.org/wiki/Apostrophe#Typographic_form and the following two sections, in particular https://en.wikipedia.org/wiki/Apostrophe#Entering_apostrophes.

Ha, didn't know about the history of it, the ink saving thing, kinda crazy come to think of it that it never changed !
In programming ' is also very much used which probably explains why it never went to be the default apostrophe.

On a Mac, pressing Option-Shift-] is the easiest way to type a proper “typographic apostrophe” (if your word processor doesn’t automatically convert typewriter to typographic apostrophes, as many now do).

Yep, I knew Pages do that (and Word on Windows)

Macs have had this ability to easily produce proper typographic apostrophes since 1984, and the fact that even today, 34 years later, Windows users must type Alt+0146 on the number pad to enter one (if their word processor or text editor doesn’t have a function to produce one) just boggles my mind. (And this is why I cringe when I see typewriter apostrophes in Mac software!) :-)

Hehe, well it's fixed now ;) Interestingly it seems macOS UI (in french at least) uses the typographic apostrophes too !

I'm still on High Sierra

@SeanMSmith Can you please take a second and tell me if you have this bug on High Sierra too ? See here : https://github.com/JohnCoates/Aerial/issues/586
Many thanks !


Fix error when using wemux instead of tmux

Currently the following error is thrown when trying to use wemux instead of tmux:

undefined method `class_eval' for <#Tmuxinator::Project:0x00000002931528>

This patch extend the current instance of Tmuxinator::Project only if wemux is detected without using class_eval and avoids this error completely.

Submitting this PR as a suggestion on how to resolve the current issue with wemux. I’m aware about https://github.com/tmuxinator/tmuxinator/pull/453 but it seems this PR is outdated and is a very big rewrite compared to mine.

@ethagnawl Any chance for this PR to be reviewed/approved/merged or something? :sweat_smile:

Hey, @Flink. There's definitely a chance. Let's see if we can get someone with wemux experience to have a look at this PR.
/cc @tmuxinator/tmuxinator

@Flink This looks good to me and, IMO, is an improvement over the previous approach.

Thanks! :smile:


getSubSeq() is now private; update doc for getSeqCMP()

Codecov Report

Merging #101 into master will decrease coverage by 0.19%.
The diff coverage is 50%.

@@            Coverage Diff            @@
##           master     #101     +/-   ##
=========================================
- Coverage   92.88%   92.69%   -0.2%
=========================================
  Files           9        9
  Lines         436      438      +2
=========================================
+ Hits          405      406      +1
- Misses         31       32      +1

Impacted Files
Coverage Δ

R/HLAdbTools.R
81.25% <50%> (-2.09%)
:arrow_down:

Continue to review full report at Codecov.

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


Avoid clobbering non-volatile XMM registers

This removes those functions for Windows targets,
as a simple interim solution.
Fixes #21522

This pull request is ready to merge

Merged to all branches.  Thanks!


Change lighthouse.js to lighthouse.mjs for packag.json module compatibility introduced by Laravel

Great point that it could break for any non-laravel users. I don't have an easy way to test that at this point in time.
The package is likely broken for anyone using "type":"module" in their package.json which includes anyone with a fresh laravel application created using laravel/laravel v10.2.0 or later.
There may be a better way of handling this issue. Changing the type to commonjs will cause this package to work but the vite scripts that ship with laravel (v10.2.0 and later) will not work and stop compiling the assets.

we could introduce some code that checks the package json and uses the .mjs file when "type":"module" is set in the package.json

just started looking around at more examples of this issue being caused in other packages. And there seems to be a way easier fix: just include a package.json with the project containing:
{
  "type": "commonjs"
}

example from bref: https://github.com/brefphp/bref/pull/1546

added a pr for ESM support using the bref example here: https://github.com/spatie/lighthouse-php/pull/26
if those tests pass, we should close this PR

Closed in favor of https://github.com/spatie/lighthouse-php/pull/26 as it resolves the same issue I reported while being backwards-compatible for older laravel versions and non-laravel projects.


Question about soundness after Fiat--Shamir transformation

Hi Team! Great work!
Do you intend to use Fiat--Shamir transformation to get a non-interactive argument?
If you do, let me note the following result by Attema, Fehr and Kloss (https://eprint.iacr.org/2021/1377.pdf). They shown the following. Let Prot be a \kappa sound interactive \mu-round protocol. Let's amplify its soundness to \kappa^t by t-fold parallel repetition. Denote by Prot-t the "folded" protocol. Next, let Prot-t-FS be Prot-t after Fiat-Shamir transformation, then there is an adversarial prover P^* which produces acceptable proof for invalid statement with probability about 1/2 Q^\mu \kappa^t / \mu^{\mu + t} where Q is the upper bound for the random oracle queries P^* can make. (We can also interpret Q as the upper bound for the number of operations P^* makes, say 2^80). (NOTE: Some additional conditions for this attack apply though, but I think your protocol follow them.)
Hence, in practice, where the non-interactive protocol is used (assuming use of the FS transform) soundness requires greater number of rounds than 3 proposed in Sec 3.4.3.
Alternatively, one could do soundness amplification by running the protocol sequentially what would increase the number of rounds. In that case, security loss introduced by the Fiat--Shamir transformation is roughly of factor (Q + 1). Hence, give the example from 3.4.3 increasing the number of repetitions from 3 to 5, assuming n < 2^21 and adversary who makes up to 2^86 operations should give the required security of about 2^-128.

I haven't had time yet to properly digest the framework of that paper, but I thought I'd just give my informal thoughts on this for now, and intuition for why I think our uses of r-fold parallel repetition give s^r soundness.
As the IOP paper states, the soundness of an IOP with Fiat-Shamir is the state-restoration soundness of the IOP.
Clearly r-fold parallel repetition doesn't always give s^r state-restoration soundness. I think FRI is a good example. If we repeated the commit phase r times in parallel and it involved at least r rounds, an attacker could attack the first instance in the first round, attack the second instance in the second round, etc., taking only O(r s) total computational power.
The IOP paper mentions an upper bound on r for sound parallel repetition, but mentions that some IOPs are robust to such attacks (I assume they mean they achieve s^r state-restoration soundness). For example, I think it's clear that single-round IOPs (i.e. PCPs) are robust to such attacks, as only the initial state can be restored. Restoring the initial state would mean restarting the protocol, so state-restoration soundness just equals standard soundness.
An example where we use parallel repetition is for permutation checks. The prover commits to f(x) and g(x), which should be permutations of one another. Then we repeat this PLONK-esque IOP r times in parallel:

The verifier samples gamma.
The prover commits to Z(x), the cumulative product of (f(g^i) + gamma) / (g(g^i) + gamma).

Later, it is shown that Z(g*x) g(x) = Z(x) f(x) for x in <g>. Crucially, this constraint is checked for each of the r Z(x) polynomials. So if f(x) is not a permutation of g(x), the attacker would need attack all r instances of the IOP above. And since it only involves one verifier message, I think the hardness of that attack would be s^r.
Do you see any issues with this line of reasoning? If not, we can try to write up a more complete and rigorous version. (Though analyzing the whole protocol seems like a big task, since AFAIK there's no existing state-restoration soundness analysis for any of the PLONK/FRI protocols we build on.)

I think you are right in saying that a single round IOP is state-restoration sound by default. However, I am not sure that you can lift the security of the whole protocol by repeating only its part. As far as I understand, similarly to the original Plonk, Plonky2 combines constraints of the circuit with the permutation argument check (in Plonk it is done in polynomial t using randomly sampled alpha). Hence, one does not need to "attack" r repetitions of the permutation argument, but can attack the combination phase. More precisely, the attacker may try multiple f-s, g-s, hoping for getting alpha that fits the verification equation, even though some of the permutation checks don't hold.

For that step where alpha is used to combine constraints, I would argue state-restoration soundness as

We generate r alphas in parallel, so the prover can restore a state before or after that step; there's no state where some but not alphas have been generated
If the prover rewinds to the step before alphas are generated, clearly there's a s^r chance that all r alphas result in a combination that vanishes
If some but not all alphas result in a combination that vanishes, that's okay, because we later use a quotient argument on each combination to check that it vanishes

Does that make sense? I think the key point is that for each sub-protocol we repeat in parallel, the larger protocol is designed to handle the case where r - 1 instances of that sub-protocol fail.

That's a very interesting discussion and I am learning a lot from it.
I agree that you can simply send r alphas. However, I think the final soundness error is still greater than s^r. Namely, we are not asking "what's the probability that r randomly sampled alpha-s fit the adversary" but we ask "what's the probability that in Q trials there is one such that randomly picks r alpha's that fit the adversary", no?

@mpzajac @dlubarov ... awesome exchange.  I find the plonky2 approach fascinating -- it is a bit of "have your cake and eat it too" ;-)
Two questions:

I found this paper https://arxiv.org/abs/2105.00801 by Berman et al. and was wondering if their proof of "Tight Parallel Repetition Theorem for Partially Simulatable Interactive Arguments via Smooth KL-Divergence" would improve the soundness property if applied to plonky2?
More pedestrian, what if one sacrificed speed a bit and introduced fuzziness either by e.g. randomly placing some higher-degree gates further away from the root, but adding as an input a filer polynomial that values those to zero, or introducing some random advice wires even though not needed and again "negating" them (decoupling) through e.g. an input. This would require an attacker to go both wide and deep when trying to find the right sequence of random alphas, no?

Again, I might be totally off my rocker here.
BTW, we are building an NFT platform that uses recursive zk-snarks for proof of authenticity and genealogy using Aztec's Barretenberg library. Since we need recursive snarks at scale, we are looking for optimizations. We have made advances such that we can multi-thread the library but are schlepping, a lot of PCD with us -> e.g. for a 4 generation NFT tree of generative art with 10 derivative artworks per wrt work in each generation, we have over 11,000 proofs to generate ... for one NFT tree. We hope there will be hundreds of thousands.
So my question is, have you checked if plonky2 can be multi-threaded? @dlubarov

Is this issue still considered open? Because known results bound soundness error of any IOP compiled into a NIROP by O(n_queries*e_rbr + n_queries^2/2^{hash_size}), where e_rbr is the round-by-round soundness of the IOP  (I don’t know if it’s explicitly shown somewhere, but it follows from [BCS16] and [CCH+18]).
Attema et al. attack takes a multi round protocol and execute in parallel t >=r independent executions of the same protocol, where r is the number of rounds. Therefore, a malicious prover can fake a proof for each independent execution at each round with not-so-small-enough probability by brute force finding the right hash. IOPs like Plonky2 instead usually use parallel repetition of independent polynomial checks (* ) in a round-by-round fashion. In order to cheat, the adversary needs that each challenge in (c_1,..,c_t) = H(statement, transcrip_so_far) lies in a small set of roots and the attack will not work anymore. The attack might work if for example we naively compute t > number_of_rounds different proofs for the same statement.
——
(*) The polynomial checks are not really performed by the verifier, but more an artifact of the security proof called the State function. The State function can be computed for any (statement, partial_transcript) pair and is such that: (1) x \notin L ⇒ State(x, null) = 0, (2) State(x, full_transcript) = 0 ⇒ Ver(x, corresponding_proof) = 0; and (3) For all partial_trascript and any f s.t. State(x, partial_transcript) = 0, Pr_c[State(x, partial_transcript||f||c)=1]<= e_rbr


Cmake build fixes

Fixes broken [sfz~] on Linux
Fixes broken [lua] on Windows
Fixes [play.file~] and [sfload] macOS universal binary build
Fixes dynamic linking issue on macOS
Use angled brackets for includes in global path

With these fixes applied, [All_objects] loads correctly on all supported OS/architecture combinations. I've tested:

Windows 10 (x64)
Windows 11 (x64)
Linux (Fedora, arm)
Linux (Ubuntu, x64)
macOS Sonoma (arm)
macOS Sonoma (x64)

And this actually fixes a whole bunch of stuff that was broken in the first place :)


Fix boolean parameters without value with following comment

As reported at https://github.com/tagomoris/fluent-plugin-route/issues/10, config_param :name, :bool returns falsely value (nil) when it's configured without explicit value with following comment.
# parameter definition
config_param :b1, :bool, default: false
config_param :b2, :bool, default: false

# configuration
# b1 will be true
b1
# b2 will be nil
b2 # comment here

This bug cannot be reproducible via test cases of v1 parser, but I succeeded to reproduce it using plugin code and test driver. This bug was reported to be reproducible on actual Fluentd processes.

@repeatedly This looks a bug related with literal parser, v1 parser and value parser, and takes a time to fix it. Could you take ownership on this?

The problem is this line: https://github.com/fluent/fluentd/blob/7c0c0127bbafe7ad1847d10c52fcd85d67434907/lib/fluent/config/v1_parser.rb#L108
Maybe, this is for this test case: https://github.com/fluent/fluentd/blob/7c0c0127bbafe7ad1847d10c52fcd85d67434907/test/config/test_config_parser.rb#L97
I think this parsed result should be {"k1" => ""} because we can use '# foo' like syntax for # started string. But changing this behaviour may break existing environment. So we can't use this fix.
For keeping compatibility, changing bool handling is better.
diff --git a/lib/fluent/config/types.rb b/lib/fluent/config/types.rb
index f41d451..beccc18 100644
--- a/lib/fluent/config/types.rb
+++ b/lib/fluent/config/types.rb
@@ -60,7 +60,11 @@ module Fluent
       when ''
         true
       else
-        nil
+        if str.start_with?('#')
+          true
+        else
+          nil
+        end
       end
     end

Hmm... return nil seems error prone. Should it raise an exception for unexpected value?

@tagomoris How about this patch?


Unable to write traces in application insight using asp.net console application

I am trying to write log traces in application insights in .net console application not .net core. I am using serilog for this. But unable to do so. Below is the log code I am using. Please provide me the solution.
public static class Log
{
private static Serilog.Core.Logger _log;
static Log()
{
            _log = new LoggerConfiguration()
           .MinimumLevel.Verbose().WriteTo.ApplicationInsights(Instrumentaton_Key, TelemetryConverter.Traces)
           .CreateLogger();
    }

    public static void Info(string messageTemplate)
    {
        _log.Information(messageTemplate);
    }

Hi! 👋 Thanks for getting in touch, and sorry we were unable to respond to your request. We're in the process of bringing new maintainers onto this project, and need to close stale tickets so that we can identify which items are still important to users of the sink.
If this issue still affects you:

Please consider whether it's a question that can be asked on Stack Overflow; if so, the serilog tag will get your question in front of many more people who can help you
Please consider whether you can research or investigate the issue and propose a solution for other users to benefit from
Feel free to comment here, letting us know it's still a problem

Thanks again!


Rework entrypoints

Closes https://github.com/woodpecker-ci/woodpecker/discussions/3263#discussioncomment-8233224

LGTM. Build image, please, I'll test in Kubernetes.

what about, if the custom entrypint is set, thread comments as arguments.
this way you can make both usages work:
entrypoint:
  - /usr/bin/curl
 commands:
  - "-v"
  - "--insecure"
  - https://google.com

entrypoint:
  - /bin/bash
 commands:
  - "-x"
  - "-e"
  - "-c 'echo Hello'; printenv"

https://github.com/woodpecker-ci/woodpecker/discussions/3263#discussioncomment-8233224

if the custom entrypint is set, thread comments as arguments

That's an option. What's about "magic" aspect then?
Also, we have to find and provide entrypoint for each "scratch" image. We cannot use default image's entrypoint:
steps:
  build:
    image: gcr.io/kaniko-project/executor:v1.18.0
    args:
      - --context
      - ./
      - --destination
      - harbor.domain.net/project/image:123

Anyway, this would be better than ~nothing~ current state.

:point_up: should my soulution not work in this way also ?!?

there shouldn't be a script anymore. In this case, this could be implemented in a similar way.

We / I had a look at that approach some time ago as well, but actually stopped as there seems to be no smart way of doing this. My first idea was to simply execute commands one by one using sth like docker exec ..., but that doesn't work as vars or the current directory wouldn't work anymore. The other idea I had was using screen / tmux, but that would require even more specific images to be used.

Would it be possible to limit entrypoint to the first element of the entrypoint YAML slice?

Of course, yes.

We have to find and provide entrypoint for each "scratch" image. We cannot use default image's entrypoint. (https://github.com/woodpecker-ci/woodpecker/pull/3269#issuecomment-1911091750, https://github.com/woodpecker-ci/woodpecker/discussions/3263#discussioncomment-8233224)
Would you allow to use commands with entrypoint? Could you override shell (https://github.com/woodpecker-ci/woodpecker/discussions/3263#discussioncomment-8233224, propose, point 1), but using commands as before(script)?

entrypoint:
  - /bin/python
  - "-strict"
 commands:
  - print("Hello")
  - quit()

Seems, doesn't work.
Pipeline:
skip_clone: true
steps:
  server:
    image: quay.io/curl/curl
    entrypoint:
      - /usr/bin/curl
      - -v
      - google.com

Output:
curl: try 'curl --help' or 'curl --manual' for more information

Warnings:
[linter]woodpecker: stepsMust validate one and only one schema (oneOf)
[linter]woodpecker: steps.serverAdditional property entrypoint is not allowed
[bad_habit]Please set an event filter on all when branches

pod-entrypoint-only.yaml

Fixed_custom_entrypoint.patch

skip_clone: true
steps:
  server:
    image: quay.io/curl/curl
    entrypoint:
      - /usr/bin/curl
      - -v
      - -k
      - https://google.com

 0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Host google.com:443 was resolved.
* IPv6: 2a00:1450:4007:80e::200e
...
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://google.com/
...
* Connection #0 to host google.com left intact
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE>

301 Moved

The document has moved
here.

pod-entrypoint-only.yaml
woodpecker-agent-entrypoint-only.log

skip_clone: true
steps:
  server:
    image: debian
    entrypoint:
      - /bin/bash
      - -c
      - echo $CI_SCRIPT | base64 -d | /bin/bash -e
    commands:
      - echo $SHELL
      - test=(1 2 4 8 16 32 64 128); echo $${test[@]};

+ echo $SHELL
/bin/sh
+ test=(1 2 4 8 16 32 64 128); echo ${test[@]};
1 2 4 8 16 32 64 128

pod-custom-shell.yaml
woodpecker-agent-custom-shell.log

skip_clone: true
steps:
  server:
    image: debian
    commands:
      - echo $SHELL
      - test=(1 2 4 8 16 32 64 128); echo $${test[@]};

+ echo $SHELL
/bin/sh
+ test=(1 2 4 8 16 32 64 128); echo ${test[@]};
/bin/sh: 18: Syntax error: "(" unexpected

pod-sh.yaml
woodpecker-agent-sh.log

So to summarize the current changes: You can either use commands or entrypoints. If entrypoints is used the part with /bin/bash - -c  - echo $CI_SCRIPT | base64 -d | /bin/bash -e is simply skipped, correct?

you requested changes, but your concerns were addressed

I could dismiss them if you think that he would be fine with the new changes?

So the reason for requesting changes (https://github.com/woodpecker-ci/woodpecker/pull/3269#pullrequestreview-1844754093) was the additional config option, that one is resolved, however, the solution in https://github.com/woodpecker-ci/woodpecker/pull/3269#issuecomment-1911073603 is not how it's done now as entrypoint and arguments are in one config option now… So I can't tell you

In that case it would be fair to wait for the approval.


Separate date and time in monitor

Time stamp as returned to the database is ugly, separate out the date and time. Moreover, is there a way to put them on different lines on the display page without modifying the database schema?

Opened feature branch date-time-separation to address this issue.

Merged into develop. Integrated into latest released.


Configure the default variables in plugin.xml

Change the name of variables from XWALK_VERSION to xwalkVersion.

@huningxin @lincsoon PTAL,thanks.

I will merge this pull request after releasing the plugin.

LGTM


Commander refuses to arm, no error message/reason

I digged deeped into the issue in #3122, and it seems that this is an independent problem.
After full system setup (calibration and everything), once I reboot, the LED flashes red on startup and refuses to let me arm (symptom of failing pre-flight checks or incomplete boot ?)
QGC shows this :
[22:43:28.549 - COMP:1] Critical: INVAL: ARMING_STATE_INIT - ARMING_STATE_ARMED
[22:43:28.600 - COMP:1] Critical: REJECTING component arm cmd
[22:43:28.651 - COMP:1] Critical: command temporarily rejected: 400

No reason for rejection is shown.
Entering via USB console and doing a commander stop-start results in the system going to standby mode with the normal blue LED heatbeat.
@LorenzMeier Any ideas? I'm running a Pixhack board, and it's rather difficult to access the serial console for now, since it is mounted deep inside the airframe. Is there any way to dump bootlogs/console output to a file on the SD card?

@mhkabir The problem is that the transition from the transition from ARMING_STATE_INIT to ARMING_STATE_ARMED is invalid. The commander should have switched from ARMING_STATE_INIT to ARMING_STATE_STANDBY before
https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp#L1820

So you will need to put some printfs to see what's going on :)

Thanks, I'll have a look.
Looks like the issue is coupled to the sensor calibration of external mags. If I disable the UAVCAN mag and recalibrate, it's just fine.

@tumbili I spent nearly two hours on this today without being any closer to finding out what the fail is.
The transition from INIT to standby is getting denied, but I still have absolutely no indication why. It seems to silently fail the transition. I've added printf's in all the suspect areas, but absolutely no luck.
Some help please :/

https://github.com/PX4/Firmware/blob/master/src/modules/commander/state_machine_helper.cpp#L250
Finally found it. That's where we fail. Oddly enough, the fail is never reported back anywhere. Any ideas @tumbili ?
Kind of a impossible situation. No reason why it should do that. How does the sensor_feedback_provided even go to true??

The issue we need to solve for is to report every sensor once, but not all the time. We might need an arming error bit mask and report only if the bit is not already set.
The bit mask should be re-set once a new link connects, which will automatically re-send the errors then.

A secondary issue is why its failing the check in the first place, of course.

Here, if this is set:
https://github.com/PX4/Firmware/blob/master/src/modules/commander/state_machine_helper.cpp#L245
then we would need here roughly this code:
https://github.com/PX4/Firmware/blob/master/src/modules/commander/state_machine_helper.cpp#L130
So in addition to fRunPrearm checks, a completely new if statement below that one:
/* re-run the pre-arm check as long as sensors are failing */
if (!status->condition_system_sensors_initialized && (new_arming_state == vehicle_status_s::ARMING_STATE_ARMED ||
new_arming_state == vehicle_status_s::ARMING_STATE_STANDBY)
				&& status->hil_state == vehicle_status_s::HIL_STATE_OFF) {
			prearm_ret = prearm_check(status, mavlink_fd);
}

The issue you will run into is that it will spam you on boot. Which is why the vehicle_status needs to get that sensor fail bit mask and the pre-arm check should only report something via MAVLink if the failure bit is not already set. Then the whole reporting logic can be simplified based on that.
Let me know if you think you know what to do, else I'll have a go at this.

@LorenzMeier Ah, I see.
I'd be glad if you had a try at fixing this. I spent nearly 3 hours on this. Kinda frustrated, sorry.

@LorenzMeier Ok got it, I'll fix it myself since I've invested so much into this.
Two questions :

Where/how to get if a new link is connected?
Where and how do I set and publish the failure bit?

Any other integration help would be great

Structure is here : https://github.com/mhkabir/Firmware/tree/commander_prearm
Lorenz, can you please tell me if this is going the right direction? I also still need to figure out how to detect a new datalink without creating a race condition. Suggestions please!

@LorenzMeier Woohoo! It works! No spamming, just like we wanted :) #3171
[20:07:01.651 - COMP:1] Info: new data link found #0
[20:07:01.878 - COMP:1] Critical: NOT ARMING: Flying with USB connected prohibited
[20:07:02.011 - COMP:1] Critical: Not ready to fly: Sensors need inspection

Still tracking down a thing or two, so PR is WIP

Thanks for fixing this!

@LorenzMeier  I am also getting this error. I cant arm from the ground station GUI or from my remote. ESC is just beeping waiting and seems to be stuck in programming mode. LED safety switch is flashing quickly red and  all sensors seem to be configured ok.

I presume you have 1) The beta firmware installed (if not, please install it instead of the default) and 2) USB NOT connected?


Error on ZmqMsg.mqh

Hello.
I have been using this MQL-ZMQ library for 2 months, but today I started to get the following error. I tried to download the library again, replacing the old files for the new ones but the bug persists. Any idea how to fix it?

Hello,
I do have the same issue.
@mcast123 you have closed this ticket, did you figure out how to fix it? If so, could you share your solution, please.

Hi @edgarbs1998.
I deleted the metatrader 5 and all its folders and then reinstalled it. The bug disappeared.
But I still dont know what was causing it exactly...

Hi,
I would love to understand this problem as it keeps reappearing for me. Any ideas?
Experienced this from start, without any solution, using MT5 via Wine on both Mac and Linux. Now running a VM with Windows 10 over Azure. Error occurred after a day of use. Reinstalled MT5, run successfully and now bug appeared again. Error occurs after re-compiling a modified EA.
Thanks in advance!
//M.

From the error message, I suppose it's because I use the name data both as a parameter name and a method name. The MQL compiler may become stricter on such usage. I will change the parameter name.

@dingmaotu  why close this issue? it not be fixed yet.this error still exists

@dingmaotu

suppose it's because I use the name data both as a parameter name and a method name

you'r right. all we should do is change the parameter name "data" to someothers.
thank you.


Add JObjectAdapter to support JSON Patch for JObject properties

Added JObjectAdapter to support JSON Patch for JObject properties

Updated AdapterFactory to test against object type: if it's JObject, return new JObjectAdapter

Addresses #2429

Thanks for your effort, @sfmskywalker.
@rynowak, @pranavkm can you please review this? Thanks!

No problem! Let me know if anything looks off. I just pushed another update in hopes the final 4 checks will also pass.

The code changes here look good. Can you add some tests that use this?
There are some examples of things that don't work today in the original bug.

Sure, I will add some unit tests using this.

Just a quick update - I successfully tested all the cases mentioned in the original bug (#2429) with a console application. I have yet to figure out how to get this repository to compile before I can start adding unit tests.

Yeah apologies for the delay. I’m gonna give it another try over the weekend.

I keep getting the following error when I try to build using build.cmd:
PS C:\Projects\sfmskywalker\AspNetCore> .\build.cmd
WARNING: No default group of projects was specified, so building the 'managed' and its dependent subsets of projects. Run `build.cmd -help` for more details.
Building of C# project is enabled and has dependencies on NodeJS projects. Building of NodeJS projects is enabled since node is detected in C:\Program Files.
Detected JDK in C:\Projects\sfmskywalker\AspNetCore\.tools\jdk\win-x64\ (via local repo convention)
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-alpha1-013788/dotnet-sdk-5.0.100-alpha1-013788-win-x64.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-alpha1-013788/dotnet-sdk-5.0.100-alpha1-013788-win-x64.zip
dotnet-install: Adding to current process PATH: "C:\Projects\sfmskywalker\AspNetCore\.dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Installation finished
C:\Users\SipkeSchoorstra\.nuget\packages\microsoft.dotnet.arcade.sdk\1.0.0-beta.19411.1\tools\Tools.proj : error : Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.
C:\Users\SipkeSchoorstra\.nuget\packages\microsoft.dotnet.arcade.sdk\1.0.0-beta.19411.1\tools\Tools.proj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
Build failed.
build.cmd completed

My fork is up to date with today's master branch. Looking at global.json, I see a reference being made to SDK version 5.0.100-alpha1-013788. I could not find an installer for that version anywhere.
I must be doing something wrong.
Any pointers?

It looks like I'm not the only one having an issue with building the source. I added my comments and questions here: https://github.com/aspnet/AspNetCore/issues/12913#issuecomment-526605903

Hang on, I only now notice the following line:
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-alpha1-013788/dotnet-sdk-5.0.100-alpha1-013788-win-x64.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-alpha1-013788/dotnet-sdk-5.0.100-alpha1-013788-win-x64.zip

Clearly it's downloading the latest SDK the build is failing to find.
I'll dig some more.

Trying the suggestion here: https://github.com/aspnet/AspNetCore/issues/11566

I got the build working by following these steps: https://github.com/aspnet/AspNetCore/issues/12913#issuecomment-526823482

So, in order to add tests, I wanted to add a JsonPatch.sln file and add both the library project and the existing test project to it. Since there's now .sln file yet, I followed the instructions and tried the following:
Path
(AspNetCore) PS C:\Projects\sfmskywalker\AspNetCore>
cd C:\Projects\sfmskywalker\AspNetCore\src\Features\JsonPatch
dotnet new sln -n JsonPatch
dotnet sln add ./src/Microsoft.AspNetCore.JsonPatch.csproj

So far, so good - the solution file was created and the .NET standard 2.0 Microsoft.AspNetCore.JsonPatch.csproj library got added.
Now I want to add the test project:
dotnet sln add ./test/Microsoft.AspNetCore.JsonPatch.Tests.csproj

Which didn't work:
Invalid project C:\Projects\sfmskywalker\AspNetCore\src\Features\JsonPatch\test\Microsoft.AspNetCore.JsonPatch.Tests.csproj. The SDK 'Microsoft.NET.Sdk' specified could not be found.
But when I do dotnet --list-sdks, I see:
3.0.100-preview7-012821 [C:\Projects\sfmskywalker\AspNetCore\.dotnet\sdk]
5.0.100-alpha1-013788 [C:\Projects\sfmskywalker\AspNetCore\.dotnet\sdk]

And when I do dotnet --version, I get:
5.0.100-alpha1-013788

So I thought maybe the DefaultNetCoreTargetFramework variable isn't set, so Itried updating the .csproj with a TargetFrameworks of netcoreapp5.0:
<PropertyGroup>
<TargetFrameworks>netcoreapp5.0</TargetFrameworks>
</PropertyGroup>

But that didn't make any difference.
So despite the fact that dotnet is set to use the latest preview SDK (5.0.100-alpha1-013788), it can't seem to understand the specified target framework in Microsoft.AspNetCore.JsonPatch.Tests.csproj
And yet, running .\build on existing .sln files, such as MVC.sln, works fine (except for the issue with some long-winded file path not being able to be copied).
Obviously I'm missing something, but I don't yet see what that is.

@sfmskywalker - could you update your branch with those changes (adding sln file) and I'll give it a try?

Invalid project C:\Projects\sfmskywalker\AspNetCore\src\Features\JsonPatch\test\Microsoft.AspNetCore.JsonPatch.Tests.csproj`. The SDK 'Microsoft.NET.Sdk' specified could not be found.

What are the repro steps (exactly) for this error so I can see it and investigate?

@rynowak Great, thank you. I just updated my branch by adding the .SLN file. Steps to reproduce the error:

Open a command prompt / PowerShell in the root directory of the project.
Run . .\activate.ps1
cd src\Features\JsonPatch
dotnet sln add ./test/Microsoft.AspNetCore.JsonPatch.Tests.csproj

When I do the above, I receive the following error:
Invalid project C:\Projects\sfmskywalker\AspNetCore\src\Features\JsonPatch\test\Microsoft.AspNetCore.JsonPatch.Tests.csproj. The SDK 'Microsoft.NET.Sdk' specified could not be found.

@rynowak Great, thank you. I just updated my branch by adding the .SLN file. Steps to reproduce the error:

Open a command prompt / PowerShell in the root directory of the project.
Run . .\activate.ps1
cd src\Features\JsonPatch
dotnet sln add ./test/Microsoft.AspNetCore.JsonPatch.Tests.csproj

When I do the above, I receive the following error:
Invalid project C:\Projects\sfmskywalker\AspNetCore\src\Features\JsonPatch\test\Microsoft.AspNetCore.JsonPatch.Tests.csproj. The SDK 'Microsoft.NET.Sdk' specified could not be found.

@rynowak is this ready to be merged?

I tried this out and I didn't have any issues. There's a branch here with an update to the solution file: https://github.com/aspnet/AspNetCore/tree/issue/jsonpatch-jobject
If you're still having problems make sure you run restore.cmd in the repo root.

I’ll give it a go. Thanks!

@rynowak The solution works and I'm now able to actually build & run tests 😄 . Expect an update shortly.

Tests have been added for all patch operations in combination with types containing JObject properties ✔


Require prefer: respond-async for super admin tools

Do we need to update the Super Admin Page included the header Prefer: respond-async?
https://github.com/medplum/medplum/blob/191f8c9399a6199d9f44d44711a5f40f26fe80be/packages/app/src/admin/SuperAdminPage.tsx

coverage: 94.149% (-0.04%) from 94.187% when pulling 4ab0db586d42830dcba1c802723ddaee3e811086 on cody-super-admin-tools-require-async into 191f8c9399a6199d9f44d44711a5f40f26fe80be on main.

@tonylee80

Do we need to update the Super Admin Page included the header Prefer: respond-async?

Yep!  Sorry, didn't put this in draft state.  I'm adding that.


fix(sbb-navigation): add accessibility recommendations and fix focus order

Closes #1769.

Codecov Report

Merging #1786 (f418e98) into master (ab917b0) will increase coverage by 0.41%.
The diff coverage is 57.16%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##           master    #1786      +/-   ##
==========================================
+ Coverage   54.85%   55.27%   +0.41%
==========================================
  Files          49      162     +113
  Lines        1659     6441    +4782
  Branches      406     1766    +1360
==========================================
+ Hits          910     3560    +2650
- Misses        671     2652    +1981
- Partials       78      229     +151

Impacted Files
Coverage Δ

...ts/sbb-accordion-item/sbb-accordion-item.events.ts
100.00% <ø> (ø)

...mponents/sbb-accordion-item/sbb-accordion-item.tsx
0.00% <0.00%> (-37.21%)
:arrow_down:

...onents/sbb-autocomplete/sbb-autocomplete.events.ts
100.00% <ø> (ø)

src/components/sbb-calendar/sbb-calendar.events.ts
0.00% <0.00%> (ø)

src/components/sbb-checkbox/sbb-checkbox.events.ts
0.00% <0.00%> (ø)

...components/sbb-datepicker/sbb-datepicker.events.ts
0.00% <0.00%> (ø)

src/components/sbb-datepicker/sbb-datepicker.tsx
49.18% <ø> (ø)

src/components/sbb-dialog/sbb-dialog.events.ts
100.00% <ø> (ø)

src/components/sbb-dialog/sbb-dialog.tsx
45.45% <ø> (ø)

src/components/sbb-divider/sbb-divider.tsx
100.00% <ø> (ø)

... and 30 more

... and 133 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Also approved by Mürsel 👍


Optimize all txs queries using antijoin for multisig hashes

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 87.844%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
5962

Relevant Lines:
6787

💛  - Coveralls


FileNotFoundError: [Errno 2] No such file or directory: './logs/emb/CHECKPOINT_NAME/CHECKPOINT_INDEX/query_shape.npy'

While typing this command
$python run.py evaluate CHECKPOINT_NAME CHECKPOINT_INDEX
FileNotFoundError: [Errno 2] No such file or directory: './logs/emb/CHECKPOINT_NAME/CHECKPOINT_INDEX/query_shape.npy'
Im getting this error, please help me for search and evaluation process.
Thank you!

I have modified the directory './logs/emb/CHECKPOINT_NAME/100/query_shape.npy' to ./logs/emb/CHECKPOINT_NAME/CHECKPOINT_INDEX/query_shape.npy'
After execution of command $ python run.py evaluate CHECKPOINT_NAME CHECKPOINT_INDEX
I have got this error : RuntimeError: Error in void faiss::Clustering::train_encoded(faiss::Clustering::idx_t, const uint8_t*, const faiss::Index*, faiss::Index&, const float*) at /root/miniconda3/conda-bld/faiss-pkg_1608526791224/work/faiss/Clustering.cpp:294: Error: 'std::isfinite (x[i])' failed: input contains NaN's or Inf's
please look into this ...

@kasireddygariDineshKumarReddy
Here you should replace CHECKPOINT_NAME with your pre-trained checkpoint file name,  and also replace CHECKPOINT_INDEX with proper epoch number.
For example, your training would be something like:
python run.py train my_first_experiment

After that, you can evaluate the last epoch checkpoint of the trained model:
python run.py evaluate my_first_experiment

Or
# in the case of using the checkpoint of 100th epoch
python run.evaluate my_first_experiment 100

what is meant by pretrained checkpoint filename? I cant understand "Here you should replace CHECKPOINT_NAME with your pre-trained checkpoint file name"

@kasireddygariDineshKumarReddy
You have to train the model first. The saved model parameters (aka. checkpoint) will be located in  ./logs/emb/CHECKPOINT_NAME. As in my answer, for example, CHECKPOINT_NAME can be my_first_experiment or anything else that was used in your training. If you're not sure, just run it as it is in the answer above.

Is this repository helpful for the below situation?
There could be situations where we need to detect the presence of new
sound sources for whose prerecorded acoustic signatures are available.
In order to handle such novel situations, the proposed system will be
equipped with audio search capability, which performs template
matching to detect the sound sources which match the given acoustic
signature (pre-recorded sound from that source).


Conditional Loop Partitioning - Extending to remove if conditions

The following PR accomplishes 2 items in the context of loop partitioning pass

Removing if conditions from the AST if they can be removed
Prev implementation was not partitioning loops on multiple loop variables because the other loop variable candidates were becoming stale as we partition for just one loop variable

Illustrative example
Input
realize compute([0, 60]) {
  produce compute {
    for (i.outer, 0, 4) {
      for (i.inner, 0, 16) {
        if (likely(((i.inner + (i.outer*16)) < 60))) {
          if (likely(((i.inner + (i.outer*16)) < 60))) {
            compute((i.inner + (i.outer*16))) =(A((i.inner + (i.outer*16))) + B((i.inner + (i.outer*16))))
          }
        }
      }
    }
  }
}

Output
// attr [compute(compute, 0x7f83a88706c0)] realize_scope = ""
realize compute([0, 60]) {
  produce compute {
    for (i.outer, 0, 3) {
      for (i.inner, 0, 16) {
        compute((i.inner + (i.outer*16))) =(A((i.inner + (i.outer*16))) + B((i.inner + (i.outer*16))))
      }
    }
    for (i.inner, 0, 12) {
      compute((i.inner + 48)) =(A((i.inner + 48)) + B((i.inner + 48)))
    }
  }
}

Example with multiple if conditions
Input
// attr [compute(compute, 0x7ffd9e4a0970)] realize_scope = ""
realize compute([0, 94], [0, 62]) {
  produce compute {
    for (i.outer, 0, 6) {
      for (j.outer, 0, 4) {
        for (i.inner, 0, 16) {
          for (j.inner, 0, 16) {
            if (likely(((i.inner + (i.outer*16)) < 94))) {
              if (likely(((i.inner + (i.outer*16)) < 94))) {
                if (likely(((j.inner + (j.outer*16)) < 62))) {
                  if (likely(((j.inner + (j.outer*16)) < 62))) {
                    compute((i.inner + (i.outer*16)), (j.inner + (j.outer*16))) =(A((i.inner + (i.outer*16)), (j.inner + (j.outer*16))) + B((i.inner + (i.outer*16)), (j.inner + (j.outer*16))))
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Output
// attr [compute(compute, 0x7ffd9e4a0970)] realize_scope = ""
realize compute([0, 94], [0, 62]) {
  produce compute {
    for (i.outer, 0, 5) {
      for (j.outer, 0, 3) {
        for (i.inner, 0, 16) {
          for (j.inner, 0, 16) {
            compute((i.inner + (i.outer*16)), (j.inner + (j.outer*16))) =(A((i.inner + (i.outer*16)), (j.inner + (j.outer*16))) + B((i.inner + (i.outer*16)), (j.inner + (j.outer*16))))
          }
        }
      }
      for (i.inner, 0, 16) {
        for (j.inner, 0, 14) {
          compute((i.inner + (i.outer*16)), (j.inner + 48)) =(A((i.inner + (i.outer*16)), (j.inner + 48)) + B((i.inner + (i.outer*16)), (j.inner + 48)))
        }
      }
    }
    for (j.outer, 0, 3) {
      for (i.inner, 0, 14) {
        for (j.inner, 0, 16) {
          compute((i.inner + 80), (j.inner + (j.outer*16))) =(A((i.inner + 80), (j.inner + (j.outer*16))) + B((i.inner + 80), (j.inner + (j.outer*16))))
        }
      }
    }
    for (i.inner, 0, 14) {
      for (j.inner, 0, 14) {
        compute((i.inner + 80), (j.inner + 48)) =(A((i.inner + 80), (j.inner + 48)) + B((i.inner + 80), (j.inner + 48)))
      }
    }
  }
}

Ping

We are testing for this patch, will give feedback soon.

@anijain2305 could you try this case.
https://discuss.tvm.ai/t/simplify-if-stmt-within-for/830

one more case:
import tvm

def test_cce_loop():
  ib = tvm.ir_builder.create()
  len = 112
  tile = 32
  loop = (len + tile - 1) // tile
  with ib.for_range(0, loop, 'i') as i:
    head = i * tile
    tail = tvm.select(head + tile > len, len, head + tile)
    ib.emit(tvm.call_extern('float32', "cce_intrisic", head, tail))

  stmt = ib.get()
  stmt = tvm.ir_pass.LoopPartition(stmt, True)
  stmt = tvm.ir_pass.Simplify(stmt)
  print stmt

if __name__ == "__main__":
  test_cce_loop()

@xqdan Thanks for providing the test cases. Current situation is

https://discuss.tvm.ai/t/simplify-if-stmt-within-for/830 --> If you add ib.likely in the conditions, it gets partitioned. Currently, the loop partitioning only works for likely primitives.

cce_loop_1 --> select not supported for loop partitioning

cce_loop_2 --> Seems good

cce_loop_3 --> Will need to dig deeper. I think 2 conditions dependent on i back to back is throwing code off.

  with ib.for_range(0, loop, 'i') as i:
    head = i * tile
    with ib.if_scope(ib.likely(head + tile > len)):

hi,
here's another case as bellow fail to partition, please consider:
import tvm
def test():
ib = tvm.ir_builder.create()
loop1=4
loop2=9998
tile=39991
with ib.for_range(0,loop2,'i') as i:
with ib.for_range(0,loop1,'j') as j:
head1 = i
head2 = j
with ib.if_scope(ib.likely(head1loop1 < tile - head2)):
with ib.if_scope(ib.likely(head1loop1 < tile - head2)):
ib.emit(tvm.call_extern('float16',"cce_intrinsic",head1))
stmt = ib.get()
print stmt
print "==="
stmt = tvm.ir_pass.LoopPartition(stmt,True)
print stmt

test()

@RichardFido Can you please edit the code to print it nicely? It doesn't compile as of now

sorry about that. @anijain2305
please check it again:

def test():
    ib = tvm.ir_builder.create()
    loop1 = 4
    loop2 = 9998
    tile = 39991
    with ib.for_range(0,loop2,'i') as i:
        with ib.for_range(0,loop1,'j') as j:
            head1 = i
            head2 = j
            with ib.if_scope(ib.likely(head1*loop1 < tile - head2)):
                with ib.if_scope(ib.likely(head1*loop1 < tile - head2)):
                    ib.emit(tvm.call_extern('float16',"cce_intrisic",head1))

    stmt = ib.get()
    stmt = tvm.ir_pass.LoopPartition(stmt,True)
    print stmt

test()

@RichardFido The example doesn't work because of the rigid structure of how bounds are deduced for the conditionals. I do not understand that portion of the code. There is an easy workaround for now.
Line causing issue - with ib.if_scope(ib.likely(head1*loop1 < tile - head2)):
Replace  - with ib.if_scope(ib.likely(head1*loop1 + head2 < tile)):

If the constant is not present on the right side alone, then the deduce_bound function does not work correctly. Solving for any combination of conditions will require decent changes in deduce_bounds functions or Simplify pass. I do not plan to work on that in this PR.

I suggest we can merge this PR first, we can send more PR to support other cases someone may need.

OK, reviewer, please take another round of look and https://docs.tvm.ai/contribute/code_review.html#approve-and-request-changes-explicitly

THanks @xqdan @MarisaKirisame @anijain2305 @yzhliu this is now merged


Rebooting Windows 11 Guest during Windows Update crashes QEMULauncher

Describe the issue
Rebooting Windows 11 by a Windows Update causes QEMULauncher to crash. VM will not reboot.
Setting it to reboot into Safe Mode also made it crash... seems to be sporadic.
(qemu-aarch64-softmmu: Spice: red-qxl.c:807:spice_qxl_gl_scanout: condition `qxl_state->gl_draw_cookie == GL_DRAW_COOKIE_INVALID' failed)
Configuration

UTM Version: 2.4.0
OS Version: macOS Monterey 12.0.1
Intel or Apple Silicon? Apple Silicon

Crash log
crash.log
Debug log
debug.log
Upload VM
config.plist.zip

Please change the Emulated Display Card to virtio-ramfb, this will get rid of the crash. The -gl cards are not supported for Windows guest OS (yet)

.

I think this should be in the UTM Troubleshooting section for Windows 11.


Make params properties more concise

Starting in PowerShell 3.0, " = $true" is no longer required.
Small change, but nicely de-clutters. Optional, of course. Both ways work.

Frankly, this may be a matter of preference. 😅
I respect your suggestion. Thanks.

It's true 😅  Many people from the PS v2 days seem to prefer the explicit $true. I started coding in PS more often when it was v3 and liked the conciseness of none of it. Thank you for the merge! I will also address the other PR shortly.


IDF 5.2 fails to install Python venv (IDFGH-12140)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v5.2 11eaf41b37267ad7709c0899c284e3683d2f0b5e
Operating System used.
Linux
How did you build your project?
Command line with CMake
If you are using Windows, please specify command line type.
None
What is the expected behavior?
IDF 5.2 should.... work? Lol.
What is the actual behavior?
ERROR: /home/jeremy/.espressif/python_env/idf5.2_py3.8_env/bin/python doesn't exist! Please run the install script or "idf_tools.py install-python-env" in order to create it
This is after erasing ~/.espressif and running install.sh.
v5.2 doesn't create idf5.2_py3.8_env, so nothing works.  Can't even run a clean command.
It does however, install idf5.1_py3.8_env.
It looks like renaming it to 5.2 instead of 5.1 gets it to work.
I'm using the actual v5.2 tag.
Did this work in your CI system?  Why would it install differently on my machine vs the CI environment?
Steps to reproduce.
Install IDF 5.2.  That's it.
Build or installation Logs.
No response
More Information.
No response

Did this work in your CI system?

It did successfully install when building the Docker image: https://github.com/espressif/esp-idf/actions/runs/7911595216/job/21595996329, and it works in our internal CI as well.
Can you please try running git describe inside your copy of IDF? Does it say v5.2 or something else?

v5.2
I checked out the actual tag.
It looks like a lot of commands are still looking for the 5.1 venv, and some are looking for 5.2.
So the fix is to copy the 5.1 the installer creates into 5.2, and keep the old 5.1.

Hello @readmodifywrite ,
just a thought. Isn't it possible that you are running the install.sh within 5.1 env. activated.  Meaning the IDF_PYTHON_ENV_PATH is actually set to 5.1 and it's used by the idf_tool.py?
I can reproduce this with

checkout v5.1 tag and run install.sh
activate 5.1 with export.sh
checkout v5.2
delete ~/.espressif
run install.sh

In 2. the IDF_PYTHON_ENV_PATH is set to 5.1 and it's used in 5.  Just a quick thought that might help.


fixed issue when subsort is provided

@bjchambers I'm going to merge this without your review since you told me what to change, and all tests are passing.


fixes signature for roc curve

Closes https://github.com/alan-turing-institute/MLJ.jl/issues/630#issuecomment-671167519

Codecov Report

Merging #385 into dev will decrease coverage by 0.36%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev     #385      +/-   ##
==========================================
- Coverage   82.80%   82.43%   -0.37%
==========================================
  Files          39       39
  Lines        2628     2590      -38
==========================================
- Hits         2176     2135      -41
- Misses        452      455       +3

Impacted Files
Coverage Δ

src/measures/finite.jl
95.32% <ø> (-2.93%)
:arrow_down:

src/sources.jl
59.25% <0.00%> (-7.41%)
:arrow_down:

src/composition/models/inspection.jl
95.23% <0.00%> (-4.77%)
:arrow_down:

src/data/datasets.jl
86.11% <0.00%> (-2.78%)
:arrow_down:

src/composition/learning_networks/inspection.jl
87.80% <0.00%> (-0.84%)
:arrow_down:

src/hyperparam/one_dimensional_range_methods.jl
91.86% <0.00%> (-0.37%)
:arrow_down:

src/composition/learning_networks/nodes.jl
66.66% <0.00%> (-0.27%)
:arrow_down:

src/univariate_finite/types.jl
90.72% <0.00%> (-0.19%)
:arrow_down:

src/composition/learning_networks/machines.jl
95.71% <0.00%> (-0.18%)
:arrow_down:

... and 6 more

Continue to review full report at Codecov.

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


Fix extension in hsvs derivative

Closes #162.
Changes proposed in this pull request

Specify extension in ds_fs_5tt_hsvs because it was defaulting to an invalid extension (.long_5tt.mif.gz).

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

Project coverage is 33.95%. Comparing base (df45b9d) to head (67bd52b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #165   +/-   ##
=======================================
  Coverage   33.95%   33.95%
=======================================
  Files          57       57
  Lines        7192     7192
  Branches      983      983
=======================================
  Hits         2442     2442
  Misses       4652     4652
  Partials       98       98

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

🚨 Try these New Features:

Flaky Tests Detection - Detect and resolve failed and flaky tests


SSLError

After "connection received" and "downgrading authentication";
[*] Spoofing arp replies...
[*] Turning on IP forwarding...
[*] Set iptables rules for SYN packets...
[*] Waiting for a SYN packet to the original destination...
[+] Got it! Original destination is <IP_ADDRESS>
[*] Clone the x509 certificate of the original destination...
[*] Adjust the iptables rule for all packets...
[*] Run RDP proxy...
Waiting for connection
Connection received from <IP_ADDRESS>
Downgrading authentication options from 11 to 3
Enable SSL
SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:2090)
Waiting for connection
|

Thanks for your help!
I can't reproduce this with any of the Windows test machines I have available. What is the version of the RDP host and the client?
Please pull again and run seth.sh again with -d at the end (and install the right hexdump module).  What's the output then?

WS2008R2 and still same output.

same here

I'm afraid I can't solve this without the debug output. I decided to use hexlify if hexdump is not available. It's not pretty but I can work with it.
Also, I changed the way the debug flag is set in seth.sh.
Please pull again, run SETH_DEBUG=1 ./seth.sh eth0 .... and post the ouput. Use something like pastebin if it is too large.
Also, you could try to change the downgrade level by running  SETH_DEBUG=1 SETH_DOWNGRADE=1 ./seth.sh eth0 ....

Got the same Error SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:2178)
I tried the script under different OS (debian/ubuntu/windows) same error.. Under which linux distro / python version / open-ssl version are you running script? I attached debug log from error...
Waiting for connection
Connection received from XXX.XXX.XXX.XXX
From client:
00000000: 03 00 00 2F 2A E0 00 00  00 00 00 43 6F 6F 6B 69  .../*......Cooki
00000010: 65 3A 20 6D 73 74 73 68  61 73 68 3D 41 64 6D 69  e: mstshash=Admi
00000020: 6E 69 73 74 72 0D 0A 01  00 08 00 0B 00 00 00     nistr..........
Downgrading authentication options from 11 to 3
From client: (modified)
00000000: 03 00 00 2F 2A E0 00 00  00 00 00 43 6F 6F 6B 69  .../*......Cooki
00000010: 65 3A 20 6D 73 74 73 68  61 73 68 3D 41 64 6D 69  e: mstshash=Admi
00000020: 6E 69 73 74 72 0D 0A 01  00 08 00 03 00 00 00     nistr..........
From server:
00000000: 03 00 00 13 0E D0 00 00  12 34 00 02 09 08 00 02  .........4......
00000010: 00 00 00                                          ...
Enable SSL
From client:
00000000: 30 37 A0 03 02 01 03 A1  30 30 2E 30 2C A0 2A 04  07......00.0,.*.
00000010: 28 4E 54 4C 4D 53 53 50  00 01 00 00 00 B7 82 08  (NTLMSSP........
00000020: E2 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000030: 00 0A 00 5A 29 00 00 00  0F                       ...Z)....
SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:2178)

Thanks!
My info is:
$ python3 --version
Python 3.5.2+
$ openssl version
OpenSSL 1.0.2h  3 May 2016
$ uname -a
Linux kali 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux

My RDP server is a Windows Server 2012 R2. I'm working on setting up an 2008R2 server to test this.

I'm able to reproduce the problem, but I don't understand it yet. It works if the RDP host is newer.

I tried different client/server variations. I attached different client/server tests with debug logs maybe that helps you...
Client: Windows 10 (10.0.10586) (32 Bit)
Server: Windows 2012 R2 / Windows 2016 (Preview) - (Without NLA) (x64)
Proxy mode: -g 0 or -g 1

Client shows an error message: authentication error 0x80070057 and quits (no login prompt shows up...)
With mode -g 1 i get the certificate warning and when click ok nothing happens and same debug log

Waiting for connection
Connection received from <IP_ADDRESS>
From client:
00000000: 03 00 00 13 0E E0 00 00  00 00 00 01 00 08 00 0B  ................
00000010: 00 00 00                                          ...
Downgrading authentication options from 11 to 0
From client: (modified)
00000000: 03 00 00 13 0E E0 00 00  00 00 00 01 00 08 00 00  ................
00000010: 00 00 00                                          ...
From server:
00000000: 03 00 00 13 0E D0 00 00  12 34 00 03 00 08 00 01  .........4......
00000010: 00 00 00                                          ...
The client has disconnected

Client: Windows 10 (10.0.10586)
Server: Windows 2012 R2 / Windows 2016 (Preview) - (With NLA enabled)
Proxy mode: -g 0 or -g 1

Client show up error message that my computer doesn't support NLA and can't connect. Thats normal and clear..

Client: Windows 10 (10.0.10586) (32 Bit)
Server: Windows 2012 R2 / Windows 2016 (Preview) - (With/Without NLA enabled) (x64)
Proxy mode: -g 3

Client shows up login prompt. I will type in wrong credentials and client gives me another try
When using Windows 2012 R2 as server i won't get another try
Username: Administrator / admin , Password: 123456

Debug Log Windows 2016 -> https://pastebin.com/97ExCLnW
Debug Log Windows 2012 R2 -> https://pastebin.com/FcbFtLsk

If i type in correct credentials no error but nothing happens but debug log shows SSLError so i know only if the credentials are correct i get SSLError
Username: Administrator , Password: admin123456@
I tried to crack the netntlmv2 hash with jtr with password admin123456@ but jtr says false ????

Debug Log -> https://pastebin.com/X1kgfxF2
Client: Windows 7 SP1 (6.1.7601) (32 Bit)
Server: Windows 2012 R2 / Windows 2016 (Preview) - (Without NLA)
Proxy mode: -g 3

I get a login prompt. I type in credentials wrong or correct doesn't matter, i get cert warning and get connected to server, everything is working :)

Debug Log -> https://pastebin.com/gp7xMDsn
Client: Windows 7 SP1 (6.1.7601) (32 Bit)
Server: Windows 2012 R2 / Windows 2016 (Preview) - (With NLA enabled)
Proxy mode: -g 3

But if i enable NLA on the server and try to connect, i type in credentials
and client returns error message "Authentication error , the token supplied to the function is invalid"

Debug Log -> https://pastebin.com/QtihZwku

That's great, I appreciate the work you put in. I'm on it, but time is scarce ;) stay tuned

I figured out the problem. I tried to connect with openssl s_client to the RDP service on Windows 7 and got the internal error as soon as data was transmitted. When forcing the cipher to RC4-SHA, it worked. There seems to be an issue when connecting to Windows 7 with OpenSSL using an AES cipher.
Please try again with the latest commit and report back. (This is solely regarding the problem with a Win7/Win2012 host and a newer client.)

Thanks for your work, but seems when the server has NLA enabled still nothing working, also when client using windows 10 mostly not working. Windows 7 clients seems to work better now, but still not with NLA.. I will update my comment while doing different tests...
Client: Windows 7 6.1.7601 (NLA wird üntertützt + RDP 7.1 wird unterstützt)
Server: Windows 10 (x64) (No NLA)
Proxy mode: -g 3
Login: admin / admin123456

Everything is working -> https://pastebin.com/7vh1iErP

Client: Windows 10 10.0.10586 (NLA wird üntertützt + RDP 10.0 wird unterstützt)
Server: Windows 10 (x64) (No NLA)
Proxy mode: -g 3
Login: admin / admin123456

Not working, credentials are wrong, but i typed in valid -> https://pastebin.com/uNKLNbKv

Client: Windows 7 6.1.7601 (NLA wird üntertützt + RDP 7.1 wird unterstützt)
Server: Windows 10 (x64) (NLA)
Proxy mode: -g 3
Login: admin / admin123456

Not working, client shows token error -> https://pastebin.com/8Xr4XjNh

Client: Windows 10 10.0.10586 (NLA wird üntertützt + RDP 10.0 wird unterstützt)
Server: Windows 10 (x64) (NLA)
Proxy mode: -g 3
Login: admin / admin123456

Not working, credentials are wrong, but i typed in valid -> https://pastebin.com/cPesrdnY

This is great information, but we need to make separate issues for this.
As I said, here I was focusing on the SSLError, I didn't expect the other issues to be solved.

I consider this fixed by 2e35a2aa


📝 Biome fails to format styled-components styles

Environment information
CLI:
  Version:                      1.9.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.8.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/4.3.1"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Formatter:
  Format with errors:           false
  Indent style:                 Space
  Indent width:                 2
  Line ending:                  Lf
  Line width:                   100
  Attribute position:           Auto
  Bracket spacing:              BracketSpacing(true)
  Ignore:                       []
  Include:                      []

JavaScript Formatter:
  Enabled:                      false
  JSX quote style:              Double
  Quote properties:             AsNeeded
  Trailing commas:              All
  Semicolons:                   Always
  Arrow parentheses:            Always
  Bracket spacing:              unset
  Bracket same line:            false
  Quote style:                  Single
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Attribute position:           unset

JSON Formatter:
  Enabled:                      true
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Trailing Commas:              unset

CSS Formatter:
  Enabled:                      true
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Quote style:                  Double

GraphQL Formatter:
  Enabled:                      false
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Bracket spacing:              unset
  Quote style:                  unset

Workspace:
  Open Documents:               0

Configuration
{
  "$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
  "files": {
    "ignore": [".tsimp", ".yarn", "coverage", "dist", ".pnp.cjs", ".pnp.loader.mjs"]
  },
  "formatter": {
    "lineWidth": 100,
    "indentStyle": "space"
  },
  "linter": {
    "rules": {
      "complexity": {
        "noUselessSwitchCase": "off"
      },
      "correctness": {
        "noUnusedImports": "warn",
        "noUnusedVariables": "warn"
      },
      "suspicious": {
        "noConsoleLog": "warn"
      }
    }
  },
  "javascript": {
    "formatter": {
      "quoteStyle": "single"
    }
  },
  "overrides": [
    {
      "include": ["**/package.json"],
      "formatter": {
        "lineWidth": 1
      }
    },
    {
      "include": ["**/vite.config.ts"],
      "linter": {
        "rules": {
          "suspicious": {
            "noConsoleLog": "off"
          }
        }
      }
    }
  ]
}

Playground link
https://biomejs.dev/playground/?files.main.styles.ts=aQBtAHAAbwByAHQAIABzAHQAeQBsAGUAZAAgAGYAcgBvAG0AIAAnAHMAdAB5AGwAZQBkAC0AYwBvAG0AcABvAG4AZQBuAHQAcwAnADsACgAKAGMAbwBuAHMAdAAgAFcAcgBhAHAAcABlAHIAIAA9ACAAcwB0AHkAbABlAGQALgBkAGkAdgBgAAoAdwBpAGQAdABoADoAMQAwADAAJQA7AAoAcABhAGQAZABpAG4AZwA6ACAAMAA7AGAAOwA%3D
Code of Conduct

[X] I agree to follow Biome's Code of Conduct

Oddly enough, this problem can't be reproduced in Biome playground, where both Biome AND Prettier fail to format the file.
In real life, the sample file gets formatter by Prettier like so:

Biome doesn't support embedded formatting, that's why the formatting differs.
Other contributors are working on implementing the infrastructure.
I think the playground doesn't set the proper prettier options to enable that formatting.
I am going to close this issue for now, because that's expected. You can subscribe to the embedded formatting issue to track progresses


Multi-column sort

Is it possible to sort more than one column at a time? For example: First sort column x, then column y.

No, only one column sort is possible.

Thanks for the quick reply. I think this could be a nice feature for a future release. I really like MVC6.Grid. Many thanks for the fantastic work.

Yes it's a needed feature sometimes, but it's hard to add with the way grid is implemented now :frowning_face:
Because every grid column is processing data on it's own, without knowing anything about other columns or the order they should be executing in.

Thanks for elaborating on this issue. I would love to assist. But unfortunately, I am too much of a beginner. I would mess up your code.

Well it would require a lot of changes so I'm not doing this for now, but keeping it in backlog.


Rebranding

This is no longer just a cubari app for ios. Rebrand to a new name.

Fixed in commit 5779b3348d1d25cf666fbce15b304170bcef0907


User Popout is not consistent.

The user popout at the bottom is a rectangular box rather than a circular one. Maybe fix this?

I will fix it once Discord decides to give me the update.

okay thank you

Did you fix it yet?


High concurrency brought in cannot obtain exclusive access to locked queue

Hi! When I created 50 rules which run periodic tasks per 5 minutes concurrently, the whole system was stuck and following errors occurred repeatedly in the log of st2actionrunner and st2api:
2018-04-03 15:16:00,822 105906416 WARNING mixins [-] Connection to broker lost, trying to re-establish connection...
Traceback (most recent call last):
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/mixins.py", line 170, in run
    for _ in self.consume(limit=None, **kwargs):
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/mixins.py", line 186, in consume
    with self.consumer_context(**kwargs) as (conn, channel, consumers):
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/mixins.py", line 179, in consumer_context
    with self.Consumer() as (connection, channel, consumers):
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/mixins.py", line 228, in Consumer
    with self._consume_from(*self.get_consumers(cls, channel)) as c:
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/services/triggerwatcher.py", line 76, in get_consumers
    callbacks=[self.process_task])]
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/messaging.py", line 386, in __init__
    self.revive(self.channel)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/messaging.py", line 408, in revive
    self.declare()
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/messaging.py", line 421, in declare
    queue.declare()
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/entity.py", line 605, in declare
    self._create_queue(nowait=nowait, channel=channel)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/entity.py", line 614, in _create_queue
    self.queue_declare(nowait=nowait, passive=False, channel=channel)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/kombu/entity.py", line 649, in queue_declare
    nowait=nowait,
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/amqp/channel.py", line 1151, in queue_declare
    spec.Queue.DeclareOk, returns_tuple=True,
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/amqp/abstract_channel.py", line 79, in wait
    self.connection.drain_events(timeout=timeout)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/amqp/connection.py", line 471, in drain_events
    while not self.blocking_read(timeout):
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/amqp/connection.py", line 477, in blocking_read
    return self.on_inbound_frame(frame)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/amqp/method_framing.py", line 55, in on_frame
    callback(channel, method_sig, buf, None)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/amqp/connection.py", line 481, in on_inbound_method
    method_sig, payload, content,
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/amqp/abstract_channel.py", line 128, in dispatch_method
    listener(*args)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/amqp/channel.py", line 279, in _on_close
    reply_code, reply_text, (class_id, method_id), ChannelError,
ResourceLocked: Queue.declare: (405) RESOURCE_LOCKED - cannot obtain exclusive access to locked queue 'st2.trigger.watch.WebhooksController-0f080337c4' in vhost '/'

This is an exclusive queue, so it will be delete once the AMQP connection closed. I want to ask how to reslove this issue and if we can stop directly consume messaging from this type of queue.

I'm also have this issue

See
https://github.com/StackStorm/st2/issues/4164#issuecomment-400345836


Feature request or help needed

Hey, if this is not a feature yet, please try to add Realm connections,
If this is a feature, how could i join an realm from realms.gg?
I had an invitecode, but i don't know, how to join on PS4, i would not play on an other server
I hope, someone could help me.

You see, it may not be possible. I have tried joining via ps4 to a realm and it simply said "your device does not support this feature" and unlike servers, that message does not appear.

Hey @suerion, apologies for the delay. I think #125 covers the same feature request. There's no support for this yet but I can definitely look into it.

Hey @suerion, apologies for the delay. I think #125 covers the same feature request. There's no support for this yet but I can definitely look into it.


Support function composition with Function, Consumer, and Supplier interfaces

Description
I would like to propose an enhancement (if it could be called as such) to Spring Cloud Function that will allow for function composition using classes that implement Function, Consumer, and Supplier interfaces, enabling a slightly more structured way to define workflows.
Describe the Solution
Here is an example of what I'm trying to describe:
@Component
public class InputSource implements Function<String, String> {
    @Override
    public String apply(final String message) {
        return message;
    }
}

@Component
public class FilterFn implements Function<String, String> {
    @Override
    public String apply(final String message) {
        return message;
    }
}

@Component
public class FlatMapFn implements Function<String, String> {
    @Override
    public String apply(final String message) {
        return message;
    }
}

@Component
public class KafkaSink implements Consumer<String> {
    @Override
    public void accept(final String var1) {
        // Implement Sink behavior
    }
}

The workflow will be composed with: InputSource > FilterFn > FlatMapFn > KafkaSink, similar to how spring.cloud.function.definition is currently used, but arguably more structured — or rather closely to how Apache Flink defines workloads.

@x80486 ,
This looks like a duplication of https://github.com/spring-cloud/spring-cloud-stream/issues/3059 without any evolution.
Please, consider to read docs I've shared there with you and come back to us with more info.
Right now this feels like Works as Designed because of the framework features described in docs.
Thanks


fix #345

@richiejp spent a LOT of time debugging. Think I found the issue. Hope this resolves properly, but pls take a look to see:
On macos-14, upon pressing T:

get_data_index_async() never fires, and there is a very brief "Unexpected error!" flash in the status bar because it tries to seek to a newline, but there is no index data so it seeks to the start of the file and does not encounter a newline

This line of code only executes once, and sets need_index to false, because uibuff->write_in_progress is set to 1 via uibopts.write_after_open in transformation.c:247. Perhaps on other platforms the write_in_progress is actually not 1 due to it being a bit and uibopts.write_after_open being a char?

char need_index = !uibuff->index_started && !uibuff->write_in_progress;

There might be a race condition from the time between need_index = uibuff->index_started and writing uibuff->index_started = 1

Changing need_index to not check write_in_progress, and changing transformation.c to not explicitly call the worker. This also makes various functions in transformation.c unnecessary; they seem to be redundant with what is in index.c anyway and probably would have been best consolidated from the get-go

Looking more closely this definitely does not fix the issue without causing others but adding zsvsheet_run_buffer_transformation() back in causes an assertion to fail.
If it is kept, zsvsheet_run_buffer_transformation() should be consolidated with the similar code in index.c, and the mechanism for starting an index run should also be consolidated, probably triggered in read-data.c so that it does not need to come via a push_transformation call. That sound good?

get_data_index_async() never fires, and there is a very brief "Unexpected error!" flash in the status bar

Just on a partially related note, I added something which makes the status messages last longer here @liquidaty
https://github.com/liquidaty/zsv/pull/336/commits/2ed256f3457f766262f6c01ae0a7becac11ebf65


Refactor actions.py

actions.py has a lot of duplication. Now that we've created EventHandler we can refactor this module. The general idea is to have the PressEmitter post events:

Key pressed (with key number)
Key held (with key number)
Any key pressed

Something will need to listen to these events and do the following:

Select an option from the current menu.
Change the view of a running timer.
Cancel the timer and go back to the first menu.
For a completed timer, go back to the first menu.

Now we have the KeyListener class we can refactor it to use the strategy pattern.


kit.vite.build.rollupOptions example

Can you provide a production build configuration example?
I'm not having any luck filling up rollupOptions of the following svelte.config.cjs...
const sveltePreprocess = require('svelte-preprocess');
const node = require('@sveltejs/adapter-node');
const pkg = require('./package.json');

/** @type {import('@sveltejs/kit').Config} */
module.exports = {
	// Consult https://github.com/sveltejs/svelte-preprocess
	// for more information about preprocessors
	preprocess: sveltePreprocess(),
	kit: {
		// By default, `npm run build` will create a standard Node app.
		// You can create optimized builds for different platforms by
		// specifying a different adapter
		adapter: node(),

		// hydrate the <div id="svelte"> element in src/app.html
		target: '#svelte',

		vite: {
			ssr: {
				noExternal: Object.keys(pkg.dependencies || {})
			},
			build: {
				rollupOptions: {
					/* ? */
				}
			}
		}

	}
};

...with what I have in the working rollup.config.js file...
import svelte from 'rollup-plugin-svelte';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import livereload from 'rollup-plugin-livereload';
import { terser } from 'rollup-plugin-terser';
import css from 'rollup-plugin-css-only';

const production = !process.env.ROLLUP_WATCH;

function serve() {
	let server;

	function toExit() {
		if (server) server.kill(0);
	}

	return {
		writeBundle() {
			if (server) return;
			server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
				stdio: ['ignore', 'inherit', 'inherit'],
				shell: true
			});

			process.on('SIGTERM', toExit);
			process.on('exit', toExit);
		}
	};
}

export default {
	input: 'src/main.js',
	output: {
		sourcemap: true,
		format: 'iife',
		name: 'app',
		file: 'public/build/bundle.js'
	},
	plugins: [
		svelte({
			compilerOptions: {
				// enable run-time checks when not in production
				dev: !production
			}
		}),
		// we'll extract any component CSS out into
		// a separate file - better for performance
		css({ output: 'bundle.css' }),

		// If you have external dependencies installed from
		// npm, you'll most likely need these plugins. In
		// some cases you'll need additional configuration -
		// consult the documentation for details:
		// https://github.com/rollup/plugins/tree/master/packages/commonjs
		resolve({
			browser: true,
			dedupe: ['svelte']
		}),
		commonjs(),

		babel({
			extensions: ['.js', '.mjs', '.html', '.svelte'],
			babelHelpers: 'runtime',
			exclude: ['node_modules/@babel/**'], // <= /!\ NOT 'node_mobules/**'
			presets: [
				['@babel/preset-env', {
					// adapter to ensure IE 11 support
					targets: '> 0.25%, not dead, IE 11'
				}]
			],
			plugins: [
				"@babel/plugin-syntax-dynamic-import",
				["@babel/plugin-transform-runtime", {
					useESModules: true
				}]
			]
		}),

		// In dev mode, call `npm run start` once
		// the bundle has been generated
		!production && serve(),

		// Watch the `public` directory and refresh the
		// browser on changes when not in production
		!production && livereload('public'),

		// If we're building for production (npm run build
		// instead of npm run dev), minify
		production && terser()
	],
	watch: {
		clearScreen: false
	}
};

...because I'm not having any luck importing anything into the cjs file.
Is it still possible to provide a vite.config.js solely for the build options?

SvelteKit needs control over the build output, so that e.g. the server has guarantees about which client file corresponds to what route.
What are you trying to do exactly?

I'm trying to make the client side JS go through the transpilation process in order for it to run on legacy browsers such as IE11. As far as I can see Vite can do it. Some source even say that Vite can build a bundle that works for both modern and legacy browsers, while not twisting the syntax for modern ones, but I haven't done any research on that. I'm trying SvelteKit first.
At this moment I'm not that versed in SvelteKit to know at least that if something like this Sapper repo https://github.com/antony/sapper-ie has, is at all possible. I'm pretty much new to the whole Svelte ecosystem.
I'd like to dig into things to see if SvelteKit works for old browsers, even if that means sacrificing some of the SvelteKit features. I already know how to transpile Svelte for IE11 with both Rollup and Snowpack, but client side JS isn't of much use for me.
At this time the cjs file, which demands to use require statements, is what throws me off. The repo linked above uses the good old rollup.config..js.
 I hate IE11 with passion too, just like all of the devs do, but corporations, that are stuck with it, don't think it's necessary to replace.
I know vite.config.js was part of the SvelteKit not a long ago. Not trying to say that it should go back, just not having any idea about how to go on with Vite/Rollup specific configurations inside svelte.config.cjs.
Sacrificing for example the routing mechanism isn't the end of the world for me. I what I need to do the URI can remain constant throughout the whole lifecycle of the web app.

You can pass config to vite via the vite property inside the kit property. Would that solve your use case?

If the X of the XY problem is legacy builds, there's already an issue (#12) for this, and this is not something we know how to deal with yet. For the moment, I would personally not recommend SvelteKit for projects where you needed to support IE11.

I know this is an on-going issue, to add my use-case to this issue, instead of targeting IE 11, I need to target specific older chromiums/webkits for embedded set-top boxes (cable boxes, etc).  Many of these boxes are quite slow (the primary driver of moving our app from react to svelte) and use significantly older versions...

I'm going to close this in favour of #12, since this is a bigger question that just passing config to vite (which in the general case — plugins, etc — can be done as long as you don't touch the bits SvelteKit needs to be resonsible for). We need to be able to generate the legacy JS, but we also need to inject a <script> block that detects that we need to use it, which Vite can't help with. (In a pure Vite project you can, because it controls your HTML, but that doesn't apply the same way to SSR frameworks that use Vite under the hood.)


Handling errors when using QueryClient.fetchQuery()

Hi, I am trying to use vue-query outside of a vue component, inside of my beforeEach function within vue-router, I can't figure out how to handle errors coming back from my api. Would anyone have any insight into this issue? Normally in a component you'd get back error and data, but this does not seem like it is the case when using fetchQuery()
import { queryClient } from "@/shared/query-client";

router.beforeEach(async (to, from) => {
  if (to.meta.requiresAuth) {
    ...

    try {
      const res = await queryClient.fetchQuery(
        "/me/userinfo",
        () => userInfoFetcher
      );
    } catch (e) {
      console.log(e);
    }

    ...
  }
});

The queryClient is just an exported QueryClient()
export const userInfoFetcher: Promise<Userinfo> = apiClient
  .get<Userinfo>("/me/userinfo")
  .then((res) => res.data)
  .catch((err) => {
    throw new Error(err.detail);
  });

export function useUserinfo() {
  return useQuery("me/userinfo", (): Promise<Userinfo> => {
    return userInfoFetcher;
  });
}

apiClient is an axios instance.

Fixed


chore(master): release 1.1.1

:robot: I have created a release beep boop
1.1.1 (2022-11-11)
Bug Fixes

network name should be underlined (1c5a886)

Documentation

more description (39859af)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/wayofdev/docker-shared-services/releases/tag/v1.1.1 :sunflower:


RSDK-7644 - update example module client for integration test consistency

Some small updates to the complex module code so that it can run correctly without modification when built from main by the sdk-integration-tests CI jobs.

@njooma @lia-viam can I bother y'all to review this? Would love to get it merged soon; it's blocking on the module integration tests.