Easily make Wagtail Menu visible on non-Page views/templates

The Wagtail (frontend) menu (with the Wagtail icon) currently only renders on Page model views. It would be consistent, if this menu would appear on all front-end views, showing relevant links depending on the type of view. It is possible to create a custom template that would conditionally render the Wagtail Menu on all frontend templates, but takes a considerable amount of boilerplate.
Rather, it would be nice to have a default, or configuration option(s), whereby the Wagtail Menu would appear on all frontend templates where the template tag is included.

Thanks for the suggestion @brylie!
As far as I can see the only item in the menu that would be meaningful on a non-page view is "Go to Wagtail admin". No reason we can't have a menu containing just that option though...
I don't think we need to make a configuration option for this - anyone who doesn't want the menu to show on non-page views can change the template code to something like:
{% if page %}{% wagtailuserbar %}{% endif %}

Has this been picked up?

@tdsprogramming Yes - #5636

As far as I can see the only item in the menu that would be meaningful on a non-page view is "Go to Wagtail admin". No reason we can't have a menu containing just that option though

Yes, the "Go to Wagtail" link is a convenient shortcut to the Wagtail admin. It would be nice to display it on all site pages for logged in users, so they have a consistent experience and aren't left wondering why the Wagtail flitters away on some pages.

Merged in via #6018


We need exhaustive unit tests for all the cases of authentication types that we have

General Description
We need to improve our tests, so that they could cover:

[ ] All possible cases for all Authentication components that we have:

[ ] AuthenticationSupplier
[ ] UserDetailsService
[ ] HttpFilters

[ ] The tests should check for the proper response codes for all cases of valid and invalid authentication.

The main goal of this task is to not allow code changes to break our authentication again.
Useful Links

Our REST API
Testing REST Calls

Help

Our chat
Points of contact:

@sbespalov
@fuss86
@steve-todorov

Please, assign this task to me. In case of any problems, I'll contact with you via chat.
BR

Hi!
Feel free to pick this up and to join our chat!

@smolamarcin,
Feel free to pick this up!
I would recommend you join our chat channel.

Hi @smolamarcin @carlspring ! Is someone taking care of this issue? I would like to help.

@JulienVig ,
// cc @steve-todorov
I think this task should be put on hold until we've planned our security refactoring.
@JulienVig ,
We could use your help with many of the other tasks we have. Feel free to join our chat channel for more details.

I agree with @carlspring :)


speed up makeParamInfo and related functions/methods

With some stochastic indexing examples we see cases where makeParamInfo takes a huge amount of time while compiling an MCMC.  This PR contains some hasty fixes that reduce the time by perhaps  around 75% in the motivating example (careful before/after timing was not done because it is clearly must faster, and case-specific).  This could be made faster still, but this PR is limited to the quick fixes that were feasible in a short time.

The changes I made yesterday passed testing.
I made additional changes that speed up handling of makeParamInfo for getParam much more.  The information from getParamInfo is really only needed for size processing of getParam, and really only one instance is needed.   I made a delayed evaluation system where actual evaluation is only done on instances until the necessary type information is obtained.  Typically this will be on the first instance.  Any inconsistency of types across instances will result (I think) in a run-time error, which is the same as it has been.

This did not work.  The problem is that one element of the makeParamInfo result is needed in all instances, while other information is not needed.  I will try to fix it later.

I reverted this morning's attempt to achieve greater efficiency.  It is not going to work.
We could make this faster but it would take a bit more work.

LGTM. Given a bit of history in this PR thread, I'll let @perrydv merge this.


locks: add azure_blob lock provider

Lock is backed by Azure Blob Storage, a Blob is created with the desired name
to acquire the lock and deleted to release it.

Leasing does not appear to be exposed via the Go SDK so I have raised Azure/azure-sdk-for-go/issues#406. This means that currently the lock is not reliable under concurrently, I'll update this branch when leasing is available.

Exciting to see this PR and potential Azure support!

Leasing does not appear to be exposed via the Go SDK so I have raised Azure/azure-sdk-for-go#406. This means that currently the lock is not reliabl concurrently, I'll update this branch when leasing is available.

Ah, that's a shame. Keep us posted!

@pmcatominey Any update on this?

The missing feature I think made it into 6.0.0 of the azure SDK: https://github.com/Azure/azure-sdk-for-go/commit/5d83dd9eb7e1440081e0b965d33450961d948188

@ashb Nice find.
@pmcatominey Let us know if you can find time to keep working on this. There is definitely interest in alternate lock providers. Thanks!

This has not made any progress in over 4 months, and as Terraform 0.9 supports locking natively, we are removing locking from Terragrunt in #167. Therefore, I'm going to close this PR.

Sorry for the delay, once hashicorp/terraform#13036 is merged then Azure locking will be natively supported by Terraform.

@pmcatominey Nice!


[Event Request] report 698 "Get Sales Orders" - OnPostDataItemOnBeforeLineCount

Hello, would it be possible to add OnPostDataItemOnBeforeLineCount event to report 698 "Get Sales Orders", like this:
trigger OnPostDataItem()
...
              var
                 IsHandled: Boolean;
             begin
                 IsHandled := false;
>                 OnPostDataItemOnBeforeLineCount(LineCount, IsHandled); //New Event
                 if IsHandled then
                     exit;
                 if not HideDialog then
                     if LineCount = 0 then

     [IntegrationEvent(false, false)]
     local procedure OnPostDataItemOnBeforeLineCount(LineCount: Integer; var IsHandled: Boolean)
     begin
     end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 10818.


Error: received log with same block number but index newer than previous index

Hi,
I'm getting an error when using the 0x library and its zeroEx.exchange.subscribe. The error output points to ethereumjs-blockstream, so I'm just putting the open 0x issue for the details:
https://github.com/0xProject/0x-monorepo/issues/693
Let me know if you need more info. Thanks for investigating!

I have seen this one before, though I admit that I don't remember how the issue was resolved.  It ended up being the caller was doing something unexpected and Blockstream ended up confused by it I believe.  @epheph do you remember how you resolved this when you ran into it with Augur Node?

@mohoff Can you see what version of ethereumjs-blockstream you are using?  I think this may have been a bug in an older version.

If you are using 2.0.6 (per https://github.com/0xProject/0x-monorepo/blob/development/packages/contract-wrappers/package.json#L82) then I am reasonably confident that is the problem.  If it is what I think it is, then it was fixed in https://github.com/ethereumjs/ethereumjs-blockstream/pull/13 which is in v4.0.0 (https://github.com/ethereumjs/ethereumjs-blockstream/commit/6580081619f8518c5f242262266554754ab12e3a)

Duplicate of https://github.com/ethereumjs/ethereumjs-blockstream/issues/7 I believe.  Leaving open for now while awaiting feedback from @mohoff to verify that this is in fact a duplicate.

Thanks @MicahZoltu for your fast reply! Yeah<EMAIL_ADDRESS>which I am using, includes<EMAIL_ADDRESS>However, I don't see how my code involves multiple filters, as described in #7 / #13 . Seems like only one filter is used (https://github.com/0xProject/0x-monorepo/blob/v2-prototype/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts#L78). But you're the expert here ;).

@mohoff Do you have the ability to easily reproduce and debug the issue?  If so, I would be curious to know what BlockAndLogStreamer.logFilters contains (https://github.com/ethereumjs/ethereumjs-blockstream/blob/master/source/block-and-log-streamer.ts#L22).  In particular, does it contain only a single item, or does it contain multiple items.
Glancing at the 0x code you linked, it appears the only place that a filter is added is here and there appear to be guards in place to prevent that from ever being called twice, so your assertion that multiple filters aren't being added is certainly reasonable.  None the less, it would be good to verify with certainty (via the check I mentioned above) just to make sure before we try to debug ethereumjs-blockstream too deeply (mainly because digging into it is hard).
Another piece of debugging that would be useful would be to check to see what is triggering the addNewLogsToHead call, in particular, whether it is an existing block being added twice or somehow that callback is being called twice with the same logs, or if logs were fetched multiple times.  I still feel like the most likely situation is somehow ending up with multiple subscriptions, which that version doesn't support, mainly because I can't find any other code paths that lead to the problem.
Lastly, do you have a turn-key repro case that I could fire up?  Ideally something that doesn't require me to spin up some large/complicated infrastructure to debug.  :)

@MicahZoltu I'm not too deep into this but I logged the filters to console (inside addLogFilter()), That's the output:
{ 'log filter token c2e50d35-360c-4302-ab48-1c1dde5c08cf': {} }

So from that, it looks like this function is only called once and logFilters only contains one entry. Does this help? Also, I don't know where to find addNewLogsToHead. Any pointer? Would be great if you can shortly outline the steps to do in order to give you the desired debug info.
With repro case, you mean more than what I already posted in the 0x open issue? What do you need? (not familiar with all this sorry)

I haven't actually used the 0x libraries before, so I don't know how to setup a test environment with it.  That is, I don't know what to do with that code snippet you provided.  I'm guessing I would need to setup a new project, instantiate and configure zeroEx in some way (point it at main-net?), then call the code you provided?  If you have a project I can checkout that reproduces the problem that may be enough to get me started.

Note: If you upgrade to v4.0.0 I am pretty confident that the error will go away.  However, it would be good to understand how you got into this situation since it appears you aren't double subscribing.

@MicahZoltu Understood. I set up a repo for you with my script: https://github.com/mohoff/0xTestScripts (still on version 2.0.7.
I upgraded to 4.0.0 and now I get the following:
Error: received log with same block number (91756809) but index (0) is the same or older than previous index (528)
    at ensureOrder (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:147:15)
    at /home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:91:33
    at step (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:32:23)
    at Object.next (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:13:53)
    at step (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:17:97)
    at Object.next (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:13:53)
    at /home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:3:12)
    at addNewLogsToHead (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:78:76)
    at Object.<anonymous> (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:52:42)
    at step (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:32:23)
    at Object.next (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:13:53)
    at fulfilled (/home/mo/dev/brickblock/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:4:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

So I think same error with a better error message. Do you have an idea?

I'll see if I can use your repo to reproduce the bug on my machine and debug it to figure out what is going on.  It is late here though, so I may not figure it out until tomorrow.

@mohoff  I cloned your repo, pointed it at one of my nodes (instead of Infura since I don't have an API key) and created a new account (new mnemonic) then ran index.js.  It appears to run, but it just sits at Results: with nothing happening.  Do I need to do something to trigger it?

Good, seems to work! No, it's just waiting for an event emitted on the 0x Exchange.sol contract. So every few seconds/minutes, something should happen (in our case, there should be the error popping once the first trade happened after you started the script). Do you get any output if you wait for a bit?

Hmm so either you're unlucky or something is not going through your local node. Your local node is on mainnet, too? In my code, you can quickly change the network with setting the network id in the beginning. Just in case your local node is syncing a testnet. If so, you would also need to update the token contract addresses in the script (currently the mainnet addresses are used in the script)

Yep, I'm on mainnet.  I have also debugged a bit and verified that I am seeing logs, but they are all filtered out (it appears the code is looking specifically for ZRX:WETH trades).

Issue reproduced with Infura pretty quickly.  Must be something with the way it works...

Oh I see. Yeah, AFAIK Infura supports most but not all JSON RPC methods. Can't find the list of supported and unsupported methods anymore...

Hmm, I'm now unable to reproduce the problem again, even using Infura.  I wonder if it is related to https://github.com/ethereumjs/ethereumjs-blockstream/issues/10?

The only two functions that are needed are eth_getBlockByHash and eth_getLogs, both of which Infura supports, so I don't think it is an issue of not supporting something we need.  Though, it is possible that something weird is happening in 0x library around Infura that causes it to behave differently?

Weird. Yes, I'm seeing it every time. Don't even know how the normal log output looks...
Because of that, I'm not sure about #10 since I see the error all the time.

Can you pop into Gitter.im so we can discuss more real-time?  I'm still struggling to reproduce the problem.

I did some digging and this appears to be a dupe of https://github.com/ethereumjs/ethereumjs-blockstream/issues/10 after all.  The flow goes something like this:

Receive block 1234 with hash 0xABC
Trigger addition of block 1234 with hash 0xABC
Fetch logs for block 1234, get logs associated with hash 0xDEF
Receive block 1234 with hash 0xDEF
Trigger removal of block 1234 with hash 0xABC
Trigger removal of logs with hash 0xABC (there are none!)
Trigger addition of block 1234 with hash 0xDEF
Fetch logs for block 1234, get logs associated with hash 0xDEF
Fail because the stream already has the logs, which is an indicator that something went horribly wrong (which it did, we got logs for a block that had never shown up yet).

A Is different hash the result of a reorg of blocks right? I understand that it can happen every now and then, but why do I see the error every single time I run the script? How often do reorgs happen?

I think it's more about infura than it is about mainnet, since each request gets routed to a different, independent ethereum node, so one node would tell you that block height X, 0xABC is ready, while you hit a different node on the follow-up request for logs of block height X.

Thanks @MicahZoltu , this error is goneafter I provided a onError handler in the 0x code. However, there's a new one now, which seems related:
Error: Received log for block hash 0x7adf6266c6816b44460fa4f518d1c8882ff41ad2880f1978015d7170cd366e95 when asking for logs of block 0x603d6e5b202e264768bf0e1394b55504aa05e0b5f45a1b8aebf71cc905731c25.
    at /home/mo/dev/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:154:19
    at Array.forEach (<anonymous>)
    at ensureBlockhash (/home/mo/dev/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:152:10)
    at Object.<anonymous> (/home/mo/dev/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:52:21)
    at step (/home/mo/dev/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:32:23)
    at Object.next (/home/mo/dev/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:13:53)
    at fulfilled (/home/mo/dev/0x-openrelay-playground/node_modules/0x.js/node_modules/ethereumjs-blockstream/output/source/log-reconciler.js:4:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Thanks @MicahZoltu , it works now!


switch to zippy; closes #15

Signed-off-by: David Krause<EMAIL_ADDRESS>

Hi @enthus1ast it seems that it didn't pass the tests
/home/runner/work/xlsx/xlsx/src/xlsx/utils.nim(5, 13) Error: cannot open file: zippy/ziparchives

mhh strange i ran the tests on my machine sucessfully, i'll check whats the issue

@ringabout can you try to remove your zippy installation:
nimble remove zippy
and install it again?
nimble install zippy

@ringabout done, please try again :)

Thanks for your efforts!


 We want trial environment to be running all the time.

LGTM - Hitting the magical merge button.


Implement better versioning of VerificationConfig

Introduce a series of types that allow a better versioning of the verification config.
This fixes issue #59

@viccuad please take another look at the PR, I've addressed your concerns with the latest commit


[WIP] Syntax highlighting + completion support in VS

This PR does several things:

Registers .cake files with the C# language service, so they could be opened directly from File -> Open
Adding a custom Roslyn workspace to treat .cake files as scripts, so they aren't treated as full .cs files

This will work, trust me :)

@hmemcpy I am loving your work!!!!
I just opened a build.cake file associated with one of my projects, and I am seeing some nice syntax highlighting for the file:

I am also seeing some syntax errors though, further down in the file:

Do we need to provide additional information to the Custom Workspace to prevent these showing up?  Or is there no way to avoid?
I can also confirm that the task snippet is also working! :smile:
What work are you still planning for this PR?  Is there anything I can help out with?  Thanks!

Yes, you're seeing the errors because VS thinks this is now a "valid" C# file (.cs) - because I've associated .cake files with the C# language service in registry.pkgdef.
Those errors would go away if VS would treat it as a "C# interactive script", something that happens when you open a .csx file (not scriptcs, though same extension).
Unfortunately, this distinction is based on an actual .csx extension, which is pretty much hardcoded.
Per @jasonmalinowski's suggestion, the best way would be to essentially create my own MiscellaneousFilesWorkspace.cs, e.g. CakeWorkspace.cs, duplicating some of the logic.
Unfortunately, some things/interfaces are internal, so it would require a bit of work.

Closing this in favour of https://github.com/agc93/Cake.VisualStudio


Log in via GitHub even with ublock origin cosmetic filtering

If a user's web browser uses ublock origin with cosmetic filtering enabled, the "/en/login" page does not show the "Log in with GitHub" button.  See if there's a way to fix that (or at least warn users about it!).

Thankfully the GitHub login button is not blocked by default by ublock origin.
The login button is blocked if you turn on "Fanboy’s Annoyance List" (which is not on by default) and have "cosmetic filtering" enabled.  It turns out that Fanboy's list cosmetic filtering disables the view class "btn-social".  I appreciate the goal (disable third party trackers), but simply displaying a button does not enable tracking.
This is a rare case, and users with harsh blockers can undo this by not choosing Fanboy's filter or not enable cosmetic filtering on this site.  So I'm closing this.

The same issue happens now with "Adguard for Safari" - after I disabled it (completely, not just "for this site"), the github login button suddenly appeared!

Update: disabling "for this site" is enough, but one needs to close the tab and re-open it to get the github button visible - a reload is not enough!


Pin package versions during test project creation.

Porting the change from dev branch.
cc @mlorbetske

This change might be correct for preview2, but it is not necessarily correct in the general case. Each repo has its own version and different repos might not have the same version. For example, in patch releases MVC, logging, BrowserLink, StaticFiles, etc. can all have different versions.

Need to think more on how to handle this in the general case where AspNetCore packages can be a range of versions.
I will close this PR and create a new one with the minimal change to remove the deprecated packages from the test project.


Definition of the SockaddrFromRaw trait

Preparation to fyx #2177.
Example Implementation for SockaddrIn:
unsafe impl private::SockaddrFromRawPriv for Option<SockaddrIn> {
    type Storage = libc::sockaddr_in;

    unsafe fn from_raw(
        addr: *const Self::Storage,
        len: usize,
    ) -> Self {
        if len > mem::size_of::<libc::sockaddr_in>() {
            return None;
        }

        // SAFETY: `sa_family` has been initialized by `Self::init_storage` or by the syscall.
        unsafe {
            if addr_of!((*addr).sin_family).read() as libc::c_int != libc::AF_INET {
                return None;
            }
        }

        unsafe {
            Some(*addr.cast())
        }
    }

    fn init_storage(buf: &mut MaybeUninit<Self::Storage>) {
        // The family of `Self` is `AF_INET`, so setting the family to `AF_UNSPEC` is sufficient.
        let ptr = buf.as_mut_ptr() as *mut libc::sockaddr;
        unsafe { addr_of_mut!((*ptr).sa_family).write(libc::AF_UNSPEC as _) }
    }
}

impl SockaddrFromRaw for Option<SockaddrIn> {}

unsafe impl private::SockaddrFromRawPriv for MaybeUninit<SockaddrIn> {
    type Storage = libc::sockaddr_in;

    unsafe fn from_raw(
        addr: *const Self::Storage,
        _: usize,
    ) -> Self {
        unsafe { *addr.cast() }
    }

    fn init_storage(_: &mut MaybeUninit<Self::Storage>) {
        // Nothing to do
    }
}

impl SockaddrFromRaw for MaybeUninit<SockaddrIn> {}

Alternatives
The functionality of this trait could also be embedded into SockaddrLike. But this would force us to set the return type of the from_raw function to Option<XXX> which is IMO not favorable because:

The conversion to SockaddrStorage can never fail. We can assume that len is always in bounds of libc::sockaddr_storage or otherwise panic.

This would lock us out from returning MaybeUninit<XXX>.

Checklist:

[x] I have read CONTRIBUTING.md
[x] I have written necessary tests and rustdoc comments
[x] A change log has been added if this PR modifies nix's API

https://man7.org/linux/man-pages/man3/recvmsg.3p.html:

If the socket is connected, the msg_name and msg_namelen members shall be ignored.

That means that we don't get any feedback whether the address buffer got initialized or not.
The only way to ensure it is initialized when returning from recvmsg is to either:

initialize it before calling recvmsg
write "bad" bytes into the address buffer. If it got initialized by the syscall, these bytes get overwritten, which can be safely checked.

As discussed in #2177, the current implementation SockaddrLike::from_raw can even return successfully if the address buffer is completely unitialized. This is very problematic for address types like UnixAddr that rely on multiple invariants for safety.
The only alternative I see to this is to check every invariant of the address type after recvmsg. For UnixAddr, that includes checking that the path is valid, is NUL-terminated and it's length is equal to the passed length, which can be quite expensive.

Basically, the call order of recvmsg would then be
S::init_storage -> syscall -> S::from_raw

On second thought, I don't think that implementations for MaybeUninit<XXX> would be very beneficial. The only step we can really skip for implementations of MaybeUninit are the checks in from_raw that are very cheap. MaybeUninit<SockaddrStorage> and MaybeUninit<UnixAddr> would still need to zero the entire storage in init_storage (otherwise we would get problems with Hash)
I've also edited the PR message

The only way to ensure it is initialized when returning from recvmsg is to either:
* initialize it before calling `recvmsg`

* write "bad" bytes into the address buffer. If it got initialized by the syscall, these bytes get overwritten, which can be safely checked.

Fixing that will only require a single line in pack_mhdr_to_receive.  I don't see why the trait should need to change.  Every SockaddrLike implementation has the sa_family field in the same location.

As discussed in #2177, the current implementation SockaddrLike::from_raw can even return successfully if the address buffer is completely unitialized. This is very problematic for address types like UnixAddr that rely on multiple invariants for safety.

So can your proposed alternative.

The only alternative I see to this is to check every invariant of the address type after recvmsg. For UnixAddr, that includes checking that the path is valid, is NUL-terminated and it's length is equal to the passed length, which can be quite expensive.

The SockaddrLike implementors already check their invariants in from_raw.  And if there's something that they're missing, we should add it.

Fixing that will only require a single line in pack_mhdr_to_receive. I don't see why the trait should need to change. Every SockaddrLike implementation has the sa_family field in the same location.

All types except (). I guess we can check if SockaddrLike::as_ptr returns NULL, but this wouldn't be the prettiest solution, especially because SockaddrLike doesn't provide the necessary safety guarantee.
If we go down this route, we should mark the SockaddrLikePriv trait as unsafe with the following reason:
/// # Safety
///
/// If `&self` is convertible to `&libc::sockaddr`, then`Self::as_ptr` must perform this conversion.
///
/// If `&self` is *not* convertible to `&libc::sockaddr`, then `Self::as_ptr` must return NULL.

Also, we should consider moving from_raw into SockaddrLikePriv instead of making it hidden.

So can your proposed alternative.

The difference between my from_raw and the already existing one is the stricter safety invariant that prevents this bug.

Another difference is that when using S = SockaddrStorage with recvmsg, this implementation can still return uninitialized memory (the only thing guaranteed is ss_family = AF_UNSPEC), while with my implementation we can zero everything out in init_buf and always return a defined value. I don't know how high you value this aspect, since you don't consider uninitialized memory as UB in FFI context (which is fine, I understand your reasoning).
I'll open a separate PR if the version with pack_mhdr_to_receive is your preferred option. This PR can be closed in that case.


Figure out LinearAxis.computed_bounds error in bokeh

Currently when computing update events for bokeh plots we have to explicitly filter out all references to LinearAxis or LogAxis because on the JS end bokeh complains about updating LinearAxis.computed_bounds. We'll have to investigate whether this is a problem with bokeh or with the way we are generating the update events. The first step should be to try to come up with a pure bokeh example of this happening.

Afaik this is no longer an issue, closing.


Is it necessary to call setState() in onChange handlers for custom fields?

Prerequisites

[x] I have read the documentation.

I'm trying to build several custom fields to implement special features like disabling/hiding a field/fieldset and came across several issues with text fields updates and cursor position for inputs inside my custom fields. E.g. if you place the cursor in the middle of a text input value and press a key, the value is inserted in the correct position but afterwards the cursor is moved to the end of the field, which is quite annoying. I'm following the example shown here https://github.com/mozilla-services/react-jsonschema-form#custom-field-components
This behavior seems to be caused by setState() when you update the field state, but I fail to see why do you need to do that. Is it ok to just call this.props.onChange() and let the component update when it receives the new props? Should the documentation be adjusted or at least contain a comment about this issue?
Below is a sample of my code:
const schema = {
  type: 'object',
  properties: {
    type: {
      type: 'string',
      enum: ['basic', 'bearer']
    },
    username: { type: 'string' },
    password: { type: 'string' },
    token: { type: 'string' }
  }
};

const uiSchema = {
  'ui:field': 'ConditionalField',
  username: {
    'ui:visibleIf': fieldData => fieldData.type === 'basic'
  },
  password: {
    'ui:visibleIf': fieldData => fieldData.type === 'basic',
    'ui:widget': 'password'
  },
  token: {
    'ui:visibleIf': fieldData => fieldData.type === 'bearer'
  }
};

import SchemaField from 'react-jsonschema-form/lib/components/fields/SchemaField';
import React from 'react';

export class ConditionalField extends React.Component
{
  onChange (name) {
    const { onChange, formData } = this.props;
    return fieldData => onChange(Object.assign({}, formData, {[name]: fieldData}));
  }

  render () {
    const { errorSchema, formContext, uiSchema, idSchema, formData,
      registry, required, schema, name } = this.props;

    return (
      <fieldset>
        { Object.keys(schema.properties).map(name => {
          const isVisible = !uiSchema[name] ||
            !uiSchema[name]['ui:visibleIf'] ||
            uiSchema[name]['ui:visibleIf'](formData);

          return !isVisible ? null : (
            <SchemaField
              formContext={ formContext }
              errorSchema={ errorSchema[name] }
              onChange={ this.onChange(name) }
              uiSchema={ uiSchema[name] }
              idSchema={ idSchema[name] }
              formData={ formData[name] }
              registry={ registry }
              schema={ schema.properties[name] }
              name={ name }
              key={ name }
            />
          );
        }) }
      </fieldset>
    );
  }
}

Could you please try something? Basically not waiting for the UI reflecting the new state before propagating the change event up the tree. Basically, with the custom field component example from the docs:
  onChange(name) {
    return (event) => {
      this.setState({[name]: parseFloat(event.target.value)});
      setImmediate(() =>  this.props.onChange(this.state));
    };
  }

If that fixes the issue we should update the docs accordingly.

Sorry about the ultra-late response, but after trying your suggestion the initial issue is still present.
We've been using the custom field from my example with no problems until version 0.44.0 broke it. I thinks it's related to the shouldComponentUpdate change made here (#490). Now when you edit a field, the changes made to the other fields are lost (except for the very first change), I think it's because formData doesn't update in subsequent changes.

This seems really inactive, so I'm closing. @pablen feel free to reopen if you still see this issue in 1.3.0 though.


Merge Container's width, height, and constraints

Without this, FlatButton ends up using two RenderConstrainedBoxes back
to back for no good reason.

LGTM


scrape of ceph luminous export fails with 'no token found'

What did you do?
Set up scrape from CEPH Luminous cluster
What did you expect to see?
Metrics ingested correctly
What did you see instead? Under which circumstances?
No metrics are ingested
level=warn ts=2018-02-20T05:39:49.829143167Z caller=scrape.go:690 component="scrape manager" scrape_pool=ceph2 target=http://mon3-ceph2-qh2.storage.unimelb.edu.au:9283/metrics msg="append failed" err="no token found"
Environment

System information:

Linux 4.13.0-32-generic x86_64

Prometheus version:

Tested with 2 versions:
root@grafana:~/prometheus-2.2.0-rc.0.linux-amd64# ./prometheus --version
prometheus, version 2.2.0-rc.0 (branch: HEAD, revision: 1fe05d40e4b2f4f7479048b1cc3c42865eb73bab)
build user:       root@f7abb25edc70
build date:       20180213-11:40:47
go version:       go1.9.2
root@grafana:~/prometheus-2.1.0.linux-amd64# ./prometheus --version
prometheus, version 2.1.0 (branch: HEAD, revision: 85f23d82a045d103ea7f3c89a91fba4a93e6367a)
build user:       root@6e784304d3ff
build date:       20180119-12:01:23
go version:       go1.9.2

Prometheus configuration file:

# my global config
global:
  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
  - static_configs:
    - targets:
      # - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
      - targets: ['<IP_ADDRESS>:9090']
  - job_name: 'ceph2'
    static_configs:
      - targets: ['mon1-ceph2-qh2.storage.unimelb.edu.au:9283', 'mon2-ceph2-qh2.storage.unimelb.edu.au:9283', 'mon3-ceph2-qh2.storage.unimelb.edu.au:9283']

Alertmanager configuration file:

insert configuration here (if relevant to the issue)

Logs:

insert Prometheus and Alertmanager logs relevant to the issue here

root@grafana:~/prometheus-2.1.0.linux-amd64# cat index2.html | ./promtool check metrics
error while linting: text format parsing error in line 11035: invalid metric name in comment

ceph_export.tar.gz

As promtool is telling you, the exporter generates an invalid metric name  (eg mds_mem_cap+). This exporter needs to be fixed.


backslashes not handled correctly

>>> from logfmt import format, parse
>>> list(parse(list(format({"key1": "hi\\"}))))
[{'key1': True}]

Not sure how it got to True there but this behavior is not correct :)

Similar issue here while parsing the escape char
I'm trying to parse quotes on logfmt format but, the value after the quote become new key with value "True".
import logfmt from logfmt import format import io raw_text=io.StringIO("ts=1579739313\"80007168") rawdata=logfmt.parse(raw_text) for i in rawdata: print(i)
output
{'ts': '1579739313', '80007168': True}


fix for cloneWithProps deprecated warning

Thanks, It's been already fixed. Closing this. We will update the module soon with new features.

It's great when people open the same requests.


Execute App from console without Desktop Environment (Pi OS Lite Bullseye 64 bits)

Software Versions

Python: 3.9.2
OS: Pi Os Lite Bullseye with no Desktop Environment
Kivy: 2.1.0
Kivy installation method: pip

Describe the bug
If I try to run an kivy example from console I have a error message: Couldn't connect to X server
Expected behavior
Years ago with kivy 1.11, python2.7 and raspbian stretch i was able to run my app from console. I could even make it run at startup as service, or with supervisor.
To Reproduce
From a fresh copy of Pi Os Lite Bullseye 64 bits (without Desktop Environment) install dependencies, I don't know if all are required, I just followed the instructions with a little change on  libgstreamer-plugins-base1.0-0:arm64 and  gstreamer1.0-alsa.
sudo apt update
sudo apt install python3-setuptools git-core python3-dev
sudo apt install pkg-config libgl1-mesa-dev libgles2-mesa-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-0:arm64 gstreamer1.0-alsa libmtdev-dev xclip xsel libjpeg-dev
sudo apt install libfreetype6-dev libgl1-mesa-dev libgles2-mesa-dev libdrm-dev libgbm-dev libudev-dev libasound2-dev liblzma-dev libjpeg-dev libtiff-dev libwebp-dev git build-essential gir1.2-ibus-1.0 libdbus-1-dev libegl1-mesa-dev libibus-1.0-5 libibus-1.0-dev libice-dev libsm-dev libsndio-dev libwayland-bin libwayland-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-video-dev x11proto-xinerama-dev
sudo apt install libsdl2-dev python3-sdl2
sudo apt install xinit
sudo apt install python3-pip git
python3 -m pip install Kivy kivy_examples

If execute the kivy example from console on raspberry screen or ssh session, I have this error:
ticketera@ticketera:~ $ python ~/.local/share/kivy-examples/3Drendering/main.py -d
[INFO   ] [Logger      ] Record log in /home/ticketera/.kivy/logs/kivy_22-07-21_15.txt
[INFO   ] [Kivy        ] v2.1.0
[INFO   ] [Kivy        ] Installed at "/home/ticketera/.local/lib/python3.9/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
[INFO   ] [Python      ] Interpreter at "/usr/bin/python"
[INFO   ] [Logger      ] Purge log fired. Processing...
[INFO   ] [Logger      ] Purge finished!
[INFO   ] [Factory     ] 189 symbols loaded
[DEBUG  ] [Cache       ] register <kv.resourcefind> with limit=None, timeout=60
[DEBUG  ] [Cache       ] register <kv.lang> with limit=None, timeout=None
[DEBUG  ] [Cache       ] register <kv.image> with limit=None, timeout=60
[DEBUG  ] [Cache       ] register <kv.atlas> with limit=None, timeout=None
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[DEBUG  ] [Cache       ] register <kv.texture> with limit=1000, timeout=60
[DEBUG  ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600
[DEBUG  ] [Window      ] Ignored <egl_rpi> (import error)
[INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO   ] [Window      ] Provider: x11(['window_egl_rpi', 'window_sdl2'] ignored)
Couldn't connect to X server

But If I run the xserver first with (only from console in raspberry screen)
startx
This command opened a small terminal with a white background and a mouse cursor, from this terminal I was able run kivy example.

the log of the execution is:
ticketera@ticketera:~ $ python3 ~/.local/share/kivy-examples/3Drendering/main.py -d
[INFO   ] Logger: Record log in /home/ticketera/.kivy/logs/kivy_22-07-22_5.txt
[INFO   ] Kivy: v2.1.0
[INFO   ] Kivy: Installed at "/home/ticketera/.local/lib/python3.9/site-packages/kivy/__init__.py"
[INFO   ] Python: v3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
[INFO   ] Python: Interpreter at "/usr/bin/python3"
[INFO   ] Logger: Purge log fired. Processing...
[INFO   ] Logger: Purge finished!
[INFO   ] Factory: 189 symbols loaded
[DEBUG  ] Cache: register <kv.resourcefind> with limit=None, timeout=60
[DEBUG  ] Cache: register <kv.lang> with limit=None, timeout=None
[DEBUG  ] Cache: register <kv.image> with limit=None, timeout=60
[DEBUG  ] Cache: register <kv.atlas> with limit=None, timeout=None
[INFO   ] Image: Providers: img_tex, img_dds, img_sdl2 (img_pil, img_ffpyplayer ignored)
[DEBUG  ] Cache: register <kv.texture> with limit=1000, timeout=60
[DEBUG  ] Cache: register <kv.shader> with limit=1000, timeout=3600
[DEBUG  ] Window: Ignored <egl_rpi> (import error)
[INFO   ] Window: Provider: sdl2(['window_egl_rpi'] ignored)
[INFO   ] GL: Using the "OpenGL" graphics system
[INFO   ] GL: Backend used <sdl2>
[INFO   ] GL: OpenGL version <b'2.1 Mesa 20.3.5'>
[INFO   ] GL: OpenGL vendor <b'Broadcom'>
[INFO   ] GL: OpenGL renderer <b'VC4 V3D 2.1'>
[INFO   ] GL: OpenGL parsed version: 2, 1
[INFO   ] GL: Shading version <b'1.20'>
[INFO   ] GL: Texture max size <2048>
[INFO   ] GL: Texture max units <16>
[DEBUG  ] Shader: Fragment compiled successfully
[DEBUG  ] Shader: Vertex compiled successfully
[DEBUG  ] ImageSDL2: Load </home/ticketera/.local/lib/python3.9/site-packages/kivy/data/glsl/default.png>
[INFO   ] Window: auto add sdl2 input provider
[INFO   ] Window: virtual keyboard not allowed, single mode, not docked
[DEBUG  ] App: Loading kv </home/ticketera/.local/share/kivy-examples/3Drendering/renderer.kv>
[DEBUG  ] App: kv </home/ticketera/.local/share/kivy-examples/3Drendering/renderer.kv> not found
[INFO   ] Shader: Read </home/ticketera/.local/share/kivy-examples/3Drendering/simple.glsl>
[DEBUG  ] Shader: Vertex compiled successfully
[DEBUG  ] Shader: Fragment compiled successfully
[DEBUG  ] Base: Create provider from mouse
[DEBUG  ] Base: Create provider from probesysfs
[DEBUG  ] ProbeSysfs: using probesysfs!
[DEBUG  ] ProbeSysfs: found device: generic ft5x06 (79) at /dev/input/event5
[INFO   ] ProbeSysfs: device match: /dev/input/event5
[INFO   ] MTD: Read event from </dev/input/event5>
[INFO   ] Base: Start application main loop
[INFO   ] MTD: </dev/input/event5> range position X is 0 - 799
[INFO   ] MTD: </dev/input/event5> range position Y is 0 - 479
[INFO   ] MTD: </dev/input/event5> range touch major is 0 - 0
[INFO   ] MTD: </dev/input/event5> range touch minor is 0 - 0
[INFO   ] MTD: </dev/input/event5> range pressure is 0 - 255
[INFO   ] MTD: </dev/input/event5> axes invertion: X is 0, Y is 0
[INFO   ] MTD: </dev/input/event5> rotation set to 0
[INFO   ] Base: Leaving application in progress...

Additional context
I was also able to run my app on Pi OS Bullseye WITH Desktop environment.
The installation was simple, the compatibility with new Pi OS is great, compile not was necessary, but the functionality of running it from console is gone.
Thanks for your help.

Hello! Did you find a solution to this problem?

Does also apply to non-RPi4 boards....console apps are not working anymore....

Hello! Did you find a solution to this problem?

No, I went back to RPi3 with Jessie and Kivy 1.11, I wil try it in a long time

Fixed via #8223 and aarch64 builds with self-built SDL2 (with KMSDRM)


Wrong xAdvance for labels when using markdown

Issue details
When using labels with markdown, xAdvance for GlyphLayout.GlyphRun is not calculated correctly, which results in unwanted spaces in the text.
Reproduction steps/code
The easiest way to reproduce this issue is by slightly changing BitmapFontTest.
Add following code to BitmapFontTest.create() method and compare 2 newly added labels.
labelToCompareA = new Label("This is a Test Label, to see if color markdown affects labels in any unwanted way!", skin);
labelToCompareB = new Label("This is a [GREEN]Test Label[], to see if color markdown affects labels in any unwanted way!", skin);

labelToCompareA.setPosition(100, 350);
labelToCompareB.setPosition(100, 380);

labelToCompareA.debug();
labelToCompareB.debug();

stage.addActor(labelToCompareA);
stage.addActor(labelToCompareB);

Screenshot of the issue

Version of LibGDX and/or relevant dependencies
Current master branch is affected by this issue. This problem probably exists for a while though.
Please select the affected platforms
I believe all platforms are affected.

I managed to fix this issue by editing class BitmapFont on line 801.
Original:
if (lastGlyph == null) { // First glyph.
    xAdvances.add((!tightBounds || glyph.fixedWidth) ? 0 : -glyph.xoffset * scaleX - padLeft);
}

Fixed:
if (lastGlyph == null) { // First glyph.
    xAdvances.add((!tightBounds || glyph.fixedWidth) ? 0 :  -padLeft);
}

Since it's first character I dont think we need to care about glyph xoffset. I might be wrong though. :)

The negative xoffset is important. Some glyphs have pixels to the left of the glyph position.
I don't see a problem:

Test case:
http://n4te.com/x/4703-SXJ6.txt
Please provide an actual test case that shows a problem, not partial instructions on how to construct one.

@NathanSweet
Here's a testcase (might be a different problem then OP, but it's also about sth. being offset):
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.tests.utils.GdxTest;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;
import com.badlogic.gdx.utils.viewport.ScreenViewport;

public class Issue4800 extends GdxTest {
    private Stage stage;

    public void create() {
        FileHandle file = Gdx.files.absolute("/tmp/04B_03.ttf");
        FreeTypeFontGenerator generator = new FreeTypeFontGenerator(file);

        BitmapFont font = generator.generateFont(new FreeTypeFontGenerator.FreeTypeFontParameter());

        font.getData().markupEnabled = true;
        font.getData().breakChars = new char[]{'-'};

        stage = new Stage(new ScreenViewport());

        LabelStyle style = new LabelStyle();
        style.font = font;
        Label labelToCompareA = new Label("Test: This is a Test Label, and more words.", style);
        Label labelToCompareB = new Label("[RED]Text[]: This is a [GREEN]Test Label[], and more words.", style);

        labelToCompareA.setPosition(10, 350);
        labelToCompareB.setPosition(10, 400);

        labelToCompareA.debug();
        labelToCompareB.debug();

        stage.addActor(labelToCompareA);
        stage.addActor(labelToCompareB);
    }

    public void render() {
        Gdx.gl.glClearColor(0, 0, 0, 1);
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
        stage.act(Gdx.graphics.getDeltaTime());
        stage.draw();
    }

    public void resize(int width, int height) {
        stage.getViewport().update(width, height, true);
    }
}

The font can be downloaded from the creators website here:
http://www.dsg4.com/04/extra/bitmap/index.html (the very first)
(direct link to download)
Maybe I'm completely wrong about this, but I think the reason you might not have seen the offset is because it's very small, which is why it is more obvious with this pixel font.

@CreamyCookie "Test:" VS "Text:" ... are you sure about your test case ? :-)

@mgsx-dev oops, thanks for making me aware of that. I'll update it right away. (Won't change though, since it's a monospace font.)

@CreamyCookie This is what I see (I am running from the latest source in the master branch):

Oh, wow. I guess it must have been fixed in master then. I'm on 1.9.8. (using lwjgl3) Should have tested on the master branch. Sorry for the inconvenience!


moco-controller didn't run switchover as expected

Describe the bug
moco-controller didn't run switchover as expected when restarting a node where a primary Pod is running but run failover instead.
Expected behavior

Eviction API adds deletionTimestamp to a Pod
Pod's preStop hook has sleep 20 to ensure that the Pod runs in 20 seconds
moco-controller detects a Pod is removing within 20 seconds
Start switchover

It turned out that the problem was triggered by one of our network components.
Not a bug of moco.

I can confirm this issue as well.
I did the following setup:

3 node cluster (using virtualbox, vanilla setup with https://github.com/galexrt/k8s-vagrant-multi-node and containerd)
Deployed moco v0.10.5
Deploy 3 node mysql cluster

Check status:
→ k get mysqlclusters.moco.cybozu.com
NAME   AVAILABLE   HEALTHY   PRIMARY   SYNCED REPLICAS   ERRANT REPLICAS   LAST BACKUP
test   True        True      1         3                                   <no value>

Cluster view:
NAMESPACE      NAME                                                       READY   STATUS    RESTARTS   AGE    IP               NODE     NOMINATED NODE   READINESS GATES
cert-manager   pod/cert-manager-5d7f97b46d-rxfgv                          1/1     Running   0          29h    <IP_ADDRESS>     node2    <none>           <none>
cert-manager   pod/cert-manager-cainjector-69d885bf55-trv2k               1/1     Running   0          29h    <IP_ADDRESS>   node1    <none>           <none>
cert-manager   pod/cert-manager-webhook-54754dcdfd-fvjrn                  1/1     Running   0          29h    <IP_ADDRESS>     node2    <none>           <none>
default        pod/moco-test-0                                            3/3     Running   0          29h    <IP_ADDRESS>   node1    <none>           <none>
default        pod/moco-test-1                                            3/3     Running   0          155m   <IP_ADDRESS>    node3    <none>           <none>
default        pod/moco-test-2                                            3/3     Running   0          29h    <IP_ADDRESS>     node2    <none>           <none>
kube-system    pod/calico-kube-controllers-58497c65d5-6v78n               1/1     Running   0          30h    <IP_ADDRESS>    master   <none>           <none>
kube-system    pod/calico-node-54ngz                                      1/1     Running   0          30h    <IP_ADDRESS>    node1    <none>           <none>
kube-system    pod/calico-node-p2ddq                                      1/1     Running   0          30h    <IP_ADDRESS>    node2    <none>           <none>
kube-system    pod/calico-node-swh7p                                      1/1     Running   0          30h    <IP_ADDRESS>    master   <none>           <none>
kube-system    pod/calico-node-v9t29                                      1/1     Running   0          163m   <IP_ADDRESS>    node3    <none>           <none>
kube-system    pod/coredns-78fcd69978-lc45f                               1/1     Running   0          30h    <IP_ADDRESS>    master   <none>           <none>
kube-system    pod/coredns-78fcd69978-qs8pg                               1/1     Running   0          30h    <IP_ADDRESS>    master   <none>           <none>
kube-system    pod/etcd-master                                            1/1     Running   0          30h    <IP_ADDRESS>    master   <none>           <none>
kube-system    pod/kube-apiserver-master                                  1/1     Running   0          30h    <IP_ADDRESS>    master   <none>           <none>
kube-system    pod/kube-controller-manager-master                         1/1     Running   0          30h    <IP_ADDRESS>    master   <none>           <none>
kube-system    pod/kube-proxy-98h2q                                       1/1     Running   0          30h    <IP_ADDRESS>    node1    <none>           <none>
kube-system    pod/kube-proxy-ctppv                                       1/1     Running   0          30h    <IP_ADDRESS>    master   <none>           <none>
kube-system    pod/kube-proxy-gw7df                                       1/1     Running   0          163m   <IP_ADDRESS>    node3    <none>           <none>
kube-system    pod/kube-proxy-zwb87                                       1/1     Running   0          30h    <IP_ADDRESS>    node2    <none>           <none>
kube-system    pod/kube-scheduler-master                                  1/1     Running   0          30h    <IP_ADDRESS>    master   <none>           <none>
moco-system    pod/moco-controller-7c884db766-7slt8                       1/1     Running   0          29h    <IP_ADDRESS>   node1    <none>           <none>
moco-system    pod/moco-controller-7c884db766-c7kx6                       1/1     Running   0          29h    <IP_ADDRESS>     node2    <none>           <none>
openebs        pod/openebs-localpv-localpv-provisioner-67db7d75f9-8rpm5   1/1     Running   0          29h    <IP_ADDRESS>   node1    <none>           <none>

NAMESPACE   NAME                                                        CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                            STORAGECLASS       REASON   AGE    VOLUMEMODE
            persistentvolume/pvc-3b22ee7e-3da3-4378-8e1c-e66a3361ebea   5Gi        RWO            Delete           Bound    default/mysql-data-moco-test-2   openebs-hostpath            29h    Filesystem
            persistentvolume/pvc-5263a364-f28d-4fee-ad6b-48d284863f68   5Gi        RWO            Delete           Bound    default/mysql-data-moco-test-1   openebs-hostpath            155m   Filesystem
            persistentvolume/pvc-7f74d913-99fa-4357-9de9-a1ac578c7205   5Gi        RWO            Delete           Bound    default/mysql-data-moco-test-0   openebs-hostpath            29h    Filesystem

NAMESPACE   NAME                                           STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS       AGE    VOLUMEMODE
default     persistentvolumeclaim/mysql-data-moco-test-0   Bound    pvc-7f74d913-99fa-4357-9de9-a1ac578c7205   5Gi        RWO            openebs-hostpath   29h    Filesystem
default     persistentvolumeclaim/mysql-data-moco-test-1   Bound    pvc-5263a364-f28d-4fee-ad6b-48d284863f68   5Gi        RWO            openebs-hostpath   155m   Filesystem
default     persistentvolumeclaim/mysql-data-moco-test-2   Bound    pvc-3b22ee7e-3da3-4378-8e1c-e66a3361ebea   5Gi        RWO            openebs-hostpath   29h    Filesystem

NAMESPACE   NAME          STATUS   ROLES                  AGE    VERSION   INTERNAL-IP     EXTERNAL-IP   OS-IMAGE                    KERNEL-VERSION           CONTAINER-RUNTIME
            node/master   Ready    control-plane,master   30h    v1.22.0   <IP_ADDRESS>   <none>        Fedora 34 (Cloud Edition)   5.13.6-200.fc34.x86_64   containerd://1.5.3
            node/node1    Ready    <none>                 30h    v1.22.0   <IP_ADDRESS>   <none>        Fedora 34 (Cloud Edition)   5.13.6-200.fc34.x86_64   containerd://1.5.3
            node/node2    Ready    <none>                 30h    v1.22.0   <IP_ADDRESS>   <none>        Fedora 34 (Cloud Edition)   5.13.6-200.fc34.x86_64   containerd://1.5.3
            node/node3    Ready    <none>                 163m   v1.22.0   <IP_ADDRESS>   <none>        Fedora 34 (Cloud Edition)   5.13.6-200.fc34.x86_64   containerd://1.5.3

Delete a VM where the primary node runs on (halt is also sufficient)

MySQL Logs:
moco-test-0 mysqld 2021-08-06T14:48:31.205153Z 3746 [Warning] [MY-010897] [Repl] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
moco-test-2 mysqld 2021-08-06T14:48:31.232851Z 3655 [Warning] [MY-010897] [Repl] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
moco-test-2 mysqld 2021-08-06T14:49:31.295189Z 3655 [ERROR] [MY-010584] [Repl] Slave I/O for channel '': error reconnecting to master 'moco-repl@moco-test-1.moco-test.default.svc:3306' - retry-time: 60 retries: 1 message: Can't connect to MySQL server on 'moco-test-1.moco-test.default.svc:3306' (110), Error_code: MY-002003
moco-test-0 mysqld 2021-08-06T14:49:36.237370Z 3746 [ERROR] [MY-010584] [Repl] Slave I/O for channel '': error reconnecting to master 'moco-repl@moco-test-1.moco-test.default.svc:3306' - retry-time: 60 retries: 1 message: Can't connect to MySQL server on 'moco-test-1.moco-test.default.svc:3306' (110), Error_code: MY-002003

After ~5min
moco-test-2 mysqld 2021-08-06T14:52:31.419479Z 3655 [ERROR] [MY-010584] [Repl] Slave I/O for channel '': error reconnecting to master 'moco-repl@moco-test-1.moco-test.default.svc:3306' - retry-time: 60 retries: 3 message: Unknown MySQL server host 'moco-test-1.moco-test.default.svc' (22), Error_code: MY-002005
moco-test-0 mysqld 2021-08-06T14:52:36.345981Z 3746 [ERROR] [MY-010584] [Repl] Slave I/O for channel '': error reconnecting to master 'moco-repl@moco-test-1.moco-test.default.svc:3306' - retry-time: 60 retries: 3 message: Unknown MySQL server host 'moco-test-1.moco-test.default.svc' (22), Error_code: MY-002005

Status:
→ k get mysqlclusters.moco.cybozu.com
NAME   AVAILABLE   HEALTHY   PRIMARY   SYNCED REPLICAS   ERRANT REPLICAS   LAST BACKUP
test   False       False     1         3                                   <no value>

default        pod/moco-test-0                                            2/3     Running       0          29h    <IP_ADDRESS>   node1    <none>           <none>
default        pod/moco-test-1                                            3/3     Running       0          159m   <IP_ADDRESS>    node3    <none>           <none>
default        pod/moco-test-2                                            2/3     Running       0          29h    <IP_ADDRESS>     node2    <none>           <none>

Manually deleting the pod moco-test-1 doesn't trigger a failover or changes anything.

@ymmt2005 I think there may be a real issue. If the value of HEALTHY (after about few seconds) changes to False then I think a failover must happen but it's not.
I can provide another test results on EKS if required but had exactly the same issue already on Exoscale SKS.

@dklesev While I'm not sure what is the problem, moco conducts failover only when
the primary is down and there are enough healthy replicas.  Your log indicates that
the primary is running, so moco did not execute failover.

default        pod/moco-test-1                                            3/3     Running       0          159m   <IP_ADDRESS>    node3

What I don't understand is why the replicas kept failing to re-connect to the primary.
Anyway, your problem is not relevant to the original issue.

@dklesev
Did you persist any data in the cluster?
If there are no data, moco does not perform failover by design.
If all replicas have no data, moco couldn't determine whether the
cluster is new or all data have been lost at once.

@ymmt2005 yes there were some valuable test data.
I tested it again on a completely fresh setup and it seems to work as expected
moco-test-0 mysqld 2021-08-07T15:09:42.489864Z 132 [Note] [MY-011026] [Repl] Slave I/O thread killed while reading event for channel ''.
moco-test-0 mysqld 2021-08-07T15:09:42.489909Z 132 [Note] [MY-010570] [Repl] Slave I/O thread exiting for channel '', read up to log 'binlog.000001', position 60602
moco-test-2 mysqld 2021-08-07T15:09:42.493307Z 74 [Note] [MY-011026] [Repl] Slave I/O thread killed while reading event for channel ''.
moco-test-2 mysqld 2021-08-07T15:09:42.493378Z 74 [Note] [MY-010570] [Repl] Slave I/O thread exiting for channel '', read up to log 'binlog.000001', position 60602
moco-test-0 mysqld 2021-08-07T15:10:06.826377Z 318 [Note] [MY-011130] [Repl] Semi-sync replication initialized for transactions.
moco-test-0 mysqld 2021-08-07T15:10:06.827074Z 318 [Note] [MY-011142] [Repl] Semi-sync replication enabled on the master.
moco-test-0 mysqld 2021-08-07T15:10:06.827882Z 0 [Note] [MY-011166] [Repl] Starting ack receiver thread.
moco-test-2 mysqld 2021-08-07T15:10:06.828084Z 75 [Note] [MY-010596] [Repl] Error reading relay log event for channel '': slave SQL thread was killed
moco-test-2 mysqld 2021-08-07T15:10:06.828128Z 75 [Note] [MY-010587] [Repl] Slave SQL thread for channel '' exiting, replication stopped in log 'binlog.000001' at position 60602
moco-test-2 mysqld 2021-08-07T15:10:06.831902Z 260 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL '' executed'. Previous state master_host='moco-test-1.moco-test.default.svc', master_port= 3306, master_log_file='binlog.000001', master_log_pos= 60602, master_bind=''. New state master_host='moco-test-0.moco-test.default.svc', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''.
moco-test-2 mysqld 2021-08-07T15:10:06.843173Z 365 [Note] [MY-011179] [Repl] Slave I/O thread: Start semi-sync replication to master 'moco-repl@moco-test-0.moco-test.default.svc:3306' in log 'FIRST' at position 4.
moco-test-2 mysqld 2021-08-07T15:10:06.843238Z 365 [Warning] [MY-010897] [Repl] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
moco-test-2 mysqld 2021-08-07T15:10:06.845367Z 366 [Note] [MY-010581] [Repl] Slave SQL thread for channel '' initialized, starting replication in log 'FIRST' at position 0, relay log './moco-test-2-relay-bin.000001' position: 4
moco-test-2 mysqld 2021-08-07T15:10:06.847991Z 365 [System] [MY-010562] [Repl] Slave I/O thread for channel '': connected to master 'moco-repl@moco-test-0.moco-test.default.svc:3306',replication started in log 'FIRST' at position 4
moco-test-0 mysqld 2021-08-07T15:10:06.851248Z 405 [Note] [MY-010462] [Repl] Start binlog_dump to master_thread_id(405) slave_server(29268333), pos(, 4)
moco-test-0 mysqld 2021-08-07T15:10:06.851290Z 405 [Note] [MY-011170] [Repl] Start semi-sync binlog_dump to slave (server_id: 29268333), pos(, 4).
moco-test-0 mysqld 2021-08-07T15:10:06.887832Z 133 [Note] [MY-010596] [Repl] Error reading relay log event for channel '': slave SQL thread was killed
moco-test-0 mysqld 2021-08-07T15:10:06.887942Z 133 [Note] [MY-010587] [Repl] Slave SQL thread for channel '' exiting, replication stopped in log 'binlog.000001' at position 60602

What did not work is that there was a connection hanging to primary but I guess it's a thing with kubernetes service itlself.
Queries used:
CREATE DATABASE demo;
CREATE TABLE movies(
    id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(100),
    release_year YEAR(4),
    genre VARCHAR(100),
    collection_in_mil INT
);
COMMIT:

Write
while true; do mysql -h <IP_ADDRESS> -P 32180 -D demo -u moco-admin -p$MOCO_ADMIN_PASSWORD -e 'INSERT INTO movies (title, release_year, genre, collection_in_mil) VALUES ("Forrest Gump", 1994, "Drama", 330.2); COMMIT;'; sleep 0.1; done

Read
while true; do mysql -h <IP_ADDRESS> -P 30658 -D demo -u moco-admin -p$MOCO_ADMIN_PASSWORD -e "SELECT count(*) FROM movies;"; sleep 0.1; done

Services
NAME                          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                          AGE
kubernetes                    ClusterIP   <IP_ADDRESS>       <none>        443/TCP                          30m
moco-test                     ClusterIP   None            <none>        3306/TCP,33060/TCP               18m
moco-test-primary             NodePort    <IP_ADDRESS>    <none>        3306:32180/TCP,33060:32212/TCP   18m
moco-test-replica             NodePort    <IP_ADDRESS>    <none>        3306:30658/TCP,33060:31943/TCP   18m

However after booting the node again the previous primary is unready. Is this expected to be?

@dklesev Sorry for my late reply.

What did not work is that there was a connection hanging to primary but I guess it's a thing with kubernetes service itself.
The switchover took about 30sec in my env:

The expected behavior in the scenario of a Node shutdown where a primary Pod is running is:

MySQL Pod is evicted and the DeleionTimeStamp is set
MySQL Pod sleeps 20 seconds in its preStop hook
moco-controller detects the Pod's deletion timestamp and starts the switch over operation within 20 seconds

However, network components (in our case calico-node) don't gracefully shut down its network configuration. Therefore moco-controller can't reach a primary Pod as soon as the DeletionTimeStamp is set. It leads to a fail-over operation instead of a switch-over operation. This is what is happening in our environment.
It's possible that the same problem occurred in your environment.

However after booting the node again the previous primary is unready. Is this expected to be?

Missing magic number for semi-sync packet, packet len: 36. indicates that a primary sent a packet without the magic number which a primary server appends when semi-sync replication is enabled. I guess semi-sync is disabled on the primary server.
Could you check your server's status?
My test cluster status provisioned by moco
mysql> show global status like 'rpl%';
+--------------------------------------------+-------+
| Variable_name                              | Value |
+--------------------------------------------+-------+
| Rpl_semi_sync_master_clients               | 2     |
| Rpl_semi_sync_master_net_avg_wait_time     | 0     |
| Rpl_semi_sync_master_net_wait_time         | 0     |
| Rpl_semi_sync_master_net_waits             | 4     |
| Rpl_semi_sync_master_no_times              | 0     |
| Rpl_semi_sync_master_no_tx                 | 0     |
| Rpl_semi_sync_master_status                | ON    |
| Rpl_semi_sync_master_timefunc_failures     | 0     |
| Rpl_semi_sync_master_tx_avg_wait_time      | 10958 |
| Rpl_semi_sync_master_tx_wait_time          | 21917 |
| Rpl_semi_sync_master_tx_waits              | 2     |
| Rpl_semi_sync_master_wait_pos_backtraverse | 0     |
| Rpl_semi_sync_master_wait_sessions         | 0     |
| Rpl_semi_sync_master_yes_tx                | 2     |
| Rpl_semi_sync_slave_status                 | OFF   |
+--------------------------------------------+-------+
15 rows in set (0.00 sec)

mysql> show variables like 'rpl%';
+-------------------------------------------+------------+
| Variable_name                             | Value      |
+-------------------------------------------+------------+
| rpl_read_size                             | 8192       |
| rpl_semi_sync_master_enabled              | ON         |
| rpl_semi_sync_master_timeout              | 86400000   |
| rpl_semi_sync_master_trace_level          | 32         |
| rpl_semi_sync_master_wait_for_slave_count | 1          |
| rpl_semi_sync_master_wait_no_slave        | ON         |
| rpl_semi_sync_master_wait_point           | AFTER_SYNC |
| rpl_semi_sync_slave_enabled               | ON         |
| rpl_semi_sync_slave_trace_level           | 32         |
| rpl_stop_slave_timeout                    | 31536000   |
+-------------------------------------------+------------+
10 rows in set (0.00 sec)

Please reopen it if you are still having an issue.

I locked this because the reported issue was identified as a problem with Calico,
and dklesev's problem seems irrevant.  Please open another issue if you are still
having difficulties.


feat: add support for Bun

See https://github.com/microsoft/playwright/pull/28875#issuecomment-1887137945

Our support for bun is very fragile, so I would not do that just yet - it sends too strong of a signal to the community.


RUMM-943 Update the docs following the new API for SDK initialisation

Codecov Report

Merging #466 (4dacf5b) into master (5d52831) will increase coverage by 0.07%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #466      +/-   ##
============================================
+ Coverage     89.89%   89.96%   +0.07%
- Complexity     1299     1300       +1
============================================
  Files           156      156
  Lines          4412     4412
  Branches        494      494
============================================
+ Hits           3966     3969       +3
- Misses          283      285       +2
+ Partials        163      158       -5

Impacted Files
Coverage Δ
Complexity Δ

...oid/rum/tracking/NavigationViewTrackingStrategy.kt
86.27% <0.00%> (-1.96%)
14.00% <0.00%> (-1.00%)

...ernal/instrumentation/gestures/GesturesListener.kt
90.60% <0.00%> (-0.85%)
45.00% <0.00%> (-1.00%)

...c/main/kotlin/com/datadog/android/DatadogConfig.kt
93.88% <0.00%> (-0.51%)
10.00% <0.00%> (-1.00%)

...oid/src/main/kotlin/com/datadog/android/Datadog.kt
87.32% <0.00%> (ø)
28.00% <0.00%> (ø%)

...tadog/android/log/internal/domain/LogSerializer.kt
91.03% <0.00%> (ø)
28.00% <0.00%> (ø%)

...l/net/info/BroadcastReceiverNetworkInfoProvider.kt
82.11% <0.00%> (ø)
29.00% <0.00%> (ø%)

...roid/rum/internal/domain/scope/RumResourceScope.kt
97.20% <0.00%> (+0.70%)
43.00% <0.00%> (+1.00%)

.../android/tracing/internal/domain/SpanSerializer.kt
89.16% <0.00%> (+1.20%)
23.00% <0.00%> (+1.00%)

...nal/tracking/AndroidXFragmentLifecycleCallbacks.kt
93.02% <0.00%> (+4.65%)
14.00% <0.00%> (+1.00%)

...nternal/tracking/OreoFragmentLifecycleCallbacks.kt
94.74% <0.00%> (+5.26%)
15.00% <0.00%> (+1.00%)

Codecov Report

Merging #466 (4dacf5b) into master (5d52831) will increase coverage by 0.07%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #466      +/-   ##
============================================
+ Coverage     89.89%   89.96%   +0.07%
- Complexity     1299     1300       +1
============================================
  Files           156      156
  Lines          4412     4412
  Branches        494      494
============================================
+ Hits           3966     3969       +3
- Misses          283      285       +2
+ Partials        163      158       -5

Impacted Files
Coverage Δ
Complexity Δ

...oid/rum/tracking/NavigationViewTrackingStrategy.kt
86.27% <0.00%> (-1.96%)
14.00% <0.00%> (-1.00%)

...ernal/instrumentation/gestures/GesturesListener.kt
90.60% <0.00%> (-0.85%)
45.00% <0.00%> (-1.00%)

...c/main/kotlin/com/datadog/android/DatadogConfig.kt
93.88% <0.00%> (-0.51%)
10.00% <0.00%> (-1.00%)

...oid/src/main/kotlin/com/datadog/android/Datadog.kt
87.32% <0.00%> (ø)
28.00% <0.00%> (ø%)

...tadog/android/log/internal/domain/LogSerializer.kt
91.03% <0.00%> (ø)
28.00% <0.00%> (ø%)

...l/net/info/BroadcastReceiverNetworkInfoProvider.kt
82.11% <0.00%> (ø)
29.00% <0.00%> (ø%)

...roid/rum/internal/domain/scope/RumResourceScope.kt
97.20% <0.00%> (+0.70%)
43.00% <0.00%> (+1.00%)

.../android/tracing/internal/domain/SpanSerializer.kt
89.16% <0.00%> (+1.20%)
23.00% <0.00%> (+1.00%)

...nal/tracking/AndroidXFragmentLifecycleCallbacks.kt
93.02% <0.00%> (+4.65%)
14.00% <0.00%> (+1.00%)

...nternal/tracking/OreoFragmentLifecycleCallbacks.kt
94.74% <0.00%> (+5.26%)
15.00% <0.00%> (+1.00%)


unable to generate code coverage using scoverage in scala-cli

Version(s)
scala-cli --version
Scala CLI version: 1.3.1
Scala version (default): 3.4.1
Describe the bug
Running the test command like below
"scala-cli test
unable to see the coverage report. Using ScalaTest as test framework. I couldn't find any options to generate the coverage report or integrate with scoverage tool in the "scala-cli test --full-help" command as well
To Reproduce
just try and run the test command as mentioned above
Expected behaviour
expecting to see coverage data generated.

@MuthuVignesh91 It's not shown under --full-help, because it's a Scala compiler option, not a Scala CLI option.
Try --scalac-help instead.
scala-cli compile --scalac-help 2>&1 |grep coverage
# -coverage-exclude-classlikes  List of regexes for packages, classes and modules
#                              to exclude from coverage.
#      -coverage-exclude-files  List of regexes for files to exclude from
#                               coverage.
#                -coverage-out  Destination for coverage classfiles and

You can pass the appropriate option to specify where the coverage report should be generated.
//> using dep org.scalatest::scalatest::3.2.18
//> using options -coverage-out:./coverage
import org.scalatest.flatspec.AnyFlatSpec

class TestSpec extends AnyFlatSpec {
  "A test" should "be run" in {
    assert(true === true)
  }
}

The coverage report gets generated under the specified path.
tree coverage
# coverage
# ├── scoverage.coverage
# └── scoverage.measurements.14ad86df-2001-4edd-b0a1-2b6a48d1b240.1
#
# 1 directory, 2 files


Hardware cursor replacement is broken

As described here, hardware cursor replacement doesn't work.
The example provided by gordonfranz in the above forum post:
var image = Image()
image.load("res://cursor/cursor1.png")
VisualServer.cursor_set_texture(VisualServer.texture_create_from_image(image), Vector2(), 0)

This should replace the cursor, but it appears to do nothing.
I'm currently doing some work on bringing a point and click adventure game to godot and ideally I would use this method for adjusting the cursor.

I can confirm that the above code does not work. The VisualServer API is not much documented either so far, so it's hard to know if those commands just don't work or if the wrong arguments were used. I tried e.g. VisualServer.cursor_set_visible(false, 0) and it also has no effect, but I'm not sure of the syntax for the expected int argument.

This has been fixed, and there are now better methods to do this using the Input API and changing to custom cursor in project settings!

Looks like the Vector2 hotspot setting in Input.set_custom_mouse_cursor does nothing. To ensure it wasn't me messing up the scripting, I tried using the project settings, still didn't work.
I was using something like this:
 Input.set_custom_mouse_cursor(base_cursor, Vector2(32,32))

But the hotspot was still at the top left corner (what I assume to be 0,0) of the cursor.

hotspot problem is in this issue https://github.com/godotengine/godot/issues/3082
for a mouse replacement you can use a separate mouse scene https://github.com/godotengine/godot/issues/3006


WFNEWS-1581

Delayed identify state handlers for double-click events. May need to adjust timeout delay

Hm @yzlucas Still testing this, looks like the additional handlers cause identify to execute twice which is not handling the default panel correctly. If I can't find a suitable correction for that we'll close this PR. Please nobody merge this one until verified!


Automatically rescale longitudes to +/-180 degrees when parsing grid information from python embedding.

Python embedding - rescale longitudes - Justin Tsu has data with 0-360 longitudes while MET supports -180 to 180. Should go in MET bugfix release 8.1.2.
During the NRL METplus tutorial, we found that using python embedding to define a Lambert Conformal Projection with longitude values > 180 did not work.  Rescaling them to the range of -180 to 180 did work.
The code should automatically do this, as it does in several other contexts.

Could have fixed this in st_grid.cc and lc_grid.cc but fixed it in grid_from_python_dict.cc instead.  This change is consistent with the other vx_data2d libraries where the longitudes are rescaled to -180,180 when parsing the grid spec data.


Update vector_envs_tutorial.py

ADD if name == "main" to avoid error on multiprocessing
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
https://github.com/Farama-Foundation/Gymnasium/issues/309
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] This change requires a documentation update

What is the error that happens without __name__ == "__main__"?

I'm sorry for less careful commenting.
Now I did pre-commit run --all-files and committed this time.
Below issue was triggered at gym.vector.make and gym.vector.AsyncVectorEnv
I ran on Python 3.10 and my computer is 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64

@lazybuttrying Could we try to just adding a note to the beginning of the tutorial. I think that most people will just use the jupyter notebook

Actually It happen on jupyter notebook too but I think it is nice idea.
Changing sequence due to the issue makes code as spaghetti.
On this weekend, I will get back the code and add the notice comment on the head of the file.
Also I will upload error screenshot on the jupyter and follow your document instruction carefully.
Thanks for your attention.


Can't seem to use Realm in an embedded framework

I am building an iphone app that has a share extension. I would like the extension, and the main app to share code, including the code that uses realm to manage stored objects.
I am manually installing the Realm.framework. The only way I could get my app to compile was to include the realm.framework in both the embedded extension, and the main app, but that led to many log messages like this
objc[11526]: Class RLMObjectSchema is implemented in both
And, also when I actually try and persist an object I get this error
Terminating app due to uncaught exception 'RLMException', reason: 'Object type 'Article' not persisted in Realm'
Before I did this refactor I had everything working fine.
Here is the full stack
*** First throw call stack:
(
	0   CoreFoundation                      0x0000000106c54f35 __exceptionPreprocess + 165
	1   libobjc.A.dylib                     0x00000001068edbb7 objc_exception_throw + 45
	2   parcReader                          0x0000000105b44649 -[RLMSchema objectForKeyedSubscript:] + 210
	3   ParcShared                          0x00000001061a0a16 RLMGetObject + 137
	4   ParcShared                          0x0000000106197ce8 +[RLMObject objectInRealm:forPrimaryKey:] + 86
	5   ParcShared                          0x00000001061829d0 +[Article createOrUpdateInRealm:withObject:] + 176
	6   parcReader                          0x0000000105b02a54 __36-[Importer importLoopHasMore:MinId:]_block_invoke_2 + 516
	7   libdispatch.dylib                   0x0000000108433ba6 _dispatch_call_block_and_release + 12
	8   libdispatch.dylib                   0x00000001084517f4 _dispatch_client_callout + 8
	9   libdispatch.dylib                   0x000000010843c15d _dispatch_root_queue_drain + 1097
	10  libdispatch.dylib                   0x000000010843d5d9 _dispatch_worker_thread3 + 111
	11  libsystem_pthread.dylib             0x00000001087d56cb _pthread_wqthread + 729
	12  libsystem_pthread.dylib             0x00000001087d34a1 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Okay, not entrely sure how I fixed this, but in case you google your way here this is what I did.

I didn't make my main app link with the Realm.framework
Instead of puting the Realm.famework into a Frameworks folder inside of my embedded framework I put it in the main Frameworks folder in my project.


ci(github-actions): fix some errors in the Checkout step

Since the whole .github/ directory is protected through CODEOWNERS and branch protection is applied to admins also, let's be nice to the process.

Fails

:no_entry_sign:
Please assign someone to merge this PR, and optionally include people who should review.

Messages

:book:
Nice! Just make sure the PR body doesn't contain nonsense stuff that we think it's unimportant to reach 30+ characters.

:book:
Hey, @ajhalili2006! Looks like you're about to change Dangerfiles, right? Please create an new issue about these changes so the community will review changes and collect feedback.

  Generated by :no_entry_sign: dangerJS against 3aec168e3cf05759c431bd2074d2e77a4f829a7a

Messages
Nice! Just make sure the PR body doesn't contain nonsense stuff that we think it's unimportant to reach 30+ characters.
Hey, @ajhalili2006! Looks like you're about to change Dangerfiles, right? Please create an new issue about these changes so the community will review changes and collect feedback.
Generated by  dangerJS against 3aec168

Probably need to do some chores on the Dangerfiles in the future.


Updated link to 0-welcome example.

Coverage remained the same at 100.0% when pulling c84c8494c35c0bd4278636bd2be2b6fba66417c3 on danielrasmuson:patch-1 into 25efc9821e7124fefb10c7039a96cf6628617593 on astorfi:master.

Please declare these issues in the issue section.
The link has been removed. We just decided to eliminate it.
Please update your fork.
I appreciate your consideration.

Coverage remained the same at 100.0% when pulling 12e808c3ebeda5313add1de39e71e07ce2131421 on danielrasmuson:patch-1 into a28125c7116c46db6bf86c2352b1b8262332c125 on astorfi:master.


Move FHIRPath into core

Coverage remained the same at 95.207% when pulling 836c2991ba77eeccbb79b0a3a61f1da9af0f3948 on cody-move-fhirpath-to-core into 91d07107f2ee4ee470f52431c8473c4a1bcae3a0 on main.

For https://github.com/medplum/medplum/issues/601


Questions regarding keywords

This looks like a really cool project!
I just read through the guide, and really liked the writing style :)
At a few points, I was curious, would love to learn more about:

what the fork function does exactly?
was curious why you decided to use object and type, instead of e.g. just struct and enum, like in Rust?

Bending is the opposite of folding. Whatever fold consumes, bend creates. The idea is that, by defining an initial state and a halting condition, we can "grow" a recursive structure, layer by layer, until the condition is met.

Here I was wondering why bend was chosen as a keyword? Given the above explanation, wouldn't something like spread, unfold, or grow be more intuitive then? Or are there other use cases not covered in the guide, where bend makes more sense as a keyword? Or is there some history from other languages?

case Shape/Circle:

Was curious why / was chosen for these kinds of namespaces / variants, instead of e.g. the :: like in Rust? Since normally / is used for division?

Bend comes with 3 built-in numeric types: u24, i24, f24. That's quite small, we admit. Soon, we'll have larger types.

Is there already a plan for how other types, e.g. u32, will be indicated? Will there be something like Rust-like type annotations?
Thank you! I'm looking forward to where this project is going :)

fork calls the function defined by bend recursively passing the new state of the recursion.
We were trying to find good keywords that would be easily understandable by most developers. Bend is not in the exact same niche as any other programming language and attracts people of many different background, so we decided object and type were good option.
bend could easily be called unfold, you're correct. Also, it's just my personal opinion, but if it were called unfold using bend for the recursive calls would be a bit strange. I'm not aware of previous uses of the keyword bend, but Taelin decided on that name and maybe had some inspirations I don't know about.
The / is just a matter of preference. But also note that / is a normal name character that can be used however you want in function of variable names. If we used :: that would be harder to do.
u32 and u64 are planned and will be added as soon as HVM supports them.
A type system will be available with Kind. We'll probably make it a soft layer on top of Bend that you can opt-in/out of.

Thanks a lot for the detailed explanations! :-)

I'll leave this issue open as a task to improve the initial explanation of 'fork'


volunteers

We need help to make this repo work. New contributors often need help fitting their contributions into the repo. Feel free to offer help to new contributors, especially if you share a language with them.

I am unaware whether there has been any changes to wanting more members/volunteers however I'd like to give a little notice that, if possible, I would like to work towards being a member or the repo.
If not, I'll still continue to review the PRs whenever I am free!

@CleanMachine1 have resent the invitation from last year

Oh, well thank you very much, I was unaware I had actually been invited since it doesn't show in the notifications tab!
I have joined the repo and will continue to contribute :)

Hi guys,
first of all, I love the idea of this repo.
So now I am a German student and I would be an active part of this repo, can someone help me to get along with it

Hi guys, first of all, I love the idea of this repo. So now I am a German student and I would be an active part of this repo, can someone help me to get along with it

@TomB2001 you are welcome. Could you translate docs to German? Recently we've updated some parts of CONTRIBUTING.md, HOWTO.md and CODE_OF_CONDUCT.md. See #6301 #5351 and #6724
Please, read contributing guidelines first

I m here, from italian side :).

I'm from Italy too 😃

I m here, from italian side :)

I'm from Italy too 😃

Hey there,
I would love to help :)

Hello, i would like to help too ;)

Hello from Brazil! 🤗
I wanna help too. 😎

Hey buddies!!! Next PR needs help with translations. Take a look into to see what languages are needed

#6824

Hola, saludos desde Colombia!!!
Quiero poder ayudar al propósito de este proyecto. 😎

Hola, saludos desde Colombia!!! Quiero poder ayudar al propósito de este proyecto. 😎

Hi, to start collaborating you can help solve some of these issues: https://github.com/EbookFoundation/free-programming-books/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted"
or help revise the new pull requests so that they meet the contributing guidelines

Hello from Nigeria, I will like to help 😌

I would like to help too. ❤ from India

Hello everyone,
I love the idea of this repo.
amazing idea.

can i help, please add the hacktoberfest label @eshellman @

Hey, @eshellman I speak English and Chinese, and I would love to be an editor. How could I become one?
Also, I think this problem could benefit from improving the CONTRIBUTING guidelines as well. I am happy to work on this if you think it's a good idea.

@torn4dom4n can you look at #7838 ?

@actuallyyun  yes improvements on Contributing would be helpful

@eshellman Thanks for the reply. Should I work on this then?

hi I would like to contribute in Telugu which is my native language and I'm from India

welcome. we have some telagu resources in the courses/free-courses-te.md list

Hello, I'm a student currently learning web development and this repo helps me a lot.
I also added some books. I would like to volunteer here. How can i?

Hello, I'm a student currently learning web development and this repo helps me a lot. I also added some books. I would like to volunteer here. How can i?

Hi, feel free contribute to the Repo by adding any free resources that you find useful.

Can I post cybersecurity contents?

October is really busy here! As I don't have time to look at PR's that don't pass tests, I'm sure many of those participants could use a bit of encouragagement.

With Hacktoberfest coming soon, volunteers will be sorely needed. Mostly we need people willing to help new submitters understand the various rules and policies of the repo. We get lots of first-time submitters, even first-ever PR people. Be nice to them, as a good experience can lead to continuing contributions to open source software in general. So ANYONE can help, once they've read and understood docs/CONTRIBUTING.md  If you are fluent in a language other than English, you can help make new submitters in your language welcome.

I've just posted to the hacktoberfest discord project sharing channel. I'm mostly NOT on discord, so it would be great if some experienced F-P-B contributors could monitor discord for any questions and discussions.

Hello I would love to help and contribute

Thank you to everyone who has added helpful comments to submitted PRs. It has made Hacktoberfest go quite smoothly this year.

Be more than happy to help!!!

We have quite a few PR's that have been abandoned after Hacktoberfest. Sometimes the submitter resubmits and neglects to close the bad PR, sometimes they can't figure out how to fix linting errors, sometimes they ignore comments about how to fix the PR.
If you see a PR to seems abandoned, feel free to add the suggested resources in a new PR (referencing the old one) or leave a comment saying the PR is moot and should be colsed.

We need help to make this repo work. New contributors often need help fitting their contributions into the repo. Feel free to offer help to new contributors, especially if you share a language with them.
New contributors often have trouble getting their PRs to pass tests. Volunteers can help!

Very good

Well

Hello, greetings from India! I would love to contribute to this project and help new contributors with their PRs and tests. Please let me know how I can get started.


markdown generated style ugly for Table Of Content(TOC)

the <li> and table of content without no Indentation

Could you add a screenshot? Is this a problem with grape-swagger-rails or a style in swagger-ui?

Thanks for your reply.
That's not a bug, that's stylesheets problem
I have a markdown note with following:
* TOC
{:toc}

# title 1

## title 1 - content 1

# title 2

## title 2 - content 1

I desired the output like this(Table Of Contents with Indentation):

But actually output (Table Of Contents with no Indentation):

It's a stylesheet bug :)

This was fixed.


Hn/spec2017 gem5 20.1

What's the status of this PR?

Abandoned. #124 updated the tutorial and merged spec 2006 tutorial to spec 2017 tutorial.


Pruned model not able to detect object in image

Hello,
I pruned model yolov5s with 0.1 percent and after that fine tunned with 30 epochs still it is not able to detet object in bus.jpg.
Could you please guide me

@akshay9396 Hi, did you figure out why this happens?


Equalizing margins under "Orders" and "Our Reviews" titles

In the landing page, the margins under "Orders" and "Our Reviews" titles are different. It will look better with same gap between the titles and content. Please assign it to me.

Assigned !! Please verify the responsive thing !!

Thank you @Shybymh


BIGTOP-3312: Fix Ambari build failure as maven repo only accepts http…

…s now
Maven repo has been upgrade to accept https access only.
The URLs defined in ambari pom.xml need to be changed to https.
Change-Id: I77ff02631800cd2ba7abfef071e903262039ee17
Signed-off-by: Jun He<EMAIL_ADDRESS>

While the change worked for me, it is covered by the patch of AMBARI-25334. It might be better to bump Ambari to 2.6.2 or later?

That would be better way. Let me try build on local. If that's OK I'll update this PR

Hi, @iwasakims  Comparing to 2.6.0, 2.6.2 has removed ambari-client and ambari-shell subdir. This means install_ambari.sh and deb/rpm package scripts should also get upgraded. For the purpose of fixing build failure on v1.5, using 2.6.2 or later would be too much.
So I'm thinking leave this patch for current 2.6.0 version for v1.5 release, and create another PR for bumping up to later version (say 2.7.x). What do you think?

Thanks, @JunHe77. I'm +1(non-binding) on the current patch if bumping Ambari is not quick fix. I'll file a follow-up JIRA to bump Ambari without targeting Bigtop 1.5.0.

Thanks, @iwasakims .

Sounds like a plan. Thanks!


[0.9.0] Setting data & status on root span has no impact

Summary
Hi, i've been using the new tracing system from the golang library, good job!
I've been unable to set data & level on a trace, though
Steps To Reproduce
span := sentry.StartSpan(ctx, name)
span.Status = sentry.SpanStatusInternalError

span.Data = map[string]interface{}{
"body":        c.Request().Body,
"path":        c.Path(),
"queryParams": c.QueryParams(),
"paramValues": c.ParamValues(),
}
span.Finish()

Expected Behavior
See the data in the UI
Environment
SDK

sentry-go version: 0.9.0
Go version: 1.15.0
Using Go Modules? yes

Sentry

Using hosted Sentry in sentry.io? no
Using your own Sentry installation? Version: 20.12.1

@Mokto could you confirm that the values you set on Data are JSON-serializable?
To clarify, do you see the transaction event in the UI but without those fields? You can compare by Event ID by setting Debug to true on sentry.Init.

Hi,

Yes I tried with :

span.Data = map[string]interface{}{
"test": "a",
}

Yes I do see the transaction, also child spans are working if I'm using any. + reported by debug: true
It's worth noting that when I set a status on a span, the status is not visible on both the transaction & the span. Status reports empty
About adding some data. I don't see any in the UI, but I'm not sure where to look to be honest!

Ok, I think I have more insight!
I am able to set data & status on any child span, but not on the root span.

The weird thing here is that I'm naming my parent span http but in the UI it always shows the name of the first child span.
Maybe I'm doing something wrong here ?
Thanks!

I'm on mobile only atm, will ask someone for a screenshot of where transaction/span status and data show up. The transaction status is on the right hand side of the screen in Sentry, and the data is towards the bottom of the screen, often requiring a scroll. Individual span info is upon clicking the span as your screenshot above.

I just tried it tracing with NodeJS, and everything works fine, I can see the set status & data on the root span.
I changed my description, the issue is only present on the root span.
And once again, weirdly the name of the root span is replaced by the name of one of the child.
In the NodeJS example they're using startTransaction, which might do something else than startSpan ? Just a wild (and probably wrong) guess.

Got the same issue here,
Also, i note that the root span got the same ID as the latest child span (in @Mokto example, 642f...), and the root ParentSpanID is pointing to an unknown span.
Maybe it can help

#329 should fix the .Data part of this issue
#327 should fix the .Status part


Support multiple HW id per updater

As a user, I'd like to be able to utilize the same updater to send information from different hardware devices.
As a use case, I have a board that collects information coming in from N different peripherals devices. This board is my micro-ROS client and runs a diagnostic_updater. Each peripheral may have up to M valuable information I may want to report up. Thus, I'd like to be able to also indicate to what HW_id a task belongs.
Does this use case make sense?

I'll try to create a PR with a draft for this soon.

Okay, sorry for the delay. I had to go through the documentation of Diagnostics and the RFC to better understand what you're suggesting as I was a little bit confused.

From the REP, the hardware_id is the unique identifier of the hw (serial number). Thus, in the future, we may need to remove the ability to use a lookup table and have a predefined char[max_size] hardware_id. Where max_size can be set as a CMAKE option. My mistake was to think this id actually was simply a component identifier such as "this is a motor", not a "this is THIS specific piece".
Updater, although I'm not a fan of the name, this is what actually indicates what type of component is. Thus, "this is a motor".

So, the current design I think, is on the correct track (except the hardware_id).
What I wanted to do, or have the ability to do is not to be forced to have multiple updaters on my embedded system, rather only one. The main reason why I wanted this, is because the call to rclc_diagnostic_updater_init consumes 375 words out of my stack (quite a bit) while creating a simple publisher only consumes 27 words. This needs to be addressed.
On the other hand, my approach would require more tasks which I believe would be less expensive than creating multiple updaters.
To sum, I think we have to add a few options to the API which I don't think to need to be exclusive

A user predefines(cmake option) how many MAX updaters it will want to have (1->N). Then the user creates one updater per hw component (indicating the hw_id at the same time).
A user predefines(cmake option) how many MAX tasks it may want to have (1->N).
A user may have an updater to send updates for multiple devices. However, for this purpose, the updater shouldn't be init'ed with an id (nor hw id), and the task would carry the updater_id and the hw_id. This leaves a loophole where the user may assign the same ID to an updater and also pass it to a task, however, this should be up to the user to define.

I think having fixed maxima of updaters and tasks via cmake is definitely fair for a uc setup. I also think that a cmake option for the hardware_id (not only it's size) could make sense, as the ID should be fix for one particular uc anyway. don't you think?
I also think that restricting ourselves to one updater (read: micro_ros_diagnostic_updater) per uc is fair. To still simulate/pretend different updaters (read: logical ROS 2 diagnostic updaters), moving the updater ID to the tasks makes sense as well.
I think, though, that we should do either 1.+.2. or 2.+3. to not be too confusing.
So either define max number of updaters and tasks via cmake (so actually allowing several updaters per device) and then having the updater ID in the updater or having just one uros updater per uc and then simulate different logical updaters by moving the updater to the tasks.

I can provide you a live example, we have one uc that concentrates all peripherals from our platform (coming via different protocols), each peripheral has its own hardware_id (read: serial number). Hence, I'd like to pass the hardware_id + updater_id (read: id used to lookup the internal name of the device). However, I'd like to do this utilizing the least amount of memory possible, which seemed to be having X tasks and 1 updater. This would be 2+3 and not 1+2.

Sounds good to me!