Allow mix of hdr and non-hdr cameras to same render target

Changes:

Track whether an output texture has been written to yet and only clear it on the first write.
Use ClearColorConfig on CameraOutputMode instead of a raw LoadOp.
Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode.

Fixes #6754
Testing
Tested against provided test case in issue:

Changelog

Allow cameras rendering to the same output texture with mixed hdr to work correctly.

Migration Guide

Change CameraOutputMode to use ClearColorConfig instead of LoadOp.

I checked the split_screen example, setting one of the cameras to hdr results in different issues based on which camera is set to be hdr
camera 0:
Foxes 2 and 3 (from camera 1 and 2) leave a trace on rotating

camera 1 and 2:
corresponding foxes (and ui) are not showing up

camera 3:
fox 4 (camera 3) leaves a trace on rotation

my system:
2024-05-20T12:12:44.069461Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux 23.10 Ubuntu", kernel: "6.5.0-35-generic", cpu: "12th Gen Intel(R) Core(TM) i7-12800H", core_count: "14", memory: "31.0 GiB" }
2024-05-20T12:12:44.078237Z  INFO bevy_winit::system: Creating new window "App" (Entity { index: 0, generation: 1 })
2024-05-20T12:12:44.078435Z  INFO log: Guessed window scale factor: 1
2024-05-20T12:12:44.118479Z  INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) Graphics (ADL GT2)", vendor: 32902, device: 17958, device_type: IntegratedGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 23.2.1-1ubuntu3.1", backend: Vulkan }

commit: 8bdaffcee3f4e174d5bc8e5a16868a5758ff790f

I checked the split_screen example, setting one of the cameras to hdr results in different issues based on which camera is...

Can reproduce, thanks.

So for split_screen, this behavior is kind of hurting my head, and there's a question here in terms of what the desired behavior actually even is. There's at least a few things going on.

Most importantly per the example's logic, if you set a camera after 0 to hdr: true, then you must also set a ClearColorConfig for the camera at that index. Missing this will break a lot of the permutations I tested.
The blend mode really matters. For example, if I set camera 1 and 2 to hdr: true, by default I get traces:

but if I change the blend_state to something custom (i.e. not ALPHA_BLENDING) by using CameraOutputMode everything blends out better (in the sense of, no artifacts).

Turning off MSAA affects things a lot. Here's the same corrected blend as above but with MSAA off.

I guess part of my confusion here is that I don't think using mixed HDR cameras makes any sense in the scenario where you are also setting the viewport, because we will apply a blend state to the entire screen that makes it difficult to get the correct look within a single viewport.
In other words, I don't think it's possible to make this "just work" given the current state of the renderer. We make a best guess for the blend state, but more complex scenarios with interlaced cameras require a bit more intentional thought here about what the desired look is.
There may be other stuff going on here that I'm missing.

Then maybe the current setup is correct?
If a user wants a configuration with multiple cameras or targets with different settings, it's their responsibility to provide the appropriate settings for blending and clearing behavior. The user can also specify the camera order, which should suffice for most cases, if not all.
@tychedelia, do you have an example where it's not possible to achieve the correct result using only client-side settings without your changes?
Example from this comment https://github.com/bevyengine/bevy/issues/6754#issuecomment-2034704073 works fine on main with
output_mode: CameraOutputMode::Write {
    blend_state: Some(BlendState::ALPHA_BLENDING),
    color_attachment_load_op: LoadOp::Load,
},

on hdr camera
I tried to investigate the same issue some time ago, there are few messages in discord about this https://discord.com/channels/691052431525675048/743663924229963868/1235125809707225098
But I gave up because I wasn't sure what should be the correct behavior :laughing:

Okay, there's definitely still some strange interaction with MSAA enabled that I don't totally understand. Still looking into it.

@arcashka Okay, I was getting totally turned around around because the blend state is indeed really important. But the traces were coming from a weird interaction with MSAA I just fixed. Please try again and let me know if this solves your problems.
@JMS55 https://github.com/bevyengine/bevy/pull/13419/commits/d6159c409512c7930d9461879ad6e01e7beab808 was a real doozy to track down. The issue here was that the MSAA writeback was being triggered purely on the basis of the view target. In a scenario with mixed hdr, this meant that, e.g., a hdr camera with order 1 could have it's texture marked as clear when post_process_write is called when it actually hasn't been cleared yet because it hasn't even been written to yet. This means that the first call logic doesn't work and we always load. I fixed this by tracking hdr on ExtractedCamera and using that to trigger the writeback, which I think works??

Here's the blend state I'm using for reference:
                            CameraOutputMode::Write {
                                blend_state: Some(BlendState {
                                    color: BlendComponent {
                                        src_factor: BlendFactor::SrcAlpha,
                                        dst_factor: BlendFactor::OneMinusSrcAlpha,
                                        operation: BlendOperation::Min,
                                    },
                                    alpha: BlendComponent::OVER,
                                }),
                                clear_color: ClearColorConfig::None,
                            }

@tychedelia I've checked the example from https://github.com/bevyengine/bevy/issues/6754#issuecomment-2034704073 and now it's not working, only green cube from hdr camera shows up. I tried different blend modes and clear_color: ClearColorConfig::None
I've managed to make it work locally by reverting https://github.com/bevyengine/bevy/commit/19b3d4c97298ddb36468316d69c12545290e5f95, but that would probably bring back the issue with traces :(

@tychedelia I've checked the example from #6754 (comment) and now it's not working, only green cube from hdr camera shows up. I tried different blend modes and clear_color: ClearColorConfig::None
I've managed to make it work locally by reverting 19b3d4c, but that would probably bring back the issue with traces :(

Just checked and this is still working for me on 18640c76d?

Here's the archive just to confirm:
hdr_issue_fixed.zip

@tychedelia ah, I missed clear_color on the camera itself, was setting it only for output_mode. Thank you, now this example works.
And regarding split_screen example, have you managed to make it work with your changes? For me it's always either hdr fox is not showing up or the rest of them leave traces. I tried a lot of different combinations of clear colors and blending modes, none worked for me

And regarding split_screen example, have you managed to make it work with your changes? For me it's always either hdr fox is not showing up or the rest of them leave traces. I tried a lot of different combinations of clear colors and blending modes, none worked for me

I'll post my example when I get home for split screen, but traces shouldn't be there anymore unless the clear config is set to none. The traces you were originally seeing were definitely an effect of the MSAA bug I discovered, but getting the coming right can be a pain. Apologies, I should have just posted my reference split screen for others to verify. Thanks for bearing with me here.

(true, false, false, false)

//! Renders two cameras to the same window to accomplish "split screen".

use std::f32::consts::PI;

use bevy::render::camera::CameraOutputMode;
use bevy::render::render_resource::{BlendComponent, BlendFactor, BlendOperation, BlendState};
use bevy::{
    pbr::CascadeShadowConfigBuilder, prelude::*, render::camera::Viewport, window::WindowResized,
};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .add_systems(Update, (set_camera_viewports, button_system))
        .run();
}

/// set up a simple 3D scene
fn setup(
    mut commands: Commands,
    asset_server: Res<AssetServer>,
    mut meshes: ResMut<Assets<Mesh>>,
    mut materials: ResMut<Assets<StandardMaterial>>,
) {
    // plane
    commands.spawn(PbrBundle {
        mesh: meshes.add(Plane3d::default().mesh().size(100.0, 100.0)),
        material: materials.add(Color::srgb(0.3, 0.5, 0.3)),
        ..default()
    });

    commands.spawn(SceneBundle {
        scene: asset_server.load("models/animated/Fox.glb#Scene0"),
        ..default()
    });

    // Light
    commands.spawn(DirectionalLightBundle {
        transform: Transform::from_rotation(Quat::from_euler(EulerRot::ZYX, 0.0, 1.0, -PI / 4.)),
        directional_light: DirectionalLight {
            shadows_enabled: true,
            ..default()
        },
        cascade_shadow_config: CascadeShadowConfigBuilder {
            num_cascades: 2,
            first_cascade_far_bound: 200.0,
            maximum_distance: 280.0,
            ..default()
        }
        .into(),
        ..default()
    });

    // Cameras and their dedicated UI
    for (index, (camera_name, camera_pos, hdr)) in [
        ("Player 1", Vec3::new(0.0, 200.0, -150.0), true),
        ("Player 2", Vec3::new(150.0, 150., 50.0), false),
        ("Player 3", Vec3::new(100.0, 150., -150.0), false),
        ("Player 4", Vec3::new(-100.0, 80., 150.0), false),
    ]
    .iter()
    .enumerate()
    {
        let camera = commands
            .spawn((
                Camera3dBundle {
                    transform: Transform::from_translation(*camera_pos)
                        .looking_at(Vec3::ZERO, Vec3::Y),
                    camera: Camera {
                        hdr: *hdr,
                        // Renders cameras with different priorities to prevent ambiguities
                        order: index as isize,
                        // Don't clear after the first camera because the first camera already cleared the entire window
                        clear_color: if index > 1 {
                            ClearColorConfig::None
                        } else {
                            ClearColorConfig::default()
                        },
                        output_mode: if index > 0 {
                            CameraOutputMode::Write {
                                blend_state: Some(BlendState {
                                    color: BlendComponent {
                                        src_factor: BlendFactor::SrcAlpha,
                                        dst_factor: BlendFactor::OneMinusSrcAlpha,
                                        operation: BlendOperation::Max,
                                    },
                                    alpha: BlendComponent::OVER,
                                }),
                                clear_color: ClearColorConfig::None,
                            }
                        } else {
                            CameraOutputMode::Write {
                                blend_state: Some(BlendState::ALPHA_BLENDING),
                                clear_color: ClearColorConfig::None,
                            }
                        },
                        ..default()
                    },
                    ..default()
                },
                CameraPosition {
                    pos: UVec2::new((index % 2) as u32, (index / 2) as u32),
                },
            ))
            .id();

        // Set up UI
        commands
            .spawn((
                TargetCamera(camera),
                NodeBundle {
                    style: Style {
                        width: Val::Percent(100.),
                        height: Val::Percent(100.),
                        padding: UiRect::all(Val::Px(20.)),
                        ..default()
                    },
                    ..default()
                },
            ))
            .with_children(|parent| {
                parent.spawn(TextBundle::from_section(
                    *camera_name,
                    TextStyle {
                        font_size: 20.,
                        ..default()
                    },
                ));
                buttons_panel(parent);
            });
    }

    fn buttons_panel(parent: &mut ChildBuilder) {
        parent
            .spawn(NodeBundle {
                style: Style {
                    position_type: PositionType::Absolute,
                    width: Val::Percent(100.),
                    height: Val::Percent(100.),
                    display: Display::Flex,
                    flex_direction: FlexDirection::Row,
                    justify_content: JustifyContent::SpaceBetween,
                    align_items: AlignItems::Center,
                    padding: UiRect::all(Val::Px(20.)),
                    ..default()
                },
                ..default()
            })
            .with_children(|parent| {
                rotate_button(parent, "<", Direction::Left);
                rotate_button(parent, ">", Direction::Right);
            });
    }

    fn rotate_button(parent: &mut ChildBuilder, caption: &str, direction: Direction) {
        parent
            .spawn((
                RotateCamera(direction),
                ButtonBundle {
                    style: Style {
                        width: Val::Px(40.),
                        height: Val::Px(40.),
                        border: UiRect::all(Val::Px(2.)),
                        justify_content: JustifyContent::Center,
                        align_items: AlignItems::Center,
                        ..default()
                    },
                    border_color: Color::WHITE.into(),
                    image: UiImage::default().with_color(Color::srgb(0.25, 0.25, 0.25)),
                    ..default()
                },
            ))
            .with_children(|parent| {
                parent.spawn(TextBundle::from_section(
                    caption,
                    TextStyle {
                        font_size: 20.,
                        ..default()
                    },
                ));
            });
    }
}

#[derive(Component)]
struct CameraPosition {
    pos: UVec2,
}

#[derive(Component)]
struct RotateCamera(Direction);

enum Direction {
    Left,
    Right,
}

fn set_camera_viewports(
    windows: Query<&Window>,
    mut resize_events: EventReader<WindowResized>,
    mut query: Query<(&CameraPosition, &mut Camera)>,
) {
    // We need to dynamically resize the camera's viewports whenever the window size changes
    // so then each camera always takes up half the screen.
    // A resize_event is sent when the window is first created, allowing us to reuse this system for initial setup.
    for resize_event in resize_events.read() {
        let window = windows.get(resize_event.window).unwrap();
        let size = window.physical_size() / 2;

        for (camera_position, mut camera) in &mut query {
            camera.viewport = Some(Viewport {
                physical_position: camera_position.pos * size,
                physical_size: size,
                ..default()
            });
        }
    }
}

#[allow(clippy::type_complexity)]
fn button_system(
    interaction_query: Query<
        (&Interaction, &TargetCamera, &RotateCamera),
        (Changed<Interaction>, With<Button>),
    >,
    mut camera_query: Query<&mut Transform, With<Camera>>,
) {
    for (interaction, target_camera, RotateCamera(direction)) in &interaction_query {
        if let Interaction::Pressed = *interaction {
            // Since TargetCamera propagates to the children, we can use it to find
            // which side of the screen the button is on.
            if let Ok(mut camera_transform) = camera_query.get_mut(target_camera.entity()) {
                let angle = match direction {
                    Direction::Left => -0.1,
                    Direction::Right => 0.1,
                };
                camera_transform.rotate_around(Vec3::ZERO, Quat::from_axis_angle(Vec3::Y, angle));
            }
        }
    }
}

(true, true, false, false)

//! Renders two cameras to the same window to accomplish "split screen".

use std::f32::consts::PI;

use bevy::render::camera::CameraOutputMode;
use bevy::render::render_resource::{BlendComponent, BlendFactor, BlendOperation, BlendState};
use bevy::{
    pbr::CascadeShadowConfigBuilder, prelude::*, render::camera::Viewport, window::WindowResized,
};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .add_systems(Update, (set_camera_viewports, button_system))
        .run();
}

/// set up a simple 3D scene
fn setup(
    mut commands: Commands,
    asset_server: Res<AssetServer>,
    mut meshes: ResMut<Assets<Mesh>>,
    mut materials: ResMut<Assets<StandardMaterial>>,
) {
    // plane
    commands.spawn(PbrBundle {
        mesh: meshes.add(Plane3d::default().mesh().size(100.0, 100.0)),
        material: materials.add(Color::srgb(0.3, 0.5, 0.3)),
        ..default()
    });

    commands.spawn(SceneBundle {
        scene: asset_server.load("models/animated/Fox.glb#Scene0"),
        ..default()
    });

    // Light
    commands.spawn(DirectionalLightBundle {
        transform: Transform::from_rotation(Quat::from_euler(EulerRot::ZYX, 0.0, 1.0, -PI / 4.)),
        directional_light: DirectionalLight {
            shadows_enabled: true,
            ..default()
        },
        cascade_shadow_config: CascadeShadowConfigBuilder {
            num_cascades: 2,
            first_cascade_far_bound: 200.0,
            maximum_distance: 280.0,
            ..default()
        }
        .into(),
        ..default()
    });

    // Cameras and their dedicated UI
    for (index, (camera_name, camera_pos, hdr)) in [
        ("Player 1", Vec3::new(0.0, 200.0, -150.0), true),
        ("Player 2", Vec3::new(150.0, 150., 50.0), true),
        ("Player 3", Vec3::new(100.0, 150., -150.0), false),
        ("Player 4", Vec3::new(-100.0, 80., 150.0), false),
    ]
    .iter()
    .enumerate()
    {
        let camera = commands
            .spawn((
                Camera3dBundle {
                    transform: Transform::from_translation(*camera_pos)
                        .looking_at(Vec3::ZERO, Vec3::Y),
                    camera: Camera {
                        hdr: *hdr,
                        // Renders cameras with different priorities to prevent ambiguities
                        order: index as isize,
                        // Don't clear after the first camera because the first camera already cleared the entire window
                        clear_color: if index == 1 || index == 3 {
                            ClearColorConfig::None
                        } else {
                            ClearColorConfig::default()
                        },
                        output_mode: CameraOutputMode::Write {
                            blend_state: Some(BlendState {
                                color: BlendComponent {
                                    src_factor: BlendFactor::SrcAlpha,
                                    dst_factor: BlendFactor::OneMinusSrcAlpha,
                                    operation: BlendOperation::Max,
                                },
                                alpha: BlendComponent::OVER,
                            }),
                            clear_color: ClearColorConfig::None,
                        },
                        ..default()
                    },
                    ..default()
                },
                CameraPosition {
                    pos: UVec2::new((index % 2) as u32, (index / 2) as u32),
                },
            ))
            .id();

        // Set up UI
        commands
            .spawn((
                TargetCamera(camera),
                NodeBundle {
                    style: Style {
                        width: Val::Percent(100.),
                        height: Val::Percent(100.),
                        padding: UiRect::all(Val::Px(20.)),
                        ..default()
                    },
                    ..default()
                },
            ))
            .with_children(|parent| {
                parent.spawn(TextBundle::from_section(
                    *camera_name,
                    TextStyle {
                        font_size: 20.,
                        ..default()
                    },
                ));
                buttons_panel(parent);
            });
    }

    fn buttons_panel(parent: &mut ChildBuilder) {
        parent
            .spawn(NodeBundle {
                style: Style {
                    position_type: PositionType::Absolute,
                    width: Val::Percent(100.),
                    height: Val::Percent(100.),
                    display: Display::Flex,
                    flex_direction: FlexDirection::Row,
                    justify_content: JustifyContent::SpaceBetween,
                    align_items: AlignItems::Center,
                    padding: UiRect::all(Val::Px(20.)),
                    ..default()
                },
                ..default()
            })
            .with_children(|parent| {
                rotate_button(parent, "<", Direction::Left);
                rotate_button(parent, ">", Direction::Right);
            });
    }

    fn rotate_button(parent: &mut ChildBuilder, caption: &str, direction: Direction) {
        parent
            .spawn((
                RotateCamera(direction),
                ButtonBundle {
                    style: Style {
                        width: Val::Px(40.),
                        height: Val::Px(40.),
                        border: UiRect::all(Val::Px(2.)),
                        justify_content: JustifyContent::Center,
                        align_items: AlignItems::Center,
                        ..default()
                    },
                    border_color: Color::WHITE.into(),
                    image: UiImage::default().with_color(Color::srgb(0.25, 0.25, 0.25)),
                    ..default()
                },
            ))
            .with_children(|parent| {
                parent.spawn(TextBundle::from_section(
                    caption,
                    TextStyle {
                        font_size: 20.,
                        ..default()
                    },
                ));
            });
    }
}

#[derive(Component)]
struct CameraPosition {
    pos: UVec2,
}

#[derive(Component)]
struct RotateCamera(Direction);

enum Direction {
    Left,
    Right,
}

fn set_camera_viewports(
    windows: Query<&Window>,
    mut resize_events: EventReader<WindowResized>,
    mut query: Query<(&CameraPosition, &mut Camera)>,
) {
    // We need to dynamically resize the camera's viewports whenever the window size changes
    // so then each camera always takes up half the screen.
    // A resize_event is sent when the window is first created, allowing us to reuse this system for initial setup.
    for resize_event in resize_events.read() {
        let window = windows.get(resize_event.window).unwrap();
        let size = window.physical_size() / 2;

        for (camera_position, mut camera) in &mut query {
            camera.viewport = Some(Viewport {
                physical_position: camera_position.pos * size,
                physical_size: size,
                ..default()
            });
        }
    }
}

#[allow(clippy::type_complexity)]
fn button_system(
    interaction_query: Query<
        (&Interaction, &TargetCamera, &RotateCamera),
        (Changed<Interaction>, With<Button>),
    >,
    mut camera_query: Query<&mut Transform, With<Camera>>,
) {
    for (interaction, target_camera, RotateCamera(direction)) in &interaction_query {
        if let Interaction::Pressed = *interaction {
            // Since TargetCamera propagates to the children, we can use it to find
            // which side of the screen the button is on.
            if let Ok(mut camera_transform) = camera_query.get_mut(target_camera.entity()) {
                let angle = match direction {
                    Direction::Left => -0.1,
                    Direction::Right => 0.1,
                };
                camera_transform.rotate_around(Vec3::ZERO, Quat::from_axis_angle(Vec3::Y, angle));
            }
        }
    }
}

(false, false, true, false)

//! Renders two cameras to the same window to accomplish "split screen".

use std::f32::consts::PI;

use bevy::render::camera::CameraOutputMode;
use bevy::render::render_resource::{BlendComponent, BlendFactor, BlendOperation, BlendState};
use bevy::{
    pbr::CascadeShadowConfigBuilder, prelude::*, render::camera::Viewport, window::WindowResized,
};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .add_systems(Update, (set_camera_viewports, button_system))
        .run();
}

/// set up a simple 3D scene
fn setup(
    mut commands: Commands,
    asset_server: Res<AssetServer>,
    mut meshes: ResMut<Assets<Mesh>>,
    mut materials: ResMut<Assets<StandardMaterial>>,
) {
    // plane
    commands.spawn(PbrBundle {
        mesh: meshes.add(Plane3d::default().mesh().size(100.0, 100.0)),
        material: materials.add(Color::srgb(0.3, 0.5, 0.3)),
        ..default()
    });

    commands.spawn(SceneBundle {
        scene: asset_server.load("models/animated/Fox.glb#Scene0"),
        ..default()
    });

    // Light
    commands.spawn(DirectionalLightBundle {
        transform: Transform::from_rotation(Quat::from_euler(EulerRot::ZYX, 0.0, 1.0, -PI / 4.)),
        directional_light: DirectionalLight {
            shadows_enabled: true,
            ..default()
        },
        cascade_shadow_config: CascadeShadowConfigBuilder {
            num_cascades: 2,
            first_cascade_far_bound: 200.0,
            maximum_distance: 280.0,
            ..default()
        }
        .into(),
        ..default()
    });

    // Cameras and their dedicated UI
    for (index, (camera_name, camera_pos, hdr)) in [
        ("Player 1", Vec3::new(0.0, 200.0, -150.0), false),
        ("Player 2", Vec3::new(150.0, 150., 50.0), false),
        ("Player 3", Vec3::new(100.0, 150., -150.0), true),
        ("Player 4", Vec3::new(-100.0, 80., 150.0), false),
    ]
    .iter()
    .enumerate()
    {
        let camera = commands
            .spawn((
                Camera3dBundle {
                    transform: Transform::from_translation(*camera_pos)
                        .looking_at(Vec3::ZERO, Vec3::Y),
                    camera: Camera {
                        hdr: *hdr,
                        // Renders cameras with different priorities to prevent ambiguities
                        order: index as isize,
                        // Don't clear after the first camera because the first camera already cleared the entire window
                        clear_color: if index == 0 || index == 2 {
                            ClearColorConfig::default()
                        } else {
                            ClearColorConfig::None
                        },
                        output_mode: CameraOutputMode::Write {
                            blend_state: Some(BlendState {
                                color: BlendComponent {
                                    src_factor: BlendFactor::SrcAlpha,
                                    dst_factor: BlendFactor::OneMinusSrcAlpha,
                                    operation: BlendOperation::Max,
                                },
                                alpha: BlendComponent::OVER,
                            }),
                            clear_color: ClearColorConfig::None,
                        },
                        ..default()
                    },
                    ..default()
                },
                CameraPosition {
                    pos: UVec2::new((index % 2) as u32, (index / 2) as u32),
                },
            ))
            .id();

        // Set up UI
        commands
            .spawn((
                TargetCamera(camera),
                NodeBundle {
                    style: Style {
                        width: Val::Percent(100.),
                        height: Val::Percent(100.),
                        padding: UiRect::all(Val::Px(20.)),
                        ..default()
                    },
                    ..default()
                },
            ))
            .with_children(|parent| {
                parent.spawn(TextBundle::from_section(
                    *camera_name,
                    TextStyle {
                        font_size: 20.,
                        ..default()
                    },
                ));
                buttons_panel(parent);
            });
    }

    fn buttons_panel(parent: &mut ChildBuilder) {
        parent
            .spawn(NodeBundle {
                style: Style {
                    position_type: PositionType::Absolute,
                    width: Val::Percent(100.),
                    height: Val::Percent(100.),
                    display: Display::Flex,
                    flex_direction: FlexDirection::Row,
                    justify_content: JustifyContent::SpaceBetween,
                    align_items: AlignItems::Center,
                    padding: UiRect::all(Val::Px(20.)),
                    ..default()
                },
                ..default()
            })
            .with_children(|parent| {
                rotate_button(parent, "<", Direction::Left);
                rotate_button(parent, ">", Direction::Right);
            });
    }

    fn rotate_button(parent: &mut ChildBuilder, caption: &str, direction: Direction) {
        parent
            .spawn((
                RotateCamera(direction),
                ButtonBundle {
                    style: Style {
                        width: Val::Px(40.),
                        height: Val::Px(40.),
                        border: UiRect::all(Val::Px(2.)),
                        justify_content: JustifyContent::Center,
                        align_items: AlignItems::Center,
                        ..default()
                    },
                    border_color: Color::WHITE.into(),
                    image: UiImage::default().with_color(Color::srgb(0.25, 0.25, 0.25)),
                    ..default()
                },
            ))
            .with_children(|parent| {
                parent.spawn(TextBundle::from_section(
                    caption,
                    TextStyle {
                        font_size: 20.,
                        ..default()
                    },
                ));
            });
    }
}

#[derive(Component)]
struct CameraPosition {
    pos: UVec2,
}

#[derive(Component)]
struct RotateCamera(Direction);

enum Direction {
    Left,
    Right,
}

fn set_camera_viewports(
    windows: Query<&Window>,
    mut resize_events: EventReader<WindowResized>,
    mut query: Query<(&CameraPosition, &mut Camera)>,
) {
    // We need to dynamically resize the camera's viewports whenever the window size changes
    // so then each camera always takes up half the screen.
    // A resize_event is sent when the window is first created, allowing us to reuse this system for initial setup.
    for resize_event in resize_events.read() {
        let window = windows.get(resize_event.window).unwrap();
        let size = window.physical_size() / 2;

        for (camera_position, mut camera) in &mut query {
            camera.viewport = Some(Viewport {
                physical_position: camera_position.pos * size,
                physical_size: size,
                ..default()
            });
        }
    }
}

#[allow(clippy::type_complexity)]
fn button_system(
    interaction_query: Query<
        (&Interaction, &TargetCamera, &RotateCamera),
        (Changed<Interaction>, With<Button>),
    >,
    mut camera_query: Query<&mut Transform, With<Camera>>,
) {
    for (interaction, target_camera, RotateCamera(direction)) in &interaction_query {
        if let Interaction::Pressed = *interaction {
            // Since TargetCamera propagates to the children, we can use it to find
            // which side of the screen the button is on.
            if let Ok(mut camera_transform) = camera_query.get_mut(target_camera.entity()) {
                let angle = match direction {
                    Direction::Left => -0.1,
                    Direction::Right => 0.1,
                };
                camera_transform.rotate_around(Vec3::ZERO, Quat::from_axis_angle(Vec3::Y, angle));
            }
        }
    }
}

hello @tychedelia, thank you for providing examples, I don't think I would've ever came up with using BlendOperation::Max myself. Still not sure how exactly that works :laughing:
Anyway, I checked all of your examples and they work. Then I tried different combinations of your commits, and looks like https://github.com/bevyengine/bevy/pull/13419/commits/8bdaffcee3f4e174d5bc8e5a16868a5758ff790f is the fix here.
https://github.com/bevyengine/bevy/pull/13419/commits/5e80886ca8b2f251cb5eaa451ee417e52c8e6de7 doesn't makes a difference, it was the same behavior with and without it.
Do you think https://github.com/bevyengine/bevy/pull/13419/commits/5e80886ca8b2f251cb5eaa451ee417e52c8e6de7 is still required? Do you have any scenarios where it's not possible to get correct output without these changes?

Thanks for checking!

Do you think 5e80886 is still required? Do you have any scenarios where it's not possible to get correct output without these changes?

Yes, it's necessary for scenarios where the cameras render to the same viewport size.

I think I found another issue. I added this system to rotate cubes from https://github.com/bevyengine/bevy/files/15405152/hdr_issue_fixed.zip
fn move_mesh(mut transforms: Query<&mut Transform, With<Handle<Mesh>>>, time: Res<Time>) {
    for mut transform in &mut transforms {
        transform.rotate_y(time.delta_seconds());
    }
}

And it results in traces on 18640c76d49598d536db80a23accd72af693d5fe. Changing blending/clear_color on output_mode didn't help

And it results in traces on 18640c7. Changing blending/clear_color on output_mode didn't help

Here's some camera settings:

![image](https://github.com/bevyengine/bevy/assets/10366310/ce0b44ef-8a58-4e2c-859b-e961f45ffedf)
Camera3dBundle {
      transform: Transform::from_translation(Vec3::splat(10.0)).looking_at(Vec3::ZERO, Vec3::Y),
      camera: Camera {
        clear_color: ClearColorConfig::Custom(Color::BLACK),
        order: 1,
        hdr: true,
        output_mode: CameraOutputMode::Write {
          clear_color: ClearColorConfig::None,
          blend_state: Some(BlendState{
            color: BlendComponent {
              src_factor: BlendFactor::OneMinusSrc,
              dst_factor: BlendFactor::OneMinusDst,
              operation: BlendOperation::Max,
            },
            alpha: BlendComponent::OVER,
          }),
        },
        ..Default::default()
      },
      ..Default::default()
    }

We make it possible, but it's tricky. For example, if you clear the first camera with blue, these settings would wash out the green with the blue. In practice, mixing these cameras without really intentional purpose feels like a mistake to me? But I feel pretty confident this PR has at least made it possible where it wasn't before.

Yes these settings are working, you are right, thank you!
They are also working with only msaa writeback changes.
I agree this PR makes possible the cases which were not possible before. But I think only 19b3d4c97298ddb36468316d69c12545290e5f95 changes are helping here. Haven't seen a single case which is fixed by 5e80886ca8b2f251cb5eaa451ee417e52c8e6de7. It's always working the same with and without it.

I agree this PR makes possible the cases which were not possible before. But I think only 19b3d4c changes are helping here. Haven't seen a single case which is fixed by 5e80886. It's always working the same with and without it.

Yes, 19b3d4c97298ddb36468316d69c12545290e5f95 is the primary defect here, in the sense that previously it was making certain manually configured output_mode settings not take effect.
However, 5e80886ca8b2f251cb5eaa451ee417e52c8e6de7 allows mixed hdr cameras to "just work" without having to manually configure output_mode. You can test this with the hdr_issue example I provided, if you only cherry-pick 19b3d4c97298ddb36468316d69c12545290e5f95 it will no longer work, because the default load op configured on the camera will clear the output texture.
Also, I realized a better fix to your mesh movement in hdr_issue (and potentially some of the fox examples too) is actually just to set ClearColorConfig::Custom(Color::NONE) on the second camera, which will clear the previous frame but not add a background. The issue with adding a background is that then you have to think about how the background should blend with meshes that were rendered by previous camera. The BlendOperation::Max examples I was providing you were kind of a hack around this -- basically any color (i.e. the cube) is always going to be greater than the gray background, which means we would blend the previous mesh correctly, but this is also something that would break down quickly outside of a simple example.
Let me know if that makes sense.

I'm not fully certain yet if the ability to not set the camera's output mode to the correct values is a good thing here. I understand your point, but it's just weird to me that in the hdr_issue example, if I set the output_mode to something like:
output_mode: CameraOutputMode::Write {
    clear_color: ClearColorConfig::Custom(LinearRgba::RED.into()),
    blend_state: None,
},

the output would be two cubes on a grey background instead of one cube on a red background. I think requiring the user to be explicit is a better approach here. That being said, I think the original issue is resolved, and it's totally fine if you decide to leave the PR as it is. Thank you for bearing with me here :smiley:
The ClearColorConfig::Custom(Color::NONE) is a really nice find! And thank you for explanation on why BlendOperation::Max was working, I was really confused by it. Definitely learned a bunch of new stuff from this PR

I'm not fully certain yet if the ability to not set the camera's output mode to the correct values is a good thing here.

I agree that it's weird, but it functions similarly to how the clear config works for a camera's non-output texture where only the first configured clear will take effect. Overall, I think this is more consistent, but maybe should be documented better across the board that the first camera for any texture is the one that controls this. We might be able to fiddle a bit and allow an explicit overwrite just by making the default ClearColorConfig::None.

Definitely learned a bunch of new stuff from this PR

Thanks for helping get it into a good place!

I'm a bit nervous about adding more special casing / implicit behavior to our camera configuration, but I do think this makes things more usable and consistent in this context.

I agree -- the current clear behavior with multiple cameras is surprising. But at least this PR makes it consistent. Not sure about how the new render graph will affect this, but it feels like all of these should be Option<ClearColorConfig> maybe so we can distinguish between explicit and implicit requests to clear.


Live stream play form .m3u8 file with track player and  even when app in Background.

Hello There ,
Thank you for this awesome library. I have requirement to play audio from Live stream URL from .m3u8 file. Can anyone please let me know is it supported in Track player? And How I can keep audio playing  in Background mode also in Android and specially IOS . That will be very helpful  thank you.

Hi @Depthol93 I'm tidying up some of the older Issues. Let me know if you still need to discuss this. Thank you


missing support for s2i builds using contextdir

Lack of s2i/bin dir in each version context dir makes builds in openshift difficult. PR coming

Thanks Dale!
I wanted to keep all the scripts together to reduce maintenance burden (the thinking being that multiple copies means having to update multiple scripts every time a change is made). How are you building them, using the Docker build strategy on OpenShift? Would it help if these were published to DockerHub?

In production I generally prefer to build the images myself rather than pull from Dockerhub. In the case of s2i-python I need to make local changes during the build.
eg
oc new-project dlbewley
oc create -f https://raw.githubusercontent.com/dlbewley/s2i-go/contextdir-s2i/imagestream.yaml
oc create -f https://raw.githubusercontent.com/dlbewley/s2i-go/contextdir-s2i/buildconfig.yaml
oc start-build go-17-centos7 --follow

In my case I use a project to which all developers are granted image pull access. Now users can
oc new-app dlbewley/go-17-centos7~https://gitlab/my-go.git

I've repurposed this issue to track the requirement to make this easily buildable on OpenShift, as I think that's a great idea. A PR would be most welcome!

Closing in favor of https://github.com/sclorg/golang-container


Window not shown on Mac High Sierra

Storage Explorer Version: 1.4.1
Platform/OS Version: Mac OS High Sierra 10.13.6
Architecture:
Regression From:
Steps to Reproduce:

Launch the Explorer

Expected Experience:
Show window
Actual Experience:
Nothing happens, only the icon on my dock.
Few minutes later, the error shows:

@tilumi since both the version of Storage Explorer and the version of macOS you were using are now fairly old, we have a feeling this doesn't repro anymore. If you're still having problems though, please open a new issue. Thanks.


Fix vet errors

I calmed vet about libcontainer.Namespace because it is very suspicious about types from other packages.

LGTM, thanks for the fixes!

LGTM, thanks for the fixes!

LGTM


updated migration cutover page styling

This PR fixes #
Task 1342420: ADS UI - Migration cutover page styling updates

Info fields should use a lighter gray : color595959 (see figma)
line separator should be a lighter color (see figma)
Update the active backup file count text (see figma) 3 items -> "Showing 1-3 of 3 files"

Before:

After

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 41.663%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
26427

Relevant Lines:
57452

💛  - Coveralls

@stuti149 @rchlkm @brian-harris Is this still something you plan on getting in?


Improve SDKVersion string for better Insights

Library name
Azure.Monitor.OpenTelemetry.Exporter
Please describe the feature.
Currently, the sdkVersion contains information on dotnet version, OTel version and exporter version. Explore options to include other information such as whether the signal is trace, logs or metrics. Also, if the solution being used is Distro/exporter/auto-instrumentation. Additionally, environment information. The solution should aim to keep the string as short as possible.

Done with https://github.com/Azure/azure-sdk-for-net/pull/38436


Can't get Gantt Addon Example running in my webapp

Hi,
my vaadin (7.5.10) application uses a tabsheet containing a ViewDisplay. Theme is a customized valo.
I downloaded the Gantt example but could not get it running, the result looks strange:

Do you have any hint what is breaking the gantt diagram? When opening the gantt diagram, the bars are shown for half a second on the upper right corner of its layout and then dissapear with the result above.
Cheers,
Aydin

fixed by creating and adding content from demo into missing file addons.css


termbarc.c: initialize freq and temp variables to zero

As both of these values are un-initialized, compiling the program with -O0 (no preferable compiler optimizations), would yield random values, similar to the image. Initializing them to zero, avoids this problem.

Thanks, this test is a VM no?

Thanks, this test is a VM no?

Yes, I tested this on a VM.

Thanks, i will close this and commit the change on my got instance and replicate it here.


Use inherited colors for svg text

Is your feature request related to a problem? Please describe.
Since we can have/use light and dark themes, the generated SVG colors might not always have a color with enough contrast.
Describe the solution you'd like
Make the SVG use the inherited color by default (i.e. if no specific color is set in the URL).
This can be done with css and the inherit or currentColor properties.

That doesn't work when the svg is used through an img tag, styling features do not get applied.
You can use special markup to make different versions for dark mode and light mode, though - https://github.com/DenverCoder1/readme-typing-svg/blob/main/docs/faq.md#how-do-i-make-different-svgs-for-dark-mode-and-light-mode

thanks for the suggestion @DenverCoder1 😀🙌


cant restore position when using react-live-route with better-scroll

Description:
when using better-scroll libs, it cant restore position?
it seems better-scroll using CSS attribute "transform" to scroll , but react-live-route using scrollTo to scroll 。
Of course it cant get scroll position using scrollTop or scrollLeft
Expectation:
1.when route back ,it restores right position

你好，可以在 github 上把这个问题开一个 issue 提一下吗，邮件中没有代码的格式，阅读起来真的有点费劲...我觉得通过 issue 也是一个比较正规的渠道。至于原问题 —— 我看你是自己加了一个 return null 是吧，加了 return null 被 Route 包裹的组件当然就被卸载了，后续问题欢迎在 issue 中讨论。
------------------ 原始邮件 ------------------
发件人<EMAIL_ADDRESS>发送时间: 2019年6月15日(星期六) 晚上7:05
收件人<EMAIL_ADDRESS>抄送<EMAIL_ADDRESS>主题: [fi3ework/react-live-route] cant restore position when usingreact-live-route with better-scroll (#19)
Description:
when using better-scroll libs, it cant restore position?
it seems better-scroll using CSS attribute "transform" to scroll , but react-live-route using scrollTo to scroll 。
Of course it cant get scroll position using scrollTop or scrollLeft
Expectation:
1.when route back ,it restores right position
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I did not used better-scroll before but it could be a uncovered "position". I'll try to fix this.


Re-enable verify-sample template

Due to #17991 and related issues, I had to disable the new verify-sample template because it's blocking the sync PR to fix other issues.

@weshaggard @scbedd do we want to fix all errors first, or enable this now to stem the tide and effectively force the next PRs for the following files to fix the issues for their service directory before merging?
dir sdk -filter *.md -recurse | eng\common\scripts\Test-SampleMetadata.ps1 -AllowParentProducts -passthru -ea Ignore | ft InvalidProducts, @{l='Path'; e={$_ | resolve-path -relative}}

InvalidProducts                        Path
---------------                        ----
{azure-identity}                       .\sdk\identity\azure-identity\samples\README.md
{azure-monitor-opentelemetry-exporter} .\sdk\monitor\azure-monitor-opentelemetry-exporter\samples\traces\README.md
{azure-schema-registry}                .\sdk\schemaregistry\azure-schemaregistry\samples\README.md
{azure-schema-registry-avro-serialize… .\sdk\schemaregistry\azure-schemaregistry-avroserializer\samples\README.md

If they are easy enough to fix I'd like to fix them before merging.

There's currently no replacements for telemetry and identity. The other two we had decided on over email, though Java wasn't crazy about putting the latter two in Event Grid.

Based on an internal email thread, I recommend:
azure-identity -> azure-sdks
azure-monitor-opentelemetry-exporter -> azure-monitor
azure-schema-registry* -> azure-event-hubs

@rakshith91 says that azure-monitor-opentelemetry-exporter should not go under azure-monitor. He's checking right now, but thinks it should go under azure-core which makes me think that azure-sdks might make the most sense.

^ sorry I confused the opentelemetry libraries when asking Rakshith. azure-monitor is appropriate for azure-monitor-opentelemetry-exporter. I opened a PR here to make the changes - https://github.com/Azure/azure-sdk-for-python/pull/18081 (azure-identity is in another PR but should be ready to merge).


Duplicate Record Check

When a new record is created, run the duplicate check rule(s) for that entity and if there is a match, add a note to the new record that this could be a possible duplicate, with a link to the other duplicate(s) records.

@JerryCRMI code is ready. I'm testing it, planning to release new version of toolkit the next week.
Andrew

Cool
Jerry Weinstock
Business Technology Strategist
CRM Innovation LLC
913 492 2764 x1
-------- Original message --------
From: Andrii Butenko<EMAIL_ADDRESS>Date: 1/1/18 9:03 AM (GMT-06:00)
To: a33ik/UltimateWorkflowToolkit<EMAIL_ADDRESS>Cc: Jerry Weinstock<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [a33ik/UltimateWorkflowToolkit] Duplicate Record Check (#6)
@JerryCRMIhttps://github.com/jerrycrmi code is ready. I'm testing it, planning to release new version of toolkit the next week.
Andrew
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/a33ik/UltimateWorkflowToolkit/issues/6#issuecomment-354657711, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AS8ay18gB01kdS_y9zP82Rd8A2Sls-vNks5tGPOkgaJpZM4RKP6X.

@JerryCRMI implemented in latest release.


R8 is still crashing

[REFramework] [info] [VM::update_pointers] Updating...
Crash

I don't know what the problem is with just answering.. But i guess you dont even like or you dont even want to. And this is not only the case for me.
Its a shame, that i have to help other pps here with diffrent Problems on diffrent Versions, because you guys are not able to react. Some of them already waited for 2 weeks for help or response. Tbh i was so thankfully for this Work and shared the Experience with some Problems and Troublefixes and asked for help.
But you guys dont even care.. There are several pps having the same Problem..
Its not about fixin the Problem immediatly... its just to inform us and working togheter on a Solution.
We dont know much about logs and Stuff like that..
And dont tell me you dont have the time for that... You also have time to answer the "newest" MH stuff.


Frontend: Backend errors are displayed as success in the donations view

Related to issue: https://github.com/Giveth/impact-graph/issues/304
The issue found was that backend was returning errors to the frontend when making a donation, but the frontend was still displaying as success.

Happy you guys find it. @CarlosQ96 @mateodaza
I really love to bring backend errors to Sentry as well. Ideas?

@mohammadranjbarz added sentry logger manually so when an error occurs it's sent to the backend. I think we are just missing configuring the email.

@mateodaza is this on a PR? or merged? So we can do the final test.

@mateodaza @CarlosQ96 any updates on this?

Tested the following escenarios:

Create the same donation twice (same tx hash) to force the return of error from the backend.
Turn off the backend to reproduce a service unavailable error.

Evidence:

I created a donation the success page showed, I forced the same tx hash and the frontend displayed an error modal:

I did another donation but turned off the backend temporarily:

@MoeNick since this is a code reproduced test I think we can move it to done. It's hard to do it live or in staging.
But I think this shows the changes Mateo did, work.
Before it was showing the success modal like nothing was wrong regardless of anything.
Let me know what you think.

It's showing error modals correctly!

The graphql errors might not be that pretty, but I'd make another issue to map them differently.


#1087 Fix sdkman_auto_env when PROMPT_COMMAND ends with semicolon

Remove double semicolon problem
Without this fix there may be a message with double semicolon:
bash: PROMPT_COMMAND: line 0: `history -a; history -n; ;sdkman_auto_env'

@speedlog Thanks for contributing! If you feel up to the task you can also add some more tests, the common case should already be covered.

@helpermethod i could add some tests :)
I've checked and see Spock and Cucumber tests.
I think it should be Spock test.
My concept is extend SdkmanBashEnvBuilder to allow set PROMPT_COMMAND in env and add some tests in EnvCommandSpec. Please confirm if it's right way or should i done it in another way.

@helpermethod i could add some tests :)
I've checked and see Spock and Cucumber tests.
I think it should be Spock test.
My concept is extend SdkmanBashEnvBuilder to allow set PROMPT_COMMAND in env and add some tests in EnvCommandSpec. Please confirm if it's right way or should i done it in another way.

That is exactly the way to go 👍!

Is this reelased in 5.15.0? Since today my dotfiles setup on all machines is broken with this error 😞

The last release was 3 months ago

After poking around in your repo I saw this. I updated my PROMPT_COMMAND some time ago. I have no idea why it broke days/weeks after that and not immediately 🤷♂
My current workaround is:
if [ -n "${PROMPT_COMMAND}" ]; then
    export PROMPT_COMMAND="history -a; history -c; history -r; ${PROMPT_COMMAND}"
else
    export PROMPT_COMMAND="history -a; history -c; history -r"
fi


Support broker properties from JSON files

Describe the feature
The broker properties are low level, lower level than xml, however it is very powerful but the current format is too verbose and requires to escape characters that could be included in the broker properties: ' ', '
', '=', ':'. The JSON format is more compact and only requires to escape JSON reserved characters that are not typically used in the broker properties.

[!TIP]
Vote this issue reacting with :+1: or :-1:

Resolved by https://github.com/artemiscloud/activemq-artemis-operator/commit/43ef0278327d74a9dee4020a8e3d43de8b4ad4a3


Remove Constant Lock and Unlocking in Ads

I am clueless as to why we are constantly Locking and Unlocking in shouldRespond() - it really annoyed me. This just locks and unlocks once.

@adiprerepa: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

release-notes_istio
4c5939fb9915389b7bf5c30b6b0c98a60894247b
link
/test release-notes_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test release-notes_istio

the only possible upside i can see to keeping the current config is so the code can selectively Lock() or RLock(), but it seems that the tradeoff between readability and nano-optimizations needs to be made here.

@adiprerepa: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
4c5939fb9915389b7bf5c30b6b0c98a60894247b
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@adiprerepa: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
172fefd8c9aa0060c59590286776e612180a25df
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

The reason for selective lock and unlock is to reduce the concurrency by taking lock at the beginning as this is a frequently used method. But I have n't measured the diff to say one where or other. If you are making this change, can you possibly write a simple benchmark and compare before/after?


How can I handle a date quite far away?

I tried to use to convert the data far enough, but did not generate the desired data. I entered 91008167 in seconds. Then I got the result 2021-02-25.
waktu := time.Now().Add(91008167 * time.Second)
waktuString := timeago.English.Format(waktu)
fmt.Println(waktuString)
But if the number 91008167 I change to 9100 can get the expected value. I got the result "in 3 hours".

You may setup the Max configuration parameter (by default all dates in more than 3 days are displayed with full date like 2021-02-25 instead of"in 3 years").
timeago.English.Max = 100 * 365 * 24 * time.Hour

Okay, thank you. I will try it


To demonstrate Gmail email inbox using PHP with IMAP

This fixes #4317

Hi @Edylene-Nyairaw, I feel like your article is too short of content. You have not covered why we need IMAP, leave alone more details on IMAP. Give readers everything about IMAP. The conclusion section is also too light.
Note: ensure all code snippets are well explained!

@Edylene-Nyairaw only submit PRs that are ready for review. Thanks


How to resolving Auth Facade type correctry

PHPVersion: 7.4
Larastan Version: 1.0.4
Laravel Version: 8.83.27
--level used: 2

Description
Using https://github.com/barryvdh/laravel-ide-helper, I generated _ide_helper.php
namespace {
class Auth extends \Illuminate\Support\Facades\Auth
{
}
}

namespace Illuminate\Support\Facades {
class Auth {
        /**
         * @return \App\Models\User|null
         * @static
         */
        public static function user() {}
}
}

and add
parameters:
    scanFiles:
        - _ide_helper.php

to  phpstan.neon.
However, type of  \Auth::user() estimated original Illuminate\Contracts\Auth\Authenticatable defined by \Illuminate\Support\Facades\Auth phpdoc
\PHPStan\dumpType(auth());
// Dumped type: Illuminate\Auth\AuthManager

\PHPStan\dumpType(auth()->user());
// Dumped type: App\Models\User|null

\PHPStan\dumpType(\Auth::user());
// Dumped type: Illuminate\Contracts\Auth\Authenticatable|null

Hello! 👋🏻
Ide Helper and Larastan are not compatible.

I still have this problem - I think - in larastan 2.6.4. How do I tell phpstan that \Auth::user() always returns ?\App\Models\User, not just Illuminate\Contracts\Auth\Authenticatable? I can add @var User everywhere I call \Auth::user(), but that seems silly.

@rudiedirkx, well first update to the latest larastan version

We don't import facades. For recognition, all facades are called with \Name::bla(). But I'll see how newer larastan does it, and maybe I can fake that. Thanks.

\Auth alias (for any facade) is not really well supported by PHPStan and Larastan. If you wanna get rid of errors, try to use the proper class names.

I created a few copies of Larastan's Larastan\Larastan\ReturnTypes\AuthExtension for my fav facades 👍 Works perfectly.


Confused about the sampling process

Hello, your work is excellent. after reading the code, i was confused about the sampling, my questions are:

what does the function p_s_and_t_given_0_X compute?
What does the variable "weighte_x" represent in this line of code?
weighted_X = pred_X.unsqueeze(-1) * p_s_and_t_given_0_X

Thanks so much for your kindest reply!

Sampling is done by marginalizing over the network predictions, which corresponds to this formula:
p(x_i^{t-1} | G^t) = \int_{x_i}  p(x_i^{t-1}~|~ x_i, G^t) ~ dp(x_i|G^t) = \sum_{x \in X}  p(x_i^{t-1}~|~ x_i=x, G^t) ~ \hat p^X_i(x) $
p_s_and_t_given_0_X corresponds to the first term, and weighted_x corresponds to the product of the two terms, before we compute the sum.

Thanks! Though your explanation is very clear, I still seem to not fully understand. The function compute_batched_over0_posterior_distribution  is used to compute the first term you mentioned earlier, i found that the comment of the function is:
    """ M: X or E         Compute xt @ Qt.T * x0 @ Qsb / x0 @ Qtb @ xt.T for each possible value of x0         X_t: bs, n, dt          or bs, n, n, dt         Qt: bs, d_t-1, dt         Qsb: bs, d0, d_t-1         Qtb: bs, d0, dt.     """
But in the actual computation process, there is no x0. Is it that my understanding of the computation process is incorrect?

I struggle a bit to explain this thing, but you need to remember that x0 is simply a column containing a one. If A is a matrix, A @ x0 is  a specific line of A.
If we want to compute the value of A @ x0 for all possible x0, we simply need to return the matrix A. That’s why in practice x0 never appears.

On 28 Jun 2023, at 15:00, Codema @.***> wrote:

ok, Thank you very much!

A small follow-up on the same. I am struggling with the denominator term in the equation. Can you please explain how the xt.T term appears?
Compute xt @ Qt.T * x0 @ Qsb / x0 @ Qtb @ xt.T for each possible value of x0
Thanks

A small follow-up on the same. I am struggling with the denominator term in the equation. Can you please explain how the xt.T term appears? Compute xt @ Qt.T * x0 @ Qsb / x0 @ Qtb @ xt.T for each possible value of x0
Thanks
Actually, they don't code in this way. They transpose xt first, and they transpose it later. (A@B)^{T} = B^{T}@A{T}

    X_t_transposed = X_t.transpose(-1, -2)      # bs, dt, N
    prod = Qtb @ X_t_transposed                 # bs, d0, N
    prod = prod.transpose(-1, -2)               # bs, N, d0

I struggle a bit to explain this thing, but you need to remember that x0 is simply a column containing a one. If A is a matrix, A @ x0 is a specific line of A. If we want to compute the value of A @ x0 for all possible x0, we simply need to return the matrix A. That’s why in practice x0 never appears.
…
On 28 Jun 2023, at 15:00, Codema @.***> wrote: *

Hi, thanks to your reply. but why "If we want to compute the value of A @ x0 for all possible x0, we simply need to return the matrix A."? you referred that: "If A is a matrix, A @ x0 is  a specific line of A." A@x0 exchange A of raw,  so why we can return original A?  could you reply in detail?  thanks.


Setting content type on extensionless proxy

I'm using Middleman in a large Javascript client calling into an API that doesn't use extensions on it's API endpoints (using the accept header instead). I need to stub out this API endpoint in my Middleman app. In config.rb I do:
proxy "/api/resource", "/fixtures/resources.json"

If I visit /api/resource in a browser the file gets rendered with content-type: text/html. This breaks jQuery.ajax since it won't properly parse the json. Is it possible to configure the response content-type in the page's frontmatter or the call to proxy?
Thanks!
Joe

If you're deploying to, say, Github pages, I don't think you can configure your server to server particular headers. So it might help to be able to specify content_type: on a redirect?


bug: Sliding out a menu does not work on top of iframe

Type: bug
Ionic Version: 2.1.0
Platform: all
When the page contains an iframe then sliding out a menu is not possible when slide gesture is performed on top of iframe area. I'm not sure if it is possible but maybe you could switch listening events for menu slide gestures to global instead of local page.

Hello! While we appreciate you opening an issue with us i am going to close this issue and ask that you open a new one that has the issue template filled out please. Thanks for using Ionic!


Error: SharedArrayBuffer is NOT supported in your browser

I want to know what I should do in this situation.
This happens when I call createAndCacheVolume.

It means you haven't set the correct headers. Look what we do in the netlify.toml

thanks a lot!

@qianjinlong7 excuse me.How was the problem solved?

@qianjinlong7 excuse me.How was the problem solved?

我用的是React框架，在webpackDevServer.config.js文件中为headers添加两个属性
'Cross-Origin-Embedder-Policy': 'require-corp',  'Cross-Origin-Opener-Policy': 'same-origin',
如图

重新运行即可

@qianjinlong7 谢谢你，完美解决


Implement libjn:accumulate()

I think that there's a bug here. The query
libjn:accumulate(({ "a": { "c": "d" } }, { "a": { "c": "d" } }))
should return
{"a":[{"c":"d"},{"c":"d"}]}
as accumulate should not be applied recursively. The current implementation returns
{"a":{"c":"d"}}.
Please add test cases for nested object and non-homogenous sequences containing objects, arrays, and scalar values.

The fact that libjn:accumulate(({ "a": { "c": "d" } }, { "a": { "c": "d" } })) returns {"a":{"c":"d"}} because since the specification for libjn:accumulate was not clear, I thought that it would behave similar to libjn:intersect and added a check to remove duplicate values for the same key when accumulating into an array. So one  { "c": "d" } is removed because it's a duplicate value.
You can test with an entry like libjn:accumulate(({ "a": { "c": "d" } }, { "a": { "e": "f" } })) which would return {"a":[{"c":"d"},{"e":"f"}]}. I shall add this test case also.


Updating to Solr 6

Using Solr 6, and updating Solr config and query generation to work with Solr 6

Do we want to start over with a fresh repo, or do we want to reindex everything in Fedora?

Let's just do a fresh one. Old items have bad ACLs anyways


Rubygems

Thank you for the great theme!
I would like to ask one question: "Is there any plan on releasing this theme on rubygems?"

Hi @aytekinar,
thanks for asking, we currently do not have plan for releasing on rubygems. If you are interested, let me know.

Hey @junlulocky,
Thank you for your prompt response. Actually, that would be lovely! I don't think it would cost you a lot of effort, nor time, as is outlined in the documentation. Of course, it might sound a bit rude for you to hear this from a user, but I would definitely want to use this theme and having a gem based theme is really nice.
For instance, I will be using GitLab Pages for building my website, and I would not want to clutter my homepage with theme-related files. I would like to see only my posts and the corresponding Gemfile. It is also easier to follow updates from you on the theme --- if you make some major changes, you simply push it rubygems and I will be automatically getting it when I re-run the continuous integration system.
Just a small (and maybe useful) idea.
Thanks, again :)

Hey @aytekinar,
Thanks, I will take a look. but maybe only a couple of days later. Let me know if you also want to participate in this prj.
Thanks:)

Sure, no rush! :)
Actually, I can also participate. According to the documentation, we need to clean some folders and maybe restructure some others. Then, we need to register in rubygems.org and publish the gem-based theme directly at rubygems. For that, a simple travis continuous integration with the rubygems password as a secret should be a solution. Then, whenever you make some changes here on GitHub, the continuous integration service could publish automatically on rubygems. Then, we as users simply get the most recent version.
Thanks :)

@aytekinar
Thanks, see the invitation link: https://github.com/jekyller/PanelCV/invitations
and feel free to make yourself in the author link.
Best


Weathermap-Hover working bad

Cacti version 1.2.20
Why I navigate to Weathermap and try to look some hover graph it did not appear. But when I reload page with F5 it works great.
Any idea what it can be?

This issue will be resolved once this pull request is merged: https://github.com/Cacti/plugin_weathermap/pull/39


v<IP_ADDRESS>: restored database can not be opened

I created a ChaCha20 encrypted sqlite database with v3.31.1 and used the restore from command with an regular sqlite database.
This encrypted sqlite database can only be opened with v3.31.1, but not with v<IP_ADDRESS>.
If I create a ChaCha20 encrypted sqlite database with some tables and data without restoring from a regular database with v3.31.1  and v<IP_ADDRESS> and let v<IP_ADDRESS> open the v3.31.1 database and v3.31.1 open the v<IP_ADDRESS> database it works fine. Both versions are compatible in this case.

I've done some testing:

Using SQLite 3.31.1

Open 3.33.1 chacha20 database: Ok
Source: 3.31.1 chacha20; restore from plain 3.31.1: OK, working
Open 3.31.1 restored db : OK
Restore chacha20 cipher db to memory then backup to another db file (chacha20): Working !
Restore chacha20 cipher db to memory then backup to another db file (sqlcipher): Not working but normal

Using SQLite 3.33.1

Open 3.31.1 chacha20 database: Ok
Open 3.31.1 restored db : Not working.
Source 3.33.x.x chacha20; restore from plain 3.33.x.x : Not working
Restore chacha20 cipher db to memory then backup to another db file (chacha20): Working !
Restore chacha20 cipher db to memory then backup to another db file (sqlcipher): Not working but normal

I can confirm that the restore/backup feature is not stable and not always working, but I am unable to give any fix/patch to make it working soon. I'll try to keep you informed of the evolutions (if any :) )
**Keep in mind that the backup / restore feature with WXSQLite3 or SQLiteMC and this JDBC connector has always been very limited (see: https://github.com/Willena/sqlite-jdbc-crypt#sqlite3-backup-api-and-encryption). In addition, have a look at #12 **
I Cannot guarantee anything for the backup / restore feature.


Configurable root address? (For use with proxy paths)

Normally, something like "/theme.css" needs to come from "https://localhost:{port}/theme.css".
In some cases, like when using a proxy through JupyterHub, that same resource will instead need to come from "https://{myproxyaddress}/{port}/theme.css".
The app doesn't know that, so links are hardcoded, e.g. as "https://localhost:{port}/theme.css", which results in failure to get the resource.
You may be familiar with Dask --- in that case what we can do is configure Dask so it knows the proxy path to the Dask dashboard is:
dask.config.config["distributed"]["dashboard"]["link"] = "https://{myproxyaddress}/{port}/status"

(See the yaml configuration of "link" example from Dask)
If the developers could enable a similar configurable base address for WebUI, that would be helpful for this use case of proxies!

This issue was submitted by mistake to the wrong repository

Thank you for report this @sfeister, I guess we can easily add this feature to webui. So, I'm re-opening this issue.

Need more investigation.

Indeed, This issue is not related to WebUI. Any request other than localhost:{port} will not reach WebUI in the first place.


vrrp::instance::track_script: Enforce Array datatype 2

This is a followup of
https://github.com/voxpupuli/puppet-keepalived/pull/322 and https://github.com/voxpupuli/puppet-keepalived/pull/319

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

i think we have to put the skip changelog label on this one instead of backwards incompatible. I think we made a mistake and didnt regenerate the last release (5.0.0) correctly. So this will change the currently changelog but on the next release ( a bit wierd). We have no braking changes in this PR specifically and the PR this references already has the correct label. What do you think @bastelfreak ?


Debug menu not enabled?

Hi all,
For some reason with the new 1.11.4 release the debug menu is no longer appearing. I normally have it enabled to teleport around the map. But for some reason it is checked as enabled in the engine settings, but it doesn't show up so I cannot teleport around the map anymore? Anyone know what is going on?
Thanks.

Known and fixed, waitting for merge with master.
See #505


Failed to Run Tesseract on AWS EC2

Hi,
i have and AWS EC2 instance (OS is Ubuntu 14.04) with leptonica-1.75.3 and tesseract 4.0.0-beta.1-17-g79c6fa6
i followed this article to install and compile leptonica the tesseract, (which always worked)
when i type tesseract -v i get the following
tesseract 4.0.0-beta.1-17-g79c6fa6
 leptonica-1.75.3
  libjpeg 6b : libpng 1.2.50 : zlib 1.2.8

 Found AVX512BW
 Found AVX512F
 Found AVX2
 Found AVX
 Found SSE

and then when i detect by: tesseract image.jpg results -l eng --tessdata-dir ./tessdata
any image i get the following error:
Error in pixReadMemTiff: function not present
Error in pixReadMem: tiff: no pix returned
Error in pixaGenerateFontFromString: pix not made
Error in bmfCreate: font pixa not made
Tesseract Open Source OCR Engine v4.0.0-beta.1-17-g79c6fa6 with Leptonica
Error during processing.

what could be the problem?
Thanks in advance

Maybe your libjpeg is too old.
Have you tried a png or a tif?
I use libjpeg 8d (libjpeg-turbo 1.3.0)

Thanks,
mine are libjpeg 6b : libpng 1.2.50 : zlib 1.2.8
could you please tell me what is the latest dependencies?

Looks to me like libtiff-dev (or is it libtiff4-dev ?) package was missing when Leptonica was built.

i installed any dependency i know about that contained anything with images such libpng-dev or libtiff4-dev and the trick was to install Leptonica again and build it after the dependencies were installed, then it worked, thanks @Shreeshrii @jbreiden
Since we on the subject, i noticed that the argument --oem doesn't exist anymore what i run the command tesseract --help, is that normal?
also what is the best treainddata for the new beta version for tesseract?

>  i noticed that the argument --oem doesn't exist anymore what i run the command tesseract --help, is that normal?

what is the best treainddata for the new beta version for tesseract?

If you want to OCR, tessdata_fast
If you want to do finetune/add a layer training, tessdata_best
If you need to use the legacy tesseract engine with --oem 0 or --oem 2, tessdata
tesseract --help-extra will show all the advanced options (such as --oem).

i noticed that the argument --oem doesn't exist anymore what i run the command tesseract --help, is that normal?

--oem is still valid. See --help-extra.

Thanks


Support CSS demo

💡 Description

Status: Ran into issues with MWAA and product level execution, but discussed with THomas and Jordan and has path forward

Status: Some data uploaded, but ran into issues with .fits files not being found in S3 bucket.

Demo completed 10/27


http1: allow configuring format of encoded http1 response headers

Adds a configuration option that will convert all header keys into
Train-Case. This is useful to allow Envoy to respond with headers
that match the casing of other systems, to ensure that the wire format
of responses is unchanged when migrating to Envoy.
Signed-off-by: Snow Pettersen<EMAIL_ADDRESS>Risk Level: Mediun
Testing: UTs
Docs Changes: Proto comments
Release Notes: n/a
Fixes #8463

Mainly looking for API review at this point: is this too specific? Should we be aiming for something more flexible like arbitrary regex transformations with the ability to uppercase matches?
For example, this could be represented by a series of regex matches: { match: /^[a-z]/, uppercase: true } + { match: /[^0-9a-zA-Z][a-z]/, uppercase: true }. This would come at some perf cost and code complexity but would make this much more flexible.
Open to ideas for how to best express this so that it can be useful for as many people as possible.
@htuch @alyssawilk

@snowp would pass-thru of client casing work to support this use case? @jmarantz has done some research on this and it seems doable.

Pass-through would work in certain scenarios (h/1.1 all the way), but I had some concerns about supporting intermediate h2 hops, as we tend to use h2 wherever possible. Seems like @alyssawilk shared some of those concerns based on the conversation in #8463.

@snowp ack, let's continue with explicit capitalization support then.

This should be ready for review for whoever wants to pick this up

/azp run

Please merge master to fix coverage.
/wait

So how to configure the custom header format, for example, I want to get this format header：
Sec-WebSocket-Accept

not

Sec-Websocket-Accept


Any update on this?

Maybe a better UI?

I also made a presskit() derivative a while ago, if you want to take a look:
https://github.com/juanuys/presskittie


Invalid range_min value in LaserScan message

While using sick_scan_xd with a SICK picoScan150, I noticed that the range_min field of the sensor_msgs/LaserScan message is always set to 0.0. At the same time, invalid range measurements are set to zero. According to the definition of the message invalid measurements should not be included within this range:
float32[] ranges         # range data [m] (Note: values < range_min or > range_max should be discarded)

The documentation says that the picoScan150 has a design limitation of range_min = 0.05, therefore range_min should be set to this value in the message. Alternatively define invalid scans as NaN or +infinity.

Thank you very much for your feedback. We will correct range_min in the sensor_msgs/LaserScan messages in the next release. In the meantime please replace line 846 in driver/src/sick_scansegment_xd/ros_msgpack_publisher.cpp by 0.05f for multiScan and picoScan:
laser_scan_msg.range_min = std::max(0.05f, laser_scan_msg.range_min); // min range of multiScan and picoScan: 0.05 [m]


Code fences should have languages

This allows us to highlight them with Prism.  For contrast, https://www.freecodecamp.org/learn/scientific-computing-with-python/python-for-everybody/conditional-execution has a code language for the answers:

vs
https://www.freecodecamp.org/learn/scientific-computing-with-python/python-for-everybody/make-a-relational-database

Some challenges have console output wrapped in code fences.  Ideally these should not use code fences since they are just text - a pre element would be more semantic.
To avoid extra work, this should wait until https://github.com/freeCodeCamp/freeCodeCamp/pull/39800 is merged.

Did we get around to adding SQL to the prism plugin: https://github.com/freeCodeCamp/freeCodeCamp/pull/39079#issuecomment-644904634 ?

Nope: https://github.com/freeCodeCamp/freeCodeCamp/blob/b5d5ec5a901db51e13411ba2769fd2aa36f06f08/client/.babelrc#L56-L66
are there any others that we'd like?

are there any others that we'd like?

I cannot think of any other that we use. Maybe TypeScript for future prep?

Is Typescript on the horizon? If so, sure.

Is Typescript on the horizon? If so, sure.

If it is, it will be quite a while before it is implemented.

I believe it is covered as part of the project-based V7.

I believe it is covered as part of the project-based V7.

It was on the original roadmap and a project exists, but it might have to be changed or may be dropped.  I think there is no harm in adding support for it, unless that adds a lot more overhead to the Prism plugin.

Add SQL to the list?

Add SQL to the list?

Sure.  So, we'd add typescript and SQL to the plugin.
Since the challenge template change has been merged, I'm happy opening this up for contributions.

Some challenges have console output wrapped in code fences. Ideally these should not use code fences since they are just text - a pre element would be more semantic.

do you mean like below?
## --answers--

<EMAIL_ADDRESS><EMAIL_ADDRESS>
---

<EMAIL_ADDRESS>
---

['umich.edu', 'iupui.edu']

---

['csev@', 'cwen@']

(in the file the pre elements are not included, it's the answers for curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-matching-and-extracting-data.md)

Some challenges have console output wrapped in code fences. Ideally these should not use code fences since they are just text - a pre element would be more semantic.

do you mean like below?
## --answers--

<EMAIL_ADDRESS><EMAIL_ADDRESS>
---

<EMAIL_ADDRESS>
---

['umich.edu', 'iupui.edu']

---

['csev@', 'cwen@']

(in the file the pre elements are not included, it's the answers for curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-matching-and-extracting-data.md)

or it was more about these?
(curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-conditional-selection-and-modifying-dataframes.md)
## --answers--

Tom      13
Kris     11
Ahmad     9
Beau      7
Name: Longest streak, dtype: int64

---

      Certificates  Time (in months)  Longest streak
Tom               8                16              13
Kris              2                 5              11
Ahmad             5                 9               9
Beau              6                12               7

---

      Certificates   Longest streak
Tom               8               13
Kris              2               11
Ahmad             5                9
Beau              6                7

or it was more about these?
(curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-conditional-selection-and-modifying-dataframes.md)
## --answers--

Tom      13
Kris     11
Ahmad     9
Beau      7
Name: Longest streak, dtype: int64

---

      Certificates  Time (in months)  Longest streak
Tom               8                16              13
Kris              2                 5              11
Ahmad             5                 9               9
Beau              6                12               7

---

      Certificates   Longest streak
Tom               8               13
Kris              2               11
Ahmad             5                9
Beau              6                7


fix problem with donor_end not being cached for users logged in

closed because we'll collect issues in a single pr


GORA 616 Fix Multiple slf4j conflict issue

The issue was the conflict among

log4j-slf4j-impl-2.11.0.jar
slf4j-simple-1.6.6.jar
slf4j-log4j12-1.6.6.jar
and first two jars were taken from gora-couchdb and gora-solr.
As a fix, those jars excluded in gora-tutorial/pom.xml dependencies

+1


Manual connection

The manual Screen of the android app is fully connected to the arduino sketch.

On line 29 in Client.java:  It should be "protected Client client;"
There's also a problem on line 32 in ManualActivity.java


How can I obtain current job state and slave where it is executed via REST API?

Hi,
I need to obtain the info about the state of the job and the slave that is executing the job (if proceed) to use it inside a python program. I have used the command provided in the Chronos documentation (curl -L -X GET chronos-node:8080/scheduler/jobs) to obtain the info about current jobs in Chronos 2.4.0 via its REST API, but information I need is not provided. I have read that it is possible to obtain those data using Cassandra (http://wjb-tech.blogspot.com.es/), but I was not willing to install it. Is there any way to obtain this info without installing Cassandra?
Thanks!

I found that:
curl -L -X GET http://chronos-node:4400/scheduler/graph/csv
obtains the current state of the job. Nothing about the node...

what's update?

To get the state in a json format you can use something like the following:
curl -X GET https://chronos-node:8080/v1/scheduler/jobs/summary
Unfortunately that leaves out most of the data from the regular /v1/scheduler/jobs/ api, so a combination of the two would be needed, joined together on the job names, in order to get the job with the state included.
To get the current state, if you have access to the Mesos leader endpoint, and your job is named 'myjob',  you can use this Mesos /master/tasks API do something like this:
curl -s -X GET http://mesos-leader-node:5050/master/tasks | sed $'s|},{|},\\\n{|g' | grep '"ChronosTask:myjob"'
Use the nested quotes on the grep argument to make sure that the job name is literally 'myjob' and does not just start with that. The chronos framework creates the mesos task as "ChronosTask:<chronosjobname>", which makes it searchable within the mesos state if each task is placed on its own line by the sed command.  If you're doing it in python you could parse the entire return from /master/tasks into a json object and search through that for the task name that matches, or if you're doing it as a subprocess call, you can just sed/grep it before it gets parsed by python, which is almost certainly better performance.
In the JSON value this returns, it gives you the 'slave_id', 'framework_id', and the 'state' as fields.  The state here is the mesos task state, which does not directly match up with the Chronos job state returned by the first curl command.
If you need the hostname for the mesos slave that ran that chronos job you can use the /master/slaves API, but unfortunately it seems like the slave_id query param is not working to filter down to the particular slave, so you'll have to filter it manually again.  For this one there isn't a huge return value so you can filter it just in python.
curl -s -X GET http://mesos-leader-node:5050/master/slaves
And in the 'slaves' field of the json dict it returns, there is a list of slave objects, each with the 'id' and 'hostname' fields.


fix: use a const fn  to compute the overall STUN timeout

I pushed another version where I am just testing the constant. Less invasive.
What do you prefer?

Neat.
I did like the test in the previous as well :)

I am leaning towards just testing the constant until we get better const arithemtic support :)

Thanks


Bug: Upsert problem with data validation, allowed fields, dates defined within the model.

PHP Version
7.4
CodeIgniter4 Version
4.3.2
CodeIgniter4 Installation Method
Composer (as dependency to an existing project)
Which operating systems have you tested for this bug?
Windows, Linux
Which server did you use?
apache
Database
MySQL (ver. 8.0.28)
What happened?
Upsert does not work correctly with the model.
Allowed fields, validation rules, dates (created_at, updated_at) are defined within the model, this does not apply to the query.
The model should throw validation errors first!
Steps to Reproduce

class TestModel extends BaseModel
{
    protected $table         = 'table';
    protected $allowedFields = [
        'item_id', 'item_quantity'
    ];
    protected $validationRules = [
        'item_id'              => 'required|is_natural_no_zero',
        'item_quantity'    => 'required|numeric',
    ];

    protected $useSoftDeletes   = true;
    protected $protectFields      = true;
    protected $useTimestamps  = true;
}

$model = new TestModel();

$model->upsert([
    'item_id' => "string data", //validation is not correct
    'item_quantity' => 99, //everything ok
    'col1' => "string data", //not in allowed fields
]);

//check validation errors
$model->errors();

$model->db->getLastQuery()->getQuery();

Expected Output
INSERT INTO `table` (`item_quantity`, `created_at`, `updated_at`)
VALUES (99, unix_timestamp, unix_timestamp)
ON DUPLICATE KEY UPDATE
`table`.`item_quantity` = VALUES(`item_quantity`),
`table`.`updated_at` = VALUES(`updated_at`)

Anything else?
No response

What are the current outputs?
$model->errors();
$model->db->getLastQuery()->getQuery();

This is not a bug.

Important
The Model does not provide a perfect interface to the Query Builder. The Model and the Query Builder are separate classes with different purposes. They should not be expected to return the same data.
If the Query Builder returns a result, it is returned as is. In that case, the result may be different from the one returned by the model’s method and may not be what was expected. The model’s events are not triggered.
To prevent unexpected behavior, do not use Query Builder methods that return results and specify the model’s method at the end of the method chaining.
https://codeigniter4.github.io/CodeIgniter4/models/model.html#mixing-methods-of-query-builder-and-model

The model does not have the upsert() method. So it is a Query Builder method.

By the way, why do you need to use upsert() in the Model?

By the way, why do you need to use upsert() in the Model?

When we need to save something, we use insert(), update() or save() (model methods). When we want to use insert() or update() (upsert()), we don't have that method in the model. I understand that query builder and model are different classes and give different queries (example soft delete will not add in the query builder, but model will add, which is fine).
I think it is necessary to have an upsert() in the model.
Otherwise, what is the purpose of having it only in the query builder?

What are the current outputs?
$model->errors();
$model->db->getLastQuery()->getQuery();

Output for the errors() method
return null, should return a validation error for the item_id field
$model->errors(); // return null, should return a validation error for the item_id field

Output for the method getQuery()
$model->db->getLastQuery()->getQuery();

INSERT INTO `table` (`col1`, `item_id`, `item_quantity`)
VALUES ('string data','string data',99)
ON DUPLICATE KEY UPDATE
`table`.`col1` = VALUES(`col1`),
`table`.`item_id` = VALUES(`item_id`),
`table`.`item_quantity` = VALUES(`item_quantity`)

Otherwise, what is the purpose of having it only in the query builder?

No, no. It was just added in Query Builder.
If you want to UPSERT, now you can use it with Query Builder.
As you know, all Query Builder method does not work with the Model.
If you really think the upsert() should work with the Model,
please make a feature request or send us a PR.
This is not a bug, just the current Model does not support the method.


Bot targeting the skills in the wrong servant

Preparation

[X] I tested the latest release
[X] I looked at other issues (even the closed ones)
[X] I read the Troubleshooting Guide

FGO server
NA
FGA build number
2084
Describe the bug
I was farming using the castoria system and Muramasa as NP spammer. But somehow FGA is always targeting the third servant in the game with every buff. I tried the trubleshooting guides to help but nothing changed, and aparently someone a year ago had the same issue in JP while farming with Drake and Koyanskaya, and all the help in the coments tell him to look at the trubleshooting guide. I also tried to swap the place of the servants and it alwais target the third, even if the target is the first servant.
Video
I was not able to record, but the script for the bot is : d e1 fi g h1 i1 4,#, c l1 4,#, a a j1 k1 4,#,
Device model
Samsung Galaxy S20 FE
Android version
13
Screen size
2400x1080
RAM
4 GB

Disable Skill Confirmation in FGA. It prompted you to choose a value when you updated the app and you left it on enabled (I think)

Disable Skill Confirmation in FGA. It prompted you to choose a value when you updated the app and you left it on enabled (I think)

It worked, thanks ;)


Wayland Vulkan swapchain support

The first commit is very straightforward, adding the required structs/classes/extensions/functions for supporting Wayland.
If I'm not misunderstanding anything, we only need to enable surface extensions when a swapchain source is provided. The relevant changes for that are in my second commit.
Under XWayland (when SDL acts as an X client, but the host DE uses Wayland), SDL returns Unknown for the subsytem in its SysWMinfo, so that doesn't work with the SwapchainSurface API. The OpenGL path in Veldrid.StartupUtilities does work on XWayland.

This is fantastic @Jjagg , thanks for the submission!
Everything functionally looks good, although I will need to figure out how to test this on my Linux box. Is there a way to easily test this with Ubuntu 16.04? I can probably update it if necessary, but it'll have to wait til this weekend when I get back from the holidays.
The one thing I will probably want to change is the extension handling. At the moment, the platform surface extensions are always enabled when running on that platform. This means that if you create a headless device (e.g. without a SwapchainDescription), then you can still later create a Swapchain. I think we should continue on that path and unconditionally enable all possible surface extensions for your platform, regardless of whether you have a matching SwapchainSource ready. The errors should therefore be moved into the logic that actually tries to create a Swapchain from that kind of source instead of at device creation time. So you won't get an error about the Wayland extension being missing unless you try to create a Wayland Swapchain. If you've passed in a Wayland SwapchainSource, then you will still get the exception at device creation time.
Question for my curiosity: is it ever reasonable or possible to create both an X Window and a Wayland window in the same process? It wouldn't change the approach above, but I am interested to know if that is something anyone would ever do.

Is there a way to easily test this with Ubuntu 16.04?

Yes, you can use the reference Wayland compositor, weston. You can simply install weston with apt and run a nested session by executing weston in a terminal.
In the weston session you can open a terminal and run a test project as usual. SDL will by default act as an X client. You can let it use Wayland by setting SDL_VIDEODRIVER=wayland. Something like SDL_VIDEODRIVER=wayland dotnet run will work. You can tell SDL uses Wayland if the window is not decorated.

This means that if you create a headless device (e.g. without a SwapchainDescription), then you can still later create a Swapchain. I think we should continue on that path and unconditionally enable all possible surface extensions for your platform.

Yeah, that makes sense. Will change!

is it ever reasonable or possible to create both an X Window and a Wayland window in the same process?

In general, yes. Wayland compositors can support X clients with XWayland. Imagine an application like ImGui that launches its own window. Maybe an app like that only supports X, but you create your own Window that uses Wayland.
Having both an X and Wayland window using Veldrid is not useful though.  That lib (e.g. SDL) will use either X or Wayland. There's no reason to create both X and Wayland windows if you have full control yourself.

The errors should therefore be moved into the logic that actually tries to create a Swapchain from that kind of source instead of at device creation time.

Should we store the enabled surface extensions in the VkGraphicsDevice so we can check if the right one is available when an instance is getting created?

Should we store the enabled surface extensions in the VkGraphicsDevice so we can check if the right one is available when an instance is getting created?

Yes, I think so. VkSurfaceUtil.CreateSurface can take a VkGraphicsDevice parameter and it can check whether the relevant surface extension is avaliable / enabled. If not, it can throw an exception.
Thanks for the information about Wayland -- sounds like it will be fairly easy to test once I have my Linux machine in hand.

@mellinoe VkSurfaceInfo.CreateSurface would also need a VkGraphicsDevice parameter to pass to VkSurfaceUtil.CreateSurface. Is the VkSurfaceInfo API still relevant? It seems like it serves the same purpose as SwapchainSource, but specifically for Vulkan. There's a GraphicsDevice.CreateVulkan overload that takes a VkSurfaceSource, but it just converts it to a SwapchainSource.
The only other reference is in VeldridStartup.GetSurfaceSource, but that method isn't used and it's private.

VkSurfaceInfo Isn’t relevant anymore. That was part of Veldrid 4.0, before Swapchains were a thing. It’s still around for compat, but SwapchainSource is the only thing you need to worry about now.

How should I resolve this? Adding the VkGraphicsDevice parameter breaks compatibility, so in that case it's better to just remove VkSurfaceInfo. Or just pass a null GD to CreateSurface from VkSurfaceInfo and skip validation in that case?

Or just pass a null GD to CreateSurface from VkSurfaceInfo and skip validation in that case?

Went ahead and did this one.

@Jjagg Hey, I'm struggling a little bit to test this under Ubuntu 16.04. I've installed weston and tried to launch NeoDemo, but it fails to create a Vulkan Swapchain when I run with SDL_VIDEODRIVER=wayland. SDL2 also fails to create an OpenGL context ("Invalid Window").

Under XWayland (when SDL acts as an X client, but the host DE uses Wayland), SDL returns Unknown for the subsytem in its SysWMinfo, so that doesn't work with the SwapchainSurface API

This seems to be what I'm hitting. Is there some step I'm missing?

@mellinoe Are you running inside a weston shell? If you run weston in a terminal it will open a nested shell in which you can open a terminal to run the project.

Yes, I'm running from a shell inside the weston compositor window that pops up.

If this is what's happening it might be because of an old SDL version that doesn't support Wayland yet, is that possible? (I'm not sure if SDL would use X or crash in that case)

Hm, I did check that I was on the latest SDL2 package (2.0.8).

I'm not sure what changed for me, but everything works for me. With SDL using either X or Wayland inside Weston I can create both OpenGL and Vulkan devices.

I'm running the GettingStarted sample from veldrid-samples. Only changes are to make the reference to veldrid point to my local clone and create the graphicsdevice with Vulkan backend.

I guess the other difference might be which drivers you are using. I have been using the Nvidia proprietary drivers, but I can try switching off them to check whether that makes a difference.

Using the open source drivers, I get further but end up hitting an error when creating the Wayland Swapchain:
zxdg_surface_v6@22: error 3: xdg_surface has never been configured

Unhandled Exception: Veldrid.VeldridException: Unsuccessful VkResult: ErrorSurfaceLostKHR

Damn, I don't really know what that's about.
I read in a similar bug report (but for glx, not vk) that it could be you need a newer Weston version or it might be a driver issue.

Awesome :) I'm curious what went wrong with the other tests, but glad you got it running! No worries 😁
I also got this branch working with OpenWindow on Wayland btw. Still working on that when I can :)