Popup can't be made transparent by setting Opacity property

I want to create a Dialog like this pic:

Below is the xaml code of dialog content which is a UserControl and will be put in the Child of Popup:
<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="AvaloniaApplication10.UserControl1">

  <Grid Background="Gray" Opacity="0.5" >

    <Border Width="200"
            Height="200"
            BorderBrush="Red"
            BorderThickness="2"
            Background="White">
      <TextBlock Text="Hello World Dialog!" />

    </Border>

  </Grid>

</UserControl>

I've subscribed the Bounds property of the MainWindow to make it to cover the full window. But the problem is Opacity="0.5" has not effect. I also has set the Opacity property of  the Popup, but still not working.
I also have try to custom the PopupRoot Style, but still can't make it work.
Is there any way to get this work? Thanks! (The project is Win32)
[EDIT]
Just tested WPF and UWP, both can be made transparent by set their child's transparency properly.
        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            Popup po = new Popup();

            po.Child = new Border() { Width = 300, Height = 300,
Background = Brushes.Beige,
Opacity = 0.5};
            po.StaysOpen = true;
            po.AllowsTransparency = true;
            po.PlacementTarget = sender as FrameworkElement;

            po.IsOpen = true;
        }

@zenjia this is definately possible in the new 0.10.0-preview1 with TransparencyLevelHint="Transparent"

@danwalmsley  Glad to hear this. btw: When will  0.10.0-preview1 be released? Can't wait. Avalonia is amazing. Although the UI of UWP is pretty but it is built will cpp and too slow to compile, while WPF is too old!

It's out now!

0.10.0-preview1 is the nuget version

Another way to achieve this is to use a panel covering everything else in your main window and avoid popups altogether.

@ahopper I want to create a customized dialog using Popup, the implementation you mentioned has many restriction comparing with Popup.

@danwalmsley  After updating to 0.10.0-preview1, I can't show the popup in code behind. What's wrong with my code?
        private void Button_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
        {
            Popup po = new Popup();

            po.Child = new Border()
            {
                Width = 300,
                Height = 300,
                Background = Brushes.Green,
                Opacity = 0.5
            };

            po.PlacementTarget = sender as Button;
            po.PlacementMode = PlacementMode.Top;

            po.StaysOpen = true;
            po.IsOpen = true;
        }

@zenjia yep it was just a possibility, but it may not be as limited as you think. There is an option called OverlayPopups which I guess work much like this.  I swapped out all my popups for panels that slide out or ones that cover the whole main window, I originally did it because at the time Avalonia had repeated issues with nested popups (long time ago) but It gave me the advantage of tranparency independent of os and looked neat so I've stuck with it.

@ahopper  Interesting, but how to implement a dialog using panel? Seems we need access the MainWindow and dynamically insert/remove a panel in it every time when we want to show/close a dialog. That sounds not so elegant.

@zenjia once you have encapsulated the code to do it, it is no more complex  than opening a dialog. I actually reuse a couple of panels for this as it is what I did first :) and I don't nest them. By Inserting/removing as you suggest it could probably be made more generic. Behind the scenes I suspect it is lighter weight than using popups.  I'm not trying to sell the idea, popups are good, I just thought it might give you another option

@ahopper Since a popup will always be the topmost control, a fullscreen panel dialog will not cover a stay-open popup, so to use this implementation, there should be no stay-open poups. That's not good. Anyway, thanks for the suggestion.

FWIW you don't need a popup to make that UI. Just put that content over your main window and hide or show it. It will look exactly the same and be more portable. We will investigate why the popup does not open however.


[Fix] Custom sheet auto dismiss

Description
This PR implements fixes to the following bugs that would occur when using the custom sheet modifier in the sample viewer:

If there was more than one custom sheet within a given view, some of the sheets would auto-dismiss upon opening, e.g. a sample containing settings sheet would cause the info sheet to auto-dismiss when opened.
Whenever a custom sheet was closed, Modifying state during view update, this will cause undefined behavior. would be thrown.
Custom sheets dismissed using the DismissAction from the Environment wouldn't always re-present.

URL to custom sheet modifier file: View+Sheet.swift
Linked Issue(s)

swift/issues/4778

How To Test
Test Code
struct DisplayMapView: View {
    /// A map with imagery basemap.
    @State private var map = Map(basemapStyle: .arcGISImagery)

    @State private var isShowingDoneSheet = false

    @State private var isShowingDragSheet = false

    @State private var isShowingDismissSheet = false

    var body: some View {
        // Creates a map view to display the map.
        MapView(map: map)
            .toolbar {
                ToolbarItemGroup(placement: .bottomBar) {
                    Button("Plain") {
                        isShowingDragSheet = true
                    }
                    .sheet(isPresented: $isShowingDragSheet, detents: [.medium, .large], dragIndicatorVisibility: .visible) {
                        print("Dismissed")
                    } content: {
                        Text("Some text.")
                    }
                    Spacer()

                    Button("Done") {
                        isShowingDoneSheet = true
                    }
                    .sheet(isPresented: $isShowingDoneSheet, detents: [.medium]) {
                        print("Dismissed")
                    } content: {
                        NavigationView {
                            Text("Press Done.")
                                .toolbar {
                                    ToolbarItem(placement: .confirmationAction) {
                                        Button("Done") {
                                            isShowingDoneSheet = false
                                        }
                                    }
                                }
                        }
                    }
                    Spacer()

                    Button("Dismiss") {
                        isShowingDismissSheet = true
                    }
                    .sheet(isPresented: $isShowingDismissSheet, detents: [.large]) {
                        print("Dismissed")
                    } content: {
                        DismissSheetView()
                    }
                }
            }
    }
}

private extension DisplayMapView {
    struct DismissSheetView: View {
        /// The action to dismiss the sheet.
        @Environment(\.dismiss) private var dismiss

        var body: some View {
            NavigationView {
                Text("Press dismiss")
                    .toolbar {
                        ToolbarItem(placement: .confirmationAction) {
                            Button("Dismiss") {
                                dismiss()
                            }
                        }
                    }
            }
        }
    }
}

Copy the code above into the Display map sample.
In the sample, verify the sheets open and close as expected using the buttons in the bottom toolbar.
Verify that info sheet (top-right button) works as expected.
Verify the rest of the samples using the custom sheet work as expected.

Thank you everyone!


[Bug] Scrolling speed when selecting is dependent on mouse movement

Description
Speed when selecting text via mouse selection when a window is scrolling is depending on mouse movement
To Reproduce
Open a large text file, enough lines to populate at least 10x the height of your window.
Expected behavior
Use click and drag to select text beyond the "visible" scope.

Desktop (please complete the following information):

OS: 1809 17763.557
Version v<IP_ADDRESS>

That "feature" has been always like that in other programs and older Windows versions as well. Not sure if such a behavior fixable.

OK, @Dansel can you do one thing first: go to Settings->Advanced Settings->Hide status bar and check it again? Reply your observation in the comments below.

OK, @Dansel can you do one thing first: go to Settings->Advanced Settings->Hide status bar and check it again? Reply your observation in the comments below.

@JasonStein Yeah, same behavior.

I think it is indended (by Windows) and I have no way to control it. Sorry about that. If someone know more about this behaviour, feel free to leave your comments.

It would be nice to be able to scroll down with the scroll-wheel while selecting please :)

It would be nice to be able to scroll down with the scroll-wheel while selecting please :)

You can actually. Your cursor has to be inside the application window.

u

If I have nothing selected the scrolling works fine with the mouse-wheel, but if I have some text selected then scrolling the mouse-wheel does nothing...

@adrian-basheer I will try add that feature.

@adrian-basheer What you have requested is implemented here: https://github.com/JasonStein/Notepads/commit/8166767385293157e833e771729393759294dcec
It will be available in v<IP_ADDRESS>


toggleTerminal command randomly fails sometimes

Likely fix as this was reproducible in smoke tests: https://github.com/microsoft/vscode/pull/137079/commits/9371d14575e7dfcb7dfedf6c23edeae9e5e544b6
cc @sbatten

What is the best way to verify this?

@alexr00 run the smoketests on webkit

Looks like the webkit smoketests all fail on Windows. Leaving for someone else to verify.

This is actually still an issue in https://github.com/microsoft/vscode/issues/137514, closing in favor of that since there are more details.


Feature request: Applying a shape filter (circle, polygon) to a dataview

Context
A customer would like to apply a shape filter (circle, polygon) to a dataview. The customer believes that we can extend bounding box filtering to irregular polygons and circles. See their comments here:

the problem I’m facing is to apply a shape filter (circle, polygon) to a dataview. I’m aware you can change the sql on the source, but this affects how the layer is displayed. We need to have the layer unmodified on screen, then the user draws a shape, and some data from a dataview is returned based on that shape, without affecting the source. I opened this question on SO:
https://gis.stackexchange.com/questions/334156/apply-a-polygon-filter-to-cartojs-4-dataview
There is a way to achieve this through the dataviews?
Checking the carto 4.1.12-1, the line 19290 is where the code for boundingbox is declared. Probably will not be a huge enterprise to extend this to accept an array on lat/lngs. It is possible for your team to add this poly support? Or at least someone can guide me a little bit, so I can write the code to support the polygons? This is something very important for us. Later in the future a support for a circle would be great too.

What level of effort is involved in adding this as a feature, and can we add this feature to CARTO.js?
Support Issue and Zendesk tickets for more context
https://github.com/CartoDB/support/issues/2202

@VictorVelarde when you have some time would you mind taking a look at this request and make a rough estimate of the effort this would mean for us?
@jdgodchaux I would talk with you in private to gather more information.

👋 !
I've been taking a look at this and, as they said, there's no way to filter a dataview by any shape other than a bounding box.
CARTO.js is not the one who filters the dataview or composes the SQL sentence that retrieves the data. Windshaft is the one who does that. We could modify the URL parameter and pass an array of values, but Windshaft wouldn't understand that. Here's the code which parses the bbox parameter.
So, from CARTO.js' side, we could create a filter for the source to filter a circle as they propose, but they would need to apply it to a different source than the one used in the layer, so that it doesn't affect the visualization, as they noted in their original message.
The optimal solution would be to support polygon filtering in Windshaft for dataviews, which I believe that is not ready right now.

Hi @jesusbotella , @VictorVelarde , and @kukukaka , here's the response from our customer:

So windshaft speaks with sql…
var filterQueryTpl = dot.template([
    'SELECT * FROM ({{=it._sql}}) _cdb_bbox_filter',
    'WHERE {{=it._filters}}'
].join('\n'));

 var bboxFilterTpl = dot.template(
    'ST_Intersects({{=it._column}}, ST_Transform(ST_MakeEnvelope({{=it._bbox}}, 4326), {{=it._srid}}))'
);

I’m familiar with this since we basically do that when we call the sql api.
                        string function_name = req.QueryType.ToLower() == "intersect" ? "ST_Intersects" : "ST_Contains";
                        string shapeStr = req.ShapeData;
                        string finalSql = "";

                        JObject shapeJson = JObject.Parse(shapeStr);

                        foreach (JToken shape in shapeJson["coordinates"].Children())
                        {
                            if (finalSql.Length > 0) { finalSql += " UNION "; }
                            string baseSql = MapConfig.layergroup.layers.First().options.sql;
                            string shapeData = shape.ToString().Replace("\r\n", "").Replace(" ", "");
                            string medSql = where_clause + function_name + "(ST_SetSRID(ST_GeomFromGeoJSON('{ \"type\": \"Polygon\" , \"coordinates\": " + shapeData + " }'), 4326), the_geom) ";
                            finalSql += rgx.Replace(baseSql, medSql);
                        }

It doesn’t look like a huge enterprise to make a new filter.

Would it be possible to evaluate what our customer is saying?

This was already implemented


Tools of drawing neural network

Hi, can you tell me how to draw KP-FCNN part in figure 9 of paper like you did? Is there any tool needed?
Best,
Vincent.

Hi,
No particular tools, I used PowerPoint to create this visualization. The only things that were not done in PowerPoint are the point clouds. I did screenshots from Mayavi visualizations.
Best,
Hugues

Thank you for your reply, I'll try it.


Something wrong in Element should error message

This is my error message (sorry for Korean).
In the message, the expected string is contained definitely in the actual string.
What may be the cause of the test fail?
It would fail to compare the strings, but when printing the message the actual string was correct. Is that possible? In the Describe class, the element may be re-accessed for printing logs.
// error message (from JUnit)

Element should be text '업로드 완료' {#wrap > div.uploadBar.ng-scope > div:nth-child(1)}
Element: '<div>×
3개 파일 업로드 완료.
자세히</div>'

// source code

uploadLoadingPanel.waitUntil(text("업로드 완료"), 20000);

@hyunil-shin Yes, theoretically it's possible that element got this text exactly at the moment when Selenide started composing the error message. If this is the case, then increasing timeout should help.
P.S. Probably there is some bug with comparing Korean texts. Is this error reproducible with English texts too?

@asolntsev
If I get similar issue, I will report it. This might be the first issue, this kind of issue.  I don't think comparing Korean text has some bugs. If so, I had gotten many fails of this issue.


Provide ASCAT GC File via iGenomes

Is your feature request related to a problem? Please describe.
We found the https://github.com/SciLifeLab/Sarek/blob/master/docs/ASCAT.md GC correction part to be missing on iGenomes at the moment and we'd have to manually create it.
Describe the solution you'd like
Maybe add it to iGenomes for GRCH37 and GRCH38 ?
Describe alternatives you've considered
Creating it on our own ;-)

Ohhh, sorry about that, I have the files on UPPMAX webexport, and on an S3 bucket, but haven't manage to find time to synchronize it.
I'll ask Phil to help me out with it.
In the mean time, you can download them here: https://export.uppmax.uu.se/sllstore2017079/Sarek/

Ok nice - I downloaded them and will put them in our iGenomes folder. Might just make sense to have them in the iGenomes resource too for the future 👍

Done


Documentation for additional dependencies

Thanks for making this library available, I found it hugely helpful to getting an excel spreadsheet generated pretty quickly and elegantly and only had to dive into the POI api a couple times...
I did run into a couple dependency issues getting this set up in a Grails 2.5.x project (though I think they would probably be problems in any project) and thought I'd mention, in case you want to add these troubleshooting steps to your documentation. Or maybe there is a better way to solve these issues than I found:
Initially when trying to run a simple example I got the following class not found exception:
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTExtensionList
I resolved this by adding a runtime dependency on the full POI schemas:
runtime 'org.apache.poi:ooxml-schemas:1.3'
However, that appeared to bring in its own dependency on an old version of xmlbeans (2.3.0), and I got the following exception next time I tried to run:
NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setLoadEntityBytesLimit(I)Lorg/apache/xmlbeans/XmlOptions;
I resolved that by adding an explicit dependency to the more recent version of xmlbeans:
runtime 'org.apache.xmlbeans:xmlbeans:2.6.0'
Now everything works great! Hope this helps, thanks again.

Same for me: very nice library, thanks, but...
I just spent hours chasing the same missing dependency, in order to get the doc's examples to run as Groovy scripts. (Too bad I didn't see this issue earlier)
Now it works and I can dig through the features !

I also found a few typos in the documentation:
Font examples like cell("A", [font: [name: "Arial"]  sometimes miss a closing bracket.

@gudesh I'll try to get to it, but feel free to submit a PR against the docs.


Use threadsafe setter on Atomic Updaters

Motivation:
The documentation for field updates says:

Note that the guarantees of the compareAndSet
method in this class are weaker than in other atomic classes.
Because this class cannot ensure that all uses of the field
are appropriate for purposes of atomic access, it can
guarantee atomicity only with respect to other invocations of
compareAndSet and set on the same updater.

This implies that volatiles shouldn't use normal assignment; the
updater should set them.
Modifications:
Use setter for field updaters that make use of compareAndSet.
Result:
Concurrency compliant code

@carl-mastrangelo can you please check the compilation error ?

@normanmaurer Done.
I also updated AbstractReferenceCountedByteBuf  to use the setter for init.

Cherry-picked into 4.1 (7528e5a11e6edeb847d7913437a1c88b1bb30e9d) and 4.0 (3c24d0e062f77f51324fce75f5ee438c001e7a0d)

@carl-mastrangelo thanks !


🚸 MultiLineGeneratorの諸々を修正

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

Visual Studio Marketplace
GitHub release

Your semantic-release bot :package::rocket:


fix: pydantic 2.0.0 break unit tests

Types of changes

[x] Hot fix (emergency fix and release)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Documentation (change which affects the documentation site)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Release (develop -> main)

Quality assurance (all should be covered).

[x] My code follows the code style of this project.
[ ] Documentation for my change is up to date?
[ ] My PR meets testing requirements.
[x] All new and existing tests passed.
[x] All commits are signed-off.

Summary
Key links:

Sonar coverage

Before you merge

Ensure it is a 'squash commit' if not a release.
Ensure CI is currently passing
Check sonar. If you are working for a fork a maintainer will reach out, if required.

Fixes #1416


Drawing icons

Describe the requested icon
It would be nice to have drawing-related icons : I'm building an app where people can trace shapes on a map and I came with these manually drawn icons (screenshot):
The downside of these is:

They don't really fit with other phosphor icons
They are SVGs, inlined in an img tag thus don't support color variations

Basically, I'd like the following icons:

polygon shape
multi-line shape

I haven't seen a way to combine icons (e.g.: a ph-map-pin with an upper ph-plus), these variants are welcome:

ph-map-pin +
ph-circle +
polygon +
multi-line +

Screenshots

Additional context
If you're interested to add these and want a base, the sources are available. (I see there are some more outdated ones from when I wasn't yet using Phosphor :) )
I can also make a PR with an attempt to match your design.
Thanks for the good work, your set is refreshing :)

Thanks for the suggestions @mtancoigne Working on these this weekend. Polygon and multiline should be fun :) Modifiers like "+" can get tricky in terms of readability but will take a look at those as well.

Thanks @minoraxis! Have a good time !

We've added bounding-box, line-segment, line-segments, and polygon in v1.3.1!

 Thanks !


[HUDI-3438] Avoid getSmallFiles if hoodie.parquet.small.file.limit is 0

Tips

Thank you very much for contributing to Apache Hudi.
Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.

What is the purpose of the pull request
Method getSmallFiles could be very time consuming if there are many small files in one partitionPath. Though we already set hoodie.parquet.small.file.limit to 0, it will still call getSmallFiles to do the comparison, this could be avoided.
Brief change log
(for example:)

Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request
(Please pick either of the following options)
This pull request is a trivial rework / code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end.
Added HoodieClientWriteTest to verify the change.
Manually verified the change by running a job locally.

Committer checklist

[ ] Has a corresponding JIRA in PR title & commit

[ ] Commit message is descriptive of the change

[ ] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@hudi-bot run azure

@hudi-bot run azure


Set up associations

OOP school library: Set up associations🎉

In this project, we are going to finish creating the remaining classes for our school library and create the associations between them 💪🏽.

Additional description of the project and its features ➕:

Create a class Classroom with the following:
@label instance variable should be initialized in the constructor.
Setter and getter for @label (remember about attr_accessor).
Create the has-many/belongs-to relationship between Classroom and Student. The following should be implemented:
Create the has-many side (a classroom has many students).
Create the belongs-to side (a student belongs to a classroom).
Make sure that when adding a student to a classroom it also sets the classroom for the student.
Make sure that when setting the classroom for a student it also adds it to the classrooms' students.
Create a class Book with the following:
@title and @author instance variables should be initialized in the constructor.
Setters and getters for instance variables (remember about attr_accessor).
Create a class Rental with the following:
@date instance variable should be initialized in the constructor.
Setter and getter for @date (remember about attr_accessor).
Create the many-to-many (also has-many-through) relationship between Person and Book using the intermediate class Rental

Built With ❤

Ruby

Deployed Preview 🚀
[Deployed Preview](Coming soon)

@ZeenatLawal 👋,
Thanks🙏🏽


Mistral-7B WH demo

Part of the Mistral-7B and Mixtral bringup from issue #5337 .
This includes a working demo of Mistral-7B, based on the original source-code from Mistral AI. The model was ported to TTNN.
We include tests for each part of the model: RMS Layernorm, MLP, Attention, single decoder block and full model.
We also include a full demo code that generates questions for 32 users based on prompt file passed by the user (and included within the demo files).
This implementation supersedes the existent ones present in models/experimental/mistral (ttlib) and models/experimental/functional_mistral (ttnn).
Additionally, we also include a small perf report tool under models/perf/perf_report.py. This takes perf .csv files and generates a cleaner report. Let me know if this should be included in a separate PR.

Regarding checkpoint files, how do we integrate the Mistral-7B tests on CI?
They can be downloaded directly from Mistral website, as mentioned in our README provided with the model.
We're relying on mistral7b/tt/model_config.py to pick the right consolidated weights and tokenizer (general or instruct), so that will have to be updated with the correct default location for CI.

Regarding documentation, should we add a link to the Mistral demo to https://tenstorrent-metal.github.io/tt-metal/latest/get_started/get_started.html#explore-the-falcon-7b-demo ?

Refactored the model configs in the latest commit.

@eyonland I've added models/demos/mistral7b/tests/test_mistral_perf.py and added mistral-7B (WH only) on run_performance.sh script (Haven't tested on grayskull).
Can you please review the latest changes and let me know what you think?

@mtairum I'll approve once you post a passing models performance pipeline that runs your test.

Please run the performance pipeline and post a passing run here.

@mtairum @yieldthought
There is a conflict on this branch with some perf pipeline optimizations for your models team.
Please let me know if you would like me to rebase for you to resolve.

Looks amazing. Can we get run_performance.sh updated to collect both the e2e and device times?

Added under run_device_perf_models() and run_perf_models_llm_javelin()


Update README with what the gem is; fix formatting

Addresses #6.
I think I see now what you were trying to get at, as the gem depends on shoulda-matchers so you don't need to specify it separately.

@bsedat Maybe I'm just getting too much into style now, so feel free to let me know. But I was confused in the README about whether this copied the shoulda-matchers code or was just the code for the assign_to. (Reading the source made it clear.)
This wording seems clearer to me. But it's not my gem. :)

Hey @jeremywadsack! Thanks for the contribution. I like the backticks around assign_to, but I don't think we need to include the gem in the :development group. I'm also fairly certain that the semicolon was more correct as a comma. The rest of the changes look good to me though!

Yeah, you're right on the comma. For some reason in my head "enough to bring it back" was a complete sentence, but it's clearly not.
I removed the :development group. Rspec recommends it, but I've never known why.

This looks great. Thanks!


Breaking change: correcting the definition of subject_type and object_type

Currently the subject_type and object_type fields are defined using an enum.
 entity_type_enum:
    permissible_values:
      owl class:
        meaning: owl:Class
      owl object property:
        meaning: owl:ObjectProperty
      owl data property:
        meaning: owl:DataProperty
      owl annotation property:
        meaning: owl:AnnotationProperty
      owl named individual:
        meaning: owl:NamedIndividual
      skos concept:
        meaning: skos:Concept
      rdfs resource:
        meaning: rdfs:Resource
      rdfs class:
        meaning: rdfs:Class
      rdfs literal:
        meaning: rdfs:Literal
      rdfs datatype:
        meaning: rdfs:Datatype
      rdf property:
        meaning: rdf:Property

When I added this, I intended to be able to use this enum like this:

subject_id
....
subject_type

HP:0000118
...
owl:Class

Now I learn, that, according to the LinkML model, this is how it would look like on data level:

subject_id
....
subject_type

HP:0000118
...
owl class

I still need to find our how to define an enum that takes exactly owl:Class, owl:ObjectProperty, owl:AnnotationProperty as values, but in a way that it is understood that these are curies?
So when I translate say this dataset:

subject_id
....
subject_type

HP:0000118
...
owl:Class

into RDF, that I get:
[] a sssom:Mapping;
sssom:subject_type <http://www.w3.org/2002/07/owl#Class> ;
sssom:subject_id <http://purl.obolibrary.org/obo/HP_0000118> .

Help @sierra-moxon @hrshdhgd

As per this , I'm guessing permissible_values should be the value of meaning (which I know will not fit well) but I'll let Sierra answer since she has more vast knowledge about linkml in general than me.

My guess is something like:
 entity_type_enum:
    permissible_values:
      "owl:Class":
      "owl:ObjectProperty":
      "owl:DataProperty":
      "owl:AnnotationProperty":
      "owl:NamedIndividual":
      "skos:Concept":
      "rdfs:Resource":
      "rdfs:Class":
      "rdfs:Literal":
      "rdfs:Datatype":
      "rdf:Property":

I don't think rdfgen will automatically expand those strings to URIs. Is that ok?

We would want it to be URIs.
https://github.com/linkml/linkml/blob/5c1cbeae9abb841b4d35e23d73e4945ea2685e29/linkml/generators/owlgen.py#L693-L695
may be useful, Nico?

Thank you both for your support. Before we look into solutions for the problem, I would like to understand what the design intention is here on the LinkML side.
The question is simply: can an instance of an enum (a value) be an entity reference (uriorcurie), or not?
So if I have

subject_id
....
subject_type

HP:0000118
...
owl:Class

or
"mappings": [ {
"subject_id": "HP:0000118"
"subject_type": "owl:Class"
} ]

Can the enum that restricts subject_type be defined at all to be a uriorcurie instance so that if I translate into RDF, I get:
[] a sssom:Mapping;
sssom:subject_type <http://www.w3.org/2002/07/owl#Class> ;
sssom:subject_id <http://purl.obolibrary.org/obo/HP_0000118> .

I think so yeah; it's just that not all generators are feature-complete.

Thank you. It is good to hear that it is not a conceptual issue. So forgetting about RDF for now - can I somehow specify the base type of the enum? Stating that it is an instance of say, uri or curie or is this currently not possible in the spec?

No, we can't specify the range of a permissible value at this point, but I like the idea.

@gouttegd can you articulate your position on this? You prefer "owl class" as the rendering of the a lot value in TSV and JSON?

@matentzn It’s not a matter of what I prefer.
First, I think such a breaking change at this stage, so close to 1.0, would be harmful, for what little to no benefit, especially since what you seem to want should be achievable without the need for a breaking change (more on that latter).
Consider that it has already been more than one year since match_type and the associated enum was replaced by mapping_justification and the SEMAPV vocabulary. There has been 9 releases of the SSSOM schema since then. And yet as of today we still find mapping sets that use either the old slot and/or the old enum.
I don’t know why you prefer
subject_id   ...   subject_type
HP:0000118   ...   owl:Class

over
subject_id   ...   subject_type
HP:0000118   ...   owl class

but it is almost certain the second form is going to still be present in the wild for the years to come. So I’d recommend not changing the enum now.
What seems to really bother you is that you would like the enum value to be rendered as an IRI when serialising to RDF, am I correct?
Well then, just amend the spec to state that, when serialising to RDF, a value of type entity_type_enum should be serialised as the IRI indicated in the meaning field associated with the value (so, owl class should be serialised as http://www.w3.org/2002/07/owl#Class, etc.). That’s it. No need to break anything.
Arguably this could even be specified once and for all at the LinkML level, not only for SSSOM and not only for entity_type_enum: When serialising to RDF, if the permissible values of an enum have a meaning field, then values of that enum should not be serialised as the string representation of the value but as whatever entity is referenced in the meaning field for each value.
This would seem to me like a perfectly reasonable behaviour, and actually the behaviour that I would expect – because otherwise I quite don’t see the point of the meaning field – the doc says it “allows enums to be backed by external ontologies“, but what does that mean exactly?
But my real concern is with this:

The question is simply: can an instance of an enum (a value) be an entity reference (uriorcurie), or not?

Please don’t. An enum value is of the type of that particular enum, nothing more, nothing less. Each language has its own way of representing enumerations – in particular, in many languages, they are integers. Specifying straight in the data model that enum values should be of a certain type is only going to make supporting SSSOM in non-Python languages even more complicated.
Basically the point I am trying to make is: let enum values by opaque values and if you want some of them to be serialised in a certain way, enforce that at the level of the parser/serialiser, not at the level of the data model.

@gouttegd is correct. And in fact the current behavior for rdf serialization is to use the meaning URI if present. json and python use the text. This needs to be clarified in the docs: https://linkml.io/linkml/schemas/enums.html#mapping-permissible-values-to-ontologies

We discussed this on the linkml. We weren't totally clear if this pertained to schema or data. Note rdfgen, which was mentioned (and all the *gens) are for schema conversion. However, I think it's actually about data conversion (linkml-convert) - is that right?
Either way: meaning, if present, is used to generate a URI, whether representing PVs in a schema, or data

Ok. Let's leave things as they are then. I have slept a few nights now on the matter, and am fine with not making a change. I guess I will see what that means for the Json serialisation, because I long forgot checking if it is based on JSON-LD (which means I would expect it roundtrips with RDF) or some other standard representation.


Improve UX for multiple split masterIdentities

I have a project which is maintained by multiple persons. Each person requires the ability to create new secrets with their personal split identity, associated with their Yubikey.
Single master identity
Having multiple split keys as a single user is usually not a problem, since normally only one of them is used as the primary key, allowing one to choose the following configuration:
age.rekey = {
  masterIdentities = [ ./primary-split-identity.pub ];
  extraEncryptionPubkeys = [ ./secondary-recipients.pub ];
};

Contents of ./primary-split-identity.pub, usually as generated by the Yubikey tooling:
#       Serial: 00000000, Slot: 00
#         Name: Some Name
#      Created: Mon, 01 Jan 2000 00:00:00 +0000
#   PIN policy: Once   (A PIN is required once per session, if set)
# Touch policy: Always (A physical touch is required for every decryption)
#    Recipient: age1yubikey1<primary-pubkey>
AGE-PLUGIN-YUBIKEY-<primary-split-identity>

Contents of ./secondary-recipients.pub, usually assembled by manually copying the pubkeys:
age1yubikey1<secondary-pubkey>

For this setup, it does not matter whether or not the secondary identities are split-identities or not, since the pubkeys are manually collected, anyways.
Multiple master identities
The situation changes however, if one considers the following configuration with two split masterIdentities:
age.rekey = {
  masterIdentities = [
    ./primary-split-identity.pub
    ./secondary-split-identity.pub
  ];
};

The ./secondary-split-identity.pub contains:
#       Serial: 11111111, Slot: 00
#         Name: Some Other Name
#      Created: Mon, 01 Jan 2000 00:00:00 +0000
#   PIN policy: Once   (A PIN is required once per session, if set)
# Touch policy: Always (A physical touch is required for every decryption)
#    Recipient: age1yubikey1<secondary-pubkey>
AGE-PLUGIN-YUBIKEY-<secondary-split-identity>

If one only has one of the Yubikeys plugged in and attempts to edit an encrypted file using agenix edit (I am assuming rage and age-plugin-yubikey for the backing implementations), the decryption works fine, since only one working key is necessary for decryption. However, on saving the file, the implementation of rage/age-plugin-yubikey prompts for every split identity. If you try to skip one of the identities, you will get this output:
Collecting information about hosts. This may take a while...
Error: 'age-plugin-yubikey' couldn't use an identity: Could not open YubiKey with serial 11111111

[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report                            ]
error: Failed to (re)encrypt edited file, original is left unchanged.

Equivalent behavior is obtained when invoking the following command directly:
echo "test" | rage -e -i ./primary-split-identity.pub -i ./secondary-split-identity.pub > ./test.age

As it appears, the backing implementation requires physical presence of all Yubikeys to derive the pubkey for each one, instead of looking at the Recipient: field in the preceding comment. While I would certainly consider this primarily an upstream issue, I think it still could be meaningful if agenix-rekey could work around this.
Possible solutions
In the simplest case, there is maybe already a solution that I am just not aware of. I am ready to be educated on this :) Otherwise I can think of a couple of ways to work around this, but there might still be other ways to approach this.

One could simply add an configurable option to skip all (or even just some) masterIdentities when encrypting something using agenix edit/agenix generate. Instead, the user can supply a manually assembled list of all the required identity pubkeys through the extraEncryptionPubkeys option. While this is more error-prone, I would assume that identities don't change that often, an so it wouldn't be a huge inconvenience. Still, it would put a larger burden on the user to manage their keys. This should be possible to implement in a way that is completely backwards compatible and will have no unexpected side effects for existing users, as it would be purely opt-in (maybe with a big warning that clarifies the risks of improper key management).
Another way could be to try and be smart about it and parse the comments in the masterIdentities files to try and extract a pubkey to specify with -r instead of -i. However that would seem much more like a solution for upstream anyways, so I don't know that this would be a great option here. I certainly feels a lot more hacky and might mess with peoples setups in unanticipated ways.

Again, I would be happy to explore some of these options in a PR, but I would first like to know how you feel about this topic in general.

I had another think about this today and came up with another way of handling this, which is basically a fancy variant of the first solution: Allow the specification of an explicit pubkey to use in place of the identity. I imagine something like this:
masterIdentities = [
  {
    identity = ./primary-split-identity.pub;
  }
  {
    identity = ./secondary-split-identity.pub;
    pubkey = "age1yubikey1<secondary-pubkey>";
  }
  ./tertiary-split-identity.pub;
];

Basically: Add an alternate syntax to specify master identities. If pubkey is specified, it will be used in place of the identity to encrypt the files. If pubkey is not specified, it will fall back to the current behavior. When decryption is attempted, it will still simply try all identity fields. This should also be implementable in a backwards compatible way, by means of something like the following type signature:
masterIdentities = mkOption {
  type = with types; let
    keyPathType = (coercedTo path toString str);
  in listOf (either
    keyPathType
    (submodule {
      identity = mkOption { type = keyPathType };
      pubkey = mkOption { type = nullOr keyPathType };
    }));
};

Certainly more complex from an implementation standpoint, for the end user however the UX would appear much cleaner, since identities and pubkeys are now clearly grouped together. Sadly, it would still be in the users responsibility to ensure that the identity and pubkey work together, since there is no way to write an assertion that checks this without requiring the user input that the above solution would be trying to avoid :/

Ok, I managed to do some testing and I am now very confused. I started by trying to validate the issue you referenced. I am fairly certain that I could confirm it initially, since I had explicitly noted this down. However, since some time yesterday, I am no longer able to reproduce this. Instead, I am free to skip over my non-available key identity and just use the other one. Doesn't matter which of my two keys I plug in and in what order I specify the identities in: neither age (Version 1.1.1) nor rage (Version 0.9.2 and 0.10.0) nor age-plugin-yubikey (Version 0.4.0) with pcsc-lite (Version 2.2.3) want to throw errors at me. So I really do not know what is happening there.
However, even though no error comes up, I still get the alternate behavior referenced in the issue: If the identity I am trying to use for decryption is not the first one, I am prompted for the PIN for every rekey action. Ultimately this means that this is still an issue we should work around and that I can test for, even though I can currently not reproduce the original behavior.

With all of that out of the way, I started experimenting with making the encryption step independent of the physical keys. While I was experimenting with some simple grep commands for extracting the pubkeys from the comments, I stumbled across some stuff that might influence the implementation design and final UX and I think is worth discussing first. It basically boils down to the types of identities that exist, and that they all require slightly different interactions:
Plain age identities, no password encryption
These are the simplest ones, since they can always be used directly to derive the pubkey. In case we would want to use the pubkey instead of the actual identity for some reason, age-keygen has a default output format that will look like this:
# created: 2000-01-01T00:00:00+00:00
# public key: age1<pubkey>
AGE-SECRET-KEY-<key>

Instead of Recipients: age1yubikey1<pubkey>, we have public key: age1<pubkey>.
Plain age identities, with password encryption
These have similar problems as Yubikey identities, in that decryption of the identity is required when encrypting a file. For these however, we don't even have a way of extracting a pubkey from the file, since the whole file is encrypted. So in this case we might require an external way to specify the associated pubkey, anyways.
Other types of split-identities
Apart from age-plugin-yubikey, https://github.com/FiloSottile/awesome-age#plugins lists quite a number of other plugins. I have not looked at them too closely, but this is a good reminder that there might be more complex interactions that could benefit from a more generic approach to specifying the pubkeys.
Multi-identity files
Just for completion: The -i flag of both age and rage technically allows for multiple identities in a single file. This would complicate stuff immensely, since at that point we would basically need to parse the entire file and find some way to create parings of pubkeys and identities. This might also be the reason that (r)age does not try to extract the pubkey from the comments. However, I think in our case it is not unreasonable to ask the users to split their identities up, into one identity per file, so that we do not have to worry about this.

Now, with all of those interactions in mind, I find myself asking: What do we want to support and which solution gives us and the users the most flexibility?
My first prototype replaced the masterIdentityArgs implementation in nix/lib.nix with something along these lines:
mergedMasterIdentities = mergeArray (x: x.config.age.rekey.masterIdentities or []);

masterIdentityArgs = let
  parseRecipients = with pkgs; writeShellApplication {
      name = "parse-recipients";
      runtimeInputs = [ gnugrep ];
      text = readFile ./parse-recipients.sh;
    };
in ''$(
  ${parseRecipients}/bin/parse-recipients ${
    concatStringsSep " " (map (x: toString (escapeShellArg x)) mergedMasterIdentities)
  }
)'';

./parse-recipients.sh creates the actual list of arguments for (r)age, taking care to avoid skipping identities during encryption if no explicit pubkey can be extracted:
# Collect final arguments in an array
args=()
for file in "$@"; do
  # Only consider files that are a Yubikey identity.
  if grep -q "^AGE-PLUGIN-YUBIKEY-" "$file"; then
    # If the file does not specify "Recipient: age1yubikey1<pubkey>", just use the identity itself.
    # Otherwise extract recipient and specify with "-r".
    if pubkeys=$(grep 'Recipient: age1yubikey1' "$file" | grep -Eoh 'age1yubikey1[0-9a-z]+'); then
      for pubkey in $pubkeys; do
        args+=("-r $pubkey")
      done
    else
      args+=("-i $file")
    fi
  else
    args+=("-i $file")
  fi
done

echo "${args[@]}"

But while this adds support for age-plugin-yubikey, it does little to improve interactions for the other types of identities. Furthermore, this approach would require adding explicit support for every type of identity file that needs special treatment.
In my mind, it would make a lot more sense to just let the users specify the pubkey (or a script that echos the pubkey) directly, which would allow them to implement arbitrary custom solutions, if required. We can of course always supply some helper functions that can automatically extract the pubkey from explicitly supported identity files.
What are your thoughts on this, do we focus on a specialized solution for the yubikey plugin or aim for an architecture with broader support, with some helpers for the common use cases?

Ultimately this means that this is still an issue we should work around and that I can test for, even though I can currently not reproduce the original behavior.

Very interesting, maybe I should acquire a second yubikey so I can also try to test this,

Instead of Recipients: age1yubikey1<pubkey>, we have public key: age1<pubkey>.

Fair, we can just search for that too, if you want to support this case.

These have similar problems as Yubikey identities, in that decryption of the identity is required when encrypting a file. For these however, we don't even have a way of extracting a pubkey from the file, since the whole file is encrypted. So in this case we might require an external way to specify the associated pubkey, anyways.

Oh we can add an explicit pubkey specification if you want, I'd just like to make sure that it isn't required for the common default case (i.e. normal yubikey split identities, nothing special).

Apart from age-plugin-yubikey, https://github.com/FiloSottile/awesome-age#plugins lists quite a number of other plugins. I have not looked at them too closely, but this is a good reminder that there might be more complex interactions that could benefit from a more generic approach to specifying the pubkeys.
[...]
Just for completion: The -i flag of both age and rage technically allows for multiple identities in a single file. This would complicate stuff immensely
[...]

As already said, I'd just support extraction for the easy common cases, everything else doesn't need to be automatic. Basically just make sure that a multi identity file still is passed correctly to rage, but if you need to extract the pubkey just skip it or print a warning. No need to introduce complex logic for these cases since they are very niche.

What are your thoughts on this, do we focus on a specialized solution for the yubikey plugin or aim for an architecture with broader support, with some helpers for the common use cases?

I pretty much agree with what you've written. So I'd say introduce the { identity = ./file; pubkey = "..."; } alternative for specifying identities, and always use the pubkey if it is specified that way. If an identity is given directly, try to extract the pubkey if necessary by grepping for Recipient or public key. If that fails, show a warning or whatever is appropriate.
One more thing for when you are trying to create the command line for (r)age: Either create a function that wraps the (r)age call, or create a wrapper script that wraps (r)age, whatever is more convenient. But don't try to return the parsed argument list via some form of $(parse-recipients ...), because then you will immediately run into bash argument splitting issues. You probably know the drill, as soon as a file or path contains a space we are going to have a problem :D

[...] I'd just like to make sure that it isn't required for the common default case (i.e. normal yubikey split identities, nothing special).

Ah, I think I understand your vision now, makes sense. Then I'll add the dedicated Yubikey support to make it work out of the box, alongside with the generic pubkey support for more general use.

Either create a function that wraps the (r)age call, or create a wrapper script that wraps (r)age, whatever is more convenient. But don't try to return the parsed argument list via some form of $(parse-recipients ...), because then you will immediately run into bash argument splitting issues.

True, that really was quite a naive approach, I'll find a proper solution for the actual implementation.
Thank you for the feedback!


small typo fixes to code comments and README

small typo fixes to code comments and README

Nice catches!


Parse from environment

Description
This allows reading values for @Option and Flag from environment variables.
I started work on this before this repo was open sourced, and it was requested as #4
Detailed Design
Flags can now be specified as
@Flag(name: [.environment, .long])

and similarly options as
@Option(name: [.environment, .long])

There are two new NameSpecification to support this:
    /// Read the value from an environment variable. The name is using the `THE_QUICK_BROWN_FOX` style.
    case environment

    /// Read the value from an environment variable with the specified name/
    case customEnvironment(String)

As one would expect, .environment picks a auto-genreated name based on on the flag / option name, similar to how for command line names are generated. But for environment variables, the generated strings are using the THE_QUICK_BROWN_FOX style.
TODO: I’d like to prefix the executable name to the auto-generated environment variable names. Need to funnel that through.
Example
If we have
enum Shape: String, CaseIterable {
  case round
  case square
  case oblong
}

struct Options: ParsableArguments {
  @Flag(name: [.environment, .long])
  var shape: Shape?
}

we can set an environment variable ROUND to make shape = .round — similar to the command line argument --round.
For options if we have
struct Options: ParsableArguments {
  @Option(name: [.environment, .long]) var name: String?
}

we can set the environment variable NAME to Daniel, and name = "Daniel — similar to the command line arguments --name Daniel.
Details
There’s a new EnvironmentName type that’s a RawRepresentable wrapping a String to give some type-safety. Environment variables get mapped to a [EnvironmentName: String].
For flags and options that are exclusive, we still allow the command line to override any environment variables.
There’s a new OriginalInput type that’s using in a few places where we used to have a [String]. This would be the array of arguments passed to the executable. Now it’s type safe and holds both this array and the environment variables that are set. This cleans up the code in a few places.
The InputOrigin now can both represent an index into the arguments array or an environment variable name.
Documentation Plan
TODO:

[ ] update Documentation
[ ] update the guide

Test Plan
Updated the unit tests as applicable.
Source Impact
Purely additional. Should not require any source changes by users.
Checklist

[x] I've added at least one test that validates that my change is working, if appropriate
[x] I've followed the code style of the rest of the project
[x] I've read the Contribution Guidelines
[ ] I've updated the documentation if necessary
[ ] Added code to prefix the executable name to environment variable names

@danieleggert Awesome to see this coming along! 👏👏 A few questions about the behavior:

Are options or flags allowed to have only .environment as their name, such that there's no way to set them on the command line?
Does it make sense to think about allowing positional arguments to be specified in the environment?
How do you anticipate making the environment keys visible to users?

The Swift project moved the default branch to main and deleted master branch, so GitHub automatically closed the PR. Please re-create pull request with main branch.
More detail about the branch update - https://forums.swift.org/t/updating-branch-names/40412

@danieleggert will you take this on to re-add it to the queue? or do you need some help pushing this?

@natecook1000 What’s your thought on this? I know you wanted to look at this, too? I should be able to get a few spare cycles to update this over the coming weeks… 🤞


Add Exp() to FloatTensor (#473)

Hello,
This pull request should add the Exp() for FloatTensor.
Thank you!

Great job!
Don't forget to add the integration tests in a later commit 👍


After upgrade of Home Assistant Core to latest version integration stopped working

Describe the issue
After upgrade of Home Assistant Core to latest version integration stopped working.
Deleted my OMV entry in HA and recreated it but no entities were discovered/added.
Software versions

Home Assistant version:
Home Assistant 2023.9.0
Supervisor 2023.08.3
Operating System 10.5
Frontend 20230906.1 - latest

openmediavault integration version: v1.4.1

openmediavault software version: 6.8.0-1 (Shaitan) - Linux 6.1.21-v8+

logs.txt

Confirm. Also here all stopped. After remove and add the integration again it initializes, logs in and closes the setup as completed. But no new entities are made.

Confirm. Stop working

same here rolled back to 2023.8.4 back working again

same here - no entities

same here, no entities after upgrade

Same same

yup, many integrations broke. that sneaky breaking change messed up a lot.

So, how can we help?

no help needed with this one, just need time to update all my integrations

Getting to be a rough update month. My OMV is also broken now along with Chamberlain garage opener. That one is a bit inconvenient. Well... guess I'd complain if I was paying for HA but... considering that's it's open source and I've only donated to them... I'll be patient lol. I suspect they are working on it.
I work in a field where software updates (patching) is extremely common. I work most weekends patching customers servers. I get... sometimes things get a bit wonky.  Spending a lot of big dollars on a product they dont just use but have SLAs or even laws if calls aren't monitored. This is just home automation. Life will go on...no one will die and no one will get fined thousands of dollars so...hang in there folks. The team will sort it out as soon as they can. In the meantime...just log into the OMV portal lol.
Still love ya HA team! Keep doing what you do. Been wanting a automated home since the first time read about it so long ago..I can't remember when. Now I have it... it's very inexpensive and best of... I'm not forced into some megscorps box and cloud and all that goes along with it. Cheers!

same here rolled back to 2023.8.4 back working again

Andy...did you rollback to core 8.4? And...are you just restoring a back up?

same here rolled back to 2023.8.4 back working again

Andy...did you rollback to core 8.4? And...are you just restoring a back up?

just rolled back no backup involved

fixed in v1.4.2

Confirmed... working again. Well done! Now...just need Chamberlain Cover/garade door integration fixed.

confirmed, works again. Thank you very much @tomaae


Add FAQ section

how to add and use user-defined kernels that are not supported in ensemblemd?
what is the users effort in setting up a SA Loop ?

There's now a FAQ section at: https://radicalensemblemd.readthedocs.org/en/master/faq.html
New entries are added to this file: https://github.com/radical-cybertools/radical.ensemblemd/blob/master/doc/faq.rst


net/http: No way in HTTP2 for http.Handler to request a client to close its connection

What version of Go are you using (go version)?
1.8.1
What operating system and processor architecture are you using (go env)?
linux/amd64, darwin/amd64
What did you do?
The golang net/http HTTP1 server will close a client connection if a Connection: close header is written to the http.ResponseWriter. In HTTP/2, this will be passed directly to clients (resulting in an HTTP2 protocol error since that header is explicitly disallowed via the spec).
The reason the server was sending that header was to request (under excessive load) that Kubernetes API clients should "go away" and reconnect, to ensure that if one particular API server becomes overloaded that it can shed connections and let the intervening load balancer have another opportunity to balance out the load.  Currently the kubernetes clients are very good at not needing to reconnect, and while the server knows that it is overloaded, the client has no way of knowing that another api server exists.  Even if the client were to interpret the specific error response (429) as closing the connection, it can't effectively close the specific connection pointing to the overloaded server, given the API of the golang client transport.  Finally, this requires every language client to implement that logic at a level above the HTTP2 transport, rather than as part of the normal HTTP2 behavior.
This is a request to have a mechanism in net/http for HTTP2 to request the HTTP2 server close a particular client connection, whether via receiving a Connection: close or some other mechanism.  Without casting to private interfaces, it does not appear possible (or if it were, safe, considering the other protocol logic) to request a GOAWAY frame be sent from the server.  This would allow an HTTP2 server to force a client to reestablish its HTTP2 connection, which would allow higher level proxies and balancers to appropriately route / reject that connection.

/cc @tombergan

@smarterclayton Do you use HTTP/2 via net/http or do you use x/net/http2 directly? net/http is currently very centered around HTTP/1 and doesn't have a real notion of a "connection".
Ideas:

Add x/net/http2.ServeConn, with Serve and Shutdown methods. A handler could get at the request's ServeConn by extracting a value from the request's Context. This feels kind of ugly and doesn't backport nicely to net/http.

Define an H2-specific handler type that exposes http2.ServeConn directly. This could have other advantages, e.g., the H2-specific handler could use a concrete ResponseWriter type that has a Push method, so users could call Push without a type cast. This feels less ugly, but doesn't backport nicely to net/http.

Define interface { GoAway() } which is implemented by the HTTP/2 ResponseWriter. The semantics are: GoAway ends the current response and gracefully shuts down the client connection. This interface could be defined in net/http. We are starting to collect interfaces like this (also see http.Pusher and http.CloseNotifier), which feels ugly.

Similar to the above, but instead the interface is something like interface { SetCloseConnectionAfterResponse() }. The semantics are: the method must be called before WriteHeader. In HTTP/1, the response will have Connection: close. In HTTP/2, a GOAWAY will be sent after the response. This works identically for H1 and H2, which is nice, but I can't think of a non-ugly method name, which is not nice.

Reuse Connection: close in HTTP/2. I don't like this idea. This could result in surprising behavior, for example, for people who write H2 -> H1 proxies and forget to remove hop-by-hop headers when generating the proxied response.

@bradfitz, any thoughts?
Somewhat relatedly, the godoc for net/http.Handler says the following, which is actually not true for HTTP/2. (In H2, we send a RST_STREAM on panic.)

If ServeHTTP panics, the server ... recovers the panic, logs a stack trace to the server error log, and hangs up the connection.

What do you actually want to do?
(1) hard-code the TCP connection and break all other streams currently in-flight?
(2) just send a GOAWAY, gracefully finishing the current active requests?
(3) send a REFUSED_STREAM, so the client retries it elsewhere?
I don't want to overload Connection: close for sure.
Another possibility is magic panic values, since net/http has historically (for better or worse) defined that panic is caught by the server and mapped into a server error. We can say that if the panic value implements a certain interface (say, interface { SendGoAway() } or interface { SendRefusedStream() } etc), then we do that. Then it also doesn't matter type-wise if the user uses the bundled x/net/http2 in std but uses the panic values from x/net/http2.
But let's figure out the goals before we design.

Kubernetes may be a bit unusual in this regard in that it has large numbers of very long lived connections from large numbers of stable clients (infrastructure) that process large numbers of individual requests.  To avoid wasting CPU on TLS setup, we work very hard to avoid closing connections unless necessary.  However, occasionally a backend server is overloaded and wishes to shed load.  To do that, we send 429.  However, with lots of stable clients (including browsers), the 429 doesn't actually shed load from that particular backend server, because clients continue to use that connection as long as it is open.  This leads to rolling updates sloshing large chunks of load around, without balancing them (because the moment the server goes down, the clients reconnect because of the high rate of requests).
For this use case, for HTTP1, closing the TCP connection works well because intervening HTTP and TCP proxies handle that very well.  Since that's one request in flight at a time, closing is acceptable because it does not impact other clients.
For HTTP2, given the lack of advanced HTTP2 support in most of the proxies in common use, closing the TCP connection is the only mechanism that would move load around.  We would prefer it be graceful.  So that sounds like 2 above (we want the client to GOAWAY and to hit the load balancer again).  But if REFUSED_STREAM would signal a reasonable HTTP2 client to create a new connection, that would be desirable.

(3) send a REFUSED_STREAM, so the client retries it elsewhere?
But if REFUSED_STREAM would signal a reasonable HTTP2 client to create a new connection, that would be desirable.

Servers cannot rely on REFUSED_STREAM to mean "try again on a different connection". That is not what the HTTP/2 spec says and it's not what is implemented by Chrome or Firefox. See code links here.
I think GOAWAY is the right mechanism for this.

/cc @rs

A quick solution is have an exported version http2errClientConnClosed,
so we can just compare and ignore it.

@kelwang, I think you're confusing this issue with a different one.

It turns out that Go's HTTP/2 server was improperly allowing Handlers to send a "Connection: close" response header, which is a protocol violation.
I'll kill two birds with one stone and while fixing that, also fix this bug and make the "Connection: close" also mean to send a GOAWAY, like we do for HTTP/1.x.

Guys what's the latest update on this? We just ran into this, & I spent the whole day in investigating why some clients are not closing connection,  only to figure out HTTP2 clients are not receiving it at all.
What do I do server side to force HTTP2 clients to close the connection?

I'm using ASP .NET server side btw.

Send response header Connection: close.

That doesn't work right, we're already sending it. Http/2 clients do not receive this header, only Http/1 clients do. I thought that's what this whole thread is about, to cfigure out a way to close Http/2 connections.

 The fix is obviously not available in 1.10, or even the 1.11beta1 I believe.
If you still see this issue in latest master, please feel free to raise a new issue with all the necessary details.  Thank you.

@AjinkyaKher, HTTP/2 clients are not supposed to see a Connection header. See https://github.com/golang/net/commit/97aa3a539ec716117a9d15a4659a911f50d13c3c for details. You need to be using a recent (unreleased) Go version to see this. Or wait a couple hours.


One component for all?

Why are you creating only one component "home" with all the content inside? this is not the grace of components!

It's temporary solution. I will do the componentization soon.

Okey! :+1:  By the way: Good job!

@aralroca Thanks for using this starter You rock :100:
I've divided the homepage into functional components. You can pull to get latest changes.
Best, Peter.


enableHotkeys: Right Arrow

tour not ending when using right arrow key and there is no next step.

i just set an unregistered anchorId, to end the tour.


[docs bug] Minor edits to repo status table and checklist on elements pages

Describe the bug
Continuation of #1502.
Minor edits to repo status table and checklist on elements pages.
Status table

[ ] Remove the Responsive tag completely (@markcaron Please confirm this is okay.)
[ ] Change webRH to WebRH

Status checklist

[ ] Adjust table column widths: Property: 20%, Status: 20%, and Meaning: 60%
[ ] Remove Responsive row completely (@markcaron Please confirm this is okay.)
[ ] WebRH row: Reference the table below for the correct checklist text. Right now, it has the same text as the RH Elements row.

Figma library

Status
Text

Planned
Component should be added to the Figma library at a later date

In progress
Component will be added to the Figma library when finished

Ready
Component is available in the Figma library

Deprecated
Component was removed from the Figma library

N/A
Not planned, not available, or does not apply

RH Elements

Status
Text

Planned
Component should be added to the RH Elements repo at a later date

In progress
Component will be added to the RH Elements repo when finished

Ready
Component is available in the RH Elements repo

Deprecated
Component is no longer available in the RH Elements repo

N/A
Not planned, not available, or does not apply

WebRH

Status
Text

Planned
Component should be added to the WebRH repo at a later date

In progress
Component will be added to the WebRH repo when finished

Ready
Component is available in the WebRH repo

Deprecated
Component is no longer available in the WebRH repo

N/A
Not planned, not available, or does not apply

Which Component?
Repo status table and checklist on elements pages
Steps to reproduce
Look at the status table or status checklist on any element page.
Expected behaviour
Read edits above.
Screenshots
No response
Element HTML
No response
Operating System (OS)
iOS, macOS, Linux, Windows
Browser
Chrome, Safari, Safari iOS, Microsoft Edge, Firefox
More browser information
No response
Additional Info
No response

@coreyvickery @diwanshi, yes we need to remove the Responsive columns from each of the tables.


Random model validation errors occur during POST request when Request.ContentLength exceeds 4096.

I get the following error, when executing my POST request:
{
  "errors": {
    "string[216]": [
      "Unexpected character encountered while parsing value: S. Path 'string[216]', line 1, position 3808."
    ],
    "string[216].string": [
      "The input was not valid."
    ]
  },
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "traceId": "00-a8a345166aff6f41a0b3b59526a20044-12f52af2db5e0748-00"
}

Sometimes error looks like this (request is similar, it just has more or fewer strings in it). See the request below.
{
  "errors": {
    "strings[216]": [
      "The input was not valid.",
      "Unexpected character encountered while parsing value: S. Path 'strings[216]', line 1, position 3810.",
      "Unexpected character encountered while parsing value: o. Path 'strings[216]', line 1, position 3810."
    ],
    "strings[216].strings": [
      "Infinite loop detected from error handling. Path 'strings[216]', line 1, position 3810."
    ]
  },
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "traceId": "00-d3e8019bfcf3fe4888488ab0438f3910-8626179ab7e6e94a-00"
}

I created the following sample controller and model to reproduce the issue:
[ApiController]
[Route("api/[controller]")]
public class TestController: ControllerBase
{
    [HttpPost("post")]
    public IActionResult Post(Model model)
    {
        return Ok();
    }
}

public class Model
{
    public string[] Strings { get; set; }
}

This is the request I use: https://jsonblob.com/faf7720e-0559-11ea-a4bb-cf0a978731bb
There is an array strings with 235 strings in it. The interesting part is that it works with 230 strings.
I noticed, that with 235 it exceeds 4096 ContentLength.
Do you have such limits anywhere?
However, if I do manual deserialization of request body it works fine:
[ApiController]
[Route("api/[controller]")]
public class TestController: ControllerBase
{
    [HttpPost("post")]
    public async Task<IActionResult> Post()
    {
        var model = await DeserializeInputStream<Model>(Request.Body);
        return Ok();
    }

    protected static async Task<T> DeserializeInputStream<T>(Stream body)
    {
        var jsonRequest = await new StreamReader(body).ReadToEndAsync();
        return JsonConvert.DeserializeObject<T>(jsonRequest);
    }
}

public class Model
{
    public string[] Strings { get; set; }
}

We use version 3.0.
Also, we use AddNewtonsoftJson and EnableBuffering.

@RomanTymchyshyn thanks for contacting us.
@pranavkm Do you have any thoughts?

@RomanTymchyshyn could you share a minimal app that reproduces the issue? I tried recreating an app based on what you wrote and I did not see any the error. I do see these two errors crop up if I have malformed JSON input. For instance, if I post this payload (note the missing quotes around the second string):
{
  "strings": [
    "Some string 0",
    Some string 1
 ]
}

I get this:
{
"errors": {
"strings[0]": [
  "Unexpected character encountered while parsing value: S. Path 'strings[0]', line 4, position 5.",
  "Unexpected character encountered while parsing value: o. Path 'strings[0]', line 4, position 6.",
  "Unexpected character encountered while parsing value: m. Path 'strings[0]', line 4, position 6."
],
"strings[0].strings": [
  "Infinite loop detected from error handling. Path 'strings[0]', line 4, position 6."
],
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "|edf23a06-4c51e57cfd5cce01."
}

which looks pretty close to the error you posted.
FYI @JamesNK, here's the stack trace I get for the infinite loop detected error:
Newtonsoft.Json.JsonSerializationException
  HResult=0x80131500
  Message=Infinite loop detected from error handling. Path 'strings[0]', line 4, position 6.
  Source=Newtonsoft.Json
  StackTrace:
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)

  This exception was originally thrown at this call stack:
	Newtonsoft.Json.JsonTextReader.ReadStringValue(Newtonsoft.Json.ReadType)
	Newtonsoft.Json.JsonTextReader.ReadAsString()
	Newtonsoft.Json.JsonReader.ReadForType(Newtonsoft.Json.Serialization.JsonContract, bool)
	Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(System.Collections.IList, Newtonsoft.Json.JsonReader, Newtonsoft.Json.Serialization.JsonArrayContract, Newtonsoft.Json.Serialization.JsonProperty, string)

Inner Exception 1:
JsonReaderException: Unexpected character encountered while parsing value: o. Path 'strings[0]', line 4, position 6.

@pranavkm, here is the app reproducing the issue.
It appears that this middleware is the cause of the issue.
It enables buffering, reads the body and resets it to the beginning.
Am I using it the way it's not supposed to be used?
The weird part is that in this small app I had to increase the request size to get it failing.
Even weirder part is that sometimes I get this error:
System.InvalidOperationException: Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at Microsoft.AspNetCore.WebUtilities.HttpRequestStreamReader.ReadIntoBuffer()
   at Microsoft.AspNetCore.WebUtilities.HttpRequestStreamReader.Read(Char[] buffer, Int32 index, Int32 count)
   at Newtonsoft.Json.JsonTextReader.ReadData(Boolean append, Int32 charsRequired)
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.HandleError(JsonReader reader, Boolean readPastError, Int32 initialDepth)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
   at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
   at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)
   at Microsoft.AspNetCore.Mvc.Controllers.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at ModelValidationErrorSample.Middleware.RequestResponseLoggingMiddleware.Invoke(HttpContext context) in C:\Users\romant\source\repos\ModelValidationErrorSample\Middleware\RequestResponseLoggingMiddleware.cs:line 33
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

And sometimes it even succeeds.
But in the larger app it fails 100% of the time with the request I provided in the description.
It looks like something is not awaited properly, but middleware seems to await every task.
Sorry in advance if it's my mistake.

@pranavkm, Wow, that's a shame. We didn't see that Invoke method is used instead of InvokeAsync.
We missed this point during migration from the earlier versions.
Sorry for wasting your time.

@pranavkm, I updated the provided sample to use factory activated IMiddleware and it still reproduces.
Now I'm really confused...

Ok, found the problem, next code in the middleware does not read the body to the end
var buffer = new byte[Convert.ToInt32(request.ContentLength)];
var read = await request.Body.ReadAsync(buffer, 0, buffer.Length);
var requestBody = Encoding.UTF8.GetString(buffer);

Returned number of bytes is less than the requested number of bytes (buffer.Length).
And if you try to read it again, you will succeed.
So I changed my code to this and now it works as expected:
var requestBody = await new StreamReader(request.Body).ReadToEndAsync();

However, from the documentation for ReadAsync method:
<returns>
A task that represents the asynchronous read operation.
The value of the <paramref name="TResult" /> parameter contains the total number of bytes read into the buffer.
**The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number**, or it can be 0 (zero) if the end of the stream has been reached.
</returns>

Since I was able to read the stream to the end after first ReadAsync, it's clear that the number of bytes currently available was NOT less than the requested number (buffer.Length).
So, is it a bug in FileBufferingReadStream or is it incomplete documentation and ReadAsync can return number of bytes less than requested even if there are more bytes in the stream?

So, is it a bug in FileBufferingReadStream or is it incomplete documentation and ReadAsync can return number of bytes less than requested even if there are more bytes in the stream?

I think the stream, being a network stream gets updated internally. Think of it this way, if it has 100 bytes in the buffer and you ask for 200, it will give you back 100 without waiting. If it doesn't have any bit available (or determines it would give you too few bytes, it will yield until it receives enough data and then give that back to you.
It can be that even in that case doesn't give you what you asked for. It's up to the stream implementation to decide how to do that.
Hope that helps.

Ok, thanks! Sorry for wasting your time.


Ctrl-C needs an extra enter to make it work.

VSCode Version: 1.12.2
OS Version: Windows 10 Pro 15063.296

Steps to Reproduce:

Open Integrated Terminal
Press Control+C

It would not work as intended unless I press an extra enter. This "delayed" is really annoying sometimes when I need a quick pause. The shell I used was cmd.exe.

There are a few issues around ctrl+c on Windows https://github.com/Tyriar/node-pty/issues/7


Fix undefined names: exc_info --> self.exc_info

Without this fix exc_info is an undefined name which might result in NameError being raised instead of the desired error.
flake8 testing of https://github.com/apache/beam
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./sdks/python/apache_beam/runners/worker/data_plane.py:185:19: F821 undefined name 'exc_info'
            raise exc_info[0], exc_info[1], exc_info[2]
                  ^
./sdks/python/apache_beam/runners/worker/data_plane.py:185:32: F821 undefined name 'exc_info'
            raise exc_info[0], exc_info[1], exc_info[2]
                               ^
./sdks/python/apache_beam/runners/worker/data_plane.py:185:45: F821 undefined name 'exc_info'
            raise exc_info[0], exc_info[1], exc_info[2]
                                            ^

Follow this checklist to help us incorporate your contribution quickly and easily:

[X] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[X] Each commit in the pull request should have a meaningful subject line and body.
[X] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue.
[X] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[X] If this contribution is large, please file an Apache Individual Contributor License Agreement.

LGTM. Thank you.


Domains are not supported

I got

Unknown directive type "py:function".snooty(DocUtilsParseError)
on the following code:

.. py:function:: lumache.get_random_ingredients(kind=None)

   Return a list of random ingredients as strings.

Originally posted by @Adrian-Bielefeldt in https://github.com/vscode-restructuredtext/snooty-parser/issues/30#issuecomment-942221395

https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html
Upstream does not support this feature.


⚠ Bofrost.be has degraded performance

In c57ad80, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1895 ms

Resolved: Bofrost.be performance has improved in 1850797 after 1 hour, 47 minutes.


ROS2 Linting: control_launch

Summary
Added linters to the control launch ament_lint_common. Not sure if this is necessary but I also add the package dependencies that were missing before. I know that the descriptions packages did not require linters but I wasn't sure about these launch packages if they benefit from adding ament_lint_common.
Note: It seems like pure_pursuit is not ported yet but is a dependency in this package.

@jilaada @mitsudome-r should we wait to merge this PR until pure_pursuit is ported?

@jilaada @mitsudome-r should we wait to merge this PR until pure_pursuit is ported?

We could wait until it gets merged. It might be better than creating yet another PR to uncomment one line haha

Looks like the pure_pursuit port has been merged. I'll go ahead and merge this.


Configuration items in a single location vs in all files

Compute name / resource name, etc...
Single place to setup their variables

We would probably then get rid of all the my_*.yml files if we can centralize things to a single config file.

Then just modify the config file then the rest is just to run everything?

I think we can do that as part of the custom action


Test shfmt for formatting shell scripts

One option for https://github.com/CosmWasm/cosmwasm/issues/652
Testing the script here as we have a good amount of scripts in this repo.

Added one commit, which add this to the CI


Legacy protocol support in Envoy - Diameter Radius etc

In the 4g and 5g collaboration, the legacy protocol support is missed in the envoy, as per the envoy document
envoy supports following protocols :
-       http
- 	http2
- 	https
- 	tcp
- 	tls
- 	grpc
- 	grpc-web
- 	mongo
- 	mysql*
- 	redis*
- 	udp

but when in the actual telco vendors have both legacy and envoy supported protocols (till now), if envoy can identify the legacy protocols, (Diameter, radius) vendors can use envoy as a load balancer for both legacies and supported protocols.

I don't think there would be objection to adding legacy protocols, but per https://github.com/envoyproxy/envoy/blob/main/EXTENSION_POLICY.md to land it upstream you'd have to find someone willing to code it up (and support it) and a maintainer to co-own.

RADIUS stands for Remote Authentication Dial-In User Service, is a security protocol used in the AAA framework to provide centralized authentication for users who want to gain access to the network.
Features – Some of the features of RADIUS are:
Open standard protocol for AAA framework i.e it can use between any vendor device and Cisco ACS server.
It uses UDP as a transmission protocol.
It uses UDP port number 1812 for authentication and authorization and 1813 for accounting.
If the device and ACS server is using RADIUS then only the passwords of AAA packets are encrypted.
No explicit command authorization can be implemented.
It provides greater extensive accounting support than TACACS+.
In RADIUS, authentication and authorization are coupled together.
Diameter is a planned replacement of RADIUS. It is an AAA protocol for applications such as network access and IP mobility.
It is intended to work in both local and roaming AAA situations.
The diameter is just twice the predecessor protocol Radius.
It uses TCP or SCTP and not UDP.
It uses transport-level security (IPSEC or TLS).
It has a 32-bit identifier instead of 8 bit.
It supports stateless as well as stateful mode.
It supports application-layer acknowledgment, defines failover.
It offers better roaming support.
It uses AVPs.
Diameter allows the definition of new commands and attributes. It is easy to extend.
in simple words diameter support TLS/TCP and DTLS/SCTP
for now, Istio will not support STCP, this implementation to be taken care of in envoy proxy guess, kindly check and share your comments.
For reference: #7521 and envoyproxy/envoy#9430
RFCs attached for reference:
https://tools.ietf.org/html/rfc6733
https://tools.ietf.org/html/rfc3588
https://tools.ietf.org/html/rfc5719


Fix build with nginx 1.11.6

default_port was removed from ngx_http_upstream_srv_conf_s since nginx 1.16.6

Since I no longer have commit access to this repo, I've committed a slightly modified version of this patch to OpenResty's fork of this repo:
https://github.com/openresty/ngx_postgres


[WIP] Updating component previews for selector test coverage

⚠ WIP: DO NOT REVIEW ⚠
Description
this PR updates various component previews for lookbook, to add coverage for component specific selector tests. updated components include:

[ ] Primer::Alpha::ActionList
[x] Primer::Beta::BlankSlate
[ ] Primer::Beta::Label
[ ] Primer::Beta::Button

also includes a few other fixes, like correcting the links used in ActionList to point to # instead of /, preventing the lookbook previews from loading the lookbook site inside of itself when clicked.
Integration

Does this change require any updates to code in production?

Merge checklist

[ ] Added/updated tests
[ ] Added/updated documentation
[ ] Added/updated previews

closing in favor of #1602


[next] Use fbo simplifications

i was working with trying to make a RenderTexture component or an example of an example of a screen quad / mini postprocessing example. Similar to what's described in this article.
i noticed that fbo would be really nice to use here but while reading the docs, i decided that it could use a little spruce up.
The original port was almost a 1:1 with drei's. Most of the changes are to simplify the example and to get rid of things like as Type casts and to let the threejs defaults pass through.
More docs about the different ways to call useFBO and a small code snippet about how to use the optional depth texture have been added.
because the WebGLRenderTarget defaults are now used and we were using nondefaults in useFBO, this is a breaking change. i'm not sure if there should be a minor or major changeset for this. probably minor right because at the time of writing this, the next branch has not been officially released.

this pr will be too difficult to test


Unable to set keyboard shortcut for Accessible Buffer

Type: Bug
Do I still have the bug even when disabling extensions: Yes
Other info: using NVDA screen reader, Windows 11
Steps to reproduce:

Set keyboard shortcut for "Terminal: Focus Accessible Buffer" to anything. I tried ctrl+shift+' and ctrl+8.

Go to terminal and try the shortcut. For me, the hotkey does nothing. The shift+tab hotkey seems to still work though. But the shift+tab hotkey is undesirable for me because it sends tab / shift+tab to the terminal too, which disrupts my workflow sometimes.

VS Code version: Code - Insiders 1.78.0-insider (2c51b3de329d48f45eabe80316f099f46fd3a5cc, 2023-04-26T05:19:40.699Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes

System Info

Item
Value

CPUs
12th Gen Intel(R) Core(TM) i7-1250U (12 x 1882)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
15.63GB (7.82GB free)

Process Argv
--crash-reporter-id 1afd7eee-9792-4ab8-bea6-a54e65310e3c

Screen Reader
yes

VM
0%

Extensions: none
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256197
vstes627:30244334
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
pylantcb52:30590116
nodejswelcome1:30587009
pyind779:30611226
vscrp:30624060
pythonsymbol12:30651887
2i9eh265:30646982
azdwalk:30721579
pythonms35:30671666
f08j5886:30680471
7ij38806:30687742
pythonfmttext:30716741
pythonclientmv:30700173
fixshowwlkth:30724385
showsbindicator:30724477

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Scope photoslibrary.readonly will be removed from the Library API after March 31, 2025 - Google Photos Picker API should be used instead.

According to the announcement of Google Posted September 2024, the scope photoslibrary.readonly will be removed from the Library API after March 31, 2025. Google says: "If your app needs users to select photos or albums from their entire library, use the new Google Photos Picker API."
So, if I understood correctly, after March 2025, google-photos-api-python-quickstart won't work anymore.  Did anybody successfully implement it yet using the Google Photos Picker API?
Thanks
Wilfried

Hi @WilfriedBl,
I saw the announcement - I'm not sure yet how to use the new APIs.
I'll update as soon as I'll be able.

Thanks for the quick response @ido-ran .
I tried a quick and dirty way to call the picker API but with no success so far and getting a "googleapiclient.errors.HttpError: <HttpError 403 when requesting https://photospicker.googleapis.com/v1/sessions?alt=json returned "Request had insufficient authentication scopes."
Crossing my fingers.

I've created https://github.com/ido-ran/google-photos-picker-api-quickstart with example of using Picker API

Thanks a lot for you work and notification, @ido-ran  . I will see, if I get it to work.


Piping to a command blocks under freebsd when input string has length >= 8192

Go Version: go version go1.4 freebsd/amd64
OS Version/Architecture: 10.0-RELEASE-p6 FreeBSD 10.0-RELEASE-p6 #0: Tue Jun 24 07:47:37 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
I'm trying to pipe arbitrary strings to an external command which sometimes hangs for some reason.
I want to get the CombinedOutput of the command after executing.
The application hangs while piping.

I investigated and found out that the piping to the command won't finish sometimes. I wrote a program to check under which circumstances the piping would hang and found out that if the string is 8192 chars long (or longer) the piping would hang. Here is the program I used which just pipes to cat and uses increasing sizes for the string:
package main

import (
	"io"
	"log"
	"math/rand"
	"os/exec"
)

var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")

func randSeq(n int) string {
	b := make([]rune, n)
	for i := range b {
		b[i] = letters[rand.Intn(len(letters))]
	}
	return string(b)
}

func main() {
	for i := 8190; i < 8195; i++ {
		log.Println("length: ", i)
		data := randSeq(i)

		command := exec.Command("/bin/cat")

		pipe, err := command.StdinPipe()
		if err != nil {
			log.Fatal("can not get pipe from command: ", err)
		}

		log.Println("writing to pipe")
		_, err = io.WriteString(pipe, data)
		if err != nil {
			log.Fatal("can not write to pipe: ", err)
		}
		log.Println("finished writing to pipe")
		pipe.Close()

		_, err = command.CombinedOutput()
		if err != nil {
			log.Fatal("problem while running command: ", err)
		}

	}
}

I tried the same under Linux amd64 with the same go version and the program worked as expected.

When I do the same in the shell the command will execute as expected:
$ openssl rand -base64 8192 | tr -d '\n' | cat

Your program is expecting that you can write a pipe 8KB worth of data
without blocking,
but that's not universally true on Unixes.
For example, if I run your program on Linux and change to write 128KB of
data to the
pipe, the program will also block.
The reason your shell command works is that the cat process is running and
consuming
content from the pipe concurrently.
Your Go program, however, doesn't start the cat process until the whole
WriteString is
completed.

Closing as working as intended.


⚠ Bofrost.lu has degraded performance

In 756fe30, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1357 ms

Resolved: Bofrost.lu performance has improved in ef27ca9 after 13 minutes.