Swagger specs

It came up a lot in the Docker Remote API rework discussions: https://github.com/docker/docker/issues/15188 https://github.com/docker/docker/issues/5893 I also think swagger is a great way to describe APIs.
If there's a way maybe we can declare types/* in swagger specs and generate source files using swagger code generators, that would be very preferable as other language SDKs can take advantage of the swagger specs as well.
Just leaving this here.

Also: https://github.com/docker-php/docker-php/blob/1.21/docker-swagger.json
I agree it would be good to either generate the go types from the spec, or generate the spec from  the go code. Both can work, and we seem to have both sources already.
I think engine-api is missing a big part of the interface specification (the path, query params, headers, and response codes).  Using swagger would force us to include all of those (which I think is good).

Good idea to get it standardized format.
Does swagger have something to handle the stream hijacking that is done for attach, etc?

Well, swagger supports plugins/extensions. If there is no way of specifying hijacking, docker can specify hijack mode and code generators would implement it generically.
More generally, people don't use hijack/attach very often in the client libraries. I tend to believe it's not much of a common task. They often do container/image managament as expected.

Does swagger have something to handle the stream hijacking that is done for attach, etc?

I've been thinking about this. I think the way to support it would be to use produces: ['application/x-json-stream'] and the "response type" would be the format of each item in the stream. Clients would need to either support that mime-type or allow for plugins to support it.

I agree it would be good to either generate the go types from the spec, or generate the spec from the go code. Both can work, and we seem to have both sources already.

we already have the types, let's generate the spec from them. That's what kubernetes does, bth. We might be able to reuse their scripts.

fyi: http://goswagger.io/generate/spec/

Could also use this spec for auto testing, where the example part of the path can be the acceptance test.

Hey guys, just wanted to chime in.  I'm Loc with VMware, working on project VIC.  I'm not sure how far you guys have gotten through your swagger efforts, but we've been working on our own version for VIC.  @casualjim and I have been working closely to build a docker API server based on swagger.  Our swagger spec is based on the docker-php one, but it's been cleaned up a lot.  That original spec didn't really work for us.  We've also been fixing and adding features to go-swagger to support the docker swagger spec.
Our original plan was to hand over the spec to you guys, but it appears you guys are already looking at it.  If you guys are interested in this spec, it might accelerate your work.  There still quite a bit of work on both the spec and go-swagger to make it fully compliant with the docker api.  We should talk.  We're literally right around the corner from you guys.

I promise to show up if you have a meeting in SF.

Our swagger spec is based on the docker-php one, but it's been cleaned up a lot. That original spec didn't really work for us. We've also been fixing and adding features to go-swagger to support the docker swagger spec.

I'm really interested for knowing why it wasn't working for you  ? :)

We're using go-swagger for our generator.  Ideally, it should be the same as using swagger, but what I found was there were a lot of mistakes in the original docker-php spec.  We got a cleaned up version of the spec from @casualjim, then through trial and error, we cleaned up the spec to make it work.  Our desire was to make sure the server generated with the spec would work flawlessly with both CURL and the docker CLI.  That original spec (at least the version I got originally) won't work.  It's missing a lot of mime-types, incorrect definitions, missing definitions, etc.  Also, @casualjim has had to add features to go-swagger to make the server compliant with docker.  We've spent quite a bit of time debugging HTTP headers.  In case you're wondering, go-swagger generates golang code.  That's why we're using it instead of regular swagger.

Ok, i'm the one who write the swagger spec for docker-php, and i'm really interested to have a shared spec that works for multiple projects (this will, IMO, decrease maintenance for everyone).
Don't know if that's ok with you to have a shared spec (and don't know if it's the correct topic to speak about that) feel free to open an issue on https://github.com/docker-php/docker-php if you are interested.

I agree on a shared spec.  Our original intent was to get this working and hand it over to Docker and see if they would be interested in maintaining it since they control their APIs.  BTW, I want to emphasize that work must also be done on the generator to support functionality required by the docker API server.  There's no way to know what this work entails until you run the swagger generated server, run curl request and docker CLI commands and look at the headers.

btw, there's another reason we want to give Docker this spec.  We're very interested in this separation of the engine-api server work.  It appears both we and Docker are doing similar things but starting in different points.  We're trying to build a compliant api server and you guys already have this.  We started out with swagger and you guys want to move in this direction.  There are some gotchas using swagger.  You might have to rethink how the swagger server hooks into the rest of docker, specifically your backend interfaces.  We could probably work together on this.

Our original plan was to hand over the spec to you guys, but it appears you guys are already looking at it. If you guys are interested in this spec, it might accelerate your work. There still quite a bit of work on both the spec and go-swagger to make it fully compliant with the docker api. We should talk. We're literally right around the corner from you guys.

@joelwurtz, @sflxn please, do not hesitate to open pull request with a spec, completed or not. All contributions are very welcome. I'm pretty sure, nobody else is working on it. That's a much much better starting point than people waiting around :smile_cat:

@joelwurtz some of the issues I fixed through sending a PR. The cases are missing parameters, consumes, produces and so on.
One of the funnier ones was: there were some response status codes which are 4O4 instead of 404 so the letter O instead of the number 0.

+1

@joelwurtz Would you have any qualms if I do a PR for this today in this repo?  Once that happens, I can do a PR on your repo.  However, I had to change the resourceIDs to make nicer unique handler names in code generated by go-swagger.  Eventually, this spec and any other that are shared should probably be submitted to swaggerhub, but this docker repo is a good initial place for everyone to come and share in this work.

@joelwurtz Would you have any qualms if I do a PR today in this repo? Once that happens, I can do a PR on your repo. I sense you want docker-php to be the source of sharing, but I believe keeping the spec in this repo is good place for people to come and collaborate on it. Eventually, this spec and any other that are shared should probably be submitted to swaggerhub.
Go ahead and no i don't want docker-php to be the source of sharing on the contrary i would prefer to have a dependency on this repo to reduce my maintenance cost.

I want to comment about how this spec should be used. For the time being, it's a good source to generate API clients. Generating a server will be much more involved.

I think there is 2 approach :

Start from the swagger spec and generate everything (client and server skeleton)
Start from server code and generate the swagger spec, which can be used to generate client api

IMO, i think the second approach is the best regarding the current status on docker (no bc break), and in this view proposing a swagger spec to this repo is more for testing, so this will ensure that the generation of the spec is correct about the api vision.

Joel, I agree that annotation is a great way to approach when there is an existing code base.  There is some value using a starting spec to generate models and using those swagger generated data structures as a guide for updating the existing code.
For example, the current server routes can easily be swapped out for a swagger based server.  The data structure generated (models) from the swagger spec can then be passed into the backends or they can be massaged into the data structures passed into the backends.

@casualjim can chime in here re: go-swagger

the least risky path is to use the documentation comments.
Docker has a very interesting use of http and stretches the swagger definition already seriously.
Interesting use is around the event streams and blob uploads.
Later on perhaps it can use the generated server but the main thing is that it gets a swagger spec that is generated from the actual code.
That is where the most value is at this stage imo. It's also a fairly risk-free approach.

I agree with @casualjim, annotation is less risky right now.  There are still more work that needs to go into go-swagger to be able to handle all the unique cases that the docker server currently handles.  We can work on beefing up go-swagger on our end to get it there, but it would be tough to switch over the rest handling to swagger on the server side right now.

I have been experimenting with adding Swagger annotation to the source code:
https://github.com/docker/docker/compare/master...bfirsh:generate-swagger-specification
https://github.com/docker/engine-api/compare/master...bfirsh:add-swagger-annotations
This will allow us to automatically generate the sort of thing in #168 and, helpfully, also forces to add loads of documentation to the API.
I'm running into a few cases where Swagger can't generate the correct docs from the objects we have, so there's going to be a bit of refactoring needed to make that work. Refactoring for the better though - it forces us to have clean objects for representing API requests and responses, etc.
There are also a few things that go-swagger can't really represent properly (e.g. JSON responses for success, plain text for error). Perhaps we should actually fix these problems in the API rather than try and shoehorn Swagger into the problems. ;)

We have had complaints about the plain text error responses being unexpected.

Any progress on this? From what I understand this would allow us to generate libraries for other languages using codegen.

Just updated our swagger schema with last API Changes : https://github.com/docker-php/docker-php/blob/1.24/docker-swagger.json
There is also support for all swarm API endpoints.
And IMO, this is really needed, i can't say the number of times where i have see errors on the actual documentation (fields not displayed, wrong field names, updates not reported, a lot of missing informations). I know i can do pull requests to fix all of this, but i'm afraid this will continue to have errors as the api evolves due to the current way of working.
Having an auto generated documentation will really help to also generate a much better documentation than the current one (and allow code generation, but for me this is not the primary goal)
Given this, @bfirsh is there a way to help ? I know little go, but i can take time to update my knowledge and advance this, unless this is not a wanted feature ?

This is definitely wanted and I'm currently cranking through the whole API adding go-swagger definitions. See my branches above for work-in-progress as of a few days ago. Unfortunately I'm running into lots of go-swagger issues, but the author is pretty responsive and helpful.
Once I've added a first pass of definitions, I'd really appreciate some help checking it over to make sure it is accurate. Once we've got that in, then we can generate some API documentation. 😄

Current work in progress, automatically generated from the branches above:
https://gist.githubusercontent.com/bfirsh/936b39514515e833df1457bd445d624f/raw/b3ab78318eb0abcbcc833b1bd53840be64c89822/swagger.json
You can plug it into http://petstore.swagger.io/ and click "explore" to get a GUI. Lots of stuff missing/broken still, but hopefully gives you an idea of where it's heading.

Anybody have any good ideas on how to test this? I was thinking some kind of sanity test to generate it and check some expected stuff is in it, but it would be quite nice to check it's actually correct somehow.
I can imagine a fully fledged integration suite which actually tries to generate a client out of the swagger.json, then tests that against a running version of the code it generated it from. Sounds a bit ambitious/slow for a first pass though...

Swagger spec is a json schema, you can test then than your spec is valid with this schema : https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json
Not sure if it handles all the contraints, but it's a good start

the most complete working validator that I know of for a swagger spec is a nodejs tool.
npm install -g swagger-tools
swagger-tools validate spec.json

@casualjim Ah, hello! Didn't connect you in this thread with you on go-swagger. :D
Checking the validation of the spec is a good idea. I wonder if there are some simple smoke tests we can do to check it's actually correct, though. My fear is that somebody will change something in the API, then forget to change the annotations, and nobody will notice because it won't break a test.

My fear is that somebody will change something in the API, then forget to change the annotations, and nobody will notice because it won't break a test.

I don't think it's possible to have such tests unless docker itself use the swagger schema to generate its client (so this will be tested by the process of writing).
I know elasticsearch has some kind of specification tests that are used by many clients for integration: https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/test which we can mimic, but, sometimes, they are still inconsistencies (i got this recently in here : https://github.com/elastic/elasticsearch-php/pull/447/files#diff-aefcee0e9e5740f9f538f702a848a6c1L26)

I'm having real trouble generating a spec from annotations on the existing source code, mostly running into issues with go-swagger and go-swagger not generating quite the specs that I want.
I'm also spending a lot of time refactoring code to make it similar to what the go-swagger code generator would produce anyway (e.g. proper parameters, responses, models, etc).
Which is making me think... why don't we just do code gen instead? https://github.com/docker/engine-api/pull/168 is a great place to start for our Swagger spec, then we can use that to generate a set of parameters, responses, and models. In theory it'll generate the same objects as we need to have in the source code anyway, so all of the existing server and client code will more-or-less work.
I'll experiment with generating code from that spec and how well it works...

Okay I got a bit overly enthusiastic there. Code generation looks like quite dauntingly large piece of work. 😓
Stepping back a bit, I think setting a goal might help focus the work. Let's say we want to replace the API documentation with something automatically generated from Swagger, ala https://github.com/docker/docker/pull/8402. That'll give us much better API documentation, and as a nice side-effect give us a good swagger.json.
Given this goal, I think the easiest way to achieve it is just to manually write a swagger.json file. Generating the swagger.json from comments in the source code is hard to debug, forces us to write our source code how go-swagger expects to read it, and just generally a bit frustrating. If adding Swagger annotations has been a PITA for me, then it's bound to be a PITA for other maintainers.
Above all – this is a logical first step towards automatically generating types from swagger.json. Annotating source code that might be thrown away eventually is not.
A counter-argument could be that the Swagger definition might get forgotten if it's not in the source code. But, if the manually written file is source of truth for the API documentation, that will force us to update it when the API updates.
So – I'm going to just try and make some really good API documentation, using #168 as a starting point.

I think that's a good plan. In the long run I think generating code from the spec is the right way to do it. It may feel a bit uncomfortable at first, especially if you aren't used to the idea, but I think making the spec the source of truth focuses on API design first, which leads to a better design.

Here is my work in progress, for those interested:
https://bfirsh.github.io/docker-api-reference/
https://github.com/bfirsh/docker-api-reference (to-do list is in issues)
It's obviously unfinished, and I'm just ploughing through it at the moment porting the existing API docs to a Swagger spec. Turns out a lot of the API docs are incomplete/wrong/poorly written/inconsistent, so I'm also using this opportunity to tidy that up!
I would be interested in all your feedback. Early and often, and all that.

Nice ! I'm currently in holidays but when i came i'm very motivated to work on this, will certainly do many pull reauest with the changes that i have done over the pas months on docker-php

+1 really nice. At first was a little put-off by having to update the swagger spec on API changes... but it's hella better than dealing with the markdown API spec we currently have... which is pretty much always out of date and difficult to navigate.

I've opened https://github.com/docker/docker/pull/27117 to start generating types from the spec.


Translation of messages #22543

Problem Statement:
For some communities, it is desirable to be able to include users who don't speak the dominant language in the community, or whose ability in the dominant language might inhibit full participation. If Zulip had the ability to translate a message to the user's default language then this would make it more feasible for communities to include these users and have discussions across languages.
Solution:
To accomplish this approach, I set the user's preferred language to match the default language of their web browser. By doing so, I ensure that the translated messages are tailored to the language the user is most likely to understand and prefer. This way, the user doesn't need to manually select their preferred language, as it is automatically detected based on their browser settings.
Code Changes :
Middleware.py:
In this code I am retrieving the preferred language from the browser's default language using HTTP_ACCEPT_LANGUAGE header and updating the preferred language attribute of the authenticated user and saving it to UserProfile database.
Also, I have created a new test case, test_language_preference_test.py, to ensure the preferred language functionality is working as expected. Attaching the screenshot of the result for your reference
models.py
Added Preferred Language field to save user's preferred language
message_send.py
In this , I have written a code to translate each message to the user's preferred language. For this I have used translate.py library .Also, I have tested it but I am getting network error for which I have to take Zulip's team help. Attaching the screenshot of the result for your reference.
Issues:
Cannot test the translate.py library due to network issue

@SrishtiHasijani31 thanks for your PR! Can you link the discussion related to it here? If there is none, please open one in here before working on this further.

https://github.com/zulip/zulip/issues/22543
this is the github link of the converstion

Can you post a screenshot / GIF of you implementation in the linked stream ?

Can you post a screenshot / GIF of you implementation in the linked stream ?

I have posted the explanation in the linked stream. Please review and let me know your thoughts on that.
Thanks.

Can you post a screenshot / GIF of you implementation in the linked stream ?

I don't see it.

Thanks for your work on this so far! We definitely don't want to just translate messages based on browser default language by default without any way to toggle it. Also, this feature is still in discussion phase and #22543 doesn't has a help wanted label. So, please hold any more efforts on this. You can try to pickup issues marked as help wanted to work on in the meanwhile.

Hi, @SrishtiHasijani31  is a student working on this for a dissertation project. We discussed it with @alya and @timabbott a while back. It has taken a while to make progress and get to grips with the codebase which is why this is appearing only now. It might have been useful for @SrishtiHasijani31 to have mentioned this to provide context that would prevent summarily closing this. Can you please re-open it?
For my part, I have the following initial feedback:

Obviously using the browser language is only a hint for a sensible default. At least the following is needed to make this usable:

A user setting to select the language that they would like messages translated to (with a sensible default)
A user setting to select the languages that they speak and so do not want translation for
A user setting to disable translation altogether
A way to see the original text of translated messages in the UI
Probably a way to turn translation on/off for individual topics

Translation back-end (which should include at least one local option) configuration exposed for the server configuration
There are many git commits with uninformative log messages such as "code updated". What is that supposed to mean? Updated how and for what? I would expect these commits to be squashed into one with information about precisely what has changed, where, and why.

I have also asked Srishti to stand up a Zulip server so that we can try this out. I suspect many usability issues will only become clear when we try to use it.
Thanks,
-w

To be clear, I understand this PR is intended to be the basic substrate on top of which a translation feature as described above can be built, and I think @SrishtiHasijani31 is mainly looking for feedback on whether her approach makes sense from Zulip's perspective. This PR doesn't contain a complete feature.

Thanks @wwaites for the added context!
This issue still needs some discussion on the product/UX and the implementation strategy before it's ready for a PR, which is why it isn't marked with the "help wanted" label. If @SrishtiHasijani31 wants to take on this issue as a substantial chunk of a dissertation project, that can work fine, but it means that the first steps will need to be in having that discussion.
For this issue #22543, the chat thread (linked from the issue) is here. You can see that several different ideas for the UX have been discussed there before. Before proceeding to a PR, we don't necessarily have to make a firm decision which one we'll go with — it's possible to iterate after a first prototype — but we should discuss a proposed specific UX design and come to a conclusion on what UX to build first. So I think a good next step would be for @SrishtiHasijani31 to take on board the points in your comment, and then propose a UX design in that thread for further feedback.
We'll also want to discuss what the backend implementation will look like. That can be a thread in #backend, and should be linked to from the issue. After those two discussions, we'll be glad to see a PR.

There are many git commits with uninformative log messages such as "code updated". […] I would expect these commits to be squashed into one with information about precisely what has changed, where, and why.

Yes. The eventual PR will probably be several commits, but most of these would be squashed together. See our commit style guide: https://zulip.readthedocs.io/en/latest/contributing/commit-discipline.html

I think @SrishtiHasijani31 is mainly looking for feedback on whether her approach makes sense from Zulip's perspective.

Great. I think the best venue for that discussion will be in Zulip as I described, rather than here on GitHub; then after those discussions conclude, a PR can follow.

Starting a discussion in #design for this and providing context from previous discussion is the right step. There folks will be able to help you out by propositing designs they think might work best or suggest improvments in your proposed design. Tim/Alya are currenlty not  working their normal schedule due to personal reasons. So, things can move more slowly than they normally do.

@SrishtiHasijani31 The next steps for this issue will be discussion in Zulip, not a PR. Please see my comment here: https://github.com/zulip/zulip/pull/26185#issuecomment-1625920207 and the one after it.
(Those comments are currently hidden on this page because that is what GitHub does with long threads. That's one of the reasons that this isn't the place to have the discussion.)
For that reason, I'm closing this PR. If you would like to work on this issue, please do so by first picking up that discussion in Zulip.


Popup is not displayed outside the keyboard

From @Dolfost:
bug: when im enablind popup on keypress, here is a bug. Popup is not displayed outside the keyboard

I've looked into this issue once, but I wasn't able to fix it. This would be a good first issue for someone with more Android experience than I have.

Not 100% but I think the app need permission to draw over other apps for this to work properly.


Update validator status

update validator status according to new spec: https://hackmd.io/bQxMDRt1RbS1TLno8K4NPg
removed validator status groups (it's simpler to just define all statuses)
didn't include next_state_epoch but included description how to get it for each status

cc @protolambda @paulhauner

What happens if the validator's balance drops below 16 Ether?  I don't see either ExitedVoluntarily or ExitedSlashed describing this state.
I'm also a little concerned that the names quite verbose yet unclear regarding sequence.  Would you be able to order WaitingForEligibility, WaitingForFinality and WaitingInQueue without looking at their definitions?  Can you go from waiting for finality to waiting for eligibility in case of a reorg?
Providing the transition epoch is useful in terms of standardizing the information (although we should include this when waiting in the queue, as a common user question is "when will my validator start?").
The additional states are welcome, but the simplicity of the existing group_state definitions is useful.  For example, what does ActiveAwaitingVoluntaryExit gain over the existing active_exiting state?  I would prefer to see this format retained, as it is easier to obtain the high-level state of a validator (pending,active,exited,withdrawable) without having to know all of the substates.

Just for convenience here is an overview (changed withdrawable to withdrawable_{voluntary,slashed} and added withdrawn_{voluntary,slashed})
proposal1            proposal2                       info
-------------------  ------------------------------  ------------------------------------------------------
pending_initialized  waiting_for_eligibility         The validator does not have enough funds.
                     waiting_for_finality            Once the chain finalizes, the validator will become eligible.
pending_queued       waiting_in_queue                The validator is eligible to be activated, however it must wait for other validators to activate first.
                     standby_for_active              The validator has reached the front of the activation queue and has been assigned an activation epoch (next_state_epoch).
active_ongoing       active                          The validator is active, unslashed and has not had an exit included in the chain. The validator is expected to perform duties until they exit voluntarily or are slashed.
active_exiting       active_awaiting_slashed_exit    The validator is active, but a SignedVoluntaryExit has been included on-chain. The validator is expected to perform duties until next_state_epoch.
active_slashed       active_awaiting_voluntary_exit  The validator is active, but it has been slashed. The validator is expected to perform duties until next_state_epoch.
exited_unslashed     exited_voluntarily              The validator exited voluntarily and is no longer required to perform duties. They will become withdrawable at next_state_epoch.
exited_slashed       exited_slashed                  The validator was slashed and exited by the protocol. They will become withdrawable at next_state_epoch.
withdrawal_possible  withdrawable_voluntarily        The validator is eligible to withdraw thier balance.
                     withdrawable_slashed            The slashed validator is eligible to withdraw thier balance.
withdrawal_done      withdrawn_voluntarily           The validator has withdrawn their ETH. This is not possible in phase 0.
                     withdrawn_slashed               The slashed validator has withdrawn their ETH. This is not possible in phase 0.

I will use proposal2 in our database for now

@guybrush your descriptions of active_awaiting_slashed_exit and active_awaiting_voluntary_exit are flipped

@guybrush your descriptions of active_awaiting_slashed_exit and active_awaiting_voluntary_exit are flipped

updated in my original comment

@paulhauner would you like to chip in and/or update validator status document before we make changes here?

Responses

What happens if the validator's balance drops below 16 Ether? I don't see either ExitedVoluntarily or ExitedSlashed describing this state.

This is a good point, I can't see any way to determine the difference between a voluntary exit and a low-balance exit without doing expensive historical searches.
It seems we need to group voluntary and low-balance exits.

the simplicity of the existing group_state definitions is useful

I find the distinction between "states" and "group states" to be unclear. There's nowhere I can see (except via bullet-point nesting in the HackMD) that states what's a "state" and what's a "group state". Here's two questions that I think identify the ambiguity:

"Why do I get active_ongoing when I query with active?"
"Why are none of my validators active?"

I think we need to be explicit about groups and have separate fields and queries for "states" and "group states". It is more verbose, but I think the API is currently ambiguous rather than concise.
Suggestions

Add a status_group field to the Validator response that includes @mcdee's groups (not attached to name of field),
Remove the link to my HackMD, since it's unlikely to be maintained long term (not due to lack of caring, just being realistic).
Remove the "voluntarily" qualifications (see table below)

Updated status table
I've updated @guybrush's handy table as per my suggestions.
proposal1            proposal2                       status_group     info
-------------------  -----------------------------  ------            ------------------------------------------------
pending_initialized  waiting_for_eligibility        pending           The validator does not have enough funds.
                     waiting_for_finality           pending           Once the chain finalizes, the validator will become eligible.
pending_queued       waiting_in_queue               pending           The validator is eligible to be activated, however it must wait for other validators to activate first.
                     standby_for_active             pending           The validator has reached the front of the activation queue and has been assigned an activation epoch (next_state_epoch).
active_ongoing       active                         active            The validator is active, unslashed and has not had an exit included in the chain. The validator is expected to perform duties until they exit voluntarily or are slashed.
active_exiting       active_awaiting_exit           active            The validator is active, but a SignedVoluntaryExit has been included on-chain or the validator was ejected due to low balance. The validator is expected to perform duties until next_state_epoch.
active_slashed       active_awaiting_slashed_exit   active            The validator is active, but it has been slashed. The validator is expected to perform duties until next_state_epoch.
exited_unslashed     exited                         exited            The validator exited voluntarily or due to low balance and is no longer required to perform duties. They will become withdrawable at next_state_epoch.
exited_slashed       exited_slashed                 exited            The validator was slashed and exited by the protocol. They will become withdrawable at next_state_epoch.
withdrawal_possible  withdrawable                   withdrawal        The validator is eligible to withdraw thier balance.
                     withdrawable_slashed           withdrawal        The slashed validator is eligible to withdraw thier balance.
withdrawal_done      withdrawn                      withdrawal        The validator has withdrawn their ETH. This is not possible in phase 0.
                     withdrawn_slashed              withdrawal        The slashed validator has withdrawn their ETH. This is not possible in phase 0.

I put more thought into it and I think having the status in the api is redundant information. But it introduces names for state-conditions and putting these names into the api makes everyone use the same words for the same things.
Here is another proposal for status-names, this time with corresponding conditions of the state (against spec-variables):
validator_status          activation_epoch  withdrawable_epoch  exit_epoch            effective_balance      slashed
----                      ----              ----                ----                  ----                   ----
pending_depositing        >  CURRENT_EPOCH  >  CURRENT_EPOCH    == FAR_FUTURE_EPOCH   <  MIN_DEPOSIT_AMOUNT  f
pending_deposited         >  CURRENT_EPOCH  >  CURRENT_EPOCH    == FAR_FUTURE_EPOCH   >= MIN_DEPOSIT_AMOUNT  f
pending_initialized       >  CURRENT_EPOCH  >  CURRENT_EPOCH    == FAR_FUTURE_EPOCH   >= MIN_DEPOSIT_AMOUNT  f
pending_queued            >  CURRENT_EPOCH  >  CURRENT_EPOCH    == FAR_FUTURE_EPOCH   >= MIN_DEPOSIT_AMOUNT  f
active_ongoing            <= CURRENT_EPOCH  >  CURRENT_EPOCH    == FAR_FUTURE_EPOCH   >  EJECTION_BALANCE    f
active_exiting            <= CURRENT_EPOCH  >  CURRENT_EPOCH    <  FAR_FUTURE_EPOCH   >  EJECTION_BALANCE    f
active_slashed            <= CURRENT_EPOCH  >  CURRENT_EPOCH    <  FAR_FUTURE_EPOCH   >  EJECTION_BALANCE    t
active_ejected            <= CURRENT_EPOCH  >  CURRENT_EPOCH    <  FAR_FUTURE_EPOCH   <= EJECTION_BALANCE    f
exited_voluntarily        <= CURRENT_EPOCH  >  CURRENT_EPOCH    <= CURRENT_EPOCH      >  EJECTION_BALANCE    f
exited_slashed            <= CURRENT_EPOCH  >  CURRENT_EPOCH    <= CURRENT_EPOCH      >  EJECTION_BALANCE    t
exited_ejected            <= CURRENT_EPOCH  >  CURRENT_EPOCH    <= CURRENT_EPOCH      <= EJECTION_BALANCE    f
withdrawable_voluntarily  <= CURRENT_EPOCH  <= CURRENT_EPOCH    <= CURRENT_EPOCH      >  EJECTION_BALANCE    f
withdrawable_slashed      <= CURRENT_EPOCH  <= CURRENT_EPOCH    <= CURRENT_EPOCH      >  EJECTION_BALANCE    t
withdrawable_ejected      <= CURRENT_EPOCH  <= CURRENT_EPOCH    <= CURRENT_EPOCH      <= EJECTION_BALANCE    f
withdrawn_voluntarily     <= CURRENT_EPOCH  <= CURRENT_EPOCH    <= CURRENT_EPOCH      >  EJECTION_BALANCE    f
withdrawn_slashed         <= CURRENT_EPOCH  <= CURRENT_EPOCH    <= CURRENT_EPOCH      >  EJECTION_BALANCE    t
withdrawn_ejected         <= CURRENT_EPOCH  <= CURRENT_EPOCH    <= CURRENT_EPOCH      <= EJECTION_BALANCE    f

withdrawable_voluntarily  <= CURRENT_EPOCH  <= CURRENT_EPOCH              <= CURRENT_EPOCH    <= CURRENT_EPOCH      >  EJECTION_BALANCE    f        The validator is eligible to withdraw thier balance.
...
withdrawable_ejected      <= CURRENT_EPOCH  <= CURRENT_EPOCH              <= CURRENT_EPOCH    <= CURRENT_EPOCH      <= EJECTION_BALANCE    f        The ejected validator is eligible to withdraw thier balance.

This is not strictly true, since it's possible to be ejected due to low balance and then submit a deposit to increase your effective_balance above EJECTION_BALANCE.

Thank you very much! I was not aware of this.

@guybrush I think I may have missed your point, but my point was that was cannot* distinguish between a voluntarily/ejected validator. As such, I would say that the API should not make a distinction between these two states.
*: It can be determined by searching back through the history of the chain, but this is too computationally expensive for this endpoint, in my opinion.

Whats the conclusion here, should I update statuses with @paulhauner last update: https://github.com/ethereum/eth2.0-APIs/pull/94#issuecomment-708110821 ?
I guess I should pull md file inside repo?
Should we get groups back or keep them removed? What's client implementation status on this endpoint?

Regarding the states, I'm fine with Paul's states except for the last three.  As we do not know how withdrawals are going to occur we don't know if there are extra states that will go in there (withdrawal_pending, that type of thing).  We also don't care if a validator is slashed or not at the point that it is withdrawable, as there is no difference in functionality.
Because of the above I would drop the last three states (withdrawable_slashed, withdrawn and withdrawn_slashed) and perhaps change the last group state to "done", "finished" or something else that gives us a bit of wriggle room when it comes to implementing withdrawals.

"done", "finished" or something else that gives us a bit of wriggle room when it comes to implementing withdrawals.

I'm happy to remove the withdrawn states, since we can't reach them. But I would advise against the "done" or "finished" states; they have no meaning beyond inferring that another state is impossible. Since we do not know how withdrawals are going to occur, I would avoid making any statements about it.

...I would advise against the "done" or "finished" states...

We can leave the group state at "withdrawal", then.

I had a couple of lingering questions on slashed related states and  the sequence of transition
https://github.com/ethereum/eth2.0-APIs/pull/94#discussion_r520957680

Do we want to proceed with this?  The API is basically out of the door in its V1 state now that mainnet is launched, and although there are benefits to this it will no doubt cause confusion and problems as beacon nodes transition from one to the other at an uneven rate.
Perhaps push this to V2, whenever that may be?

That might be good idea. In V2 of api we can add that under /v2 prefix and gradually deprecate

don't seems this will move forward


No object detection for panoramic photos Tensorflow

Good day. I ask for your help.
I tried almost all the models, but I didn't get the desired result.
TF finds objects but only at close proximity, if the photo is panoramic, then the detection does not work or works extremely poorly

The marked images contain both panoramic and close-up photographs. About the same amount
  faster_rcnn {
    num_classes: 12
    image_resizer {
      keep_aspect_ratio_resizer {
        min_dimension: 600
        max_dimension: 1024
      }
    }
    feature_extractor {
      type: "faster_rcnn_resnet50"
      first_stage_features_stride: 16
    }
    first_stage_anchor_generator {
      grid_anchor_generator {
        height_stride: 16
        width_stride: 16
        scales: 0.25
        scales: 0.5
        scales: 1.0
        scales: 2.0
        aspect_ratios: 0.5
        aspect_ratios: 1.0
        aspect_ratios: 2.0
      }
    }
    first_stage_box_predictor_conv_hyperparams {
      op: CONV
      regularizer {
        l2_regularizer {
          weight: 0.0
        }
      }
      initializer {
        truncated_normal_initializer {
          stddev: 0.00999999977648
        }
      }
    }
    first_stage_nms_score_threshold: 0.0
    first_stage_nms_iou_threshold: 0.699999988079
    first_stage_max_proposals: 50
    first_stage_localization_loss_weight: 2.0
    first_stage_objectness_loss_weight: 1.0
    initial_crop_size: 14
    maxpool_kernel_size: 2
    maxpool_stride: 2
    second_stage_box_predictor {
      mask_rcnn_box_predictor {
        fc_hyperparams {
          op: FC
          regularizer {
            l2_regularizer {
              weight: 0.0
            }
          }
          initializer {
            variance_scaling_initializer {
              factor: 1.0
              uniform: true
              mode: FAN_AVG
            }
          }
        }
        use_dropout: false
        dropout_keep_probability: 1.0
      }
    }
    second_stage_post_processing {
      batch_non_max_suppression {
        score_threshold: 0.300000011921
        iou_threshold: 0.600000023842
        max_detections_per_class: 20
        max_total_detections: 20
      }
      score_converter: SOFTMAX
    }
    second_stage_localization_loss_weight: 2.0
    second_stage_classification_loss_weight: 1.0
    second_stage_batch_size: 49
  }
}
train_config {
  batch_size: 1
  data_augmentation_options {
    random_horizontal_flip {
    }
  }
  optimizer {
    momentum_optimizer {
      learning_rate {
        manual_step_learning_rate {
          initial_learning_rate: 0.000300000014249

          schedule {
            step: 900000
            learning_rate: 2.99999992421e-05
          }
          schedule {
            step: 1200000
            learning_rate: 3.00000010611e-06
          }
        }
      }
      momentum_optimizer_value: 0.899999976158
    }
    use_moving_average: false
  }
  gradient_clipping_by_norm: 10.0
  fine_tune_checkpoint: "C:/tensorflow1/models/research/object_detection/faster_rcnn_resnet50_lowproposals_coco_2018_01_28/model.ckpt"
  from_detection_checkpoint: true
  num_steps: 200000
}
train_input_reader {
  label_map_path: "C:/tensorflow1/models/research/object_detection/training/labelmap.pbtxt"
  tf_record_input_reader {
    input_path: "C:/tensorflow1/models/research/object_detection/train.record"
  }
}
eval_config {
  num_examples: 316
  max_evals: 10
  use_moving_averages: false
}
eval_input_reader {
  label_map_path: "C:/tensorflow1/models/research/object_detection/training/labelmap.pbtxt"
  shuffle: false
  num_readers: 1
  tf_record_input_reader {
    input_path: "C:/tensorflow1/models/research/object_detection/test.record"
  }
}

Object_detection_image.py
######## Image Object Detection Using Tensorflow-trained Classifier #########
# Import packages
import os
import cv2
import numpy as np
import tensorflow as tf
import sys

# This is needed since the notebook is stored in the object_detection folder.
sys.path.append("..")

# Import utilites
from utils import label_map_util
from utils import visualization_utils as vis_util

# Name of the directory containing the object detection module we're using
MODEL_NAME = 'inference_graph'
IMAGE_NAME = 'test1.jpeg'

# Grab path to current working directory
CWD_PATH = os.getcwd()

# Path to frozen detection graph .pb file, which contains the model that is used
# for object detection.
PATH_TO_CKPT = os.path.join(CWD_PATH,MODEL_NAME,'frozen_inference_graph.pb')

# Path to label map file
PATH_TO_LABELS = os.path.join(CWD_PATH,'training','labelmap.pbtxt')

# Path to image
PATH_TO_IMAGE = os.path.join(CWD_PATH,IMAGE_NAME)

# Number of classes the object detector can identify
NUM_CLASSES = 12

# Load the label map.
# Label maps map indices to category names, so that when our convolution
# network predicts `5`, we know that this corresponds to `king`.
# Here we use internal utility functions, but anything that returns a
# dictionary mapping integers to appropriate string labels would be fine
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)
category_index = label_map_util.create_category_index(categories)

# Load the Tensorflow model into memory.
detection_graph = tf.Graph()
with detection_graph.as_default():
    od_graph_def = tf.GraphDef()
    with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:
        serialized_graph = fid.read()
        od_graph_def.ParseFromString(serialized_graph)
        tf.import_graph_def(od_graph_def, name='')

    sess = tf.Session(graph=detection_graph)

# Define input and output tensors (i.e. data) for the object detection classifier

# Input tensor is the image
image_tensor = detection_graph.get_tensor_by_name('image_tensor:0')

# Output tensors are the detection boxes, scores, and classes
# Each box represents a part of the image where a particular object was detected
detection_boxes = detection_graph.get_tensor_by_name('detection_boxes:0')

# Each score represents level of confidence for each of the objects.
# The score is shown on the result image, together with the class label.
detection_scores = detection_graph.get_tensor_by_name('detection_scores:0')
detection_classes = detection_graph.get_tensor_by_name('detection_classes:0')

# Number of objects detected
num_detections = detection_graph.get_tensor_by_name('num_detections:0')

# Load image using OpenCV and
# expand image dimensions to have shape: [1, None, None, 3]
# i.e. a single-column array, where each item in the column has the pixel RGB value
image = cv2.imread(PATH_TO_IMAGE)
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
image_expanded = np.expand_dims(image_rgb, axis=0)

# Perform the actual detection by running the model with the image as input
(boxes, scores, classes, num) = sess.run(
    [detection_boxes, detection_scores, detection_classes, num_detections],
    feed_dict={image_tensor: image_expanded})

# Draw the results of the detection (aka 'visulaize the results')

vis_util.visualize_boxes_and_labels_on_image_array(
    image,
    np.squeeze(boxes),
    np.squeeze(classes).astype(np.int32),
    np.squeeze(scores),
    category_index,
    use_normalized_coordinates=True,
    line_thickness=2,
    min_score_thresh=0.30)

# All the results have been drawn on image. Now display the image.
cv2.imshow('Object detector', image)

# Press any key to close the image
cv2.waitKey(0)

# Clean up
cv2.destroyAllWindows()

I have now copied the panoramic photo to the training folder in the folder for object_detection. No matches found that is, a completely identical image from the training set does not find a match

There are two simple possibilities:

Preprocessing. How does the panoramic image actually 'look' when passed to mode? It might be distorted.
It is possible that the model was trained only on small images. In that case it might not recognize objects on larger images, because it contains different features. Or rather does not contain expected features.

Good day. I did not understand about point 1.
Point 2: No, the training kit also includes panoramic and close-up photos. That is why I have attached sample photos

There are two simple possibilities:

Preprocessing. How does the panoramic image actually 'look' when passed to mode? It might be distorted.
It is possible that the model was trained only on small images. In that case it might not recognize objects on larger images, because it contains different features. Or rather does not contain expected features.

Good day. I did not understand about point 1.
Point 2: No, the training kit also includes panoramic and close-up photos. That is why I have attached sample photos

About point 1:
When you pass an input to the model it can be transformed in various ways, depending on how you set up your pipeline.
Resolution, colors, cropping etc. it is possible that your evaluation data undergoes different transformation than your training data, if that's the case your model will have trouble recognizing the features it learned on training data.
Anyway, I do recommend that you look at the raw output of your model: boxes, scores, classes, num. It will tell you more than the resulting bounding boxes.

О пункте 1:
Когда вы передаете входные данные в модель, они могут быть преобразованы различными способами, в зависимости от того, как вы настроили свой конвейер.
Разрешение, цвета, обрезка и т. Д. Возможно, что ваши оценочные данные претерпевают иное преобразование, чем ваши тренировочные данные, если в этом случае вашей модели будет трудно распознать особенности, которые она изучила на тренировочных данных.
Во всяком случае, я рекомендую вам посмотреть на сырье выхода модели: boxes, scores, classes, num. Он расскажет вам больше, чем получившиеся ограничивающие рамки.

Thanks for your reply. Yes, I understand what you mean.
However, I am using the same .config to train and find objects. I have attached the code for this config

About point 1:
When you pass an input to the model it can be transformed in various ways, depending on how you set up your pipeline.
Resolution, colors, cropping etc. it is possible that your evaluation data undergoes different transformation than your training data, if that's the case your model will have trouble recognizing the features it learned on training data.
Anyway, I do recommend that you look at the raw output of your model: boxes, scores, classes, num. It will tell you more than the resulting bounding boxes.

Thanks for your reply. Yes, I understand what you mean.
However, I am using the same .config to train and find objects. I have attached the code for this config

About point 1:
When you pass an input to the model it can be transformed in various ways, depending on how you set up your pipeline.
Resolution, colors, cropping etc. it is possible that your evaluation data undergoes different transformation than your training data, if that's the case your model will have trouble recognizing the features it learned on training data.
Anyway, I do recommend that you look at the raw output of your model: boxes, scores, classes, num. It will tell you more than the resulting bounding boxes.

Ok,
Could you give your script for finding objects?

My object_detection.py
######## Image Object Detection Using Tensorflow-trained Classifier #########
#
# Author: Evan Juras
# Date: 1/15/18
# Description:
# This program uses a TensorFlow-trained neural network to perform object detection.
# It loads the classifier and uses it to perform object detection on an image.
# It draws boxes, scores, and labels around the objects of interest in the image.

## Some of the code is copied from Google's example at
## https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb

## and some is copied from Dat Tran's example at
## https://github.com/datitran/object_detector_app/blob/master/object_detection_app.py

## but I changed it to make it more understandable to me.

# Import packages
import os
import cv2
import numpy as np
import tensorflow as tf
import sys

# This is needed since the notebook is stored in the object_detection folder.
sys.path.append("..")

# Import utilites
from utils import label_map_util
from utils import visualization_utils as vis_util

# Name of the directory containing the object detection module we're using
MODEL_NAME = 'inference_graph'
IMAGE_NAME = 'test1.jpeg'

# Grab path to current working directory
CWD_PATH = os.getcwd()

# Path to frozen detection graph .pb file, which contains the model that is used
# for object detection.
PATH_TO_CKPT = os.path.join(CWD_PATH,MODEL_NAME,'frozen_inference_graph.pb')

# Path to label map file
PATH_TO_LABELS = os.path.join(CWD_PATH,'training','labelmap.pbtxt')

# Path to image
PATH_TO_IMAGE = os.path.join(CWD_PATH,IMAGE_NAME)

# Number of classes the object detector can identify
NUM_CLASSES = 12

# Load the label map.
# Label maps map indices to category names, so that when our convolution
# network predicts `5`, we know that this corresponds to `king`.
# Here we use internal utility functions, but anything that returns a
# dictionary mapping integers to appropriate string labels would be fine
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)
category_index = label_map_util.create_category_index(categories)

# Load the Tensorflow model into memory.
detection_graph = tf.Graph()
with detection_graph.as_default():
    od_graph_def = tf.GraphDef()
    with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:
        serialized_graph = fid.read()
        od_graph_def.ParseFromString(serialized_graph)
        tf.import_graph_def(od_graph_def, name='')

    sess = tf.Session(graph=detection_graph)

# Define input and output tensors (i.e. data) for the object detection classifier

# Input tensor is the image
image_tensor = detection_graph.get_tensor_by_name('image_tensor:0')

# Output tensors are the detection boxes, scores, and classes
# Each box represents a part of the image where a particular object was detected
detection_boxes = detection_graph.get_tensor_by_name('detection_boxes:0')

# Each score represents level of confidence for each of the objects.
# The score is shown on the result image, together with the class label.
detection_scores = detection_graph.get_tensor_by_name('detection_scores:0')
detection_classes = detection_graph.get_tensor_by_name('detection_classes:0')

# Number of objects detected
num_detections = detection_graph.get_tensor_by_name('num_detections:0')

# Load image using OpenCV and
# expand image dimensions to have shape: [1, None, None, 3]
# i.e. a single-column array, where each item in the column has the pixel RGB value
image = cv2.imread(PATH_TO_IMAGE)
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
image_expanded = np.expand_dims(image_rgb, axis=0)

# Perform the actual detection by running the model with the image as input
(boxes, scores, classes, num) = sess.run(
    [detection_boxes, detection_scores, detection_classes, num_detections],
    feed_dict={image_tensor: image_expanded})

# Draw the results of the detection (aka 'visulaize the results')

vis_util.visualize_boxes_and_labels_on_image_array(
    image,
    np.squeeze(boxes),
    np.squeeze(classes).astype(np.int32),
    np.squeeze(scores),
    category_index,
    use_normalized_coordinates=True,
    line_thickness=2,
    min_score_thresh=0.30)

# All the results have been drawn on image. Now display the image.
cv2.imshow('Object detector', image)

# Press any key to close the image
cv2.waitKey(0)

# Clean up
cv2.destroyAllWindows()

Try Feature Pyramid Network on top of Faster R-CNN. They are good at recognizing objects at vastly different scales.

Try Feature Pyramid Network on top of Faster R-CNN. They are good at recognizing objects at vastly different scales.

Thanks for your reply. Could you give a link where I can study about this? Desirable with a real example?
I understand correctly that you think that the problem is with the model, not with something else

Try Feature Pyramid Network on top of Faster R-CNN. They are good at recognizing objects at vastly different scales.

Thanks for your reply. Could you give a link where I can study about this? Desirable with a real example?
I understand correctly that you think that the problem is with the model, not with something else

https://medium.com/@jonathan_hui/understanding-feature-pyramid-networks-for-object-detection-fpn-45b227b9106c
https://github.com/DetectionTeamUCAS/FPN_Tensorflow

Try Feature Pyramid Network on top of Faster R-CNN. They are good at recognizing objects at vastly different scales.

Thanks for your reply. Could you give a link where I can study about this? Desirable with a real example?
I understand correctly that you think that the problem is with the model, not with something else

https://medium.com/@jonathan_hui/understanding-feature-pyramid-networks-for-object-detection-fpn-45b227b9106c
https://github.com/DetectionTeamUCAS/FPN_Tensorflow

Thank you so much. I started training, I'm testing.
Question: I have a photo where I mark one item, but there is another item on it that I have not marked. Could this affect the bottom line?
In other words, I can have 2 identical photos where the first one is marked with PRODUCT1, and the second with PRODUCT2

You should mark all the product you are detecting because if your network finds some similar product in the picture which are not marked but should be then the weights will adjust accordingly and accuracy may decrease.

@hashtriton Has this issue been resolved?


invalid test cases for var instruction printing with nzp option

There is a bug in function to print the non-zero, non-negative and power of two options printing in Inst.cpp. Invalid test cases are added to expose the bug.

Don't just check that the result is invalid, you need a full parse/print loop. At the end you check that the parsed/printed code is the same as at the start.

LGTM


Integration Testing

As a developer, I want integration tests to test the final results of the CLI and prevent regressions on future development.

https://github.com/charmbracelet/vhs?tab=readme-ov-file#continuous-integration

Happy Path Testing

Start a session
Switch to a different session
Switch back to the original session
Switch to a git session
Switch to a git worktree session

VHS requires a particular environment with all the dependencies that sesh needs (i.e. tmux, zoxide, fzf, etc...). This has proven to be a bit more work than I expected.
We may want to use Nix (thanks to Shyam on stream) or Dockerize it. But VHS's ascii output could prove useful if someone wants to spend more time on this.
For now, I think unit testing needs to be prioritized and we can find ways to mock some of the integrations.


Shappie needs a polling capability so he can help us reach consensus

Shappie needs the ability to run a poll in the discord server. Likely we'd want to model this after something like a "PollBot" which exists in standalone today integrating the key features and interface into Shappie. We'd likely want to reserve the ability to create polls to certain roles, only allow polls in a secure polls channel and would need to be able to ensure a person can only vote once on a given poll instance. Adding a notification feature and a timer would be icing on the cake if possible.

At the very least, being able to extract who reacted what on a message (e.g. a proposal) can enable us to compute if proposal passed quickly. As people who react two things would be counted a abstaining.
This could help, maybe
https://stackoverflow.com/questions/71901155/how-do-i-fetch-all-reactions-from-a-specific-message-discord-js

This seems to tightly related to #18, is there a reason it's separate?

Have dialog with user to get more details and check for channel to post in to handle permissions.
Log reactions in database.
Log polls in database to be able to track and remove multi-votes.


Removing ITK-VTK glue and older version of Thin shell demons

Did only for Ubuntu till now. Once it passes will do for Windows.

Closing this one to maintain history.
Will open a new PR with fewer logical commits.


[SPARK-40194][SQL] SPLIT function on empty regex should truncate trailing empty string

Context

Spark 3.4: https://github.com/apache/spark/commit/247306c0fe

What changes were proposed in SPARK pull request?
Since Spark 3.4, split function ignores trailing empty strings when regex parameter is empty.
I.e. split('hello', '') will produce ['h', 'e', 'l', 'l', 'o'] instead of ['h', 'e', 'l', 'l', 'o', ''].
Old behavior is preserved when limit parameter is explicitly set to negative value - split('hello', '', -1)
Why are the changes needed in Spark?
N/A
Does this PR introduce any user-facing change?
Yes. Split behavior is different.
Why it might affect RAPIDS?

split function output changes when empty regex parameter is provided and limit parameter is not specified or set to 0. In this case a trailing empty string is ignored.

Impact on Testing?
Yes
Requires Doc update?
No

Old behavior is preserved when limit parameter is explicitly set to negative value - split('hello', '', -1)

This behavior has been changed in the code but the description has not been updated (https://github.com/apache/spark/pull/37631/commits/74b3f0b53c2694dd0e6b0cdb1e8e5a1dffa85219).
Eventually, the trailing empty string will alwasy be truncated regradless of limit.

This does not affect Plugin, because Plugin does not support empty delimiter pattern so far.
[scala> Seq(("hello")).toDF("s").repartition(1).selectExpr("split(s, '')").show
22/11/16 02:56:30 WARN GpuOverrides:
!Exec <ProjectExec> cannot run on GPU because not all expressions can be replaced
  @Expression <Alias> cast(split(s#44, , -1) as string) AS split(s, , -1)#49 could run on GPU
    @Expression <Cast> cast(split(s#44, , -1) as string) could run on GPU
      !Expression <StringSplit> split(s#44, , -1) cannot run on GPU because An empty delimiter pattern is not supported
        @Expression <AttributeReference> s#44 could run on GPU
        @Expression <Literal>  could run on GPU
        @Expression <Literal> -1 could run on GPU
  !Exec <ShuffleExchangeExec> cannot run on GPU because Columnar exchange without columnar children is inefficient
    @Partitioning <SinglePartition$> could run on GPU
    ! <LocalTableScanExec> cannot run on GPU because GPU does not currently support the operator class org.apache.spark.sql.execution.LocalTableScanExec
      @Expression <AttributeReference> s#44 could run on GPU

+---------------+
| split(s, , -1)|
+---------------+
|[h, e, l, l, o]|
+---------------+

But if we decide to support empty delimiter in the future, this should be taken care of.


Allow any user to trigger an event?

Hi,
For a forum topic how can I use a webhook to update total number of replies. I need to register the event for all users? Or just register it as an client event.
P.S. I know it sound strange that the topic and replies are different services, but its just an example :+1:

I am not sure I understand? Do you mean the total number of replies across all users? In that case the webhook would be more like an "admin" webhook that isn't specific to any user.

Yes, exactly and "admin/system" webhook that isn't specific to any user. Any examples of that? Thanks.

Hmm, not directly. I think the best way to accommodate this is to allow you to hook in to the webhook registration path and add whatever filters you want including broadcast filters so that you have a set of events that you can send to. That way it can be supported without the client having to do anything and you can send notifications to any event you create this way. Shouldn't take too long for us to come up with. Let me know what you think. Thoughts?

This is now supported in commit a7e0496fa7f7343553829938abb496254c76545b -- you can now register an IWebHookRegistrar implementation which can add, modify, or reject a WebHook registration going through the WebHookRegistrationsController. This allows you to add filters can be used for broadcasting and group-casting.

Thanks for such speedy response. I will have a look at your commit. Will you also be adding an example to the samples?

I'll add it to the samples later but all you have to do really is provide a public, non-abstract implementation of the IWebRegistrar interface. That will ensure you get called as part of the registration process. You can then add a broadcast filter following the rules (either it be listed in an IWebHookFilterManager implementation or it is prefixed with "MS_Private_" to remain private for the server side). With the filter registered you can send notifications to all users having that filter using the usual NotifyAllAsync model described in [1].
Hope this helps,
Henrik
[1] https://blogs.msdn.microsoft.com/webdev/2015/12/31/new-year-updates-to-asp-net-webhooks-preview/


Feathers-client not return correct error object.

I am using feathers-client with ionic2. All services are returning wrong error object without message field. Error messgae field is required for user feedback. I guess that is because of angular2 as If I use angular2 http instead of feathers-client then correct error object is returned from all services. Is it possible to use angular2 Http with feathers client? I am currently using superagent with feathers-client

What is it returning? Does this happen with clients other than superagent (if not it might be a bug in the superagent adapter)?
Of course you can use the HTTP methods directly (see http://docs.feathersjs.com/clients/vanilla-rest.html). We usually recommend using websockets instead of the REST clients however so you also get the advantage of Feathers real-time capabilities.

I'm going to close this. Please reopen if you can provide more information.


Bicep or Terraform?
Bicep
Module Classification?
Resource Module
Module Name
avm/res/batch/batch-account
Module Details
This module was migrated from CARML without an owner identified.
Do you want to be the new owner of this module?
No
Module Owner's GitHub Username (handle)
No response
(Optional) Secondary Module Owner's GitHub Username (handle)
No response

I CONFIRM I WISH TO OWN THIS AVM MODULE AND UNDERSTAND THE REQUIREMENTS AND DEFINITION OF A MODULE OWNER

Hi @didayal-msft,
Thanks for requesting/proposing to be an AVM module owner!
We just want to confirm you agree to the below pages that define what module ownership means:

Team Definitions & RACI
Shared Specification (Bicep & Terraform)
Module Support

Any questions or clarifications needed, let us know!
If you agree, please just reply to this issue with the exact sentence below (as this helps with our automation 👍):
"I CONFIRM I WISH TO OWN THIS AVM MODULE AND UNDERSTAND THE REQUIREMENTS AND DEFINITION OF A MODULE OWNER"
Thanks,
The AVM Core Team
#RR

NOTE:

This Orphaned Module issue MUST remain open until the ownership is fully confirmed!
Once the Orphaned Module issue was closed, it MUST remain closed. If the module will subsequently become orphaned again, a new Orphaned Module issue must be opened.

Hi @didayal-msft,
Thanks for confirming that you wish to own this AVM module and understand the related requirements and responsibilities!
We just want to ask you to double check a few important things.
Please use the following values explicitly as provided in the module index page:

You must be the owner of the GitHub teams defined in the ModuleOwnersGHTeam and ModuleContributorsGHTeam columns
Pleas check that your name has been updated in the module index page (this should happen shortly after you confirmed ownership).

You can now take ownership of this module and start improving it as needed! ✅ Happy coding! 🎉
Any further questions or clarifications needed, let us know!
Thanks,
The AVM Core Team

NOTE:

This Orphaned Module issue MUST remain open until the ownership is fully confirmed!
Once the Orphaned Module issue was closed, it MUST remain closed. If the module will subsequently become orphaned again, a new Orphaned Module issue must be opened.

@didayal-msft, can you please create the two GH teams for this module in the Azure organization:

@Azure/avm-res-batch-batchaccount-module-owners-bicep
@Azure/avm-res-batch-batchaccount-module-contributors-bicep

(Do not include @Azure in the name of the teams!).
Please respond to this message once you've created them both, and I'll help with the rights assignment. Thanks!

@didayal-msft, this is just a gentle reminder. :) Please let me know once you created the above teams, as I would then need to add them to the right parent teams, which then will need to be approved by you. Thanks!

@matebarabas  I have created the 2 teams.

Teams added to their parents. Closing this issue.


bug: USB Connect Doesn't Work

Overview
I'm on Ubuntu 18.04 using v3.19.0. I tried to enable ssh several times for the robot but the app would not recognize the usb connection - despite giving me a wired IP address - by:

Failing to show the usb connection sign

Failing to upload the ssh key using the curl command in the docs. (It gave a port error.)

Trying to remedy this I switched off the wifi hypothesizing that it might be part of the interference, not remembering that the only way to turn it back on was by a usb connection. Now I have a non-functioning robot.
I tried using three different A/B USB cables and even tried a BB USB cable connection straight to the raspberry pi, so I'd suspect that the cable isn't the issue. I also tried using a computer running Windows 10 instead (a dual boot with Ubuntu if it matters).
What troubleshooting options do I have?

Hi @gfleetwood, sorry you are seeing this. We do have some basic info on troubleshooting connectivity issues here, but it looks like you may have already seen that. It sounds like since you are getting an IP address on the USB interface this could be a problem with your network config causing the mDNS (bonjuor) multicast discovery packets to get dropped/misrouted thus causing the app to not see the robot.
But unfortunately, I don't have enough info yet to make a complete diagnosis. Some additional questions for you:

Have you ever been able to connect to this robot on your computer via the App?
Other than disabling the wifi (ostensibly through the app?) and the failed curl command, what else has changed since you were able to connect to the robot previously?
It's also worth double checking your network configuration to make sure these ports are open.
Can you get an IP for the robot via arp-scan or similar? If avahi is configured correctly, you should also be able to ping the robot at {robot S/N OT2CEP20...}.local.
The robot API HTTP server lives on port 31950 and once you have an IP for the robot you should be able to get a response at {robot_ip}:31950/health
If you can discover the robot's IP and you do get a response from the health endpoint, you might be able to work around the multicast routing issue by using the field in the Network & System portion of the app to manually specify the robot's IP address.

Once I know from you a bit more about the nature of the problem, I should be able to restore connectivity to the robot. I am happy to support you through this channel, but if you'd like, you can get a faster, real-time chat response (during US business hours) on our website or by emailing<EMAIL_ADDRESS>too.

@nickcrider

Yes, I've connected with the app via wifi multiple times. However, the robot was set up a long time before I started using it, and I've never been able to connect via usb.
Maybe a software update? I usually don't use the app. Most of my work with the robot is via scripts or the Jupyter notebook.

I'll have to wait until I'm with the robot again to try out the rest of your suggestions. Thanks!

Hey @gfleetwood, I'm going to close this ticket since it's a support request. We'll re-open it if it leads to any identifiable software bug, and feel free to continue posting questions here and we'll do our best to answer them!
To add a couple things to what @nickcrider mentioned:

With the OT-2 plugged in via USB, open the Opentrons App and navigate to More > Network & System > System Information

"USB-to-Ethernet Adapter Information" should show a connected device and a computer-side link-local IPv4 address
If your computer does not have a link-local IP address, it will not be able to find the robot's IP address

Two common causes for no computer-side IP address on this connection are:

Linux: the USB-to-Ethernet adapter is not configured to use link-local IP address on your computer

Our connectivity troubleshooting guide shows how to set this up on Ubuntu

Windows: your computer's USB-to-Ethernet driver is out of date

If your driver is out of date, the app will alert you and provide a link to update the driver
Windows Update is usually also able to update the driver depending


Add S2 Geometry classes to Poke-API

If anyone can have a double check over this before I merge it in then that'd be greatly appreciated!
This fixes #2

Not a lot of ruby devs on the discord so throwing it out there that I can check this over tomorrow (btw Id consider making this its own gem, even thought it not full s2(neither is s2phere) but not required).

Yeah could do that I suppose, though it will lack a lot of functionality in general for anyone wanting to use it outside the scope of Pokemon GO.

Well maybe if theres a wider demand people would be more likely to contribute outside of pogo. Just a thought. Call it an unfinished port or something

Sounds good, I'll create its own repository tomorrow.


[Hubs] Support for large datasets

🚀 Goal
Support large datasets (up to 500 GB/mo) with up to 5 years of historical data that refreshes when changed.
📋 Tasks

### Queryable data store (discuss link pending)
- [ ] Decide on data store: SQL, ADX, Synapse
- [ ] Large dataset support spec
- [ ] Pipeline to ingest data into data store
- [ ] Address all feedback from the release discussion

### Stretch

🙋♀ Ask for the community

We'd love to get your feedback! Please leave any questions, comments, or change requests in the release discussions linked from each task list above. We'll try to close each of those out before we finalize the release.

Closing this since we're tracking releases in a new way now and this is outdated.

Hello @flanakin, is feature still in your backlog. We would we highly interested in being able to handle also larger datasets more easily.

@t-esslinger Sorry for missing the comment. Yes, this is still in the backlog. We're making progress slowly. I'm reopening this issue to track everything needed.


undefined: types.IdenticalIgnoreTags

We are building with Go tip, but keep getting this error
../../../honnef.co/go/simple/lint18.go:7: undefined: types.IdenticalIgnoreTags

https://github.com/dominikh/go-simple/blob/master/lint18.go
Any idea? Thanks!

I think it's because https://go-review.googlesource.com/24190 isn't merged into tip yet. This will be resolved when it is.

Because CL 24190 isn't merged into tip yet. This will be resolved when it is.

Or, likely sooner. :P shurcooL uses his predictive powers
In 3, 2, 1...

Sorry about the breakage.
@shurcooL Your clock is running too fast.

It was eagerly optimistic. :)

@dominikh @shurcooL Ok got it. We will just wait.
Thanks all!


HaystackContinued to SpaceDock, closes #3646

Personally really happy to see this.

MIT license is only for the source code, according to the forum thread.

Good catch on the license.


Unable to build 1.30.4 on rhel 8 using the tar package

Description:
Getting error while building envoy 1.30.4 version using bazel on rhel 8.4
user.bazelrc contains : build --config=libc++
Using LLVM : clang+llvm-15.0.0-x86_64-linux-gnu-rhel-8.4
$ bazel build -c opt envoy
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Repository pkgconfig_src instantiated at:
/root/envoy/nbenvoy/WORKSPACE:25:25: in
/root/envoy/nbenvoy/bazel/dependency_imports.bzl:28:34: in envoy_dependency_imports
/root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/rules_foreign_cc/foreign_cc/repositories.bzl:73:25: in rules_foreign_cc_dependencies
/root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/rules_foreign_cc/toolchains/built_toolchains.bzl:55:29: in built_toolchains
/root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/rules_foreign_cc/toolchains/built_toolchains.bzl:265:14: in _pkgconfig_toolchain
/root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
Repository rule http_archive defined at:
/root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in
WARNING: Download from https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz failed: class javax.net.ssl.SSLException Connection reset
ERROR: An error occurred during the fetch of repository 'pkgconfig_src':
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz] to /root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/pkgconfig_src/temp8819864825272073237/pkg-config-0.29.2.tar.gz: Connection reset
ERROR: /root/envoy/nbenvoy/WORKSPACE:25:25: fetching http_archive rule //external:pkgconfig_src: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz] to /root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/pkgconfig_src/temp8819864825272073237/pkg-config-0.29.2.tar.gz: Connection reset
ERROR: /root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/rules_foreign_cc/toolchains/BUILD.bazel:317:15: @rules_foreign_cc//toolchains:pkgconfig_tool_default depends on @pkgconfig_src//:all_srcs in repository @pkgconfig_src which failed to fetch. no such package '@pkgconfig_src//': java.io.IOException: Error downloading [https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz] to /root/.cache/bazel/_bazel_root/87d6ffa924b66ef6624a8f0c8d480ff4/external/pkgconfig_src/temp8819864825272073237/pkg-config-0.29.2.tar.gz: Connection reset
ERROR: Analysis of target '//:envoy' failed; build aborted:
INFO: Elapsed time: 50.580s
INFO: 0 processes.
 If yes, please suggest how to resolve this.

cc @phlax @keith

at first glance this looks like a transient network issue while downloading a dependency - it may be something else though


ERROR: unable to proceed with final disk image creation because the interstitial disk image was not found

Hello,
Getting the above error consistently when attempting to create a DMG using the following invocation (Sonoma 14.2.1, create-dmg installed via brew):
create-dmg \
    --icon background.jpg 144 144 \
    --volname "MoviePlayer Installer" \
    --volicon Icon.icns \
    --filesystem APFS \
    --app-drop-link 416 144 \
    --hdiutil-quiet \
    MoviePlayer.dmg /tmp/make_dmg

The log is as follows:
Creating disk image...
Mounting disk image...
Device name:     /dev/disk4
Searching for mounted interstitial disk image using /dev/disk4s...
ERROR: unable to proceed with final disk image creation because the interstitial disk image was not found.
The interstitial disk image will likely be mounted and will need to be cleaned up manually.

Seeing a similar error as well on Sonoma 14.2.1.

Device name:     /dev/disk4
Searching for mounted interstitial disk image using /dev/disk4s...
ERROR: unable to proceed with final disk image creation because the interstitial disk image was not found.
The interstitial disk image will likely be mounted and will need to be cleaned up manually.

If I switch to HFS+ I see this:
created: /Users/emjoseph/MyApp/MacDistribution/rw.13484.MyAppInstaller.dmg
Mounting disk image...
Device name:     /dev/disk4
Searching for mounted interstitial disk image using /dev/disk4s...
Mount dir:
/Volumes/dmg.agS6je
Copying background file 'background.png'...
mkdir:
/Volumes/dmg.agS6je: No such file or directory

I just had the same problem. For some reason, the system started returning a newline before /Volumes/dmg.XXXX. I patched it by changing line 149 of the script (inside find_mount_dir()) to:
echo "${found_dir:1}"
This should probably be written in a portable way (remove characters before the first / in the string?) but it's an easy workaround for the moment.

After looking at it I had some observations but unfortunately no easy fix.
The current hardcoded values for setting DEV_NAME is wrong for APFS disk images. The disk images for APFS does not only have only one, but multiple disks (as APFS Volumes) in it.
More specifically this line:
https://github.com/create-dmg/create-dmg/blob/b62ae1dd11ac0a3e17ea944384104450d800f04c/create-dmg#L420-L420
I assumes the first line will return the disk to be mounted, but it is wrong.
This is probably what you will get for an APFS image:
/dev/disk4	GUID_partition_scheme
/dev/disk4s1	7C3457EF-0000-11AA-AA11-00306543ECAC
/dev/disk5	EF57347C-0000-11AA-AA11-00306543ECAC
/dev/disk5s1	41504653-0000-11AA-AA11-00306543ECAC	/Volumes/dmg.qUZVr1

As you see, from the output above, actually the one that comes from the last line is the one we want to search for.
This also explains what @fsantini found, that in some cases, there is a newline before the actual mount point: because the disk name matching may match a disk without mount point at first, then in the second line, with a disk that have the mount point, hence the newline.
My suggestion would be change the sed 1q to tail -n 1, but I'm not very sure if it will work for everyone. It works for me to generate an APFS image.

Changing from APFS to HFS+ proceeds further, but I get stuck in unmounting the disk:
Done running the AppleScript...
Fixing permissions...
Done fixing permissions
Skipping blessing on sandbox
Deleting .fseventsd
Unmounting disk image...
hdiutil: couldn't unmount "disk10" - Resource busy
Wait a moment...
Unmounting disk image...
hdiutil: couldn't unmount "disk10" - Resource busy
Wait a moment...
Unmounting disk image...
hdiutil: couldn't unmount "disk10" - Resource busy
%

I have the same issue on HFS+ (newline before /Volumes/dmg.XXXX). What would be a generic solution for that? @gnattu, if I understand correctly, your solution is for APFS? Would it be enough to remove any character before the first / (or can this solution have some issue in certain cases)?

Please check the new release: https://github.com/create-dmg/create-dmg/releases/tag/v1.2.2


Does it work on Linux ?

I'm currently using Linux Debian 10. with Chrome and Brave and I can't get it working, is it possible for you to help me ?

Could be fixed by my PR https://github.com/mattsimonis/meet-mute/pull/8

Yes, it should - Brave as well (I just tested it). #8 might fix your issue, which just closed and will be in a new release soon.


yacreader: 9.11.0 -> 9.12.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/YACReader/yacreader/releases.
meta.description for yacreader is: A comic reader for cross-platform reading and managing your digital comic collection
meta.homepage for yacreader is: http://www.yacreader.com
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 9.12.0 with grep in /nix/store/6nf63hwas728bx2qjhgphqqj1vliyarj-yacreader-9.12.0
found 9.12.0 in filename of file in /nix/store/6nf63hwas728bx2qjhgphqqj1vliyarj-yacreader-9.12.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
yacreader

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/6nf63hwas728bx2qjhgphqqj1vliyarj-yacreader-9.12.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A yacreader https://github.com/r-ryantm/nixpkgs/archive/559277490ba258f90832cffded3b03a42d042277.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/6nf63hwas728bx2qjhgphqqj1vliyarj-yacreader-9.12.0
ls -la /nix/store/6nf63hwas728bx2qjhgphqqj1vliyarj-yacreader-9.12.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

yacreader

Maintainer pings
cc @rapenne-s for testing.

tested outside NixOS, doesn't run, but it may be normal because sometimes nix GUI program doesn't run...
[nix-shell:~/.cache/nixpkgs-review/pr-228166-1]$ YACReader

(process:29578): Gtk-WARNING **: 21:46:56.770: Locale not supported by C library.
	Using the fallback 'C' locale.
WARN  2023-04-25T21:46:56.983 qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
WARN  2023-04-25T21:46:56.985 qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
FATAL 2023-04-25T21:46:56.988 Could not initialize GLX
Aborted (core dumped)

It works under NixOS.


ConfigureKestrel() for certificate authentication must be placed before UseKestrel()!

The docs don't mention it but to configure Kestrel for certificate authentication, you must place the following before UseKestrel() is defined.
.ConfigureKestrel(options => {
    options.ConfigureHttpsDefaults(opt => {
        opt.ClientCertificateMode = ClientCertificateMode.RequireCertificate;
    });
})

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

ID: 35b7960d-6de5-78ee-bc45-d7218239bbc8
Version Independent ID: d2db534b-198a-dc99-5b5a-0525582d39ac
Content: Configure certificate authentication in ASP.NET Core
Content Source: aspnetcore/security/authentication/certauth.md
Product: aspnet-core
Technology: aspnetcore-security
GitHub Login: @blowdart
Microsoft Alias: bdorrans

It's required because we need to turn the normal cert authentication off so we can handle it later on as middleware. It was in my original docs it just appears not to have made it over.

But ConfigureKestrel and UseKestrel shouldn't be order dependent.

@replaysMike can you provide a runnable sample that reproduces the problem so we can investigate? We don't believe these should be order-dependent.

I’ll try to mark a few minutes to do this today

@Tratcher was also going to take a look and double check.

I can reproduce this issue with the following code:
            var host = new WebHostBuilder()
                .UseKestrel(options =>
                {
                    options.ListenLocalhost(5001, options =>
                    {
                        options.UseHttps();
                    });
                })
                .ConfigureKestrel(options => {
                    options.ConfigureHttpsDefaults(opt => {
                        opt.ClientCertificateMode = ClientCertificateMode.RequireCertificate;
                    });
                })
                .UseContentRoot(Directory.GetCurrentDirectory())
                .UseStartup<Startup>()
                .Build();

            await host.RunAsync();

The problem is that ListenLocalhost and UseHttps run inline so ConfigureHttpsDefaults must be called before any endpoints are registered.
The workaround described above of calling ConfigureKestrel before UseKestrel is valid, but not viable when using CreateDefaultBuilder.
The scenario where setting ConfigureHttpsDefaults in ConfigureKestrel works is when the endpoints are defined in config such as how CreateDefaultBuilder already does. This works because the config doesn't actually create endpoints until the server starts.
(More notes to follow)

Note UseKestrel and ConfigureKestrel do mostly the same thing except that ConfigureKestrel doesn't register an IServer so it avoid conflicts with other lazily activated servers like IIS in-proc.
In most applications UseKestrel is called by CreateDefaultBuilder or ConfigureWebHostDefaults so you won't be calling Listen in there. ConfigureKestrel  was added so you could call it after CreateDefaultBuilder without doing redundant work. In this scenario all Kestrel config should happen inside ConfigureKestrel, you shouldn't have direct calls to UseKestrel.
If you're not using CreateDefaultBuilder or ConfigureWebHostDefaults then you call UseKestrel and do all of the config there, there's no need to call ConfigureKestrel.
When I combine the UseKestrel and ConfigureKestrel code from my sample above the ordering issue still exists within the call:
                .Use/ConfigureKestrel(options =>
                {
                    options.ListenLocalhost(5001, options =>
                    {
                        options.UseHttps();
                    });
                    options.ConfigureHttpsDefaults(opt => {
                        opt.ClientCertificateMode = ClientCertificateMode.RequireCertificate;
                    });
                })

The above doesn't work because ConfigureHttpsDefaults needs to be called before ListenLocalhost in order to affect that endpoint:
                .Use/ConfigureKestrel(options =>
                {
                    options.ConfigureHttpsDefaults(opt => {
                        opt.ClientCertificateMode = ClientCertificateMode.RequireCertificate;
                    });
                    options.ListenLocalhost(5001, options =>
                    {
                        options.UseHttps();
                    });
                })

@replaysMike does this match what you're seeing?
I don't anticipate making any code fixes here, there's not much that can be changed without some dramatic redesigns. There are likely some clarifications we can make to the docs though.


[ios][issue] tintColor on image component does not work on ios

Is this a bug report?
Yes

Have you read the Contributing Guidelines?
Yes
Environment
OS: macOS Sierra 10.12.6
Node: 7.4.0
Yarn: Not Found
npm: 5.5.1
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.0.0 => 16.0.0
react-native: ^0.51.0 => 0.51.0

Steps to Reproduce

1.Create a page with an image component in it.
2.Add a tintColor prop to the image component with any color valid color value in it
3.View the image on your screen
Expected Behavior

I though the rendered image would change to the tintColor set on the image component.
Actual Behavior

The image renders but the color has not been changed. On android the color is changed as expected just not on ios.

Reproducible Demo

https://snack.expo.io/r1o2j0wZM

In the docs tintColor is listed under style. This works on both platforms. Actually you might should call it a bug that your code is working on android.
Just change your code to
<Image
  style={{width: 50, height: 50, tintColor: 'red'}}
  source={{uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png'}}
/>

I am having the same issue with this ie. passing tint as a prop to the image
<Image
  tintColor='#2d3436'
  style={{width: 20, height: 15,margin:10}}
  source={{uri: 'backsignup'}}/>

This works fine for android but not in android
If you want it to work on ios as well go with this ie. passing tint color with style instead of passing it as a props
<Image
  style={{ width: 20,height: 23,margin: 10,tintColor: "#2d3436"}}
  source={{ uri: "pdficon" }}
/>

Still an issue.

Anyone got a fix for this? Still tinting not working on iOS.

It is not working on 0.57.3

In Android, If you pass tintColor with style instead. It's not working.
<Image
  style={{ width: 20,height: 23,margin: 10, tintColor: "#2d3436"}}
  source={{ uri: "pdficon" }}
/>

But it works when you pass it as prop to Image.
<Image
  tintColor='#2d3436'
  style={{width: 20, height: 15,margin:10}}
  source={{uri: 'backsignup'}}/>

is this work in windows ?

In Android, If you pass tintColor with style instead. It's not working.
<Image
  style={{ width: 20,height: 23,margin: 10, tintColor: "#2d3436"}}
  source={{ uri: "pdficon" }}
/>

But it works when you pass it as prop to Image.
<Image
  tintColor='#2d3436'
  style={{width: 20, height: 15,margin:10}}
  source={{uri: 'backsignup'}}/>

In Android, If you pass tintColor with style instead. It's not working.
<Image
  style={{ width: 20,height: 23,margin: 10, tintColor: "#2d3436"}}
  source={{ uri: "pdficon" }}
/>

But it works when you pass it as prop to Image.
<Image
  tintColor='#2d3436'
  style={{width: 20, height: 15,margin:10}}
  source={{uri: 'backsignup'}}/>

is this work in windows ?


Should we enforce consistency of a final semicolon in parentheses or begin/end?

As of 3964d3c, Topiary formats both:
(
  foo;
  bar
)

and
(
  foo;
  bar;
)

as they are. (And same with begin/end.)
For the single-line style, Topiary formats:
(foo; bar)

and
(foo; bar; )

as they are. (While we're at it, note the space after the last semi-colon.)
This makes me wonder whether we shouldn't enforce consistency of those styles, the same way we do it with records and lists, for instance. The style would therefore be:
(foo; bar)

for single-line, and:
(
  foo;
  bar;
)

for multi-line.
I am however a bit afraid that this might make aerated single-element parentheses very ugly, namely:
(
  foo
)

would always have to be:
(
  foo;
)

and I think this would interact potentially very poorly with multi-line functions or matches as parameters, for instance. Any ideas? @aspiwack and @nbacquey in particular?

Actually, I don't think we enforce this style in records and lists. I had in mind that we did, but maybe it is just hard to do?

This problem has a large amount of complexity when you factor in comments and attributes. I'd recommend not to try addressing this properly before #430 is done.


Azure SDK JavaScript api endpoint availability

Hello
I wonder if the ApiManagementClient.api package is available with the latest version of Azure SDK yet?
I am having trouble finding a sample for this endpoint.
Thank you!

JIAQI13, Thanks for leveraging Azure docs feedback channel to raise this question. Since you have closed the thread I presume you have figured out the issue, if it's not the case or you need further assistance kindly just let us know.
As a side note, this channel is reserved for ‘Azure docs’ feedback- for sharing doc feedback and suggesting content improvements.


Editing tests almost does not work at all

I don't think the description is needed. Just try to edit anybody tests and you will be shocked. Firefox 56.
There are many and many bugs:

After saving old snippets are deleted
After saving it tells "Not all tests inserted" but actually it is saved. I pressed the button 5 times and 5 revisions were created.
If you edit some old snippet (title AND body) then it tells "Please review required fields and save again." and nothing is saved.
When you add new snippets it's order is mixed. You try to create new revision but old snippets are deleted and new snippets are mixed again.
When you edit not published revision new revision is created. I don't want to create new revision.
When you edit your own published test (first revision) new revision is not created but first revision is edited. I don't want to edit already published revision.
Or better I would like to see 2 buttons: "Edit current revision" and "Created new revision based on current revision".
I cannot unpublish accidentally published revision. I would like to have one hour to cancel my publishing.

#236


Fix Link to Github

Having a link to the GitHub repository is great! Unfortunately, right now it points to the docs and not to Github (https://automl.github.io/automl_sphinx_theme/main; upper right corner, next to the Twitter logo)

This can be manually setup in the conf.py. I changed it for the demo and this is addressed in automl_templates too. Thanks!


Add playook to release a sprint build upstream

Description
Check each of the following when appropriate to help reviewers verify work is complete.
Modifying an existing version

[ ] I modified operator permissions in the OLM CSV and operator.yml
[ ] I modified the operator deployment in the OLM CSV and operator.yml
[ ] I modified operand permissions in the OLM CSV and ansible role
[ ] I modified CRDS in the OLM CSV and ansible role

Adding a new release version

[ ] I created a new z release directory in deploy/olm-catalog/konveyor-operator
[ ] I updated channels in the konveyor-operator.package.yaml
[ ] I created a new release directory in deploy/non-olm
[ ] I created or updated the major.minor link in deploy/non-olm
[ ] I updated the spec.skips parameter in the CSV

Needs a readme and to tidy up once bundle is actually in master (its looking at my fork at present).

Otherwise just create a catalogsource for the particular sprint release, for example:
I may have done it a long time ago for most the repos, but regardless I need to go back and ensure we build automatically for sprint.* branches.
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: konveyor-for-containers-bundle
  namespace: openshift-migration
spec:
  sourceType: grpc
  image: quay.io/konveyor/mig-operator-index:sprint190.3