possible kernel proliferation with scalar parameters

Consider the following function
namespace bc=boost::compute;
void add_scalar(bc::vector<float>& v, float scalar){
    auto unary = bc::bind(bc::plus<float>(),bc::placeholders::_1, scalar);//_1+scalar
    bc::transform(v().begin(),v().end(), v().begin(), unary);
}
...
bc::vector<float> v(10000,1.0);
for(int i = 0; i != 1000; ++i)
    add_scalar(v,0.5*i);

This will in every iteration generate a kernel and compile it on the device, leading to way more kernel compilations than required(essentially making kernel caching useless). The issue, as far as i understood the meta_kernel code is, that a function can only register buffers, but not constants. Thus the only way to generate the kernel is to stringify the scalar value. A solution would be to add the ability to register constants as additional kernel arguments the same way as it is done with buffers.
An alternative solution that does not require deep changes to the internals would be to use an bc::array<float,1> for everything that is not a constant. But this is very tedious and error prone as the user must be very careful with scalar arguments, especially as for example bc::accumulate returns a float and not an array<float,1> (while the internal implementation actually uses an array<float,1>...).
A way to make the latter solution more viable would be to implement a small wrapper class scalar which is a bit of syntactic sugar around bc::array<float,1>

That's an interesting issue. I understand that that example is just to show where is the problem ;) I hope nobody would write something like this (the loop part).
I think that:

The easiest and the fastest way to do this (except creating class that is only a syntactic sugar around bc::array) is modifying constant_iterator<T> class. Now the value is simply evaluated to the detail::meta_kernel_literal<T> and later to the string. After the change it would have to add an argument to the kernel, set the value of that argument, and place the name of that argument in the correct place.
Other way would be to reconstruct detail::scalar<T>, so it evaluates to the kernel argument (etc.) when used with meta_kernel, and promote it to the main namespace.
Making a class that is only a syntactic sugar around bc::array (or any other container, or directly around OpenCL buffer) introduces an overhead of creating a buffer and writing the value to it before the execution. Kernel argument should work better, however, it may be harder to implement.

Hi,
Is there any news on this?
this issue becomes more severe for me as some unit tests currently generate > 10000 kernels instead of maybe 10 or so. I would vote for anything that can add a scalar argument to the kernel :). I prefer the scalar argument solution. The problem with scalar arguments however is, that we have to be more careful regarding the uniqueness of the argument, because if everytime we do
k<<*(my_iter)
my_iter adds a scalar argument, we might end up with many copies of the same argument. So my_iter would have to tore the index of the argument somehow(in the same way that buffer objects are used as unique identifiers, scalar arguments also need this unique identifier...). Also, we have to ensure that the value is correctly set after the kernel is built. currently adding a kernel arg will not set its value as is done with buffers.

Oh i forgot my idea on how to solve the unique name problem. The best way to make the argument names unique is to tell the kernel which variables belong together. so we can tell the kernel "now we are going to use variables used by the group 1" and this gives the kernel the ability to tell whether a variable has been already registered or not (the first time we enter a group every request of a kernel variable needs to create it, in subsequent calls we know they are there).
For this we might need to add the following kernel functions
//tell the kernel that we need to add a variable group
std::size_t group_id = k.create_var_group();
//tell the kernel that we are entering the group group_id
k.enter_var_group(group_id);
//create unique identifiers group<group_id>_var<id>,
//where id is icremented with every call by one. A call to
//enter_var_group sets id=0
std::string const& unique_identifier = k.add_or_get_arg<T>(value);
k<<unique_identifier1;//using it
k.leave_var_group(group_id);//we are done in this group

With this, we could easily create a registered_iterator which wraps another iterator with the following semantics:
Constructor registered_iterator(my_iter): calls k.create_var_group() and stores the group id. my_iter is stored internally.
Dereference: returns an object with operator<<:
k.enter_var_group(group_index);
k<<*my_iter;
k.leave_var_group();

usage:
registered_iterator<MyIter> registered_iter(my_iter);
//instead k<< *my_iter;
k<<*registered_iter;

I am sorry for the shameless plug, but you could use vexcl with the boost.compute backend (see http://vexcl.readthedocs.io/en/latest/interop.html). This will solve the problem with scalar kernel arguments, since vexcl by default treats scalar variables as kernel parameters.
void add_scalar(bc::vector<float>& v, float scalar){
    auto unary = bc::bind(bc::plus<float>(),bc::placeholders::_1, scalar);//_1+scalar
    bc::transform(v().begin(),v().end(), v().begin(), unary);
}
...
bc::vector<float> v(10000,1.0);
for(int i = 0; i != 1000; ++i)
    add_scalar(v,0.5*i);

becomes
for(int i = 0; i != 1000; ++i)
    v += 0.5 * i;

which results in single kernel generated and applied many times. The problem with unique variables is solved by tagging the variables: http://vexcl.readthedocs.io/en/latest/expressions.html#tagged-terminals

Any news on this? This is a real showstopper for me. The biggest issue I have is that all kinds of indexing into a buffer leads to recompilation of the kernel. E.g. when i use the row-major matrix layout, i index the buffer as val(x,y)=buf[x*cols+y].
And since i have no way to store cols uniquely as an argument, every time i use an algorithm on a matrix of different size, the corresponding kernel is recompiled. This also happens in all kinds of vector operations, e.g. strided_iterator (taking the row or column of a matrix) or buffer_iterator with index != 0 (taking a sub-vector of a row for example).
This is not an easy issue to fix and my first few own-rolled attempts failed in the planing stage. The only solution i see is that when we get an iterator, we have to pre-register all its constants. This means that for example the strided iterator registers the index and gets a unique argument name returned which is then used instead of the constant when the kernel source is generated via op<<.
In practice this would mean that we have a strided_iterator and a kernel_strided_iterator. The latter is constructed from the strided_iterator and the kernel and does all the registering and saving of the argument name in the constructor. We then only use the kernel_strided_iterator during generation of the kernel code.

To be honest, I just don't have enough free time to think about this. Currently, I'm trying to hunt and fix remaining bugs and and missing wrappers for API calls introduced in 2.1 etc.

This is not an easy issue to fix and my first few own-rolled attempts failed in the planing stage. The only solution i see is that when we get an iterator, we have to pre-register all its constants. This means that for example the strided iterator registers the index and gets a unique argument name returned which is then used instead of the constant when the kernel source is generated via op<<.

In practice this would mean that we have a strided_iterator and a kernel_strided_iterator. The latter is constructed from the strided_iterator and the kernel and does all the registering and saving of the argument name in the constructor. We then only use the kernel_strided_iterator during generation of the kernel code.

Yeah, I think for iterators it may be possible resolve it by changing how they are processed by meta_kernel in << operator. We would also have to change iterators a little bit. However, I think we would not anything like kernel_strided_iterator. I may be wrong. Anyway, it's a lot of trying and testing, and doing it for Boost.Compute functions and lambdas would be even harder. I don't really have resources to do that.

If we have a working proposal, i can invest the time to add and thest the changes in the meta_kernel as well as some of the iterators. I am stuck with this for some time, i can as well work on it.

If we have a working proposal, i can invest the time to add and thest the changes in the meta_kernel as well as some of the iterators. I am stuck with this for some time, i can as well work on it.

OK, I'll try to find time to work on this after I adjust Boost.Compute to changes introduced in OpenCL 2.1 and 2.2.

I worked myself a bit on a solution, see lines 509-607
https://github.com/Shark-ML/Remora/blob/1b6aba317eaa381215e9c273247cbf73c8ce9f6a/include/remora/gpu/traits.hpp#L581
This is a solution were functions with arguments are transformed into functions with a registered variable name. Line 609 gives an example for such a function with a bind_second.  Basically a call to bind_second(f,t) (where t is the argument) is replaced by bind_second(f, "variable_name_of_t") and t is registered as a kernel argument.

I have found a hacky solution. By using a permutation iterator combined with a constant iterator for the index, it is possible to have an array which is indexed at zero (aka a scalar). The performance for this should be fine, but this may be worse than an actual scalar parameter. Here is an example:
#include <boost/compute.hpp>

namespace bc = boost::compute;

template <class Element> struct ScalarRange {
  inline auto begin() const {
    return bc::make_permutation_iterator(holder.begin(),
                                         bc::make_constant_iterator(0));
  }

  inline auto end() const {
    // + size is required (but it really shouldn't be, this comes down to
    // permutation_iterator)
    return bc::make_permutation_iterator(holder.begin() + size,
                                         bc::make_constant_iterator(0, size));
  }

  ScalarRange(Element value, size_t size,
              bc::command_queue command_queue = bc::system::default_queue())
      : size(size) {
    holder.push_back(value, command_queue);
  }

private:
  bc::vector<Element> holder;
  size_t size;
};

int main(int argc, char *argv[]) {
  bc::float4_ val = {1, 3, 38.3838, 3};
  const unsigned size = 10;
  ScalarRange<bc::float4_> scalar_range(val, size);

  bc::vector<bc::float4_> out(size);

  BOOST_COMPUTE_FUNCTION(bc::float4_, multiply, (bc::float4_ val_1, int val_2),
                         { return val_1 + val_2; });

  bc::transform(bc::make_zip_iterator(boost::make_tuple(
                    scalar_range.begin(), bc::counting_iterator<int>(0))),
                bc::make_zip_iterator(boost::make_tuple(
                    scalar_range.end(), bc::counting_iterator<int>(size))),
                out.begin(), bc::detail::unpack(multiply));
  std::vector<bc::float4_> out_cpu(10);
  bc::copy(out.begin(), out.end(), out_cpu.begin());
  for (unsigned i = 0; i < size; ++i) {
    std::cout << out_cpu[i] << "\n";
  }

  return 0;
}

The kernel generated for this looks like:
inline float4 multiply(float4 val_1, int val_2){ return val_1 + val_2; }

__kernel void copy(__global float4* _buf0, __global float4* _buf1, const uint count)
{
uint index = get_local_id(0) + (512 * get_group_id(0));
for(uint i = 0; i < 4; i++){
    if(index < count){
_buf0[index]=multiply(_buf1[0], (0+index));
       index += 128;
    }
}

}


DataFrame read and write ops in check_dicom_status.py

Currently seeing one error from load_manifest and a warning while populating status_df.
Error: this can be circumvented if we read the CSV directly with pd.read_csv
Traceback (most recent call last):
  File "/data/origami/nikhil/my_repos/nipoppy-qpn/nipoppy/workflow/dicom_org/check_dicom_status.py", line 252, in <module>
    run(global_config_file, regenerate=regenerate, empty=empty)
  File "/data/origami/nikhil/my_repos/nipoppy-qpn/nipoppy/workflow/dicom_org/check_dicom_status.py", line 60, in run
    df_manifest = load_manifest(fpath_manifest)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/origami/nikhil/my_repos/nipoppy-qpn/nipoppy/workflow/utils.py", line 85, in load_manifest
    return pd.read_csv(
           ^^^^^^^^^^^^
  File "/data/origami/nikhil/my_envs/nipoppy/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 948, in read_csv
    return _read(filepath_or_buffer, kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/origami/nikhil/my_envs/nipoppy/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 617, in _read
    return parser.read(nrows)
           ^^^^^^^^^^^^^^^^^^
  File "/data/origami/nikhil/my_envs/nipoppy/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1748, in read
    ) = self._engine.read(  # type: ignore[attr-defined]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/origami/nikhil/my_envs/nipoppy/lib/python3.11/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 234, in read
    chunks = self._reader.read_low_memory(nrows)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "parsers.pyx", line 843, in pandas._libs.parsers.TextReader.read_low_memory
  File "parsers.pyx", line 920, in pandas._libs.parsers.TextReader._read_rows
  File "parsers.pyx", line 1044, in pandas._libs.parsers.TextReader._convert_column_data
  File "parsers.pyx", line 2113, in pandas._libs.parsers._apply_converter
  File "/data/origami/nikhil/my_envs/nipoppy/lib/python3.11/site-packages/pandas/core/computation/eval.py", line 303, in eval
    _check_expression(expr)
  File "/data/origami/nikhil/my_envs/nipoppy/lib/python3.11/site-packages/pandas/core/computation/eval.py", line 120, in _check_expression
    raise ValueError("expr cannot be an empty string")
ValueError: expr cannot be an empty string

@michellewang  - I kinda understand where this is coming from but wanted to check with you since pandas converters to read lists from CSVs is a bit messy.

Warning:
/data/origami/nikhil/my_repos/nipoppy-qpn/nipoppy/workflow/dicom_org/check_dicom_status.py:224: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas.

This is because of status Series is initialized as numpy float on the line:
status = pd.Series(np.nan, index=df.index)

And can be fixed by setting it to False
status = pd.Series(False, index=df.index)

@nikhil153 is this for the datatype column in the manifest? It needs to be an empty list if no datatypes are available. If you just use pd.read_csv I don’t think you get a list (think it gives a string)?

@michellewang - oh right, we did talk about that. But let's put that as a check in the function with more informative error message than Panda's ValueError. It won't be trivial for other users to create manifest with empty [] for datatype.

Closing as this is related to the old (script-based) version of Nipoppy


Add option to flux-app to disable force push of image automations controller

In v0.27.0 if Flux's image automation controller: https://github.com/fluxcd/image-automation-controller/blob/main/CHANGELOG.md#0270 they changed:
Starting from this version ImageUpdateAutomation objects with a spec.PushBranch specified will have the push branch refreshed automatically via force push. To opt-out from this behaviour, start the controller with: --feature-gates=GitForcePushBranch=false.

Following up on the change log it was added in https://github.com/fluxcd/image-automation-controller/pull/453 to fix https://github.com/fluxcd/image-automation-controller/issues/450.
This upgrade was released in GS flux-app: https://github.com/giantswarm/flux-app/releases/tag/v0.20.0
Add support to flux-app for the flag: --feature-gates=GitForcePushBranch=false.

This is now available in the v0.20.2 release.


Search functionality

1) Full text search (currently in the collection of letters, but we will add the writings)

Transcription (show the paragraph level
, <opener> or <closer>)

Translation show the paragraph level
, <opener> or <closer>)

Postal data (show the div)

 @type="postalData"

Annotations (show the note level <note>)
<note>

2) Facet search

Manuscript identifier
<idno> child of <msIdentifier>

Country of preservation
<country> child of <msIdentifier>

Place of preservation
<institution> child of <msIdentifier>

Number of the letter
<idno> @type="letterId"  child of <altIdentifier>

Correspondent
<correspAction> @type="received"
<name>
(use @key to find the name in bio.xml eventually)

Mentioned person
<rs> @type="person" (use @key to find the name in bio.xml eventually)

Mondrian’s artwork
<rs> @type="artwork-m" (use @key to find data in RKD db eventually)

Other’s artwork
<rs> @type="artwork" (ignore for the moment)

Period
<date> @when child of <correspAction> @type= "sent"
(show the value of @when)

Place
<placeName> child of <correspAction> @type="sent"

Exhibition
<rs> @type="exhibition" (use @key to find data in expo.xml eventually)

Organizations (Museum, associations etc.) to be added later.

Search results should be sortable by

Date (asc/desc)
Correspondent
Place

Something to take into account from the start is perhaps that the search facility will also be used for documents other than letters: the writings of course but also the introductions, biography, etc. Most of the above facets then will not be applicable, but there should be a sort of super-facet: which type of document are we searching in or for.

Yes and yes.
(1) If they don't appear in the facets, the user can's use the facets to make further selections.
(2) To Beatrice and me this didn't seem urgent.
But some of this may be fine-tuned on the basis of feedback from Wietse and Leo once they see what it looks like.

@pboot Shall we also pick up the sender of the letter? I assume that there are also letters in the corpus that have been sent to Mondriaan?
And even if that is not the case, if somebody later combines this dataset with other letters sent to Mondriaan, then it is nice to have the sender metadata in place.
Anyway, the info is there, and it is easy to pick it up.

I can also pick up the date in short form (from the when attribute) and in long form, from the element content.

By the way, the <rs> elements refer by attribute key or ref. For persons I see ref, for artworks I see key.
@Beatrice-nava Is there an intentional difference?

All the features mentioned under 2) are in Text-Fabric now, and put through to the WATM annotations.
However, as far as the rs elements are concerned, the feature values only contain the contents of the ref or key attributes.
Later we will use that to follow those references to pull data out related files, such as artwork.xml, bio.xml, biblio.xml.

@Beatrice-nava
Question came up: shouldn't we add this to the metadata of the letter as well:
teiHeader > fileDesc > sourceDesc > msDesc > physDesc > objectDesc het attribuut form=correspondentiekaart

I think we decided to ignore it for the time being, as we basically only have letter and postcard as objectDesc, but that could change based on Wietse and Leo's feedback (I think we have already mentioned this in a previous comment, but for the moment there is no news).


incorrect formatting when function defined inside object block

var foo = {
	bar: function(arg) {<press enter here>
}

result:
var foo = {
bar: function(arg) {
        <cursor>
}

This also occurs for any nested blocks (e.g. for) within the function.

Not able to repro this issue.

I'm not able to repo this issue either. I tried playing around with the formatter settings  a but, but please reopen if you are still hitting this.


create custom build for my project

Hi Matt.
I wanted to create new custom view to add new events in the calendar, i want to generate that new view like you generated for month , week views in your calendar, I able generate my custom view in the same way you have done in your calendar, and generated the view, also i was trying to use 'npm run build' for my custom build but its gives lots of errors while building, and my new templates , corresponding directives are not get included in the build. Need some help to create my custom build. i have uploaded some pics which will give some basic idea of what i wanted to do.

Those errors are from eslint, you should be able to configure your IDE to use unix style line endings, or just disable the rule in the eslint config. See the eslint docs for more info: http://eslint.org/docs/rules/linebreak-style

ok..
actually i wanted to add extra custom view like you created for month, week over same calendar view, without changing in your core files.

If you want a custom view I'd recommend just creating a completely separate component and then in the nav buttons link to it. It'll keep your code base a lot simpler. In the ng2 version I actually removed the parent calendar component and split everything into 3 components for day / week / month views with your exact use case in mind.
The build will be failing because of the lint errors, it's a deliberate design to maintain consistency across the code base.


[dubbo_4569]optimized code(#4569)

What is the purpose of the change
https://github.com/apache/dubbo/issues/4569
Brief changelog
XXXXX
Verifying this change
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
[ ] Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
[ ] If this contribution is large, please follow the Software Donation Guide.

Codecov Report

Merging #4584 into master will decrease coverage by 0.1%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master    #4584      +/-   ##
============================================
- Coverage     63.34%   63.23%   -0.11%
+ Complexity      450      448       -2
============================================
  Files           770      770
  Lines         33015    33016       +1
  Branches       5218     5219       +1
============================================
- Hits          20912    20879      -33
- Misses         9705     9733      +28
- Partials       2398     2404       +6

Impacted Files
Coverage Δ
Complexity Δ

...apache/dubbo/common/extension/ExtensionLoader.java
79% <100%> (-0.11%)
0 <0> (ø)

...che/dubbo/rpc/listener/InvokerListenerAdapter.java
0% <0%> (-33.34%)
0% <0%> (ø)

.../dubbo/rpc/listener/DeprecatedInvokerListener.java
20% <0%> (-20%)
0% <0%> (ø)

.../apache/dubbo/qos/protocol/QosProtocolWrapper.java
64.1% <0%> (-17.95%)
0% <0%> (ø)

...che/dubbo/remoting/transport/mina/MinaChannel.java
43.42% <0%> (-10.53%)
16% <0%> (-1%)

.../remoting/transport/netty4/NettyServerHandler.java
61.9% <0%> (-9.53%)
0% <0%> (ø)

...ng/transport/dispatcher/all/AllChannelHandler.java
51.42% <0%> (-5.72%)
0% <0%> (ø)

...pport/zookeeper/ZookeeperDynamicConfiguration.java
78.57% <0%> (-5.43%)
0% <0%> (ø)

...ng/exchange/support/header/HeartbeatTimerTask.java
73.68% <0%> (-5.27%)
0% <0%> (ø)

.../org/apache/dubbo/remoting/ExecutionException.java
15.78% <0%> (-5.27%)
0% <0%> (ø)

... and 9 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 82378a1...963e681. Read the comment docs.


setting a default minimum grid area

Just wondering if it is possible to specify a default minimum grid size area (height and width) before widgets are added?
var options = {
?????
};
$('.grid-stack').gridstack(options);
If added widgets exceed this area the area would then dynamically expand to accommodate them. If widgets are removed such that the area required is less than the minimum it would go back to the default minimum grid area. I didn't see a way to do this in the docs.

You can setup min-height css style for .grid-stack container.

Hi @troolee If we set min-height to container, its affecting the resize of the grid items. Any idea of why?

Same issue here. If a min-height is specified on the container, resizing an item will cause the height to snap to a smaller value.

+1
Facing same issue.
Passing min-height is making resize not happen correctly.


Improve: Project Card - Project Card responsiveness

At users page, you can see its responsiveness could improve.
(I actually did some changes on it, but it wasn't enough)

Changed it so it doesen't overlay one projectcard over the other


Deprecation of org scoped promoted results in modern

Added an important note to highlight that promoted results by query rules in modern for org scoped queries are being deprecated in December. Message center post MC293777 https://admin.microsoft.com/?&source=applauncher&ref=MessageCenter/:/messages/MC293777

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@SerdarSoysal Thank you for submitting feedback and contributing to the docs. We are currently investigating this.


Master dashboard: set min value on Y axis to 0.

Values on any of those dashboard won't go below that value. Plus it makes some dashboards more readable and accurate (e.g by showing accurate proportions between series).
/kind cleanup
/assign @mborsz

/assign @mm4tt

/ok-to-test

/lgtm
/approve


bump dependencies

Applied mkpr on package.json
/tmp/mkpr.sh

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

npm package (@latest dist-tag)
v1.11.2
GitHub release

Your semantic-release bot :package::rocket:


Added "View Replays" from the context menu in the chat user list

This PR enables the contextual menu item "View Replays" in the chat user list. When the menu item is clicked, the client switches to the replay vault view and fetches the last 100 replays of the respective user and displays them as search results.

works

Please always link the issue

Please always link the issue

This was a FIXME in the code; no issue seems to exist for it.

Then always create on, tho i think we have one as well

Fixes #1521


Use Dart for Android and iOS Apps without needing Android Studio and XCode

I'm a newbie whose first Programming Language in my life will be Dart.

Dart SDK Version (current version`)
OS: Windows
Browser: Chrome and sometimes Firefox

In creating a Flutter Project using Android Studio, I find the Link to New Image Asset missing.
These predicaments now triggered something in my head, forcing me to ask that-- Can the Dart Team not build something that can help us build Android and iOS Apps without needing Android Studio and XCode?
Regards

Great Idea! I wish they make a Customized version of Android Studio or VS Code that is specially made for Flutter. IT would fix so many issues


[Bug] - Docs Markdown not working with numbered lists

Insomnia Version: 5.16.1
Operating System: macos

Details
I am editing a doc for an endpoint and I am trying to add a numbered list:

Item 1
Item 2

Actual Results
Item 1
Item 2
Expected Results:

Item 1
Item 2

Ah, looks like there isn't any CSS for ordered lists yet. I'll get this fixed for the next release


Declare ulimit parameter in the resource

With v0.40.0, I got the following error:
NoMethodError: undefined method `ulimit' for LWRP resource docker_container from cookbook docker

Any chance to get this merged?

Duplicate of https://github.com/bflad/chef-docker/pull/331

Working for me as a fix. Would be nice to get this merged in as it breaks the cookbook.
:+1:


[CPE] Optimize rolling update of Nodes with more volumes

Improvement
Optimize the time taken for the rolling update of Nodes with higher number of Volumes attached. The nodes in the SEED clusters have an average of 10+ volumes per Node
Tests across cloud providers show that GCP and OpenStack are better than AWS and Azure in the attach and detach operations. AWS performs better than GCP during attach while GCP outperforms heavily during detach
Impact

ETCD downtime could be longer during rolling updates of the SEED clusters
Also applicable for the workloads of the stakeholders in the SHOOT clusters

Approach
Improvements in the CSI wouldn't suffice and a more generic approach will be required. Also the solution is not restricted to the control plane components alone - the workloads on the Shoot clusters could face similar impact depending on the number of volumes attached to their Nodes
Short-term
MCM could serialize the eviction of pods with volumes, maybe via a drain controller

Maybe it could have 2 queues, one that works in parallel and deals with all pods that have no PVs and one that works serially and one-by-one evicts pods with PVs. Maybe it is sufficient to wait for the pod to be evicted and the PV to be successfully detached before the next one is processed, but maybe the controller would have to wait for the attach to complete, too. That however would be ugly / a very ugly dependency as there is no guarantee that this will even work (pod scheduling or attach may be blocked by unrelated reasons). Hopefully, waiting for the detach operation to complete puts a sufficient brake on the "flow of pods" that it will lead to quasi-serialised attach operations (we put a brake on the pods that leave a node, so the inflow of pods on the other/new nodes will be slowed down).

Closing as respective improvements were implemented in the g/machine-controller-manager.


migrating(eks): add blog post of migrating node groups with zero downtime

Blog post for EKS migrate-nodegroups example:
EKS examples PR: https://github.com/pulumi/pulumi-eks/pull/195
Tutorial PR: https://github.com/pulumi/docs/pull/1327

Feedback has been addressed. PTAL @bermudezmt

Feedback has been addressed. PTAL
@cnunciato @bermudezmt @lblackstone @aydrian


depend on dioxus-maintained fork of stretch (stretch2)

Objective
As of the writing of this PR, dioxus' fork of stretch (stretch2 on crates.io) is 24 commits ahead (last updated 8 days ago) of of the unmaintained (since 22 May 2020) version of stretch we currently depend on. There are also bugs in our version of stretch that I believe make it non-flexbox spec compliant, as well as I believe a recursion issue that causes the app to slow to a crawl once a certain level of nesting is reached. These are issues I have heard about but don't have detailed or firsthand knowledge on so I would appreciate that if you know someone that can comment appropriately on this, to tag them here.
Solution
I changed the bevy_ui Cargo.toml to depend on stretch2 instead of stretch and fixed all the errors rustc complained about.

Changelog
Changed bevy_ui layout dependency from stretch to stretch2
Migration Guide
I don't think this affects the public api but I don't have any experience with bevy_ui so input is appreciated. That being said the update to this new version of stretch causes the layout in some of our ui examples to break. I am unsure if our layout code in our ui examples is broken or if the updated version of stretch introduced new bugs, so help with this would also be appreciated. I will attach screenshots of all five ui examples for stretch2 vs bevy main below.

Bevy UI Examples Screenshots
Here are the screenshots for each of the five bevy ui examples showing that the layout is broken by the changes in this PR.
text_debug
main

this PR

text
main

this PR

font_atlas_debug
main

this PR

button
main

this PR

ui
main

this PR

Those breaks are pretty rough :(

It would be really helpful if Dioxus maintained a changelog. It seems like the "24 commits ahead" are:

Renaming the project
https://github.com/DioxusLabs/stretch/pull/1
https://github.com/DioxusLabs/stretch/pull/2

So just a couple of layout bug fixes so far.

It would be really helpful if Dioxus maintained a changelog. It seems like the "24 commits ahead" are:
* Renaming the project

* [Jk/nested fix DioxusLabs/stretch#1](https://github.com/DioxusLabs/stretch/pull/1)

* [fix re-computing layout moves children of non-zero positioned parent DioxusLabs/stretch#2](https://github.com/DioxusLabs/stretch/pull/2)

So just a couple of layout bug fixes so far.
Are bevy's examples relying on buggy layout behavior, or are these fixes introducing new bugs? Or has the migration to stretch2 gone awry in some way?

All excellent points @rparrett!

Jk/nested fix DioxusLabs/stretch#1 includes 17 commits FYI

I tested this PR with my most complicated piece of bevy_ui code; an inventory and equipment half-window. Here is what it looks like on Bevy main at time of writing:

And the following is what it looks like when I depend on this PR's changes:

The code has been extracted from a game I've been working on and is largely unchanged except for the sake of brevity and cutting out all game-specific mechanics, you can see the repo here https://github.com/Sheepyhead/bevy_ui_test

Stretch used to give relative layout for nodes, now it's the absolute layout. I believe it's an issue on Stretch side and opened https://github.com/DioxusLabs/stretch/pull/6, but it's not complicated to fix on Bevy side if they want to stick to the new behaviour.

Stretch used to give relative layout for nodes, now it's the absolute layout. I believe it's an issue on Stretch side and opened DioxusLabs/stretch#6, but it's not complicated to fix on Bevy side if they want to stick to the new behaviour.

Tested the bevy ui and button examples using François' PR fixing relative positioning and it looks like it fixes it.
ui

button

I can confirm that using Francois' latest changes on this PR completely fixes the layout of my complicated gui

Excellent; I'll see about cutting a release of stretch2 ASAP then.

The two UI examples look correct using stretch2 v0.4.3.
ui

button

@mockersf Are there any further steps I need to take with this PR?

@mockersf Are there any further steps I need to take with this PR?

I think @alice-i-cecile intend to release the crate renamed soon, maybe wait for it

Edit: It looks like the check-bans CI is still failing on something to do with the lockfile that I don't understand. Do you know what is happening here and if I need to do something to resolve it?

It seems the new crate has a few dependencies in multiple versions which we don't allow in Bevy. You can investigate on the dependencies if the duplicates are really needed, then open PRs on the dependencies to update if possible... It can take a lot of time

You can investigate on the dependencies if the duplicates are really needed, then open PRs on the dependencies to update if possible... It can take a lot of time

I will happily accept any PRs to do this for sprawl. I'll bump the version of the dependencies where I can for the initial release of sprawl as well.

It seems the new crate has a few dependencies in multiple versions which we don't allow in Bevy. You can investigate on the dependencies if the duplicates are really needed, then open PRs on the dependencies to update if possible... It can take a lot of time

Seems all dependency issues start with heapless (direct dependency in sprawl) and it's dependency tree

It seems the new crate has a few dependencies in multiple versions which we don't allow in Bevy. You can investigate on the dependencies if the duplicates are really needed, then open PRs on the dependencies to update if possible... It can take a lot of time

Seems all dependency issues start with heapless (direct dependency in sprawl) and it's dependency tree

I'm not sure how to fix this. Do you have any suggestions?

@colepoirier can you make a PR to sprawl removing heapless? I don't think it's pulling its weight, and I would like to simplify that section of the code anyways.

@colepoirier can you make a PR to sprawl removing heapless? I don't think it's pulling its weight, and I would like to simplify that section of the code anyways.

@alice-i-cecile switched from stretch2 v0.4.3 to sprawl git main to check if that resolves the CI check-bans failures. Regardless I will attempt to remove heapless from sprawl and make a PR. Additionally, the sprawl v 0.1.0 release seems to be missing the vast majority of the contents of the library so will need a v 0.2.0 before we can take a dependency on it for bevy.

Removing heapless dependency from sprawl allows this to finally pass the check-bans CI :)

sprawl was renamed to taffy and v0.1.0 was realeased on crates.io today!

@colepoirier the PR title and PR description need to be updated too.

@colepoirier the PR title and PR description need to be updated too.

I rewrote it thanks for the heads up! @alice-i-cecile what should I do about the removal of Direction from taffy in bevy_ui? What I did is just delete the code that used to be impl From<Direction> for stretch::style::Direction. Is that the right thing to do? Is Direction something that will need to be added back to bevy_ui after it is re-implemented in taffy?

Direction in this sense refers to text direction. IMO it's out of scope for a layout library. Bevy should implement its own type when it needs this.

That was about as painless as I could have hoped. @colepoirier have you verified that the UI examples all look okay with the newest changes?

Yes both look identical to the screenshots above for the bevy_ui on main.
ui

button

FYI I also removed the section for stretch in the deny.toml. I think that lies within the scope of this PR but I'd like confirmation. Please let me know if that is correct.

Direction in this sense refers to text direction. IMO it's out of scope for a layout library. Bevy should implement its own type when it needs this.

Since the flexbox algorithm depends on writing direction to determine start and end we will probably need to add a way to provide this again.

just tried a complex case that was running at 45 fps with stretch, I get 160 fps with this PR 👍


Fixed element positioning makes it impossible to edit pages from mobile

The page does not scroll. Only the very thin strip of the editor scrolls, and not enough to actually display anything more than a fraction of a line-height.
Perhaps the text-area needs a minimum height; otherwise, the fixed elements in the layout need to not be fixed-position.

This is definitely an issue with the Markdown Editor.  Perhaps the preview pane would be better if it became a right sidebar button on mobile.

Thanks for reporting @trwnh.
Assigned to addressed as part of the next feature release.

I've just pushed 865e8d4ec550041c22e087e1aca5c422fa93e99b which will try to force the markdown area size a little more. As a backup, it also adds a fullscreen toggle to full the view with just the core editing panes.
This will be released as part of v0.28, due at the end of the year. If you still have issues after that release feel free to open a new issue referencing this one.
Thanks again for reporting @trwnh.


[Android] Mopup display behind the CommunityToolkit Popup.

Replication Procedure:
1.Run the attached sample in android.
2.Click on the button.
3.CommunityToolKit Popup will appear.
4. Click the button in the Popup.
Actual behavior :
The Mopup will appear behind the the Popup.
Expected behavior:
The Mopup should appear above the Popup.
PopupWithMopup.zip

@AneesFathimaS out of curiosity why are you using 2 different popup solutions?
This is expected behaviour with the difference between them both.

Maui toolkit implementation uses androids native dialog interface/ feature. So that will behave like any other native dialog in Android.
Mopups on the other hand, just gets the current window (page), and overlays the popup on top of it - https://github.com/LuckyDucko/Mopups/blob/44b6af75795a974c45e69587be04b5c684f09db6/Mopups/Mopups.Maui/Platforms/Android/Impl/AndroidMopups.cs#L47C9-L49C48

So as you can see mopups essentially just alter the current window, whereas the toolkit opens a new dialog window above it, giving you the behaviour you are seeing.

duplicate of https://github.com/LuckyDucko/Mopups/issues/82


Add missing dependencies into ubuntu-20.04.md

Add missing dependencies into ubuntu-20.04.md
Sort dependencies alphabetically to easy reading and modifying

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/

recheck

Thanks for the PR!


[CLOSED] Truncate metadata values to 140 chars in document summary

 Issue by robmckinnon
Thursday 10 September 2015 at 13:11 GMT
Originally opened as https://github.com/alphagov/specialist-publisher/pull/559

Long metadata values take up too much space on the summary page if left untruncated. e.g. Tribunal decision's hidden_indexable_content field, which is the length of the entire document.

robmckinnon included the following code: https://github.com/alphagov/specialist-publisher/pull/559/commits

 Comment by robmckinnon
Thursday 10 September 2015 at 13:14 GMT

Truncated value examples below, number of lines vary depending on screen width:

 Comment by tommyp
Thursday 10 September 2015 at 14:24 GMT

Nice work with this, especially testing the special casing :+1:
Maybe we could make this change even simpler? Truncating at 140 will be fine for values of all the metadata across all the Specialist Document Formats. Plus, the less special cases we have in Specialist Publisher, the better. I think it's fine to reduce this PR down to
<%= truncate(value, length: 140) %>
. Does that sound reasonable?

 Comment by robmckinnon
Friday 11 September 2015 at 09:19 GMT

Changed pull request to truncate all metadata values over 140 chars, as suggested.

 Comment by robmckinnon
Friday 11 September 2015 at 09:02 GMT

Removing the special case makes sense. I'll make that change.


wluma: 2.0.1 -> 3.0.0

Motivation for this change
Updated the package version from 2.0.1 to 3.0.0. This is quite a significant update, adding support for using webcams as ALS, which, in turn, adds some additional native dependencies, for which the orkaround specified in https://hoverbear.org/blog/rust-bindgen-in-nix/ was utilized.
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

For some reason, compiling from the top-level (with nixpkgs-review, for instance) fails, due to libudev not being passed as an argument. I will attempt to solve this issue.

Result of nixpkgs-review pr 155059 run on x86_64-linux 1

1 package built:

wluma

Thank you for the contribution!


Switch AWS Regions To us-west-1

Migrating All Mountain-UI Related Infrastructure To California Servers (Bay Area)

Do we need to change the region in for S3 and Dyanmo too?

Not the templates but the app code if a region is declared yeah I'll change that


add destination_port filter

seems useful

Hey! May I help u with this one?

Do you mean as a matchArg selector in a policy? There's already a DPort and also a NotDPort as per selector operator types


how can i crop traingle and circle with this lib?

how can i crop traingle and circle with this lib?

@DevSmoo Use this method while setting the CropImage! You can't do a triangle shape.

setCropShape(CropImageView.CropShape.OVAL)

And watch out, it's broken with Android P.

Use this as alternative @melbic  @DevSmoo
.setCropShape(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P ? CropImageView.CropShape.RECTANGLE : CropImageView.CropShape.OVAL)

Thanks. Already did that workaround.

Cause: org.jetbrains.plugins.gradle.tooling.ModelBuilderService: Provider org.jetbrains.kotlin.gradle.KotlinDslScriptTaskModelBuilder not found
this issue is coming can you please help me to get out of this?


Common CI script: make all checks even in case of failures

This pull request makes openwisp-utils-qa-checks run all checks, even if some fail. The exit code's i-th bit represents whether corresponding check has failed or not. Here's a table of current checks' errors:

No.
Name
Raised at

0
checkendline fail
openwisp-utils-qa-checks:50

1
checkmigrations fail
openwisp-utils-qa-checks:61

2
flake8 fail
openwisp-utils-qa-checks:66

3
isort fail
openwisp-utils-qa-checks:71

4
No migration-path provided and --skip-checkmigrations option is not chosen
openwisp-utils-qa-checks:58

5
checkcommit fail
openwisp-utils-qa-checks:80

@nemesisdesign Thanks for the suggestions. I don't really understand why different exit codes are a bad idea, maybe because of the code complexity, but I don't actually think it's that complicated.
Anyways, I removed all exit code differences. Now if check is failed it will print out a message saying, that the check was failed and receive additional details  from an auxiliary program (e.g. checkcommit, flake8, etc) decribing the exact problem (well, the same as previously).

Thanks for the suggestions. The travis build failing isn't because of this commit, I noticed already at the start, it is caused by commit bc18f4a, you can see it in this master branch build.
Thank you for pointing out, that info message appear in some random way. I messed up && || statements, now it's fixed.
I also made some more simplifications, so the code would be simpler and easier to read. I also changed those info messages to something of your style (SUCCESS: and ERROR:)

@atb00ker I squashed the commits.
Don't really know why flake8 works flawlessly now. I guess, it might have something to do with ea84225 commit, though I'm not sure.
Also, for some bizarre reason coverage stalls for this PR every time. Not really vital here, but not very great.

Don't really know why flake8 works flawlessly now. I guess, it might have something to do with ea84225 commit, though I'm not sure.

I think it's not rebased to master. Can you please do that and check?

@atb00ker It seams, that the commit, that I'm talking about (ea84225) is on master branch.
I now know the reason why this happens. It is indeed because of that commit. I got to this by comparing my own travis build for my forked repo which failed and this repo's build which succeeded. They both ran the exact same commit. The only difference between them is that master branch of openwisp/openwisp-utils has a fix for flake8 in setup.cfg. I then looked into, how travis clones the repo. It executes following steps:
$ git clone --depth=50 https://github.com/openwisp/openwisp-utils.git openwisp/openwisp-utils
$ cd openwisp/openwisp-utils
$ git fetch origin +refs/pull/51/merge:
$ git checkout -qf FETCH_HEAD

As you can see it at first cloning master branch and then fetching PR's branch. I replicated these commands on my machine and I got the modified setup.cfg file! Then flake8, that is installed using pip presumably gets it config from that file. So it means, that commits on master indeed affect PR's builds.

@nemesisdesign Made minor fixes. Couldn't figure out how to rebase onto master, as I don't have write permissions. I also don't understand, why do we need to rebase at all if we're going to merge this commit anyways.

If you check your fork, it says This branch is 1 commit ahead, 2 commits behind openwisp:master. We want it to just say 1 commit ahead.  Rebasing on master means pulling the latest commits from openwisp:master into your fork and reapplying the commits that you made on top of the commits from openwisp:master.
Also, I noticed that you are making this PR from the master branch on your fork. Instead, you should be making a separate branch on your fork for the PR. Take a look here.
Everything else looks good to me. Good job! 👍

@dwang @nemesisdesign @atb00ker I successfully rebased on master. I agree, that having a descriptive source branch name is important, but changing the branch now will result in closing this PR, which is perhaps not a good idea. So I guess, the best and easiest solution is to just let the branch be waleko:master...

There's more small issues related to this topic: https://github.com/openwisp/openwisp-utils/issues?utf8=✓&q=is%3Aissue+is%3Aopen+openwisp-qa-check
It would be great to solve all of them so then we can go ahead and implement this check in all the modules.


Error reading files

Error parsing: while reading /example/customer.json
cannot read /example/customer.json (Error: ENOENT, open '/example/customer.json')
  in "resources/user.yml", line 5, column 18

My DIR structure
/root
 /example
   /customer.json
 /resources
   /user.yml
 /api.raml

```
in user.yml

```yml

displayName: Authenticated User
is: [ secured , item-not-found ]
type:
  item:
    exampleItem: !include /example/customer.json
get:
patch:
put:
delete:
/addresses: !include addresses.yml
/wishlist:
  is: [ secured ]
  type:
    collection:
      exampleCollection: !include /example/customer.json
  get:
  post:

```

try !include ../example/customer.json?

:thumbsup: That worked


Ensure the Cuda context is initialized correctly

As long as the setDevice is not called in a multi-thread environment.
This avoids having to call a cuda OpenCV function in the main thread before any multi-threads calls.
See #6086.

@jet47 Vladislav, could you take a look please?

this PR will be recreated because of CI issues


Refactored the main layout file: application.html.haml

Removed IE9 compatibility line
Moved common HTML tag over if-else
Use static .classes instead of :class =>
Replaced CFME with I18n.t('product.name')

@miq-bot add_label ui


Globus #71

Add:

File with the 'globus' scheme,
Globus Auth support (Globus class),
DataManager class,
explicit staging in/out,
a simple test that stages in a file with unsorted string from a Globus shared endpoint shared with 'public' to the 'UChicago RCC Midway' endpoint, sorts the strings on Midway, and stages out a files with sorted strings to go#ep1/~/,
extends data.rst (Data Management) to describe explicit staging with an example code cut out from test_data/test_explicit_staging.py

I'm not sure I completely follow this explanation. The total time for processing + waiting on staging will be the same, no?
Parsl can run tasks concurrently. I see an opportunity for DataManager to handle file staging in a smart way to minimize waiting time, startup time, etc. For example, DataManager can start a file transfer before a task that is in the middle of the worklfow requests it. Or, if many tasks (n) need a different file from the same Globus endpoint, all of the file transfers can be combined in one Globus transfer to avoid startup time for n-1 transfers.


For simple singleplayer use, How do i just simply enable flight?

I just want to be able to enable flight in survival without needing any special items needed or anything. just simply have it enabled for my solo world all the time. Do i just open the config file for survivalflight and change false to true? I'm not good with understanding scripts and such, so apologies if my question seems dumb.

change false to true

yup that will work
(the file you're looking for is config/SurvivalFlight/creative_flight.script).
in case you do wanna have conditions you can also just use it as a semi-normal config, i tried to make it simple.
(see the pinned issue "how do i use this mod" and just use the first bit without adding any brackets)


Add job to purge repo table of repos for the current course.   The use case would be for courses that are archived, and where we don't need an active cache of the repo information.

Add job to purge repo table of repos for the current course.   The use case would be for courses that are archived, and where we don't need an active cache of the repo information.

TODO: Setting the course to hidden automatically purges repos


Intellisense not recognizing a view

Issue Type: Bug
In the query editor, my view is not recognized as an existing item, and everything is underlined as error, although the query is correctly executed, when run.
Azure Data Studio version: azuredatastudio 1.19.0 (4095037f2578c23033867e611e82c13de114ca5a, 2020-06-11T22:06:05.429Z)
OS version: Windows_NT x64 10.0.19041

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4 x 2496)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
7.92GB (0.85GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (9)

Extension
Author (truncated)
Version

qpi
joc
0.1.6

admin-tool-ext-win
Mic
0.0.2

dacpac
Mic
1.5.0

managed-instance-dashboard
Mic
0.4.1

powershell
ms-
2020.4.0

query-history
Mic
0.1.0

azdata-sanddance
msr
1.3.9

schema-visualization
R0t
0.2.0

vscodeintellicode
Vis
1.2.1

@JumbaJookiba the IntelliSense schema suggestions come from a locally maintained metadata cache that is created when the query editor connection is established.  If the metadata is updated while the query editor is open it's possible for the cache to contain outdated info.  Please try running the Refresh IntelliSense Cache command from the Command Palette to rebuild the local cache on-demand.

Closing based on previous comment.  Refreshing the cache should update local metadata.  If that doesn't work diagnostic error reporting can be disabled in the user settings.


⚠ Bofrost.fr has degraded performance

In 815b02d, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1356 ms

Resolved: Bofrost.fr performance has improved in 3cb67ea after 11 minutes.


swagger-node-express's github now 301 redirects to here (swagger-api/swagger-node).

I'd create this as an issue on that repo, but I can't get to it and they were both belonging to swagger-api, so hopefully this is the right place to post this issue. The git repository link on the npm page for swagger-node-express does a 301 permanent redirect to this repository.
We are using swagger-node-express at work and seeing the repository disappear for it is disconcerting at best. Can we know what happened? Perhaps the repository can be put back? My understanding is that if the repository is now deprecated that npm deprecate is the right way to go about it.

Hi, the repository has been renamed and undergone a major revision.  You can still reach the old project under the 2.0.x tag

Can the original repository be put back? Maybe you didn't like it, but you had published an npm package using that repo and for it to disappear like that after people were relying on it is incredibly frustrating. I lost a lot of hours due to that.
If you don't want to support it anymore deprecate it or something, but simply removing the repository and now only having the code as a tag in a repository for another project is not the right way. We've now stopped using any swagger-api repositories at my job.

Hi, I'm sorry @Riobe.  We do have the repository still here, and every published code branch is in the tags area.  The most recent is here:
https://github.com/swagger-api/swagger-node/tree/v2.1.2
It is the same code repo, just renamed to something more intuitive.  Please comment here if you have more questions on this, I'd like to make the transition as easy as possible.

Having the repo renamed is the same thing as removing the old repo and making a new one. The fact that it is in the tags does not change the fact that the link https://github.com/swagger-api/swagger-node-express , which is linked to by https://www.npmjs.com/package/swagger-node-express no longer exists and should. You published something and people (at least my team) started relying on it and then it got removed.
The fact that the code is still hidden down in a commit tagged in a different repo does not make things better. I would have expected that if you wanted to make a differently named project, that would be a new repo. This is the first time I've seen an open source repo that was being used and had code published just get renamed and repurposed. Until that previous repository exists again I don't feel comfortable relying on any swagger-api projects when they can just be renamed, re-purposed, and effectively removed after I've used them in prod.
In the end, it's your projects and your control so do what you feel is best, obviously. You can close the issue if you want. I wish you the best with your work.

Sorry to hear you feel that way, but nothing has been removed, and nothing is lost. Some of it is how git works in general, and some how github works specifically. Versions are tagged, and no code is lost. It remains there. The renaming expresses the purpose of the new code. The redirect is just how Github functions. All directions to the old name would be redirected to the new one, and Github does that automatically. So you won't get a 404 on that. Projects advance and evolve, and yes, some links may go stale.
We could recreate the swagger-node-express project and add a README that points people to the specific last tag in this repository. I'm not sure there's real benefit here. We won't copy the code to that repository though as that doesn't make sense maintenance-wise. The project is not longer maintained, and new version replaces it. This is our vision on how we choose to improve the projects. The spec evolves too and is not 100% backwards compatible. Such is the life of software.
If you feel we could/should have made the process better, we do appreciate the feedback and hope to improve the process better. However, from that to the statement you've made it's a long way. We're not doing anything to harm anyone. On the contrary, we thrive to improve and provide better quality of work all the time. However, if you choose to not rely on our projects, as much as it saddens us, we'd respect your choice.

FWIW, I just spent an hour tracking down this info.
Further adding to the confusion npm info swagger-node-express returns a home page of https://github.com/swagger-api/swagger-node-express that does the 301 mentioned, and the readme for the new project doesn't provide any info on the old project or where to find it.
Also of note, the version returned in npm info shows a version of 2.1.3, but the last tag / package.json shows the old project is at 2.1.2. That leads me to assume I'm not actually on the correct repo yet.

Sorry @LeviRosol.  As noted before, we made some mistakes when making substantial upgrades to this project.  It was called swagger-node-express but the project was renamed to swagger-node, and completely rebuilt.
In hindsight, we should have kept the old repo around and made this a new one.  I'll take the blame (but it wasn't my choice).

No worries. It's all in the name of progress right?  :)
This may not be the ideal place to ask this question, so I'll keep as brief as I can. We've used this module in other projects, and prefer to document as we code vs using the generator that the master branch seems to promote.
Starting a new project, we of course used bits of older projects to get off the ground, including swagger-node-express and its spec in the route code pattern. My question is, what is the suggested pattern for using the new module within a project? Are there any blog posts on this topic that my google-fu doesn't seem to be finding?
I do dig the idea of self contained swagger documentation outside of actual code (what I'm inferring the new project promotes), however, since we not only use the swagger spec for swagger, but also for end point documentation in the code, we prefer to keep them together.

@fehguy, thanks for the history on the two projects.
I'm looking for documentation on using the new project for code-first API development.  We'd primarily like to use the package to generate our swagger docs from our api code like the previous package provided.
Has anybody come across these docs yet?
Thanks!!


Package not working with typescipt?

Hi all!
I'm trying to use this package from typescript like this:
import buildGetJwks from 'get-jwks'
const getJwks = buildGetJwks()

and when I try to compile the typescript code, I get the following error:
src/my-code.ts:7:21 - error TS2349: This expression is not callable.
  Type 'typeof import(".../node_modules/.pnpm/get-jwks@8.3.1/node_modules/get-jwks/src/get-jwks")' has no call signatures.

7     const getJwks = buildGetJwks()

node.js: 20.8.0 and 18.17.1
typescript: 5.2.2
pnpm: 8.8.0
Am I doing something wrong or is this module not compatible with either node 18/20 or typescript 5.2?
Please help me! Thank you in advance!

@gyszalai gyszalai can you share your tsconfig ?

@gyszalai can you share tsconfig from your project?

@gyszalai I was able to confirm that it works with:
node.js: 18.17.1
typescript: 5.2.2
pnpm: 8.8.0
The issue is somewhere on the application level, very likely in your tsconfig settings.

Hi @mristic505! Thank you for your help!
My tsconfig:
{
    "extends": "fastify-tsconfig",
    "compilerOptions": {
        "outDir": "dist",
        "sourceMap": true
    },
    "include": ["src/**/*.ts"]
}

I created my tsconfig according to the documentation of fastify-tsconfig:
https://github.com/fastify/tsconfig

Hi @mristic505! Thank you for your help!
My tsconfig:
{
    "extends": "fastify-tsconfig",
    "compilerOptions": {
        "outDir": "dist",
        "sourceMap": true
    },
    "include": ["src/**/*.ts"]
}

@gyszalai
I am able to confirm that get-jwks works with those simple tsconfig settings that you provided and with node 18.17.1 , typescript: 5.2.2 and pnpm: 8.8.0. Did you try to create a simple "Hello World" with a single index.ts file example to see if it successfully compiles? If you are able to make it work that way then you are very likely experiencing some other application level issues that are unrelated to get-jwks.

@mristic505 Thanks for your efforts!
Just created a small TS project with only one index.ts and I could reproduce the problem.
You can find the project here: https://github.com/gyszalai/get-jwks-ts-issue

Closing this issue due to our conclusion that it is not due to the package but due to application settings in the provided example. It works when using both require and import statements.
We are able to confirm that the package works with typescript.
Please open a new issue if you keep experiencing problem and you still think that it is due toget-jwks.

@gyszalai
Thank you for replicating the issue.
The problem disappears once you remove "type": "module" from package.json. If you are using this option only to enable ECMAScript import/export syntax, it will still work in your ecosystem with this option removed. In addition to this, I recommend using Node 18.18.0 since it is LTS.

@mristic505 thank you for your help!
btw, we use node 20 because it is a new app and node 20 will be LTS from October 24th.

For those who can't easily remove "type": "module" in package.json:
import buildGetJwks, { type GetJwksOptions, type GetJwks} from 'get-jwks`

type BuildGetJwksType = (options?: GetJwksOptions) => GetJwks

// type casting incantation avoids errors when using ESM
const getJwks = (buildGetJwks as unknown as BuildGetJwksType)({...})

It seems the issue is that TypeScript can't figure out the type of buildGetJwks when ESM is active. I guess the type declaration in the get-jwks.d.ts (reference below) is ignored on import buildGetJwks from 'get-jwks'.
get-jwks.d.ts: https://github.com/nearform/get-jwks/blob/main/src/get-jwks.d.ts -- if interface changes, BuildGetJwksType above should align with the type for buildGetJwks in get-jwks.d.ts.
If you call buildGetJwks several times, you may prefer to do something like const typedBuildGetJwks = buildGetJwks as unknown as (options?: GetJwksOptions) => GetJwks and use typedBuildGetJwks to avoid the type incantation on every call. Optionally put it in a module, export it, and then import typedBuildGetJwks wherever you need it.

@jmjf our earlier investigation suggested that this wasn't an issue with the package, but with the way it was being used. If you think it's instead an issue with the package and the typings, I'm happy to reopen the issue.

@simoneb
After a bike ride :), I tried this in the work project where I ran into this issue. That project is set up to use ESM, so "type": "modules", a ts-node/esm loader, etc.
I created two identical files, one named getJwks.mjs and one named getJwks.ts.
// getJwks.mjs and getJwks.ts
import buildGetJwks from 'get-jwks';
export const getJwks = buildGetJwks();

I ran each file with node --import tsnode.mjs, where tsnode.mjs loads ts-node/esm (avoids warnings about --loader; Node 20.8+ required).
// tsnode.mjs
import {register} from 'node:module'
import {pathToFileURL} from 'node:url'

register('ts-node/esm', pathToFileURL('./'))

When I run getJwks.mjs, it runs. When I run getJwks.ts it fails.
I think that says this is a TypeScript problem or an ESM + TypeScript problem.
So I thought, "Well, @fastify/jwt uses a default import and I get no problems from that. How are they doing it?" answer
So I hacked get-jwks.d.ts in node_modules, replacing the export default... with:
declare function buildGetJwks(options?: GetJwksOptions): GetJwks
export = buildGetJwks

Now both ts and mjs versions work. I didn't test CJS because ts-node/esm doesn't like CJS, so probably worth checking that this style of export doesn't break. OTOH, it works for @fastify/jwt and CJS, so will probably be fine.

@jmjf would you be so kind as to send a PR too? You've done all the heavy lifting already it seems :)

Sure. Will set that up this weekend. 🤗
On Fri, Jun 21, 2024, 12:32 Simone Busoli @.***> wrote:

@jmjf https://github.com/jmjf would you be so kind as to send a PR too?
You've done all the heavy lifting already it seems :)
—
Reply to this email directly, view it on GitHub
https://github.com/nearform/get-jwks/issues/242#issuecomment-2183071733,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AASIV6ZYT66G4ZDSUGUVQFLZIRIQ3AVCNFSM6AAAAABJV6J74WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGA3TCNZTGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

And I just saw this in Node Weekly.
https://arethetypeswrong.github.io/?p=get-jwks%409.0.1
Which reports the problem the PR should fix.
On Fri, Jun 21, 2024, 12:39 Jamee Mikell @.***> wrote:

Sure. Will set that up this weekend. 🤗
On Fri, Jun 21, 2024, 12:32 Simone Busoli @.***>
wrote:

@jmjf https://github.com/jmjf would you be so kind as to send a PR
too? You've done all the heavy lifting already it seems :)
—
Reply to this email directly, view it on GitHub
https://github.com/nearform/get-jwks/issues/242#issuecomment-2183071733,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AASIV6ZYT66G4ZDSUGUVQFLZIRIQ3AVCNFSM6AAAAABJV6J74WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGA3TCNZTGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

And arethetypeswrong agrees. 🥳
On Mon, Jun 24, 2024, 11:25 github-actions[bot] @.***>
wrote:

🎉 This issue has been resolved in version 9.0.2 🎉
The release is available on:

npm package https://www.npmjs.com/package/get-jwks/v/9.0.2
GitHub release
https://github.com/nearform/get-jwks/releases/tag/v9.0.2

Your optic
https://github.com/nearform-actions/optic-release-automation-action
bot 📦🚀
—
Reply to this email directly, view it on GitHub
https://github.com/nearform/get-jwks/issues/242#issuecomment-2186840123,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AASIV664MHHE7D357TEG7QLZJA25VAVCNFSM6AAAAABJV6J74WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWHA2DAMJSGM
.
You are receiving this because you were mentioned.Message ID:
@.***>


ensure written json terminates with a newline

closes #66

lgtm.

Published 5.3.0 :)

speedy! thanks :smile:


No buffering no peers no seeds

Hello, first thanks a lot for your work is amazing what are you doing with this proyect.
Here is my problem.
Some torrents that i try to stream are no working. Everything is ok until the buffer window, that give me 0 peers and 0 seeds.The i try with quasar or torrenter and works fine.
Hardware : Mi Box S
OS : Android Tv 8.1
Kodi 18.3
Movier Working log Elementum & Torrent 1
https://pastebin.com/N0k25fJZ
Movie Not Working Log Elementum &  Torrent 2
https://pastebin.com/cGPBBEdu
Thanks a lot.

I have done some more test, if the torrent has more than like a week everything works fine.
Not Working Log Elementum & Torrent with less than a week
https://pastebin.com/mEiBuwr8
Working Log Quasar & Same Torrent
https://pastebin.com/a4WJCuN1
Maybe is something wrong with some trakers?
Thanks.

O i did some more test.
From version 0.0.1.android_arm to 0.1.19.android_arm every torrent works fine
From version 0.1.20.android_arm to last release doesnt work sames torrents
Thanks

I don't see the problem since you provide only part of log file where you only add a torrent.

I have the same problem, i add the full log to check it. Thank and great job!!
https://paste.kodi.tv/uquzotumaw

@avssport I see there are no peers and no seeds.
I'd suggest:

Enable libtorrents logs, in Elementum settings, Bittorrent tab. Then re-run your test.
Provide any torrent file, that tried to download in Elementum. (You can find the path to it from Kodi log file, for example: Adding torrent from /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/plugin.video.alfa/videolibrary/temp_torrents_Alfa/cliente_torrent_Alfa.torrent

Strange it cannot find peers even with enabled DHT.
It happens with all torrents from Alfa plugin?
Or only some of them?

It only happens with torrents of Newpct1 channel the other channels works well, i go to try to re-run test as you explain and add the log. Thanks!

@elgatito i tried again from Windows with the same result, i add the log this time with libtorrents log, I hope that help you to fix the problem. Thanks!
https://drive.google.com/open?id=1i1jRqkTS7ziW1Gw9PE8DEczil6XF6f_I

@avssport actually does not see anything wrong in the log. DHT is working and libtorrent is trying to find any peers and it can't.
Does not know what to advise you, maybe it is a better question for libtorrent's maintainers...

@elgatito but with other torrent clients works well

@avssport I'm not a developer of libtorrent library. Elementum is using libtorrent 'as is'.

Closing as libtorrent is doing all the downloading.
To resolve magnets - DHT should be enabled and working, and should not be blocked by firewalls.


wormhole send crash zipping large directory

When sending a large directory containing video files (zip compression is pointless), wormhole crashes after raising ValueError: Can't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.
Full Output

main@box ~> wormhole send video_dir/
Building zipfile..
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1475, in gotResult
    _inlineCallbacks(r, g, status)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/wormhole/cli/cli.py", line 122, in _dispatch_command
    yield maybeDeferred(command)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python3/dist-packages/wormhole/cli/cmd_send.py", line 91, in go
    yield d
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python3/dist-packages/wormhole/cli/cmd_send.py", line 105, in _go
    offer, self._fd_to_send = self._build_offer()
  File "/usr/lib/python3/dist-packages/wormhole/cli/cmd_send.py", line 350, in _build_offer
    raise UnsendableFileError(errmsg)
  File "/usr/lib/python3.7/zipfile.py", line 1265, in __exit__
    self.close()
  File "/usr/lib/python3.7/zipfile.py", line 1798, in close
    raise ValueError("Can't close the ZIP file while there is "
builtins.ValueError: Can't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.
ERROR: Can't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.

Details:

magic-wormhole 0.11.2
Linux 4.19.0-12-amd64  SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux
Directory size: 51 Gb

@meejah Zipping a directory when sending it sounds like a bad implementation. What should be zipped instead are file names and ideally a --sync option should be given to have a functionality like rsync. Most people want to use wormhole when it's complicated to use scp/rsync or a transferring software.

I do agree with your assessment.
I'm personally going to be putting my effort (further) into the "next gen" transfer protocol (see e.g. https://github.com/magic-wormhole/magic-wormhole/pull/445 ) which won't use Zip at all and allows for multiple transfers, including in both directions. ("Dilation" itself also allows tons of other cool features, e.g. https://github.com/meejah/fowl )
This gives UI authors a ton more flexibility and honours the "hard work" of setting up the connection in the first place. If only I had infinite time ;)
Note that 0.13.0 did fix a problem with streaming that might make the above better. It was a minor change, but meant the receiving side buffered potentially a lot in memory.


Added labels to interactive visualiser (finos#568)

See screenshot below:

I've looked further into JSPlump and it seems that it doesn't provide an easy way of preventing overrides of labels out of the box. Will improve in a future PR but also would suggest utilising a different graph library for example D3

Looks cool and adds a lot of detail.
Some of the lines of text are very long and quite hard to follow; is there any way we could wrap (or even truncate with an on-hover expansion) text that goes over a certain size?

Adjusted styling slightly - however looking at perhaps using d3.js or other libraries:


fix: avoid creating PR if no modified files

PRs get created even though the branch is empty. This will avoid it.
See for example: https://github.com/ansys/ansys-api-dbu/pull/7

Another quick review - @ansys/pyansys-core ?


Avoid showing cms_pages twice in the product admin

If the user does not explicitly define the fields or fieldsets for their
product admin class, they will end up with the M2M widget for cms_pages
being displayed twice. This does not occur in our demo shops, because there we
explicitly set fieldsets. This commit changes the behavior of
CMSPageAsCategoryMixin so it removes the existing cms_pages field.

Jacob points out that we must of course also handle the case where cms_pages is not present in fieldsets. Also, we should provide a test before merging this.

Thanks @rfleschenberg for the hint! I used it to integrate this feature into upcoming version 0.9.2


Disable flag sorting for some commands

By default, flags are sorted alphabetically. However there are some
cases where it makes more sense to group related flags together,
like --label/--unlabel, --assign/--unassign or --draft/--ready.
Disable flag sorting in those cases.

I'm fine with it :)


Search box does not work

Hi,
Thank you for this great theme.
It seems that the search box does not work as expected.
From the debug console of Chrome, I see this error message:
Uncaught ReferenceError: base_url is not defined
    at main.js:93

This can be fixed by editing base.html to include the following:

after line 97 in base.html I'll open a pull request.

Thank you for your advice.
I merged the pull request. Now it works fine.


update kubestronaut profile

Register kubestronaut profile.

@huats to review this PR

Hello ! As explained in slack I will close that PR since I am doing the initial import of all Kubestronauts once a week. Thanks anyway !


Remap shortcut twice

I have the following config:
cmd - j : khd -p "cmd - c"
cmd - c : khd -p "- up"

I expect:

pressing cmd + j produces cmd + c
pressing cmd + c produces up

But actually both combinations cmd + j and cmd + c produces up.

The combination "cmd - c" event generated by "cmd - j" triggers your "cmd - c" bind, causing "- up" to be the end result.
khd is not really meant for remapping, but you can achieve the above with some tricky commands like below:
khd void_unlisted_bind off
cmd - j : khd -e "mode activate remap"; khd -p "cmd - c"
remap + cmd - c -> : khd -e "mode activate default"
cmd - c : khd -p "- up"

Thanks for so fast response! I tried that tricky snippet and it does not help. Pressing cmd - c still cause - up :(

It works perfectly for me.
Tested with an empty config containing nothing but this:
cmd - j : khd -e "mode activate remap";\
          khd -p "cmd - c";\
          khd -e "mode activate default"
remap + cmd - c -> : true
cmd - c : khd -p "- up"

Are there any errors reported in /tmp/khd.err or tmp/khd.out ?

I've just copy-pasted exactly the same config, restarted khd and pressed cmd - c once.
> cat /tmp/khd.out
Token_Modifier: cmd
Token_Literal: c
> cat /tmp/khd.err

My input cursor moved up.

pressed cmd - c once.

My input cursor moved up.

That's the expected behaviour.

I expect:

pressing cmd + j produces cmd + c
pressing cmd + c produces up

pressing cmd + j will perform a "normal" cmd + c.


can draw route after the httpserver started?

because i need dynamic draw the routes according user kind in the request

Can you please describe the use case in more detail?  In what situations would this be beneficial, and have you considered alternative ways to implement such functionality?

thank u for your response, the case actully i mentioned above. normally when client request come in, we need know the user kind or userType, then we can designed to give the user or client the functions..For example, a user type is the admin account, and this account must has the previlige of the function which can adding or deleting resource, and the normal userType not have the function. so here if the request come in, first get the user level, second draw the route to provide the functions. but the httpserver is still not started how can i get the userType in request.

Just my $0.02, but that doesn't sound like it drives any need to redraw the routes.
Instead, draw all of your possible routes prior to starting your HTTP server and then set up a filter within the controller functions to prevent unauthorized access.
There are many great existing filters out there, but I find that most of the time  something like
fooController.before("*", function (next) {
getUser() //in an appropriate fashion
if(user.access.is_not_appropriate) {
redirect("foo/error");
} else {
next();
}
}
fooController.someAction = function() {};
is really all you need.

yes your method can working, but that would write the same code in many controllers, and if the mount of the controllers is large, that would be result in copying many code in every needed controller and every needed controller need to execute the user type judgement code repeatedly, that would be result in  add the server's burden in theory。

Agreed, but most of the time the server is  started once as a static resource that sits in memory waiting for requests.  A server restart would only (normally; at least for web server instances) be restated due to a code change.  If I'm visualizing what you're suggesting it looks like you want to restart your server every time a user logs in.   This a) breaks sessions for all other visitors and b) is a much heavier load on the machine than having all of the code required to describe every use case.
You should however only write the filter once and call it as a prehook filter for all instances.

Here i still insist my suggestion what ever you are visualizing . According the mvc design theory, functions and need should following sever started. Your locomotive's mvc here change the sequence, since route is in need layer, and should not be before the sever started .Logic layer is often  dynamical as the request in dynamical web site. Here your drawing route function just like the server's setting function which is not in mvc design much like the server manege. Maybe this mistake can not be avoid in nodejs language for the server starting in its callback property.

Here i still insist my suggestion what ever you are visualizing . According the mvc design theory, functions and needs should following server started. The mvc in Your locomotive here changed the sequence, since route is in need layer, and should not be before the server started .Logic layer is often dynamical as the request in dynamical web site. Here your drawing route function just like the server setting function which is not in mvc design much like the server management. Maybe this big and large mistake can not be avoid in express of nodejs language for the server starting in its callback property.

pls change the structure of locomotive and  let the drawing route run after httpserver started to fit the mvc design logic and  prevent it from server setting.

Hi draw route should in mvc designing phase, not in http server setting phase. so I still ask u if can chang the order of the modules in everyone normal logical opinion
At 2015-05-19 14:43:34, "Jared Hanson"<EMAIL_ADDRESS>wrote:
Can you please describe the use case in more detail? In what situations would this be beneficial, and have you considered alternative ways to implement such functionality?
—
Reply to this email directly or view it on GitHub.

There's no logical motive behind dynamic route loading. Just use ACL/custom middlewares if you need to handle route existence on a per-user basis.
If the route is not supposed to exist for that user, send a 404.
I'm doing something in those lines, a custom middleware checking user type when a request is made on some controllers.
var _roles = ['USER', 'MOD', 'SU'];
module.exports.acl = function(minLevel) {
    return function(next) {
        if (!this.req.user) // note that I'm using passport.js for authentication
            return this.res.send(403);

        if (_roles.indexOf(this.req.user.type) < _roles.indexOf(minLevel))
            return this.res.send(404);

        return next();
    };
};

// And then in your controller
myController.before(['your', 'methods', 'to', 'protect'], function(next) {
     this.app._middlewares.acl('SU').bind(this)(next);
});

I think, from a ux perspective at least, that a naked 404  is probably less ideal that a custom 404 and routing the request to your error responder for the controller, from a headers perspective a 404 is great though.

ok, now i would be close this issue


k8s-infra: change file mode bits for sync script

Follow-up of:

https://github.com/kubernetes/registry.k8s.io/pull/146
https://github.com/kubernetes/test-infra/pull/28668

Ensure the script is executable.

Sync job is currently broken: https://storage.googleapis.com/kubernetes-jenkins/logs/gcs-to-s3-sync/1627707317417938944/build-log.txt
cc @dims @upodroid

/lgtm


[Node] Definitions for IDialogResult.resumed

The current implementation makes a guard over not defining the resumed property, so it should be optional in TS to avoid generating verbose code
before
session.endDialogWithResult({
  resumed: BotBuilder.ResumeReason.completed,
  response: true
});

after
session.endDialogWithResult({
  response: true
});

Hi @jmendiara, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

That's fair. I went back and forth over that. Depends on which way you're optimizing for. It actually is required but in practice no one ever fills it in so I'm ok marking it optional.

but in practice no one ever fills it

FYI: As we code our bot in Typescript, we MUST fill it to get transpilation working

No I agree... I can see how its annoying in typescript.


Broken links in README

What's the issue?
There're 2 broken links in the README.md which are not resolving to correct resources:

contributor guide: https://sigs.k8s.io/hydrophone/blob/main/CONTRIBUTING.md
filing an issue: https://sigs.k8s.io/hydrophone/issues/new

/good-first-issue

Hey @letmerecall  could you assign this to me?

Feel free to take it @UtkarshUmre
/assign @UtkarshUmre


Should not add go sources files in srcs of proto_library()

With a folder containing a BUILD file with a proto_library(), a proto file and a go file.
puku fmt adds the go source file in srcs of the proto_library().
Same with an explicit libKinds for proto_library with "nonGoSources": true.

I found an issue with custom kinds, however I've not been able to reproduce for the proto_library kind. I've raised a PR here to fix  the issue I found here: #60
Are you sure you're on the latest version of puku?

Yes, I'm using puku v1.0.0.
Here a repository that can reproduce it: https://github.com/sfirmery/puku_proto_issue
After plz run //tools:puku -- fmt //testproto/..., the proto_library() in testproto/BUILD contains the go source file in srcs.

After more tests, it seems to be related to the package name of the go source file that match the proto_library() name. If I change the go source file package name, puku no longer add it.

Hey! I think this is the same issue that I described here:
https://github.com/please-build/puku/issues/63
It's ambiguous to puku about which target to resolve the import to, as there are essentially 2 library targets in the package as far as puku understands. Let me know if that doesn't make sense and you'd like to re-open this issue.


Honor MatMomentDateAdapterOptions useUtc value

Modifies MomentDatetimeAdapter to honor the MatMomentDateAdapterOptions.useUtc value when creating the underlying moment.

I just started maintaining this project for the time being and merged the angular/v8 first. sorry for the conflicts - please take a look at the changes and fix them if this is still relevant for you.


(python) Update object finalizers and add keepalives

Borrows some wrapper updates from aries-askar, and replaces __del__ magic methods with finalizers.
Fixes #22

I cannot review the python code. I just tested this change on the test I'd created before for #22 and it passed without any error.
You can find my crude test code here: https://gist.github.com/conanoc/5a74b581c3ea70fdae17e490966b6128


intercept error 401 unauthorized from restangular response and redirect to login page

Hi. first of all, to thank the wonderful work you have done with this package, it has helped me a lot as a starting point for my projects and as a base structure for not getting lost in such convergence.
Like my question is a little silly, but do not know how to trap the error 401 unauthorized, when I make a request from restangunlar, after the token has expired, and then redirected to the login page. you could tell me how to do it ?.
thank you very much.

assuming you are using the Response Macros that are included in this starter you my have something like this:
if ( !\Auth::user()->is_verified ){
      return response()->error('Not Authorized', 401);
}

that'll return aan error so in your Restangular method you may have something like this:
this.API.all('clients').post(this.client).then((response)=>{
    this.ToastService.show('Succesfull post');
},(response)=>{
    this.ToastService.show('Unsuccessful post');
    if(response.error == 401){
        this.$state.go('app.login');
    }
})

Thank you very much for the reply. but there would be some way to implement an interceptor, to avoid having to put on each call restangular

in the API.services.js add:
if (response.status === 401) {
    return $state.go('app.login');
}

and remove the || response.status === 401 from the first if at line 15

thank you very much

Thanks @flick36 for the amazing help 😄


Dev mromano 0.5.0

Current coverage is 90.52% (diff: 100%)

Merging #33 into development will not change coverage

@@           development        #33   diff @@
=============================================
  Files                1          1
  Lines               95         95
  Methods             15         15
  Messages             0          0
  Branches            11         11
=============================================
  Hits                86         86
  Misses               9          9
  Partials             0          0

Powered by Codecov. Last update 92da0f5...29620ff


How to load remote server data source?

Hi, hyspace:
Could you tell me how to load remote server data source?
I CAN'T found the option of Typeahead method about remote data source.

@OuIChien This is not a support forum for typeahead.js.  Please close this at once and use appropriate sources like Stackexchange, etc.


Feeding document failed

I'm using Vespa HTTP Client  for feeding data.  But I always get the error message like this after feeding some documents:
Result received: 212000 (1 failed so far, 221989 sent, success rate 506.34 docs/sec).
How to deal with this issue? I have a lot of documents need to be indexed.

Probably one of your documents have an error. Do you consume the responses coming back from the client? See Result.getDetails etc.

I didn't consume the result yet. I'm following the guideline to work with command line. The error message does not happen on a particular document. It seems the Vespa cannot handle it.

Ok, if you use the command line the client is consuming it for you.
The "1 failed so far" means that one operation returned unsuccessfully.
You'll also see a line starting by "Failed: " which gives detail information about that document. What does it say?

This is error message:

Failure: Result for 'id:websearch:common::993908
1584366014104 Trace starting<PHONE_NUMBER>294 Asked about retrying for cluster ID 0, number of retries is 1
Detail:Detail resultType=FATAL_ERROR exception='A timeout occured while waiting for 'tcp/vespa-container:19101/chain.indexing' (179.996 seconds expired); Request timed out after 179.996 seconds.' endpoint=localhost:8080 ssl=false resultTimeLocally=1584366213294
1584366213295 Got detail: Detail resultType=FATAL_ERROR exception='A timeout occured while waiting for 'tcp/vespa-container:19101/chain.
indexing' (179.996 seconds expired); Request timed out after 179.996 seconds.' endpoint=localhost:8080 ssl=false resultTimeLocally=15843
66213294:Detail resultType=FATAL_ERROR exception='A timeout occured while waiting for 'tcp/vespa-container:19101/chain.indexing' (179.996 seconds expired); Request timed out after 179.996 seconds.' endpoint=localhost:8080 ssl=false resultTimeLocally=1584366213294
Mon Mar 16 13:43:35 UTC 2020 Result received: 485000 (1 failed so far, 492413 sent, success rate 564.09 docs/sec).

Ok, so it times out. Is it this one document (id:websearch:common::993908) always timing out?
Have you looked at what it contains? Maybe something that trips up the tokenizer?

No, it doesn't happen on a particular document. That happens in sometimes. I have tried with other feed data files. But this issue still happen. It's hard to monitor which one is failed when indexing a lot of document.
Do we have any solution to handling the issue when it happens

Possible causes of this are

you generally or intermittently have a lot of delay, due to some misconfiguration leading to full gc on intermediate nodes, very long queues, use of virtual memory or network issues.
some small subset of your documents take a very long time to process, perhaps triggering some tokenizatiomn issue or just being extremely large, and those have some probability of timing out.
some bug or condition I've never heard of before causes exactly 1 document to time out.

You should try to determine if it's 1. or 2. (or 3., but I'd say it's unlikely).
To do this, you could try to feed just a document that times out, and also investigate it.
You could also look at the average latency and the resource usage on your nodes.
If it's 1. you need to fix the issue, if it's 2. we might need to look at the behavior tokenizer and so on with this specific input. By the way, do you use a custom linguistics compnent?
It's also easy to try with a larger timeout, but I would probably want to determine the exact cause first.

Do you have any solution for monitoring Vespa during processing of indexing? I tried to split documents into small chunks but it still failed
The document failed is randomly.
I'm trying to gather all failed documents to reindex in another process.

You can setup monitoring and monitor the relevant metrics, see https://docs.vespa.ai/documentation/monitoring.html
I would start with just looking at the resource usage on the nodes though - are any at 100% cpu during feeding? Do you use virtual memory?
Also check the log on the containers your are feeding to - do they have full gc pauses? See https://docs.vespa.ai/documentation/performance/container-tuning.html if you determine you need to tune gc.


Suggestion

Really like the concept of the mod, however there are some endgame items and mods in my pack that I don't want to be obtainable using this. Would it be possible to add configuration for blacklisting single items and/or entire mods from appearing as loot?

I've added this in 1.3. I'll consider adding a tutorial/documentation later, it's a bit late to do right now. There is both mod-wide and individual item blacklisting, both data-driven, so it shouldn't be too hard to edit for your pack. I best get some sleep, so have a good day, and let me know if there's any problems, or if you need help with the files. 👍


[GHSA-963p-8hpc-884v] An issue was discovered in MISP before 2.4.176. app...

Updates

Affected products
Source code location
Summary

Comments
update vulnerable version range and the source code location.

Hi @MarkLee131, I was unable to find MISP in the Composer repository..  Could you please provide the link to the package in Composer or any of our other supported ecosystems?

👋 This pull request has been marked as stale because it has been open with no activity.  If you do nothing this pull request will be closed eventually by the stale bot. Please see CONTRIBUTING.md for more policy details.


feat: support k8s probes

Make sure that:

[x] You have read the contribution guidelines.
[x] You submit test cases (unit or integration tests) that back your changes.
[x] Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

This feature is mainly for helm and K8s deployment.
reference:

SpringBoot official: https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints.kubernetes-probes
CSDN(zh-CN): https://blog.csdn.net/boling_cavalry/article/details/106605264

Codecov Report

Merging #4567 (e466ff1) into master (9fbcf2a) will decrease coverage by 0.15%.
The diff coverage is 100.00%.

:exclamation: Current head e466ff1 differs from pull request most recent head 6ffd7ef. Consider uploading reports for the commit 6ffd7ef to get more accurate results

@@             Coverage Diff              @@
##             master    #4567      +/-   ##
============================================
- Coverage     68.94%   68.80%   -0.15%
+ Complexity     7737     7728       -9
============================================
  Files          1033     1033
  Lines         29577    29566      -11
  Branches       2673     2669       -4
============================================
- Hits          20392    20342      -50
- Misses         7586     7626      +40
+ Partials       1599     1598       -1

Impacted Files
Coverage Δ

...ava/org/apache/shenyu/web/filter/HealthFilter.java
100.00% <100.00%> (ø)

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


DBZ-7569 removed lombok code from debezium-testing-system

Ran the tests for downstream just in case, tests passed


3/3 Publish

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs-ref-autogen/network/traffic-manager/profile.pycliyml
:white_check_mark:Succeeded
View

docs-ref-autogen/storage/account.pycliyml
:white_check_mark:Succeeded
View

docs-ref-autogen/network/vnet-gateway.pycliyml
:white_check_mark:Succeeded
View

docs-ref-autogen/network/nic.pycliyml
:white_check_mark:Succeeded
View

docs-ref-autogen/network/local-gateway.pycliyml
:white_check_mark:Succeeded
View

docs-ref-autogen/network/nic/ip-config.pycliyml
:white_check_mark:Succeeded
View

docs-ref-conceptual/authenticate-azure-cli.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.