xyz

I want to change my orientation when I turn around and re-establish the xyz direction instead of the forever initialized xyz, what should I do?

@dthian can you help me for this ?

Hey @544531645, one possible solution is to encapsulate the items in your scene (the items you want to "Re-establish or reset" xyz direction) in a ViroNode instead. Thus you can rotate that root node and reset it to whatever the camera's current orientation is, thereby effectively achieving the above behavior.

in your scene (the items you want to "Re-establish or reset" xyz direction) in a ViroNode instead. Thus you can rotate that root node and reset it to whatever the camera's current orientation is,  how I can do this , can you give me a example ? @dthian

Hey @544531645, to encapsulate controls in a ViroNode, you can use the addChildNode api. . Here is a pseudo code example of how that might be done:
rootOrientationNode = new Node();
// Add all the items here that were in your scene so that they are now in reference to this node
rootOrientationNode.addChildNode(.....);
scene.getRootNode().addchildnode(rootOrientationNode);

You can then modify the orientation of the node to face which ever direction you want. In the above case, it sounds like you want to reset it to the camera's current orientation. You can get that with this api here. And then simply set the orientation on the rootOrientationNode.setRotation

@dthian you mean this method ? I use crash

I tell you I want show what ,when I create a 3d model , I will create a text in 3d model the right and top , should I gicve txt position is what , because the xyz is when open ar camera ,  when I create model in my right , I don't know how to give text location postiotn, don't know  do x+what or y-what etc

because the xyz created is when open ar camera , when I create model in my right, I don't know how to give text location position

So in AR, the origin of the world is determined when you first start your AR application - it will be where your AR Camera is. That is to say, when you first start your AR application, your AR camera is the (0,0,0) position of the world from which everything will be positioned in relation to.
Thus, for example, if you want to place your 3d model 1m in front of the user, 1m towards the right, and 1m vertically towards the top, you simply place your object with:
node.setPosition(new Vector(1,1,1));

When you do this, your node will be placed in front of the user, towards the right, and vertically 1 meter off the ground, in reference to the origin of the world. Remember that your origin is determined by the orientation / position of your ARCamera (or device view point) when you first start the AR app.
Hope that helps!

yes ,this I know , But example I first create a  A model position (1,1,1). then I want create the motel at  A model right , Wherever I move ， Can it be achieved  。 nomarl I do new Vector(position.x + 0.3f, position.y + 0.4F, position.z + 0.2f) ， when Facing the initial creation of the camera is the right direction，  but if first create A not (1,1,1). I turn back , create A (-1.-2.1), new Vector(position.x + 0.3f, position.y + 0.4F, position.z + 0.2f) will error

then I want create the motel at A model right , Wherever I move

Do you mean to create a new model (let's say model B) that is positioned to the right side of model A, such that it is always on the right side of model A, irregardless of wherever the camera moves?

nomarl I do new Vector(position.x + 0.3f, position.y + 0.4F, position.z + 0.2f) ， when Facing the initial creation of the camera is the right direction，

Where does the "position" variable come from? Does it represent the position of model A?
How are you setting it in code?
To what model (is it the second model that you are trying to place next to model A) are you applying the above new Vector to?

but if first create A not (1,1,1). I turn back , create A (-1.-2.1), new Vector(position.x + 0.3f, position.y + 0.4F, position.z + 0.2f) will error

To which object are you applying the "new Vector(position.x + 0.3f, position.y + 0.4F, position.z + 0.2f)" to? Is this onto the second model that you are trying to place next to model A?
What do you mean by "will error?"
Sorry, I can hardly understand what you are trying to explain above. Can you provide a video recording of the error?

I send the video to<EMAIL_ADDRESS>, you can check it  @dthian

Hey @544531645, thanks for sending the video. When you mention:

the video ,first show the userimage in right , second time not in right ?
By "userimage" do you mean the purple circle that is positioned underneath the shark model?

In the video this seems like there is a bug in your application in the positioning of the userimage purple circle. Can you share the code representing the construction of the subtree of the shark + purple circle + portal, and as well as how you are setting the new Vector above?

position is form ARHitTestListenerCrossHair,    shark create in postion , circle crate use      mTextNode.setPosition(new Vector(position.x + 0.1f, position.y - 0.06F, position.z));  I think my method is error , but how to create right vector , let circle at shark right and bottom

@dthian my method only I face the first open camera is work good

Hm, can you please share the code on how you are creating / parenting the subtree that includes your shark and the "userimage" circle?
The above approach does not work - with the given world space position from ARHitTestListenerCrossHair, you are attempting to place the "userimage" circle in world space - this only works for certain viewing angles this may work (like when you first open the camera), but as soon as your camera perspective changes, this will not work.
Instead of placing the "userimage" circle in world space, I recommend positioning it relative to the rotation of the shark (or the rotation of the parent node that rotates the shark). Thus, instead of using the position value from ARHitTestListener, you should just parent the node with the "userimage" circle geometry, under the shark node (or parent node containing the shark node, whichever does the rotation of the shark towards the user), with the "userimag" circle then placed at (0.1, -0.06, 0).
Thus, I think that would be the solution - please let me know if that doesn't work for you. If not, I need to see the actual code of how you are constructing the subtree of your shark + "userimage" circle.

I change code to              mProductModelGroup = new Node();        mProductModelGroup.setPosition(position);
mProductModelGroup.addChildNode(shark_model);
userimageNode.setPosition(new Vector( 0.1f,  - 0.06f,0));
mProductModelGroup.addChildNode(userimageNode);
no use , same before video

@dthian position is ARHitTestListener

@544531645, the above solution should have work. I've tried your code above by placing a red box at (0,0,0) under mProductModelGroup - notice that it always positions itself in front of the star, relative to the parent node.

Please verify that your shark model is at the origin (or (0,0,0) of it's parent node (in this case the mProductModelGroup. This is because both your shark and your userImage circle is parented and therefore placed in relation to mProductModelGroup. Thus, if the shark is not centered in mProductModelGroup, then it may look as if the userImage circle is "moving" around the shark (when actually what is happening is that the shark itself is "moving" around the origin of the mProductModelGroup).
If that doesn't work for you, I need to see your full code representing the node subtree where you have constructed and parented the shark so that i can help debug the issue.

Your method requires me to always look in the same direction and rotate it? This method doesn't help me, because I keep the shark facing me forever, so it's not always on the right, and I'm not only adding useriamge, but I'm also adding a lot around the shark on the left or on the right and so on, and I need to have a fixed position

private void createDroidAtPosition(final Vector position, final boolean with_User, Uri uri, final Message message) {
// Create a droid on the surface
mScene.getRootNode().removeAllChildNodes();
    mScene.getRootNode().addChildNode(root_node);

    if (object3D == null) {
        object3D = new Object3D();
    }
    if (object3D_animotion==null) {
        object3D_animotion = new Object3D();
        object3D_animotion.setShadowCastingBitMask(2);
    }
    hand_hint.setVisibility(View.GONE);
    if (mProductModelGroup == null) {

        mProductModelGroup = new Node();
        spotLight = new DirectionalLight();

        Vector vector = new Vector(0, 1, 0);
        spotLight.setShadowOrthographicPosition(vector);
        spotLight.setShadowOrthographicSize(0.5f);
        spotLight.setInfluenceBitMask(3);
        spotLight.setDirection(new Vector(0, -1, 0));
        spotLight.setCastsShadow(true);
        shadowNode = new Node();
        //   spotLight.setDirection(new Vector(0, -0.04, 0));
        spotLight.setIntensity(1500);

        spotLight.setShadowMapSize(2048);
        spotLight.setColor(Color.WHITE);
        spotLight.setShadowOpacity(0f);
        mProductModelGroup.addLight(spotLight);

        // Create a mock shadow plane in AR

        Surface shadowSurface = new Surface(2, 2);
        Material material = new Material();

        // material.setDiffuseColor(Color.parseColor("#00000000"));
        material.setShadowMode(Material.ShadowMode.TRANSPARENT);
        material.setLightingModel(Material.LightingModel.LAMBERT);

        shadowSurface.setMaterials(Arrays.asList(material));
        shadowNode.setGeometry(shadowSurface);

        shadowNode.setPosition(new Vector(0,-0.06,0));
        shadowNode.setRotation(new Vector((float) -Math.PI / 2.0f, 0, 0));
        // We want the shadow node to ignore all events because it contains a surface of size 20x20
        // meters and causes this to capture events which will bubble up to the mProductModelGroup node.
        shadowNode.setIgnoreEventHandling(true);

        mProductModelGroup.addChildNode(shadowNode);

        mProductModelGroup.setOpacity(1);

        mProductModelGroup.setScale(new Vector(0.9, 0.9, 0.9));
    } else {
        spotLight.setShadowOpacity(0f);

        mProductModelGroup.removeAllChildNodes();
        mProductModelGroup.addChildNode(shadowNode);
    }
    object3D_animotion.setLightReceivingBitMask(2);

    //  object3D.setRotation(new Vector(1,1,1));
    show_animotion =10;
    final float v = position.distance(mViroView.getLastCameraPositionRealtime());
    object3D_animotion.setPosition(position);
    object3D_animotion.setScale(new Vector(0.055f*v, 0.055f*v, 0.055f*v));
    EnumSet<Node.TransformBehavior> transformBehavior1 = EnumSet.of(Node.TransformBehavior.BILLBOARD_Y);
    object3D_animotion.setTransformBehaviors(transformBehavior1);
    object3D_animotion.setOpacity(0f);
    object3D.setOpacity(0f);
    load_ok =false;
    object3D_animotion.loadModel(mViroView.getViroContext(), Uri.parse("file:///android_asset/TX.vrx"), Object3D.Type.FBX, new AsyncObject3DListener() {
        @Override
        public void onObject3DLoaded(final Object3D object, Object3D.Type type) {
            object3D_animotion.setOpacity(1f);
            object3D_animotion.setLightReceivingBitMask(2);
            object3D_animotion.getMaterials().get(0).setLightingModel(Material.LightingModel.PHYSICALLY_BASED);
            object3D_animotion.getMaterials().get(0).setRoughness(0.30f);
            object3D_animotion.getMaterials().get(0).setMetalness(0.14f);
            com.viro.core.Animation animation = object3D_animotion.getAnimation("Take 001");
            animation.play();
            final Handler handler = new Handler();
            show_model=0;
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    show_model++;

                    if (show_model<11) {
                        ambientLight.setIntensity(1000);
                        if (object3D_animotion.getOpacity()>0.4f) {
                            object3D_animotion.setOpacity(1 - show_model * 0.15f);
                        }else {
                            spotLight.setShadowOpacity(0.68f);
                            object3D_animotion.setOpacity(0f);
                        }
                        if (load_ok) {
                            object3D.setOpacity(show_model * 0.1f);
                        }
                        handler.postDelayed(this, 100);
                    }else {
                        handler.removeCallbacks(this);
                    }
                }
            },800);
        }

        @Override
        public void onObject3DFailed(String s) {

        }
    });
    root_node.addChildNode(object3D_animotion);

    EnumSet<Node.TransformBehavior> transformBehavior =
            EnumSet.of(Node.TransformBehavior.BILLBOARD_Y);
    object3D.setTransformBehaviors(transformBehavior);

    mProductModelGroup.setPosition(position);

    if (kemoji_type.equals("banana_dance")||kemoji_type.equals("banana_tempt")){

        object3D.setScale(new Vector(0.028f*v, 0.028f*v, 0.028f*v));
    }else if (kemoji_type.equals("bama_respect")||kemoji_type.equals("bama_mindful")){
        object3D.setScale(new Vector(0.044f*v, 0.044f*v, 0.044f*v));

    }else if (kemoji_type.equals("apple_spin")||kemoji_type.equals("apple_thinking")){
        object3D.setScale(new Vector(0.028f*v, 0.028f*v, 0.028f*v));

    }   else  {
        object3D.setScale(new Vector(0.038f*v, 0.038f*v, 0.038f*v));

    }
    object3D.setPosition(new Vector(0,0,0));
    mProductModelGroup.addChildNode(object3D);
    root_node.addChildNode(mProductModelGroup);
    //  mScene.getRootNode().addChildNode(object3D);
    // Load the Android model asynchronously.
    object3D.loadModel(mViroView.getViroContext(), uri, Object3D.Type.FBX, new AsyncObject3DListener() {
        @Override
        public void onObject3DLoaded(final Object3D object, final Object3D.Type type) {
            load_ok =true;

            hand_hint.setVisibility(View.GONE);

            com.viro.core.Animation animation = object.getAnimation("Take 001");
            animation.setLoop(true);
            animation.play();
            object3D.setLightReceivingBitMask(2);
            object.getMaterials().get(0).setLightingModel(Material.LightingModel.PHYSICALLY_BASED);
            object.getMaterials().get(0).setRoughness(0.30f);
            object.getMaterials().get(0).setMetalness(0.14f);
            //object.getMaterials().get(0).setLightingModel(Material.LightingModel.BLINN);

            if (with_User) {
                if (message != null){

                    if (message.isIsAnonymous()&&message.getOriginalSender()!=SharedPreferencesKey.getinfo(getActivity()).getId()){
                        user_image.setVisibility(View.VISIBLE);
                        user_text_image.setVisibility(View.GONE);
                        user_image.setImageResource(R.drawable.defalut_image_anoymous);
                        showModle(position);
                    }else {

                        avatarUrl =message.getAvatarUrl();
                        List<Contasnts> telFirend = SharedPreferencesKey.getFirend(getActivity());
                        if (telFirend!=null) {
                            for (int i = 0; i < telFirend.size(); i++) {
                                if (message.getFrom() == telFirend.get(i).getId()) {
                                    avatarUrl = telFirend.get(i).getAvatarUrl();
                                    break;
                                }
                            }
                        }
                        if (TextUtils.isEmpty(avatarUrl)) {
                            user_image.setVisibility(View.GONE);
                            user_text_image.setVisibility(View.VISIBLE);
                            user_text_image.setText(message.getFromname().charAt(0) + "");
                            showModle(position);
                        }else {

                            user_image.setVisibility(View.VISIBLE);
                            user_text_image.setVisibility(View.GONE);
                            ImageLoader.getInstance().displayImage(avatarUrl, user_image, new ImageLoadingListener() {
                                @Override
                                public void onLoadingStarted(String s, View view) {

                                }

                                @Override
                                public void onLoadingFailed(String s, View view, FailReason failReason) {
                                    showModle(position);

                                }

                                @Override
                                public void onLoadingComplete(String s, View view, Bitmap bitmap) {
                                    showModle(position);

                                }

                                @Override
                                public void onLoadingCancelled(String s, View view) {

                                }
                            });

                        }
                    }
                }else {

                    if (((notification_json.getNotificationType().equals("anonymous_message"))&&Integer.valueOf(notification_json.getOriginalSender())!=SharedPreferencesKey.getinfo(getActivity()).getId()) || notification_json.getNotificationType().equals("minigame_mentioned") || (notification_json.getNotificationType().equals("minigame_friend_mentioned"))) {
                        user_image.setVisibility(View.VISIBLE);
                        user_text_image.setVisibility(View.GONE);
                        user_image.setImageResource(R.drawable.defalut_image_anoymous);
                        showModle(position);

                    } else {
                        user_image.setImageResource(R.drawable.default_profile);
                        if (TextUtils.isEmpty(avatarUrl)) {
                            List<Contasnts> telFirend = SharedPreferencesKey.getFirend(getActivity());
                            if (telFirend!=null) {
                                for (int i = 0; i < telFirend.size(); i++) {
                                    if (notification_json.getFrom() == telFirend.get(i).getId()) {
                                        avatarUrl = telFirend.get(i).getAvatarUrl();
                                        break;
                                    }
                                }
                            }
                            if (TextUtils.isEmpty(avatarUrl)) {
                                user_image.setVisibility(View.GONE);
                                user_text_image.setVisibility(View.VISIBLE);
                                String name = null;
                                for (int i = 0; i < telFirend.size(); i++) {
                                    if (notification_json.getFrom() == telFirend.get(i).getId()) {
                                        name = telFirend.get(i).getFirstName() + telFirend.get(i).getLastName();
                                        break;
                                    }
                                }
                                if (TextUtils.isEmpty(name)) {
                                    name = notification_json.getContents().getSenderX().getUsername();
                                }
                                user_text_image.setText(name.charAt(0) + "");
                                showModle(position);

                            } else {
                                user_image.setVisibility(View.VISIBLE);
                                user_text_image.setVisibility(View.GONE);
                                ImageLoader.getInstance().displayImage(avatarUrl, user_image, new ImageLoadingListener() {
                                    @Override
                                    public void onLoadingStarted(String s, View view) {

                                    }

                                    @Override
                                    public void onLoadingFailed(String s, View view, FailReason failReason) {
                                        showModle(position);

                                    }

                                    @Override
                                    public void onLoadingComplete(String s, View view, Bitmap bitmap) {
                                        showModle(position);

                                    }

                                    @Override
                                    public void onLoadingCancelled(String s, View view) {

                                    }
                                });

                            }
                        } else {
                            List<Contasnts> telFirend = SharedPreferencesKey.getFirend(getActivity());
                            if (telFirend!=null) {
                                for (int i = 0; i < telFirend.size(); i++) {
                                    if (notification_json.getFrom() == telFirend.get(i).getId()) {
                                        avatarUrl = telFirend.get(i).getAvatarUrl();
                                        break;
                                    }
                                }
                            }
                            user_image.setVisibility(View.VISIBLE);
                            user_text_image.setVisibility(View.GONE);
                            ImageLoader.getInstance().displayImage(avatarUrl, user_image, new ImageLoadingListener() {
                                @Override
                                public void onLoadingStarted(String s, View view) {

                                }

                                @Override
                                public void onLoadingFailed(String s, View view, FailReason failReason) {
                                    showModle(position);

                                }

                                @Override
                                public void onLoadingComplete(String s, View view, Bitmap bitmap) {
                                    showModle(position);
                                }

                                @Override
                                public void onLoadingCancelled(String s, View view) {

                                }
                            });
                        }
                    }
                }
            } else {
                setState(1);
                mCrosshairModel = null;
                rippleBackground.setVisibility(View.VISIBLE);
                rippleBackground.startRippleAnimation();
                rippleBackground_send.setVisibility(View.VISIBLE);
                rippleBackground_send.startRippleAnimation();
                restartRecord();
            }
        }

        @Override
        public void onObject3DFailed(String s) {

        }
    });
    mProductModelGroup.setDragType(Node.DragType.FIXED_TO_WORLD);
    mProductModelGroup.setDragListener(new DragListener() {
        @Override
        public void onDrag(int i, Node node, Vector vector, Vector vector1) {
            // No-op
        }
    });

}

public void  showModle (Vector position){
Bitmap bitmapFromAsset = convertViewToBitmap(dialog_view);
// Bitmap bitmapFromAsset = ViroHelper.getBitmapFromAsset(this, "andy.png");
Texture chineseCharTexture = new Texture(bitmapFromAsset, Texture.Format.RGBA8, true, true);
Material material1 = new Material();
material1.setDiffuseTexture(chineseCharTexture);
material1.setLightingModel(Material.LightingModel.CONSTANT);
float v = position.distance(mViroView.getLastCameraPositionRealtime());
Surface surface = new Surface(0.1f, 0.1f);
surface.setMaterials(Arrays.asList(material1));
Node mTextNode = new Node();
EnumSet<Node.TransformBehavior> transformBehavior =
EnumSet.of(Node.TransformBehavior.BILLBOARD);
mTextNode.setLightReceivingBitMask(0);
mTextNode.setTransformBehaviors(transformBehavior);
mTextNode.setScale(new Vector(1.2 * v, 1.2 * v, 1.2 * v));
    mTextNode.setPosition(new Vector( 0.1f,  - 0.06f,0)); //move this around to get into the lower right, maybe (.2, 0,0) would work better.
    mTextNode.setGeometry(surface);
    dialog_view.destroyDrawingCache();
    object3D.getParentNode().addChildNode(mTextNode);

}

this code

                if (result == null) {                        Vector add = mViroView.getLastCameraForwardRealtime().normalize().add(cameraPos);

mCrosshairModel.setPosition(add);
}  else {  mCrosshairModel.setPosition(result.getPosition());
}
this createDroidAtPosition(final Vector position, ) the  position

I see that your video is rotating 3d. How can you do that without rotating? Enumsets < Node. TransformBehavior > transformBehavior1 = enumsets. Of (Node. TransformBehavior. BILLBOARD_Y);
My shark added this,

In video you rotate the model to the right, does this have to be done manually?

In video you rotate the model to the right, does this have to be done manually?
Nope, you don't have to do this manually. Like what you have done above, you can simply set a transformBehavior on your mProductModelGroup with a BillBoard_Y configuration, so as to keep your entire layout (including the userimageNode circle, or other objects in that group, placed in reference to the shark) billboarded / fixed facing towards you.

I've tried that and it still works, as show in the video below (imagine that the red box is your imageUser circle).

As such, to re-iterate the solution explained above,

Instead of placing the "userimage" circle node in world space, I recommend positioning it relative to the rotation of the shark (or the rotation of the parent node that rotates the shark). ... .... you should just parent the node with the "userimage" circle geometry, under the shark node (or parent node containing the shark node, whichever does the rotation of the shark towards the user) ...

Thus, as seen in the video gif above, I've parented both the star model, and as well as my red box (this can be you "userimage" circle), both parented under mProductModelGroup (as mentioned in the solution above, to parent them under a node that controls the rotation of the shark towards the user). Thus, in this case the node that contains both my red box and Star is mProductModelGroup, and it controls the rotation in the sense of billboarding of configuration BILLBOARD_Y controls the rotation of the shark towards the user.
So for your project, you will need to parent both your Shark model, and as well as the node that contains your "userimage" circle under the node that controls the rotation of the shark (i think this is mProductModelGroup for your project, but correct me if i'm wrong here). You haven't yet answered the question below, so i'm not sure which node "userImage" circle corresponds to.
Can you also please answer the question below:

Is userimageNode named something else in the example you have provided?

before I add mScene.getRootNode.addChildNode(userimageNode);
showModle ()
the mTextNode is userimageNode

i give mProductModelGroup. billboarding configuration BILLBOARD_Y work , before I give shark and useriamge add is not work .    thank you

So to confirm, has the main issue been fixed? (Sorry, I'm not sure if I understood the last comment correctly).

yes , fixed  thank you , I will close this issue


cydia not recieve major update

cydia not receive update like unc0ver & we need overnight fix in the latest beta of unc0ver b49

Our Cydia is latest, and the overnight reboot fix is included.


Typescript errors in ArMarkerHelper and ArToolkitSource.ts

I get errors like this in a testing repository:
For ArMarkerHelper.ts:
 ERROR in C:\path\to\node_modules\@ar-js-org\ar.js-threejs\src\ArMarkerHelper.ts(22,16)
      TS2339: Property 'width' does not exist on type 'Entity<ObjectMap<Component<any, System<any>>>>'.

this is the code:
https://github.com/AR-js-org/AR.js-threejs/blob/df206b183ef61f8bf91083f9fdb6488423409876/src/ArMarkerHelper.ts#L21-L23
For ArToolkitSource.ts:
ERROR in C:\path\to\node_modules\@ar-js-org\ar.js-threejs\src\ArToolkitSource.ts(257,9)
      TS2740: Type 'Entity<ObjectMap<Component<any, System<any>>>>' is missing the following properties from type 'HTMLImageElement': align, alt, border, complete, and 23 more.

With the last commit the errors mentioned above are disappeared, this issue can be closed.


clarify the compatibility dates page

The compatibility flags were extracted to their own page in #17900 - they used to be listed on the compatibility dates page.
The compatibility dates page still uses "this page" to refer to the change history which is now on the flags page.
This PR update "this page" to "the compatibility flags page".
/cc @ToriLindsay
Edit: the second commit updates the doc now that dates & flags can be updated from the dashboard. I'll follow up with the team that implemented the feature so that they add more details.

Thanks for the review @GregBrimble !


[go_router] Redirect use an empty location for unknown routes

Context
Prior to go_router 4.0.0, when we manually change the URL to an unknown route, the redirect callback of the GoRouter was called with a non-empty location. This made it possible to redirect to a specific route without registering it in the GoRouter.
redirect: (state) {
  final location = state.location;
  print('redirect from $location');
  if (location.contains('page2_redirect')) {
    return '/page2';
  }
  return null;
},

After go_router 4.0.0, if the route is not registered in the GoRouter, the redirect callback is called with an empty location
Steps to Reproduce

Add go_router: ^5.1.6 in pubspec.yaml
Launch the code sample targetting Chrome (web)
Modify the url with http://localhost:63342/#/page2_redirect

Expected results:
The console print redirect from /page2_redirect
The redirect callback is called with state.location = /page2_redirect
The page 2 is displayed
Actual results:
The console print redirect from
The redirect callback is called with state.location = ``
Page not found is displayed

Code sample

import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

void main() => runApp(App());

/// The main app.
class App extends StatelessWidget {
  /// Creates an [App].
  App({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) => MaterialApp.router(
        // routerDelegate: _router.routerDelegate,
        // routeInformationParser: _router.routeInformationParser,
        // routeInformationProvider: _router.routeInformationProvider,
        routerConfig: _router,
      );

  final GoRouter _router = GoRouter(
    routes: <GoRoute>[
      GoRoute(
        path: '/',
        builder: (BuildContext context, GoRouterState state) => const Page1Screen(),
        routes: <GoRoute>[
          GoRoute(
            path: 'page2',
            builder: (BuildContext context, GoRouterState state) => const Page2Screen(),
          ),
        ],
      ),
    ],
    redirect: (context, state) {
      final location = state.location;
      print('redirect from $location');
      if (location.contains('page2_redirect')) {
        return '/page2';
      }
      return null;
    },
  );
}

/// The screen of the first page.
class Page1Screen extends StatelessWidget {
  /// Creates a [Page1Screen].
  const Page1Screen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(title: const Text('Home')),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              ElevatedButton(
                onPressed: () => context.go('/page2'),
                child: const Text('Go to page 2'),
              ),
            ],
          ),
        ),
      );
}

/// The screen of the second page.
class Page2Screen extends StatelessWidget {
  /// Creates a [Page2Screen].
  const Page2Screen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(title: const Text('Page 2')),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              ElevatedButton(
                onPressed: () => context.go('/'),
                child: const Text('Go back to home page'),
              ),
            ],
          ),
        ),
      );
}

This is due to we do route match before top level redirect.


duplicate ssh key

Description
juju_model resource breaks as follows:
│ Error: [duplicate ssh key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDhBE/7bHFW1pZy7nifhJQui87/+7R0ZXlS1/oWKDIl stg-mattermost-db@server]
│
│   with module.stg-mattermost-db.module.juju_machine_service[0].module.juju_model.juju_ssh_key.service_user_key[0],
│   on .terraform/modules/stg-mattermost-db/prodstack/common/juju_model/main.tf line 21, in resource "juju_ssh_key" "service_user_key":
│   21: resource "juju_ssh_key" "service_user_key" {

On inspection:
| $ juju list-ssh-keys
| Keys used in model: admin/stg-mattermost-db
| fa:27:a7:d3:b8:68:5a:18:db:8a:51:9f:81:50:85:73 (stg-mattermost-db@server)

| $ juju ssh-keys --full
| Keys used in model: admin/stg-mattermost-db
| ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDhBE/7bHFW1pZy7nifhJQui87/+7R0ZXlS1/oWKDIl stg-mattermost-db@server

Should the Juju provider just ignore this and not error out if it's the same key with the same comment?
Urgency
Casually reporting
Terraform Juju Provider version
0.8.0
Terraform version
v1.5.7
Terraform Configuration(s)
No response
Reproduce / Test
...

Debug/Panic Output
No response
Notes & References
No response

This is a duplicate of #267


Websockets

wondering if there is an example showing how to reverse proxy websockets.
ie: https and wss

Hi.
This project (JrCs/docker-letsencrypt-nginx-proxy-companion) "only" purpose is to:

enable the automatic creation of certificates from containers env var.
put them in the right place with the right name so they can be used by nginx-proxy docker-gen template.
reload the nginx proxy when needed (cert creation or renewal).

What you want to achieve depends entirely on the jwilder/nginx-proxy project, which does the actual proxying and is maintained by different peoples.
We only deal with issues related to letsencrypt-nginx-proxy-companion, so please submit your nginx-proxy issues directly to the nginx-proxy repo.

Got it, thanks.
My apologies.
Dave


Add CI for counting passed tests (even disabled)

Add counting passed tests in CI via maven with numeric representation of all tests which can be transpiled or not.
My idea:
run single test in tests class and disable CI failing after tranpilation failure.

Right now we have in branch counter test which will fail in case of failure. We have only to add handling profiles in pom.xml for maven builder

CI in fork failed with file not found exception

Want to split test to 2 groups:

enabled - with assertations
disabled - with assume and do not failure CI
Needs separate test source and test methods

CI failed with error:
ls: cannot access './target/eo-test/04-pull/org/eolang/': No such file or directory
but tests for counter stage was completed and didn't fail this stage:

Right now CI works well, added stage which run all tests even desabled and in the end of this stage we can see how many test failed. The stage results have to be validated by @bugdea1er for better understadning what we need to fix. All stage results are available here.


process status code

Hello,
How can i process status code 404 in Restangular?

Please spent few minutes on reading the Readme.

i can't find this information.
Can i process http code (404, 204,500, ..)?


implement test login with wrong email and password

Coverage increased (+1.2%) to 81.108% when pulling b1ca5a23534ca012d1645127bdfb99b1441959c5 on validations into 3f3c88677422c17584a9e62979f6e427f103a355 on master.

Coverage increased (+1.2%) to 81.108% when pulling b1ca5a23534ca012d1645127bdfb99b1441959c5 on validations into 3f3c88677422c17584a9e62979f6e427f103a355 on master.


cannot open dashboard and console error shows 'the server responded with a MIME type of "text/plain".'

Prerequisites

[X] I am using the latest version of Locust
[X] I am reporting a bug, not asking a question

Description
i'm newbie and trying the hellow world from doc
PS C:\Users\LeiYang> D:\pv\loc\Scripts\Activate.ps1
(loc) PS C:\Users\LeiYang> locust -V
locust 2.24.0 from d:\pv\loc\lib\site-packages\locust (python 3.8.3)
(loc) PS C:\Users\LeiYang> cd D:\G\lucust-learn
(loc) PS D:\G\lucust-learn> locust -f .\demo.py
[2024-03-13 22:41:04,777] DESKTOP-1SLBP5D/WARNING/locust.main: Python 3.8 support is deprecated and will be removed soon
[2024-03-13 22:41:04,777] DESKTOP-1SLBP5D/INFO/locust.main: Starting web interface at http://localhost:8089 (accepting connections from all network interfaces)
[2024-03-13 22:41:04,816] DESKTOP-1SLBP5D/INFO/locust.main: Starting Locust 2.24.0

then i open above web page using either edge or chrome, both blank page, and console error is

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

Command line
locust -f .\demo.py
Locustfile contents
from locust import HttpUser, task

class HelloWorldUser(HttpUser):
    @task
    def hello_world(self):
        self.client.get("/hello")
        self.client.get("/world")

Python version
3.8
Locust version
2.24.0
Operating system
windows 11

duplicate.


 Run an install with npm@5 or later to generate it, then try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-01-06T01_32_18_129Z-debug.log
ERROR: Service 'app' failed to build: The command '/bin/sh -c npm ci' returned a non-zero code: 1
chchang@hqdc039:~/git/share$ docker-compose up -d

I'm getting the same.

I'm getting the same.

Thanks for reporting this.  I will look into this week.

Thanks for reporting this.  I will look into this week.

Really sorry have not put as much love into this as I wanted too.  Trying to rebuild it in a better way which will allow me to integration a clean speedy front-end.

Really sorry have not put as much love into this as I wanted too.  Trying to rebuild it in a better way which will allow me to integration a clean speedy front-end.

the bug is still there ? I can not run with docker-compose today (2022/05/05)

Yes, me neither. Is this on the roadmap?


Extensibility of the Dashboard

I know that there is work being done to make the Dashboard standalone and I am really looking forward to this.
there are cases where we have for certain projects policies that require services like application insights or sentry to be implemented into the services. And I would love a way to stay in one Dashboard and have access to all over these without browser tab switching or opening multiple sites to begin with.
I think it would be great, if there would be an extensibility to the Dashboard, so I can add "custom" menu points that than open a site as an iframe. I know that there might be issues with that, espacially CORS issues, but I think those would be solvable. for components that have some kind of ui, like pgAdmin or application insights, these could be added automatically to the Dashboard, and for the others, there could be the AddCustomUI(string, string) method.

This is out of scope for v1.


⚠ Bofrost.at has degraded performance

In a179fe1, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1380 ms

Resolved: Bofrost.at performance has improved in ea0e5e9 after 37 minutes.


(chore) Add test for nested text elements

Before this test, the unwrapTextElements function was not fully tested, as it almost always receives a one-element array and unwraps it.  The alternative path returning the original array is exercised by this test.

Pull Request Test Coverage Report for Build 20

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+1.7%) to 99.167%

Totals

Change from base Build 19:
1.7%

Covered Lines:
65

Relevant Lines:
65

💛  - Coveralls


ARROW-12104: [Go][Parquet] Second chunk of Ported Go Parquet code

9817

 Quality gate: Failed
80 Issues

 11 Vulnerabilities
 69 Code issues

Details


docs: fix typo

🔗 Linked issue

❓ Type of change

[x] 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Typo in main page :)
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Thank you @oritwoen ❤


Version numbers in INSTALL.md and spanner-main.dox are not updated during release

The current version of INSTALL.md has out of date version information (the current release is 0.8.0 but it says 0.7.0).
We will need to update this when cutting a release, ideally automatically.  Note that the version number for the -spanner release as well as common are hard-coded in multiple places in generate-install.sh.
Note that we will want to update this in the release branch as well as in HEAD.

I also noticed a comment referencing 0.7.0 in ci/test-install/WORKSPACE

spanner-main.dox also refers to 0.7.0 (this is published on github.io).
It also has this obsolete instruction:

As we do not currently have releases of google-cloud-cpp-spanner you need to
select the SHA-1 of the commit you want to use.

There is also a lot of commonality between INSTALL.md and spanner-main.dox, perhaps we should "refactor" (can the former just refer to the latter?)

There is also a lot of commonality between INSTALL.md and spanner-main.dox, perhaps we should "refactor" (can the former just refer to the latter?)

OTOH, I have been told that it is preferable to have all the information in a single page vs. forcing the user to link through many pages to find what they need, particularly for "landing" or "quick start pages".

I believe this has been/will be taken care of when Spanner moves to -cpp. In that world, there is no separate -common version to update. And the release instructions do now talk about updating all the relevant version numbers (and if we miss one, we'll fix it in that repo).


IM-242 - add additional tools to support peoplesoft integration

This PR adds a few new tools to the existing copy-user-to-header filter, with the intent of making the stock cas client compatible with peoplesoft logins. This is done so that our PS apps can use signon.cru.org instead of signin.cru.org. And this is done so that PS apps can use MFA (which is supported by signon.cru.org but not signin.cru.org).
These are the tools being added:

a filter to expose CAS attributes as headers
a filter to "broadcast" logout callback notifications to all nodes in a cluster
a filter that works around a problem in the stock CAS client logout code
a filter that provides an alternative strategy for CAS single-logout handling

When I merge this PR, I'll also rename this repository to cas-client-integration-tools, since its scope is expanding.
During testing, it turned out that single-logout (SLO) does not work correctly in PSHR. At first I thought it was due to the new cas client, but we discovered there is some kind of internal peoplesoft problem that is present even in PSHR Prod, so it's not (entirely) the fault of the new cas client. We will probably move forward going live with this, but disabling SLO until we can fix at a later time.
As a result, neither EntityPreservingSingleSignOutFilter nor LogoutListFilter will be used in PS production, for now. Later on I'll decide which of these to use and build on when I have a better understanding of why SLO doesn't work.
The new PS web.xml config is being stored (for now) in Drive here.
This PR supports https://jira.cru.org/browse/IM-242

Can you elaborate in this PR's initial comment on what are the 'few new tools' added to the existing copy-user-to-header filter? This will help myself as well as future readers more appreciate the value added.

Ok, I added a list to the description.

@hlbraddock good to merge?

Have you tested all of the following:

a filter to expose CAS attributes as headers
a filter to "broadcast" logout callback notifications to all nodes in a cluster
a filter that works around a problem in the stock CAS client logout code

But possibly not this since you're not releasing this capability in the current PR:

a filter that provides an alternative strategy for CAS single-logout handling

Yes, I've tested them all here.

Is it true then that what you plan to deploy in this first phase, will only differ from the, admittedly archaic, unmaintainable, current stock CAS client, due to its offering attribute mapping and a filter that works around a problem in the stock CAS client logout code (memory leak?), as well as the signon.cru.org config change?

As you've tested successfully, I'm fine with merging. Nice work.

Is it true then that what you plan to deploy in this first phase, will only differ from the, admittedly archaic, unmaintainable, current stock CAS client, due to its offering attribute mapping and a filter that works around a problem in the stock CAS client logout code (memory leak?), as well as the signon.cru.org config change?

So, a few responses to that; hopefully it answers your question.

current stock CAS client

The current/legacy PSHR CAS client isn't "stock"; not sure if you mistyped or if we're just using that word differently

due to its offering attribute mapping

The current/legacy client offers 'implicit' attribute mapping; so we need to replicate that functionality in this PR. Though we're going to use explicit instead of implicit mapping.

a filter that works around a problem in the stock CAS client logout code (memory leak?)

The current/legacy client does in fact trigger a memory leak in weblogic (because it wraps the Session, and PS can't handle this like it used to).
The new/stock client won't. That's not the main motivation for this change; the MFA support is. But Alvin is excited about it.

as well as the signon.cru.org config change?

So, for initial go-live, Alvin and I decided to keep signin.cru.org, so that we can go live with the new cas client but not break SSO between staffweb and pshr.
A step-2 go-live will change the config to signon.cru.org, made in conjunction with a staffweb go-live, so that both use the new URL.
(A step-3 go-live will enable MFA, but that won't involve code changes.)
(And down the road, Q4 I think, we'll revisit SLO.)

thanks!


Add --ignore-bind (bind is already fast without bypassing)

Workaround for:

#65

This flag disables the acceleration for bind syscalls, as the current hook is not robust enough for bind with complicated setup.
Anyway, the performance of bind is not really problematic so far in the plain Rootless Containers. So we can just keep enabling bypass4netns for connect and relevant syscalls, and call it for a day.
See the logs of RootlessKit CI:
https://github.com/rootless-containers/rootlesskit/actions/runs/8558692577/job/23453781376

Benchmark: TCP Ports (network driver=slirp4netns, port driver=builtin): 34.8 Gbps, 34.7 Gbps
Benchmark: TCP Ports (network driver=pasta, port driver=implicit):      39.3 Gbps, 39.2 Gbps
Benchmark: UDP Ports (network driver=slirp4netns, port driver=builtin): 25.1 Gbps, 17.2 Gbps
Benchmark: UDP Ports (network driver=pasta, port driver=implicit):      37.9 Gbps, 13.2 Gbps

nerdctl will support this via --annotation=nerdctl/bypass4netns-disable-bind=true

https://github.com/containerd/nerdctl/pull/2916

Renamed the flag from --disable-bind to --ignore-bind


Fix EBUSY errors on uv_loop_close

We need this walk because we call ReadStop on 2 places:

On the dispatch pipe UvPipeHandle after reading the correct message
On on accepted connections when there's back pressure

Calling ReadStop makes the handle as in-active which means the loop can
end while there's still valid handles around. This makes loop.Dispose throw
with an EBUSY. To avoid that, we walk all of the handles and dispose them.
#1761

This happened on OSX:
[xUnit.net 00:00:00.8682320]   Discovering: Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
[xUnit.net 00:00:07.2262650]   Discovered:  Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
[xUnit.net 00:00:07.5893480]   Starting:    Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
The active test run was aborted. Reason: Unable to communicate with test host process.

So you've finally joined the dark side. Did you, like I did a while back, see uv_tcp_ts getting walked even after uv_run completed? You should have let me change it to walk before the second uv_run back then 😛 Although we probably wouldn't have caught the dispatch pipe issue then.


⚠ Bofrost.at has degraded performance

In 769d173, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 917 ms

Resolved: Bofrost.at performance has improved in b1734f4.


Alluxio assumes object is directory when failed to get status from UFS

Alluxio Version:
2.4
Describe the bug
For Alluxio on S3, when Alluxio fails to get status of an object, it will assume it's a directory.
2020-10-27 07:06:46,194 WARN  ObjectUnderFileSystem - Error fetching directory status, assuming directory s3a://test/default_tes
ts_files/BASIC_NON_BYTE_BUFFER_CACHE_PROMOTE_ASYNC_THROUGH does not exist
2020-10-27 07:06:46,194 WARN  UfsStatusCache - Failed to fetch status for /default_tests_files/BASIC_NON_BYTE_BUFFER_CACHE_PROMOTE_ASYNC_THROUGH: java.io.FileNotFoundException: s3a://test/default_tests_files/BASIC_NON_BYTE_BUFFER_CACHE_PROMOTE_ASYNC_THROUGH
2020-10-27 07:06:46,195 WARN  InodeSyncStream - Failed to sync metadata on root path InodeSyncStream{rootPath=LockingScheme{path=/default_tests_files/BASIC_NON_BYTE_BUFFER_CACHE_PROMOTE
_ASYNC_THROUGH, desiredLockPattern=READ, shouldSync=false}, descendantType=NONE, commonOptions=syncIntervalMs: -1
ttl: -1
ttlAction: DELETE
, forceSync=true, isGetFileInfo=true}: alluxio.exception.FileDoesNotExistException: Path "/default_tests_files/BASIC_NON_BYTE_BUFFER_CACHE_PROMOTE_ASYNC_THROUGH" does not exist.

The corresponding logic is
https://github.com/Alluxio/alluxio/blob/9516d6c5c0cf37d011c15a10a37f0924d58e7314/core/common/src/main/java/alluxio/underfs/ObjectUnderFileSystem.java#L554
To Reproduce
Steps to reproduce the behavior (as minimally and precisely as possible)
Expected behavior
Ideally we determine
Urgency
Describe the impact and urgency of the bug.
Additional context
Add any other context about the problem here.

It actually does another check and will return FileNotFound exception if it is not a directory.

resolved


Remove aria-label from header

This is renaming the header to something that is less descriptive than the name of the service. We don't need the aria-label, the text content of the link will suffice.

Does the svg get ignored? Or does it get read out as an unlabelled image?


Wrong results

On julia 1.5.2 and Measurements  v2.3.0:
using Measurements
x = 5.0 ± 0.2
y = 8.0 ± 0.3
x + y

Output:
13.0 ± 0.36

What's the issue?

@giordano : Sorry, I thought the output is self-explanatory. Shouldn't the result be:
13.0 ± 0.5

?

There are multiple ways to propagate uncertainties and no one is "perfect" in all cases.  You are expecting to simply sum the absolute values of the uncertainties, but this package chose the linear error propagation theory, as explained in the manual and in the README.md file.  The manual has an entire page which explains the propagation model adopted here.


Bugfix in multilinear grid interpolation.

In common.py lines 225 - 236, the multilinear grid interpolation loops through the deltas, points, and gridtuples. When using the previous implementation, the code tries to interpolate between indexes at 0 and -1 in the negative direction in case the interpolation point lies exactly on the gridpoint. This leads to some weird results. This is now fixed by this PR.

On most pixels, the results are small.  However, on the margin, this can have substantive impacts.  First, here are tests showing that the new patch is in fact correct, comparing the grid-points (where the original code failed).  Interior points to the grid continue to show a one-to-one match as previous demonstrated:

Using 10 EMIT scenes as a test-case, we can see that this change does lead to some notable changes.  Average changes are below 0.1 % reflectance, well in the noise.  Worst case however - typically when we run up onto the bound of the search - can have substantive impacts that appear either 'good' or 'bad', but are certainly more correct.  Two instances of maximum deviations within scenes, with black as the update and red as the original:

Given these findings, I will merge in the fix.


ComputerCraft Turtle Dupe Bug

The ComputerCraft guys said it isn't their fault. If you have a turtle in a protected zone, and it breaks a block, it gets the drop without breaking the block.
We are using ComputerCraft v1.79, Forge <IP_ADDRESS>0, Sponge spongeforge-1.8.9-1890-4.2.0-BETA-1471, and GriefProtection 1.8.9-0.1-4.

@JavaProphet They are correct, i'll look into this after I finish next build.

Can confirm this is a bug. Also has serious issues with placing blocks, and moving inside claims.
Passing claim borders does not work unless it is leaving the claim.
OpenComputers has a very similar problem but it duplicates the entire Robot when it tries to move into a claim.

After looking into the issue, the problem lies in Sponge. The turtle calls isBlockProtected which is currently not tracked by sponge. Open a ticket in SpongeCommon so we can fix it there.


CPPCheck: Array 'coeffs_buffer[3]' accessed at index 3, which is out of bounds

CPPCHECK error found during code scan:
<results version="2">
<cppcheck version="1.90"/>
<errors>
<error id="arrayIndexOutOfBounds" severity="error" msg="Array 'coeffs_buffer[3]' accessed at index 3, which is out of bounds." verbose="Array 'coeffs_buffer[3]' accessed at index 3, which is out of bounds." cwe="788">
<location file0="onnx-mlir/src/Runtime/OMResize.c" file="onnx-mlir/src/Runtime/OMResize.inc" line="55" column="16" info="Array index out of bounds"/>
</error>
<error id="arrayIndexOutOfBounds" severity="error" msg="Array 'coeffs_buffer[3]' accessed at index 3, which is out of bounds." verbose="Array 'coeffs_buffer[3]' accessed at index 3, which is out of bounds." cwe="788">
<location file0="onnx-mlir/src/Runtime/OMResize.cpp" file="onnx-mlir/src/Runtime/OMResize.inc" line="55" column="16" info="Array index out of bounds"/>
</error>
</errors>
</results>

It looks ike cubic_coeffs is told it's getting an array with three elements (float coeffs_buffer[3]) but then attempts to alter four (coeffs_buffer[3] =...).

The code that allocate the buffer to be used is in static void interpolate_nd_OMTensor
  // float coeffs_buffer[coeffs_n]; // = {1.0, 0.};
  float *coeffs_buffer = (float *)malloc(sizeof(float) * coeffs_n);

And the code that setup the function and length for cubic is in
void Resize_Scales(
    OMTensor *output, OMTensor *data, OMTensor *scales, char *mode_str) {
  Coeff_Func_t coeffs_f = NULL;
  int coeffs_n = 0;
  if (strcmp(mode_str, "nearest") == 0) {
    coeffs_f = nearest_coeffs;
    coeffs_n = 2;
  } else if (strncmp(mode_str, "linear", 6) == 0) {
    coeffs_f = linear_coeffs;
    coeffs_n = 2;
  } else if (strcmp(mode_str, "cubic") == 0) {
    coeffs_f = cubic_coeffs;
    coeffs_n = 4;
  } else {
    assert(0 && "Resize runtime: unsupported mode");
  }
  interpolate_nd_OMTensor(

Thus we can see that under cubic
    coeffs_f = cubic_coeffs;
    coeffs_n = 4;

and thus the implementation of cubic_coeff is false as it states:
static void cubic_coeffs(float ratio, float coeffs_buffer[3], int mode) {
  float A = -0.75;
  // A may have different value for different coordinate_transformation_mode
  // Currently, only default mode is supported
  coeffs_buffer[0] =
      ((A * (ratio + 1) - 5 * A) * (ratio + 1) + 8 * A) * (ratio + 1) - 4 * A;
  coeffs_buffer[1] = ((A + 2) * ratio - (A + 3)) * ratio * ratio + 1;
  coeffs_buffer[2] =
      ((A + 2) * (1 - ratio) - (A + 3)) * (1 - ratio) * (1 - ratio) + 1;
  coeffs_buffer[3] =
      ((A * ((1 - ratio) + 1) - 5 * A) * ((1 - ratio) + 1) + 8 * A) *
          ((1 - ratio) + 1) -
      4 * A;
}

whereas there are clearly 4 values. So the definition is wrong, but the code is right. Let me fix that.


feat(useStrapi): improve types for v5 and v4

Types of changes

[ ] Bug fix (a non-breaking change which fixes an issue)
[x] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description

Added types for fields, sort and populate in Strapi5RequestParams
Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes (if not applicable, please state why)

@XanderD99 Could I ask you to review this?

Implementation looks good to me. I would suggest tho to add something like this to it. Since the populate can be an object as well:
https://docs.strapi.io/dev-docs/api/rest/populate-select
type StrapiRequestParamPopulate<T> = {
  [K in keyof T]: T[K] extends object
  ? T[K] extends Array<infer I>
  ? `${Exclude<K, symbol>}` | `${Exclude<K, symbol>}.${StrapiRequestParamPopulate<I>}`
  : `${Exclude<K, symbol>}` | `${Exclude<K, symbol>}.${StrapiRequestParamPopulate<T[K]>}`
  : never;
}[keyof T]

interface Strapi5RequestParams<T> {
  populate?: ValidPopulateKeys<T> extends never
  ? never // Exclude `populate` if no sub-objects exist.
  : '*' // Populate all relations.
  | StrapiRequestParamPopulate<T> // String paths like "field.subfield".
  | Array<StrapiRequestParamPopulate<T>> // Array of string paths.
  | { // Nested object for advanced populates.
    [K in keyof T]?: T[K] extends object
    ? T[K] extends Array<infer I>
    ? Strapi5RequestParams<I> | '*' // Nested array population or wildcard.
    : Strapi5RequestParams<T[K]> | '*' // Nested object population or wildcard.
    : never; // Non-object keys cannot have nested populate.
  }
}

type ValidPopulateKeys<T> = keyof {
  [K in keyof T as T[K] extends object ? K : never]: T[K];
};

Merging this, @XanderD99 your suggestion can be done in another PR I guess.


Grinding away!

Added a implicitWait to web tests in hopes it stabilizes it.
Change quote logic/css
Convert a few more icons to svg
ILA was not using the mime image in posts only preview
tweaked the attachment headers a bit,  empty Pragma was just strange and Content-Transfer-Encoding: binary for only gecko must be old or just cargo coding.

Fine to bring it in?

I think so, easy enough to open another one ... right now I'm trying to get a v1.5.1+ version of the editor working, that will be another PR anyway.

I wasn't sure if you wanted to test anything on the wait for the tests. :D

So far adding the implicit wait seems to have helped with the selenium fails 🙏


Update dependencies versions and re-export crates from BSP

With a toolchain newer than 1.66 firmware seizes to function, dependencies update seems to fix the problem. Common dependencies were moved to BSP crate and re-exported in order to avoid double dependency declaration.

Fixes #40

This did not fix it for me. Upgrading all dependencies (using cargo upgrade), and adding the "critical-section-single-core" feature to cortex-m of hs-probe-bsp, makes the probe enumerate again.

I updated everything and unignored a Cargo.lock file but didn't add a critical-section-single-core feature for cortex-m. @kaspar030 is it still failing for you? I can build the firmware just fine and run it without any issue. Although admittedly I'm running it on a custom piece of HW. At the same time I don't really see why it'd behave differently on a 1st party design.


Merge release-3.4.0 to master

Codecov Report

Merging #978 (b07892b) into master (c8e2cfc) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #978      +/-   ##
============================================
- Coverage     37.39%   37.33%   -0.06%
  Complexity      942      942
============================================
  Files           152      152
  Lines         10234    10234
  Branches       1144     1144
============================================
- Hits           3827     3821       -6
- Misses         6022     6028       +6
  Partials        385      385

Impacted Files
Coverage Δ
Complexity Δ

...ication/sms/providerimpl/Msg91SmsProviderImpl.java
66.04% <0.00%> (-2.24%)
39.00% <0.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 c8e2cfc...b07892b. Read the comment docs.


Time info collecting

The plot-graphs.py script now collects all time information, that was used for creating graphs, into the single JSON file. Then the script can use such a file for creating graphs without any information generated by the global runner. For specifying such a behaviour the argument --use-file <file> is used.
This PR is linked to issue #25.

To expand a bit, this module now performs (or should perform) two conceptually distinct tasks:

Generate and collate graph data from a collection of files scattered around the filesystem and put it into a single object
Plot graphs from the single object

(additionally it deals with loading and saving the single object to the filesystem, but that's a triviality)
It's very important that these two conceptually distinct tasks are kept distinct in the implementation too (i.e. that they be decoupled).

I think I should split this PR into the following parts:

[ ] Separating get values and drawing graph.
[ ] Generating and saving plot data. Using plot data for creating graphs.
[ ] Using specified file for creating graphs. Also, performing changes, requested in comments https://github.com/awf/ADBench/pull/180#discussion_r361458314 and https://github.com/awf/ADBench/pull/180#discussion_r361457678
[ ] Doc string and output reference fixing/changing.
[ ] Documentation changes.

@tomjaguarpaw, what do you think?

For me, splitting it would help a lot and make it easier to review.  Thanks!


[MAINT] - Don't keep _version.py file in version control

related to https://github.com/conda-incubator/conda-store/issues/969
As a pre req to taking up https://github.com/conda-incubator/conda-store/pull/861, clean up the _version.py file which should not be tracked in version control.

I like this, but is anyone using conda_store_server.__version__ right now? I guess as a workaround we can do something like
# conda_store_server/__init__.py

from importlib.metadata import version

__version__ = version(__package__)

if we need to...?

The conda store version is meant to come from here https://github.com/conda-incubator/conda-store/blob/main/conda-store-server/conda_store_server/init.py#L17
As we move towards using setuptools-scm (and hatch-vcs), that'll look more like https://github.com/conda-incubator/conda-store/pull/861/files#diff-48a7f6b1b439ff32ff7b62092a2d6a49fb3c672e387714f659b6b492d22a3375R27.
Also want to call out this comment in the file

file generated by setuptools_scm
don't change, don't track in version control

Oh you're right - let's get rid of this!


docs: Update PULL_REQUEST_TEMPLATE.md

Summary:
Added a checklist item to the PR template to update documentation.
Expected behavior:
Documentation checklist item appears in PR template.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Add Abysium Material damage

Not how we're doing it, sorry.

I use same logic as for runes
If you say me how to do it, I will rewrite


added parameters section to project manager and removed from task man…

…ager, task designer unchanged and set defaults not implemeneted in project manager

good work!


129 add mini batching training routine

I also added a function to use the collocation training routine described on the DiffEqFlux tutorials page. The funciton is called derivative_matching!.


Add support for serializing liquid templates along with their VM code

Once https://github.com/Shopify/liquid-c/pull/59 and https://github.com/Shopify/liquid-c/pull/60 are merged, the liquid benchmarks show that 60% of the time to parse and render a template happens during parsing.  We could save a lot of that time by persisting (e.g. to a cache initially) the parsed template so that it can be re-used for further renders.
I think we should have the persisted format be fairly stable, such that it can be used across deploys of the application.  As such, I don't think we should just use Marshal on the liquid gem's parse tree, since that can easily lead to breaking changes from code written without awareness of liquid-c.  Instead, we should re-parse tag nodes on deserialization if that don't support liquid VM compilation.  For code that is compiled into liquid VM code, we should include two versions in the serialized VM code, one for the liquid-c and one for the application, so either can bump these versions to avoid rendering incompatible VM code.
So the serialized block bodies will consist of the following sections:

liquid VM instructions that don't require deserialization for execution
An array of marshal dumped ruby constants and will require marshal loading on deserialization
Uncompiled tags to parse on deserialization, including the type of tag (e.g. regular, block or raw) and references to any block bodies and "unknown tags" (i.e. handled from Liquid::Block#unknown_tag, such as elsif for Liquid::If)

This will require combining the VM assembler buffers for these block bodies together and removing the assumption that each block body will own its own assembler buffers.  Instead, the block bodies should instead reference offsets into the shared buffer for execution.  This could be done before adding serialization support (https://github.com/Shopify/liquid-c/issues/78).
To keep the ruby constant array simple, we will want to compile the non-ruby constant arguments into the VM instructions as immediate arguments.  Currently this isn't the case for OP_RENDER_VARIABLE_RESCUE and OP_WRITE_RAW.  Note that doing this for OP_WRITE_RAW will add copying overhead that won't be beneficial without using it for serialization.
Another possible application version compatibility concern is the Liquid::ParseContext, which is an argument for parsing, which can end up being saved and used for rendering (e.g. for parsing included templates).  To check for compatibility, we may want to require the application to pass in the same parse options for both parsing and deserializing to consider the serialized template to be compatible with the current application version.  We may also want to check the parse context after parsing to make sure the application doesn't depend on mutations of the parse context.

Is ParseContext context used in Shopify? I think its important that we treat this project as the future of Liquid. It's perfectly OK for us to deprecate a bunch of liquid features that make the work of Liquid-c harder and issue a major release for liquid to go with that.

It looks like we needlessly wrap the parse options in a Liquid::ParseContext, instead of passing a parse options hash directly to Liquid::Template.parse.  So we could only support passing in a parse options hash.

We may also want to check the parse context after parsing to make sure the application doesn't depend on mutations of the parse context.

Liquid::ParseContext has a [] method but not a []= method, so I think the intention is already clear that the parse options should be immutable.  We even dup the options hash, so mutating the parse options hash passed in won't effect the parse options.  We could deeply dup and freeze the options hash if we want to prevent mutable option values.

To check for compatibility, we may want to require the application to pass in the same parse options for both parsing and deserializing to consider the serialized template to be compatible with the current application version.

Actually, I think we could avoid serializing the parse context and just require the application to pass the parse context on deserialization without a compatibility check.  Although the parse context can get stored and re-used for rendering (e.g. https://github.com/Shopify/liquid/blob/001fde7694b52cb8a577c3294d0d6152522477fe/lib/liquid/tag/disableable.rb#L16), that is happening on liquid tags objects.  So parsing uncompiled tags on deserialization should take care of this concern.

Any update here?


support img2img?

webui version has upgraded the img2img function. Can this port update as well?
https://github.com/lllyasviel/stable-diffusion-webui-forge/discussions/854
@rootonchair

@MikeHanKK I believe it can be updated in this port. But let me have a look first

@rootonchair any progress on this?

@rootonchair i tried do this work to image to image, but when i provide transparent image it is not working, image appears all in red. I tried bring the code but i dont have much experience handling images.

Hi, img2img has been supported. You can check out here: https://github.com/rootonchair/diffuser_layerdiffuse/blob/main/test_diffusers_fg_only_sdxl_img2img.py


Fixed deprecation warning (Iterators)

Fixing one deprecation warning for Iterators that was showing up in 1.0

Hi Lorenzo, could you please review this PR..

Sorry, I am on holiday and in front of the laptop only sporadically. I'll review asap.

Actually, this was quick! :) Thanks a lot.


LiveQuery do not work after an exceptional shutdown of  NodeJS

OrientDB 2.1.6  OrientJS 2.2
My code is like the following.
var OrientDB = require('orientjs');
var server = OrientDB({host: 'localhost', port: 2424});
var db = server.use({name: 'test', username: 'admin', password: 'admin'});
db.liveQuery("live select from V")
.on('live-insert', function(data){
.......
})
.on('live-delete', function(data){
.......
})
.on('live-update', function(data){
.......
})
........
LIVE UNSUBSCRIBE iToken (I get the iToken by changing OrientJS source code)
........
It works as I wish.
However, if  I kill the NodeJS process left the UNSUBSCRIBE command not executed,  the problem comes. None of the callbacks( .on('live-XXX', function(data){...} )  is called when data changed, while no exception thrown.
Until the OrientDB re-started, LiveQuery get normal.

@zhiguan-hanks
do you have this behaviour also with OrientDB 2.2?

Yes, my team members have tried with OrientDB 2.2(GA and RC) last night, and the problem remains.

We found the a dead loop in do ... while in function "OLiveCommandResultListener.onLiveResult()", when an unsubscribed LiveQuery exists. Here is the console output:
in thread "Thread-10" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at java.util.Collections$SynchronizedList.get(Collections.java:2417)
at com.orientechnologies.orient.server.network.protocol.binary.OLiveCommandResultListener.onLiveResult(OLiveCommandResultListener.java:111)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect$2.call(OCommandExecutorSQLLiveSelect.java:132)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.execInSeparateDatabase(OCommandExecutorSQLLiveSelect.java:142)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.onLiveResult(OCommandExecutorSQLLiveSelect.java:129)
at com.orientechnologies.orient.core.query.live.OLiveQueryQueueThread.run(OLiveQueryQueueThread.java:68)

Hi @zhiguan-hanks
I'm fixing the problem in the core, then we will verify if there are also problems in OrientJS about the token
Thanks
Luigi

Hi @zhiguan-hanks
I just pushed a fix for this in develop branch (next 2.2.1).
@maggiolo00 let's do some tests together on NodeJS driver to make sure that everything is ok
Thanks
Luigi

My advice on fixing this bug in OrientDB core:

Automatically unsubscribe all LiveQuerys of the connection, Once disconnected.
2.Can you provide an interface event "Disconnection" to developers?

BTW, when will  2.2.1 be available?
Thanks

@tglman could you please take a look at this? (let's talk about it in private if you want)
Thanks
Luigi

@tglman  Is this closed?

@lvca we still have to finish the tests with Node.
@maggiolo00 when you have one minute...
Thanks
Luigi

Hi everyone, How is it going?
I'd like to know, whether you plan to provide an interface event "Disconnection" on which developers can create a function inside the database to listen?
Only depending on your interface, we can realize our requirement. That is,
When one user shutdowns, the record( recording online/offline status of him) will be updated and then other users will be notified through LiveQuery.
Thanks a lot.

Hi @zhiguan-hanks
do you mean Disconnection on live query subscribed?

DISCONNECTION on live query subscribed AND database connection,
or at least one of them.
I think they are both  required for a maturer database server.

About when will  2.2.1 be released?
We will have to develop plugins for 2.2.0.

@zhiguan-hanks
here you can find 2.2.2
http://orientdb.com/download/

Hi,  friends,
The awful problem remains as following. Are you sure 2.2.2 enterprise is released correctly:-) ? !!
2016-06-15 19:33:23:835 INFO  {db=router} Indexes restore after crash was finished. [OIndexManagerShared]Exception in thread "Thread-16" java.lang.NullPointerException         at com.orientechnologies.orient.core.query.live.OLiveQueryHook.unsubscribe(OLiveQueryHook.java:102)         at com.orientechnologies.orient.server.network.protocol.binary.OLiveCommandResultListener.onLiveResult(OLiveCommandResultListener.java:155)         at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect$2.call(OCommandExecutorSQLLiveSelect.java:131)         at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.execInSeparateDatabase(OCommandExecutorSQLLiveSelect.java:141)         at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.onLiveResult(OCommandExecutorSQLLiveSelect.java:128)         at com.orientechnologies.orient.core.query.live.OLiveQueryQueueThread.run(OLiveQueryQueueThread.java:68)
My use case is explained at the top floor. Thanks.

@zhiguan-hanks
let me check

@zhiguan-hanks
the fix was not complete. Fixed now.
It will be available in 2.2.3 GA

@zhiguan-hanks
can you retry with 2.2.3?
http://orientdb.com/download/
Thanks

We tried it over 5 times this morning, and the problem never reappeared. Everything seems going well!
Thanks a lot.

Thanks


Copy from chat content

It is currently not possible to copy text that appears in the chat widget. Is this intentional? It would be nice to allow this.

Hi @icedwater thanks for reporting this issue, we will post a new version to fix it soon.


Move Link Replacement Above Package Creation

As it currently is set up, only docs.MS get's the readme link updates. This means that all the readmes submitted by the release step to Docs.MS side don't have relative link replacement.
@Azure/azure-sdk-eng

@scbedd can you help me understand why this is needed? As long as the link replacement happens before doc publishing why does it need to happen before we package? Mostly I'm asking because I'm trying to get us to a place were we don't have any modified files in the packages that don't match what is the repo, based on feedback in https://github.com/Azure/azure-sdk/issues/1214.

Chatted with Wes, will sync with @KarishmaGhiya on what we actually want to do here.


Use regionMatches in isFullyQualifiedClassReference causes wrong results

What version of OpenRewrite are you using?

I am using the latest rewrite 8.41.2
How are you running OpenRewrite?

I am using the Maven plugin, and my project is a single module project.
mvn org.openrewrite.maven:rewrite-maven-plugin:5.46.2:run ...

What is the smallest, simplest way to reproduce the problem?

Below is a very simple test case for using ChangeType to change import from: org.codehaus.jackson.annotate.JsonIgnoreProperties to com.fasterxml.jackson.annotation.JsonIgnoreProperties.
But in latest version it will failed: it remove the irrelevant import org.codehaus.jackson.annotate.JsonIgnore wrongly.
public class ChangeTypeWithAnnoTest implements RewriteTest {
    @Override
    public void defaults(RecipeSpec spec) {
        spec.recipe(new ChangeType("org.codehaus.jackson.annotate.JsonIgnoreProperties", "com.fasterxml.jackson.annotation.JsonIgnoreProperties", false))
          .parser(JavaParser.fromJavaVersion().classpath("jackson-core", "jackson-core-asl"));
    }

    @Test
    void testRecipe() {
        // language=java
        rewriteRun(
          spec -> spec.typeValidationOptions(TypeValidation.none()),
          java(
            """
             import org.codehaus.jackson.annotate.JsonIgnoreProperties;
             import org.codehaus.jackson.annotate.JsonIgnore;

             @JsonIgnoreProperties(ignoreUnknown = true)
             public class myClass {
                 @JsonIgnore
                 public boolean isDirty() {
                     return false;
                 }
             }
        """, """
             import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
             import org.codehaus.jackson.annotate.JsonIgnore;

             @JsonIgnoreProperties(ignoreUnknown = true)
             public class myClass {
                 @JsonIgnore
                 public boolean isDirty() {
                     return false;
                 }
             }
            """)
        );
    }
}

As for the reason, I did some troubleshooting, and seems it's because in this commit: https://github.com/openrewrite/rewrite/commit/e536ed273fda87ce6857b06f200488130b3ef5f3  we change the behavior of isFullyQualifiedClassReference
The details:
During the running of this testing recipe, at some point it will call isFullyQualifiedClassReference to check J.FieldAccess(org.codehaus.jackson.annotate.JsonIgnore) and String(org.codehaus.jackson.annotate.JsonIgnoreProperties), just like below picture shows. Obviously the correct result for this call should be false since they are two different class.

In previous logic, it will return false correctly, because in old code in will goto return false in if (!fieldAccess.getName().getSimpleName().equals(className.substring(className.lastIndexOf('.') + 1)))
But, in latest code, it will return true wrongly, because it cannot return false in theif (!simpleName.regionMatches(0, className, dotIndex + 1, simpleName.length())) part because the regionMatches will return true in this case (JsonIgnore and JsonIgnoreProperties has the same prefix).

So the root cause is, why we use regionMatches here? Personally, I think the old code is correct and enough.
@knutwannheden @timtebeek @pstreef Please help check this, that's a real serious bug for us.

What did you expect to see?

The expect behavior is it should only replace the JsonIgnoreProperties related import.
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonIgnore;

 @JsonIgnoreProperties(ignoreUnknown = true)
 public class myClass {
     @JsonIgnore
     public boolean isDirty() {
         return false;
     }
 }

What did you see instead?

But it remove another import org.codehaus.jackson.annotate.JsonIgnore wrongly.
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

 @JsonIgnoreProperties(ignoreUnknown = true)
 public class myClass {
     @JsonIgnore
     public boolean isDirty() {
         return false;
     }
 }

Are you interested in contributing a fix to OpenRewrite?

Yes if we agree that it's a bug.

@timtebeek Thanks for your reply!
Yes we find the rewrite-jackson repo and we are trying it, it should be helpful. But in this issue I just use the simple test to show the bug, and it's not rely on specific codehaus/fastxml class i think, it should be a common issue.

Let me take a look and provide a fix.


nix-daemon: remove CURL_CA_BUNDLE from sevice

Description of changes
This was set over six years ago and it doesn't seem to be needed.
I upgraded my nixos-unstable install just a few days ago and started getting ssl failures from the Nix daemon. Removing this line is the only thing that solved it.
Unless somebody has a good argument for why this is still needed I think it should be fine to remove.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/933

@ofborg eval

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/custom-binary-cache-behind-https-fails-with-unable-to-download-ssl-peer-certificate-or-ssh-remote-key-was-not-ok/25448/1


Hide header in Week View

How can I hide the header on the WeekView? The documentation and previous issues seem to imply that we can set dayTitleBuilder to null, but this property doesn't exist on the WeekView.

Set both back and forward buttons to false and in the header text style set font height to 0

Hi @hhelmric For hiding header on weekView. we can use weekPageHeaderBuilder property and return with SizedBox.shrink(). Its hide the weekView header.
weekPageHeaderBuilder: (_,__) {
return SizedBox.shrink();
},


Root form with numbers doesn't work

nlp.sentence("amusing") -> "amuse" (Good)
nlp.sentence("20 amusing") -> "20 amusing" (Doesn't conjugate amusing anymore...)

hi Shahar. yeah, this is a good point.
in fact, this is one of the main reasons i've started work on a big api change.
so i'm a bit confused with your example. are you calling verb.conjugate()? because neither 20 or amusing (adjective) are verbs that would have that method.
anyways, this problem should be addressed in v7.
cheers

No, I'm calling root().
i.e. - require('nlp_compromise').sentence("20 amusing").root()
Thanks for the reply - when is v7 due more or less?

sorry I didn't follow up, this works in a better way now, with .verbs().conjugate()
https://runkit.com/spencermountain/59a169d04038770012a4f578
cheers


[INLONG-3473][CI] Add support for chart testing

Fixes: #3473
Motivation
Use helm/chart-testing-action to test helm charts on GitHub Actions.
When the helm charts changes, they can be tested automatically.
Modifications

Add chart test workflow

Documentation
Have updated documentation, please check out https://github.com/shink/incubator-inlong/commit/45c705f611b791538fcd55007a41a6c85742bf2b

You can see https://github.com/shink/incubator-inlong/actions/workflows/ci_chart_test.yml

@dockerzhang Fixed. Please check out https://github.com/apache/incubator-inlong/actions/workflows/ci_chart_test.yml

@shink
1, please rebase after #4121 merged.
2, choose k8s version v1.21+ to avoid policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+ warnning.

2, choose k8s version v1.21+ to avoid policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+ warnning.

@dockerzhang
We can compate with different versions of Kubernetes in Helm Chart^1.
For example:
Warning: policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget

Then we can check apiVersion in the Chart.
{{- if .Capabilities.APIVersions.Has "policy/v1" }}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}


Use the Python "qrencode" library

Right now, we shell out to call the qrencode command, when we could use a Python library, qrencode.

The same issue was adressed by this Pull Request on liquidinvestigations/core repo and was merged. Please test it and possibly merge the Pull Request which solves the issue on this repo.


Relocate the GenPlugin and GenJSON plugins

The GenJSON and GenPlugin plugins were our first two plugins, and we've learned a lot since -- it's time we applied that back to these plugins.
I'm happy to treat gen-plugin as a special child, but I don't there is a technical reason for genplugin not to live with the rest of the plugins, especially once we get their testing environments hooked up in the CI workflow.
AC:

[ ] GenJSON plugin is standardized

[ ] Moved to the plugins directory
[ ] An AaC yaml file is created for the plugin
[ ] The plugin is refreshed via the genplugin plugin
[ ] Any tests are moved into the new plugin's tests directory

[ ] GenPlugin plugin is standardized

[ ] Moved to the plugins directory
[ ] An AaC yaml file is created for the plugin
[ ] The plugin is refreshed via the genplugin plugin
[ ] Any tests are moved into the new plugin's tests directory

I don't think we can do this until we improve our plugin CI and delivery/publication.  I keep wondering if we should perhaps do the opposite and move some of the plugins we've made into the main src folder so they become part of the core wheel publication.    Knowing that plugins exist and you have to install them doesn't seem very approachable for a novice AaC user.

This is no longer necessary because of #140


Refactor bot commands, configuration and data structure (#1)

Refactor bot to separate out commands into modules.

All of @magikid 's comments have been addressed so far. Let me know if there is anything else that can change


Add/Delete functionality

First off, thank you for creating this. It's simple and intuitive! I'm wanting to extend it with add/delete node functionality; do you have any recommendation?

Hi @NAisaac. I'm glad you're enjoying the library :) To add/delete nodes, I recommend simply modifying the array given to the tree prop.
handleLeafClick = () => {
  this.setState({
    tree: this.state.tree.concat({
      value: 'Parent D',
      nodes: [{ value: 'Child G' }, { value: 'Child H' }],
    })
  })
}

render() {
  return <MuiTreeView onLeafClick={this.handleLeafClick} tree={this.state.tree} />'
}

So get the node's value through onLeafClick function, then traverse the n-ary tree by value to perform add/delete, and finally setState tree?

Not necessarily. All you have to do is provide MuiTreeView with the new tree and the component will re-render.

Another example:
handleTreeChange = () => {
  const newTree = [{ value: 'Parent A' }];

  this.setState({ tree: newTree });
}

render() {
  return (
    <div>
      <button onClick={this.handleTreeChange}>Click me</button>
      <MuiTreeView tree={this.state.tree} />'
    </div>
  )
}

I was thinking an add/delete icon on each node 🤔Which would need some kind of tree traversal in order to create the newTree, no?

Ah, if you want the addition/deletion to happen after a user clicks on a leaf node, then you can definitely get the node's value through onLeafClick and then traverse the tree by value to perform the addition/deletion. Setting the state with the new tree will then update the view.


Allow complete specification of top-level schema.

Remove unused parameters from APISpec constructor.
Accept arbitrary **options to add to top-level schema.
Update tests.

@sloria: Not sure if accepting **options is ideal here, since it doesn't validate that passed keyword arguments are valid Swagger fields, but I also don't want a huge constructor that lists all possible options. We could define a (JSON) schema for validating options to prevent users from passing bad values. But this works for now.

Good change. Smore doesn't try to do much validation, so it's ok that the top-level properties don't get validated. Thanks


is it compatible with nextjs and server rendering?

Hello could you tell me if it compatible with nextjs and server rendering?
I'm getting an error n.useState is not a function
TypeError: n.useState is not a function
at exports.Waiter (/app/node_modules/react-wait/dist/react-wait.js:23:13)
at processChild (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2475:14)
at resolve (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2401:5)
at ReactDOMServerRenderer.render (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2728:22)
at ReactDOMServerRenderer.read (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2699:25)
at renderToString (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:3113:25)
at renderPage (/app/node_modules/next/dist/server/render.js:319:26)
at Function.getInitialProps (/app/node_modules/next/dist/server/document.js:65:25)
at _callee$ (/app/node_modules/next/dist/lib/utils.js:86:30)
at tryCatch (/app/node_modules/@babel/runtime-corejs2/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/app/node_modules/@babel/runtime-corejs2/node_modules/regenerator-runtime/runtime.js:288:22)
at Generator.prototype.(anonymous function) [as next] (/app/node_modules/@babel/runtime-corejs2/node_modules/regenerator-runtime/runtime.js:114:21)
at asyncGeneratorStep (/app/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:5:24)
at _next (/app/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:27:9)
at /app/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:34:7
at new Promise ()
I'm using nextjs version 7.0.2
or something different can cause this error?

It requires React's next version which is currently on draft. That's why it's not working.


Only one single-package release PR can be open at once

Bug description
I'm trying to use release-plz without automatic PR generation, and instead running release-plz release-pr -p some-workspace-crate. I expected to be able to open multiple PRs like that by running it several times in sequence, but the second one closed the first. I then tried running release-plz release-pr -p workspace-crate-one -p workspace-crate-two and release-plz release-pr -p workspace-crate-one,workspace-crate-two, since a single PR with the multiple releases would work fine for my use case. Neither of those worked.
Example PR that was renamed: https://github.com/trillium-rs/trillium/pull/525#event-11541825465
Is this an intended use case? I can serialize the releases to work around this but it saves time to run CI on the release PRs in parallel

Would you like to work on a fix? [y/n] y

but the second one closed the first

yes, that's the intended behavior unfortunately.
We need https://github.com/MarcoIeni/release-plz/issues/1029 to support this behavior.


Bevy the book

Hi Glyn,
Suggest adding https://bevyengine.org/learn/book/introduction/. Up to you whether for Unofficial or Application.
Thanks in advance.

Thanks @peter-kehl. That doesn't appear to be in mdbook format (although it's similar), in which case it should go in "Books in Other Formats". Can you tell whether it is in mdbook format? E.g. can you find the source for the book?

Thx.


[keybindings] Keybindings without "when" should be given lower priority

Than those with.
    This should somewhat reduce the need of excessive "when" clauses.
----
Version: 1.78.0
Commit: 252e5463d60e63238250799aef7375787f68b4ee
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:111.0) Gecko/20100101 Firefox/111.0
Embedder: github.dev

Sorry, this would break how the keybinding system is designed and what people are used to.

Changed indeed.
    But seems to have rather low impact on already defined settings. (shall break very few or probably no case)
    .
    Much lower than this [ https://github.com/microsoft/vscode/issues/165388#issuecomment-1313897825 ] one would do.


[1999] Fix trainees with old subjects

Context

https://trello.com/c/hoWiJpQH/1999-fix-the-existing-trainees-subjects-in-prod

Changes proposed in this pull request

Create a data migration to fix trainees in prod with old subjects based on the spreadsheet by Andrew

Guidance to review

Nothing this is a one time and irreversible data migration

 Fix the existing trainees subjects in prod


Add URL to Result for evidence and populate field with migration

Original Story Description:
Instead of using a Record/Document or TolaTable link as evidence, we now want to use a URL field directly on the Result model.
There is also an optional name field that needs to be added as well.
The existing evidence FK should not be removed, and instead should be preserved as not to destroy any existing Records or associates to those Records.
The existing TolaTable FK should also not be removed, and should be preserved to allow continued UI access to the TolaTable for migration purposes on the part of the end user.
Create a DB migration to populate the new URL and name field with the contents of a Document that is already associated as evidence on a Result. There will be not migration of data from existing TolaTable links to the new fields.
Acceptance Criteria:

URL is now an acceptable form of evidence
Form contains new input field "name" (Optional)
Create a migration to populate the new URL and name field with the contents of a Document that is
already associated as evidence on a Result.
Existing evidence FK should not be removed, and instead should be preserved as not to destroy any existing Records or associates to those Records.

Testing:

[ ] URL Form does not accept strings that are not recognized as a URL
[ ] All required fields remain as required
[ ] No optional fields are required
[ ] No previous evidence is overwritten or removed when submitting URL evidence
[ ] Information submitted is properly stored (Database table check)
[ ] Validate the function of evidence creation from start to finish of any type remains the same
[ ] Repeat steps in any forms or pages that contain the same form

Risks:
There should be no risks provided the acceptance criteria and testing marks are met.
Estimated Test Time (Acceptance):
1 - 2 hours

@KennyMonster For existing indicator results that had an existing document there were using as evidence, the document name and file path are transposed. For example, see screen shot below - the file path is in the record name and the record name is in the URL.

Remove comment above, the document has the URL in the  name and the name of the doc in URL. :facepalm:

Deployment Verification

[x] Confirmed “Ready for Deploy” status
[x] Confirmed Acceptance Criteria still met:

URL is now an acceptable form of evidence
Form contains new input field "name" (Optional)
Create a migration to populate the new URL and name field with the contents of a Document that is
already associated as evidence on a Result.
Existing evidence FK should not be removed, and instead should be preserved as not to destroy any existing Records or associates to those Records.

TolaTable links that we are preserving in the Evidence column are broken. Here are some examples from program 443 on QA

The link that is stored in the database is not a good link to view the data.  For viewing through a link, the stored link can be converted to a viewable link by rewriting a little bit of the URL.
The way to build it is to concatenate the domain address with "silo_detail/" and .  <silo_number> is the last number in the stored link.  The final URL should be something like:  https://tola-tables.mercycorps.org/silo_detail/2701/

Deployment Verification

[x] Confirmed “Ready for Deploy” status
[x] Confirmed Acceptance Criteria still met:

URL is now an acceptable form of evidence
Form contains new input field "name" (Optional)
Create a migration to populate the new URL and name field with the contents of a Document that is
already associated as evidence on a Result.
Existing evidence FK should not be removed, and instead should be preserved as not to destroy any existing Records or associates to those Records.
EXISTING Tola-Tables are working now as described in the comment from @sanjuroj , and the links are no longer broken


Handle intentionally bad code

For whatever reason the chef repo has files with an .rb extension with garbage text: https://github.com/chef/chef/blob/master/spec/data/cookbooks/ignorken/recipes/ignoreme.rb
This was getting into the on_string_literal method with only one element on the string_delimiter stack, making start_delim nil on line 217: https://github.com/penelopezone/rubyfmt/blob/641534ce3730eaf060115a0c59b6bbbdd55ef4c0/librubyfmt/rubyfmt_lib.rb#L217
Before:
$ cat ../chef/spec/data/cookbooks/ignorken/recipes/ignoreme.rb | ./target/release/rubyfmt-main
A ruby error occurred: #<NoMethodError: undefined method `start_with?' for nil:NilClass>, please file a bug report at https://github.com/penelopezone/rubyfmt/issues/new

After:
$ cat ../chef/spec/data/cookbooks/ignorken/recipes/ignoreme.rb | ./target/release/rubyfmt-main
stdin contained invalid ruby syntax

This does fix the crash, but I wanted to see if I could add a regression test for this and maybe refactor the code a little.

It's interpreting %$ as the opening delimiter for a string delimited with two $ but since there's only one in the file the delimiter stack only has one element. I tried a few things like ' and it failed in the same way. This feels like it might be a bug in ripper (why trigger events when you know it's invalid code?) but its easy enough to workaround.


Remove client dial loop.

WithBlock waits for connection anyway. Also, when an error happens there, it's better to just die and let Kubernetes restart the container.
References #21.

does stopping still works as before ?

You are right, we do not need the stop channel here anymore. I removed it from the function.


chore: lock files maintenance

🔨 update lock files to use the latest gRPC

Codecov Report

Merging #20 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master    #20   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           1      1
  Lines           4      4
=====================================
  Hits            4      4

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 df6aa42...86a749c. Read the comment docs.