v4?

Hello.
We've implemented omnipay as v3 about 2 years ago now, and it works fine for the most part.
I was wondering if you were considering a new major version which would require a rework?
Things to consider:

The base Omnipay http client implementation uses a custom http client interface It would be entirely possible to simply move to PSR-18 along with http client discovery, and http-message-factory interfaces, thus allowing any framework to simply plug in an implementation, and dropping guzzle as a requirement.

This is a breaking change, as the client requirements would change along with the exceptions thrown.
I would propose also no default client to be added, instead by going along with what composer wants us to do simply require an implementation.
This would allow omnipay to completely decouple from http requests.

The gateways are created statically and sit in a "main" namespace, with logic that will create objects in a rather strange way

This should likely be just removed, instead the gateways should implement a main interface and sit in separate namespaces.
A "shared" main namespace could still be considered for official gateways.
The methods for gateways could be split into interfaces instead of an annotation, thus having a proper requirement of implementation on the gateway and allow someone to simply do a $gateway instanceof PurchaseGatewayInterface

No more setters/getters into infinity that are a hard requirement

By requiring php 8.1 or simply moving some of the logic elsewhere it would be possible to stop using the set/get pattern along with likely dropping the requirement for ParameterBag and by thus I believe the symfony-framework?
If still needed it would be wise to maybe consider an alternative, or simply store parameters in an array.

There's little to any input validation

I'm currently on implementing another gateway for our project and I noticed that barely anything typechecks, as omnipay was designed to work with... php5?

Updating language features

At a time like this it seems a good idea to jump straight to php8.1 allowing a greater freedom of choice and improving development experience. The project could also use an upgrade of all libraries in use (omnipay/tests still uses phpunit 6...)

Updating quality tools, ensuring templates and so on

As code evolves it would be a good idea to use phpstan, psalm and so on as quality assurance tools.

I agree with all the points!
I would add a couple of ideas:

Define better some terms like transactionId and referenceId, used ambiguously by different drivers, making them incompatible.
I'm pretty sure that, besides modernizing the API with types, it can be greatly simplified

At this point I've decided to create a custom solution which can benefit from proper php code instead of holding on to this legacy library. As omnipay is not exactly easy to integrate with something like symfony (and we ended up writing a ton of custom code and our custom gateways anyway) we're moving away from it. I'm not sure that creating an open source solution to match-all gateway needs makes sense, but if at some point later I decide it could be split into a library we might pull it out into an open source project as we've done with our previous 2 libraries.

I don't know how far I'll reach, but I'm going to start a little effort to propose a new major version: https://github.com/devnix-labs/omnipay-common/tree/add-static-analysis
I will consider your original ideas, but I would love to know more about your ideas and experiences two years later and after building a custom solution 😄

Thanks, I'll look into this

@devnix some suggestions then
everything as interface, generic gateway interface, but things like we hook/notification support should be optional interfaces instead of whatever it's right now with method annotations
use PSR for everything library wise, no more custom omnipay http client, assume a logger and PSR cache may be supplied (only setter method)
no more silly property requirements for requests to work
probably also only ever return requests for them to be sent explicitly by the implementation instead of omnipay in a hidden http client in request
require parameters explicitly for the gateway to work preferably in the individual implementation
no more stupid random factory and namespace requirement (it does literally nothing good) and I know it wasn't really a retirement but honestly it shouldn't even be there at all
there should be normalized exceptions for all generic gateway issues (not including http issues), for developers to simply implement
perhaps rework the line items as they were slightly cumbersome to use, make it easier to specify types of amounts (tax, product, total), get rid of the money library and replace it with something more modern, use integers for all numeric operations (only strings allowed should be in the api format itself)
add simple standardized phpunit abstracts you can use to bootstrap your tests (I'm not sure that was that easy last time I wrote a gateway)
all gateway management should be handled by the framework implementing it so the rest depends on how you handle that but you should have a setup simple enough to where it should be possible to simply hook in a setup gateway in a symfony application without maybe any but 1 additional class (something to contain the gateways)
a callback interface for handling certain actions like orders being rejected from notifications in gateways could be nice too
if you need more ideas hit me up


Add MODULE.bazel file

Add MODULE.bazel file

Thanks for the PR. Could you please briefly describe the purpose of this file in the commit message?

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

Comparison is base (7e6fca9) 59.60% compared to head (4205185) 64.35%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1059      +/-   ##
==========================================
+ Coverage   59.60%   64.35%   +4.75%
==========================================
  Files          19       13       -6
  Lines        2604     1930     -674
  Branches      914      699     -215
==========================================
- Hits         1552     1242     -310
+ Misses        712      492     -220
+ Partials      340      196     -144

see 16 files with indirect coverage changes

MODULE.bazel will replace WORKSPACE as I understand it - although I'm not super up-to-date on this migration as I haven't been working with Bazel much lately :/ I assume @Vertexwahn has a good reason for not deleting WORKSPACE immediately though, perhaps for compatibility with older Bazel. I'll improve the message when merging.


Shorten the symbolbuttons syntax

For example symbolbutton:
[ "\( \mu \)", "\mu", "mu", "symbol"]
to
[ "\( \mu \)", "\mu", "mu", "s"]
where
"s" means its symbolbutton and "q" means its default symbolbutton.
Maybe do not shorten "math" since that might break multiple existing TIM-documents.
Also add hybrid attribute "math,s", that means it goes to symbolbuttons and regular templatebuttons.

https://github.com/TIMath23/TIM/issues/168 Tää on kai sama


Animated GLB not loading in BabylonReactNative

Scenes will not load on device or emulator:
https://raw.githubusercontent.com/BabylonJS/Assets/master/meshes/alien.glb
https://raw.githubusercontent.com/BabylonJS/Assets/master/meshes/fish.glb
https://raw.githubusercontent.com/BabylonJS/Assets/master/meshes/alien.glb

At least 2 different issues:

shader compilation (glslang/c++ side) for alien.glb
missing sampling constants for fish.glb

Fix for fish.glb in babylonjs : https://github.com/BabylonJS/BabylonNative/issues/339
@RonnieAshlock alien.glb is listed twice. Do you have a 3rd .glb to check?

@syntheticmagus It asserts in glslang due to the traversers (it seems). Can you please take a quick look at trying to load alien.glb ?

@CedricGuillemet Thank you for catching that. I updated the list with the third GLB I tested that would not load. Apologies for the error.

https://raw.githubusercontent.com/BabylonJS/Assets/master/meshes/fish.glb
https://raw.githubusercontent.com/RonnieAshlock/TestAssets/master/GLB/ZeroGravity.glb
Related to the same fix in babylonjs regarding sampling modes.

Observations on this so far:

The assert was caused by an unhandled fall-through case in one of the traversers for types that are not considered either vectors or matrices; I have a fix for this in a branch.
Once this assert is resolved, it reveals another problem with the collision of attribute positions due to there being non-generic attributes which can be placed at positions after FIRST_GENERIC_ATTRIBUTE_LOCATION. This is not a complicated problem, but it's not completely clear to me what the right solution to it is; and since I'm pretty sure @bghgary already had this model working in an earlier version of Babylon Native, I want to ask him about it before trying naive things like simply increasing the FIRST_GENERIC_ATTRIBUTE_LOCATION variable.
Once the attribute collision problem is solved, the model still does not render correctly. It loads and it renders something, but the animation is clearly not functioning properly as the model's skin appears to fly off and contort before flying back to the correct positioning. This will require further debugging to understand and correct whatever's causing this behavior.

On latest master I am still seeing Alien.glb and fish.glb failing to load correctly on Android.  It appears that the model loads in correctly then hits a debug assert in GLSLang during shader compile.  If I run as release on windows the model loads correctly, so I am guessing this is a false positive assert.
The callstack from an Android debug session when trying to load alien.glb is pasted below.

I am able to repro. This is a platform-specific edge case that has to do with changing the types of uniforms at compile time; doesn't affect DX, but affects OpenGL targets and would likely impact Metal, too. Investigating how to fix.

Can not get this scene to load in either simulator or on device (Android). Removed the textures to simplify the material and it still fails.
To repro, load the following GLB in the BabylonReactNative demo app:
https://raw.githubusercontent.com/RonnieAshlock/TestAssets/master/GLB/trex_prowl_no_tex.glb

Taking a look at our SPIR-V generated shaders for android, we can see the attribute locations are a bit suspect:
"#version 310 es

uniform vec4 morphTargetInfluences[2];
uniform mat4 world;
uniform mat4 mBones[8];
uniform mat4 viewProjection;
uniform mat4 view;
uniform mat4 albedoMatrix;
uniform vec4 vAlbedoInfos;
uniform mat4 ambientMatrix;
uniform vec4 vAmbientInfos;
uniform vec4 vReflectivityInfos;
uniform mat4 reflectivityMatrix;
uniform vec4 vBumpInfos;
uniform mat4 bumpMatrix;
uniform vec4 vLightData0;
uniform vec4 vLightDiffuse0;
uniform vec4 vLightSpecular0;
uniform vec4 vLightGround0;

layout(location = 0) in vec3 a_position;
layout(location = 1) in vec3 a_normal;
layout(location = 2) in vec4 a_tangent;
layout(location = 10) in vec2 a_texcoord0;
layout(location = 13) in vec3 position0;
layout(location = 11) in vec3 normal0;
layout(location = 15) in vec3 tangent0;
layout(location = 14) in vec3 position1;
layout(location = 12) in vec3 normal1;
layout(location = 16) in vec3 tangent1;
layout(location = 8) in vec4 a_indices;
layout(location = 9) in vec4 a_weight;
out vec3 vPositionW;
out vec3 vNormalW;
out vec2 vMainUV1;
out mat3 vTBN;
out vec4 vColor;
layout(location = 4) in vec4 a_color0;

void main()
{
    vec3 positionUpdated = a_position;
    vec3 normalUpdated = a_normal;
    vec4 tangentUpdated = a_tangent;
    vec2 uvUpdated = a_texcoord0;
    positionUpdated += ((position0 - a_position) * morphTargetInfluences[0].x);
    normalUpdated += ((normal0 - a_normal) * morphTargetInfluences[0].x);
    vec3 _67 = tangentUpdated.xyz + ((tangent0 - a_tangent.xyz) * morphTargetInfluences[0].x);
    tangentUpdated = vec4(_67.x, _67.y, _67.z, tangentUpdated.w);
    positionUpdated += ((position1 - a_position) * morphTargetInfluences[1].x);
    normalUpdated += ((normal1 - a_normal) * morphTargetInfluences[1].x);
    vec3 _102 = tangentUpdated.xyz + ((tangent1 - a_tangent.xyz) * morphTargetInfluences[1].x);
    tangentUpdated = vec4(_102.x, _102.y, _102.z, tangentUpdated.w);
    mat4 finalWorld = world;
    mat4 influence = mBones[int(a_indices.x)] * a_weight.x;
    mat4 _136 = mBones[int(a_indices.y)] * a_weight.y;
    influence = mat4(influence[0] + _136[0], influence[1] + _136[1], influence[2] + _136[2], influence[3] + _136[3]);
    mat4 _158 = mBones[int(a_indices.z)] * a_weight.z;
    influence = mat4(influence[0] + _158[0], influence[1] + _158[1], influence[2] + _158[2], influence[3] + _158[3]);
    mat4 _181 = mBones[int(a_indices.w)] * a_weight.w;
    influence = mat4(influence[0] + _181[0], influence[1] + _181[1], influence[2] + _181[2], influence[3] + _181[3]);
    finalWorld = finalWorld * influence;
    vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0);
    vPositionW = vec3(worldPos.xyz);
    mat3 normalWorld = mat3(finalWorld[0].xyz, finalWorld[1].xyz, finalWorld[2].xyz);
    vNormalW = normalize(normalWorld * normalUpdated);
    gl_Position = viewProjection * worldPos;
    vec2 uv2 = vec2(0.0);
    vMainUV1 = uvUpdated;
    vec3 tbnNormal = normalize(normalUpdated);
    vec3 tbnTangent = normalize(tangentUpdated.xyz);
    vec3 tbnBitangent = cross(tbnNormal, tbnTangent) * tangentUpdated.w;
    vTBN = mat3(finalWorld[0].xyz, finalWorld[1].xyz, finalWorld[2].xyz) * mat3(vec3(tbnTangent), vec3(tbnBitangent), vec3(tbnNormal));
    vColor = a_color0;
}

"

Where we are skipping locations 3-7, and violating what gl is expecting by using index 16, causing shader compilation to fail, and BGFX subsequently throwing an assert:
https://github.com/bkaradzic/bgfx/blob/master/src/renderer_gl.cpp#L6443-L6466
Definitely something we're doing in the traversers. I'll investigate how we're parsing our attributes to get a good idea of what's happening to our location assignment.

Current //TODOs:
[ ] investigate OpenGL attribute slot assignment using the alternate codepath, are our attributes getting the expected slots assigned?
[ ] test changes to attribute assignment on Metal platforms (iOS)
[ ] add documentation to ShaderTraversers::getVertexVaryingsAndLocations to explain the change and why it was needed.

Currently pr #450 addresses the crashing associated with loading Alien.glb, and allows ZeroGravity.glb to load properly as well. Fish.glb is not a valid glb, with a few thousand errors related to skinning weights, which may explain why it currently fails to render in OpenGL.


NMAKE fatal error U1077 during rez-build

Running into a  syntaxerror when trying to rez-build in windows
Command: rez-build --install  (hello_world package)
Running: Windows 10, Rez 2.1.0
Error:
[100%] Generating py/python/hello_world.pyc
File "<string>", line 1
    'import
          ^
SyntaxError: EOL while scanning string literal
NMAKE : fatal error U1077: 'C:\Python27\python.EXE' : return code '0x1'

..and a couple of other nmake.exe errors return code 0x2
On my Linux boot everything runs perfectly. Not sure if its a rez issue specific to windows 10, nmake, vs or i just havent set my environment properly.
Edit: I should also mention that even after setting env variables i still had to replace 'cl' in the CMakeCache.txt in order to get it compiling.

Having the same problem using Rez 2.1.0 in Windows 7.
If I comment out the rez_install_* commands in the CMakeLists.txt file, I can get rez to build as long as I use the VS developer console.
Trying to run the rez_install_python command will result in this error.


AutowireCapableBeanFactory is not injecting beans via setters with @Autowired(required =false)

See this https://github.com/alek-sys/spring-security-native-issue/ repository for more details, short summary is: AutowireCapableBeanFactory is working differently in native / non-native apps when injecting beans via setters.
E.g. when a bean with a setter with @Autowired(required = false) is used, JVM version gets a bean injected, but native version doesn't.
For context, but kind of irrelevant: I noticed that while trying to compile Spring Authorization Server to a native image and found that OAuth2AuthorizationServerConfigurer gives different configurations in native / JVM setup. Basically this setter isn't called here and generated ID token is missing iss token claim.

It looks like what i suspected, the thing annotated is not exposed for reflection so the autowired annotation is not seen. At least I can fix your sample (thanks for that!) by including this on the SpringBoot application:
@TypeHint(
  types = AnotherBean.class,
  methods = @MethodHint(name = "setSomeBean",parameterTypes = SomeBean.class ))

I'm not a great fan of Autowireds somewhat 'hidden' in classes as we aren't really digging around for them that deeply. The other fix is to make AnotherBean an @Component. We need to work out the appropriate way to deal with this, hmm.

A similar fix for the real scenario would then be:
@TypeHint(types = OAuth2AuthorizationCodeAuthenticationProvider.class,
  methods = @MethodHint(name="setProviderSettings",parameterTypes=ProviderSettings.class))

What I've tried to do is fold that hint into Spring Native. If you try with a 0.9.2 release tomorrow it should pick it up - let me know if it doesn't behave (because I've not got the full setup to try it out) or you can use the hint above to workaround I hope.

Thanks @aclement! I'm not a fan of method / property injection as well, but I think it's fairly common in some apps, I've seen it at least a couple of times in Spring Secruity.
@TypeHint worked perfectly for my demo app, now trying that out with Auth-z Server.


release: 1.6.0

:robot: I have created a release beep boop
1.6.0 (2023-01-03)
Features

config: viper (c1002db)

Bug Fixes

build: remove viper build tag (224aef3)
remove errx (f498e80)

Performance Improvements

perfect code style (a5ca8be)
viper: use json iterator instead of std json (00225fa)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/starudream/go-lib/releases/tag/v1.6.0 :sunflower:


Compability with older Django and Python versions

Although I encourage dropping support for older versions of Python and Django, I find the requirement for Django-Axes to work only with Python 3.6 (according to CHANGES.txt) and Django 1.11 a bit extreme... specially since there are far more versions of Django that are still supported, as well as Python versions.
In my opinion, there should be at least a branch that supports these versions and get bugfixes (like #261). The project works fine with Python 3.5 so I don't see any reason not to add this version to Travis and support it.

Hey @camilonova, we're aiming at supporting older versions of Django and Python as long as they are supported by one of the Django releases. Let's re-add Python 2.7 support.

@joeribekker Could you help me out working on a branch adding the support? I'm aware of using some python 3 at the decorator and I'm not sure what else is needed.
Since I don't have much time to work on this I would prefer someone else to take it.

I pushed PR #258, #259 and #260 specifically to allow easier transition from 2.3 to 3 :sob: Not everyone can jump to python 3 right away — I wish I could — as a lot of Django apps are not ready for it yet.

Thanks for restoring support for Python 2.7.
Sorry to be a pain, but we should probably also restore support for Python 3.4 with Django 2.0 and follow the supported versions of Python that Django does as the standard. Pull request incoming...

Thanks for the quick fixes guys. Now to get through the upgrade guide :)


Add validation to check max k limit

Signed-off-by: John Mazanec<EMAIL_ADDRESS>Description
Similar to #159 but for k. This will return illegal arg exception instead of 500 for large k.
Check List

[X] Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #178 (6360bb5) into main (7ec463c) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main     #178   +/-   ##
=========================================
  Coverage     82.57%   82.57%
  Complexity      803      803
=========================================
  Files           117      117
  Lines          3586     3586
  Branches        338      338
=========================================
  Hits           2961     2961
  Misses          470      470
  Partials        155      155

Impacted Files
Coverage Δ

...java/org/opensearch/knn/index/KNNQueryBuilder.java
67.96% <100.00%> (ø)

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 7ec463c...6360bb5. Read the comment docs.


Bug: Route options filter didn't working

I think I found a bug in Route options Filter ..
Using codeigniter 4.0 latest release from composer repository ..
I have the following config on my routes.php

$routes->post('closed/auth', 'Closed\Auth::auth', ['filter'=>'coba']);

and have the following config on my filters.php

public $aliases = [  'coba' => \App\Filters\CobaFilter::class ];

and then on my CobaFilter.php under Filters folder

<?php
namespace App\Filters;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\Filters\FilterInterface;
class CobaFilter implements FilterInterface
{
public function before(RequestInterface $request)
{
die($request); // not executed
}
public function after(RequestInterface $request, ResponseInterface $response)
{
return $response;
}
}`

But if i have group routes config it just work .. i.e (routes.php):

$routes->group('closed', ['filter'=>'coba'], function($routes)
{
$routes->post('auth',  'Closed\Auth::auth');
});

I'm not quiet sure if this is a bug or just my mistake ..
i just follow the documentation page : https://codeigniter4.github.io/userguide/incoming/routing.html#applying-filters
Hope you guys find a solution for this ..

Does closed/auth actually route in your first example, and just the filter doesn’t run? Can you also turn off autorouting to be sure it’s matching your definition?

I couldn't recreate this bug. The filters in both cases work for me just fine.
Are you sure you're testing this with post request?

Does closed/auth actually route in your first example, and just the filter doesn’t run? Can you also turn off autorouting to be sure it’s matching your definition?

yes, closed/auth is routed to my controller perfectly with post request ..
it just the filter didn't work ..
in the example above I try to die($request) or die(var_export($request) execution to see if filter work before hitting the controller .. but before() function on my Filter didn't triggering at all ..
well i'll try to turn off autorouting to see if it working ..

I couldn't recreate this bug. The filters in both cases work for me just fine.
Are you sure you're testing this with post request?

yep, i am pretty sure that i send post request with my Postman ..

@gaibz
CobaFilter is run. Replace die($request);  with var_dump($request);exit;. Try again.
public function before(RequestInterface $request) {      var_dump($request);exit; }

@gaibz
CobaFilter is run. Replace die($request);  with var_dump($request);exit;. Try again.
public function before(RequestInterface $request)
{
     var_dump($request);exit;
}

die($request); will only exit and will not output anything.
Do you mean that the program has not exited?

yes i know die($request) will only exit and not output anything ..
but the problem is die() never firing in my case .. the script execution didn't stop at all ..

well, after all i guess  grouping routes
$routes->group('closed', ['filter'=>'coba'], function($routes)
{
    $routes->post('auth', 'Closed\Auth::auth');
});

is the best solution that work in my case  ..
Thanks all ..


diak.szigbp.hu

Szent István Gimnázium Budapest
https://szigbp.hu/
email: @diak.szigbp.hu

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

Hi, @philipto are there any updates? My student license is about to expire and I haven't heard back from the manual verification team yet either...
I think it is also worth noting that diak in the URL (diák when properly accented) means student in Hungarian and as such is used for student emails through Microsoft Office 365.
Thanks for your help!

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


divnet-rs analyses other than Shannon diversity?

Ryan,
Thanks so much for your work on this project, I am planning to use divnet-rs rather than DivNet on my large dataset.
Your instructions show how to calculate Shannon diversity from divnet-rs output, but DivNet itself also has other outputs. A typical DivNet output is:
An object of class 'diversityEstimates' with the following elements:
 -  shannon
 -  simpson
 -  bray-curtis
 -  euclidean
 -  shannon-variance
 -  simpson-variance
 -  bray-curtis-variance
 -  euclidean-variance
 -  X
 -  fitted_z

Is divnet-rs able to provide all of these results just like DivNet can, or only the Shannon diversity? If so, how can we access these other results?
I think I can at least get the Simpson diversity results by replacing DivNet::shannon_true with DivNet::simpson_true in your script 3_import_divnet_rs_data.R, but let me know if that assumption is not correct.
Thanks!

Hey, thanks for your question.
Calculating diversity measures
You can use the output from divnet-rs to compute other diversity measures than the one shown in the tutorial.  To do so, it goes something like this:

Calculate the diversity measure on replicate 0.  Rep 0 is the divnet diversity estimate for the actual data.
Calculate the diversity measure on replicates 1 - N, where N is the number of replicates you ran.  These relative abundances are the estimates for the bootstrap replicates.
Take the variance (or standard deviation) of the diversity values calculated in step 2.  These become your error estimates for the diversity estimate calculated in step 1.

You're correct in that you could swap simpson_true for shannon_true in that example.  There's nothing special about those functions though...in fact, you could calculate the either method yourself "by hand".  That specific example code could be adapted to use any diversity measure that takes a vector of relative abundances.
Getting the beta diversity is a bit more involved, but you can use the code here to guide you in calculating in the way the DivNet R package calculates diversity measures.
More info
In case you didn't see, here is a link to the documentation for divnet-rs.  Also, you may find this discussion on using divnet-rs output for breakaway and hypothesis testing.
Let me know if you have any more questions.  Thanks!!

Thanks, I was able to calculate the Bray-Curtis and Euclidean components of the DivNet output based on your response.

Ryan,
I got an email from someone requesting the code I used to calculate Bray-Curtis distance as addressed in this issue, so I posted it in my GitHub to share with them. I wanted to share it with you as well in case you would like to include it in future tutorials. Here it is: https://github.com/LTibbs/tardigrade_microbiome/blob/main/code/beta_diversity.R .
--Laura

Very cool, thanks for posting that here.  Truthfully, I haven't updated the docs yet, but I have been pointing people to the discussions on this and other issues, so I'm sure it will be helpful for future users!!  I will also edit the original issue post so it's more visible to people who come to this issue.
Thanks!!! :sparkles:


Manual upgrade project with JHipster v4.6.2

Use version at c4651225039ef1b5b993995efeae7421e96e2334

Codecov Report

Merging #59 into master will decrease coverage by 0.03%.
The diff coverage is 25%.

@@             Coverage Diff              @@
##             master      #59      +/-   ##
============================================
- Coverage     83.89%   83.86%   -0.04%
  Complexity      555      555
============================================
  Files            72       72
  Lines          1826     1828       +2
  Branches         95       95
============================================
+ Hits           1532     1533       +1
- Misses          264      265       +1
  Partials         30       30

Impacted Files
Coverage Δ
Complexity Δ

...rimaud/qualitoast/config/JacksonConfiguration.java
100% <ø> (ø)
3 <0> (ø)
:arrow_down:

...imaud/qualitoast/web/rest/util/PaginationUtil.java
85.71% <ø> (ø)
8 <0> (ø)
:arrow_down:

...st/security/PersistentTokenRememberMeServices.java
8.88% <ø> (ø)
1 <0> (ø)
:arrow_down:

...d/qualitoast/config/audit/AuditEventConverter.java
80.64% <0%> (-5.57%)
10 <1> (ø)

...github/pascalgrimaud/qualitoast/QualiToastApp.java
26.08% <0%> (ø)
3 <0> (ø)
:arrow_down:

...o/github/pascalgrimaud/qualitoast/domain/User.java
96.36% <100%> (+1.81%)
37 <1> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


Remove duplicate code

Signed-off-by: Lehner Florian<EMAIL_ADDRESS>This PR removes duplicate code.

It indeed looks like a duplicate but is intentional to handle double tagging of packets; see also https://github.com/iovisor/gobpf/pull/152
Maybe we should add a comment before the first if (h_proto == htons(ETH_P_8021Q) ... along the lines of
// While the following code appears to be duplicated accidentally,
// it's intentional to handle double tags in ethernet frames.

Added a comment: https://github.com/iovisor/gobpf/pull/164

I didn't know about this. Thanks for explaining and adding the comment in https://github.com/iovisor/gobpf/pull/164


Timeline Logging Duplicates of Operations

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
TensorFlow installed from (source or binary): source
TensorFlow version (use command below): 1.6.0-rc1
Python version: 2.7
Bazel version (if compiling from source): 0.11.0
GCC/Compiler version (if compiling from source): 5.4
CUDA/cuDNN version: 9.1/7.0
GPU model and memory: Tesla k80 (11441MiB)
Exact command to reproduce: python cifar10_train.py

Describe the problem
I used timeline to profile the time taken by each operation of the standard cifar10 model available in tensorflow/models repo. After looking at the logfile, it looks like logs of some of the operations are duplicated i.e. it looks like some of the operations in the graph are ran multiple times over the single run of the complete graph. For example, Operation "gradients/conv2/Conv2D_grad/Conv2DBackpropFilter" (link to logfile : https://gist.github.com/xilenteyex/d54305e0448e1aa3d878872c45b8ed3a#file-timeline-1-json-L2270) is logged multiple times. Is this some sort of bug or am I missing something?
Thanks a lot for looking into this issue!
Source code / logs
cifar10 example : https://github.com/tensorflow/models/tree/master/tutorials/image/cifar10
here is a the link to my modified version of cifar10_train.py in which I added logging :
https://gist.github.com/xilenteyex/b6fab3a5abdb65bf674aa7d0a4ec4b5c
one of the sample log files is : https://gist.github.com/xilenteyex/d54305e0448e1aa3d878872c45b8ed3a

Nagging Assignee @aselle: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @aselle: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@prb12, PTAL.

Nagging Assignee @prb12: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @prb12: It has been 30 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @prb12: It has been 45 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @prb12: It has been 60 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @prb12: It has been 75 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @prb12: It has been 90 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @prb12: It has been 105 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @prb12: It has been 120 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Any sort of Input is much appreciated.
Thanks!

Well, it's very hard to see what the problem might be from the "modified code" link you sent because the timeline capturing code is commented out in a way that obfuscates the original control-flow:
      #run_metadata = tf.RunMetadata()
      #count = 0
      while not mon_sess.should_stop():
#        mon_sess.run(train_op, options=tf.RunOptions(trace_level=tf.RunOptions.FULL_TRACE), run_metadata=run_metadata)
        mon_sess.run(train_op)
#        from tensorflow.python.client import timeline
#        trace = timeline.Timeline(step_stats=run_metadata.step_stats)
#        trace_file = open('timeline_%d_cifar10_cpu.ctf.json' % (count), 'w')
#        trace_file.write(trace.generate_chrome_trace_format())
#        count += 1

But... the fact that you create the tf.RunMetadata protobuf outside the loop and potentially reuse it many times means that you quite probably have merged a bunch of StepStats into the same protobuf.  The Timeline code would be very confused by this.
To debug, I would suggest writing step_stats to a file, or printing it out.  If there are numerous copies of the same step/ops in there then its not a timeline problem.
But first I would try making a new tf.RunMetadata object for each sess.run call, make sure you just trace a single step and only write the trace file once.
Failing any of those, I would suspect maybe something funny with the CUPTI library version and/or GPU driver-  but that seems very unlikely.

Hi @prb12 ,
Thanks for replying.
I am trying to understand logging in tensorflow in depth. I think cifar is slightly a bigger model to start with. Now, I am using a MNIST example. Script that I ran can be found (here). Following is the list of issues:

I made sure that run_metadata is called separately for every sess.run call. I am still seeing multiple entries for the same operation in the same thread . For example, op named "train/Adam/update_layer2/weights/Variable/ApplyAdam" is logged three times in pid = '11'. Does this really mean that my model is designed in such a way that it requires "train/Adam/update_layer2/weights/Variable/ApplyAdam" op to be executed three times for each sess.run call ? (step_stats can be found here and timline can be found here)

According to my understanding (please correct me, if I am wrong). There are 4 threads running on GPU, one is responsible for MEMCPYHtoD, one for MEMCPYDtoH, one for MEMCPYPtoP and one thread for execution of compute nodes. But, I see a lot of GPU streams in the timeline, is this just an artifact of timeline to enable it to be visualized in the timeline or it has some other significance ?

Also, reading ur comments, on other issues, I understand that the pid named : "/job:localhost/replica:0/task:0/device:GPU:0 Compute" just logs the time it takes to launch the kernel on the GPU. Actual execution time is logged in the streams named "/device:GPU:0/stream:* Compute". But after looking at the timestamps and the duration, it looks like "/job:localhost/replica:0/task:0/device:GPU:0 Compute" is actually logging the total time (kernel launch + actual compute node execution time on GPU) e.g.
for the op "train/Adam/update_layer2/weights/Variable/ApplyAdam", there is one entry in "/job:localhost/replica:0/task:0/device:GPU:0 Compute" (pid : 9) which starts at timestamp :<PHONE_NUMBER>160930 and ends at<PHONE_NUMBER>161023, but there are three entries in the pid : 11, named : "/device:GPU:0/stream:22 Compute". These three entries start and end with timestamps as follows:
(start, end)
(1536530947160982,<PHONE_NUMBER>160984)
(1536530947160999,<PHONE_NUMBER>161001)
(1536530947161016,<PHONE_NUMBER>161021)
All three of these have starting time after the start timestamp of "/job:localhost/replica:0/task:0/device:GPU:0 Compute" and ends before the end timestamp of "/job:localhost/replica:0/task:0/device:GPU:0 Compute". What does this really mean ? What does these gaps in these three timeslots show?
Also, what is the difference between two GPU streams "/device:GPU:0/stream:22 Compute" (pid: 11) and "/device:GPU:0/stream:all Compute" (pid: 7)

In pid: "5" named "/device:GPU:0/memcpy Compute", I assumed that it will only contain memcpy nvidia cuda operations. But, there is an op of type "Assign" in this stream. Is this the expected behavior ?

In order to log the time it takes to send a tensor from one one device to another, is it enough to look at the duration and timestamps of memcpy ops ? or do i need to enable logging of send/recv op nodes using the hack as discussed in this github issue ? If those memcpy ops report the correct times and we don't really need the hack to enable the send/recv ops. Is there a way to map MEMCPY ops to tensors ?

Also, whats the purpose of "/device:GPU:0/stream:* Tensors" and "/job:localhost/replica:0/task:0/device:GPU:0 Tensors" processes ?

Overall, for a given tensorflow graph, I am interested in creating a timeline programmatically (not UI, raw values), using which I can find the time at which an op (compute as well as communication op) started and the time it took to complete. Do you think tensorflow.timeline is the right way to go about doing this ?

P.S. : I am sorry, I know this is not a discussion forum and lack of documentation about usage and what each field represents about logging, I am unable to figure out how to use this exactly. I tried asking the same thing over stackoverflow a few times, but my questions remained unanswered. I am stuck at this for almost 3 months now. If you can clarify all these things, that wil be awesome!
Thanks a lot for looking into this.

@prb12 ,  it will be great if you can look into this.
Thanks!

Nagging Assignee @prb12: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @prb12: It has been 44 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @prb12: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

We see that you are using old version of Tensorflow which is officially considered as end of life, We recommend that you upgrade to 2.4 or later version and let us know if the issue still persists in newer versions .Please open a new issue in case you face any errors, we will get you the right help .Thanks!


Stairs when flipping schematics

When I flip a schematic the chairs in it keep their original orientation.
When I load the schematic:

When I flip the Schematic:

This may actually not be a bug. As weird as it may sound, this was (at the time) done this way to make it consistent with the rotation. Rotating the same schematic in a similar way would result in exactly the same end result, the stairs would not "flip" over.


fix: add type hint for public property name

Description

add type hint for public property name

All SDK Contribution checklist:

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

General Guidelines and Best Practices

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

Testing Guidelines

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

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-ai-ml


making text editors update on method click

Fixing a bug where the text editors were not updating to reflect the state of the app.
Also adding ids to TextFields to improve accessibility

these changes and the suggested fixes are included in the https://github.com/improbable-eng/Dragoman/pull/8


Changing rc0 from version

Removing rc0 from version as '_' character with it is causing issues in creating hubble binaries for debian systems.
Instead of rc versioning scheme, we should just bump up the minor version.

no, we need to be able to do rc versions and things. this is something that definitely did work previously. we had trouble with a '-' and now there's trouble with '_' ??
can we just say 4.5.0rc0 ? just no character?

no, we need to be able to do rc versions and things. this is something that definitely did work previously. we had trouble with a '-' and now there's trouble with '_' ??
can we just say 4.5.0rc0 ? just no character?

I don't understand why do we require 'rc' versioning. Can't we bump up minor version like '4.5.0' to '4.5.1' if different build/tag comes up ?


Changes in TRT to support TF-SSD-MN

tests in test_tensorrt.py ported to use relay VM

updates in tensorrt.py to offload dynamic shapes in TRT to VM

updates in tensorrt.py to run TF-SSD-MN

Thanks for contributing to TVM!   Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

@trevor-m @zhiics @anijain2305

@rohanmukh The CI is fixed now, could you please rebase and push?

@trevor-m @zhiics @anijain2305

Thanks @trevor-m , let me fix these

@trevor-m

@trevor-m @zhiics


won't install on 3ds

tried installing this through universal updater and by putting files for the game onto my sd card, neither option will work

mabey this is just an issue with my 3ds, however, not sure

It's not you. I believe that Universal-DB is configured to look for the 3DS file in the newest release. The newest release doesn't have a 3DS version.

It's not you. I believe that Universal-DB is configured to look for the 3DS file in the newest release. The newest release doesn't have a 3DS version.

Oh, that's not good. Try it now; I added the previous 3DS v2.1 to the latest release.


Wireframe

[x] Landing page: login/sign up
[x] User Dashboard page
[x] Application page: new/edit

Complete by Feb 4


⚠ Bofrost.be has degraded performance

In cd73acf, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1997 ms

Resolved: Bofrost.be performance has improved in e014409.


SEO improvements

We need favicons, and meta tags in head (og-image, etc.) It would also be neat to have social sharing icons for users to easily share this site on their social media platforms.

Morning @ethyl2 - I would love to take on this issue if it's still available
:)

@kera-cudmore, sure! That would be great!

There are some meta tags that will need further information adding to them as the site develops - such as an image to be displayed when shared to social media, and the deployed site URL.
Any meta tags containing content written in all capitals or a # will need updating. There are currently some comments to aid with items that still need further information adding, and these can be deleted once the meta tags are complete.


let user configure the support configs for workmgr

Signed-off-by: Wei Liu<EMAIL_ADDRESS>

/assign @JakobGray

/lgtm


add GHA support to dependabot

This PR add GitHub Actions support by dependabot

cc https://github.com/paritytech/ci_cd/issues/79

bot rebase

@dependabot rebase


Extending Self-Signed Certificate Lifetime documentation outdated

Bug description
The Extending Self-Signed Certificate Lifetime page mentions that envoy sidecars may be hot restarted. However, in #23922 there is a comment stating, that since Istio 1.5 envoy proxies are no longer hot restarted, which means the steps presented in the documentation are not up to date.
[x ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

Thanks, this is definitely wrong

@howardjohn  who should be the doc team to deal with the doc change. first assign it to you howard and you can assign back to other person who is reponsible for the doc change thanks

@istio/wg-security-maintainers

Assigned to @myidpt to triage.


Add unit tests for queries missing tests

The following PRs introduced queries, none of which provided unit tests for the query handling. They should be added.
https://github.com/astriaorg/astria/pull/1158
https://github.com/astriaorg/astria/pull/1189
https://github.com/astriaorg/astria/pull/1196
┆Issue Number: ENG-951

This issue is stale because it has been open 45 days with no activity. Remove stale label or this issue
be closed in 7 days.


BlendMode doesn't work on Neko and CPP

OpenFL version: 3.6.1
Lime version: 2.9.1
Affected targets: CPP, Neko ,Windows. Android

Hi the blandmode works only on flash target.

Observed behavior:
Expected behavior:

Looks like you're using a flixel project. Did you compile with -Dnext flag? Flixel by default forces the "-Dlegacy" flag so you need to use -Dnext to counteract it.

Hi , I usually use legacy on flixel. So is not supported in legacy mode anymore?

Some things never worked correctly in legacy. Legacy is still the default for flixel, though.

@thecocce It's been this way for a long time. There were certain things that legacy never could or would support, including blend modes. This is why we created next, so that we could eventually fill in these gaps and eventually make legacy obsolete.


"enable_recording and "disable_recording function

Hi
Very nice project !
I have been using for my Dahua cameras,  amcrest  intregration for a while but its very bad now, is it possible to implement
enable recording and disable recordning
Thank you in advance.
See link
https://github.com/home-assistant/core/blob/5c5e43afc127fe420f314c01ee2e78d347631adc/homeassistant/components/amcrest/camera.py#L39
i use it like this
  - alias: Camera Record on
    initial_state: 'on'
    trigger:
      - platform: state
        entity_id: alarm_control_panel.ha_alarm
        to: 'armed_away'
      - platform: state
        entity_id: alarm_control_panel.ha_alarm
        to: 'armed_home'
    action:
      - service: amcrest.enable_motion_recording
        data:
         entity_id:
          - camera.carport
          - camera.laundry
          - camera.kitchen
          - camera.living_room
          - camera.family_room
#
  - alias: Camera Record off
    initial_state: 'on'
    trigger:
      - platform: state
        entity_id: alarm_control_panel.ha_alarm
        to: 'disarmed'
    action:
      - service: amcrest.disable_motion_recording
        data:
         entity_id:
          - camera.carport
          - camera.laundry
          - camera.kitchen
          - camera.living_room
          - camera.family_room

Ack. I'll implement this as soon as I can get to it. Thanks for the great idea!

One clarification. Does this enable recording, like 24/7 recording? Or only enable recording on motion?
If it's only for motion this is already supported with the existing switch, see this image...

You can also use the service camera.enable_motion_detection and camera.disable_motion_detection

If that's not what you are looking for then I'll be happy to build in support for what you need.

One clarification. Does this enable recording, like 24/7 recording? Or only enable recording on motion?
If it's only for motion this is already supported with the existing switch, see this image...

You can also use the service camera.enable_motion_detection and camera.disable_motion_detection

If that's not what you are looking for then I'll be happy to build in support for what you need.

This enable recordning when there is motion.

How do you do this in the camera's UI? Are you using "Record Mode"?

I've added a new service: dahua.set_record_mode. It takes a mode, which can be:

On is always on recording
Off is always off
Auto based on motion settings

You can find it in the service explorer:

YAML would look something like this...
service: dahua.set_record_mode
target:
  entity_id: camera.server_cam_main
data:
  mode: 'On'

@JLFN did this work out for you?

Going to close this out. Please reopen if you have any issues.


Suggestion

So I have a suggestion: support for custom elements.
Because you can make custom elements in JavaScript. 😄

Isn't that already covered by https://caniuse.com/?search=custom elements, esp. https://caniuse.com/custom-elementsv1? Or do you mean something else?

Thank you!


Set overflow:hidden on a .card

When a card has a fairly large border radius, the background color can be seen outside of the card. Adding overflow:hidden to a card will fix this.
Here is an example with just changing the border radius of a card to 2rem instead of 0.25rem

Mac OSX - Mojave -- Safari 12.1.1 and Chrome 78.0.3904.70

overflow: hidden will break popups/dropdowns that are positioned with CSS only, which is potential backwards-compatibility issue.
IMHO if you are increasing border radius on card, you should tweak radius on card items accordingly.

Closing this per comment above and comments in PR https://github.com/twbs/bootstrap/pull/29644

This should be added because currently images at the top of a card will not reflect the rounded corners of the card (the docs make no mention of this).


[Help] OAuth2 Authentication using Moya

I am trying to do an OAuth2.0 Authentication using Moya and when I do the request I get 401 statusCode.
I created OAuthHandler:
import Foundation
import p2_OAuth2
import Alamofire

class OAuth2Handler {

    fileprivate let loader: OAuth2DataLoader

    init(oauth2: OAuth2) {
        loader = OAuth2DataLoader(oauth2: oauth2)
    }

}

/**
 The RequestRetrier protocol allows a Request
 that encountered an Error while being executed to be retried.
*/

extension OAuth2Handler: RequestRetrier {

    public func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) {
        if let response = request.task?.response as? HTTPURLResponse, response.statusCode == 401, let req = request.request {
            var dataRequest = OAuth2DataRequest(request: req, callback: { _ in })
            dataRequest.context = completion
            loader.enqueue(request: dataRequest)
            loader.attemptToAuthorize() { authParams, error in
                self.loader.dequeueAndApply() { req in
                    if let comp = req.context as? RequestRetryCompletion {
                        comp(authParams != nil, 0.0)
                    }
                }
            }
        }
        else {
            completion(false, 0.0)
        }
    }

}

/**
 The RequestAdapter protocol allows each Request made on a SessionManager
 to be inspected and adapted before being created.
*/

extension OAuth2Handler: RequestAdapter {

    public func adapt(_ urlRequest: URLRequest) throws -> URLRequest {
        guard loader.oauth2.accessToken != nil else {
            return urlRequest
        }
        return try urlRequest.signed(with: loader.oauth2)
    }

}

Then instantiating one SessionManager and setting its adapter and retrier
let sessionManager = SessionManager()
let oauthHandler = OAuth2Handler(oauth2: oauth2)
sessionManager.adapter = oauthHandler
sessionManager.retrier = oauthHandler

Then I am passing the sessionManager to my provider
provider = MoyaProvider<Endpoint>(manager: sessionManager)

Lastly, when I do the request I see that it is unauthorised:
provider.request(.endpoint1). { request in
            switch request {
            case let .success(response):
                print(response.statusCode)
            case let .failure(error):
                print("error")
            }
        }

But when I am doing it like this, I can see that the request is authorised :
sessionManager.request("Endpoint1 URL").validate().responseJSON { response in
            if let res = response.value {
                print(res)
            }
        }

I expect to have an authorised response in the end when I do the request from my provider, but I don't understand why this is happening.
Can someone help me figuring out how to do the OAuth2 Authorisation in Moya?

Have you ever used any of the Moya plugins before? That's how I do OAuth with Moya and it's much easier to use then what you have above.
There is a provided plugin Moya has for you to use just for this purpose

Thank you for your response 👍  @levibostian
Can you give me an example how do you do it in this case? Still, it is a bit unclear for me.

[Fixed] I forgot to add this to my Endpoit:
var validate: Bool {
     return true
}

Yeah, here is an example:
import Moya
import Result

public struct MoyaAppendHeadersPlugin: PluginType {

    public func prepare(_ request: URLRequest, target: TargetType) -> URLRequest {
        var request = request
        if let urlString = request.url?.absoluteString, urlString.hasPrefix(AppConstants.apiEndpoint) {
            if let authToken = UserCredsManager.authToken {
                request.setValue(String(format: "Bearer %@", authToken), forHTTPHeaderField: "Authorization")
            }
        }
        return request
    }

    public func didReceive(_ result: Result<Moya.Response, Moya.MoyaError>, target: TargetType) {
    }

}

Then, when you construct your MoyaProvider, you pass in an instance of the plugin which is explained in this doc

My example is a little more involved because what I am using the UserCredsManager that I created myself which is saying, "whenever the app has set the auth token in the keychain, use it. If it doesn't exist, don't append it" which allows me to not have to care about state of my app.

// You can use this Endpoint closure to add token with header
private let endpointClosure = { (target: MyAPI) -> Moya.Endpoint<MyAPI> in
    let endpoint = MoyaProvider.defaultEndpointMapping(for: target);

    switch target {
    case .createuser,.refresh: //don't add token for this paths
        return endpoint
    default:
        //If there is a token add a token to header
        return endpoint.adding(newHTTPHeaderFields:["X-Api-Token": UserCredsManager.sharedInstance.getUser()?.token ?? ""])
    }
}

If you want to retry your requests in case of failed request, try something like below
extension PrimitiveSequence where TraitType == SingleTrait, ElementType == Response {
    /// Tries to refresh auth token on 401 errors and retry the request.
    /// If the refresh fails, the signal errors.
    public func retryWithAuthIfNeeded() ->  Single<Response> {
        return self.retryWhen{ (e: Observable<Error>) in
            Observable.zip(e, Observable.range(start: 1, count: 3), resultSelector: { $1 }) //trying  3 times. You can change the number
                .flatMap { i in
                    return MyProvider.rx.request(.refresh(token: "abc")) //whatever your token endpoint for refreshing
                        .filterSuccessfulStatusAndRedirectCodes()
                        .map(Token.self)
                        .catchError {  error  in
                            if case MoyaError.statusCode(let response) = error  {
                                if response.statusCode == 401 {
                                    // Logout
                                    do {
                                        try User.logOut()
                                    } catch _ {
                                        logger.warning("Failed to logout")
                                    }
                                }
                            }
                            return Single.error(error)
                        }.flatMap { token -> Single<Token> in
                            do {
                                try token.saveInRealm()
                            } catch let e {
                                logger.warning("Failed to save access token")
                                return Single.error(e)
                            }
                            return Single.just(token)
                    }
            }
        }
    }
}

Use it like below
let disposeBag = DisposeBag()
let MyProvider = MoyaProvider<MyAPI>(endpointClosure:endpointClosure,plugins: [NetworkLoggerPlugin(verbose: true, responseDataFormatter: JSONResponseDataFormatter)])

MyProvider.rx.request(.allthings)
            .filterSuccessfulStatusCodes()
            .retryWithAuthIfNeeded()
        .map([Things].self)
        .subscribe(onSuccess: { response in
            print("Response")
            print(response)

        }) { error in
            print("Error occured")
            print(error)
        }
        .disposed(by: disposeBag)

Hey guys! I made a wrapper on TVDB API, and the API uses JWT token. This token expires after 24 hours. I managed to do the authentication and refresh the token automatically.
You can see more details here


Compile RSS XML then Full-text RSS Out not working

So I'm a bit new to Huginn so please excuse me if this is a 'doh' issue, but I've tried everything i can think of and can't get it to work.
So here's the issue. I'm trying to produce full-text rss feeds from a couple of sites. I used this wiki article Generating a filtered full-text RSS feed from an existing RSS feed minus the bit on creating a filter.
First I created a source agent that works well.
{
  "expected_update_period_in_days": "2",
  "url": "http://www.thenation.com/",
  "type": "html",
  "mode": "all",
  "extract": {
    "title": {
      "css": ".story h3 a",
      "value": ".//text()"
    },
    "url": {
      "css": ".story h3 a",
      "value": "@href"
    }
  }
}

Then I compiled the source into an RSS feed, which also works well.
{
  "secrets": [
    "nationrss1"
  ],
  "expected_receive_period_in_days": 2,
  "template": {
    "title": "The Nation RSS Feed",
    "description": "This is a feed of recent Nation articles, generated by Huginn",
    "item": {
      "title": "{{title}}",
      "link": "{{url}}"
    }
  }
}

The problem comes when I try to have a websiteagent fetch the full text from the previously compiled rss feed.
{
  "expected_update_period_in_days": "2",
  "url": "{{url}}",
  "type": "html",
  "mode": "merge",
  "extract": {
    "fullurl": {
      "css": "div",
      "value": "@articlelistlinks"
    },
    "fulltitle": {
      "css": ".article-header-content .title",
      "value": ".//text()"
    },
    "fullbody_text": {
      "css": ".article-body p",
      "value": ".//text()"
    }
  }
}

At this point nothing happens. When I try a dry run I get the following screen which doesn't really help me.

Does anyone have an idea of something I'm doing wrong or how I can fix this issue. I should also note that I've setup the example from the [wiki] (https://github.com/cantino/huginn/wiki/Generating-a-filtered-full-text-RSS-feed) and have the same problem at the same place. That is, when the agent is supposed to fetch the full text.

The reason you're not seeing anything in the dry run is because of the workflow. When you provide {{url}}, the agent will wait for the url from an incoming event. So in this case the dry run doesn't help.
What you can do, temporarily, is replace {{url}} in the WebSiteAgent with the url for an actual article. Then once you've played around and extracted what you need using the dry run, replace the article url with {{url}}, and everything should work as expected.
You can also test it out using the manual agent or just re-emitting an event from the RssAgent
It confused me when I first started using Huginn too... Where do you think we could add this nugget in the wiki?
Also, in your case, you can skip the step with the RssAgent, and it will still work

Thanks for the info and advise re: inserting a url directly instead of trying to debug with {{url}}. Using that method I was finally able to see that my real problem was that I needed more specific CSS selectors. It seems to be working now.


🐛 RHMAP-16889 Allow mongodb connection string to work without auth

This addresses the following error when using fh-db (via fh-mbaas-api)
for local development i.e. when FH_USE_LOCAL_DB is true:
    LOCALDB error Error: Incorrect format for database connection string.

The actual error & stack is captured here.
https://gist.github.com/david-martin/eb96556f07ef05d8441238e70983d197
The mongo string parsing function is making the assumption that there is
an @ symbol i.e. a user & password is specified before the mongodb
host.
The fix checks for the existense of the @ symbol before tyring to
split the string and use parts of it

SonarQube analysis reported 2 issues:

 1 major
 1 minor

Watch the comments in this conversation to review them.

Fixed by using auth (user:pass) in testing-cloud-app https://github.com/feedhenry/testing-cloud-app/pull/28. Closing this PR


[Hackathon] PSRule on PR

Description

Thank you for your contribution !

Please include a summary of the change and which issue is fixed.
Please also include the context.
List any dependencies that are required for this change.

Pipeline references

For module/pipeline changes, please create and attach the status badge of your successful run.

Pipeline

Type of Change
Please delete options that are not relevant.

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Update to documentation

Checklist

[ ] I'm sure there are no other open Pull Requests for the same update/change
[ ] My corresponding pipelines / checks run clean and green without any errors or warnings
[ ] My code follows the style guidelines of this project
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation (readme)
[ ] I did format my code

Closing since the functionality to run on the whole repo has been added already with a scheduled pipeline. PSRule on PR (running on diff) is currently being tested by PR #2830


[Feature Request] Nearby Pokemon Tracking

As is demonstrated in this fork of the main Python API:
https://github.com/leegao/pokemongo-api-demo/tree/simulation
If this feature is implemented in this API, it should be trivial to add an additional feature allowing users to scan for local Gyms and Pokestops.

I'm already working on it :)

Still a work in progress?

To start, what is pokemon_pb2 and how (assuming it is) is it implemented in this node adaptation?

@WhataShane if you checkout the first line of that file, you'll see Generated by the protocol buffer compiler.  DO NOT EDIT!
This file has been automatically generated by protobuf-compiler from the pokemon.proto file to provide a Python api to generate the proto buffers.
Instead, in this project protobuf.js is used for working with the Protocol Buffers datatype.

Thanks, that cleared things up.  I've been working on recreating raw_heartbeart line by line in Node and have a seemingly simple question, but I can't find the answer anywhere on the internet: what do the periods in the Python variable names mean?  For example, "m.f1 = ''.join(map(encode, walk))".

@WhataShane its referring to the member variable f1 of the m object?


Specify in XRv9K documentation that at least one dataplane interface is required.

If the XRv9k doesn't have at minimum one data-plane interface defined in the topology file, the bootstrap process will fail and infinitely loop meaning the node will not boot properly and can't be accessed via ssh.
This adds a callout in the docs for the xrv9k which specifies this requirement.
Should this be an 'info' or 'note' callout?

thanks @kaelemc
I changed it to the note admonition.


Hostname verification for VerifiedHTTPSConnection

I added SSL certificate hostname verification for urllib3. It requires backports.ssl_match_hostname though.
Current version accepts any valid certificate, which makes VerifiedHTTPSConnection insecure.

Hi there, thank you for the patch! Looks reasonable to me.
Would it be feasible to also add a unit test which shows that urllib3 fails on some condition without this patch but passes with it?
See:
https://github.com/shazow/urllib3/blob/master/test/with_dummyserver/test_https.py
https://github.com/shazow/urllib3/blob/master/dummyserver/server.py

\o/

Hmm, that would need a new set of test certificates as current crop doesn't seem to have common name in them. I think something like localhost would work, as in "success case" test would connect to signed "localhost" certificate and in fail it would connect to just <IP_ADDRESS>?

That sounds good. Adding test-specific certs should be easy enough, you can specify all the cert stuff in the HTTPSDummyServerTestCase inheriting class as static members.
I'm happy to accept your patch as-is but I would greatly appreciate it if you can take a crack at making the tests. I'm happy to help if you have a first take on it. :)
I plan to merge in your patch next weekend.

I'd love to see backports.ssl_match_hostname vendored in, myself.

Ah for some reason I assumed this was native Python, my bad. Yea, I guess I'll ping the author and vendor it in.

I am glad that my tiny project might be of help to urllib3!
But the code inside is not actually mine; it is cut-and-pasted from Python 3.2. So you can take the whole issue of my backports module out of the legal considerations entirely by installing Python 3.2, opening "ssl.py", and grabbing the function "match_hostname()" along with the helper function and exception that are sitting right above it. Paste it into a Python file in your project and you are done!
That way, I disappear from any license considerations: only the Python license stands in the way. It looks like you might have to include the one-line Python copyright message in the file where you paste "match_hostname()", along with a comment stating that you have kept that one function but thrown the rest of the Python distribution away. But once you have done that you will have stand-alone access to the function with no need for dependencies.
Does all this make sense?

Looking great. Thank you for this!
@mossman If you have the time to do this, could you write a quick README in the certs dir to explain how you generated those certs so that we can reproduce this later if necessary? :)
Thanks again!

Ok, done.
Should there be some documentation on the CA bundles as well when using ssl connections? There's no standard place for those. I just grabbed certs from http://curl.haxx.se/docs/caextract.html for my own urllib3-using api wrapper, which seems to work fine..


ConnectorNotFoundError

after running
npx create-next-app@latest --example https://github.com/auclantis/starknet-react/tree/main/examples/starknet-react-next
I tried to use the connect button and received ConnectorNotFoundError on the chrome console.
when I console log the error output from useStarknet, I'd get "could not activate Starknet" any idea what I'm missing here?

Fixed in version 0.6.2. Thank you for the report.


Bug: Missing relationships after updating

Another issues I came across after updating to 2.x and active-model-adapter.
My models have this example keys:
project: DS.belongsTo('project'),
folders: DS.hasMany('folder'),
asset: DS.belongsTo('asset'), // declared embedded in serializer

upon updating, both project and folders relations become empty as opposed to asset declared as embedded. It turned out that actve-model-serializer appends _id and _ids to the keys it expects in payload eg (project_id and folder_ids) which was not the case before updating. To workaround this, in my main application serializer I declared:
    keyForRelationship(relationModelName) {
        return relationModelName;
    },

I ran into this issue too. I was able to work around this by deleting the config.default_key_type = :name line from my active_model_serializer initializer in my rails app:
ActiveModel::Serializer.setup do |config|
  # Delete the following line
  # config.default_key_type = :name
end

What is the current naming convention in the current version of ActiveModelSerializers?

I'm happy to support this I just don't know which order we should prefer to look things up in.


Fixes top bar being shown only when page title is defined

When any top bar element is defined (title, icon, image, or menu), show top bar.

Thank you @pchemguy !


metadata-proxy: fix build problems, bump dependencies, bump version to 0.1.4

Without --no-cache, the apt-get update commands were being cached and not updating properly.

This change is

/retest

/lgtm
@ixdy We should probably use --no-cache for all images that install distro packages.

Superseded by https://github.com/GoogleCloudPlatform/k8s-metadata-proxy/pull/1.


Try it Out isn't working

Can't get try it out to work in any environment.

Closing this for now since it's an intermittent bug.
See #296 and poetapp/web#11


[Bug]: All modules wait for possible double-click events once one module has a double click event set

Checklist

[X] I have read the appropriate section in the contributing guidelines
[X] I believe this issue is a problem with polybar itself and not a misconfiguration on my part
[X] I have searched for other open and closed issues that may have already reported this problem
[X] I have checked the known issues page for this problem.
[X] I have followed the debugging guide to narrow down the problem to a minimal config.

Steps to reproduce

Start polybar with the provided minimal config
Click on the xworkspaces module to change workspace

Minimal config
[bar/main]
modules-center = clicker double-clicker

[module/clicker]
type = internal/xworkspaces

[module/double-clicker]
type = custom/script
label = "|DBLCLICKER|"
exec = echo "a"
double-click-left = notify-send 'Double Click'

Polybar log
polybar|notice:  Parsing config file: /home/zack/.config/polybar/config.ini
polybar|trace: config_parser: Parsing /home/zack/.config/polybar/config.ini
polybar|info:  Loaded monitor HDMI-0 (1920x1080+0+0)
polybar|info:  Configured DPI = 96x96
polybar|info:  Bar geometry: 1920x24+0+0; Borders: 0,0,0,0
polybar|trace: bar: Attach X event sink
polybar|trace: bar: Attach signal receiver
polybar|trace: controller: Setup user-defined modules
polybar|info:  Starting application
polybar|trace: controller: Main thread id = 1
polybar|info:  Starting module/clicker
polybar|info:  Starting module/double-clicker
polybar|info:  Entering event loop (thread-id=1)
polybar|trace: bar: Create renderer
polybar|trace: renderer: Get TrueColor visual
polybar|trace: renderer: Allocate colormap
polybar|trace: renderer: Allocate output window
polybar|info:  script_runner: Invoking shell command: "echo "a""
polybar|trace: renderer: Allocate window pixmaps
polybar|trace: renderer: Allocate graphic contexts
polybar|trace: renderer: Allocate alignment blocks
polybar|trace: renderer: Allocate cairo components
polybar|trace: renderer: Load fonts
polybar|warn:  No fonts specified, using fallback font "fixed"
polybar|trace: command: Waiting for pid 3592572 to finish...
polybar|trace: command: Exited with status 0
polybar|notice:  Loaded font "fixed" (name=Fixed, offset=0, file=/usr/share/fonts/X11/misc/7x13-ISO8859-1.pcf.gz)
polybar|info:  Bar window: 0x6600001
polybar|trace: bar: Reconfigure window
polybar|trace: bar: Set window WM_NAME
polybar|trace: bar: Set window _NET_WM_WINDOW_TYPE
polybar|trace: bar: Set window _NET_WM_STATE
polybar|trace: bar: Set window _NET_WM_DESKTOP
polybar|trace: bar: Set window _NET_WM_PID
polybar|trace: bar: Map window
polybar|trace: bar: Draw empty bar
polybar|trace: bar: Setup tray manager
polybar|info:  Disabling tray manager (reason: missing `tray-position`)
polybar|info:  module/clicker: Rebuilding cache
polybar|info:  module/double-clicker: Rebuilding cache
polybar|trace: bar: Force update
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(2 geom=203x24+859+0, falloff=0)
polybar|trace: bar: Received expose event
polybar|info:  module/clicker: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|info:  module/clicker: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|trace: bar: Received button press: 1 at pos(898, 14)
polybar|trace: Found matching input area
polybar|trace: controller: Queueing input event '#clicker.focus.3'
polybar|trace: controller: Dequeueing inputdata: '#clicker.focus.3'
polybar|trace: controller: Processing inputdata: #clicker.focus.3
polybar|info:  Forwarding action to modules (module: 'clicker', action: 'focus', data: '3')
polybar|info:  module/clicker: Requesting change to desktop #3
polybar|info:  Delivered action to 1 module
polybar|info:  module/clicker: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(2 geom=203x24+859+0, falloff=0)
polybar|trace: bar: Received button press: 1 at pos(870, 12)
polybar|trace: Found matching input area
polybar|trace: controller: Queueing input event '#clicker.focus.1'
polybar|trace: controller: Dequeueing inputdata: '#clicker.focus.1'
polybar|trace: controller: Processing inputdata: #clicker.focus.1
polybar|info:  Forwarding action to modules (module: 'clicker', action: 'focus', data: '1')
polybar|info:  module/clicker: Requesting change to desktop #1
polybar|info:  Delivered action to 1 module
polybar|info:  module/clicker: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(2 geom=203x24+859+0, falloff=0)
polybar|info:  module/clicker: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|info:  script_runner: Invoking shell command: "echo "a""
polybar|trace: command: Waiting for pid 3592576 to finish...
polybar|trace: command: Exited with status 0
polybar|info:  module/clicker: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|notice:  Received signal(2): Interrupt
polybar|info:  Eventloop finished
polybar|notice:  Termination signal received, shutting down...
polybar|trace: controller: Detach signal receiver
polybar|trace: controller: Stop modules
polybar|info:  module/clicker: Stopping
polybar|trace: module/clicker: Release sleep lock
polybar|info:  Deconstruction of module/clicker took 0 ms.
polybar|trace: module/double-clicker: Release sleep lock
polybar|info:  module/double-clicker: Stopping
polybar|trace: module/double-clicker: Release sleep lock
polybar|info:  Deconstruction of module/double-clicker took 0 ms.
polybar|trace: module/clicker: Deconstructing
polybar|trace: module/double-clicker: Deconstructing
polybar|info:  Waiting for spawned processes to end
polybar|info:  Reached end of application...

Expected behavior
The module should switch workspaces (or generally trigger the click event) immediately, since it has no associated double-click handler.
Actual behavior
The module waits for the length of the double-click interval, then processes the click listener.
Window Manager and Version
i3 version 4.19.1 (2021-02-01) © 2009 Michael Stapelberg and contributors
Linux Distribution
Linux Mint 20.2 Uma
Polybar version
polybar 3.6.1

Features: +alsa +curl +i3 -mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb -xrm +xcursor

Build type: Release
Compiler: /usr/bin/clang++
Compiler flags:  -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Wno-error=parentheses-equality -Wno-zero-length-array
Linker flags:  -Wall -Wextra -Wpedantic -Wno-error=parentheses-equality -Wno-zero-length-array  -Wall -Wextra -Wpedantic -Wno-error=parentheses-equality -Wno-zero-length-array

Additional Context / Screenshots
Likely related to #338

Good point!
We should only wait for the double-click interval, if the clicked area actually has a double click action.
PRs are welcome :)

I think I'll implement this :)


Feature add reset method

What type of PR is this?

/kind feature
What this PR does / why we need it:
I added reset service to reset resources.
Which issue(s) this PR fixes:

Fixes #26
Special notes for your reviewer:
/label tide/merge-method-squash

/assign @sanposhiho

/assign
/ok-to-test
/retitle Add reset service

@sivchari
Could you add the brief doc to this api.md?
https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/docs/api.md
/kind api-change

Thank !


Set-ScheduledTask shouldn't accept a plain text Password

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
Along with the common security rules and defined by e.g. PSScriptAnalyzer rule PSAvoidUsingPlainTextForPassword:

Parameter '$Password' should use SecureString,
otherwise this will expose sensitive information.
See ConvertTo-SecureString for more information.

Related: StackOverflow: Hide not the output but the actual command containing sensitive info in devops logs
Expected behavior
Have a [PSCredential] parameter instead
Actual behavior
Set-ScheduledTask accepts a plain text password ([[-Password] <String>])
Environment data
Name                           Value
----                           -----
PSVersion                      7.2.0
PSEdition                      Core
GitCommitId                    7.2.0
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals
No response

The cmdlet is not in the repository. Please use other channels to report the issue.

Right, I have passed the issue to the Microsoft Feedback Hub. Unfortunately I haven't good feeling that anything happens with it as I have sent feedback ([[AllowEmptyString()] for -Description in Set-LocalGroup/Set-LocalUser](https://github.com/PowerShell/PowerShell/issues/16049)) using this hub before but never seen any responses...

but never seen any responses

I could not find that your feedback on the Hub. Perhaps it is included in a collection? What title is there to find?

I used the same title as in here, the word ScheduledTask should bring it up.
(note that I left the backticks in the title)

I can not find. Probably because I am in Windows Insider program.

Thanks for checking, I have created another issue Outsider Feedback:

If this is also kept unnoticed, I will probably join the Insider program...

Ok, I am an insider now (I think it makes quiet a difference as I can't even find back my own issues I created as an outsider...)
I have logged 3 new issues as an outsider:

Outsider Feedback
Set-ScheduledTask shouldn't accept a plain text Password
[AllowEmptyString()] for -Description in Set-LocalGroup/Set-LocalUser

Being a Microsoft insider member now for about 3 weeks, I feel rather disappointed.
I moved 3 issues into the insider program, but haven't seen any seen any (human) response.
Maybe the cases are not interested enough for Microsoft, but even for that I would expect at least some acknowledgement of the issues.
Sorry, for putting my grief in this case but (also) dropping it the feedback hub feels useless...

Still no feedback at all on my Feedback Hub issues 😭.
I have copied them to the new Microsoft Feedback (web portal):

Windows-PowerShell: Add forum for Windows-PowerShell
Windows-PowerShell: Set-ScheduledTask shouldn't accept a plain text Password
Windows-PowerShell: [AllowEmptyString()] for -Description in Set-LocalGroup/Set-LocalUser


QA: db fix

should insert data into tables without error

/wallet 0x0e5F560BeFb98c109b463b4a17278eD6Af068d7D

TEST
should update wallet address
PASSED

/wallet 0x1F9FCc0E84dc2094499b848AE37Cd6a51db03Ff2

TEST
should insert to db tables accurately when analytics are enabled
FAILED

/help

From local console
ERROR (event): Checking user failed, error: {"code":"42703","details":null,"hint":null,"message":"column users.id does not exist"}
    Error: Checking user failed, error: {"code":"42703","details":null,"hint":null,"message":"column users.id does not exist"}
        at upsertUser

from mazmo
 UbiquiBot ERROR column users.id does not exist

TEST
should respond to some other commands correctly
PASSED

/query @web4er

/multiplier 0.7 @web4er "testing"

/wallet


Document security scope for extensions

Description
While  working on extensions there are many considerations for security, this document captures what those areas are as a way to discuss design approaches and codify the current state of affairs.
To approve this document means that we have agreement of areas and 'as-is' state of OpenSearch Plugins and Extensions. There are more details as to the phases of this document over time within the doc itself
Issues Resolved

Related https://github.com/opensearch-project/opensearch-sdk/issues/24
Related https://github.com/opensearch-project/security/issues/1895

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@opensearch-project/security @CEHENKLE @dblock @saratvemulapalli @dbwiddis What do you think of using a document like this for extensions security related features?

@opensearch-project/security @CEHENKLE @dblock @saratvemulapalli @dbwiddis What do you think of using a document like this for extensions security related features?

I think a template with a subset of important decision points similar to a document like this is a good idea once this document is ironed out.   This document can serve more as a guiding principle while extensions should complete the template with implementation specifics for that extension.

I've been doing some thinking about the integration of security, extensions, and versioning and think they all inter-relate a bit.  Tossing the following diagram and content which you might consider including in the scope document in some way.  Presently an outline, but each of the below bullet points should be fleshed out.  @peternied @saratvemulapalli interested in your thoughts on this.

API Controls
All of the below interactions will use the API/SDK interaction points as the primary means of enabling/enforcing the points below.

SDK will ensure Extensions identify themselves with a unique version which is permitted, Users authenticate appropriately, and requests are rejected if they would potentially harm the cluster

Security & Identity

The OpenSearch cluster is protected from improper use of its resources
Only authorized users have accesess to data that they need in their current role (RBAC)

Versioning

All components of the OpenSearch ecosystem (core, extensions) can be uniquely identified in a way that represents their features as well as code, dependencies, etc.

Extensibility

Code external to OpenSearch can communicate with OpenSearch via a defined API/SDK

Security + Versioning

Individual versions of extensions can be declared unsecure (alternately, extensions must be "approved" to be allowed) due to vulnerabilities

Security + Extensibility

Extensions need a common framework to communicate user identities to the API, including certificate stores, identity server, etc.

Extensiblity + Versioning

Semantic Versioning and feature sets should combine to provide compatible version ranges

Great questions @saratvemulapalli thanks for the feedback.

How do we protect inter-extension communication?

This sounds like a future-feature request.  For the moment, proxied via OpenSearch seems like the path, but there is much potential in this space.  When we consider adding this functionality I think it warrants an in-depth discussion.  Should we file an issue on this now to track, or is there another document that captures this?  I'm leaning on having this come back up organically instead of creating an issue we forget about.

How can we enable extensions to expose resources, perform authentication and authorization?

I'm not sure that we would implement all of these in this SDK.  For example in the identity space there is Open ID, I do not think that functionality would below in this SDK, as implementing the standard in a native plugin might be the better way.

I see across the docs, the assumption is that the communication based on REST API's. So far extensions are just built on transport(TCP). For security, if REST APIs are preferred we could weigh in pros and cons.

If we want to be security focused with extensions, I think we need to strongly consider moving to only communicate via REST API.  While there are likely trade-offs from existing functionality/perf, there are huge benefits to quickly onboard simple extensions written in python, rust, or golang.  Additionally, by limited communicates with an ephemeral connections we can be sure that authorization is granted at the time of a given request.  It creates a well defined trust boundary.  I've created https://github.com/opensearch-project/opensearch-sdk/issues/34 for additional discussion, as well as updating this doc in the COMSEC section.

I see this doc scope as security for plugins and extensions. What are we thinking for Security for OpenSearch?

This is a good callout, I'll start an effort to connect OpenSearch / Security as well as this doc together.

When we define scope, i believe it would be the time to define tenets we would want to stick to.

I like this in principle, but I am struggling to see how we could roll this out.  I don't think we have existing engineering tenets in OpenSearch, this might be exactly the time to create them.  This said I think that those will be documented in the OpenSearch codebase and I'd like to see about merging this change without them, how does that occur to you?

We did close: https://github.com/opensearch-project/security/issues/1895 in favor for this PR. I dont see the tactical items on the plate to execute for supporting AD as an extension. How do you want to take on this?

Thanks for bringing this up, after I merge this version of the document, there should be a fast follow for calling out the investigations and work that needs to be done to support Anomaly Detections feature set.  I'll reopen that issue and close it when this has been done.

@dbwiddis @saratvemulapalli how does this look in its current form?

I'm happy with it in it's current form.  We may tweak a few things in the future but it's a good working document at this point.
Good questions regarding REST and auth/security.  I think it's a solvable problem, and all these are implementation details rather than scope which the doc outlines.

We can use SSL/TLS for the REST APIs to encrypt and then use (initially) the existing security mechanisms (user/password, certificate based) while also enabling (future) identity/RBAC capabilities.

May consider whether to make this user configurable, e.g., force https by default/allow insecure opt-in.

In-process comms can still use the REST API; localhost avoids any network traffic
Inter-process comms we'll need to figure out how to register availability, push vs. pull, robustness to failures, etc.


Obey s3 backend skip_bucket_versioning flag

Simple patch to ensure that the s3 backend skip_bucket_versioning flag
is obeyed.

Sorry - meant to only carry this on my fork for the moment.


Implement TLS in Syslog so that remote logging can avoid using exits as proxies

https://docs.rs/syslog/4.0.1/syslog/fn.init.html

https://github.com/althea-mesh/althea_rs/pull/290


feat(cloudflare): use querystring and url from workerd

See https://github.com/cloudflare/workerd/releases/tag/v1.20241022.0
Do not merge this until workerd uses v1.20241022.0

Rebased after #340 got merged


Option to not show event indicators for all-day events

Mostly for holidays, the indicator will be persistent for the whole day if I don't want to hide that holiday calendar completely. I wish the I can check upcoming holidays in the flyout while not needing to get panic about having an event indicator on the icons.

Hi, Currently I'm not able to determine if event belongs "holidays" calendar.

@michalleptuch what I mean is to not show the indicator for ALL-DAY EVENTS, not limited to holidays, that's just for an example.

I may consider it, but it won't be a goal of the next major release.


fix(healthcare): remove use of client library in FHIR search

Part of fix for b/221324824. Our client libraries do not allow for FHIR GET/POST search requests to be set in the HTTP request path, which is required by the FHIR specification. Due to a bug, you can send search requests by specifying a resource type in the request body, but this is an anti-pattern. Until we fix the issue with the client library, we need to use the Go HTTP client to explicitly make GET/POST requests and not use the client library.
As part of this PR, since we're just using simple HTTP requests, we can have a separate sample for POST and a separate one for GET.

@codyoss @ericschmidtatwork Can we please up the priority on this? These fixes are for a broken sample.

Hi @telpirion, I think this was set to automatically merge and didn't mean to disregard your comments. I had a question for you in https://github.com/GoogleCloudPlatform/golang-samples/pull/2487#discussion_r836786403.


Billing > Subaccount generation endpoint

Some additional setups are required in the Stripe account used to run the tests in order to create sub-accounts (https://dashboard.stripe.com/settings/branding)


GPU memory leak

Hi,
Different from your implementation which use the weighs/ bias from nn.Linear layer, I write the tensor and forward as full functional style:
class Net:

	def __init__(self, n_class, device):

		# according to Pytorch w/b format, w = [out_dim, in_dim]
		# b = [out_dim]
		self.vars = [
			# [28*28, 512]
			torch.ones(512, 28 * 28, requires_grad=True, device=device),
			torch.zeros(512, requires_grad=True, device=device),
			# [512, 256]
			torch.ones(256, 512, requires_grad=True, device=device),
			torch.zeros(256, requires_grad=True, device=device),
			# [256, n]
			torch.ones(n_class, 256, requires_grad=True, device=device),
			torch.zeros(n_class, requires_grad=True, device=device)
		]

 	def forward(self, x, vars):
		"""

		:param x: [b, 1, 28, 28]
		:param vars:
		:return:
		"""

		vars_idx = 0

		# [b, 1/2, 28, 28]
		x = x.view(x.size(0), -1)

		# [b, 28*28] => [b, 512]
		x = F.linear(x, vars[vars_idx], vars[vars_idx + 1])
		# x = self.bn1(x)
		x = F.leaky_relu(x, 0.2)
		vars_idx += 2

		# [b, 512] => [b, 256]
		x = F.linear(x, vars[vars_idx], vars[vars_idx + 1])
		# x = self.bn2(x)
		x = F.leaky_relu(x, 0.2)
		vars_idx += 2

		# [b, 256] => [b, n_class]
		x = F.linear(x, vars[vars_idx], vars[vars_idx + 1])
		# x = self.bn3(x)
		# here follow by CrossEntroyLoss
		# x = F.leaky_relu(x, 0.2)
		vars_idx += 2

		return x

However, when I implemented the maml based on these form, I found my program will occupy more and more gpu memory, maybe memory leak.
I dnt know why, Could u say some experience of your guess?

I am sorry, I can't really comment on this since this is not how this was implemented here. But from my experience, I found that using a combination of modules and the functional API (as it is done for policies) was the simplest way to go.


adding Content-Security-Policy header

I noticed in the previous template this was implemented, but it needs to be added here. A way to implement it is using middleware, like here: https://github.com/kinngh/shopify-nextjs-prisma-app/commit/a7bb21a38d398c2e2b9c7c295ea729865ad59069. What do you think?

good point. I remember removing that but forgot to figure out where it should go. I will see if I can add it to some middleware, or you can open a pull-request and try to add it in

should be fixed with the latest commit.

Awesome! Thanks!