Helper function to simplify two-step calls

Suggestion
Many functions like GetTokenInformation(), AssocQueryStringW(), GetComputerNameExW() etc. must be called two times to first determine the required buffer size and then fill the buffer. This can be tedious, unintuitive and add code complexity. I talked to GPT-4 to find as many of the different kinds of two-step calls as possible and wrote the helper function dual_call() (myself) to simplify these cases:
fn dual_call<F, T>(
    first_call_expectation: FirstCallExpectation<T>,
    mut call: F,
) -> windows::core::Result<T>
where
    F: FnMut(bool) -> windows::core::Result<T>,
    T: PartialEq,
{
    match first_call_expectation {
        FirstCallExpectation::Ok => {
            call(true)?;
            call(false)
        }
        FirstCallExpectation::OkValue(expected_value) => {
            let value = call(true)?;
            if value == expected_value {
                call(false)
            } else {
                Err(E_UNEXPECTED.into())
            }
        }
        other_expectation => {
            let expected_h_result = match other_expectation {
                FirstCallExpectation::Win32Error(win_32_error) => win_32_error.to_hresult(),
                FirstCallExpectation::HResultError(h_result) => h_result,
                _ => unreachable!(),
            };

            match call(true) {
                Err(error) => {
                    if error.code() == expected_h_result {
                        call(false)
                    } else {
                        Err(error)
                    }
                }
                Ok(_) => Err(E_UNEXPECTED.into()),
            }
        }
    }
}

enum FirstCallExpectation<T> {
    Ok,
    OkValue(T),
    /// Requires `ERROR_INSUFFICIENT_BUFFER` most often, if not documented.
    Win32Error(WIN32_ERROR),
    HResultError(HRESULT),
}

Usage look like this. The first example is the least useful; it's just presented for completeness's sake. The different examples present different usage of dual_call(), because each WinAPI function called requires a different approach:
fn get_win_title(hwnd: HWND) -> windows::core::Result<String> {
    let mut buffer = Vec::new();
    dual_call(FirstCallExpectation::Ok, |getting_buffer_size| {
        if getting_buffer_size {
            let len = unsafe { GetWindowTextLengthW(hwnd) };
            if len == 0 {
                let error = windows::core::Error::from_win32();
                if error.code().is_err() {
                    return Err(error);
                }
            }

            buffer.resize((len + 1) as _, 0);
            Ok(())
        } else {
            let len = unsafe { GetWindowTextW(hwnd, &mut buffer) };

            let error = windows::core::Error::from_win32();
            if error.code().is_ok() {
                buffer.truncate(len as _);
                Ok(())
            } else {
                Err(error)
            }
        }
    })?;

    Ok(String::from_utf16_lossy(&buffer))
}

fn input_locale_ids() -> windows::core::Result<Vec<HKL>> {
    let mut ids = Vec::new();
    let mut num_ids = 0;

    dual_call(FirstCallExpectation::Ok, |getting_buffer_size| {
        num_ids = unsafe {
            GetKeyboardLayoutList((!getting_buffer_size).then(|| {
                ids.resize(num_ids as _, HKL::default());
                ids.as_mut_slice()
            }))
        };

        if num_ids != 0 {
            Ok(num_ids)
        } else {
            Err(windows::core::Error::from_win32())
        }
    })?;

    Ok(ids)
}

fn computer_name() -> windows::core::Result<String> {
    let mut buffer = Vec::new();
    let mut len = 0;

    dual_call(
        FirstCallExpectation::Win32Error(ERROR_MORE_DATA),
        |getting_buffer_size| unsafe {
            GetComputerNameExW(
                ComputerNameNetBIOS,
                if getting_buffer_size {
                    PWSTR::null()
                } else {
                    buffer.resize(len as _, 0);
                    PWSTR(buffer.as_mut_ptr())
                },
                &mut len,
            )
        },
    )?;

    buffer.truncate(len as _);
    Ok(String::from_utf16_lossy(&buffer))
}

fn current_user_sid() -> windows::core::Result<String> {
    let mut process_token_handle = HANDLE::default();
    unsafe { OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &mut process_token_handle)? };

    let mut sid_and_attrs_buffer = Vec::<u8>::new();
    let mut sid_and_attrs_buffer_size = 0;

    dual_call(
        FirstCallExpectation::Win32Error(ERROR_INSUFFICIENT_BUFFER),
        |getting_buffer_size| unsafe {
            GetTokenInformation(
                process_token_handle,
                TokenUser,
                (!getting_buffer_size).then(|| {
                    sid_and_attrs_buffer.resize(sid_and_attrs_buffer_size as _, 0);
                    sid_and_attrs_buffer.as_mut_ptr().cast()
                }),
                sid_and_attrs_buffer_size,
                &mut sid_and_attrs_buffer_size,
            )
        },
    )?;

    let _ = unsafe { CloseHandle(process_token_handle) };

    let mut pwstr_sid = PWSTR::null();
    unsafe {
        ConvertSidToStringSidW(
            (&*sid_and_attrs_buffer.as_ptr().cast::<SID_AND_ATTRIBUTES>()).Sid,
            &mut pwstr_sid,
        )?
    };
    let string_sid = unsafe { pwstr_sid.to_string()? };
    let _ = unsafe { LocalFree(HLOCAL(pwstr_sid.0.cast())) };

    Ok(string_sid)
}

fn inferior_current_user_sid() -> windows::core::Result<String> {
    let username = HSTRING::from(whoami::username_os());

    let mut sid_buffer = Vec::<u8>::new();
    let mut sid_buffer_size = 0;

    //. Computer name. Isn't needed, but trying to not retrieve it prevents retrieving the SID.
    let mut referenced_domain_name_buffer = Vec::<u16>::new();
    let mut referenced_domain_name_len_plus_one = 0;

    let mut sid_type = SID_NAME_USE::default();

    dual_call(
        FirstCallExpectation::Win32Error(ERROR_INSUFFICIENT_BUFFER),
        |getting_buffer_sizes| unsafe {
            LookupAccountNameW(
                PCWSTR(ptr::null()),
                PCWSTR(username.as_ptr()),
                PSID(if getting_buffer_sizes {
                    ptr::null_mut()
                } else {
                    sid_buffer.resize(sid_buffer_size as _, 0);
                    sid_buffer.as_mut_ptr().cast()
                }),
                &mut sid_buffer_size,
                if getting_buffer_sizes {
                    PWSTR::null()
                } else {
                    referenced_domain_name_buffer
                        .resize(referenced_domain_name_len_plus_one as _, 0);
                    PWSTR(referenced_domain_name_buffer.as_mut_ptr())
                },
                &mut referenced_domain_name_len_plus_one,
                &mut sid_type,
            )
        },
    )?;

    let mut pwstr_sid = PWSTR::null();
    unsafe { ConvertSidToStringSidW(PSID(sid_buffer.as_mut_ptr().cast()), &mut pwstr_sid)? };
    let string_sid = unsafe { pwstr_sid.to_string()? };
    let _ = unsafe { LocalFree(HLOCAL(pwstr_sid.0.cast())) };

    Ok(string_sid)
}

fn ip_adapter_names() -> windows::core::Result<Vec<String>> {
    let mut byte_buffer = Vec::<u8>::new();
    let mut buffer_size = 0;

    dual_call(
        FirstCallExpectation::Win32Error(ERROR_BUFFER_OVERFLOW),
        |getting_buffer_size| {
            WIN32_ERROR(unsafe {
                GetAdaptersAddresses(
                    AF_UNSPEC.0 as _,
                    GET_ADAPTERS_ADDRESSES_FLAGS(0),
                    None,
                    (!getting_buffer_size).then(|| {
                        byte_buffer.resize(buffer_size as _, 0);
                        byte_buffer.as_mut_ptr().cast()
                    }),
                    &mut buffer_size,
                )
            })
            .to_hresult()
            .ok()
        },
    )?;

    let mut adapter_names = Vec::new();
    let mut ip_adapter_addresses =
        unsafe { &*byte_buffer.as_ptr().cast::<IP_ADAPTER_ADDRESSES_LH>() };

    loop {
        let adapter_name = unsafe { ip_adapter_addresses.FriendlyName.to_string()? };
        if !adapter_names.contains(&adapter_name) {
            adapter_names.push(adapter_name);
        }

        if ip_adapter_addresses.Next.is_null() {
            break;
        }
        ip_adapter_addresses = unsafe { &*ip_adapter_addresses.Next };
    }

    Ok(adapter_names)
}

fn get_file_ext_app(ext: &str) -> windows::core::Result<String> {
    let mut buffer = Vec::new();
    let mut buffer_size = 0;

    let success_h_result = dual_call(
        FirstCallExpectation::OkValue(S_FALSE),
        |getting_buffer_size| {
            let h_result = unsafe {
                AssocQueryStringW(
                    ASSOCF_NONE,
                    ASSOCSTR_EXECUTABLE,
                    PCWSTR(HSTRING::from(ext).as_ptr()),
                    PCWSTR::null(),
                    if getting_buffer_size {
                        PWSTR::null()
                    } else {
                        buffer.resize(buffer_size as _, 0);
                        PWSTR(buffer.as_mut_ptr())
                    },
                    &mut buffer_size,
                )
            };

            if h_result.is_ok() {
                Ok(h_result)
            } else {
                Err(windows::core::Error::from(h_result))
            }
        },
    )?;

    if success_h_result == S_OK && buffer_size > 0 {
        Ok(String::from_utf16(&buffer[..(buffer_size - 1) as _])?)
    } else {
        Err(E_FAIL.into())
    }
}

fn get_file_ext_app_with_no_truncate(ext: &str) -> windows::core::Result<String> {
    let mut buffer = Vec::new();
    let mut buffer_size = 0;

    let success_h_result = dual_call(
        FirstCallExpectation::HResultError(E_POINTER),
        |getting_buffer_size| {
            if !getting_buffer_size {
                buffer.resize(buffer_size as _, 0);
            }

            let h_result = unsafe {
                AssocQueryStringW(
                    ASSOCF_NOTRUNCATE,
                    ASSOCSTR_EXECUTABLE,
                    PCWSTR(HSTRING::from(ext).as_ptr()),
                    PCWSTR::null(),
                    PWSTR(buffer.as_mut_ptr()),
                    &mut buffer_size,
                )
            };

            if h_result.is_ok() {
                Ok(h_result)
            } else {
                Err(windows::core::Error::from(h_result))
            }
        },
    )?;

    if success_h_result == S_OK && buffer_size > 0 {
        Ok(String::from_utf16(&buffer[..(buffer_size - 1) as _])?)
    } else {
        Err(E_FAIL.into())
    }
}

To run the examples, clone my repository.
Questions:

Is there any case with a two-step call that dual_call() wouldn't cover?
Any improvement suggestions?
Are you willing to incorporate this into the crate?

I would suggest this is better off in a separate utility crate than in windows-rs.

Isn't the windows crate about more ergonomics than windows-sys, i.e., about providing more ease of use?

There are many different ways such a helper function could be written. E.g. using a stack buffer for small sizes.

Isn't this just a matter of how you define the buffer? My general approach with dual_call() would also support this. And isn't it a rather special use case that could be implemented by also using dual_call() when this level of performance needed?

I'm also not entirely convinced that what you have is much more ergonomic than using a loop that breaks when the buffer no longer needs to be resized.

It should be ensured that the call happens at most twice. And not having to repeat yourself in terms of error handling makes the code cleaner and less noisy.

But in many cases you don't want "at most twice". You want "grow the buffer until it's big enough" even if that takes multiple calls (e.g. because the size changed after the first call). A loop does prevent repeating yourself as errors are handled within the loop.

Isn't this just a matter of how you define the buffer?

Sure, it's left to the user, but that's more my point. It still leaves a lot for the user to do so I'm not seeing much benefit here. Maybe I'm wrong! In which case a utility crate can prove it.

But in many cases you don't want "at most twice". You want "grow the buffer until it's big enough" even if that takes multiple calls (e.g. because the size changed after the first call). A loop does prevent repeating yourself as errors are handled within the loop.

dual_call() is for the functions that are able to return the exact buffer size needed. Aren't there many of them? Even if there is a sizable amount of functions that aren't capable of returning the required buffer size, dual_call() would still help very much. For cases with functions incapable of returning the required buffer size, a loop will probably still be the best approach.

e.g. because the size changed after the first call

How well do people really handle this or are willing to handle this? This is about changes in very short time frames! If it's important somewhere, this will surely be a rare case.

It still leaves a lot for the user to do

They say, code is more often read than it is written. If there are basic means to make code using the windows crate less repetitive and verbose, I think the crate should provide them - similar to the w! macro.

That's what I'm not seeing. I don't find the first example less readable.
    loop {
        let result = unsafe {
            GetTokenInformation(
                process_token_handle,
                TokenUser,
                (!sid_and_attrs_buffer.is_empty())
                    .then(|| sid_and_attrs_buffer.as_mut_ptr().cast()),
                sid_and_attrs_buffer_size,
                &mut sid_and_attrs_buffer_size,
            )
        };
        if result != Err(ERROR_INSUFFICIENT_BUFFER.into()) {
            break result;
        }
        sid_and_attrs_buffer.resize(sid_and_attrs_buffer_size as _, 0);
    }?;

    dual_call(
        FirstCallExpectation::Win32Error(ERROR_INSUFFICIENT_BUFFER),
        |getting_buffer_size| unsafe {
            GetTokenInformation(
                process_token_handle,
                TokenUser,
                (!getting_buffer_size).then(|| {
                    sid_and_attrs_buffer.resize(sid_and_attrs_buffer_size as _, 0);
                    sid_and_attrs_buffer.as_mut_ptr().cast()
                }),
                sid_and_attrs_buffer_size,
                &mut sid_and_attrs_buffer_size,
            )
        },
    )?;

I agree with @ChrisDenton this sounds like good ideas for a separate utility crate. While the windows crate attempts to provide a more idiomatic programming model when compares to the raw bindings in the windows-sys crate, it is entirely focused on bindings generated from metadata and not on providing higher level hand-written wrappers and utilities. Those can and should be provided by dedicated utility crates that can focus on providing safe and idiomatic wrappers for specific APIs such as security, identity, graphics, networking, and so forth.

For the record, responding to @ChrisDenton:
The mental open-endedness is bothering me - when "quickly" reading it and not thinking everything through in a time-comsuming manner. With loops, the Rust compiler can't catch every case and still doesn't complain. Instead, the developer is responsible for flawless soundness (the compiler can mistake the type actual loop type ! with never occurring break for another type). You'd have to ponder on every case whether it's really unrealistic enough for it to not work as expected. And I find that to be annoying and hindersome.


Tests for Kotlin Wasm particles

The src/wasm/kotlin directory has no tests. This is uncomfortable given how crucial this piece of infrastructure is.
There are good tests in the src/wasm/cpp directory and I'm sure @mykmartin can provide guidance regarding how to test wasm particle infra well.
@alxrsngrtn @cromwellian given you 2 very involved in this can you discuss on whose plate this should be? I understand this will need to be prioritized against other work items, but I think it's uncontroversial to say that we should fix this for the end of October timeframe. Thoughts?

I'm pretty sure @mykmartin's test can be used mostly as-is just replacing the .wasm file references with the Kotlin ones. That's the magic of binary ABI compatibility.  These would be minimal integration tests however. Kotlin developers would probably prefer to write tests in Kotlin, and have the harness generated around that for WASM.

@cromwellian I certainly hope we can re-use the same typescript code for testing (and I mean literally the same, not an exact-but-separate copy). You'll still need all the test particles (wasm/cpp/tests/*-test.cc) ported over to Kotlin, of course.

I believe Alex is working on this again, are there pending PRs to tag here for tracking, or what work is planned upcoming?

No API-related ones, but #4066 makes sweeping (non-functional) changes across the wasm test suite, so Alex, you'll want to start working from that to avoid merge hassles.

@piotrswigon Just linked the PR where I do part 2/3 for Wasm API tests.
Part 3/3 will come after References are implemented in Kotlin.


fix typo

[x] Have you followed the contributing guidelines?
[x] Have you explained what your changes do, and why they add value to the Guides?

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.

Autotranslation (which of course may be bad) says the existing heading is closer to the English https://opensource.guide/starting-a-project/#writing-your-contributing-guidelines than the heading in this PR. Could another Indonesian reader review this? Perhaps previous contributors @sodrooome or @willysr may be willing to double check?

yes of course

The translation is already correct, thanks :)


Add system property to be able to tune retriesNumber inside HashLoadBalancerImpl

As both RoundRobinLoadBalancerImpl and RandomLoadBalancerImpl load balancers have the feature: hit all possible participants with a guarantee of no repetitions because of which the number of repetitions depends on the number of participants, the HashLoadBalancerImpl tries to hit related 'sticky' participants and once it fails it starts to route the request randomly as the retry policy.
The task:
Make possible to tune retriesNumber argument with system property flag.
Advised solution:
Create the object inside the utils module where all needed system properties are kept instead of reading directly inside services.
Document the system properties and explain how to use them

Already fixed with the config property


Test cases for truncate_to_hour and truncate_to_half_hour

A test case for truncate_to_day would be good too, there's some accidental testing of this (and of the others for that matter).

And also half_day, ditto.

Fixed in the Go version, and the Rust version has been retired.


WSL2 freezes/timeout upon launch (cannot start)

Windows Version
Microsoft Windows [Version 10.0.22621.1485]
WSL Version
<IP_ADDRESS>
Are you using WSL 1 or WSL 2?

[X] WSL 2
[ ] WSL 1

Kernel Version
Can't start
Distro Version
Ubuntu
Other Software
(Maybe not related)
Error initially starts from using cmake & gcc to build a very large project (llvm) and then suddenly Ubuntu mounts all filesystems as read only, and most shell commands stop working (Input/output error). Now after I restarted my PC and try to launch WSL again, it hangs and did not respond.
Repro Steps
Start Ubuntu WSL from the command line
Expected Behavior
no error
Actual Behavior
Hangs and then displays timeout error Wsl/Service/CreateInstance/HCS_E_CONNECTION_TIMEOUT
Diagnostic Logs
WslLogs-2023-04-10_16-38-42.zip
Logs attached

Thanks for the logs! Looks like things are getting stuck attaching one of the VHDs. @kelsey-steele - I'm seeing a bunch of errors that look like this in dmesg:
[   96.100309] hv_storvsc fd1d2cbd-ce7c-535c-966b-eb5f811c95f0: tag#829 cmd 0x2a status: scsi 0x2 srb 0x4 hv 0xc0000001

Do you have any idea what could be happening here? I'm not really seeing anything in the stovcp logs from the host.

Thanks for the logs! Looks like things are getting stuck attaching one of the VHDs. @kelsey-steele - I'm seeing a bunch of errors that look like this in dmesg:
[   96.100309] hv_storvsc fd1d2cbd-ce7c-535c-966b-eb5f811c95f0: tag#829 cmd 0x2a status: scsi 0x2 srb 0x4 hv 0xc0000001

Do you have any idea what could be happening here? I'm not really seeing anything in the stovcp logs from the host.

I would really need to see more. @benhillis can you direct me to where you grabbed that dmesg line from the logs or forward the rest to me? Is the "KernelVersion"="<IP_ADDRESS>" in HKLM.txt accurate for current build? This seems quite off, so I'm assuming a bit this isn't up to date.
Regarding the hv_storvsc error, cmd 0x2a shows to be a write command, which looks like it would line up with the build that was in progress. I'm wondering if a corruption occurred during the install and the switch to read-only was a result of that?
@jerryc05, Sorry to hear this has happened and I appreciate you sending what information you could.
With you re-installing Ubuntu, does that mean other WSL distros were left unharmed? Did you try installing llvm after the reinstall? Then finally, can you please send us the output of "wsl --version" ran in powershell? Thank you! :)

@kelsey-steele

does that mean other WSL distros were left unharmed
well, I only encountered this error on my Ubuntu WSL. I guess all other WSL works (but I did not check it at the time I captured this log)
Did you try installing llvm after the reinstall
everything went just fine after reinstall. idk what triggered this bug, might be a filesystem corruption (just guessing) under super high CPU and disk load
wsl --version

PS C:\WINDOWS\system32> wsl --version
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1485

@jerryc05 appreciate the information. Glad everything is working now at least! I'll poke around this a bit more and see if I can get any more information or ideas for what happened; definitely want to try preventing it from happening again or to others. Please ping me if you notice anything going awry again with your Ubuntu instance.


Worklflow creation fails

We get in logs:
2022-03-27T09:20:15.226Z | Traceback (most recent call last):
2022-03-27T09:20:15.226Z | File "/opt/conda/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute
2022-03-27T09:20:15.226Z | result = await result
2022-03-27T09:20:15.226Z | File "/opt/conda/lib/python3.9/site-packages/jupyterlab_vre/handlers.py", line 402, in post
2022-03-27T09:20:15.226Z | parser = WorkflowParser(nodes, links)
2022-03-27T09:20:15.226Z | File "/opt/conda/lib/python3.9/site-packages/jupyterlab_vre/workflows/parser.py", line 25, in init
2022-03-27T09:20:15.226Z | self.__parse_links()
2022-03-27T09:20:15.226Z | File "/opt/conda/lib/python3.9/site-packages/jupyterlab_vre/workflows/parser.py", line 62, in __parse_links
2022-03-27T09:20:15.226Z | og_id_to = self.__get_og_node_id(link['to']['nodeId'])
2022-03-27T09:20:15.226Z | File "/opt/conda/lib/python3.9/site-packages/jupyterlab_vre/workflows/parser.py", line 73, in __get_og_node_id
2022-03-27T09:20:15.226Z | return self.nodes[node_id]['properties']['og_node_id']

could not replicate


Provide Feedback on product button is broken

The button to provide feedback on "THIS PRODUCT" is broken. It only leads to old UserVoice page which is no longer functioning.
Please update that to the correct place to provide feedback on this product

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f0b8f651-9d8e-a34b-8dde-2b6a9448f875
Version Independent ID: 20e96426-627d-9973-8303-a43a114c7b61
Content: Anti-phishing policies - Office 365
Content Source: microsoft-365/security/office-365-security/set-up-anti-phishing-policies.md
Product: m365-security
Technology: mdo
GitHub Login: @chrisda
Microsoft Alias: chrisda

https://support.microsoft.com/en-us/office/uservoice-pages-430e1a78-e016-472a-a10f-dc2a3df3450a
still waiting for the "1st party solutions for customer feedback" :)

@Jimbolino Thank you for your feedback. The link has been updated to https://feedbackportal.microsoft.com/feedback/
Hope this helps!
Thanks
Sri

@rbishop-etq Thank you very much for your kind feedback. Considering your valuable feedback, please log this issue as advised. Here we are limited to documentation fixes and improvements only. Concerning team will evaluate and take the appropriate action, as per their schedule. We proceed here to close it. Thanks again for taking out some time and sharing your feedback.


GET https://use.fontawesome.com/releases/v5.6.3/css/fontawesome.css net::ERR_TIMED_OUT

First of all, I really like this plugin，but i have something wrong.
my docsify loading slowly, the console message is 【fontawesome】fail to load
i had try to download fontawesome, and import relevant document in index.html
after doing this, fontawesome can work, but docsify still loading slowly due to the fail request
Is there a way to solve it,  i really really love this plugin~~

someone told me this following solution:
1、download<EMAIL_ADDRESS>2、delete fontawesome relevant import url
3、import this modified file in docsify index.html
ps：download fontawesome, and import relevant document in index.html

same problem


Crash

Problem Description
The game consistently crashes after a while
Here's one of crash messages:
The mod Factory Planner (1.1.72) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event factoryplanner::on_nth_tick(8151854)
factoryplanner/backend/classes/Collection.lua:69: Dataset count incorrect
stack traceback:
[C]: in function 'error'
factoryplanner/backend/classes/Collection.lua:69: in function 'remove'
factoryplanner/backend/classes/Factory.lua:32: in function 'remove'
factoryplanner/ui/main/subfactory_list.lua:35: in function 'handler'
factoryplanner/util/nth_tick.lua:10: in function <factoryplanner/util/nth_tick.lua:7>
I play with IR3 and transport drones.
Reproduction
After I load and start adding recipes to a planner a game crashes after a while. It doesn't crash on any particular recipe just after some time when I click to add recipes it crashes.
factorio-current.log
IR3 27.zip

Here's the save when it crashes right after loading.
IR3 28.zip

Thanks for the report, and sorry for not replying to you earlier. This has been a lingering issue for a long time unfortunately, and it kind of infects saves in some way. I thought I had fixed it earlier, but apparently not fully.
Now, the potentially good news is that I have been working on a rewrite that is due out soon, and it's changed in a way that will make this kind of crash impossible, so we'll have to wait until that's released, and if you still run into issues afterwards, please let me know.
I think the migration will work fine, but your save will be a great way for me to test that, so thank you for that!


Refactor stack-monitor tests

Summary

Resolves #141. The USN monitoring tests used to fail once in a while because they rely on the output of HTML on an external Ubuntu USN page to be in a certain order. This PR refactors the stack USNS monitoring tests.
The old tests used a mock server to mock out what we get from https://ubuntu.com/security/notices/rss.xml, but then used real USNs in that server, and actually reached out to the real links for each USN to test that we could retrieve CVEs and other information. This refactor completely mocks out all of the HTML for the entire process, so that our tests are only testing the HTML parsing functionality in the code, and not dependent on the content of a website we don't maintain.
I also added a query_rss_test.go which actually does reach out to https://ubuntu.com/security/notices/rss.xml, and then just makes sure that we get some kind of output XML that we can generate USN entries for. We don't care what the content is, just that we can ping the server and successfully perform a transformation on the output information to get it into an expected format. This test is slow because it actually reads and retrieve CPEs/other information for each USN, and depending on the USNs present that day, there could be a large number of CPEs. I believe we need this test to make sure that the RSS feed is still reachable and serves output as expected.
Use Cases

Checklist

[X] I have viewed, signed, and submitted the Contributor License Agreement.
[X] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[X] I have added an integration test, if necessary.
[X] I have reviewed the styleguide for guidance on my code quality.
[ ] I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Tagged @ryanmoran for additional review to @paketo-buildpacks/stacks-maintainers, as he provided some insights into why we should refactor.

It looks good for me, lets wait until @ryanmoran reviews it.


Flaky column split tests.

https://buildkite.com/xgboost/xgboost-ci/builds/5300#018f9f25-a37c-4240-8245-ad8209ede209
Some C++ tests for column splits are flaky. Some of these tests are added in https://github.com/dmlc/xgboost/pull/10112 , which increases the coverage but also causes some random issues on the CI. They are not critical, but we need to investigate how to make these tests deterministic.

@rongou I think I have found the root cause for this, the bit field is not thread-safe for CPU https://github.com/dmlc/xgboost/blob/1ca4bfd20e442f0a26a90e5f65218bb4af0e7c16/src/tree/common_row_partitioner.h#L57 .


i cant see the calendar properly

the calendar desplaied like this :
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
26
27
28
29
30
31
1
2
and so on...

Hi there,
It sounds like you're not including the stylesheets for this library.
Hope that helps! 😄

thanks!


Admin Theme - Widgets

manage page
On page load wrong icon is highlighted:

Have to click 2nd then click back before it does anything.
Also - wrong icon used? Best one available?
Also - intentionally only using small amount of width for main ui table?
add widget
alignment:

buttons

button height slightly off on cancel

unpublish widget wording:

That / The

publish needs css classes like unpublish

Move buttons aren't working


Use some of the security isolation features provided by systemd

The isolation features will greatly decrease the chances of successful exploitation of the entire system in case of security vulnerabilities discovery in this software.

Cheers, I'll have to look a bit more into these features of Systemd before I can properly review the impact, but thanks for proposing this!

thanks for your help,I have solved this problem,but I still have another problem.Follow:
loraserver:
FATA[0000] start api listener error: listen tcp <IP_ADDRESS>:8000: bind: address alredy in use
and I think my configuration is right.Can you help solve this problem?Thank you.

I'm closing this pull-request. Please note that each LoRa Server project service runs under its own user:group (e.g. loraserver:loraserver). Even if there would be a vulnerability, I don't see how this could exploit the entire system as the process would not be able to acquire administrative permissions.


DataMovement Pause All

New public API TransferManger.PauseAllRunningTransfersAsync().
Internal API CanPause filters down to transfers that actually need pausing to avoid long-lived TransferManagers using more and more memory over time.
Includes forgotten changelog entry for previous PR changing API of single pause.

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.Storage.DataMovement


Automated Package Upgrade

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


fix(module:input): fix type mismatch in NzInputComponent

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

[x] The commit message follows our guidelines: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CONTRIBUTING.md#commit
[ ] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

#271
What is the new behavior?
Does this PR introduce a breaking change?
[ ] Yes
[x] No

Other information

Coverage increased (+0.02%) to 40.716% when pulling e7c1e143e00f62c0dacc2d9a6dd3096276ffbe6e on thegatheringstorm:patch-1 into 514c2eeb7bda559b7603bbe5cc1e37f8d675d9ff on NG-ZORRO:master.

Coverage increased (+0.03%) to 40.734% when pulling e7c1e143e00f62c0dacc2d9a6dd3096276ffbe6e on thegatheringstorm:patch-1 into 514c2eeb7bda559b7603bbe5cc1e37f8d675d9ff on NG-ZORRO:master.

Coverage increased (+0.03%) to 40.734% when pulling e7c1e143e00f62c0dacc2d9a6dd3096276ffbe6e on thegatheringstorm:patch-1 into 514c2eeb7bda559b7603bbe5cc1e37f8d675d9ff on NG-ZORRO:master.


Add SpringBoot test application

This PR adds a test application written in Java with SpringBoot 3.x. We can use this application to test eBPF metrics generation in the future if we add lower level probes.

Codecov Report

Merging #108 (092a942) into main (d40922c) will decrease coverage by 27.32%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main     #108       +/-   ##
===========================================
- Coverage   74.50%   47.19%   -27.32%
===========================================
  Files          21       20        -1
  Lines        1518     1460       -58
===========================================
- Hits         1131      689      -442
- Misses        291      717      +426
+ Partials       96       54       -42

Flag
Coverage Δ

integration-test
?

unittests
47.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 16 files with indirect coverage changes


Object.keys /  Object.entries not type checking argument

TypeScript Version:  3.7.2
Search Terms:
keys
entries
Code
// Some examples
// obj is a number
let obj: number = 23
for (let key of Object.keys(obj)){
    console.log(key)
}

// obj2 is a string
let obj2: string = "hello"
for (let key of Object.keys(obj2)){
    console.log(key)
}

Note: The same issue occurs with Object.entries
Expected behavior:
TypeScript error since number and string are not valid parameter types for Object.keys(object).
Actual behavior:
No error/warning.
Playground Link:
https://www.typescriptlang.org/play/?ssl=1&ssc=1&pln=11&pc=2#code/PTAEHsCMCtQSwM6gIagHYFcC2kCmAnAWACgAbXAFwhgC51s99QBeUAJgGYSAzcJgCnJUA1rgCeEbqADyMXAGMKAOlFiE-KNACUWgN4lQh0PPBoE4cktLgA5v1VaSAXxIkQ1aAEZ4SVAgr4cGg2JEIebHT+gcEsoABEABa4pNZxPHyggpSgqpIycooq4uqabDr6xEbGpuaW1nYOzkA
Related Issues:
N/A

Since the function definition for Object.keys() is
ObjectConstructor.keys(o: {}): string[] (+1 overload), it may also be related to a root issue with the type {}, which should represent an object literal.
Observe:
let value: {} // value has type {}
value = 5 // Does not error
value = "hello, world" // Does not error

Related: https://github.com/typescript-eslint/typescript-eslint/issues/1185

Everything except null and undefined is assignable to {} because it’s a structural object type which requires no specific properties and all non-nullish values can be treated as objects at runtime.
tl;dr: number is assignable to {} for the same reason it’s assignable to { toString(): string }.

Everything except null and undefined is assignable to {} because it’s a structural object type which requires no specific properties and all non-nullish values can be treated as objects at runtime.

Makes sense, perhaps the expected parameter type for Object.keys / Object.entries should be updated to something like {[x: string]: any}?

I think primitives are still assignable to that.  It would have to be object if you wanted to exclude primitive types.

@rohitf In general, {} is useful for when you want to use it for what it is: everything but null | undefined. The problem arises when developers mistakenly think it means object.
With regards to Object.keys/Object.entries: I don't know what decisions were made or why.

Technically, it's valid to pass a non-object literal to Object.keys:
Object.keys(0); // []
Object.keys('a'); // ['0']

@resynth1943 wow didn't know that, looks like it's definitely possible but generally not safe / intended behavior. In that case, a warning would likely be better than an error (since it is valid JS).

There is no distinction between warnings and errors in TS.  Sometimes I wish there was. 🙁

"not safe" / "not intended" is in the eye of the beholder. If x[Object.keys(x)[0]] returns a non-undefined value, as it does for string, it can hardly be said to be truly wrong.
In any case, [] for primitive values is a well-defined result that accurately describes a runtime fact without creating any big surprises or coercions, so this doesn't look like something that deserves creating a breaking change for.


Revert "Update de_Latn.textproto"

Reverts googlefonts/lang#152

Thank you for that! I agree that this issue is "complicated". The uppercase letter got into Unicode in 2007, and for some 10 years many voices were against it. But gradually, designers added the glyph into some fonts, and then users started adopting them, and then the German standard bodies decided "well, in the end, it's not a bad idea". I’m pretty sure that in 10 years or so, it’ll be considered fully normal by most users.
And now it’s "there for you to peruse" — so FONTS should HAVE it, if they’re "inviting" you to be the right font for German.
This process is a fascinating one from the point of view of written language. 25 years ago, we had the Euro symbol, then a few other currency symbols (like Russian ruble and Turkish lira), and now the uppercase ß.  :)

By the way, the Rat für deutsche Rechtschreibung has updated the spelling rules this year.
The 2016 rules had the following text for § 25 E3:

Bei Schreibung mit Großbuchstaben schreibt man SS. Daneben ist auch die Verwendung des Großbuchstabens ẞ möglich. Beispiel: Straße – STRASSE – STRAẞE.

The new 2024 rules have the following text for § 25 E3:

Bei Schreibung mit Großbuchstaben ist neben der Verwendung des Groß buchstabens ẞ auch die Schreibung SS möglich: Straße – STRAẞE – STRASSE.


Error Condition ' blocked > 0 ' is true - everytime when I click at the searched element in "Search Help"

Godot version:
3.1 bf59b732
OS/device including version:
Windows 10
Issue description:
When I try to find some class in Search Help window(is visible at the top of Script Editor) and then click at some element then this error appear:
ERROR: clear: Condition ' blocked > 0 ' is true.
   At: scene/gui/tree.cpp:3113

Steps to reproduce:

Search something in Script Editor
Click at some search result

https://streamable.com/as98n

CC @YeldhamDev


Fix small compilation problem for PIR.Compiler.Error

PIR.Compiler.Error was missing from cabal so it was failing to compile all this time. Fix its compilation.
Pre-submit checklist:

Branch

[ ] Commit sequence broadly makes sense
[ ] Key commits have useful messages
[ ] Relevant tickets are mentioned in commit messages

PR

[x] Self-reviewed the diff
[x] Useful pull request description
[x] Reviewer requested

If you updated any cabal files or added Haskell packages:

[x] nix-shell shell.nix --run updateMaterialized to update the materialized Nix files
[ ] Update hie-*.yaml files if needed

If you changed any Haskell files:

[x] nix-shell shell.nix --run fix-stylish-haskell to fix any formatting issues

If you changed any Purescript files:

[ ] nix-shell shell.nix --run fix-purty to fix any formatting issues

Pre-merge checklist:

[ ] Someone approved it
[ ] Commits have useful messages
[ ] Review clarifications made it into the code
[ ] History is moderately tidy; or going to squash-merge

It's the dumb timeout. Fixed on master, I'm just going to force-merge this.


Missing XML comments.

We should add XML comments for all publicly visible types or members. This will improve the usage, intellisense will provide information to the end users. If you want to contribute, you are welcome to do so.
Instructions:

On each public class, public property, public method, we should add XML comment.
Just on top o the name of class/property/method start typing three slashes ///. The VS automatically will create the skeleton for the XML comment. It looks as following:

        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>

Try to analyze what that class or method does, and accordingly write in the comment.

In the end, anyhow we will try to review it, so don't get stuck too much :)

If the current style of xml comments/docs that I made is OK with you guys.
Then I'll try to add some more whenever I have some spare time ;)

Oh great! Thanks @ConnerOrth.
Please go ahead, it's appreciated. Once we complete documenting it, we may revise it all together.

Would you prefer a single PR for all docs? Or shall I make a PR for each file?
Im guessing the single PR right?

Whatever fits you better, it's not an issue. You can PR batches, not necessarily one file.

I'll try to get some more documentation going in the upcoming weeks/months.
Have been and still am going through some personal stuff, so sorry I and the documentation process just 'fell of the earth' for a while.

No worries, take care of yourself. We thank you for your help so far.


Remove dublicate line for bar

Yes, it should and the commit history will forever mock me  :laughing:


Incremental: ensure we add post-compile jobs if no new compile jobs are found

rdar://74447605

@swift-ci please test

@swift-ci please test

Hate to say it, but I'm now waffling.
Here's what I'm thinking... in a non-incremental build, maybe there would be nothing to sequence the jobs other than llbuild input-output matching. (Is that right?) So, could all the pre-compile jobs just get run in parallel with the post-compile jobs modulo inputs and outputs? If so, your fix is better: unfinishedJobs -> unfinishedCompileJobs.

Ok, let's merge this for now. @davidungar any advice for adding test for this change?

Ok, let's merge this for now. @davidungar any advice for adding test for this change?

Good question, @nkcsgexi . I guess we need a test that creates a precompiled header. I would look at testIncremental to see what that does. Much of that machinery should be reusable.

One last thought: with this change are we guaranteed that the whole driver process won't terminate before the pch job?

One last thought: with this change are we guaranteed that the whole driver process won't terminate before the pch job?

I think this job is always going to be a part of the initial set of jobs we submit to llbuild, (not one discovered when other jobs finish), so the ExecuteAllJobsRule should ensure it actually gets run before we return from MultiJobExecutor::execute.

One last thought: with this change are we guaranteed that the whole driver process won't terminate before the pch job?

I think this job is always going to be a part of the initial set of jobs we submit to llbuild, (not one discovered when other jobs finish), so the ExecuteAllJobsRule should ensure it actually gets run before we return from MultiJobExecutor::execute.

Thanks! Sounds good to me.


how to provide custom input data while run profile subcommand

I have a ensemble model accept bytes like image input data which shapes [-1] in triton config file,  then  decode it to matrix like image data for next cnn trt model. Now I want to use model_profile tool to find the best configuration for this ensemble model. I must provide real image input data for the decode image module, because random generated input data can't be decoded by decode module. How can I provided this input data for the profile subcommand?

Here you can learn about the different options for passing in input data into Perf_Analyzer:
https://github.com/triton-inference-server/client/blob/main/src/c%2B%2B/perf_analyzer/docs/input_data.md
Model Analyzer uses Perf_Analyzer under the hood. This shows how to specify Perf Analyzer flags into MA:
https://github.com/triton-inference-server/model_analyzer/blob/main/docs/config.md#perf-analyzer-flags

@tgerdesnv thanks so much, it works for me


Problem with non-latin domains

I am trying to start blog on ccTLD non-latin domain "кулік.укр".  But when I add domain name to config.js it causes an issue:
ERROR: Your site url in config.js is invalid.
http://кулік.укр
Please make sure this is a valid url before restarting
Error: Your site url in config.js is invalid.
at ConfigManager.validate (/var/www/kulik/core/server/config/index.js:320:25)
at /var/www/kulik/core/server/config/index.js:233:29
at tryCatch1 (/var/www/kulik/node_modules/bluebird/js/main/util.js:45:21)
at Promise._callHandler (/var/www/kulik/node_modules/bluebird/js/main/promise.js:571:13)
at Promise._settlePromiseFromHandler (/var/www/kulik/node_modules/bluebird/js/main/promise.js:581:18)
at Promise._settlePromiseAt (/var/www/kulik/node_modules/bluebird/js/main/promise.js:713:18)
at Promise._settlePromiseAtPostResolution (/var/www/kulik/node_modules/bluebird/js/main/promise.js:335:10)
at Async._consumeFunctionBuffer (/var/www/kulik/node_modules/bluebird/js/main/async.js:85:12)
at Async.consumeFunctionBuffer (/var/www/kulik/node_modules/bluebird/js/main/async.js:40:14)
at process._tickDomainCallback (node.js:463:13)
When I change url to converted analog it causes issue again:
ERROR: Your site url in config.js is invalid.
http://кулік.укр
Please make sure this is a valid url before restarting
Error: Your site url in config.js is invalid.
at ConfigManager.validate (/var/www/kulik/core/server/config/index.js:320:25)
at /var/www/kulik/core/server/config/index.js:233:29
at tryCatch1 (/var/www/kulik/node_modules/bluebird/js/main/util.js:45:21)
at Promise._callHandler (/var/www/kulik/node_modules/bluebird/js/main/promise.js:571:13)
at Promise._settlePromiseFromHandler (/var/www/kulik/node_modules/bluebird/js/main/promise.js:581:18)
at Promise._settlePromiseAt (/var/www/kulik/node_modules/bluebird/js/main/promise.js:713:18)
at Promise._settlePromiseAtPostResolution (/var/www/kulik/node_modules/bluebird/js/main/promise.js:335:10)
at Async._consumeFunctionBuffer (/var/www/kulik/node_modules/bluebird/js/main/async.js:85:12)
at Async.consumeFunctionBuffer (/var/www/kulik/node_modules/bluebird/js/main/async.js:40:14)
at process._tickDomainCallback (node.js:463:13)
Is it possible to fix this issue. Thanks

Hi there,
that seems to be an issue with the validator module we are using. I opened an issue there and provided a fix. Hopefully this can make it into the next release of Ghost.

Thanks


[Bug] record_current_batch_training_metrics() got an unexpected keyword argument 'update_panel'

Describe the bug
There is an error in acc tests

https://github.com/InternLM/InternEvo/actions/runs/8630477081/job/23663676249
Environment
python3.10
torch2.1
Other information
No response

Resolved.
https://github.com/InternLM/InternEvo/actions/runs/8640774077/job/23689218293


Ability to capture entirety of query execution, including Result processing

As of 0.8.2, one can get before/after callbacks for Statement.execute, Result.getRowsUpdated and Result.map. There's also a callback that fires for each item in Result.map
However, there's no direct way to capture the duration from the start of Statement.execute until the end of either getRowsUpdated or map.  One can keep state in the associated ConnectionInfo, but there's no guaranteed way of associating the result callbacks to the associated query (which is useful if one is generating trace data)

Hi @osi,
Thanks for the suggestion.
Currently there is no callback at the end of processing Result.
Since you mentioned trace data, is it distributed tracing?
If so, usually you can retrieve current span at any place from tracer. So that you can associate current query to the span when query is executed via [before|after]Query callback, then at connection close, which is slightly different from the end of Result processing but almost equivalent, you can annotate the span. Then, in tracing UI, it is visually available to get the duration from executing query till end of its result processing via annotation.
Please see this listener implementation for tracing with Sleuth.
https://github.com/ttddyy/r2dbc-proxy-examples/blob/master/listener-example/src/main/java/io/r2dbc/examples/TracingExecutionListener.java
Another approach is you can store values to ConnectionInfo#getValueStore.
During lifecycle of executing query and processing result, same connection should be used. This means whenever retrieving ConnectionInfo, it is always associated to the same ConnectionInfo/Connection instance.
You can put the start time at Statement#execute and retrieve it to calculate start-to-finish duration at Connection#close.
Also, you can associate the query to the same ConnectionInfo from afterQuery callback method since this uses the same connection which resolves to the same ConnectionInfo.
Does this approach meet your need?

Yes, this is distributed tracing. That example is what we started with, but then realized it wasn't capturing the full duration of the query, as some important processing is done as part of Result#map that we want to have included into the span for the query.
In the reactive world, I like to try to avoid depending on magic thread-locals to provide external state. I'm okay with dealing with this to get the tracer itself, but once a connection span has been created, it is otherwise possible to use the ValueStore to store information.
What I'm doing at the moment is relying on the fact that we don't do any concurrent query execution, and temporarily storing the query span into ConnectionInfo#getValueStore for the brief duration between afterQuery and the before_OnResult callback.
Given the other methods that help track query execution (such as onEachQueryResult), I felt that having a ValueStore that was able to store state across the entire lifecycle of query execution would be a nice addition to the API.

I checked the code and I think what you need is ValueStore associated to QueryExecutionInfo( QueryExecutionInfo#getValueStore())
Let's say executing a query which returns 3 rows with value 100, 200, 300.
The callback method order is:

beforeQuery()
eachQueryResult()  // 100
eachQueryResult()  // 200
eachQueryResult()  // 300
afterQuery()

These callback methods receives QueryExecutionInfo.
So, they have access to the context of the executing query.
Also, QueryExecutionInfo has ValueStore associated. (QueryExecutionInfo#getValueStore())
The value store is available during those callbacks under the scope of query execution.
You can put a query span and can retrieve it in eachQueryResult.
QueryExecutionInfo#getExecuteDuration is only available in afterQuery() which contains the duration from beforeQuery to afterQuery which includes result processing time.

afterQuery callback captures duration including processing each query result.
JavaDoc has updated to mention the callback order.


feat: migrate sponsors and support us  components to typescript

Description
This PR migrates the following components to TypeScript

SupportUs
sponsors

Related issue(s)

#2636
cc: @akshatnema

/rtm


Language Auto Detection not working

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.90.2
OS Version: Windows 11

Steps to Reproduce:

File > New Text File > 'Untitled-1' created as Plain Text.
Type (for example) get-process (Powershell).  File stays as plain text.
Click the 'Language Mode' button in the bottom right to change the language.

or

File > New File > only 'Text File' and 'Jupyter Notebook' are the only options
Click the 'Language Mode' button in the bottom right to change the language.

@svetecs are you saying you don't see this?:

Or that the "Auto Detect" option doesn't choose PowerShell?

That's right.  I used to be able to select 'New File' and vscode would give me the option of selecting the language, or it would autodetect.  The only option I have is:

I can specify the language AFTER I create the file by clicking in the bottom right corner, or, creating a new file and saving (for example) as a PS1.  But sometimes, I don't want to save the file, I just want a PS environment.
I don't see the prompt to select a language like I used to:

I've uninstalled and reinstalled vscode from Jan 2024 (and deleted all of my settings) to no avail.

Vote for return of the prompt to select a language! It disappeared in one the recent updates.

Vote for return of the prompt to select a language! It disappeared in one the recent updates.

Did you notice which update you think it went missing?

Did you notice which update you think it went missing?

Don't remember exactly. Probably 1.90.0

Did you notice which update you think it went missing?

Don't remember exactly. Probably 1.90.0

I stumbled across this:
https://stackoverflow.com/questions/68958312/vscode-new-window-select-language/68958620#68958620
I'm pretty sure I went back as far as 1.86.x and still experienced the issue.

all recommendations dont work for me

all recommendations dont work for me

Same here.  Mine was already set to 'text'.

Duplicate https://github.com/microsoft/vscode/issues/214679, this is already fixed in Insiders

/duplicate https://github.com/microsoft/vscode/issues/214679

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!


gitea: 1.17.1 -> 1.17.2

Description of changes
Upstream release fixes some security issues.
https://github.com/go-gitea/gitea/releases/tag/v1.17.2
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

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

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

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

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

[x] Fits CONTRIBUTING.md.

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

1 package built:

gitea

@techknowlogick do you know if 1.16 (on stable) is affected by this? Perhaps we can just apply the patch :thinking:


2.0.10 running on MacOS 12.2 and torrents won't start!

Torrents won't start
https://imgur.com/a/BSUmBNh

tracker is dead

That was obviously a joke because i don't answer "it don't work please fix it" comments.

Can you try with this public torrent
https://releases.ubuntu.com/21.10/ubuntu-21.10-desktop-amd64.iso.torrent
and see if it works?
If this one does not work we would be able to take the tracker out of the equation

well. this one worked. so, your original answer is valid..lol... rutracker.org found out how to disable the fakers then

i had tested with no ratio trackers and the one i mentioned. none of them worked, so i thought that joal was not working


How can you run the oidc-sample-server locally?

Hi @manfredsteyer, I'm setting up a local environment but can't find the steps here to run the local oidc-sample-server in this repo.
https://github.com/manfredsteyer/angular-oauth2-oidc#sample-auth-server
My aim is to run a dummy oidc server locally during development, instead of needing to deploy one on the cloud.
Is that possible, or are there some steps documented on running a local oidc server?
thanks!

I think the section you link to means you can run the samples in this repo as they would integrate with an online demo server, courtesy of the maintainer.
Similar, my community-provided sample repo will integrate with the demo.identityserver.io server.
Both of them use an online Identity Server. If you want to have a local setup in your app repository, you'll need to set it up yourself. As far as I know there's no directly provided sample for that.
Hope that makes sense?

yeah that's clear :)

I think the method you mention could work and would be the way to go. But it can be tough to mock OIDC and OAuth2 stuff properly as the specs are not all too simple. Looking for a nodejs based oidc implementation might be an alternative option? Run it locally next to your angular app for spec-compliant testing?
Good luck!

Yeah that's true, I started writing the interceptor but there are too many things to mock in OIDC.
I think your suggestion of running a local identity server is a good option. Something like this docker image https://github.com/sjefvanleeuwen/identity-server

Aye, think that's the way to go indeed. Good to hear you found a potential solution! And thanks for asking. I'll resolve the thread but it'll be here for others to view if they have the same question.
Cheers!


Text and RichText need to update their pattern for linked text Properties

@zepumph identified this code in Text.ts

    if ( Tandem.PHET_IO_ENABLED && !wasInstrumented && this.isPhetioInstrumented() ) {
      this._textProperty.initializePhetio( this, TEXT_PROPERTY_TANDEM_NAME, () => {
          return new StringProperty( this.text, combineOptions<StringPropertyOptions>( {

            // by default, use the value from the Node
            phetioReadOnly: this.phetioReadOnly,
            tandem: this.tandem.createTandem( TEXT_PROPERTY_TANDEM_NAME ),
            phetioDocumentation: 'Property for the displayed text'

          }, config.textPropertyOptions ) );
        }
      );
    }
  }

It seems like we should eliminate this and instead make sure we are linking back to the LocalizedStringProperty.
@zepumph do you have time to take the lead on this part?

From https://github.com/phetsims/axon/issues/408

I discussed this with @samreid, and we feel like the best general behavior would be to mark as readonly and not as uninstrumented.
Using this patch, I found a couple cases that help me feel similarly about this:
Index: js/nodes/Text.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/nodes/Text.ts b/js/nodes/Text.ts
--- a/js/nodes/Text.ts	(revision edb9a2bf1639e8b83bca4ea09a97ca32ce20daa4)
+++ b/js/nodes/Text.ts	(date<PHONE_NUMBER>985)
@@ -225,6 +225,7 @@

     if ( Tandem.PHET_IO_ENABLED && !wasInstrumented && this.isPhetioInstrumented() ) {
       this._textProperty.initializePhetio( this, TEXT_PROPERTY_TANDEM_NAME, () => {
+          console.log( new Error().stack );
           return new StringProperty( this.text, combineOptions<StringPropertyOptions>( {

             // by default, use the value from the Node

natural-selection/ProportionsBarNode
ph-scale/WaterFaucetNode

In both of these cases, they were instrumented because that was the default behavior, and this was a biproduct of that decision that effected less-important cases of text.

I also want to note that in GAO, there were no examples of the default textProperty, so, as desired, this is indeed an edge case. The main pattern is passing in i18n strings, and any featured string should use that pattern to make their string editable, or see https://github.com/phetsims/chipper/issues/1307 for cases where we still support editing strings in sims + i18n support.

From here: Note I committed changes to make textProperty readonly true by default. I would like to PSA this into PhET-iO meeting thursday.

@samreid how does this look to you?

Looks great, leaving open for PhET-iO meeting PSA.

PSA COMPLETE


Added a new D3 free course

Added a link to https://www.freecodecamp.org/news/learn-data-visualization-in-this-free-17-hour-course/.

Duplicate content


[WIP]flink 1.14 support

Feature Request

flink 1.14 support
flink multi version runtime dependency isolation
The task can specify the version of the flink to run

flink 1.14 适配支持
多版本flink运行时依赖隔离,更好的自适应on yarn和 on k8s
任务可以自由选择flink版本运行

When I restarted streamx, streamx re-created monitoring for k8s application mode applications. If the task is not monitored, it will report an error, causing streamx to fail to start.


Update _data_color

Hello team, I've attempted to simplify the logic in this PR for _data_color. I've updated the code according to my coding preferences, but please feel free to reject or modify the code based on your judgement.

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

Project coverage is 81.70%. Comparing base (14ce2c5) to head (595a299).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #294      +/-   ##
==========================================
- Coverage   81.71%   81.70%   -0.02%
==========================================
  Files          41       41
  Lines        4321     4313       -8
==========================================
- Hits         3531     3524       -7
+ Misses        790      789       -1

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


Sentry: Unrecognized auth token format!

Build/Submit details page URL
https://expo.dev/accounts/anuditnagar/projects/omnid-app/builds/a3617877-5ee5-4440-a9fb-31a8f3fccf01
Summary
EAS Build works locally with the same token but not on EAS. I have added the SENTRY_AUTH_TOKEN as an account secret.
Build logs
> Task<EMAIL_ADDRESS>Copy `debugId` from packager source map to Hermes source map...
Done.
Check generated source map for Debug ID: 7ca05721-6ee4-4815-9782-bfeba7e08983
Sentry Source Maps upload will include the release name and dist.
Sentry-CLI arguments: [/home/expo/workingdir/build/node_modules/@sentry/cli/bin/sentry-cli, react-native, gradle, --bundle, /home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle, --sourcemap, /home/expo/workingdir/build/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map, --release<EMAIL_ADDRESS>--dist, 1]
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
INFO    2024-08-14 03:26:43.349354735 +00:00 Loaded file referenced by SENTRY_PROPERTIES (/home/expo/workingdir/build/android/sentry.properties)
  WARN    2024-08-14 03:26:43.362943418 +00:00 Unrecognized auth token format!
	Hint: Did you copy your token correctly?
> Task :expo-dev-menu-interface:compileReleaseJavaWithJavac
> Task :expo-dev-menu-interface:bundleLibCompileToJarRelease
> Task :expo-updates-interface:compileReleaseKotlin
> Task :expo-updates-interface:compileReleaseJavaWithJavac
> Task :expo-updates-interface:bundleLibCompileToJarRelease
> Task<EMAIL_ADDRESS>FAILED
> Rewriting sources
> Adding source map references
error: API request failed
  caused by: sentry reported an error: Invalid org token (http status: 401)
Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
> Task :app:createBundleReleaseJsAndAssets_SentryUploadCleanUp SKIPPED

FAILURE: Build failed with an exception.
* Where:
Script<EMAIL_ADDRESS>line: 142
* What went wrong:
Execution failed for task<EMAIL_ADDRESS>> Process 'command '/home/expo/workingdir/build/node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 7m 22s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
716 actionable tasks: 716 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Managed or bare?
Managed
Environment
Creating new worker instance
Intel, 4 vCPUs, 16 GB RAM
Using image "ubuntu-22.04-jdk-17-ndk-26.1.10909125" based on "ubuntu-2204-jammy-v20240614"
Installed software:

NDK 26.1.10909125
Node.js 18.18.0
Bun 1.1.13
Yarn 1.22.21
pnpm 9.3.0
npm 9.8.1
Java 17
node-gyp 10.1.0
Resolved builder image to 'sdk-51'.
Environment secrets:
SENTRY_AUTH_TOKEN=********
EAS Build environment variables:
SHELL=/bin/sh
NVM_INC=/home/expo/.nvm/versions/node/v18.18.0/include/node
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
PWD=/usr/local/eas-build-worker
LOGNAME=expo
SYSTEMD_EXEC_PID=745
HOME=/home/expo
LANG=en_US.UTF-8
INVOCATION_ID=65122af1fc0742edae70c77535edac76
ANDROID_NDK_HOME=/home/expo/Android/Sdk/ndk/26.1.10909125
NVM_DIR=/home/expo/.nvm
ANDROID_HOME=/home/expo/Android/Sdk
USER=expo
SHLVL=0
ANDROID_SDK_ROOT=/home/expo/Android/Sdk
JOURNAL_STREAM=8:20007
PATH=/home/expo/workingdir/bin:/home/expo/.nvm/versions/node/v18.18.0/bin:/opt/bundletool:/home/expo/Android/Sdk/build-tools/29.0.3:/home/expo/Android/Sdk/ndk/26.1.10909125:/home/expo/Android/Sdk/cmdline-tools/tools/bin:/home/expo/Android/Sdk/tools:/home/expo/Android/Sdk/tools/bin:/home/expo/Android/Sdk/platform-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/expo/.bun/bin
NVM_BIN=/home/expo/.nvm/versions/node/v18.18.0/bin
EAS_BUILD_WORKER_DIR=/home/expo/eas-build-worker
_=/home/expo/.nvm/versions/node/v18.18.0/bin/node
CI=1
MAESTRO_DRIVER_STARTUP_TIMEOUT=120000
EAS_BUILD=true
EAS_BUILD_RUNNER=eas-build
EAS_BUILD_PLATFORM=android
NPM_CACHE_URL=http://<IP_ADDRESS>:4873/
NVM_NODEJS_ORG_MIRROR=http://<IP_ADDRESS>:8081/
EAS_BUILD_NPM_CACHE_URL=http://<IP_ADDRESS>:4873/
EAS_BUILD_PROFILE=production
EAS_BUILD_GIT_COMMIT_HASH=b5898d99d99bf57a5b523dbd046e0ee887160809
EAS_BUILD_ID=a3617877-5ee5-4440-a9fb-31a8f3fccf01
EAS_BUILD_WORKINGDIR=/home/expo/workingdir/build
EAS_BUILD_PROJECT_ID=36f03bb5-6dde-49e8-8655-444bf2d7eed7
GRADLE_OPTS=-Dorg.gradle.jvmargs="-Xmx14g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false
EAS_BUILD_USERNAME=anuditnagar
__EAS_BUILD_ENVS_DIR=/home/expo/workingdir/env
Builder is ready, starting build

Error output
No response
Reproducible demo or steps to reproduce from a blank project

Hi @anudit,
As a sanity check can you try to run npx -y @sentry/cli info

locally using the SENTRY_AUTH_TOKEN you use for local builds
during the build process in the pre-install hook while using a build that uses SENTRY_AUTH_TOKEN secret

?


Whitelist not applied to API files

for example
https://cdnjs.com/libraries/antd
https://api.cdnjs.com/libraries/antd
for version 4.0.2 and 4.0.1, API list has extra files like antd.dark.less , which is 403

how to get real file list from API?

Resolved in https://github.com/cdnjs/api-server/commit/eff3047fa42550c0c98332fee88b7570ae34484e


Emoji Query 😎

I'd be cool to add an emoji query just like Github does:

Yeah, for this to work, Macmoji would have to be an actual program. Maybe a Chrome Extension?

Could easily make this into an Electron app that runs in the background.
I think there are a couple that already do this, though..

Totally. Macmoji was only meant to be a very simple stopgap.
I just heard about the Mojito project, which is pretty close to this!

Makes sense....


dnscrypt crashes

Hi,
I've been testing dnscrypt proxy, both stable (2.0.5-1) and git (2.0.6.r0.g2c7513a-1) versions, and they seem to crash when ignore_system_dns = true and when using one of mastad0n's sources.
I've attached the .toml, the .log and the service's dump: dnscrypt.zip

Should be fixed in 2.0.6. Thanks a lot!


Dev - Suggestion: Move all the messages to a common place with each being function call

Reasoning:

With a proper function names it add context to the messages.
Messages will be re-usable if same message is called once than one time.
A common place to edit and enable contributors to normalise the language when contributing messages.

I am new to this repository so I would love to know if it resonates with you only then will work on it 🙂
Approval:

[ ] @Noviny
[ ] @mitchellhamilton

Oh wait, I found a duplicate: https://github.com/atlassian/changesets/issues/142


Simplify parameter description

@kokosxD : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Improve query for unique shared items

Sander said something about using the top level target. Look into this, sounds more simple.

Right, so this should pretty simple now.
A little background
Back when we first were having these issues, we didn't have the pre-hash so we didn't know where to keep track of an index of prior added photos. Now, the node is doing that for us, we should be okay.
Back when we didn't have it though, I was polling and adding photos more conservatively, ignore updates etc so as to avoid more of the duplicates. We can loosen that up now once we have a check on uniqueness instead.
Thinking
For now, I think that you can get that from here processingPhoto.preparedFiles.dir.files[0].checksum also maybe here, processingPhoto.preparedFiles.dir.files[0].source, I'm not certain what source does and didn't see it in the docs. See question here, https://github.com/textileio/docs/issues/84
It will be tricky for a client to then decide what to do with that information.

They could scan against all their in-memory hashes. -1
We could maybe add variable in the original payload that says, exists: bool, but that isn't necessarily enough information to decide what to do;
What if it's a photo that someone else had shared in a Thread and now you've added to your camera roll independently? In this case, you'd probably still want it backed up in your account camera roll thread, (e.g. if they un-pin it, you don't).

Ah, apologies, you might not be talking about Camera Roll adds here, but instead actual photos shared. We can move that comment, I just know you're starting to think through the above so wanted to get that background down.


Replace long licence headers with a concise one

I looked into the two options suggested here: https://github.com/hyperledger/burrow/issues/407#issuecomment-535465945
https://github.com/google/addlicense -- does not support the shorthand licensing
https://github.com/fbiville/headache -- seems to have the ability to support shorthand licensing
This can also be automated via a bash script and the sed cli tool, if it were to be implemented as a step in a CI workflow. Headache could also be used to do this, though it enforces the concept of a copyright year. Which may or may not be required.
Closes #407
Signed-off-by: AdeebAhmed<EMAIL_ADDRESS>

👍

Thanks!


Cannot run project on Android 8.0

Describe the bug
The app crashes immediately with an IllegalStateException:
Only fullscreen opaque activities can request orientation
This is caused by the portrait in the Android Manifest, that is set in the app.json:
See: https://stackoverflow.com/questions/48072438/java-lang-illegalstateexception-only-fullscreen-opaque-activities-can-request-o for reference.
Removing the orientation from the app.json solves this issue.
Ignite version
7.15.0
Additional info
just regular

Hi, thanks for the report!
I think this is a bug with Expo: app.json is an Expo tool, and Expo does say Android 6+ should be supported: https://docs.expo.dev/versions/latest/config/app/#orientation.
That said, I don't think we're likely to remove the orientation configuration in order to support Android 8; older Android support isn't often a priority for us. Maybe we should raise the minSdkVersion in the template instead. @frankcalise do you have thoughts on this?

@lindboe Agree, if this is just configuration needed for a specific project, then it should just be that. Maybe a discussion thread or recipe page on better support for Android 8.0?
But looking at that stack overflow, is it possible to address such an issue with a specific version of styles.xml? Because we do have a config plugin setting windowIsTranslucent to address an Android 12 issue.

So maybe we can achieve this with a more tailored plugin?
https://github.com/infinitered/ignite/blob/master/boilerplate/plugins/withSplashScreen.ts#L62-L74

Closing this as this is more of a project configuration issue on a case by case basis, doesn't need to be in Ignite by default


(re) [wip] 6.0.2 update metadata

Checklist

[x] Used a fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

re-submission of #62 because of https://github.com/conda-forge/conda-forge.github.io/issues/954 (probably)

Great, drone started:
https://cloud.drone.io/conda-forge/notebook-feedstock/9

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Whew!


Add support for specifying custom SSH port of a managed server

This PR adds support for specifying custom SSH port of a managed server. No new configuration option is added, the port should be specified in the existing server configuration option in a standard format, e.g. <IP_ADDRESS>:8022 (for port 8022). It supports IPv6, for example by specifying server to be [::1]:8022. The presented solution is also backwards compatible.
Solution with configuring override.ssh presented in #53 is not optimal when port forwarding is used on a localhost to multiple servers as all of them will share the same internal id in Vagrant.
This closes issue #53.

LGTM.

Hey @nstojiljkovic,
first of all, thanks a lot for your PR! 🎉
I'm sorry but I'm currently not finding time to properly support this as needed, also sorry for not getting back to you earlier! :-(
Currently the failing build prevents the merge. But before merging, I would like to (ideally in a separate PR):

lift the plugin to be compatible with latest vagrant version
fix.travis.yml which is currently failing the build

I will try to find some time during the next days. If you want to support, I'm happy about PRs as well.
Cheers,
Torben


Fix analyzer warnings

I see these errors in Atom on my Mac. I'm not sure why they're not being
picked up by the bots.

@Hixie @pq

I was seeing the driver one today with flutter watch. We should figure out why regular analyzer is not catching these. I am concerned about the divergence.
cc @danrubel


Fix 29 Maintainability, 4 Complexity issues in index.php

CodeFactor found multiple issues:
Empty ELSE statement detected
index.php:887
index.php:722
index.php:594
index.php:567

Empty IF statement detected
index.php:565

Comment refers to a TODO task "this is also coming back only in Italian. should probably come back as an integer value"
index.php:1401

Comment refers to a TODO task "why have this hardcoded into italian? probably best just to return the integer,"
index.php:1391

Comment refers to a TODO task "we need to detect mixed notations even when there are no dots, for example "Mt 5:1;6,2""
index.php:625

Comment refers to a TODO task "why have hardcoded strings in Italian? I started making a table for this, should put this info in metadata queries and just return integer values on responses issued from the query endpoint"
index.php:333

Comment refers to a TODO task "PERHAPS IMPLEMENT A BLACKLIST FOR IP ADDRESSES OR ADDRESS RANGES THAT MAKE CONTINUED SPAM REQUESTS"
index.php:96

Comment refers to a TODO task "perhaps create a class out of all this, like we did for metadata.php?"
index.php:63

Variable assignment found within a condition. Did you mean to do a comparison ?
index.php:1317
index.php:1303
index.php:1287
index.php:1273
index.php:1257
index.php:1238
index.php:1143
index.php:1040
index.php:1038
index.php:1036
index.php:1025
index.php:1023
index.php:1021
index.php:749
index.php:586
index.php:260
index.php:253
index.php:237

Complex Code
index.php

Complex Method
index.php:1169-1510
index.php:993-1138
index.php:654-992

Variable assignment found within a condition: this is typical of iteration over a recordset from a MySQL query (i.e. pseudo code while($row=$resultset->getRow) kind of deal).
When trying to fix this by wrapping the assignment in parentheses and then comparing the expression against a boolean, in order to let the linter know that it is not an error and we are actually peforming a legitimate assignment within a condition, the endpoint stopped working. I stashed the local changes without committing. This will have to be looked into carefully to make the linter happy without breaking the code.

Complex Code and Complex Methods:
I will concede that. Some of the methods grew to be a bit complex and not so maintainable. My hope is to rewrite the index.php main endpoint as a class, similar to the search.php and the metadata.php endpoints. It can certainly be done and would avoid passing a lot of variables around, it'll just take some time, so that will happen when I have a substantial amount of time to dedicate to this (like another COVID lockdown or something!).

Long methods have been broken down into smaller methods. Some people might think this is more readable, however it also means that there is code scattered all over the place now, and you have to go back and forth between the main methods and the smaller methods to figure out what's going on.
I can understand smaller methods when they wrap up functionality that is repeated, so you avoid writing the same code over and over again. However, when you're just taking a long calculation and splitting it up into smaller calculations, my impression is that scattering the code into smaller methods may make it more difficult to maintain. Is it better to avoid comments and use smaller self-explanatory methods, which however require you to go inspect the smaller methods, rather than just keep the code in the larger method with a comment explaining how or why it's doing what it's doing?
I don't know, I think this is kind of a personal taste issue rather than an actual question of maintainability.


Fixing array literal usage for vector

Codecov Report
Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (0a03c54) 61.69% compared to head (011436d) 34.84%.
Report is 1 commits behind head on master.

Files
Patch %
Lines

...ot/common/request/context/RequestContextUtils.java
0.00%
22 Missing :warning:

.../parsers/rewriter/PredicateComparisonRewriter.java
0.00%
5 Missing :warning:

...org/apache/pinot/sql/parsers/CalciteSqlParser.java
0.00%
4 Missing :warning:

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #12365       +/-   ##
=============================================
- Coverage     61.69%   34.84%   -26.85%
=============================================
  Files          2426     2350       -76
  Lines        132673   128955     -3718
  Branches      20502    19961      -541
=============================================
- Hits          81849    44938    -36911
- Misses        44817    80796    +35979
+ Partials       6007     3221     -2786

Flag
Coverage Δ

custom-integration1
?

integration
0.00% <0.00%> (-0.01%)
:arrow_down:

integration1
?

integration2
0.00% <0.00%> (ø)

java-11
0.00% <0.00%> (-61.65%)
:arrow_down:

java-21
34.84% <0.00%> (-26.73%)
:arrow_down:

skip-bytebuffers-false
34.83% <0.00%> (-26.85%)
:arrow_down:

skip-bytebuffers-true
34.82% <0.00%> (-26.72%)
:arrow_down:

temurin
34.84% <0.00%> (-26.85%)
:arrow_down:

unittests
46.72% <0.00%> (-14.97%)
:arrow_down:

unittests1
46.72% <0.00%> (-0.19%)
:arrow_down:

unittests2
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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


Give feedback on ValueScript

ValueScript is free and open source. We want it to be guided by community feedback.
Comment here for small things or questions about giving substantial feedback.
If you have something detailed or thorny, please open a dedicated issue for it.

Hi! First of all congratulations for your great job, it's indeed a good improvement over TS/JS environment in terms of safety (avoiding side effects) and performance thanks to the no GC to RC aspect. There are however some points which are not clear to me, being a subsystem forced to interact with the outer world:

If functions are pure by default, how you handles the specific cases where you want to pass a parameter from TypeScript to the inner ValueScript execution and have it back (essentially a "projection" of the mutable value) in order to avoid multiple allocations? For instance in the request/response model you can avoid a good amount of dynamic allocations rewriting a specific pre-allocated buffer and doing so, not instantiating a response (and also some requests) object to return. Supposing i use ValueScript for a request handler so, how can i force the subsystem to take a "mutable" param?
Which is the context switch cost of calling the ValueScript environment evaluation inside (for instance) a TypeScript program?
Since ValueScript launches a new thread instead of a concurrent task on the same single threaded JS runtime, can i lunch multiple instances of ValueScript runtime?

Thanks for your time and i hope i'm been specific enough :)

Hi @Metalymph. Thanks for your feedback and sorry for the slow reply.

If functions are pure by default, how you handles the specific cases where you want to pass a parameter from TypeScript to the inner ValueScript execution and have it back (essentially a "projection" of the mutable value) in order to avoid multiple allocations? For instance in the request/response model you can avoid a good amount of dynamic allocations rewriting a specific pre-allocated buffer and doing so, not instantiating a response (and also some requests) object to return. Supposing i use ValueScript for a request handler so, how can i force the subsystem to take a "mutable" param?

Well if you want to keep the ValueScript system pure, then you don't do that. However, these kinds of foreign interactions are planned, so that you can introduce the kinds of things you're talking about if you choose.

Which is the context switch cost of calling the ValueScript environment evaluation inside (for instance) a TypeScript program?

Good question. Not sure yet.

Since ValueScript launches a new thread instead of a concurrent task on the same single threaded JS runtime, can i lunch multiple instances of ValueScript runtime?

Absolutely :).

Hi @voltrevo and thanks for your kind answer.
Having multiple isolated runtimes is a good advantage but only if you have a way to preallocate the single runtimes before the several calls to start the runtimes, avoiding the context switch costs at least partially (the warm-up/launching part) exactly like a executors pool.
This is a good project especially for TS related codebases indeed. Congratulations for your great work :) !


Add GPU headers to //tensorflow/core:headers.

Fixes #35576

Thanks for the PR @abcdabcd987! This issue should be fixed in 2.2. Closing.


test

How to test a single image

@FengJin-cv Modify codes in test.py and apply them to your image.

no test.py?
Code base does not have test.py


remove subprocess calls

i think teh code can be collapsed further so it does not rely on suprocess calls.. I see that the LED ring requires sudo, but i still think there is a way aroudn requiring so many files

I am looking at this error right now, what is the actual problem with using subprocess?


An error was reported in the dev environment in the webpack project

/Users/zian/workspace/Zcy/Infra/Projects/qiankun/node_modules/radash/dist/esm/object.mjs 137:20 Module parse failed: Unexpected token (137:20) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | const assign = (initial, override) => { |   if (!initial || !override) >     return initial ?? override ?? {}; |   return Object.entries({ ...initial, ...override }).reduce( |     (acc, [key, value]) => {

/Users/zian/workspace/Zcy/Infra/Projects/qiankun/node_modules/radash/dist/esm/random.mjs 19:9-16
Can't import the named export 'iterate' from non EcmaScript module (only default export is available)

The same problem occurred, importing {debounce} from 'radash' in the vue2 environment; Importing will result in an error

Same problem with CRA and react 17

Hey everyone, try using radashi@beta (an actively maintained fork) and see if it helps. Please open an issue over at the Radashi repository if the issue persists. Preferably, you could include a reproduction, but it's not a strict requirement (any signal is appreciated). But I will say that a reproduction will greatly increase the chances of a swift resolution. :v:


Firefox thinks the video blob is a text/html file.

Firefox thinks the blob you get from the recorder after recording is finished is a text/html file and the webm file will not play in the video player and it also doesn't play properly when downloaded. The error I get is HTTP “Content-Type” of “text/html” is not supported. Load of media resource http://localhost:3000/ba failed.
However, it's working in chrome and the header file of the blob indeed shows video/webm in chrome.
I am setting the mimetype to video/webm;codecs="vp8, opus".

Can this be fixed by simply chopping off the header and replacing it with 'video/webm'?


⚠ API - Lens has degraded performance

In fca0e23, API - Lens ($LENS_API_URL) experienced degraded performance:

HTTP code: 502
Response time: 355 ms

Resolved: API - Lens performance has improved in ae9856b after 6 minutes.


⚠ Thumbnails API Endpoint has degraded performance

In 7f7a76b, Thumbnails API Endpoint (https://thumbnails.roblox.com/v1/assets?assetIds=82738847&format=Png&isCircular=false&size=30x30) experienced degraded performance:

HTTP code: 200
Response time: 1029 ms

Resolved: Thumbnails API Endpoint performance has improved in a718320 after 10 minutes.


Failed to transcode some video files

I have the following video file, which I need to transcode it by either add an overlay above it or change the bitrate of the video,
https://drive.google.com/file/d/1Y6t1jIchWbNl_f71MA1mq56jrKjxgHTs/view
I tried the demo app, and when clicking on the transcode button, it keeps processing, and after I debugged the issue, I found that LiTr will throw a BufferOverflowException, and when it tries to release the MediaMuxerMediaTarget, it also throws an exception in the release() method, so the listeners will not receive the stop status with the failed state.
NOTES:

I'm currently using litr 1.4.9
I transcode the video to video/avc format, with a video bitrate 1.5Mb/s
I transcode the audio to audio/mp4a-latm format, with an audio bitrate 128Kb/s
I think the issue related to the audio track, so when just transcoding the audio track, the issue happened.

What I need:

Please if you can fix the transcoding issue related to the attached video file.
Make sure that if an exception happened in the release(boolean success) method inside TransformationJob class will be caught and handled.

Thank you for reporting! I will look into this.

Which device/OS version are you using? I cannot reproduce it on Samsung Note 10.
Can you also post the logcat?

@izzytwosheds please, when you will release this pull request https://github.com/linkedin/LiTr/pull/103 ? which will fix the current issue.

Released it, should be available now.


docs: update usage example to use plugin syntax

See issue #2 for more details.

Not relevant after 1.0.1 release


feat: add migration of built-in functions from module index

This commit adds support for migrating built-in functions from a module index. The migrate_builtins_from_module_index function is introduced, which takes in the necessary dependencies such as the PostgreSQL pool, Nats client, job processor, Veritech client, encryption key, package path, and module index URL.
The function starts by creating a context with the provided dependencies and initializing a workspace. It then updates the tenancy and commits the changes. Next, it migrates the intrinsic functions using the migrate_intrinsics function from the builtins::func module.
After that, it retrieves the list of built-in modules from the module index and starts installing each module in parallel using the install_builtins function. The installation process is executed in a spawned tokio::spawn loop. Once all modules are installed successfully, the migration is considered completed and SDF starts up as normal

LGTM 👍
Assets successfully brought in, migrated. I created some custom assets to ensure nothing around the subsystem is malfunctioning as a smoke test.
2023-10-05T17:21:02.216494Z  INFO ThreadId(02) sdf.init.migrate_database: sdf_server::server::server: migrating completed elapsed=556.3719482421875

bors merge

bors retry


Add installers for 1.0 & 1.1 releases

Adding installers needed to drive the .NET Website. Only filling in the minimum set, not an exhaustive add of all previous versions.

lgtm


centralize observe channel listener handling

Description
To ensure that the observe channel handling
doesn't accidentally spawn unkillable routines,
adds a centralized channel listener func for
standard channel management in observe
progress bars.
Does this PR need a docs update or release note?

[x] :no_entry: No

Type of change

[x] :bug: Bugfix

Test Plan

[x] :muscle: Manual
[x] :zap: Unit test

@ryanfkeepers Please add a changelog entry. This is a high-impact change for CLI users.

@ryanfkeepers - changes look good (pending CHANGELOG request from @ntolia )
What can we do in terms of a regression test here. Is there a modification to TestObserveProgressWithChannelClosed that would have caught this?


Error when injecting a new saga : Uncaught TypeError: Cannot read property '_currentElement' of null

Issue Type

[X] Bug (https://github.com/react-boilerplate/react-boilerplate/blob/master/.github/CONTRIBUTING.md#bug-reports)
[ ] Feature (https://github.com/react-boilerplate/react-boilerplate/blob/master/.github/CONTRIBUTING.md#feature-requests)

Description
Whenever I try to inject a saga, in the new dev version, I get this error : Uncaught TypeError: Cannot read property '_currentElement' of null
Steps to reproduce
In App/index.js, I have a route like this :
import Signin from 'containers/Authentication/core/LoadableSignin';
[...]
<Route path="/connexion" component={Signin} />
[...]

Then, in the Signin container, at the end :
const withConnect = connect(mapStateToProps, mapDispatchToProps);

const withReducer = injectReducer({ key: 'authentication', reducer });
const withSaga = injectSaga({ key: 'authentication', sagas });

export default compose(
  withReducer,
  withSaga, // If I comment this, it "works"
  withConnect,
  withRouter
)(Authentication);

My saga looks like this :
// vendor
import { call, put, takeLatest } from 'redux-saga/effects';
import request from 'utils/request';
// app
import appActions from '../../App/core/actions';

import actions from './actions.js';
import constants from './constants.js';

/**
 * Update password
 * @param {Object} action
 * @yield {Object}
 */
export function* updatePassword(action) {
  const body = { password: action.password };
  try {
    yield call(request, '/user/editPassword', { method: 'PUT', body });
    yield put(actions.onPasswordUpdateSuccess());
  } catch (err) {
    yield put(actions.onPasswordUpdateFailed(err));
  }
}

/**
 * Sign in
 * @param {Object} action
 * @yield {Object}
 */
export function* signin(action) {
  const body = { login: action.login, password: action.password };
  try {
    const user = yield call(request, '/signin', { method: 'POST', body });
    yield put(appActions.onGetSessionSuccess({ user }));
    yield put(actions.onSigninSuccess(user));
  } catch (err) {
    yield put(actions.onSigninFailed(err));
  }
}

// Root saga
export default function* rootSaga() {
  // if necessary, start multiple sagas at once with `all`
  yield [
    takeLatest(constants.SIGNIN_LOADING, signin),
    takeLatest(constants.PASSWORD_UPDATE_LOADING, updatePassword),
  ];
}

Do you have any idea where it could come from ? I Have this issue because of the migration to react-router v4.
Versions

React-Boilerplate (see package.json): 3.4#dev
Node/NPM: v8.2.1 / v5.3.0
Browser: Chrome 59

Found it. It was
const withSaga = injectSaga({ key: 'authentication', saga });

not
const withSaga = injectSaga({ key: 'authentication', sagas });

Sometimes, just asking the question is enough. Thanks :)


[3.4] Persist and check default language selection

http://jenkins01.arangodb.biz:8080/job/arangodb-matrix-pr/2264/

@Simran-B Yes, when using the RocksDB engine or persistent indexes with MMFiles, restarting the server with a different value for --default-language will cause indexes over UTF strings to break. As far as I know though, no one has actually encountered this bug, as --default-language is a hidden option and not exactly advertised for use.

@danielhlarkin I see, thanks. Can you add an entry to the CHANGELOG about this? We do have users who set different languages:

https://github.com/arangodb/arangodb/issues/7111
https://github.com/arangodb/arangodb/issues/3225
one more request about Swedish collation, but can't find it anymore

It sounds like that should be an installtime-question, since its basically unchangeable later on? So we should at least have that fixed to i.e. en_US with the matching comment in the default config, so that users that intend to change it immediately see the consequences.

Good point. I guess it's not 100% unchangeable, but you would have to drop and re-create all secondary indexes after changing the language, which can be pretty costly.
Probably not the right time, but could we add support for a per-collection / per-index language setting? Right now it seems to be a global setting, which seems disappointing for everyone who wants to build something multi-lingual in ArangoDB and needs index-accelerated sorting. Does ArangoSearch offer this?

@Simran-B I'll add a CHANGELOG entry.
@dothebart I don't think it's worth the effort to change all the installers at this point, especially since it's likely we'll change the way we handle collation and locales in the future. (@Simran-B We've talked about the multi-lingual support stuff, but there are no concrete plans at the moment.)

@dan https://github.com/arangodb/arangodb/blob/devel/etc/arangodb3/arangod.conf.in

@dothebart I have no idea what that link is suppose to tell me.

Please add the language setting with the mentioned comment there. Since this is what users edit when they don't use the starter.

@dothebart For the time being, since our collation support isn't particularly robust, and it's still a hidden option, I don't think it's a good idea to add it to the default config, even commented out, as it encourages users to set it by default. Instead, it should be something we only tell users to set if they are experiencing problems.

Just got the following on Ubuntu 20.x with
2020-10-11T18:54:00Z [716] FATAL [7ef60] {config} specified language 'en_US' does not match previously used language ''

Strangely, i can run ArangoDB 3.7.2-1 [linux] 64bit in console, but it dies in own '.service' file...


Need to support CSRF protection

Tried this against jenkins 2.7.1 which by default is configured securely with "Prevent Cross Site Request Forgery exploits" enabled (e.g. the create_job api).  This blows up with a 403 unauthorized error because the API client is not aware of the token and is not submitting it.
See https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API#RemoteaccessAPI-CSRFProtection

@jaxley  see my quick fix #58


How to prevent hotkey to trigger event again and again if key is pressed?

Hi,
import hotkeys from 'hotkeys-js';
hotkeys('ctrl+s', function (e) {
alert('do something', e);
});
If I keep holding ctrl+s, this event keep getting fired, Is there a way to stop that?

@ervishal89  Upgrade<EMAIL_ADDRESS>key down and key up both perform callback events.
hotkeys('ctrl+a,alt+a+s', { keyup: true }, (evn, handler) => {
  if(evn.type === 'keydown') {
    console.log('keydown:', evn.type, handler, handler.key);
  }
  if(evn.type === 'keyup') {
    console.log('keyup:', evn.type, handler, handler.key);
  }
});

Use e.repeat
That will be true on repeat firings of the event


Update

If you're adding a new rule, please follow these steps.

Codecov Report

Merging #8 (20c6341) into update (dfc1ce0) will increase coverage by 0.03%.
The diff coverage is 99.69%.

@@            Coverage Diff             @@
##           update       #8      +/-   ##
==========================================
+ Coverage   99.44%   99.47%   +0.03%
==========================================
  Files          88       94       +6
  Lines        3039     3254     +215
==========================================
+ Hits         3022     3237     +215
  Misses         17       17

Impacted Files
Coverage Δ

rules/no-array-callback-reference.js
100.00% <ø> (ø)

rules/no-array-reduce.js
100.00% <ø> (ø)

rules/prefer-array-flat-map.js
100.00% <ø> (ø)

rules/prefer-dom-node-remove.js
100.00% <ø> (ø)

rules/prefer-string-starts-ends-with.js
100.00% <ø> (ø)

rules/prefer-string-trim-start-end.js
100.00% <ø> (ø)

rules/utils/create-deprecated-rules.js
85.71% <85.71%> (ø)

index.js
100.00% <100.00%> (ø)

rules/better-regex.js
100.00% <100.00%> (ø)

rules/consistent-function-scoping.js
96.05% <100.00%> (+0.40%)
:arrow_up:

... and 28 more

Continue to review full report at Codecov.

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