Add a trait for commands that run for a given Entity

Objective
Resolve #6156.
The most common type of command is one that runs for a single entity. Built-in commands like this can be ergonomically added to the command queue using the EntityCommands struct. However, adding custom entity commands to the queue is quite cumbersome. You must first spawn an entity, store its ID in a local, then construct a command using that ID and add it to the queue. This prevents method chaining, which is the main benefit of using EntityCommands.
Example (before)
struct MyCustomCommand(Entity);

impl Command for MyCustomCommand { ... }

let id = commands.spawn((...)).id();
commmands.add(MyCustomCommand(id));

Solution
Add the EntityCommand trait, which allows directly adding per-entity commands to the EntityCommands struct.
Example (after)
struct MyCustomCommand;

impl EntityCommand for MyCustomCommand { ... }

commands.spawn((...)).add(MyCustomCommand);

Changelog

Added the trait EntityCommand. This is a counterpart of Command for types that execute code for a single entity.

Future Work
If we feel its necessary, we can simplify built-in commands (such as Despawn) to use this trait.

If we feel its necessary, we can simplify built-in commands (such as Despawn) to use this trait.

Yes please. This will unblock parallelizing some commands down the line. I'll make an issue.
bors r+


Allow overriding with debug

Right now debug doesn't have an effect no matter how you set it. I'm assuming you want the default to be true but overridable with debug: false. I'd prefer it the other way but I'm submitting this in the spirit of the existing behavior. Happy to change it up, or not. Thanks for the library, works well!

Well spotted @possibilities, thanks for the pull request! I've made the same change for the other attributes. (handleExitMode, handleCompletionStatus)
Cheers!


_type_lb and _type_ub are wrong

e.g. _type_ub(Vector{Vector{T}} where {T<:Int}) == Vector{Vector{Int}}, when the intention is that it is Vector{Vector{T} where {T<:Int}}

Actually the above comment is incorrect, because Vector{Vector{T} where {T<:Int}} is not a subtype of Vector{Vector{T}}.
I'm keeping _type_ub as it is, replacing each typevar with its upper bound. This gives the most general specialisation of the type.
_type_lb is similar, but any typevars which are a parameter of the outermost type are replaces with their lower bound.
e.g. _type_lb(Vector{Vector{T}} where {T<:Int}) == Vector{Vector{Int}} == _type_ub(...) because T is not a parameter of the top type.
e.g. _type_lb(Vector{<:Vector{<:Int}}) == Vector{Union{}} and _type_ub(Vector{<:Vector{<:Int}}) == Vector{Vector{<:Int}}


Make query-rewrites easier

See commit messages.
Most of these changes are a preparation for https://github.com/crate/crate/pull/5525

Codecov Report

Merging #5529 into master will increase coverage by <.01%.
The diff coverage is 57.14%.

@@             Coverage Diff              @@
##             master    #5529      +/-   ##
============================================
+ Coverage     82.69%   82.69%   +<.01%
- Complexity    11426    11429       +3
============================================
  Files          1359     1359
  Lines         44409    44401       -8
  Branches       5531     5531
============================================
- Hits          36722    36718       -4
- Misses         5111     5113       +2
+ Partials       2576     2570       -6

Impacted Files
Coverage Δ
Complexity Δ

...e/planner/consumer/MultiSourceGroupByConsumer.java
100% <100%> (ø)
6 <0> (-1)
:arrow_down:

...in/java/io/crate/analyze/QueriedTableRelation.java
72.41% <28.57%> (-17.59%)
11 <4> (ø)

...l/src/main/java/io/crate/analyze/symbol/Field.java
76.66% <33.33%> (+4.79%)
16 <1> (ø)
:arrow_down:

sql/src/main/java/io/crate/analyze/Relations.java
50% <50%> (ø)
1 <1> (?)

...src/main/java/io/crate/analyze/symbol/Symbols.java
89.13% <87.5%> (+1.95%)
20 <5> (+5)
:arrow_up:

...n/java/io/crate/exceptions/JobKilledException.java
0% <0%> (-66.67%)
0% <0%> (-1%)

...crate/executor/transport/TransportShardAction.java
72.97% <0%> (-21.63%)
8% <0%> (-2%)

...o/crate/analyze/SafeExpressionToStringVisitor.java
83.33% <0%> (-16.67%)
7% <0%> (-1%)

.../java/io/crate/blob/TransportDeleteBlobAction.java
75% <0%> (-5%)
4% <0%> (-1%)

...io/crate/protocols/postgres/types/VarCharType.java
87.5% <0%> (-4.17%)
9% <0%> (-1%)

... and 21 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 e135b18...864586f. Read the comment docs.


docs(backend-integration): update import for modulepreload polyfill

Description
The issue is described here - https://github.com/vitejs/vite/issues/4786
What is the purpose of this pull request?

[ ] Bug fix
[ ] New Feature
[x] Documentation update
[ ] Other

Before submitting the PR, please make sure you do the following

[x] Read the Contributing Guidelines.
[x] Read the Pull Request Guidelines and follow the Commit Convention.
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[ ] Ideally, include relevant tests that fail without this PR but pass with it.

From https://github.com/vitejs/vite/issues/4786#issuecomment-984340904, this approach is problematic in TS, no?

@ygj6 no, TS/ts-lint just complaining about imports/etc. The issue is also reproducible on react w/o TS.
Here is the reproduction of this: https://codesandbox.io/s/5hgsj?file=/src/main.jsx
Polyfill was imported in main.jsx in order not to simulate backend. To see the error you just need to open sandbox's little browser window in new tab and open console. If the html would be rendered via backend, there would be nothing on the screen

no, TS/ts-lint just complaining about imports/etc.

@katsu223 Apologise for my misleading review, I was talking about complaints from TS/ts-lint. It does fix the problem, but it also prompts the type error in TS. Not sure if this is a good solution.

@ygj6, thanks for clarifications. I am not good at typescript, but I will try to dive into the problem and find the solution


RSF-18; add dependences needed for rsf to build

I need this for the rsf project to build. It's hard to believe others are seeing it, or we'd get complains about builds breaking. But if others are seeing problems building rsf, please accept this PR.

Looks good though this issue should have been a SAK as these changes are in the sakai specific part of rsf.

I'm not 100% sure how this was working either, but I think this property and these versions should all be moved up into dependencyManagement in master

So these dependencies are isolated to just this project and there is no need for anyone to know these versions if your using the sakai-rsf artifacts which every tool does. That is whay the version is managed here and not from master.

@ern I think the reason it's more helpful to have this property in master is when we actually go to release we have to change this from -SNAPSHOT to an actual released version.
We might remember to change it in the sub-project but this is prone to error, and really we want to change these back to -SNAPSHOT after the release is done so it picks up the latest version of these libraries. I think the exception would be if it changes so infrequently that we don't ever have to use -SNAPSHOT and can always have a released version.

I don't care one way or the other, but this property doesn't necessarily change when a Sakai release is made. It's the RSF version, not the Sakai version. They're different. I assume that there's an intent to do an RSF release at the same time. When RSF releases, we'd want to change this dependency.

Yeah I am fine with moving this up to master... It's only needed by the rsf project which is why it was added there. I like how the sakai rsf project hides this dependency.
The only time we would set this to a SNAPSHOT version is if someone was actually doing something in the rsf project (highly unlikely). The spring upgrade is an example but this version will probably stay fixed for a while now.


Integrate MCS computation via duality

Basic version is working. This needs the cnapy_compute_mcs.m from CellNetAnalyzer master.

Under octave cnapy_compute_mcs.m returns this error:
error: feval: /usr/lib/octave/5.2.0/oct/x86_64-pc-linux-gnu/__init_fltk__.oct: failed to load: libfltk_gl.so.1.3: cannot open shared object file: No such file or directory
error: called from
    graphics_toolkit at line 91 column 5
Traceback (most recent call last):
  File "/home/sthiele/Projects/cnapy/cnapy/gui_elements/mcs_dialog.py", line 346, in compute
    nargout=0)
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.7/site-packages/oct2py/core.py", line 500, in eval
    plot_res=plot_res)
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.7/site-packages/oct2py/core.py", line 382, in feval
    store_as=store_as, plot_dir=plot_dir)
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.7/site-packages/oct2py/core.py", line 582, in _feval
    raise Oct2PyError(msg)
oct2py.utils.Oct2PyError: Octave evaluation error:
error: Invalid call to double.  Correct usage is:

 -- double (X)
error: called from:
    print_usage at line 91, column 5
    cnapy_compute_mcs at line 49, column 7

Just by looking at it I would guess that 'double.empty' should be replaced by 'zeros'.

@VonAlphaBisZulu What do you think. I'm asking because the cnapy_compute_mcs.m is mostly a copy of your compute_mcs function:
https://github.com/SteffKlamt/CellNetAnalyzer/blob/master/code/cnap_methods/compute_mcs_dual.m#L524-L526
In general, I think it would be better to avoid such code duplication. :cry: But I don't feel confident to rewrite your function.

Next problematic line is this:
r = cell.empty(1,0);

Here octave complains as follows:
oct2py.utils.Oct2PyError: Octave evaluation error:
error: cell cannot be indexed with .
error: called from:
    cnapy_compute_mcs>findReacAndCoeff at line 202, column 7
    cnapy_compute_mcs>genV at line 160, column 21
    cnapy_compute_mcs at line 53, column 35

Try 'cell(1, 0)'

Yes, should be the same.

I put all my changes to  cnapy_compute_mcs.m into this branch.
https://github.com/SteffKlamt/CellNetAnalyzer/compare/sven/octave-fix
There might be more octave compatibility errors that I've not found yet.

@axelvonkamp The mcs calculation under octave is still not working for me. But I don't have cplex and octave on the same computer. Does cplex work with octave? Can you test mcs computation with octave and cplex from the cnapy UI?
Currently 'intlinprog' is hard coded here:
https://github.com/ARB-Lab/CNApy/blob/2103ecc359cfb67d6b21ece060ca93f532de7678/cnapy/gui_elements/mcs_dialog.py#L283-L285
You would have to change this to 'java_cplex' or 'matlab_cplex'

intlinprog will not work with octave, only 'java_cplex' and 'java_cplex_new' because CPLEX will only work through the Java interface in octave. I can test it, but probably not before Tuesday.

I still get errors. With java_cplex_new and with matlab_cplex i get:
== MCS Computation ==
Verifying that D and T regions are feasible in the original model.
FVA to find blocked reactions in uncompressed model.
#total_reacs: 10, #blocked: 0
Flipped 0 irreversible reactions.
Compressing network.
warning: java2mat is obsolete and will be removed from a future version of Octave
warning: implicit conversion from numeric to char
Verifying D and T region feasibility in compressed model.
FVA to determine model bounds.
FVA to determine model bounds under desired conditions.
#essential: 0 -> 0 more reactions are now non-targetable.
Building CPLEX MILP.
Chosen settings:
  scalar structure containing the fields:

    milp_time_limit =  Inf
    milp_solver = java_cplex_new
    mcs_search_mode =  1
    postproc_verify_mcs = 0
    preproc_compression = 1
    preproc_check_feas = 1
    preproc_D_violations = 0
    milp_bigM = 0
    milp_nullspace = 0
    milp_split_level = 1
    milp_reduce_constraints = 1
    milp_combined_z = 1
    milp_irrev_geq = 1
warning: error caught while executing handle class delete method:
cannot reference properties of class `ConstrainedMinimalCutSetsEnumeratorMILPJ' for non-constructed object

ERROR:  MCS computation failed
        MCS computation failed:

        'cannot reference properties of class `ConstrainedMinimalCutSetsEnumeratorMILPJ' for non-constructed object'

        See command window for details

Traceback (most recent call last):
  File "/home/sthiele/Projects/cnapy/cnapy/gui_elements/mcs_dialog.py", line 358, in compute
    self.eng.eval("[mcs] = cnapy_compute_mcs(cnap, genes, maxSolutions, maxSize, milp_time_limit, gKOs, advanced_on, solver, mcs_search_mode, reac_box_vals, dg_T,dg_D);",
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 493, in eval
    resp = self.feval('evalin', 'base', cmd,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 380, in feval
    return self._feval(func_name, func_args, dname=dname, nout=nout,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 582, in _feval
    raise Oct2PyError(msg)
oct2py.utils.Oct2PyError: Octave evaluation error:
error: element number 1 undefined in return list

and with java_cplex
== MCS Computation ==
Verifying that D and T regions are feasible in the original model.
FVA to find blocked reactions in uncompressed model.
#total_reacs: 10, #blocked: 0
Flipped 0 irreversible reactions.
Compressing network.
warning: java2mat is obsolete and will be removed from a future version of Octave
warning: implicit conversion from numeric to char
Verifying D and T region feasibility in compressed model.
FVA to determine model bounds.
FVA to determine model bounds under desired conditions.
#essential: 0 -> 0 more reactions are now non-targetable.
Building CPLEX MILP.
Chosen settings:
  scalar structure containing the fields:

    milp_time_limit =  Inf
    milp_solver = java_cplex
    mcs_search_mode =  1
    postproc_verify_mcs = 0
    preproc_compression = 1
    preproc_check_feas = 1
    preproc_D_violations = 0
    milp_bigM = 0
    milp_nullspace = 0
warning: error caught while executing handle class delete method:
matrix cannot be indexed with .

ERROR:  MCS computation failed
        MCS computation failed:

        'matrix cannot be indexed with .'

        See command window for details

Traceback (most recent call last):
  File "/home/sthiele/Projects/cnapy/cnapy/gui_elements/mcs_dialog.py", line 360, in compute
    self.eng.eval("[mcs] = cnapy_compute_mcs(cnap, genes, maxSolutions, maxSize, milp_time_limit, gKOs, advanced_on, solver, mcs_search_mode, reac_box_vals, dg_T,dg_D);",
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 493, in eval
    resp = self.feval('evalin', 'base', cmd,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 380, in feval
    return self._feval(func_name, func_args, dname=dname, nout=nout,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 582, in _feval
    raise Oct2PyError(msg)
oct2py.utils.Oct2PyError: Octave evaluation error:
error: element number 1 undefined in return list

I have no cplex installed. Wasn't there an option to run it on òctave without cplex?

There is a new 'glpk' option that can be used as an alternative to 'intlinporg' (the latter is in Matlab only)

There is a new 'glpk' option that can be used as an alternative to 'intlinporg' (the latter is in Matlab only)

On which CellNetAnalyzer branch does that work?

It should work on octave_compatibility

With
self.eng.eval("solver = 'glpk';", nargout=0)
...
self.eng.eval("[mcs] = cnapy_compute_mcs(cnap, genes, maxSolutions, maxSize, milp_time_limit, gKOs, advanced_on, solver, mcs_search_mode, reac_box_vals, dg_T,dg_D);",
                              nargout=0)

I get this error:
Using MATLAB's MILP solver 'intlinprog'. This version only works with big M and finds one MCS per iteration.
== MCS Computation ==
Verifying that D and T regions are feasible in the original model.
FVA to find blocked reactions in uncompressed model.
#total_reacs: 10, #blocked: 0
Flipped 0 irreversible reactions.
Compressing network.
warning: java2mat is obsolete and will be removed from a future version of Octave
warning: implicit conversion from numeric to char
Verifying D and T region feasibility in compressed model.
FVA to determine model bounds.
FVA to determine model bounds under desired conditions.
#essential: 0 -> 0 more reactions are now non-targetable.
Building MATLAB (intlinprog) MILP.
Chosen settings:
  scalar structure containing the fields:

    milp_time_limit =  Inf
    milp_solver = glpk
    mcs_search_mode =  1
    postproc_verify_mcs = 0
    preproc_compression = 1
    preproc_check_feas = 1
    preproc_D_violations = 0
    milp_bigM =  1000
    milp_nullspace = 0
MILP properties:
  scalar structure containing the fields:

    compressed_stoichiometric_matrix_rows =  4
    compressed_stoichiometric_matrix_columns =  8
    milp_vars =  39
    number_of_equations =  12
    number_of_inequalities =  29
    num_targetable_reactions =  8
    max_Cost =  7
    max_Solutions =  Inf
    time_limit =  Inf
Computing one MCS per iteration -not necessarily with minimum cardinality- with intlinprog MILP solver (bigM formulation).

Step 1: Searching for (not necessarily minimal) cut set.

ERROR:  MCS computation failed
        MCS computation failed:

        ''exitflag' undefined near line 1094 column 88'

        See command window for details

Traceback (most recent call last):
  File "/home/sthiele/Projects/cnapy/cnapy/gui_elements/mcs_dialog.py", line 362, in compute
    self.eng.eval("[mcs] = cnapy_compute_mcs(cnap, genes, maxSolutions, maxSize, milp_time_limit, gKOs, advanced_on, solver, mcs_search_mode, reac_box_vals, dg_T,dg_D);",
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 493, in eval
    resp = self.feval('evalin', 'base', cmd,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 380, in feval
    return self._feval(func_name, func_args, dname=dname, nout=nout,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 582, in _feval
    raise Oct2PyError(msg)
oct2py.utils.Oct2PyError: Octave evaluation error:
error: element number 1 undefined in return list

Just comment out the warning on line 1094 of CNAMCSEnumerator2 as a quick fix :-)

Just pushed a fix to the octave_compatibility branch.

Ok, I got it working. Let me know when you merge octave_compatibility branch into master.

This works for me now! What do you think? Can we close this Issue?

I currently do not see the possibility to choose between GLPK and CPLEX (cplex_java/cplex_java_new)?

For now this is still disabled because we have not yet a check for CPLEX inplace. I could also add the option to run it anyway but I would prefer to give this option only if CPLEX is working.

I will add functions for querying whether CPLEX Java/Matlab is working to CNA_MEngine.

Just pushed the functions to the CNA_MEngine branch. They need the latest changes from CNA octave_compatibility branch.

@axelvonkamp Shouldn't the cplex checks eng.is_cplex_matlab_ready() and eng.is_cplex_java_ready() work with octave?
With octave I get this error:
Could not find CPLEX installation.
If you want to use CPLEX set 'cplex_root' in 'configure_cplex_paths'.
use octave engine
0
Traceback (most recent call last):
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/cnapy-0.0.1-py3.8.egg/cnapy/gui_elements/mainwindow.py", line 780, in mcs
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/cnapy-0.0.1-py3.8.egg/cnapy/gui_elements/mcs_dialog.py", line 134, in __init__
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/cnapy-0.0.1-py3.8.egg/cnapy/CNA_MEngine.py", line 96, in is_cplex_java_ready
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 729, in __getattr__
    exist = self._exist(name)
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 686, in _exist
    raise Oct2PyError(msg % name)
oct2py.utils.Oct2PyError: Value "cplex_java_ready" does not exist in Octave workspace

Yes, there is a wrong atrribute name in CNA_MEngine.py, change line 78 to
self.cplex_java_ready= self.eval('cnan.cplex_interface.java;');

@axelvonkamp Ok, mcs with cplex now works for me under octave. I couldn't try matlab as I can't install cplex on the mpi laptop. Maybe you can try mcs with matlab and cplex?

Yes, it is working with Matlab (on Windows), but I don't think it is necessary to offer the CPLEX Java interface when using the Matlab engine. (Actually using the Java-CPLEX interface with Matlab on Linux will crash with the current setup...)

Ok, then I remove the java_cplex option.


Additional CPU & GPU temperature SMC keys

Minor
No Mac with more than two GPUs, correct? 15"/17" MacBook Pro & Mac Pro
As for CPU, do individual cores count? Unlikely each has a temperature sensor, maybe in the newer chips. If not, again, should be a max of two separate CPUs (Mac Pro)

Highest current is dual hexa-core (24 logical) Mac Pro
We can get the number of physical cores at runtime via Mach call, but this won't help as Temperature enum is fixed

I submitted a list in #22.

This was addressed in #23 with the new SMCKit.allUnknownTemperatureSensors(), which when paired with SMCKit.allKnownTemperatureSensors(), provides a complete list for the machine in question.


samba.org fix for Gitian and default transaction filter change

I think both were already merged but got somehow lost with Evan's latest mega commit...
Especially the samba.org fix is important for Gitian to work!

I believe it was merged in master branch only which is not merged in 0.12.0.x branch yet (and few other too).

So should I close this one and wait for the master merge?

Yes, I made new merge PR https://github.com/dashpay/dash/pull/331
Please test it, I'll close this one now.
Thanks!


Support Custom Date Ranges

Currently, the progress bar only tracks the progress of the current year. We should extend the functionality to allow users to input custom date ranges (e.g., fiscal years, project timelines) and see the corresponding progress.

Hi @DhanushNehru,
I would love to contribute. Could you please assign me this issue? I’d be happy to work on it.
Thank you!

I would really love to contribute into this issue. Can you please assign me this!

I would love to contribute to this issue. Can you please assign me this?

Hi @Harsh1737 actually the functionality is been incorporated, can you make it via UI  ?


If one closes the mirrors menu, kill the mirror get process.

Currently if one closes the mirror menu while it is still getting mirror info it will just continue in the background until it is done.

Done in branch develop


Merge back to master

Yep, plus tests run as part of the release task so the release cannot compete without them.


feat(backend-common/FetchUrlReader): support token authentication

Hey, I just made a Pull Request!
Builds on interface enhancements introduced by #22521 to support token-based authentication in FetchUrlReader#readUrl().
:heavy_check_mark: Checklist

[x] A changeset describing the change and affected packages. (more info)
[ ] Added or updated documentation
[x] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)
[x] All your commits have a Signed-off-by line in the message. (more info)

I'm pretty sure the E2E test failures are unrelated to my changes but please let me know if I've missed something 🙏


Problems with iOS 7.1 and Swift

Xcode 6.2
OHHTTPStubs 3.1.11
CocoaPods 0.36.1
Tried to run tests on iOS 7.1 simulator in a Swift project and it doesn't work:
Obs. 1: on iOS 8.1 simulator works fine
Obs. 2: run pod without use_frameworks! config, because I want to support iOS 7
IDEBundleInjection.c: Error 3588 loading bundle '/Users/me/Library/Developer/Xcode/DerivedData/myapp-cypnccujdzumvjcxeuymxljgxetv/Build/Products/Debug-iphonesimulator/UITests.xctest': The bundle “UITests” couldn’t be loaded.
DevToolsBundleInjection environment:
XCInjectDiagnostics: (null)
XCInjectBundleInto: /Users/me/Library/Developer/Xcode/DerivedData/myapp-cypnccujdzumvjcxeuymxljgxetv/Build/Products/Debug-iphonesimulator/myapp.app/myapp
XCInjectBundle: /Users/me/Library/Developer/Xcode/DerivedData/myapp-cypnccujdzumvjcxeuymxljgxetv/Build/Products/Debug-iphonesimulator/UITests.xctest
TestBundleLocation: /Users/me/Library/Developer/Xcode/DerivedData/myapp-cypnccujdzumvjcxeuymxljgxetv/Build/Products/Debug-iphonesimulator/UITests.xctest
TMPDIR: /Users/me/Library/Developer/CoreSimulator/Devices/7B46887A-C6CF-468B-8AD5-C526D8D095D4/data/Applications/799AB217-E68E-44C7-8422-60BEE1F2A0E6/tmp
DYLD_LIBRARY_PATH: /Users/me/Library/Developer/Xcode/DerivedData/myapp-cypnccujdzumvjcxeuymxljgxetv/Build/Products/Debug-iphonesimulator
DYLD_INSERT_LIBRARIES: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection
DYLD_FRAMEWORK_PATH: /Users/me/Library/Developer/Xcode/DerivedData/myapp-cypnccujdzumvjcxeuymxljgxetv/Build/Products/Debug-iphonesimulator
DYLD_FALLBACK_LIBRARY_PATH: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib
DYLD_FALLBACK_FRAMEWORK_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks

Hi @aleufms
I don't think that's an issue related to OHHTTPStubs on itself.
See those related questions on StackOverflow: here and here (and probably others).
Feel free to try those and give me feedback if it works for you or not.

Hi,
I tried the solutions on StackOverflow without success. I think it is a bug on XCode. I have to force use framework on my test target for it works.

Ok. Could you attach a sample test project here to help us reproduce the issue, to ensure it's unrelated to OHHTTPStubs itself? Thx

Closed due to lack of reproducibility and because it is most likely a bug in Xcode itself.


Pages Generate Without Titles

All of the pages generate with an empty title tag <title></title>, which causes display issues especially with the redirection work-around we figured out for the cannonical links to pages.

I think this is fixed in the latest version (for FHIR 3.0).  Have you tried it with the code currently in master?

I thought I did, but I could be wrong on that.
Let me get back to you on that front.

Confirmed to be working on master.


emacs 29 impossible to pass argument to rustfmt

I have tried several things and it seems impossible to pass arguments to rustmt.
especially the edition. Is it possible to specify --edition 2021. But if I set Rust formatter like that:
 ("Rust" (rustfmt "--edition 2021"))

or like that:
 ("Rust" (rustfmt "--edition" "2021"))

Or if I try with cargo:
 ("Rust" (cargo "fmt"))

It's still 2015 edition that is used.
As rust-mode provide its own format command I can workaround this qith a hook:
(add-hook
 'rust-mode-hook
 (lambda ()
   (define-key rust-mode-map (kbd "C-c C-f") 'rust-format-buffer)
 )
)

(add-hook
 'rust-ts-mode-hook
 (lambda ()
   (define-key rust-ts-mode-map (kbd "C-c C-f") 'rust-format-buffer)
 )
)

But format-all definitively doesn't work for Rust.

Does this work:
(setq format-all-formatters
      '(("Rust" (rustfmt "--edition" "2021"))))

We should add Rust to the readme.

Yes it works when I eval the expression in emacs buffer but that's exacttly what I have in my configuration:
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.

That's weird. Can you set format-all-debug to t, then run format-all-buffer in a Rust buffer and look in the *Messages* buffer to find the shell command that format-all tried to run?

Hi,
I retried with this configuration with the rust-mode hook deactivated and it seems to work now with this configuration. Sorry for that, but I must have made mistake when I was trying several things with the .emacs...

Ah no... that's because I was trying on souce with no async construction.
That's the message I got:
You can run the command ‘eval-expression’ with M-:
t
Format-All: Formatting lib.rs as Rust using rustfmt
Format-All: Running: /etc/profiles/per-user/mik/bin/rustfmt
Format-All: Directory: /home/mik/Dev/Rust/osc_dispatcher/src/
Type q in help window to delete it.
Formatting error
Mark set

I think cargo fmt should be removed as it doesn't work, as it doesn't receive input from stdin. rustfmt works just fine.


add controls for navigation and layout

Converted stories under Navigation and Layout.
Testing

Trade-offs

Dependencies

Screenshots

Checklist for PR creator

[ ] If any new components were added, there are exported from packages/index.ts
[ ] If this PR is associated with a JIRA, it is mentioned in commit message footer ("Closes …")
[ ] If this PR contains breaking changes, is stated in commit message body ("BREAKING CHANGE: …")
[x] Info for applicable sections above is provided

Nice work! Any thoughts on removing the knobs panel if we don't use it?

I still have one more PR coming to remove knobs for some of the other components. Then I will remove it from existence 😄


Hook to protect routes

Describe the problem
I would like to propose the addition of a protect function that can be used to redirect unauthenticated or unauthorized access to pages or endpoints.
Current State

The handle is only executed during a fetch or a forced reload
The load function in __layout.svelte is called only once for all routes using it
Adding load function purely for route protection is inefficient and error-prone
There is no load equivalent for endpoints and in some scenarios cannot be protected using the handle function

Describe the proposed solution
Proposal: Add a user-customizable protect function that can be written in hooks, where we can add our custom code for validating and identifying alternate fallback routes when the user is not allowed access.

This function should be called prior to handle on fetch or forced reload of any URL
This function should be called prior to client-side navigation to any endpoint or route
Since shadow endpoints are dependent on the page route, calling this function once prior to routing to the page
This function should receive the session from getSession

// hooks.js
export async function protect({url, session}) {
  // custom logic to identify allowed requests and rerout it
  const {allowed, fallbackUrl} = isUserAllowed(url, session)
  if (allowed) {
     return { status: 200 }
  } else {
     return { status: 302, redirect: fallbackPath}
  }
}

or
export async function protect({url, session}) {
  // custom logic to identify aalternate URL when not authorized
  const falbackUrl = getFallbackUrl(url, session)
  return fallbackUrl || url.pathname
}

Alternatives considered
Writing the protect function in the handle and in multiple load functions.
Importance
it would make my life easier
Additional Information
Svelte-Kit really makes application development a breeze and I would really like to move our application development over to SvelteKit. Almost all our web applications require authentication and some form of route protection. This feature will make it a lot easier to incorporate authentication and role-based route protection.

The load function in __layout.svelte is called only once for all routes using it

You can implement an auth guard with a single load function by making it reactive. Take a look at this paragraph from the docs.

You can implement an auth guard with a single load function by making it reactive. Take a look at this paragraph from the docs.

The load function is reactive, and will re-run when its parameters change, but only if they are used in the function. Specifically, if url, session or stuff are used in the function, they will be re-run whenever their value changes...

Thank you. I thought I had tried it out and it didn't work for me. Will check it out once more. Wouldn't it be required to be repeated in every __layout.reset.svelte if I use it in the __layout.svelte. This does not help with endpoints though.

Exactly that re endpoints.
For people using Kit to build apps, there seems to be a conceptual mismatch between the (very common) guard scenario and  the newer concept of "automatic" endpoints.
In other words, conventional practice is to guard using a load function which seems to, at the same time, work against the newer notion of endpoints.

There should be some semantic way of protecting routes as well as endpoints. @Rich-Harris can better shed light on this. I welcome him to comment here directly and propose a better solution.

I like the idea of a "protect" hook, but I would possibly like to see it a little more generalized. Maybe like a "route" hook that runs the same as the OP described.
One particular area I would utilize this, would be a place to centralize logic based on route changes (client-side or server-side).
For instance, I have 5 different routes in my app, where if a user navigates away from these routes, it clears a "redirect" store. Right now I have to repeat the logic in the onDestroy function of all 5 routes. It would be nice to be able to have that logic centralized to a single place that would have knowledge of where the user is coming from and where they are going. So I could match the "from" path against an array of routes where that store should be cleared.

We currently achieve that in hooks.ts and a load function in the topmost __layout.svelte file.
I would also add that it can depend on the authentication/authorization flow used.
On our side we used the "Authorization Code Flow" (in OAuth sense), because it's the most secure and useable for our context, but it won't be the case of everyone.
Finding a solution that fits all cases and plays well with sveltekit is not an easy problem !

I love this proposal. It would be great to have an official way of deciding server-side if a request for a route should be served or not no matter how the request was sent.
After investigating what my options are there seems to be quite a lot of options to consider with little recommendations of how to properly implement this.
hooks, load functions, handling per page / in layout component, sveltekit:reload anchor on <a> elements; all seem like they have their uses, nuances and edge cases.
Personally I have solved protected routes using a hook and adding the reload anchor to <a> tags to force the hook to run for every route change.

A quick note: As sketched, this is impossible. protect cannot run prior to handle and also receive session, as getSession runs after handle. Other than that, I like the idea of having authorization built in.

I was looking into a systematic way to protect my routes and I was hoping to find that I would be able to put further hooks files inside my routes, and have the handle function be called inside the any handle function further up the chain:

/src/routes/beverages/pepsi.svelte is resolved by resolve(event) inside of
/src/routes/beverages/__hooks.js:handle if it exists, is called by resolve(event) inside of
/src/routes/__hooks.js:handle if it exists, is called by resolve(event) inside of
/src/hooks.js:handle if it exists

A outer handle (usually the first on in src/hooks.js can do the authentication and set event.locals. An inner handle can then be used to protect part of the site based on the authentication data in event.locals.
This would allow protecting pages and endpoints to be protected, be very flexible (not limited to redirecting), and be less prone to error than the current available approaches described by others above.
However this does not address issues with protecting routes when a new request is not made, that's something I'm not qualified to talk about.

Whatever method is arrived at, it would be very nice if types could be propagated, so that I might set-up a guard that checks that I have an authenticated user and sets request.locals.user and then in routes that are protected by that guard request.locals.user is known not-null, and so on. I don't have the first clue whether or how this would be possible.

Once the changes discussed in https://github.com/sveltejs/kit/discussions/5748 go into Kit, it may be possible to implement this. #5748 mentions that there will be "layout endpoints" available in +layout.server.js. It's not yet clear whether +layout.server.js would run before +server.js or not, but it would certainly run before +layout.js. Furthermore, the handler functions in +server.js  will have the same ability to throw errors as the load() functions in +layout.server.js.
Which means you'll be able to write a protect() handler more-or-less along the following lines:
/// authTools.js
export async function protect(authPredicate) {
  const okay = await authPredicate();
  if (!okay) throw error(403, 'Unauthorized');
}

export async function adminRequied(session) {
  // In real code, this might look something up in a database
  await protect(async () => session.username === 'admin');
}

export async function isLoggedIn(session) {
  // In real code, this might look something up in a database
  await protect(async () => session.username != null);
}

/// /src/routes/admin/+layout.server.js
import { adminRequired } from '$lib/authTools';
export async function load({ session }) {
  await adminRequired(session);
  // If we get to this point, user is allowed to be here
  return { message: 'Hello, admin' };
}

Server-only endpoints in +server.js could work very similarly. You'd simply need to write a helper function similar to protect but looking at the request object rather than the session, since session isn't available on server endpoints:
/// serverAuthTools.js
import { JWT_SECRET } from '$env/dynamic/private';
import { validateToken } from 'some_npm_library';
export function requireValidToken(request, authPredicate) {
  const authHeader = request.headers.get('authorization');
  if (!authHeader) throw error(401, 'Auth token required');
  if (!authHeader.startsWith('Basic ') throw error(401, 'Auth token required');
  const token = authHeader.substring(6);
  // Assume validateToken returns null on invalid tokens
  const tokenDetails = await validateToken(token, JWT_SECRET);
  if (!tokenDetails) throw error(403, 'Invalid token');
  const isAllowed = await authPredicate(token);
  if (!isAllowed) throw error (403, 'Unauthorized user');
  // Fall through to return Promise<void> in success case
}

export function requireLoggedIn(request) {
  return requireValidToken(request, () => true);
}

export function adminRequired(request) {
  return requireValidToken(request, token => token.username === 'admin');
}

/// /src/routes/api/privileged/+server.js
import { adminRequired } from '$lib/serverAuthTools';
export async function GET({ request }) {
  await adminRequired(request);
  // If we reach this point, the JWT token had username 'admin', so proceed
  return new Response('Privileged admin data here');
}

Will this also support redirection also? So that we can redirect unauthorized access to a login page or an alternative fallback page with error messages?

For clarity, I wasn't saying that the protect() function I outlined above would go into SvelteKit, I was showing a way to implement it yourself once the changes from #5748 are released in an upcoming Kit version. Which means that you'll need to implement the redirects you want yourself, but it will be just as easy. In both load and server handlers, you would do something like throw redirect(307, '/login') to redirect. From the #5748 explanation:

This next one might feel weird but bear with me — redirects are also thrown. That's partly because a redirect result is semantically closer to an error result than to success, but partly because it's useful if await parent() throws in the redirect case as well as the error case

So in the example above, you could replace a throw error(403, 'Unauthorized') with a throw redirect(307, '/login') in the case where there are no user credentials present. (In which case my example really should have been returning a 401 anyway, not a 403). And throwing a redirect(code, message) will work in both load() functions and server-side handlers.

If all of your server-only endpoints live under a specific route, you could just protect it the handle function as this runs on every server request.
export const handle = async ({ event, resolve }) => {
  const user = await getUserByCookie(event.request);

  if (!user && event.url.pathname.startsWith("/api")) {
    return new Response("Redirect", {
      status: 303,
      headers: { Location: "/auth/login" },
    });
  }
  if (!user) return await resolve(event);
  if (user) event.locals.user = user;

  return await resolve(event);
};

AFAIK the handle hook does not run for routes navigated to using client side navigation i.e. clicking an  tag.

I used a /routes/+layout.server.ts and a protected as the first hook in a sequence of hooks. Inside the protect I implemented the logic of logged user (or not)  and redirect to the appropriate path or page to login.
Inside load funcrion inside the +layout.ts of protected routes I propagate the user variable for authenticated user, and I set  a user store writable to be used inside the pages where is necessary. .

To give some use-case info for the topic, and eventually to help others, here how we're currently doing it.
note: we just had migrated to svelteKit >v406 (v429 right now).

the app is an SPA, most of its pages are under authentication
auth is done server side with auth0, using OAuth2.0 authorization code flow
we have also have admin pages, whose access is controlled by a claim in the auth0 payload
src/hooks.ts is handling the main authentication work and the guarding of our data endpoints (who are in /api/... routes)
src/routes/+layout.server.ts is handling the auth guard for pages

src/hooks.ts:
import cookie from 'cookie';
import { isPublicPage, verifyToken, FULL_LOGOUT_URL } from '$lib/auth/auth0';
import { getBooleanEnv, getStringEnv } from '$lib/mab_environment'; //TODO: refactor env var handling
import { json } from '@sveltejs/kit';
import type { Handle, RequestEvent } from '@sveltejs/kit';

function setOrUnsetAuthCookies(locals: App.Locals) {
  if (locals.user && locals.refreshToken && locals.idToken) {
    return [
      `user=${locals.user}; Path=/; HttpOnly; SameSite=Lax`,
      `refreshToken=${locals.refreshToken}; Path=/; HttpOnly; SameSite=Lax`,
      `idToken=${locals.idToken}; Path=/; HttpOnly; SameSite=Lax`
    ];
  } else {
    return [
      `user=; Path=/; HttpOnly; SameSite=Lax; expires=Thu, 01 Jan 1970 00:00:00 GMT`,
      `refreshToken=; Path=/; HttpOnly; SameSite=Lax; expires=Thu, 01 Jan 1970 00:00:00 GMT`,
      `idToken=; Path=/; HttpOnly; SameSite=Lax; expires=Thu, 01 Jan 1970 00:00:00 GMT`
    ];
  }
}

export const handle: Handle = async ({ event, resolve }) => {

  // --------------------------
  // code below happens before the endpoint or page is called

  const request = event.request;
  const cookies = cookie.parse(request.headers.get('cookie') || '');

  event.locals.user = cookies.user;
  event.locals.refreshToken = cookies.refreshToken;
  event.locals.idToken = cookies.idToken;
  event.locals.isLoggedIn = !!cookies.user;

  const { isOK, newIdToken, isAdmin } = await verifyToken(cookies.idToken, cookies.refreshToken);

  if (!isPublicPage(request.url)) {
    //console.log('Private url / page');
    if (!isOK) {
      event.locals.user = null;
      event.locals.refreshToken = null;
      event.locals.idToken = null;

      // protect data endpoints
      if (request.url.includes('/api')) {
        return json('unauthorized', {
          status: 401,
          headers: {
            'WWW-Authenticate': 'Bearer'
          }
        });
      }
    }

    if (newIdToken) event.locals.idToken = newIdToken;
  }
  event.locals.isAdmin = isAdmin;
  event = setEnvVarsOnLocals(event);

  // now, let sveltekit resolve the call
  // note:  we disable server-side page rendering (our app is mostly a SPA)
  // ref: https://kit.svelte.dev/docs#hooks-handle
  const response = await resolve(event, { ssr: false });

  // --------------------------
  // code below happens after the endpoint or page is called

  // if cookies are set on the called endpoint, merge them with auth cookies
  setOrUnsetAuthCookies(event.locals).forEach((setCookieDir) => {
    response.headers.append('set-cookie', setCookieDir);
  });
  return response;
};

// TODO: consider using the new way to get env vars instead of stuffing everything in locals
const setEnvVarsOnLocals = (event:RequestEvent) => {
  event.locals.ENV_NAME = getStringEnv('ENV_NAME');
  event.locals.CLIENT_ID = getStringEnv('CLIENT_ID');
  event.locals.FULL_LOGOUT_URL = FULL_LOGOUT_URL;
  event.locals.ENABLE_FEATURE1 = getBooleanEnv('ENABLE_FEATURE1');
  event.locals.ENABLE_FEATURE2 = getBooleanEnv('ENABLE_FEATURE2');
  event.locals.IS_ENV_READ_ONLY = getBooleanEnv('IS_ENV_READ_ONLY');
  return event;
};

src/routes/+layout.server.ts
import type { LayoutServerLoad } from './$types';
import { redirect, error } from '@sveltejs/kit';
import { isPublicPage, isAdminPage, isAuthenticated } from '$lib/auth/auth0_front';

// This server-side load function is the auth guard for pages
export const load: LayoutServerLoad = async ({ locals, url }) => {
  if (!isPublicPage(url.pathname) && !isAuthenticated(locals)) {
    throw redirect(302, `/login?redirect=${url.pathname}`);
  }

  if (isAdminPage(url.pathname) && !locals.isAdmin) {
    throw error(403, 'you need admin rights');
  }

  return {
    ...locals
  };
};

session was removed, so that's out of date in the OP. This in itself should make some code flows clearer and less error prone
+layout.server.js is a thing now, you can put server-side guard logic there
if you need that logic in the client as well (since you're building an SPA), you can put that in +layout.js
your app-wide guards can go into the root layout, since that's now always guaranteed to exist and be loaded

To summarize, what the OP wanted is now possible with new routing API. Others have expressed related feature requests, but since it's all a little out of date and confusing, I'll close this issue. Feel free to open a new issue with updated requirements, if you feel the new API doesn't fit your needs.
Also thanks to everyone who provided code snippets on how to achieve this with the new API.

Hi,
This workflow is a bit complex to me.
May I ask for a tiny example of the logic in the documentation?

Here is a simple example:
import { browser } from '$app/environment';
import { auth } from '$lib/database';
import { get } from 'svelte/store';
import type { PageLoad } from './$types';

const { user } = auth;

export const load: PageLoad = () => {

    if (browser) {
        if (get(user)) {
            console.log('logged in');
            // redirect somewhere ?
        }
    }
    return;
}

However, since something like a login on a page can change dynamically, and the load function is meant to run before page render, it will not automatically update.  This is why observables or readables are better suited for an auth guard in my opinion. They dynamically change.
J

To summarize, what the OP wanted is now possible with new routing API.

Just did some experiments and the behaviour is confusing, I have a public route and a protected route, and I'm trying to load the public route first then click the link to navigate to protected route, implemented some basic logging in +layout.ts and watch the behaviour:

when ssr=true and csr=false the load function of protected and un-protected both run every time when switch route, which is expected;
when ssr=true and csr=true which I assume we're using client side hydration and routing after the initial page load, then only the public route load function will run once (at the initial page load), following client navigation won't trigger both load functions. Is this expected or not?

And what about the API endpoints in protected route, is there any way to protect them with a unified way together with the layout/page routes?
Would your mind clarify a bit, that would be awesome.

@dummdidumm Sorry my bad, further test show that client side navigation called both load function correctly, it's just my browser dev-tools ill behaved.
So indeed we can protect route with +layout.js load functions.
And I'll try @0gust1 's comment about using hooks to protect API endpoints.

Is it possible to have an extra file for every route, let's name it +authorization.svelte that will include annotations like
@Unprotected()
@Roles('admin','powerusers')
@AllowAnyRole()
and if the loggin user has the appropriate role, will have access to the route.
Also, there must be some method to set the users roles, after the users logs in


Update Rocketchat to 0.74.2

What this PR does / why we need it:
Update Rocketchat to 0.74.2.
Checklist

[x] DCO signed
[x] Chart Version bumped

/assign @verwilst

/lgtm
/approve


Numpy 2.0 allowed in pyproject.toml

Related

Part of #6762

What
A very small commit to see if CI still pass with Numpy 2.0 and over allowed, as python projects are moving quickly to it.

@rerun-bot approve

It looks like you are using a pixi version that is newer than the one we currently have in CI. I'll check if we can migrate to the new version to make this PR mergeable.

https://github.com/rerun-io/rerun/pull/8320

Can I update my branch?

Can I update my branch?

Yes, should be good now.

C++ CI failed


Search: no longer possible to open an editor to the side using keyboard

When pressing Ctrl+Enter on a search result I would like to open it to the side. Ever since we use revealIfVisible option, this does not work anymore.
fyi @roblourens @sandy081

Doesn't do anything when the third editor group has focus. I assume that is expected.

Yes 👍


Amount of items in collection

I have a modular collection of elements which has rule "limit: 3"
In twig, the collection page.collection comes already cutted. But I need to know if there are some other pages behind the limit to render "show more" button. How can I do that?

I think what you are looking for is pagination: true
If you install the pagination plugin and you have this option enabled for your collection it will provide buttons to show prev/next pages.

Not exactly.
I already tried the pagination plugin.
I did how readme says https://github.com/getgrav/grav-plugin-pagination
The problem was in pagination.html.twig.
Here we have {% set pagination = pagination|default(page.collection.params.pagination) %}
It returns true value from the md file where pagination: true has been set.
Which means that {% if pagination|length > 1 %} is always false because the length of the boolean value is not correct.
There are screenshots:
https://monosnap.com/file/MQ2wLPOd4qNIIUTizibh3RMo84Iq0J
https://monosnap.com/file/EbfIrD7rBRTHGPFKPXqZP3zQxIpWa2
Am I miss something?
Also, I would like not to use reload of the page. I would like to upload more articles right here right now on the fly. So it should be done by ajax and I wrote my own plugin already and it works fine. The only thing is left is to get the whole amount of articles event if they were limited.
Thank you for your response and help. I appreciate that. The grav discord chat does not help at all and the community is too small to find the answers and I am not that good in PHP to understand the documentation of API well


Add character: <2> to font:

Character : drpepper
Font : 2

hye @AnshumanMahato , please assign me this issue

@IshitaPathak you can look into issues with the up-for-grab tag. Those are open for all. Just request on which one you want. I'll assign that to you a bit later.


Task - Edit Source - Clone button - unpredicted behaviour

When I create a new source with authors and editors (as roles), save the record, if I clone the record, the entire record became clone, including the roles, but when I use the fileter to find an existing source and clone it, the source is cloned without roles. I would be useful to clone roles in both cases (if changes are needed, the roles are easy to delete).

It seems that the backend is returning an unsaved clone object.
Example of source where it doesn't work:
https://sfg.taxonworks.org/tasks/sources/new_source?source_id=19115


Use multiple backup timeservers for Windows signing

This does the following:

Implements timestamp server fallback as originally attempted in https://github.com/AdoptOpenJDK/openjdk-build/pull/2405 and https://github.com/AdoptOpenJDK/openjdk-build/pull/2374 - this supercedes both
Adjusts the ordering so that the "known good" server is first in the list, reducing the likelihood of failure (globalsign is no longer working today)
Unifies the exe and dll parts in a single find
Adjusts the way the JDK directory is detected, thus removing the find: 'basename' terminated by signal 13 that have been polluting the logs
Uses -q on the unzip command in order to avoid filling the log with a list of all files in the JDK

The latest runs of sign_build have been from this branch
I am somewhat worried that none of the timestamp servers we have are reliable though...

Based on https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/sign_build/14493/console the comodoca servers seems really slow but hopefully it'll get there so we can merge this. Need to verify whether any occurrences of Failed to sign ${f} using any time server - aborting show up as I've had to make some adjustments to stop the exit for not aborting completely.

Based on https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/sign_build/14493/console the comodoca servers seems really slow but hopefully it'll get there so we can merge this. Need to verify whether any occurrences of Failed to sign ${f} using any time server - aborting show up as I've had to make some adjustments to stop the exit for not aborting completely.

Hmmm I'm not convinced about the 5 second pause either as it could mean we wait for up to about 30 seconds if only the final one in the list is working

Hmmm I'm not convinced about the 5 second pause either as it could mean we wait for up to about 30 seconds if only the final one in the list is working

Hmmm I'm not convinced about the 5-second pause either as it could mean we wait for up to about 30 seconds if only the final one in the list is working

That may well trigger pipeline timeouts so perhaps 2s?

Hmmm I'm not convinced about the 5-second pause either as it could mean we wait for up to about 30 seconds if only the final one in the list is working

That may well trigger pipeline timeouts so perhaps 2s?

Switched to 2s - will merge once the checks complete again - hopefully before the JDK15 pipeline starts

Switched to 2s - will merge once the checks complete again - hopefully before the JDK15 pipeline starts


The [0,INT_MAX) time check allows NaN through

$ ./snore<PHONE_NUMBER>0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d
00d 00h 00m 00.000s

If you add printf("%f\n",tm); after https://github.com/clamiax/snore/blob/caad43cde564123b541df3cb2652df55937ac45f/snore.c#L118 you can observe that the number is NaN:
$ ./snore<PHONE_NUMBER>0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d
-nan
00d 00h 00m 00.000s

This ends up being accidentally safe because all comparisons involving NaN are false, so tm < endtm is false and the loop is never entered. However, if the loop is ever executed, this would invoke undefined behavior, as demonstrated if you run with ubsan on the branch https://github.com/jpdoyle/snore/tree/nan-unsafety:
$ ./snore<PHONE_NUMBER>0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d
-nan
snore.c:98:6: runtime error: store to null pointer of type 'char'

Feel free to send a PR to fix the issue otherwise I will give a look later today.

Fixed in ad68ede


feat: support promises namespace

I've tested this against my own project, and it works great :)

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


generateThumbnail produces toxic image

How to reproduce these conditions
I'm using the sample code as is: It builds and uploads and runs.
The thumb_ image can't be downloaded and just 'hangs' in the control panel.
I've tried .jpg and .png, small and large. All produce the same failure.
Logs say it ran 'ok'.  About 6 seconds for a 1 meg image.
Running latest software:
"engines": {
    "node": "10"
  },
  "dependencies": {
    "child-process-promise": "^2.2.1",
    "firebase-admin": "^8.6.0",
    "firebase-functions": "^3.3.0"
  }

firebase-tools are current.
Here is what the console looks like after an upload.  The original image uploads fine.
The generated thumb never presents an image or a link (though its name and size are correct)

@stocksp thanks for filing! I believe this is actually an issue in the Firebase console, not in the function sample. To check if it is a console bug, can you please try downloading the thumbnail with one of the client SDKs and see if that works?
(for Googlers looking at this, a similar internal bug is 145671394)

@jhuleatt thanks for getting back to me ... I've moved on and just did the conversion on the client (Flutter) (much faster of course) and they appear in the storage console when I send them there!!

I tried this one and had same issue. Any solution?

@stocksp thanks for filing! I believe this is actually an issue in the Firebase console, not in the function sample. To check if it is a console bug, can you please try downloading the thumbnail with one of the client SDKs and see if that works?
(for Googlers looking at this, a similar internal bug is 145671394)

@stocksp I was able to download the new thumb generated via the client SDK. It appears you may be right in thinking it is a console bug.

thanks for confirming @tbone849. I have an idea for a hack in the sample that may let us get around the console bug

thanks for confirming @tbone849. I have an idea for a hack in the sample that may let us get around the console bug

hey. any news regarding that issue? i have the same problem.

Hello. Will this problem ever be solved? Not only the preview is not displayed, but also the image metadata. (

Hello. Will this problem ever be solved? Not only the preview is not displayed, but also the image metadata. (


i18n(zh-cn): Translate core-concepts/astro-syntax.mdx

What kind of changes does this PR include?

New or updated content
Translated content

Description
Translate core-concepts/astro-syntax.mdx content to Chinese.

有一个 PR 了：https://github.com/withastro/docs/pull/2982


Overhaul UI dependencies' licenses

A reminder, we should overhaul https://github.com/apache/skywalking/tree/master/dist-material/release-docs/licenses/ui-licenses accordingly as the UI project is completely replaced and must have some dependencies' changes
Originally posted by @kezhenxu94 in https://github.com/apache/skywalking/pull/8637#discussion_r821646311

This needs to be done before 9.0.0 so I create this issue to track.

Fixed by https://github.com/apache/skywalking/pull/8783


(IGNORE) Replace clippy-check action with manual Clippy integration

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 41.28%. Comparing base (17863bd) to head (dfa37e5).
Report is 10 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #238      +/-   ##
==========================================
- Coverage   48.68%   41.28%   -7.40%
==========================================
  Files           4        4
  Lines         684      763      +79
==========================================
- Hits          333      315      -18
- Misses        351      448      +97

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


feat: It is meaningless to use different values for the same key name

OK?
What might be the impact?

color: blue;
color: red;
color: yellow;

This example may look meaningless, but the feature actually is not. There are cases where you want to provide fallback values for different browsers, for example
const layoutStyles = defineProperties({
  properties: {
    overflow: {
      hidden: 'hidden',
      auto: {
        overflow: 'auto',
      },
      overlay: {
        overflow: ['auto', 'overlay'], // in Firefox and IE `overlay` will be ignored and `auto` will be applied
      },
  },

Now atoms({ overflow: 'overlay' }) creates the CSS { overflow: auto; overflow: overlay }, which uses overlay in supported browsers and auto otherwise.

👌


Use safe shutdown hook

Description
Switch to CoreUtils.addShutdownHookSafely which can be configured with required permissions when the environment is using a SecurityManager.
All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API change check
API changes are not detected in this pull request.


Notification is not working for yang module.

Hi everyone
I am getting issue for not getting notification from server to client while I am sending RPC to the server for yang module i.e; o-ran-laa-operations.yang this yang module is containing notification node(measurement-result) but every time it is throwing error like this ([ERR]: Not found node "measurement-result" in path.).Please help me with this problem I am facing.
The notification sending function i am using in code : sr_event_notif_send()
The code snippet to get notification with particular path is :
     #define laa_notif "/o-ran-laa-operations:measurement-result"
     #define laa_notif_node1  laa_notif"/band-number"
     #define laa_notif_node2    laa_notif"/measurement-success"

     values[0].xpath = strdup(laa_notif_node1);
     values[0].type = SR_ENUM_T;
     values[0].dflt = 0;
     values[0].data.enum_val = band_num;

     values[1].xpath = strdup(laa_notif_node2);
     values[1].type = SR_BOOL_T;
     values[1].dflt = 0;
     values[1].data.bool_val = ret;
     sr_event_notif_send(session,laa_notif,values,values_cnt,0,0);

I would have to see the YANG module, it seems the notification is not found for some reason. There may be false if-feature statement on it, for example.

Ya in my yang module RPC statements was containing if-feature statement I have edited if-feature statement I was not using that but I forgot to edit that feature also present inside the notification node now done that thing but again getting error like this below :
[ERR]: Predicate missing for list "band-result" in path "/o-ran-laa-operations:measurement-result/band-result/band-number".

It seems band-number is a list and it needs a predicate with value for its key. I would suggest using sr_event_notif_send_tree() where you create the notification with lyd_new_path(), I believe it would be much shorter and simpler.

band-result is a list inside notification node and then this node is uses grouping band-result-element
Below is my yang module
module o-ran-laa-operations {
yang-version 1.1;
namespace "urn:o-ran:laa-operations:1.0";
prefix "o-ran-laa-operations";
import o-ran-module-cap {
prefix "mcap";
}
organization "O-RAN Alliance";
contact
"www.o-ran.org";
description
"This module defines the operations for DFS measurement.
Copyright 2019 the O-RAN Alliance.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the above disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the above disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the Members of the O-RAN Alliance nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.";

revision "2019-07-03" {
description
"version 1.1.0
  1) corrected error in module reference for LAA feature";

reference "ORAN-WG4.M.0-v01.00";

}
revision "2019-02-04" {
description
"version 1.0.0
  1) imported model from xRAN
  2) changed namespace and reference from xran to o-ran";

reference "ORAN-WG4.M.0-v01.00";

}
typedef band-num {
type enumeration {
enum BAND_46_SUBBAND_A {
description
"46a: 5150 MHz 	-	5250 MHz";
}
enum BAND_46_SUBBAND_B {
description
"46b: 5250 MHz 	-	5350 MHz";
}
enum BAND_46_SUBBAND_C {
description
"46c: 5470 MHz 	-	5725 MHz";
}
enum BAND_46_SUBBAND_D1 {
description
"46d1: 5725 MHz 	-	5850 MHz";
}
enum BAND_46_SUBBAND_D2 {
description
"46d2: 5850 MHz 	-	5925 MHz";
}
}
description
"This value indicates the list of bands supported as per the document,
3GPP TS 36.104 V14.2.0 (2016-12), 'Section 5.5 Operation bands'.";
}
grouping band-configuration {
description
"Grouping for band configuration";
leaf band-number {
  type band-num;
  description
    "This value indicates the list of bands supported as per the document,
    3GPP TS 36.104 V14.2.0 (2016-12), 'Section 5.5 Operation bands'.";
}
leaf-list channel-center-frequency {
  type uint16;
  units kilohertz;
  description
    "This value indicates carrier center frequency in KHz";
}

}
grouping measurement-parameters {
description
"Grouping for measurement parameters";
leaf duration-per-channel {
  type uint16;
  units milliseconds;
  description
    "This value indicates measurement duration per channel in milliseconds.";
}

leaf maximum-response-time {
  type uint16;
  units seconds;
  description
    "This value indicates maximum response time (i.e., timer) in seconds.";
}

}
grouping channel-result-element {
description
"Grouping for channel result element";
leaf measured-channel {
  type uint16;
  units kilohertz;
  description
    "This value indicates carrier center frequency for which the result is computed in KHz.";
}

leaf occupancy-ratio {
  type uint8;
  units percent;
  description
    "This value indicates occupancy ratio in percentage.";
}

leaf average-rssi {
  type int8;
  units dBm;
  description
    "This value indicates average RSSI in dBm";
}

}
grouping band-result-element {
description
"Grouping for band result element";
leaf band-number {
  type band-num;
  description
    "This value indicates the band for which the result is computed.";
}

leaf measurement-success {
  type boolean;
  description
    "This value indicates whether the measurement is successful for the given band.";
}
leaf failure-message {
  when "../measurement-success='false'";
  type enumeration {
    enum TIMEOUT {
      description "Timed out waiting for measurement completion.";
    }
  }
  description "This value indicates the detailed error message for failure of the measurement at O-RU.";
}

list channel-result {
  when "../measurement-success='true'";
  key "measured-channel";
  description "Results for a particular channel";

  uses channel-result-element;
}

}
//rpc definitions
rpc start-measurements {
if-feature mcap:LAA;
description "Measurements for Carrier-Selection and Dynamic Frequency Selection (DFS)";
input {
list band-config {
key "band-number";
description "Per band configuration for measurements.";
    uses band-configuration;
  }

  uses measurement-parameters;
}

output {
  list band-config {
    key "band-number";
    description "Output list for all the bands requested for measurements.";

    leaf band-number {
      type band-num;
      description
        "This value indicates the list of bands supported as per the document,
        3GPP TS 36.104 V14.2.0 (2016-12), 'Section 5.5 Operation bands'.";
    }
    leaf-list carrier-center-frequency {
      type uint16;
      units kilohertz;
      description
        "This value indicates carrier center frequency in KHz";
    }
    leaf status {
      type enumeration {
        enum ACCEPTED {
          description "This indicates the measurements for particular sub band is accepted at O-RU.";
        }
        enum REJECTED {
          description "This indicates the measurements for particular sub band is rejected at O-RU.";
        }
      }
      description "This value indicates the status of the measurement acceptance at O-RU.";
    }

leaf error-message {
      when "../status='REJECTED'";
      type string;
      description
        "This value indicates the detailed error message for the measurement being rejected at O-RU.";
    }
  }
}

}
// notifications
notification measurement-result {
if-feature mcap:LAA;
description "Notification to provide the results of carrier selection and DFS.";
list band-result {
key "band-number";
description "Results for a particular sub band under band 46.";
  uses band-result-element;
}

}
}

In that case your node paths seem wrong because you are skipping the list band-result completely. You must include it and set its key value directly in the path such as:
.../band-list[band-number='BAND_46_SUBBAND_A']...

@michalvasko
i have updated my Macro
 #define laa_notif_node1  laa_notif"/band-result[band-number='BAND_46_SUBBAND_A']"
After updating below error is coming at server side
[ERR]: Invalid argument path (lyd_new_path2()).

I really do not know what you are doing there to get invalid argument error. T have tried this example application and it worked just fine.

I am not getting the actual issue getting same issue of invalid path again here is my application below :
#define _GNU_SOURCE
#define _XOPEN_SOURCE 500
#include <inttypes.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include<stdbool.h>
#include <errno.h>
#include <sysrepo/values.h>
#include <libyang/libyang.h>
#include "sysrepo.h"
#define RPC "/o-ran-laa-operations:start-measurements"
#define RPC1 RPC "/band-number"
#define RPC_freq RPC "/channel-center-frequency"
#define laa_notif       "/o-ran-laa-operations:measurement-result"
#define laa_notif_node1 laa_notif "/band-result[band-number='BAND_46_SUBBAND_A']"
#define laa_notif_node2 laa_notif_node1 "/measurement-success"
volatile int exit_application = 0;
static int
rpc_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *path, const sr_val_t *input, const size_t input_cnt,
sr_event_t event, uint32_t request_id, sr_val_t **output, size_t *output_cnt, void *private_data)
{
size_t i=2;
(void)session;
(void)sub_id;
(void)event;
(void)request_id;
(void)private_data;
sr_val_t *values = NULL;
uint32_t values_cnt = 0;

// size_t values_cnt = 0;
char *band_num = NULL,*freq = NULL;   //*custom_par = NULL;
int ret = 0;
printf("\n\n ========== RPC "%s" RECEIVED: =======================\n\n", path);
if(!strcmp(path,RPC)) {
if(strcmp(path,RPC1) || strcmp(path,RPC_freq)) {
band_num = input[i - 1].data.string_val;
printf("Band number is :%s\n",band_num);
printf("Carrier freq. is :%d\n",input[i].data.uint16_val);
ret = 1;
}
else {
printf("Inside Else.\n");
}
}
sr_new_values(2, &values);
values_cnt = 3;
values = calloc(values_cnt,sizeof *values);
if(values == NULL) {
printf("Calloc failed\n");
}
bool status;
if(ret == 1) {
status = 1;
} else status = 0;
    values[0].xpath = strdup(laa_notif_node1);
    values[0].type = SR_LIST_T;
    values[0].dflt = 0;
    values[0].data.enum_val = band_num;

    values[1].xpath = strdup(laa_notif_node2);
    values[1].type = SR_BOOL_T;
    values[1].dflt = 0;
    values[1].data.bool_val = 1;

    sr_event_notif_send(session,laa_notif,values,values_cnt,0,0);
    sr_free_values(values, values_cnt);

return SR_ERR_OK;
}
static void
sigint_handler(int signum)
{
(void)signum;
exit_application = 1;

}
int
main(void)
{
sr_conn_ctx_t *connection = NULL;
sr_session_ctx_t *session = NULL;
sr_subscription_ctx_t *subscription = NULL;
int rc = SR_ERR_OK;
const char *path;
path = "/o-ran-laa-operations:start-measurements";
printf("Application will subscribe to \"%s\" RPC.\n\n", path);

/* turn logging on */
sr_log_stderr(SR_LL_WRN);

/* connect to sysrepo */
rc = sr_connect(0, &connection);
if (rc != SR_ERR_OK) {
    goto cleanup;
}

/* start session */
rc = sr_session_start(connection, SR_DS_RUNNING, &session);
if (rc != SR_ERR_OK) {
    goto cleanup;
}

/* subscribe for the RPC */
rc = sr_rpc_subscribe(session, path, rpc_cb, NULL, 0, 0, &subscription);
if (rc != SR_ERR_OK) {
    goto cleanup;
}

printf("\n\n ========== LISTENING FOR RPC ==========\n\n");

/* loop until ctrl-c is pressed / SIGINT is received */
signal(SIGINT, sigint_handler);
signal(SIGPIPE, SIG_IGN);
while (!exit_application) {
    sleep(1000);
}

printf("Application exit requested, exiting.\n");

cleanup:
sr_disconnect(connection);
return rc ? EXIT_FAILURE : EXIT_SUCCESS;
}

Well, you are allocating 3 values but filling only 2 so the last item is empty, which generates the error. Please try to debug your programs yourself before asking for help, this is a really basic problem.

Hi @michalvasko
I have tried by allocating 2 values  in above code.still getting same error
please help !!!
Regards
Shubham

How exactly does your allocation look like? values_cnt must also be 2.

@michalvasko
I have tried with values_cnt 2 also .but still same error i am getting

I have tested this example with the notification being subscribed by sysrepo example, this is the output:
sysrepo/examples/notif_subscribe_example o-ran-laa-operations
Application will subscribe to "o-ran-laa-operations" notifications.

 ========== LISTENING FOR NOTIFICATIONS ==========

 ========== NOTIFICATION "/o-ran-laa-operations:measurement-result" RECEIVED =======================

/o-ran-laa-operations:measurement-result/band-result[band-number='BAND_46_SUBBAND_A'] (list instance)
/o-ran-laa-operations:measurement-result/band-result[band-number='BAND_46_SUBBAND_A']/band-number = BAND_46_SUBBAND_A
/o-ran-laa-operations:measurement-result/band-result[band-number='BAND_46_SUBBAND_A']/measurement-success = true

thanks, @michalvasko for your valuable time now notification is working fine in my code.
Regards,
Shubham


Warning when bundling with Vite

When bundling with Vite in a SvelteKit application, I get the following warning:
leaflet-rotatedmarker doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
If possible I would like to see this fixed, as it is kinda annoying to see pop up in my terminal.

This may be fixed in bbecquet/Leaflet.RotatedMarker#27
I tried it and I did not see that message


why bruteforce in reinstall_original_pw ?

Why does reintsall_original_pw use the same attack to logon? At this point the target's account password should be empty, can't we use the hash of an empty password to authenticate?

It’s actually done here: https://github.com/dirkjanm/CVE-2020-1472


Find an Exception cause that we can handle.

In some Spring configuration (ex: Spring Data Rest (https://github.com/jirutka/spring-rest-exception-handler/issues/5)), Exceptions are wrapped.

Hi @jirutka, what about integrating that feature?
Thanks,
Jens


Add the ability to detect when lambda architecture has finished loading its batch portion

As a user of Druid, I would like have a way to know when the data present is as accurate and reliable as possible. In general this means having a way to determine what interval for a data series has had the batch portion of the lambda architecture complete, and any real time segments have been evicted.

The suggested solution for this is to add an endpoint to io.druid.server.http.DatasourcesResource which can return the minimum timestamp for an interval where the segment metadata matches some filter.
In many use cases the realtime segments are generated with a Linear shard spec, and the batch jobs are created with a hash or unsegmented shard spec. It could be possible to setup a filter to look for the minimum timestamp for any matching segment (example: linear) and thereby determine what the earliest "realtime" data is still present in the system.

After #1745, we will likely start creating realtime segments as Numbered, although you can still tell they're from realtime because the partition number will be outside the core partition set.


upload hypercloud v1.22

need to update README storage part

need to update storage version in README.md

update README, PRODUCT.yaml, e2e.log, junit_01.xml


feat: Remove deprecated Mongo code.

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

[X] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/master/.github/Contributing.md.
What is the current behavior?
Deprecated Mongo code exists, so Mongo is still a feature
Issue Number: #2598
What is the new behavior?
Mongo code has been remove. Mongo DB is no longer a  feature.
Does this PR introduce a breaking change?

[X] Yes
[ ] No

New Imports

[ ] Yes
[X] No

Specific Instructions
Are there any specific instructions or things that should be known prior to reviewing?
Other information

Codecov Report

Merging #2956 (eb06a9b) into master (1cb9438) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2956      +/-   ##
==========================================
- Coverage   40.70%   40.69%   -0.01%
==========================================
  Files         170      169       -1
  Lines       14113    14104       -9
==========================================
- Hits         5745     5740       -5
+ Misses       7991     7988       -3
+ Partials      377      376       -1

Impacted Files
Coverage Δ

internal/security/secretstore/init.go
3.84% <ø> (ø)

internal/core/data/v2/application/event.go
67.59% <0.00%> (+3.70%)
:arrow_up:

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 1cb9438...eb06a9b. Read the comment docs.


Fully qualify scala.Symbol in quasiquote

This looked like a hygiene issue to me, but apparently it is not. I don't know why scala.Symbol cannot fully qualified in this extractor quasiquote.

I agree it looks suspicious. I can't remember now if it was deliberate. Were you able to come up with a use site example of unhygiene?

No, I haven't observed any problems at the use site yet. I'll further investigate and report my findings here. In the meantime, feel free to close this PR.

OK, thanks for investigating :-)


Wrap around on jsonProperty::valueOffset

valueOffset wraps around for larger JSON objects, resulting in unexpected behaviour (specifically, parse errors in my case.)
typedef struct jsonProperty {
    unsigned int hash;
    unsigned char type;
    unsigned short valueOffset;
    unsigned short valueLength;
    union {
        long long i;
        double d;
        unsigned char b;
        char *s;
    } value;
} jsonProperty;

It is a fairly simple fix and just amounts to using a larger type.
To reproduce, you can use a large json object. For example, a string array where each elements could be up to 100 characters.

Hi Jeremy, thanks for reporting this issue. I will look into this and reply back in a few days. Since jsonProperty is a heavily used structure, I'm worried changing the type might result in significant increase in memory usage.

Hi, thanks for reporting this issue. I have published a fix for it. Please use version 2.0.26 (Ruby), 2.0.27 (Python), 2.0.24 (Node.js).

Awesome, thanks!


fix: stop using deprecated from_utc method

Description
HEAD is currently failing cargo check because a new deprecation was just pushed to chrono, deprecating from_utc: https://github.com/chronotope/chrono/pull/1175. Since we fail on warnings, this breaks the build.
Might be worth relaxing some of these checks, as typically marking something as deprecated is done specifically to not break downstream projects.

@jacksonrnewhouse

Might be worth relaxing some of these checks, as typically marking something as deprecated is done specifically to not break downstream projects.

Do you know how to do that? I looked around the clippy docs and google but couldn't find an obvious solution.


Can't find signing identity

I am using Hackintosh, it could be the reason that it couldn't find my signing identity

is there anything that i can do?

I am getting the same error, yet I have no problems creating and installing the image. Do you encounter issues?

not yet, I think for me it is because its Hackintosh's problem, cuz it's not a real Mac, motherboard and so on are different so it couldn't be recognised.


consulcatalog: discovery does not work with consul 1.9.0

Do you want to request a feature or report a bug?
Bug
What did you do?
upgrade from consul 1.8.6 to 1.9.0
What did you expect to see?
same services in the discovery as before
What did you see instead?
not a single service got discovered, without error in the logs
Ideas to fix
maybe upgrading github.com/hashicorp/consul/api v1.3.0 to v1.7.0 helps
Output of traefik version: (What version of Traefik are you using?)
tested with the docker based versions 2.3.3 and 2.3.4
What is your environment & configuration (arguments, toml, provider, platform, ...)?
if really needed, i can provide that as well
If applicable, please paste the log output in DEBUG level (--log.level=DEBUG switch)
if really needed, i can provide that as well

i just tried upgrading to consul/api v1.7.0 and rebuilding traefik but that did not solve it
even the debug log does not help
time="2020-11-25T17:46:26Z" level=debug msg="Filtering disabled item" serviceName=consul
time="2020-11-25T17:46:26Z" level=debug msg="Configuration received from provider consulcatalog: {\"http\":{},\"tcp\":{},\"udp\":{}}" providerName=consulcatalog
time="2020-11-25T17:46:26Z" level=info msg="Skipping same configuration" providerName=consulcatalog

I see the same output on consul v1.8.6 and nomad v0.12.9. I can see the tags on the consul UI, but the logs in nomad show no updates. This is my traefik job:
job "traefik" {
  datacenters = ["dc1"]
  type = "service"

  update {
    stagger = "30s"
    max_parallel = 1
  }

  group "traefik" {
    count = 3

    task "traefik" {
      driver = "docker"

      config {
        image = "traefik:v2.3"
        network_mode = "host"

        volumes = [
          "local/traefik.toml:/etc/traefik/traefik.toml",
        ]
      }

      template {
        data = <<EOF
[log]
  level = "DEBUG"

[entryPoints]
  [entryPoints.http]
    address = ":80"
  [entryPoints.https]
    address = ":443"
  [entryPoints.api]
    address = ":8080"

[api]
  dashboard = true

[providers.consulCatalog]
  prefix = "traefik"
  exposedByDefault = false
  [providers.consulCatalog.endpoint]
    address = "<IP_ADDRESS>:8500"
    scheme = "http"
EOF

        destination = "local/traefik.toml"
      }

      resources {
        cpu = 300
        memory = 256

        network {
          port "http" {
            static = 80
          }

          port "https" {
            static = 443
          }

          port "dashboard" {
            static = 8080
          }
        }
      }

      service {
        name = "traefik"

        tags = [
          "traefik.enable=true",
          "traefik.port=9999",
          "traefik.http.routers.api.entrypoints=api", # TODO change this to https later
          "traefik.http.routers.api.rule=Host(`traefik.my-domain.com`)",
          "traefik.http.routers.api.service=api@internal",
          "traefik.http.routers.api.middlewares=api-auth",
          "traefik.http.middlewares.api-auth.basicauth.users=user:bcrypt",
        ]

        check {
          name = "alive"
          type = "tcp"
          port = "http"
          interval = "10s"
          timeout = "2s"
        }
      }
    }
  }
}

Hello @zyclonite,
Thanks for your interest in Traefik!
I tried to reproduce the issue you are facing with consul 1.9.0 without any success. The services are well discovered by the consulcatalog provider.
Can you provide us a reproducible case?
BTW, I've seen in your log that the consul service is filtered, so the services seem to be well discovered by Traefik.

time="2020-11-25T17:46:26Z" level=debug msg="Filtering disabled item" serviceName=consul

hi @kevinpollet,
i have set exposedByDefault: false so only services i put traefik.enable=true as a tag get included
in my environment the services register themselves in the consul catalog so it's hard to do a reproducer... i will try to export a curl command that mimics the registration of a service
what i tested is, that the services could still discover themselves directly only traefik is not able to do that any longer

@kevinpollet i think i found something... when using the providers.consulCatalog.cache=true flag it get an inconstant service list
so i tried to use the consul api directly and it seems the cache is somehow broken on the consul agent
sometimes i get service A with ?cached and only service B without the cached flag (sometimes i get even services back which were already deregistered)

I can confirm this behavor. After upgrading my consul cluster and all agents i lost a lot of servieces in my environment.
After setting providers.consulCatalog.cache=false it works like before.
I'm not really convinced that this is an agent fault, this might be an server issue because i realized while testing that when i restart the consul agent i got sometimes an list with an missing service which was available bevor and which is STILL available on all other traefik instances, so maybe the agent fetches an incorrect service list from the server?
Only case i found which may be related in the consul repo is https://github.com/hashicorp/consul/issues/8980

I also have missing services with consul 1.9.1 (some of them is missing, but not all) and be able to recover them when setting cache=false.

I also have missing services with consul 1.9.1 (some of them is missing, but not all) and be able to recover them when setting cache=false.

Is cache undocumented? I can't find it anywhere here: https://doc.traefik.io/traefik/providers/consul/

Is cache undocumented? I can't find it anywhere here: https://doc.traefik.io/traefik/providers/consul/

https://doc.traefik.io/traefik/providers/consul-catalog/

https://doc.traefik.io/traefik/providers/consul-catalog/

i think based on the consul docs there should not only be the option to use the cache query param but as well a configured Cache-Control header https://www.consul.io/api-docs/features/caching#simple-caching
else the cache could return very old records as well...

i think based on the consul docs there should not only be the option to use the cache query param but as well a configured Cache-Control header https://www.consul.io/api-docs/features/caching#simple-caching
else the cache could return very old records as well...

Hi! I'm Træfiker :robot: the bot in charge of tidying up the issues.
I have to close this one because of its lack of activity :disappointed:
Feel free to re-open it or join our Community Forum.


Update and dogfood test framework

What was changed

Added support for Temporalite
Use Rust wrapper for ephemeral servers which also downloads and runs them
Convert Python tests to use the test framework

Some tests had to be disabled for the time skipping server
Tests for TLS and search attributes are still using Go-based Temporalite for their programmatic needs but we should be able to fix in Temporalite soon

Update CI to run with Temporalite and test server

Checklist

Closes #120

I am currently "debugging in CI" a problem that only happens on non-windows Python 3.7. There is something with the event loop implementation on this older version that is clashing with the test implementation.


As a team member I want to have a code of conduct, so that we can follow best practices

Acceptance Criteria
1.English
2.Lawfully Reviewed
3.Ethically Reviewed
4.Legally binding


Cannot read property 'log' of undefined

Hello,I meet a problem when I save annotations in docker ,Could not save annotations TypeError: Cannot read property 'log' of undefined,my environment is
Server version: 1.1
Core version: 3.1.0
Canvas version: 1.2.1
UI version: 1.4.2
//----------------------------------------------------
have you met it or may be what cause this?

@tingfengwanxiao
Hi, I do not remember such an exception.
What are specific steps to reproduce? Just saving annotations works well for me.
Have you changed source code of CVAT?

ok,I find the reason. I accidentally changed the code.


yarn run build failed!

Description
The project fails to build after installation of all dependencies using Yarn.
Image

Environment
Operating System : Arch Linux
Yarn Version : 1.22.21
Potential Issue
react-scripts seems to be the point of error. Not sure a 100%. Would like some help in building and trying out the application. Thank You.

This project has been updated by fixing several issues and using the latest framework version. Also, this project was tested again and the above mentioned issue didn't occur. Please check the latest commit of this project 🎉 thanks for reporting this bug


GUI Overlap w/ Quark Oddities Backpack

If you're wearing a backpack from Quark, then open the recipe book, the icon from this mod gets stuck in the backpack inventory until the next close and re-open the inventory GUI.

Can you provide a screenshot?

This is what it looks like after clicking the recipe book button with the animated recipe book mod installed. If the mod is uninstalled, this doesn't happen. Also, as you can see, the Curios button gets messed up as well.

Alright, I see, thanks. And the Curios button is messed up even without my mod, right?

Nah, it's only messed up with the mod.


No module named 'dirty_models'

Hi all, I'm trying to run the minibot, but this is giving the following error
Would you help me
Version python 3.6.2
@alfred82santa

I managed to install Whalesong ... but after logging in he can not get the new messages

Have you installed requirements? https://github.com/alfred82santa/whalesong#install-library-requirements

Look at the picture, I sent a text but the driver did not identify the new message

Humm ... It worked.

Congratulations, I'm really liking the lib,
now you could help me in just one more thing
when i install pip install whalesong it works perfectly
now when I try to execute with the source code it gives the error requesting a file as the image below.

please open a new issue... other users could look for the same question.


MM-23382: Default AutocompleteSelector's listStyle to 'top'

Summary

This PR fixes the rendering of the suggestion lists in interactive messages, making them render on top of the menu.
EDIT: I almost forgot the most important thing here! It was @larkox who helped me fixing this, so all kudos to him :)
Technical Description
AutocompleteSelector relies on SuggestionBox for rendering, but it was overriding its listStyle, which was hardcoded to 'bottom' in the former, while it defaults to 'top' in the latter. This made ActionMenu and DialogElement, the two components currently using AutocompleteSelector, behave differently.
This commit makes listStyle defaults to 'top' in AutocompleteSelector, so the behaviour in ActionMenu is back to normal, and makes DialogElement be the one setting it to 'bottom'.
Ticket Link

https://mattermost.atlassian.net/browse/MM-23382
Screenshots

Creating a new SpinWick test server using Mattermost Cloud.

Mattermost test server created! :tada:
Access here: https://mattermost-webapp-pr-5186.test.mattermost.cloud

Account Type
Username
Password

Admin
sysadmin
Sys@dmin123

User
user-1
User-1@123

/update-branch

New commit detected. SpinWick will upgrade if the updated docker image is available.

Mattermost test server updated with git commit aeb1c68c76fdd38b3245794878ce94b43d3199fe.
Access here: https://mattermost-webapp-pr-5186.test.mattermost.cloud

Test server destroyed


I cant find the up-to-date file dataset_pb2.py and label_pb2.py

In old ones, I can not find the segmentation_label_compressed in dataset_pb2.Frame().lasers, I hope I could get the new ones. Thank you

Hi,
To understand your question better, are you finding an empty segmentation_label_compressed field in the data?
If you are seeing the field as empty, it may be because not all RangeImages have this field populated as described here
As described in the link, only the laser with the name "TOP" has segmentation labels populated and also, not all frames have segmentation data labeled.
If you are still having trouble, could you send us an example of how you are trying to access the data when you are running into the issue?


docs: push to create

This PR adds user friendly documentation on how to use push to create feature

🎺 🤖


Add support for configuring timeouts in RubyBox::Session

This has been discussed before in https://github.com/attachmentsme/ruby-box/issues/60
The idea is to allow library users to configure network timeouts to suit their needs.

If set, the timeout options are also being passed to OAuth2, so that the calls to get and refresh tokens obey the same network settings.

Closing this PR for lack of interest.


Bundle dependency not added when adding a binding to an existing function

Create a function app with an HTTP trigger
Right-click function.json and choose add binding
Choose "out", "Azure Queue Storage", then accept the defaults
Choose "AzureWebJobsStorage" for the storage account

Expected: host.json is updated with the bundle dependency the same way as when a new function is added.
Actual: the binding is added to function.json, but host.json is not updated.

As a manual workaround, users can add the "extensionBundle" property to their host.json like this:
{
  "version": "2.0",
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[1.*, 2.0.0)"
  }
}

See here for more info


can't install reduce

hello sir, I can't download reduce python package from anaconda or pip. Could you please tell me the right way to download it?

directly install the ambertools , and reduce is contained.

hello sir, I can't download reduce python package from anaconda or pip. Could you please tell me the right way to download it?

hello，Have you successfully installed reduce？Did you install ambertools successfully?Whether ambertools is useful？

I'd installed ambertools23 and i can call Reduce directly


fix broken link in README.md

url was going to empty "url" instead of expanding image size
Which issue does this PR close?
n/a, very minor typo fix
Closes #.
Rationale for this change
link doesn't work
What changes are included in this PR?
fix url
How are these changes tested?
github preview of updated readme

Thanks @nairbv

@viirya np. probably a maintainer will have to merge, I don't see a merge button

Merged. Thanks.