Fetching scoped value allocates

Hi, I have a question whether allocations can be avoided in below example:
using ScopedValues

Base.@kwdef struct Baz
    ns::Ref{UInt64} = Ref{UInt64}()
end

const SVBaz = ScopedValue{Baz}()

const SVBaz2 = ScopedValue{Baz}(Baz())

function test1()
    return ScopedValues.get(SVBaz)
end

@time test1()

function test2()
    return ScopedValues.get(SVBaz2)
end

@time test2()

macro with_sv(sv, ex::Expr)
    return quote
        begin
            with(SVBaz => $(esc(sv))) do
                $(esc(ex))
            end
        end
    end
end

macro with_sv2(sv, ex::Expr)
    return quote
        begin
            with(SVBaz2 => $(esc(sv))) do
                $(esc(ex))
            end
        end
    end
end

@with_sv Baz() begin
    @time test1()
end

@with_sv2 Baz() begin
    @time test2()
end

Here's what it returns:
julia> @with_sv Baz() begin
           @time test1()
       end
  0.000003 seconds (1 allocation: 16 bytes)
Some(Baz(Base.RefValue{UInt64}(0x0000000000000000)))

julia> @with_sv2 Baz() begin
           @time test2()
       end
  0.000003 seconds (1 allocation: 16 bytes)
Some(Baz(Base.RefValue{UInt64}(0x0000000000000000)))

Is it possible not to have allocations in this example?

What is versioninfo()?
x-ref: https://github.com/JuliaLang/julia/issues/53584

I pinpointed it to the get function, e.g. if I specialize it like below and have a default value in my scoped var, then this doesn't allocate, probably due to Some always having the same type and not nothing:
function get_baz(val::ScopedValue{Baz})
    # Inline current_scope to avoid doing the type assertion twice.
    scope = current_scope()
    if scope === nothing
        isassigned(val) && return Some(val.default)
        return Some(Baz())
    end
    scope = scope::Scope
    if isassigned(val)
        return Some(Base.get(scope.values, val, val.default)::Baz)
    else
       v = Base.get(scope.values, val, novalue)
       v === novalue || return Some(v::Baz)
    end
    return Some(Baz())
end

Hm, I had some many different versions of this, that I don't quite remember the diffferent tradeoffs here.
if you @inline the ScopedValues.get the allocation should disappear.
I think this may be an ABI inefficiency...
But yeah the Some design ended up more trouble than it's worth.

No luck with @inline, as per:
using ScopedValues

Base.@kwdef struct Baz
    ns::Ref{UInt64} = Ref{UInt64}()
end

const SVBaz = ScopedValue{Baz}()

const SVBaz2 = ScopedValue{Baz}(Baz())

@inline function test1()
    return ScopedValues.get(SVBaz)
end

@time test1()

@inline function test2()
    return ScopedValues.get(SVBaz2)
end

@time test2()

macro with_sv(sv, ex::Expr)
    return quote
        begin
            with(SVBaz => $(esc(sv))) do
                $(esc(ex))
            end
        end
    end
end

macro with_sv2(sv, ex::Expr)
    return quote
        begin
            with(SVBaz2 => $(esc(sv))) do
                $(esc(ex))
            end
        end
    end
end

function new_test()
    @with_sv Baz() begin
        @time test1()
    end
end

function new_test2()
    @with_sv2 Baz() begin
        @time test2()
    end
end

new_test()
new_test2()

julia> new_test()
  0.000002 seconds (1 allocation: 16 bytes)
Some(Baz(Base.RefValue{UInt64}(0x0000000000089804)))

julia> new_test2()
  0.000001 seconds (1 allocation: 16 bytes)
Some(Baz(Base.RefValue{UInt64}(0x00000001024867f0)))

Am I doing it wrong?

 function test1()
    return @inline ScopedValues.get(SVBaz)
end

Didn't know it was possible to inline the return value. But same result, allocations don't disappear.
Btw, I find them only when using Ref in the Baz struct, not otherwise.

I will try to have a look. It may be sensible to add a get(ScopedValue, default) that also allows for providing a function.


Do not compare extra modules in ABI check

Note: python cv2.so libraries are also excluded from comparison because module name (python2 and python3) differs from module folder (python)

It seems to be working as expected
:+1:


Roadmap suggestion

Hi @gernest,
First of all thanks for this project, I find it pretty handy and I find the code structure nice as well. I have a made a few modifications to it to better fit my need, but before I contribute back I'd like to discuss my ideas with you.
Features I already added:

Enabled various HTTP Methods.
Enabled imitating errors by optionally providing response code probabilities.
Make 201 the default response code for POST calls to make it more REST-compliant (http://www.restapitutorial.com/lessons/httpmethods.html)

Features I'm considering adding:

Reading an initial set of endpoints from a directory based on a CLI flag / Environment variable. (Currently I call a bash file on startup that will create the endpoints via curl, not the nicest workaround)
Reading a swagger file and creating endpoints automatically. (This might be out of scope, but I'd find it useful.)
Adding optional request validation based on the swagger file read previously. (I'm least sure about this one, but this would potentially make the error imitation
Support for more API frameworks.

What are your thoughts?
In case you wondered, this is how my API structure currently looks:
// API is the struct for the json object that is passed to apidemic for registration.
type API struct {
	Endpoint                  string                 `json:"endpoint"`
	HTTPMethod                string                 `json:"http_method"`
	ResponseCodeProbabilities map[int]int            `json:"response_code_probabilities"`
	Payload                   map[string]interface{} `json:"payload"`
}

(Changes so far are 100% backwards compatible)

Hey, thanks for feedback. I think the changes are good. So, we will need to breakdown, and implement the features incrementally in small patches to allow me to do review.
More discussion will be held on the patches (PR) since this is rather a long list and it is easy to miss  small details.
One thing, can you expand more about ResponseCodeProbabilities and why do we need it?
How about we start with number 3?
Looking forward to your PR.

I'm very pleased with you being so available.Thank you!
Well, depending on which #3 your suggesting it might not make sense without #1 or #2. :)
I need ResponseCodeProbabilities to be able to test error handling on my UI.
I"ll split my changes to 1+3 and 2 for the ones I already have to make it easier for you to review. Then I'll add PR for #1 from the proposed

Btw, I have one more feature request which is not super mandatory but could be handy: being able to change the endpoints on the fly. Right now we just reject repeated registrations for the same endpoint.

Uh! I see. I get it now. I agree, we can change the registration object to reflect on which method the response should match.
So, I think ResponseCodeProbabilities will be an overkill for now.
type API struct {
	Endpoint                  string                 `json:"endpoint"`
	HTTPMethod                string                 `json:"http_method"`
	Payload                   interface{}            `json:"payload"`
}

Looks much convenient , we don't want to limit the payload to map[sting]interface{} there are cases you want to serve array of objects instead of maps.

Btw, I have one more feature request which is not super mandatory but could be handy: being able to change the endpoints on the fly. Right now we just reject repeated registrations for the same endpoint

Lets go slowly, one feature at a time. Maybe you can open a separate Issue for each feature so it can be easily discussed/tracked

Looks much convenient , we don't want to limit the payload to map[sting]interface{} there are cases you want to serve array of objects instead of maps.

Well this sounds fine to me in general but not something I need right now.

Hi @gernest, thanks for the quick code reviews so far. I just wanted to let you know that I'll stop working on the project for now until further feedback. What exists as a PR already covers all my current needs and I think if you'd prefer to keep this project simple, swagger support can even go into a different project which would use apidemic under the hood.

@peteraba thanks for the contribution. Glad you find this project useful.

So I kind of had to create two new PRs to fulfill my needs:

I needed UUID generation, but added some number and boolean generation on the way
I needed to be able to return lists (as you mentioned above).

With these PRs in place I think I'll have everything I need for now.

Thanks a lot for helping me out. I'm happy that someone finds this useful

@gernest and I thank you for the fast responses. It's been a very smooth experience to contribute so far!


pubsub: canonize Go samples

Following https://github.com/GoogleCloudPlatform/golang-samples/blob/master/CONTRIBUTING.md

moved regions into separate files, included imports within regions
changed logs to io writers, changed return err to return fmt.errorf
delete functions without region tags not found in codesearch
add package comment
add/modify function comments and parameter examples

Can you provide a PR description please. Thanks!

Did you run the tests locally? They're failing because of functions being redeclared (probably from the original sample file). Probably need to do the freeze dance.

I commented out the old files and they passed the tests, then uncommented for the commit

Code should always compile and tests should always pass. Let's delete the old sample file, hold off on this PR, freeze the sample versions, submit this PR, then unfreeze the sample versions.

Looks like some tests are failing. Will you take a look?
subscription_test.go:82: CreateTopic: rpc error: code = AlreadyExists desc = Resource already exists in the project (resource=golang-samples-tests-9-test-topic).

subscription_test.go:176: CreateSubscription: rpc error: code = AlreadyExists desc = Resource already exists in the project (resource=golang-samples-tests-7-test-sub).

topics_test.go:67: failed to create a topic: CreateTopic: rpc error: code = AlreadyExists desc = Resource already exists in the project (resource=golang-samples-tests-7-test-topic).

Probably need to create/delete the topics/subscriptions in each test, as needed, so they can be run independently and in any order.

Everything passes for me, I tried changing it though so let me know if it works for you now


Support Node >= v12.x

Currently we only support v12.x which prints the following error on installation for any version greater (or less) than that:
npm WARN notsup Unsupported engine for<EMAIL_ADDRESS>wanted: {"node":"12.x"} (current: {"node":"14.3.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm<EMAIL_ADDRESS>

Closed by #4.


Improvements to native-comp support

Adds ahead-of-time compilation of all packages on load-path, ensuring all core and site Elisp is actually native-compiled.
Exports comp-deferred-compilation-black-list to runtime, bringing us one step closer to properly supporting deferred compilation.
WARNING: There are currently some upstream bugs which makes testing this PR difficult:

Ensure that ~/.emacs.d/eln-cache exists.
Run emacs -q, wait for async compilations to finish.
Ensure that ~/.emacs.d/.local/cache/eln exists.
Run doom sync.
Run doom build -r, kill it when it hangs on "Waiting for NNN async jobs".
Run doom build -r again, it will work this time, wait until it finishes.
Run doom build -r again, it should have nothing to rebuild.
Run emacs!

Thanks!


BindValidation throws System.NotSupportedException

Describe the bug

When calling this.BindValidation on a ReactiveUserControl, it throws the exception:
System.NotSupportedException : 'Index expressions are only supported with constants.'
Steps To Reproduce

Follow: https://www.reactiveui.net/docs/handbook/user-input-validation/
And at the end, the bindValidation will throw an error.
Expected behavior

It should not throw an error and just bind correctly
Code

ConnectView:
public partial class ConnectView : ReactiveUserControl<ConnectViewModel> {

        public ConnectView() {
            InitializeComponent();

            // Input validation
            this.WhenActivated(disposables => {

                this.BindValidation(ViewModel, viewModel => viewModel.Username, view => view.FindControl<TextBlock>("UsernameError").Text).DisposeWith(disposables);

            });

        }

        private void InitializeComponent() {
            AvaloniaXamlLoader.Load(this);
        }

    }

ConnectViewModel:
public class ConnectViewModel : ReactiveObject, IValidatableViewModel {

        public ValidationContext ValidationContext { get; } = new ValidationContext();

        [Reactive] public string Username { get; set; } = "";
        [Reactive] public string Password { get; set; } = "";

        public ConnectViewModel() {

            // Username cannot be empty
            this.ValidationRule(viewModel => viewModel.Username, username => !string.IsNullOrEmpty(username), "Username cannot be empty..");

        }

    }

And of course I have a TextBlock with the x:Name attribute with a value of "UsernameError".
Additional context
I am using Avalonia.
Thanks for your help!

this.BindValidation(ViewModel, viewModel => viewModel.Username, view => view.FindControl<TextBlock>("UsernameError").Text).DisposeWith(disposables);
You can't do complex methods in the expression. You have FindControl. Just point towards a property only.

E.g. if you modify your ConnectView as such:
public partial class ConnectView : ReactiveUserControl<ConnectViewModel> {
    public ConnectView() {
        InitializeComponent();
        this.WhenActivated(disposables => {
            // Note the change in the third argument passed to BindValidation.
            this.BindValidation(ViewModel, vm => vm.Username, v => v.UsernameError.Text)
                .DisposeWith(disposables);
        });
    }

   private TextBlock UsernameError => this.FindControl<TextBlock>("UsernameError");

    private void InitializeComponent() {
            AvaloniaXamlLoader.Load(this);
    }
}

Your example will work, as this change makes the view expression understandable to ReactiveUI.Validation. See https://docs.microsoft.com/ru-ru/dotnet/api/system.linq.expressions.expression?view=net-5.0 and https://www.reactiveui.net/docs/handbook/data-binding/#types-of-bindings for more info regarding expressions and their role in ReactiveUI code-behind bindings.
A general recommendation is to always declare references to Avalonia controls as such:
private TextBlock UsernameError => this.FindControl<TextBlock>("UsernameError");

And the good news is that there's a library called Avalonia.NameGenerator that will generate such references automatically. See documentation and generated code examples for more info.

Thank you so much guys!
It's working when I just create a property that call the FindControl method.
And yes I've seen that there is Avalonia.NameGenerator package, and I was wanting to use it afterwards (but because it was not working with the FindControl I didn't check with the NameGenerator package).
Wasn't knowing that calling a method right here could break everything.
Thank you again! I close this.


Update FA versions in all environments

This can be done manually or via Terraform - but we need to make sure each FA (and the candidate slot) are at v4
Docs

Migrate apps from Azure Functions version 3.x to version 4.x

All functionApps ae now running on Version 4 already


Adding purge schemas plugin

PR for adding a plugin deleting all schemas

@brianstrauch updated per comments

@brianstrauch reformatted the text in question to one line

@brianstrauch - rebased this PR and updated for all comments
\cc @davetroiano @sgagniere

@brianstrauch comments addressed


Lo2 -Truthy and Falsy Values

A relatively helpful topic when covering boolean types and logical operators is the understanding of what values evaluate to true or false.

I merged this and then edited somewhat, because I think the code example is too advanced for this part of the lectures. Hope that is okay.


Release 0.8.0, bump four APIs to beta

As part of this, introducing some new pom properties:

core.version: version of google-cloud-core
beta.version: version used by beta APIs (which is the project
version plus -beta)
storage.version: the version of google-cloud-storage (since
several APIs depend on it)

Lastly, removing "(Alpha)" from titles in README files except
the root README file, because it's hard to keep all those
tags up to date.

Coverage remained the same at 83.528% when pulling 4a115620ff06b213fb1dd11e27a652a43b985362 on garrettjonesgoogle:master into 0eb14ec432a10c8994bdbef7674bca556aa63b4b on GoogleCloudPlatform:master.


Missing method Illuminate\Contracts\Events\Dispatcher::subscribe

Method is used on the EventServiceProvider but only declared in the implementation, not in the contract.

Pull request: https://github.com/laravel/framework/pull/9133


⚠ GitLab Server has degraded performance

In 19508f1, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 7498 ms

Resolved: GitLab Server performance has improved in a1aa9b1.


moldraw2DTest1 failure when building on aarch64

Describe the bug
moldraw2DTest1 fails when building on aarch64 Raspberry Pi OS.
To Reproduce
Hi,
I am trying to build the 2022_09_3 RDKit release on aarch64 (Raspberry Pi OS 64 bit, based on Debian 11).
After building, all tests pass except for one test: moldraw2DTest1. Here are my cmake settings (popcnt off as cmake reported that it was not available on aarch64)
cmake \
 -DRDK_BUILD_INCHI_SUPPORT=ON \
 -DRDK_BUILD_AVALON_SUPPORT=ON \
 -DRDK_BUILD_CAIRO_SUPPORT=ON \
 -DRDK_OPTIMIZE_POPCNT=OFF \
 ..

And here is a snippet of the relevant verbose output of ctest on moldraw2DTest1:
139:  ----------------- Test Github 3305 - change and scale line widths.
139: file testGithub3305_1.png gave hash 255418450U not the expected 316930677U
139: file testGithub3305_2.png gave hash<PHONE_NUMBER>U not the expected<PHONE_NUMBER>U
139: file testGithub3305_3.png gave hash 970935540U not the expected<PHONE_NUMBER>U
139: file testGithub3305_4.png gave hash 667377464U not the expected 411486117U
139: [03:56:23]
139:
139: ****
139: Test Assert
139: Expression Failed:
139: Violation occurred on line 4318 in file /home/pi_test/Downloads/rdkit-Release_2022_09_3/Code/GraphMol/MolDraw2D/test1.cpp
139: Failed Expression: std::regex_search(text, bondMatch, regex) == 1
139: ****
139:
139: terminate called after throwing an instance of 'Invar::Invariant'
139:   what():  Expression Failed:
1/1 Test #139: moldraw2DTest1 ...................Child aborted***Exception:  12.19 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =  12.22 sec

The following tests FAILED:
	139 - moldraw2DTest1 (Child aborted)

Looking at the test1.cpp file around line 4318, https://github.com/rdkit/rdkit/blob/master/Code/GraphMol/MolDraw2D/test1.cpp, it looked like maybe turning of freetype support may work, however I recieved the same error with disabling freetype in another build:
 -DRDK_BUILD_FREETYPE_SUPPORT=OFF \

Then, since it was failing on a regex_search, I tried to build with boost regex instead, but the same moldraw2DTest1 failed:
 -DRDK_USE_BOOST_REGEX=ON \

This led me to believe that regex is working correctly, and the test is actually failing. I inspected the testGitHub3305_4.svg file (which is what I believe the following regex in test1.cpp is looking at):
test1.cpp, line 4316:
 R"regex(class='bond-6 atom-6 atom-7' d='M 138.\d+,116.\d+ L 141.\d+,116.\d+.* Z' .*FF7F7F.*stroke-width:0.0px)regex");

And here are the 3 lines in the build output testGitHub3305_4.svg that start with class='bond-6:
<path class='bond-6 atom-6 atom-7' d='M 141.9,116.8 L 134.7,129.2 L 133.1,126.5 L 138.7,116.8 Z' style='fill:#FF7F7F;fill-rule:evenodd;fill-opacity:1;stroke:#FF7F7F;stroke-width:0.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;' />
<path class='bond-6 atom-6 atom-7' d='M 140.3,116.8 L 133.9,127.8' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path class='bond-6 atom-6 atom-7' d='M 138.1,116.8 L 132.8,125.9' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />

I don't think any of those match the expected regex pattern and that this might be a bug.
Many thanks,
Vin
Expected behavior
I expected moldraw2DTest1 to pass.
Screenshots
I have attached the output testGitHub3305_4.svg from the build.

Configuration (please complete the following information):

RDKit version: 2022_09_3
OS: Raspberry Pi OS 64 bit
Python version (if relevant): 3.9.2
Are you using conda? No
If you are using conda, which channel did you install the rdkit from? N/A
If you are not using conda: how did you install the RDKit? building, details above.

Additional context
N/A

Hi @vfscalfani,
You do get small numerical differences in the output of the drawing code. The regex is supposed to allow for enough slack that differences below 1 drawing unit don’t cause a failure. In this case it looks like that’s not happening. I’ll take a look at it in the next few days. The crucial thing is that the drawing looks correct. A failing test isn’t a good thing, though.
I don’t have access to a raspberry pi, but I’ll see if the test can be improved.
thanks,
Dave

Hi @DavidACosgrove
Thanks for your reply, that makes sense. I'm happy to test any changes if that would help.
Vin

Hi @vfscalfani,
I think I have fixed the test.  It was a classic case of "all the right notes, not necessarily in the right order" (obscure UK cultural reference : https://vimeo.com/479336770).  The convex hull algorithm that is used to create the rectangle for the highlights was returning the corners of the rectangle in a different order for your file, so the regex failed.  It now checks for the correct corners in any order.  That might mean a non-rectangular shape will pass the test, but we can cross that bridge later if necessary.
The emended code is at https://github.com/DavidACosgrove/rdkit/tree/Github5899.  If you could try it on your raspberry pi  that would be great.  It seems pointless doing the PR until we know it has fixed your problem.
Best,
Dave

Hi @DavidACosgrove This is great! Yes, I just built with the new code on my Raspberry Pi and moldraw2DTest1 passed (as well as all other tests). That was with Freetype support. I'm running a build now without Freetype support just in case. It does not look like that should matter, but probably good to check anyway. I will report back on that tomorrow (a build and testing takes about 4 hours on the Pi 400). Thanks a lot for fixing this.
Vin

Okay, all tests pass with and without Freetype support. Thanks again @DavidACosgrove

Hi Vin,
Thanks for running the tests and letting me know. I’ll do the PR.
Best,
Dave
On Sat, 31 Dec 2022 at 16:02, Vincent F. Scalfani @.***>
wrote:

Okay, all tests pass with and without Freetype support. Thanks again
@DavidACosgrove https://github.com/DavidACosgrove
—
Reply to this email directly, view it on GitHub
https://github.com/rdkit/rdkit/issues/5899#issuecomment-1368245905, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACGF2FVQJGLWS6PVTXAEBY3WQBKKNANCNFSM6AAAAAATJTAW5U
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
David Cosgrove
Freelance computational chemistry and chemoinformatics developer
http://cozchemix.co.uk


Add voting and tallying

[ ] CHANGELOG entry
[ ] Create interface TextProposal { text: string } in ProposalOption to better match the backend structure

If I am not missing something, this closes #960

+3 commits, starting with "Fix typo: tallyed -> tallied"


"English" link

Hello
The link "English" in the README is broken:

It would be great if that page could be found again.
Thank you.

@d6y Ok I will try to write a English documention later, but I thinik I won't release it to maven center because this repo will juest be a little function in https://github.com/scalax/fsn
If any one wan to use hf,just copy these 3 scala files to your project is OK.


Offer Expiration doesn't work according to specification

I've been setting a 30 second expiration on the offers I create, but they keep lingering in the ledger, so I need to manually cancel them.
    offerCreate.expiration(UInt32(get30SecondExpiration()))

...

    private const val RIPPLE_EPOCH_SECONDS_AFTER_UNIX_EPOCH = 946684800L

    fun get30SecondExpiration(): Long {
        val currentTimeInSecondsSinceUnixEpoch = System.currentTimeMillis() / 1000L
        return currentTimeInSecondsSinceUnixEpoch - RIPPLE_EPOCH_SECONDS_AFTER_UNIX_EPOCH + 30L
    }

It is expired and will never filled, it will be canceled when other tx want fill it.

I'm sorry to say it, but you're gonna have to learn english a little bit better.
I don't understand what you mean.
Do you mean that expired offers are visible forever on the ledger? And that they can be looked up with the command 'account_offers' to the end of time? That sounds incredibly expensive data-wise over time and sounds like a design error.
Also ... when an offer is fulfilled ... I hope internally something different happens than when the offer is cancelled.

Please quote the part of the specification that is violated in your opinion.

The specification is not violated.
https://xrpl.org/offers.html#offer-expiration
But it would be cleaner to delete non-fulfilled expired offers immediately after expiry.
Not to mention all the data you'd save pushing all over the network ... there is no reason to keep those ... from my point-of-view ... perhaps you have a different opinion?

But it would be cleaner to delete non-fulfilled expired offers immediately after expiry.

The explanation why this is not possible currently is also included in the link you gave. Generally data is deduplicated, so there's not much network traffic because of expired offers. A larger concern might be state inflation, but I'd like to see actual numbers for that to call it an actual problem.

I'm sorry to say it, but you're gonna have to learn english a little bit better.
I don't understand what you mean.
Do you mean that expired offers are visible forever on the ledger? And that they can be looked up with the command 'account_offers' to the end of time? That sounds incredibly expensive data-wise over time and sounds like a design error.
Also ... when an offer is fulfilled ... I hope internally something different happens than when the offer is cancelled.
Please be considerate and polite in your responses, even if you disagree with someone else. Also please be mindful that this project is international in nature and although English may feel like it is the lingua franca in the coding space, the reality is that contributors come from walks of life and all corners of the world. Let’s all work together to make this project inclusive and fun to work on!

But it would be cleaner to delete non-fulfilled expired offers immediately after expiry.

The only way the ledger gets modified is through transactions. This why for example Escrows are not automatically resolved when their 'Finish' or 'Close' time transpires, they require EscrowFinish and EscrowCancel transactions to release the funds. For the same reason expired offers do not disappear until cancelled by OfferCancel or overwritten by OfferCreate (specifying offer_sequence)

Sorry for my impolite response @yxxyun
@movitto does this mean that expired offers will stay on the ledger forever if no-one cancels them explicitly via. another transaction?

Not movitto, but yes.

Um, also not movitto, but it depends on what you mean by "explicitly via another transaction".  For example, if a Payment or OfferCreate transaction attempts to use an offer and discovers that offer is expired, then that transaction will make a best effort at removing the expired offer from the ledger.  There are rare circumstances where that doesn't happen, but I think that's too far down in the weeds for this question.
So, yes, a transaction must be involved in removing the offer.  But it depends on your world view as to whether attempting to consume an expired offer is an explicit operation.

That is quite interesting @scottschurr - thank you for the detailed explanation

Scott is correct. This is also explained the documentation:

Note:
Since only new transactions can modify the ledger, an expired offer can stay on the ledger after it becomes inactive. The offer is treated as unfunded and has no effect, but it can continue to appear in results (for example, from the ledger_entry command). Later on, the expired offer can get finally deleted as a result of another transaction (such as another OfferCreate) if the server finds it while processing.

https://xrpl.org/offers.html#offer-expiration
I believe that resolves this issue. If not, you can open a new issue as needed.


build with ros-noetic

Hi Carlos,
Thank you for providing this good package, but here I have a problem when build the package with ros-noetic.
I have install your customized PCL library but I still get this error, do you have any idea?
[ 30%] Building CXX object dynamic_robot_localization/CMakeFiles/drl_common.dir/src/common/registration_visualizer.cpp.o
In file included from /usr/include/boost/detail/endian.hpp:9,
                 from /usr/local/include/pcl-1.8/pcl/PCLPointCloud2.h:11,
                 from /usr/local/include/pcl-1.8/pcl/pcl_base.h:55,
                 from /usr/local/include/pcl-1.8/pcl/registration/registration.h:45,
                 from /home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/include/dynamic_robot_localization/common/registration_visualizer.h:41,
                 from /home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/include/dynamic_robot_localization/common/impl/registration_visualizer.hpp:39,
                 from /home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/src/common/registration_visualizer.cpp:43:
/usr/include/boost/predef/detail/endian_compat.h:11:161: note: #pragma message: The use of BOOST_*_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please include <boost/predef/other/endian.h> and use BOOST_ENDIAN_*_BYTE instead
   11 | ORDER is deprecated. Please include <boost/predef/other/endian.h> and use BOOST_ENDIAN_*_BYTE instead")
      |                                                                                ^

In file included from /home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/src/common/registration_visualizer.cpp:43:
/home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/include/dynamic_robot_localization/common/impl/registration_visualizer.hpp: In instantiation of ‘bool dynamic_robot_localization::RegistrationVisualizer<PointSource, PointTarget>::setRegistration(pcl::Registration<PointSource, PointTarget>&) [with PointSource = pcl::PointXYZRGBNormal; PointTarget = pcl::PointXYZRGBNormal]’:
/home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/src/common/registration_visualizer.cpp:52:1:   required from here
/home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/include/dynamic_robot_localization/common/impl/registration_visualizer.hpp:70:2: error: no matching function for call to ‘pcl::Registration<pcl::PointXYZRGBNormal, pcl::PointXYZRGBNormal, float>::registerVisualizationCallback(std::function<void(const pcl::PointCloud<pcl::PointXYZRGBNormal>&, const std::vector<int>&, const pcl::PointCloud<pcl::PointXYZRGBNormal>&, const std::vector<int>&)>&)’
   70 |  registration.registerVisualizationCallback(this->update_visualizer_);
      |  ^~~~~~~~~~~~
In file included from /home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/include/dynamic_robot_localization/common/registration_visualizer.h:41,
                 from /home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/include/dynamic_robot_localization/common/impl/registration_visualizer.hpp:39,
                 from /home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/src/common/registration_visualizer.cpp:43:
/usr/local/include/pcl-1.8/pcl/registration/registration.h:380:7: note: candidate: ‘template<class FunctionSignature> bool pcl::Registration<PointSource, PointTarget, Scalar>::registerVisualizationCallback(boost::function<FunctionSignature>&) [with FunctionSignature = FunctionSignature; PointSource = pcl::PointXYZRGBNormal; PointTarget = pcl::PointXYZRGBNormal; Scalar = float]’
  380 |       registerVisualizationCallback (boost::function<FunctionSignature> &visualizerCallback)
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pcl-1.8/pcl/registration/registration.h:380:7: note:   template argument deduction/substitution failed:
In file included from /home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/src/common/registration_visualizer.cpp:43:
/home/rentao/wheel/develop/tiradar/src/dynamic_robot_localization/include/dynamic_robot_localization/common/impl/registration_visualizer.hpp:70:2: note:   ‘std::function<void(const pcl::PointCloud<pcl::PointXYZRGBNormal>&, const std::vector<int>&, const pcl::PointCloud<pcl::PointXYZRGBNormal>&, const std::vector<int>&)>’ is not derived from ‘boost::function<Signature>’
   70 |  registration.registerVisualizationCallback(this->update_visualizer_);
      |  ^~~~~~~~~~~~
make[2]: *** [dynamic_robot_localization/CMakeFiles/drl_common.dir/build.make:193: dynamic_robot_localization/CMakeFiles/drl_common.dir/src/common/registration_visualizer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:7231: dynamic_robot_localization/CMakeFiles/drl_common.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j8 -l8" failed

Hello,
From your log, it seems that cmake is loading the system version of pcl (version 1.8), instead of my fork of pcl (version 1.11).
Please check that you have the last commit of my fork of pcl (do a git pull on branch master-all-pr):
https://github.com/carlosmccosta/pcl
Then compile my fork of pcl inside your catkin workspace (this way it overrides the system version of pcl) and confirm that when you do roscd pcl, it goes to the src folder of my fork of pcl.
I made install scripts to make it easier to install drl:
https://github.com/carlosmccosta/dynamic_robot_localization#installation-from-source
https://github.com/carlosmccosta/dynamic_robot_localization/blob/melodic-devel/install/e_build.bash
You can check if my fork of pcl is being selected by catkin with (check if PKG_CONFIG_PATH has my pcl fork folder):
catkin build --get-env dynamic_robot_localization

For confirming that the .so libraries from my fork of pcl were linked with drl, you can use ldd:
ldd $HOME/catkin_ws/devel_release/lib/dynamic_robot_localization/drl_localization_node | grep pcl

Have a nice day :)

yes, this works. thank you. Have a nice day :)


P2P and nginx ports

name: Question about Dragonfly
about: Ask whatever you want to know or confusion about Dragonfly
Question

When P2P shares partitions, it is desirable to specify ports. There are walls between hosts in the production environment, and random ports are inconvenient.

// 1.p2p共享分块时，希望能够指定端口，生产环境主机之间有墙，随机端口不方便

I don't understand that port 8001 of nginx in supernode points to repo directory and 8002 points to Tomcat service (proxy_pass http://<IP_ADDRESS>:8080;). The client's registration port is 8001, and the download port is 8002, which is not very clear (or is my setup incorrect?)

// 2.有一点我不明白，supernode中nginx的8001端口指向repo目录，8002指向了tomcat服务（proxy_pass http://<IP_ADDRESS>:8080;）。而客户端的注册端口是8001，下载端口是8002，不是很理解（还是我设置有误？）

It is hoped that 8001 and 8002 ports can also be changed, and port occupancy may occur.

// 3.希望8001和8002端口也能改变，可能出现端口占用情况。

When P2P shares partitions, it is desirable to specify ports. There are walls between hosts in the production environment, and random ports are inconvenient.

In fact, we've put it on our to-do list.  And we will update it in the next version.

I don't understand that port 8001 of nginx in supernode points to repo directory and 8002 points to Tomcat service (proxy_pass http://<IP_ADDRESS>:8080;). The client's registration port is 8001, and the download port is 8002, which is not very clear (or is my setup incorrect?)

The client's registration port  is 8001 https://github.com/dragonflyoss/Dragonfly/blob/master/dfget/core/api/supernode_api.go#L40

It is hoped that 8001 and 8002 ports can also be changed, and port occupancy may occur.

This feature will also be added in the next release.
Thank you very much for your suggestion. Please allow me to update your issue title to feature request. 😄

For now, you can start your upload server before using dfget to download.  And you can use command dfget server  to do that. For more details, you can run dfget server -h.
FYI. Related PR: #326 #600

I also add a new FAQ item here https://github.com/dragonflyoss/website/pull/39.

All problems have been solved. So close it now.
And please open a new issue if you have any more questions,


Reestablish warning on duplicate column in query.

Closes https://github.com/spring-projects/spring-data-relational/issues/1680

Made the changes requested by the review and merged.


Tolerate blanks in line continuations after the backslash

This was reported here: https://github.com/semgrep/semgrep/issues/9539
A dockerfile like the following is tolerated by docker but not by tree-sitter-dockerfile:
FROM ubuntu

# blanks (spaces or tabs) after the backslash:
RUN \
echo hello

I don't see it documented at https://docs.docker.com/reference/dockerfile/#format
It is unusual for users to expect this to work but it happens by accident and their dockerfiles work as intended, so we may have to support it.

I think I just fixed this actually. Will get a release out as soon as I can

Fantastic. Thank you!

Should be good to go in v0.2.0. Thanks for the report!


Update name and location of nginx-ingress chart

Description

ref: https://github.com/alexellis/arkade/issues/104
Motivation and Context

[X] I have raised an issue to propose this change (required)

How Has This Been Tested?

Types of changes

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

Checklist:

[X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I've read the CONTRIBUTION guide
[ ] I have signed-off my commits with git commit -s
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

[ ] I have tested this on arm, or have added code to prevent deployment

How Has This Been Tested?

Please could you help me out here 😄
Build a local binary, then:

Create a KinD cluster
Test the old alias still works
Delete cluster
Create a KinD cluster
Test the new name works

That should do it.

Test with new name:

kind create cluster
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.18.2) 🖼
 ✓ Preparing nodes 📦
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Not sure what to do next? 😅  Check out https://kind.sigs.k8s.io/docs/user/quick-start/
 aledbf@me  ~/.../aledbf/arkade   master ●  arkade install ingress-nginx
Using kubeconfig: /home/aledbf/.kube/config
Using helm3
Client: x86_64, Linux
2020/05/04 11:27:34 User dir established as: /home/aledbf/.arkade/
"ingress-nginx" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈
Chart path:  /tmp/charts
VALUES values.yaml
Command: /home/aledbf/.arkade/bin/helm3/helm [upgrade --install ingress-nginx ingress-nginx/ingress-nginx --namespace default --values /tmp/charts/ingress-nginx/values.yaml]
Release "ingress-nginx" does not exist. Installing it now.
NAME: ingress-nginx
LAST DEPLOYED: Mon May  4 11:27:41 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
The ingress-nginx controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace default get services -o wide -w ingress-nginx-controller'

An example Ingress that makes use of the controller:

  apiVersion: networking.k8s.io/v1beta1
  kind: Ingress
  metadata:
    annotations:
      kubernetes.io/ingress.class: nginx
    name: example
    namespace: foo
  spec:
    rules:
      - host: www.example.com
        http:
          paths:
            - backend:
                serviceName: exampleService
                servicePort: 80
              path: /
    # This section is only required if TLS is to be enabled for the Ingress
    tls:
        - hosts:
            - www.example.com
          secretName: example-tls

If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:

  apiVersion: v1
  kind: Secret
  metadata:
    name: example-tls
    namespace: foo
  data:
    tls.crt: <base64 encoded cert>
    tls.key: <base64 encoded key>
  type: kubernetes.io/tls
=======================================================================
= ingress-nginx has been installed.                                   =
=======================================================================

# If you're using a local environment such as "minikube" or "KinD",
# then try the inlets operator with "arkade install inlets-operator"

# If you're using a managed Kubernetes service, then you'll find
# your LoadBalancer's IP under "EXTERNAL-IP" via:

kubectl get svc ingress-nginx-controller

# Find out more at:
# https://github.com/kubernetes/ingress-nginx/tree/master/charts/ingress-nginx

Thanks for using arkade!

k get pods -A
NAMESPACE            NAME                                         READY   STATUS    RESTARTS   AGE
default              ingress-nginx-controller-55f4556f54-rzv2j    1/1     Running   0          45s
kube-system          coredns-66bff467f8-b65km                     1/1     Running   0          63s
kube-system          coredns-66bff467f8-g9bkj                     1/1     Running   0          63s
kube-system          etcd-kind-control-plane                      1/1     Running   0          74s
kube-system          kindnet-r2h7r                                1/1     Running   0          63s
kube-system          kube-apiserver-kind-control-plane            1/1     Running   0          74s
kube-system          kube-controller-manager-kind-control-plane   1/1     Running   0          74s
kube-system          kube-proxy-9smdv                             1/1     Running   0          63s
kube-system          kube-scheduler-kind-control-plane            1/1     Running   0          73s
local-path-storage   local-path-provisioner-bd4bb6b75-jt489       1/1     Running   0          63s

Test with old name (alias):
kind create cluster
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.18.2) 🖼
 ✓ Preparing nodes 📦
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Have a nice day! 👋
 aledbf@me  ~/.../aledbf/arkade   master ●  arkade install nginx-ingress
Using kubeconfig: /home/aledbf/.kube/config
Using helm3
Client: x86_64, Linux
2020/05/04 11:29:56 User dir established as: /home/aledbf/.arkade/
"ingress-nginx" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈
Error: Get https://github.com/kubernetes/ingress-nginx/releases/download/ingress-nginx-2.0.3/ingress-nginx-2.0.3.tgz: dial tcp <IP_ADDRESS>:443: i/o timeout
Error: exit code 1
 ✘ aledbf@me  ~/.../aledbf/arkade   master ●  arkade install nginx-ingress
Using kubeconfig: /home/aledbf/.kube/config
Using helm3
Client: x86_64, Linux
2020/05/04 11:30:33 User dir established as: /home/aledbf/.arkade/
"ingress-nginx" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈
Chart path:  /tmp/charts
VALUES values.yaml
Command: /home/aledbf/.arkade/bin/helm3/helm [upgrade --install ingress-nginx ingress-nginx/ingress-nginx --namespace default --values /tmp/charts/ingress-nginx/values.yaml]
Release "ingress-nginx" does not exist. Installing it now.
NAME: ingress-nginx
LAST DEPLOYED: Mon May  4 11:30:38 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
The ingress-nginx controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace default get services -o wide -w ingress-nginx-controller'

An example Ingress that makes use of the controller:

  apiVersion: networking.k8s.io/v1beta1
  kind: Ingress
  metadata:
    annotations:
      kubernetes.io/ingress.class: nginx
    name: example
    namespace: foo
  spec:
    rules:
      - host: www.example.com
        http:
          paths:
            - backend:
                serviceName: exampleService
                servicePort: 80
              path: /
    # This section is only required if TLS is to be enabled for the Ingress
    tls:
        - hosts:
            - www.example.com
          secretName: example-tls

If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:

  apiVersion: v1
  kind: Secret
  metadata:
    name: example-tls
    namespace: foo
  data:
    tls.crt: <base64 encoded cert>
    tls.key: <base64 encoded key>
  type: kubernetes.io/tls
=======================================================================
= ingress-nginx has been installed.                                   =
=======================================================================

# If you're using a local environment such as "minikube" or "KinD",
# then try the inlets operator with "arkade install inlets-operator"

# If you're using a managed Kubernetes service, then you'll find
# your LoadBalancer's IP under "EXTERNAL-IP" via:

kubectl get svc ingress-nginx-controller

# Find out more at:
# https://github.com/kubernetes/ingress-nginx/tree/master/charts/ingress-nginx

Thanks for using arkade!
 aledbf@me  ~/.../aledbf/arkade   master ●  k get pods -A
NAMESPACE            NAME                                         READY   STATUS    RESTARTS   AGE
default              ingress-nginx-controller-55f4556f54-g9b7l    1/1     Running   0          27s
kube-system          coredns-66bff467f8-r4s9s                     1/1     Running   0          82s
kube-system          coredns-66bff467f8-r5gpb                     1/1     Running   0          82s
kube-system          etcd-kind-control-plane                      1/1     Running   0          93s
kube-system          kindnet-7rq2q                                1/1     Running   0          81s
kube-system          kube-apiserver-kind-control-plane            1/1     Running   0          93s
kube-system          kube-controller-manager-kind-control-plane   1/1     Running   0          93s
kube-system          kube-proxy-zkt4c                             1/1     Running   0          81s
kube-system          kube-scheduler-kind-control-plane            1/1     Running   0          93s
local-path-storage   local-path-provisioner-bd4bb6b75-524hz       1/1     Running   0          82s


Loading more images at end of gallery

In my application,by default I show 10 images and when I go to the last image, I would like to load additional images from remote server and append to gallery.
How do I know if I have reached the last image of the gallery? Are there any methods available?
Currently I am using Slide-Box of Ionic and it works fine. but I want to replace it with your library.

As it is now, I don't think you can. You would probably need to run a function passed trough the scope (Or broadcast an event... not sure which one would be the best approach) and execute it when the last image of the array was loaded on the 3rd slice (Because we would need to render the next image when the last image becomes visible)
From the top of my head, this would be the first thing to try. I'll have a think about this

Thanks for response.
I really liked this plugin but due to lack of this functionality I could
not use this.
Is there any possibility to add as part of plugin?
On 09-Mar-2016 5:39 am, "Pedro Abreu"<EMAIL_ADDRESS>wrote:

As it is now, I don't think you can. You would probably need to run a
function passed trough the scope (Or broadcast an event... not sure which
one would be the best approach) and execute it when the last image of the
array was loaded on the 3rd slice (Because we would need to render the next
image when the last image becomes visible)
From the top of my head, this would be the first thing to try. I'll have a
think about this
—
Reply to this email directly or view it on GitHub
https://github.com/pedroabreu/ion-gallery/issues/45#issuecomment-194032142
.

You can always try to implement it and then open a PR for merge ;)
On Wed, Mar 9, 2016 at 3:31 AM Purusothaman Ramanujam <
<EMAIL_ADDRESS>wrote:

Thanks for response.
I really liked this plugin but due to lack of this functionality I could
not use this.
Is there any possibility to add as part of plugin?
On 09-Mar-2016 5:39 am, "Pedro Abreu"<EMAIL_ADDRESS>wrote:

As it is now, I don't think you can. You would probably need to run a
function passed trough the scope (Or broadcast an event... not sure which
one would be the best approach) and execute it when the last image of the
array was loaded on the 3rd slice (Because we would need to render the
next
image when the last image becomes visible)
From the top of my head, this would be the first thing to try. I'll have
a
think about this
—
Reply to this email directly or view it on GitHub
<
https://github.com/pedroabreu/ion-gallery/issues/45#issuecomment-194032142
.

—
Reply to this email directly or view it on GitHub
https://github.com/pedroabreu/ion-gallery/issues/45#issuecomment-194097780
.


9178 DEV Update dashboard.html to show deprecation notice for Private Docker Registry integration

https://github.com/Shippable/pm/issues/9178

Verified on rc.


Added instructions for the Microsoft Graph

I noticed quite a bit of people are struggling (which is visible in the comments section of this article) with getting the properties to show up in the Microsoft Graph so I added some detailed instructions.

@tvuylsteke : Thanks for your contribution to the Azure documentation! The author, @andkjell, has been notified to review your proposed change.

@PatAltimore FYI...

That works for me.

To resolve this pull request, please add an appropriate comment so automation can take the corresponding action.  Thanks


Use particle package as PDG ID utility

This PR covers the introduction of the scikit-hep/particle package into the codebase, to replace most of the hardcoded PDG IDs throughout the codebase.
The particle package allows for the meaningful search of particles by specifying their name, or any other arbitrary filter function thanks to the Particle.findall(...) function. In addition, Particle.from_pdgid(...) has been used within the MadminerParticle class to obtain the charge of specific particles given their PDG ID (some of them were wrongly defined).
Additional changes

Simplified utils/various.py math_commands utility function. https://github.com/diana-hep/madminer/commit/eb94d8756d547f08e9071794266e580a842d3e5d
Removed legacy setup.py UploadCommand utility (currently using a GHA workflows upon published  events). https://github.com/diana-hep/madminer/commit/ad27cabaa1f3b65e93fd6abadb3af0a4cbd666d5
Fix deprecated particle.phi() occurrences (since the scikit-hep/vector migration, phi is not callable). https://github.com/diana-hep/madminer/commit/1ad9e69cb20631d50f35c66b516ddf95d5c41a37

Guidance on these substitutions was provided by @eduardo-rodrigues

Merging due to lack of comment.

Merging due to lack of comment.

Hi. In fact I did not have the time to look. But I will do so today hopefully and will suggest some minor updates ...


feat: option to skip docgen after re-ingesting packages

This adds a "skipDocgen" option to make it easier to defer regenerating all docs when all you need to do is update package metadata objects after making a change to packageTags or packageLinks, for example.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Closing for now since it doesn't seem too high priority (though I'm open to fixing it up if anyone thinks it would be useful)


Test: try macos-12 on GH actions

reference #5471

✔ Looks pretty clean, everything executed, except GitHub Actions is expecting the wrong name from the branch protection rule.


Update for SDU v<IP_ADDRESS>

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


[Crescent] Adding new character sheet

Changes / Comments
This change is adding the Crescent Character Sheet. For the time, the character sheet only includes the html and css, along with the preview picture and sheet.json.
Roll20 Requests
Comments are very helpful for reviewing the code changes. Please answer the relevant questions below in your comment.

[x] Does the pull request title have the sheet name(s)? Include each sheet name.
[ ] Is this a bug fix?
[x] Does this add functional enhancements (new features or extending existing features) ?
[x] Does this add or change functional aesthetics (such as layout or color scheme) ?
[ ] If changing or removing attributes, what steps have you taken, if any, to preserve player data ?
[x] If this is a new sheet, did you follow Building Character Sheets standards ?

If you do not know English. Please leave a comment in your native language.

Character Sheet Info Roll20 Internal Use only.


Any desire to support other device types?

I have the 5103 temperature devices and the 5040/5054 in my home. Both are Wifi connected.
Are you interested in adding other device types to this project?

Yeah I'd like to see them added. I don't have those particular devices.
In general, testing a new device without having access to it is slow and frustrating.
I did just obtain a humidifier which notionally supports reading back the temperature and humidity, although Govee's API returns crap data for it.
I'll be looking at that more today and laying down the foundation for reporting device-associated-sensors.
That might happen to enable your device without any additional effort.

I've got the code and have been reading it. If you need me to test and debug I can do that.

how about the space heaters?

@ebiancarelli can you run and share the output from:
$ docker run --rm ghcr.io/wez/govee2mqtt /app/govee http-control --api-key $GOVEE_API_KEY --id $DEVICE_ID info

$ docker run --rm ghcr.io/wez/govee2mqtt /app/govee http-control --api-key $GOVEE_API_KEY --id $DEVICE_ID status

for each device? ($DEVICE_ID is the colon-separated-hex id for your device).

if you already know how to build and run the code from the repo, you don't need docker:
$ ./target/debug/govee http-control --api-key $GOVEE_API_KEY --id $DEVICE_ID info

Ok - I will try in a few hours when I'm home.
--
Ernie Biancarelli
@.***
On Tue, Jan 9, 2024, at 12:12 PM, Wez Furlong wrote:

if you already know how to build and run the code from the repo, you don't need docker:
$ ./target/debug/govee http-control --api-key $GOVEE_API_KEY --id $DEVICE_ID info
—
Reply to this email directly, view it on GitHub https://github.com/wez/govee2mqtt/issues/27#issuecomment-1883631610, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABGJOZZFQDJJPP6TRTLSTLYNWJCHAVCNFSM6AAAAABBQOSFQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBTGYZTCNRRGA.
You are receiving this because you were mentioned.Message ID: @.***>

$ cargo run http-control --id C6:1A:D7:37:36:39:34:10 info
   Compiling govee v0.1.0 (/Users/dad/code/govee2mqtt)
    Finished dev [unoptimized + debuginfo] target(s) in 1.81s
     Running `target/debug/govee http-control --id 'C6:1A:D7:37:36:39:34:10' info`
Loading environment overrides from "/Users/dad/code/govee2mqtt/.env"
HttpDeviceInfo {
    sku: "H5103",
    device: "C6:1A:D7:37:36:39:34:10",
    device_name: "Outside Temp Guage",
    device_type: Thermometer,
    capabilities: [
        DeviceCapability {
            kind: Property,
            instance: "sensorTemperature",
            parameters: None,
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: Property,
            instance: "sensorHumidity",
            parameters: None,
            alarm_type: None,
            event_state: None,
        },
    ],
}
$ cargo run http-control --id 33:F7:D7:37:36:39:40:12 info
   Compiling govee v0.1.0 (/Users/dad/code/govee2mqtt)
    Finished dev [unoptimized + debuginfo] target(s) in 2.25s
     Running `target/debug/govee http-control --id '33:F7:D7:37:36:39:40:12' info`
Loading environment overrides from "/Users/dad/code/govee2mqtt/.env"
HttpDeviceInfo {
    sku: "H5103",
    device: "33:F7:D7:37:36:39:40:12",
    device_name: "Inside Temp Guage",
    device_type: Thermometer,
    capabilities: [
        DeviceCapability {
            kind: Property,
            instance: "sensorTemperature",
            parameters: None,
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: Property,
            instance: "sensorHumidity",
            parameters: None,
            alarm_type: None,
            event_state: None,
        },
    ],
}

Status Command
$ cargo run http-control --id C6:1A:D7:37:36:39:34:10 status
   Compiling govee v0.1.0 (/Users/dad/code/govee2mqtt)
    Finished dev [unoptimized + debuginfo] target(s) in 3.27s
     Running `target/debug/govee http-control --id 'C6:1A:D7:37:36:39:34:10' status`
Loading environment overrides from "/Users/dad/code/govee2mqtt/.env"
HttpDeviceState {
    sku: "H5103",
    device: "C6:1A:D7:37:36:39:34:10",
    capabilities: [
        DeviceCapabilityState {
            kind: Online,
            instance: "online",
            state: Object {
                "value": Bool(true),
            },
        },
        DeviceCapabilityState {
            kind: Property,
            instance: "sensorTemperature",
            state: Object {
                "value": Number(3030),
            },
        },
        DeviceCapabilityState {
            kind: Property,
            instance: "sensorHumidity",
            state: Object {
                "value": Object {
                    "currentHumidity": Number(5760),
                },
            },
        },
    ],
}

Turns out that the 5040 is not returned from the API

Turns out that the 5040 is not returned from the API

I actually had the 5040/5054 combo on order and it came today.  So I was working on setting it up and appreciate you already looking into this.  Hopefully it will get added to the API!

@ebiancarelli thanks; do you happen to know what the corresponding humidity is that is reported in the app?  I suspect that the 5760 value needs to be scaled in some way.  If you can figure out the relationship, then we can report something reasonable for it to home assistant.

Same for the temperature; does 3030 represent 30.3C, or 30.3F, or something else completely?

Temperature is in C, so 3030 = 30.3C
Humidity is in percent, so 5760 = 57.6%

Thanks; it's possible that 2024.01.10-86c015b5 will populate some sensor entities for you; please give it a try and let me know!

Appears to work!
[2024-01-10T09:17:52 TRACE govee::service::state] updated state for Inside Temp Guage (33:F7:D7:37:36:39:40:12)
[2024-01-10T09:17:52 TRACE govee::service::hass] gv2mqtt/sensor/sensor-33F7D73736394012-sensortemperature/state -> 27.6
[2024-01-10T09:17:52 TRACE govee::service::hass] gv2mqtt/sensor/sensor-33F7D73736394012-sensorhumidity/state -> 72.5
[2024-01-10T09:17:52 INFO  govee::service::state] requesting update via Platform API Outside Temp Guage (C6:1A:D7:37:36:39:34:10) None
[2024-01-10T09:17:53 TRACE govee::service::state] updated state for Outside Temp Guage (C6:1A:D7:37:36:39:34:10)
[2024-01-10T09:17:53 TRACE govee::service::hass] gv2mqtt/sensor/sensor-C61AD73736393410-sensortemperature/state -> 27.5
[2024-01-10T09:17:53 TRACE govee::service::hass] gv2mqtt/sensor/sensor-C61AD73736393410-sensorhumidity/state -> 75.7

FYI -  Gauge is misspelled

re: spelling, that name comes from what is entered in the Govee app for the device name!

Ok, I think we can close this!


What is the right way to share the codes?

Home Assistant version
ALL
SmartIR version
ALL
SmartIR configuration

not significant

Describe the bug
Please indicate in the Readme.md or in the wiki what is the correct procedure to send new codes.
Options:

Create a fork, add codes, fix the related .md, create a "Pull request"
Creating an issue, the add the files with the produced codes.

Which is preferable?

Hello and thank you for your willingness to contribute. Any of the methods you describe are acceptable.


Possibility to swap grids/sides

Can you please tell me if it is possible to forcibly swap the grids? While maintaining the logic of the migration buttons.
For example, to force a grid with selected items to the left instead of the right.

Hello.
If the component is inside of an RTL container, the grid with the selected items will be positioned to the left.

For LTR languages, TwinColGrid is rendered as a vaadin-horizontal-layout inside of a vertical layout. You can set a flex-direction: row-reverse style in order to swap the grids.

In both cases, you will also need to rotate the buttons (since the arrow that selects items will always point to the right, regardless of dir/reverse settings)
Please let us know if you think of any addition in the API than can assist in your use case,

It would be nice to be able to do this out of the box(styles of grids and buttons). And also replace the concepts of right and left grid (in favor of  available and selections for example), because in our case, as well as in the case of a vertical alignment, it is no longer relevant.

And also replace the concepts/namings of "right" and "left" grid (in favor of "available" and "selections" for example), because in our case, as well as in the case of a vertical alignment, it is no longer relevant.

That's right, the left/right naming convention predates the orientation feature. I'll create a separate issue for discussing that.

Released in v2.5.0

thanks!


Segmentation faults when summing over array

Version of Awkward Array
1.7.0
Description and code to reproduce
import awkward as ak
import numpy as np

v = ak.from_iter([[[1, 2, 3], [4, 5]], [[3, 4, 5], [6, 7]], [[5, 6, 7], [8, 9]]])
M = np.asarray([[1, 1.4, -0.3], [1.4, 1, 1.2], [-0.3, 1.2, 1]])
M_times_v = M[..., np.newaxis, np.newaxis] * v[np.newaxis, ...]
v_times_M_times_v = v[:, np.newaxis, ...] * M_times_v

# frequently (not always) segfaults with axis=0 or 1
np.sum(v_times_M_times_v, axis=0)

array = ak.from_iter([[[[1], [4, 9]], [[5.6], [14, 25.2]]], [[[5.6], [14, 25.2]], [[16], [25, 36]]]])
# always(?) segfaults with axis=0 or 1, also when using np.sum
ak.sum(array, axis=1)

The above code causes frequent segmentation faults in the first np.sum call, and always (at least in ~100 attempts) segfaults for the second ak.sum call (same when replacing this by np.sum).
I can reproduce this with two setups:

Python 3.9.10 on M1 macOS with awkward 1.7.0 and numpy 1.22.2
Python 3.8.10 on Intel macOS with awkward 1.7.0 and numpy 1.22.1

I cannot reproduce the segmentation fault when using the following:

python:3.9-slim container with awkward 1.7.0 and numpy 1.22.2

In case it is useful, I rarely get the following output as well:
python(14372,0x102a64580) malloc: Heap corruption detected, free list is damaged at 0x600000358260
*** Incorrect guard value: 8
python(14372,0x102a64580) malloc: *** set a breakpoint in malloc_error_break to debug

In the original setup where I came across this (uses a larger array as input) I also see the following:
python(12981,0x105568580) malloc: *** error for object 0x3d: pointer being freed was not allocated
python(12981,0x105568580) malloc: *** set a breakpoint in malloc_error_break to debug

The original setup also crashes less frequently (did not measure this very precisely though).
I am not sure how to approach debugging this, but am happy to help with some pointers for what to do. I have also not tried other combinations of numpy and awkward yet or systematically investigated which kinds of arrays work and which cause crashes.

@alexander-held thanks for reporting it! @jpivarski - I think, this is related to https://github.com/scikit-hep/awkward-1.0/issues/1266

I can't reproduce this locally on Linux with:

ak.__version__ == '1.7.0' (PyPI) and Python 3.10.0 (Conda) and np.__version__ == '1.21.5' (PyPI)
ak.__version__ == '1.7.0' (Conda) and Python 3.10.0 (Conda) and np.__version__ == '1.22.2' (Conda)

The fact that it doesn't fail for you with the container makes me wonder whether this is a MacOS thing.

@agoose77 - I think it's the same as in the case you've reported  - the parents are not ordered:
<ListArray64>
    <starts><Index64 i="[0 15 30 5 20 35 10 25 40 3 18 33 8 23 38 13 28 43]" offset="0" length="18" at="0x7ff1f6023e30"/></starts>
    <stops><Index64 i="[3 18 33 8 23 38 13 28 43 5 20 35 10 25 40 15 30 45]" offset="0" length="18" at="0x7ff1f6023ee0"/></stops>
    <content><NumpyArray format="d" shape="45" data="1 4 9 16 25 ... 25 36 49 64 81" at="0x7ff1f600a630"/></content>
</ListArray64>
ListArrayOf::reduce_next negaxis = 2, starts = (0 ,9 ,3 ,12 ,6 ,15 ,), shifts = (), parents = (0, 0, 0, 2, 2, 2, 4, 4, 4, 1, 1, 1, 3, 3, 3, 5, 5, 5, )

but the algorithms calculating gaps and distincts assume they are - the nextstarts and gaps may get corrupted:
nextstarts:
<Index64 i="[0 18 36 9 27<PHONE_NUMBER>83296 3 21 39 12 30<PHONE_NUMBER>694672928 6 24 42 15 33]" offset="0" length="17" at="0x7ff1f6024270"/>
gaps:
<Index64 i="[1 2 2 1<PHONE_NUMBER>110504499<PHONE_NUMBER>694672928]" offset="0" length="6" at="0x7ff1f60245e0"/>

The memory allocated on Linux might be already initialised... but not on MacOS.

I can reproduce the segfault with v1 (in master and with Jim's branch jpivarski-ianna/fix-4D-reducers):
import awkward as ak
import numpy as np

v = ak.from_iter([[[1, 2, 3], [4, 5]], [[3, 4, 5], [6, 7]], [[5, 6, 7], [8, 9]]])
M = np.asarray([[1, 1.4, -0.3], [1.4, 1, 1.2], [-0.3, 1.2, 1]])
M_times_v = M[..., np.newaxis, np.newaxis] * v[np.newaxis, ...]
v_times_M_times_v = v[:, np.newaxis, ...] * M_times_v

# frequently (not always) segfaults with axis=0 or 1
np.sum(v_times_M_times_v, axis=0)

<Array [[[3.7, 11.6, 23.7], ... 84.7], []]] type='3 * var * var * float64'>

array = ak.from_iter([[[[1], [4, 9]], [[5.6], [14, 25.2]]], [[[5.6], [14, 25.2]], [[16], [25, 36]]]])
# always(?) segfaults with axis=0 or 1, also when using np.sum
ak.sum(array, axis=1)

zsh: segmentation fault  python

but not with v2:
import awkward as ak
import numpy as np

v = ak._v2.operations.convert.from_iter([[[1, 2, 3], [4, 5]], [[3, 4, 5], [6, 7]], [[5, 6, 7], [8, 9]]])
M = np.asarray([[1, 1.4, -0.3], [1.4, 1, 1.2], [-0.3, 1.2, 1]])
M_times_v = M[..., np.newaxis, np.newaxis] * v[np.newaxis, ...]
v_times_M_times_v = v[:, np.newaxis, ...] * M_times_v

ak._v2.sum(v_times_M_times_v, axis=0)
array = ak._v2.operations.convert.from_iter([[[[1], [4, 9]], [[5.6], [14, 25.2]]], [[[5.6], [14, 25.2]], [[16], [25, 36]]]])
ak._v2.sum(array, axis=1)

<Array [[[6.6], [18, 34.2]], [[21.6], [...]]] type='2 * var * var * float64'>

Sometimes segfaulting is hard to catch, but if this is an error in the logic of reduction, then it would be more obvious in studies/reducers.py. Set the initial lists to be full of 999 and if there are any 999 left after the kernel, it's uninitialized (in a non-platform-dependent way). Also, out-of-bounds errors would be caught because reducers.py is Python.
This is a 3D sample with variable lengths, but if it's related to the 4D sample without variable lengths, one or the other may be easier to diagnose. I wonder if this 3D sample could be modified to have fixed lengths and still be an issue?
Also as a reminder, switching sum with prod and using all prime numbers makes it possible to trace back where each number came from—i.e. you can infer the carry index from the carried content. (With sum, you'd need powers of n, which get big faster than primes.)

I've added a 4D test in the studies/reducers.py that fails.

We've got 3.5 months before v2 comes out and not a lot of clamor about this issue. Unless somebody says, "This is affecting my workflow, please fix it!" I think we can just ignore it. That request-for-fix could be after the 2.0 release, we will be providing bug-fixes on demand (through a main-v1 git branch).


Added destinations to client 'Transfer' class

Probably a small oversight when defining the Transfer class.
The destinations are of course only relevant for "out" transactions, and even then they are not always set (e.g. in wallets restored by seed), but if they are set they are nice to have.

Thanks for submitting this. Will take a look later tonight. I see in the example in the documentation there is indeed a destinations variable. But that is a parameter to the function call, as opposed to a return value. The Transfer class is what is returned from something like get_transfer. I do not see a destinations in the output of get_transfer as detailed here:

I don't know exactly where this screenshot is from, but I am afraid you have become a victim of outdated documentation. I also noted that a number of RPC calls are missing, and as far as I saw until now the missing ones tend to be newer ones.
In any case, the C/C++ header files in the Monero codebase (src/wallet/wallet_rpc_server_commands_defs.h in particular for the wallet, and struct transfer_entry for the question at hand) are the definite "documentation" that can't possibly be outdated, and personally I tend to use that.
I already tested the code in this PR, and it does correctly return the destinations - if they are stored in the wallet file of course, which they sometimes are not, as explained.

Got it. Thanks for sharing that. I'll use that to review later tonight. I will probably do a comprehensive review of the RPC calls to add the missing ones as well later this week.

Not sure what Destinations is supposed to be here. There are two in and two out transfers in my wallet.
Testing

Wallet Transfer History

What exactly is Destinations supposed to be, and is it expected that it should be empty for me? How can I get it to not be empty?

If all runs "according to plan", the basic Monero wallet code in wallet2 stores the address(es) for every outgoing tx in the wallet cache file. So the info should be there as long as you have and use that file. Those destinations are not recorded in the blockchain however, so if you restore a wallet from seed, or do a full "destructive" rescan, they won't be there anymore.
Like you when in doubt I use the CLI wallet show_transfers command; if the destinations are there they are listed last on each line. So in your wallet they are most probably not there, and your library plus the RPC daemon and the CLI wallet are consistent, which is strange however.
Interestingly, I myself have a wallet where I have destinations for 4 out of 5 out transfers, something which should not be possible either. I would not rule out that there is still a bug, or at least a weakness, in the wallet2 code that prevents the correct storing of the info under some conditions. I had a look at the corresponding Monero code but could not see something suspicious so far.

Maybe I need to send multiple transfers in a single transaction for it to show up?

No, also standard tx with only 1 destination should store that single destination, with the array then having 1 element.

Okay, so you're saying that in my wallet, for OUT transactions, there is no destination address. I'm assuming the actual destination address has been replaced with the - that I see in my screenshot?
Can you send me a screenshot of some of your OUT transactions, highlighting the destination address so I can see which field it is in the transactions when issuing a show_transfer command?
I noticed in my ViewOnly wallet after the .3 release of Monero that some addresses were missing. Maybe it is related.
Also, if you can send me a screenshot of the Transfer class in action, showing that the Destinations field does indeed populate with a list of TransferDestinations, that would help.

Here a screenshot from the CLI wallet. Basically all addresses you see here are destinations. You see also the mysteriously missing destination, a little above picture middle:

And here a view from Visual Studio (it's correct that the address and the destination is the same in this example, I sent indeed to myself in this particular tx):

Understood, interesting how the Amount and Amounts property is empty here. Do you know why? It is unrelated to your MR, but I am not curious. I guess Amount should be the summation of the Amount of all Destinations? I'm not really sure what it is now that I see it at 0, when the transfer amount was 100. Maybe it's the amount of Piconero belonging to that address after the transfer?
Merged your change.

interesting how the Amount and Amounts property is empty here. Do you know why?

Yeah, that's a little surprising, isn't it. It's just the way transfers to yourself are reported: As one "out" transfer with an amout of 0.


Validate column modifications

Any reason not to perform the same validations on column modifications as on column additions?

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:


Travis CI: Switch from deprecated stable NodeJS to versions 4.x.x & 5.x.x

See https://github.com/sindresorhus/ava/pull/388#issuecomment-167794658

:+1:


HAWQ-768. Refactor c++ code for src/test/feature/lib.

In this pull request, I refactored the code under src/test/feature/lib folder with following modification:

Unify some C++ style: The #define Guard, Namespaces, File Names(I think we should be the same style with postgresql which uses underscores, but for makefile targets, we could use dashes), Function Declarations and Definitions and so on.
Refactor the implementation of string_util, xml_util and hawq_config, which contain some potential risks of original impl.
Fix the clang++ compiling warning in sql_util.cpp:

lib/sql-util.cpp:112:10: warning: moving a local object in a return statement prevents copy elision
      [-Wpessimizing-move]
  return std::move(psql);
         ^
lib/sql-util.cpp:112:10: note: remove std::move call here
  return std::move(psql);
         ^~~~~~~~~~    ~
1 warning generated.

Separate the modification into three commits for review convenience.

NOTICE: the interface of SQLUtility and HawqConfig is unchanged. But user must specify them with using clause, check this for example.

cc @zhangh43 plz review the first commit, @wengyanqing @ztao1987 plz review the second commit, @ictmalili plz review the third commit.

@wengyanqing I try to run feature-test together with valgrind but got some lost and leak. I am not sure  what's the problem(maybe gtest, mac, valgrind itself), have you ever tried that in running feature-test?

LGTM. +1

LGTM

+1

Merging this into master, thanks!


AAP backend needs a standalone dev environment

We need to provide a standalone dev environment for plugins that interact with backstage catalog so we can eventually remove packages folder and develop plugins independently.
Please take a look at the AAP backend plugin and implement a catalog backend similar to the implementation for Keycloak plugin https://github.com/janus-idp/backstage-plugins/pull/543

Interested to work on this.

Any pointers on local setup of AAP? I tried for docker images and found one on registry.redhat.com which needs registry service account.

Any pointers on local setup of AAP? I tried for docker images and found one on registry.redhat.com which needs registry service account.

Hey thanks, can follow https://github.com/janus-idp/backstage-plugins/issues/545#issuecomment-1678060826
@cooktheryan do you have any other pointers for local setup?

@invincibleJai the difficult part is that you would either need a vm locally or in the cloud for standalone AAP or an OpenShift cluster where AAP can be deployed. With AAP many instances can be installed in a cluster into different namespaces

@invincibleJai @cooktheryan Thanks for sharing the setup. For standalone dev environment, requiring a cluster seems to be a bit tedious requirement at this point. Can we install the operator in a shared environment like operate-first.io and use it as a public instance for dev setup?

@navinyashende the compute with operate fist has been decommissioned. There exists a cluster specifically for Janus development deployed through ROSA where we should have the capabilities to deploy it into multiple namespaces. /cc @jasperchui

@invincibleJai Sure, Can we have a document for this setup as well? That would help others like me who are not aware of the complex stuff.


NTR: Eskimo

Hello, the ENCODE project has a request for an Eskimo term to be made. Thank you for all your help!
Preferred term label
Eskimo
Textual definition
Native people residing in the Arctic of Alaska, northern Canada, Greenland, or eastern Siberia PMID:25884279, PMID:29220501
Suggested parent term
uncategorised population (HANCESTRO:0018) - doesn't seem like this term would fit under any of the defined ancestry categories

Term now available

Term now available


Extends 'spo site add' with support for LCID validation. Closes #1749

Extends 'spo site add' with support for LCID validation. Closes #1749

Linked Issue

Closes #1749

Coverage remained the same at 100.0% when pulling 8dd0cda0473eb8957731356572b7b3f568a49cb6 on nanddeepn:spositeaddlcid into 67b8b88f7bb3da482806d83215c713d77328b6c7 on pnp:master.

Thanks @nanddeepn We'll review it shortly 👍


Include type definitions in library

Prefer not to use @types/s3rver for such a small file... can you include it in this library? Also, they're out of date (missing the middleware function)

I agree that the typings currently in DefinitelyTyped's repo are very dated; almost everything about that file is wrong.
This project doesn't really benefit from being native TS, and I'm not a fan of maintaining a separate type definition file. Though I can see about making the existing JSDoc comply with TypeScript's support for extracting types from JSDoc annotations.

If I fashioned up an up-to-date definition file, would you accept it? I have countless libraries, and they all sit well in TS apart from this one... it's detrimental to have an @types definition that clashes with your library. The s3rver api isn't particularly complex?

closing for now unless you want me to do it


Merge duplicate volume components from parent/plugins

What does this PR do?
Adds merging functionality to combine volumes that are duplicated in plugins and parents. This is done by removing duplicate volume components from parents/plugins if they are defined earlier in the flattened devworkspace, in the order devworkspace <- parents <- plugins (i.e. if a volume is defined in the devworkspace, duplicates in the parent and plugins are removed). If a volume is defined in multiple plugins, the first processed instance is kept and the rest are dropped.
Duplicated volumes are merged so that the larger size is used, and so that a persistent volume overrides an ephemeral one. This means that if a plugin defines e.g. a .m2 volume with size 1Gi, it will overwrite a main-devfile volume with size 512Gi.  This also means defining volume sizes in plugins can modify main-devfile volumes, which may be undesirable. Generally, a good practice is probably to define plugin volumes as ephemeral unless otherwise necessary, and let the main devworkspace make them persistent if needed.
What issues does this PR fix or reference?
Closes https://github.com/devfile/devworkspace-operator/issues/586
Is it tested? How?
Test cases are included in PR.
PR Checklist

[ ] E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)

[ ] v8-devworkspace-operator-e2e: DevWorkspace e2e test
[ ] v8-che-happy-path: Happy path for verification integration with Che

/test v8-devworkspace-operator-e2e, v8-che-happy-path

from e2e tests

2021/09/14 19:56:32 Now current status of developer workspace is: Failed. Message: Detected unrecoverable event FailedMount: MountVolume.SetUp failed for volume "devworkspace-serving-cert-workspace3ff4357331c7441e-service" : secret "workspace3ff4357331c7441e-service" not found

¯_(ツ)_/¯

Ran tests against RHPDS OpenShift 4.8 and they works.
Let's give it a second try and if no luck - probably FailedMount is not something we should use as unrecoverable event.

/test v8-devworkspace-operator-e2e

e2e path seems to pass on https://github.com/devfile/devworkspace-operator/pull/596.
So, trying one more time

/test v8-devworkspace-operator-e2e

I have no idea why e2e is consistently failing here.

/test v8-devworkspace-operator-e2e, v8-che-happy-path

Lets see if the mountVolumes issue is transient I guess (still don't understand why only this PR is affected, and I also can't reproduce locally.)
/test v8-devworkspace-operator-e2e

The last failure had a different message:

2021/09/16 17:05:42 Now current status of developer workspace is: Failed. Message: Detected unrecoverable event FailedMount: MountVolume.SetUp failed for volume "devworkspace-serving-cert-workspacedaf72da98cff4016-service" : failed to sync secret cache: timed out waiting for the condition

Tests passed! :mage_man: :tada:


jest-config and jest-runtime force babel-6 making tests fail when using babel-7

🐛 Bug Report
Cannot run jest with babel v7.
Here's the error message:
Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version.

Inspecting the stack trace and after some debugging, I found out that babel 6.26 is required because of jest-config and jest-runtime. Both are on the latest version "version": "23.5.0".
But have an explicit v6 in their dependencies which gets propagated to my test and produces the error.
"dependencies": {
    "babel-core": "^6.0.0",

To Reproduce
Setup jest and friends with the following versions:
"devDependencies": {
    "@babel/preset-env": "^7.0.0-rc.1",
    "babel-core": "^7.0.0-bridge.0",
    "babel-jest": "^22.4.4",
    "jest": "^23.5.0",
  },
  "resolutions": {
    "babel-core": "7.0.0-bridge.0"
  },
  "dependencies": {
    "@babel/core": "^7.0.0-rc.1",
    "regenerator-runtime": "^0.12.1",
  }

Expected behavior
Tests should run
Run npx envinfo --preset jest
Paste the results here:
  System:
    OS: macOS High Sierra 10.13.3
    CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  Binaries:
    Node: 8.12.0-rc.1 - /usr/local/bin/node
    npm: 6.2.0 - /usr/local/bin/npm
  npmPackages:
    @types/jest: ^22.2.3 => 22.2.3
    jest: ^23.5.0 => 23.5.0

You need to add to your package.json to force packages asking for babel-core to use the bridged version
"resolutions": {
    "babel-core": "7.0.0-bridge.0"
  }

You don't, but you need babel-jest in your own deps. See the docs: https://jestjs.io/docs/en/getting-started#using-babel


SL Review: Investigation on the production issues

Document all production issues that happened and lessons learned.

updated on Oct 11:
I've conducted a thorough investigation into a discrepancy issue related to SL (Service Level) submissions. This investigation involved comparing all the SL submissions from various data sources, including Formio MongoDB, API PostgresDB, Camunda PostgresDB, and ODS. The comparison focused on key elements such as creation and last update timestamps, application status, and critical content. Here's what I discovered:
There were seven cases where the data in ODS did not reflect the latest changes from DGJ. To resolve this, I manually updated these seven cases in ODS to include the latest information from DGJ.
The seven impacted submissions can be categorized as follows with link and applicationIds:

Three submissions were made right after an OpenShift outage and when DGJ was coming back online on October 4th. It appears that DGJ wasn't fully operational when users made these updates. Camunda might not have been fully functional, and as a result, the data wasn't sent to ODS.
applicationId: 60776
link: https://digital-journeys.apps.silver.devops.gov.bc.ca/form/64754420faabe6b3fc9a5abb/submission/64fa24c0889f59029db2bbea

applicationId: 60423
link: https://digital-journeys.apps.silver.devops.gov.bc.ca/form/64754420faabe6b3fc9a5abb/submission/65033f19889f59029db5bf0c
applicationId: 60428
link: https://digital-journeys.apps.silver.devops.gov.bc.ca/form/64754420faabe6b3fc9a5abb/submission/65033e2c889f59029db5bd69

Another group of three submissions couldn't be updated in ODS due to the presence of special characters in the form fields (quotes and dashes) use should have copied the text from a text editor. It's still uncertain whether this issue was at the ODS level or if there was a problem with the HTTP client responsible for sending the data from DGJ. (@Bhumin Patel and @Mike Shi can comment as there was a similar issue on another form before). The special characters in question were \u2019, \u2013, and \u2018. I had to manually replace them with alternative ASCII characters and then resend the data to ODS.
applicationId: 62577
link: https://digital-journeys.apps.silver.devops.gov.bc.ca/form/64754420faabe6b3fc9a5abb/submission/6504ec2a889f59029db716c1

applicationId: 54092
link: https://digital-journeys.apps.silver.devops.gov.bc.ca/form/64754420faabe6b3fc9a5abb/submission/64b16b55e0e06917f21423f9
applicationId: 58225
link: https://digital-journeys.apps.silver.devops.gov.bc.ca/form/64754420faabe6b3fc9a5abb/submission/64e55093e0e06917f21c5b1a

For the last impacted submission, I haven't yet determined the cause of the issue. This is an older instance submitted in June, and my suspicion is that changes to the data structure and workflow might be responsible for the failure to update in ODS.
applicationId: 51497
link: https://digital-journeys.apps.silver.devops.gov.bc.ca/form/64754420faabe6b3fc9a5abb/submission/649b5345e0e06917f20f4520

2/ Character replacement script added to cold and flu

closing as stella suggested above


SLiCE model

❓ Questions and Help
Hello! Thank you for the wonderful library.
I needed some help in running the code for the SLiCE model on any dataset for link prediction that you might have tested on. Can you please help me with the steps of doing the same?

Hi @Shreyas-Bhat , I'm the contributor of SLiCE model. Since this model is too complex, I failed to reproduce the performance in the original paper. I recommend you refer to the repository of the author. I'm testing how to run SLiCE on OpenHGNN, but I cannot ensure the performance.
By the way, I cannot reproduce the results even using the original code. You may ask the author. I guess she use the embedding from CompGCN as the initial embedding, then do pretraining and finetuning.

Hi @VoidHaruhi Thank you for the reply!
I am facing this error- Can you help me out here?

This issue has been resolved; for specific details, see:
https://github.com/BUPT-GAMMA/OpenHGNN/commit/01275b74590425f6afa6ea36004ee18df6f7b7de


Hardcoded http:// cause browser warnings in admin panel

Two links Help button (http://userhelp.silverstripe.org/framework/en/3.1) and logo (http://www.silverstripe.org/) are hardcoded with protcol defined in admin/code/LeftAndMain.php
private static $application_link = 'http://www.silverstripe.org/';
private static $help_link = 'http://userhelp.silverstripe.org/framework/en/3.1';
Many use https for the admin panel and some browsers (Internet explorer all versions) popup and say connection is not secure.
In fact, it is nothing but it scares people.
Changed http:// to //: in both links.

The trouble is there is no https://userhelp.silverstripe.org at the moment, so there's no real point supporting a https link to it. The warning given on that page is probably going to be just as scary as the existing notice.

I see. If https is not going to be enabled on that server soon, then how about setting a JavaScript to build the link or add the protocol on click :)
Then browser may not see it on normal load.
Well, I know it is not a good solution but neither is the current situation.

Maybe it would also be an Option to implement a 301 redirect in silverstripe? E.g. the link would be to /admin/help and then redirect to the URL ...

Silverstripe.org wihtout subdomain has ssl enabled.
How about redirecting here: https://www.silverstripe.org/community/ or https://www.silverstripe.org/blog/

www.silverstripe.org is fine as https, but the help link still needs to go to the documentation. We can't send them to the blog or the generic community section.
I think just fix that one link to ss.org and leave the other?

@tractorcow HTTPS seems to be up and running for silverstripe.org and userhelp, any objections to merging this now? :)

Looks good.