Fix PARTITION_INFORMATION_GPT structure (in according to pinvoke)

Fix PARTITION_INFORMATION_GPT structure according to url. Works better for my case, for example I get correct partitionType Guid = ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 instead of wrong eb0101a2-b9e5-4433-87c0-68b6b72699c7.

I find it very odd that the description of placement of the guids should have an effect. I've tried out the following:

Create a structure with data (the ids you come with)
Marshal it to unmanaged data
Marshal it back to C# structures - both as the current and the new format
Verify the guids

I cannot reproduce a (simple) case where the guid would be read differently.
Could you try to fetch out the data you're seeing? (Use Marshal.Copy to copy it to a C# byte[], and then hex/base64 encode it..).
Test code.
using System;
using System.Runtime.InteropServices;

namespace ConsoleApp17
{
    class Program
    {
        static void Main(string[] args)
        {
            PARTITION_INFORMATION_GPT orig = new PARTITION_INFORMATION_GPT
            {
                Attributes = 500,
                Name = "Test",
                PartitionId = new Guid("ebd0a0a2-b9e5-4433-87c0-68b6b72699c7"),
                PartitionType = new Guid("ebd0a0a2-b9e5-4433-87c0-68b6b72699c7")
            };

            var size = Marshal.SizeOf<PARTITION_INFORMATION_GPT>();
            var ptr = Marshal.AllocHGlobal(size);

            Marshal.StructureToPtr(orig,ptr,false);

            var asOld = Marshal.PtrToStructure<PARTITION_INFORMATION_GPT>(ptr);
            var asNew = Marshal.PtrToStructure<PARTITION_INFORMATION_GPT_NEW>(ptr);

            Console.WriteLine("Old guid: " + asOld.PartitionType);
            Console.WriteLine("New guid: " + asNew.PartitionType);
        }
    }

    [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
    public struct PARTITION_INFORMATION_GPT
    {
        [FieldOffset(0)]
        public Guid PartitionType;
        [FieldOffset(16)]
        public Guid PartitionId;
        [FieldOffset(32)]
        [MarshalAs(UnmanagedType.U8)]
        public ulong Attributes;
        [FieldOffset(40)]
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
        public string Name;
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    public struct PARTITION_INFORMATION_GPT_NEW
    {
        public Guid PartitionType;
        public Guid PartitionId;
        [MarshalAs(UnmanagedType.U8)]
        public ulong Attributes;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
        public string Name;
    }
}

I tried to test your code. It works well without any problem. My case is the next: I just use your example, (ExampleDiskIO method) but with string driveName = @"\.\C:". And then I see such problem. If I use PARTITION_INFORMATION_GPT_NEW I see problem with Attributes (strange value<PHONE_NUMBER>590058402).

Well, to be fair, I didn't include the Enum value in my short test.

Don't know if it's relevant anymore, but I've pinpointed the issue @DamirAinullin originally stated.
Making the struct Sequential didn't work for me, because I started getting runtime errors about misaligned memory positions.
It starts with the PARTITION_INFORMATION_UNION file, where the same offset is assigned to PARTITION_INFORMATION_GPT  and PARTITION_INFORMATION_MBR (hence, the union).
After some research, structures that are used in a union, have to be decorated with [StructLayout(LayoutKind.Explicit)] and in consequence, each field have it's FieldOffset to properly allow the compiler to handle them.
Once setting the above, you can isolate the error to the members BootIndicator & RecognizedPartition of the PARTITION_INFORMATION_MBR.  Depending on the field offset value you set, it's possible to 'move' the failing chars over the GUID gpt partition GUID. And its consistent, it affects the GUID according to the bytes overlapping between both structs (the first 16 bytes in PARTITION_INFORMATION_GPT are for GUID, so that's the favorite victim).
From experimenting, GPT struct seems to be allocated first, and MBR afterwards. My guessing is that since bool type is somewhat strange for marshaling (look into this post https://stackoverflow.com/a/44884332), and MBR has 2 of them, they are incorrectly overwritting the bytes shared by both structs, in those particular positions.
You can swap the position of both structs in PARTITION_INFORMATION_UNION  and watch the opposite: GUIDs for gpt type are correct now, and boolean fields on the MBR struct make no sense.

In regarding to the comment by @Vengariel, I can say that I am working on a similar project, using IOCTL_DISK_GET_PARTITION_INFO_EX, which also uses the union of PARTITION_INFORMATION_GPT and PARTITION_INFORMATION_MBR. In my testing, I also saw for my boot partition the weird value eb0101a2-89e5-4433-87c0-68b6b72699c7 instead of the expected value .ebd0a0a2-89e5-4433-87c0-68b6b72699c7 which diskpart correctly reported.
By changing the [MarshalAs(UnmanagedType.U1)] bool BootIndicator to simply byte BootIndicator, the problem was fixed, precisely as you've observed, and your answer on blittlable types seem very reasonable.
I see this is still in the Open state, I don't use this project in any way (I only found it by googling the GUID), but contained enough information to solve my problem, so that it might be useful for you also in deciding what to do here. Otherwise, there's really not very much information that I could find either.
        // Must be set to explicit, else it won't overlap with PARTITION_INFORMATION_MBR.
        //  See these resources:
        //  - https://stackoverflow.com/questions/14128093/marshaling-error-in-x64
        //  - https://stackoverflow.com/questions/35786764/creating-multiple-partitions-on-usb-using-c-sharp/35792276
        [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Auto)]
        public struct PARTITION_INFORMATION_GPT
        {
            [FieldOffset(0)]
            public Guid PartitionType;

            [FieldOffset(16)]
            public Guid PartitionId;

            [FieldOffset(32)]
            [MarshalAs(UnmanagedType.U8)]
            public EFIPartitionAttributes Attributes;

            [FieldOffset(40)]
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
            public string Name;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct PARTITION_INFORMATION_MBR
        {
            public byte PartitionType;

            // The BootIndicator and RecognizedPartition have to be of type 'byte', as 'bool' is not blittable. Using:
            //  [MarshalAs(UnmanagedType.U1)] bool BootIndicator
            // will actually overwrite the GUID PartitionType fields for bytes 2 and 3 to be the value 01 (which, as
            // this is a union type, those two bytes in the GUID have the same location as the next two 'bool' fields).
            public byte BootIndicator;
            public byte RecognizedPartition;

            public uint HiddenSectors;
        }

        [StructLayout(LayoutKind.Explicit)]
        public struct PARTITION_INFORMATION_UNION
        {
            [FieldOffset(0)]
            public PARTITION_INFORMATION_GPT Gpt;

            [FieldOffset(0)]
            public PARTITION_INFORMATION_MBR Mbr;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct PARTITION_INFORMATION_EX
        {
            [MarshalAs(UnmanagedType.U4)]
            public PartitionStyle PartitionStyle;
            public long StartingOffset;
            public long PartitionLength;
            public int PartitionNumber;
            public bool RewritePartition;
            public PARTITION_INFORMATION_UNION DriveLayoutInformaiton;
        }

So my contribution to saying thanks - you helped me solve my own problem. And I did test with MBR, it appears to work (of course, you'll need to do your own check to see if the value is zero or not to convert it to a bool).


numberOfVerticalLines does not always work for CylinderOutlineGeometry

Local link

As you increase numberOfVerticalLines, it gets lopsided to one side.  True 24 and you'll see it, 90 makes it obvious.

It's also possible to get the wrong number of lines For example, set numberOfVerticalLines to 17 and you get 16 lines. It depends on the combination of slices and numberOfVerticalLines. Some easy to count ones which are incorrect: (slices,numberOfVerticalLines) = (6,4), (8,5), (9,6), ...


API usage

I can't seem to wrap my head around the endpoints that the API uses, so all I get from is are 404 error codes.
I've tried GET/POST/PUT/DELETE etc. and from the Python code, I can't even seem to be able to find where the endpoints are defined at.
I don't suppose you could point me in the right direction?

Figured it out. So the endpoint is http://host:5555/route/ and the parameters are source and target (ie. domain.com for source and longerdomain.com for target, as I understood it).
I did notice that PUT requests didn't work, they had to be POST instead. At any rate, I guess this'll get me going and hopefully it'll point other people in the right direction as well.

Hello @Dids, the API needs documentation indeed. In order to help you out a bit:
The only difference is that the path is /routes and not /route/ and then you can query routes by /routes/domain.here.com
Also, you can PUT at /routes/domain.to.be.changed.com.

Thanks @akalipetis, that makes things a lot simpler. :)

Ok, seems like we've left out some old paths for backwards compatibility :disappointed: which I had forgotten.
You can see the routes here: https://github.com/sourcelair/ceryx/blob/master/api/ceryx/api/init.py#L14
I was talking about:

/api/routes
/api/routes/domain.here.com

Sorry for the misunderstanding.
In any case, feel free to make a PR with docs for the API if you'd like, we'd :heart: that


Any example of this module working?

I had to fork it to add 'babel-core' as a dependency, and it still didn't work, maybe because the correct register hook wasn't used. Any example of a package using this module?

I don't have any open source examples available. There are several places in which you can be running into trouble. First off, adding babel-core to this package won't do much for you. That dependency should be in the package you are testing only if you need it.
The biggest problem people face is how babel-register and istanbul do not play nice together. It boils down to not using babel in ways that mess with istanbul's instrumentation. Those methods that cause trouble include requiring babel-regsiter or using a compiler flag in your test runner as in mocha --compiler:babel.
Basically, use babel-node instead of node to run your tests. Using babel-node is the only way I know of babel 6+ and istanbul working together.


Division arithmetic helper does not exists

Hello, we have a use case, in which we have to divide a column with an integer value. To do that I am not able to find any arithmetic helper. There exists two for addition and multiplication, but we also have to apply division operation on a column.
Example: Select * from column1 * 1, column2 / 2 from Table
Kindly let me know if there is any way to achieve this. Thanks

Yes, if you want you can contribute and add a $div helper by yourself.
As template you could easily use the $mul helper. After adding the div directory, adding the source-file div.js with tests please run npm test and the readme will be generated automatcally after a successful test-run.
Here is the location of the mul helper:
https://github.com/planetarydev/json-sql-builder2/tree/master/sql/helpers/arithmetic/mul

sorry, I dont want to close :-) ... hm, reopend again ...
If you got further questions please let me know

Hello, I have implemented the $div helper and tested it. The documentation
file is also added along with the readme file.
Kindly can you give access of the repository, so that i can push the
feature branch and create a pull request for master branch.
Regards,
Umer Mehmood
NorthBay
Direct: +92<PHONE_NUMBER>
<EMAIL_ADDRESS><EMAIL_ADDRESS>www.Northbaysolutions.com http://www.northbaysolutions.com/
On Thu, Nov 7, 2019 at 1:27 PM Planetary Development <
<EMAIL_ADDRESS>wrote:

Reopened #23 https://github.com/planetarydev/json-sql-builder2/issues/23
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/planetarydev/json-sql-builder2/issues/23?email_source=notifications&email_token=AMMDKPDMKEBRPQWARPFRIJ3QSPGPZA5CNFSM4JJT7T3KYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUWM7WUA#event-2778331984,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMMDKPFHP5NVON3TIX4Z2Y3QSPGPZANCNFSM4JJT7T3A
.

You dont need access to the original repo. You can fork it and with the help of the fork you can make your PR. Here is how to do that Create PR from a fork
Thanks in advance and awaitig your PR.

Hello, I have forked and generated a PR regarding that $div helper.
Kindly look into it and let me know if there are any changes.
Regards,
Umer Mehmood
NorthBay
Direct: +92<PHONE_NUMBER>
<EMAIL_ADDRESS><EMAIL_ADDRESS>www.Northbaysolutions.com http://www.northbaysolutions.com/
On Fri, Nov 8, 2019 at 6:56 PM Planetary Development <
<EMAIL_ADDRESS>wrote:

You dont need access to the original repo. You can fork it and with the
help of the fork you can make your PR. Here is how to do that Create PR
from a fork
https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork
Thanks in advance and awaitig your PR.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/planetarydev/json-sql-builder2/issues/23?email_source=notifications&email_token=AMMDKPBMYBB4EGJAPKS7B4DQSVVXVA5CNFSM4JJT7T3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDSE5NA#issuecomment-551833268,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMMDKPGFTFAQMKQ7QVQBJU3QSVVXVANCNFSM4JJT7T3A
.

done with PR #24


Added support for owner-delegated grant

Added support for owner-delegated grant
Added missing checks for author-deleted grant:

Disallowed invocation of non-delegated grant as delegated grant
Disallowed mismatching of grant ID referenced and CID of actual given grant

Added numerous tests to catch up on missing scenario tests for delegated grants in general

Codecov Report
Attention: Patch coverage is 99.52830% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 98.53%. Comparing base (8134078) to head (e6d9f98).

Files
Patch %
Lines

src/core/message.ts
88.88%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #707      +/-   ##
==========================================
+ Coverage   98.44%   98.53%   +0.09%
==========================================
  Files          74       74
  Lines       10025    10193     +168
  Branches     1470     1514      +44
==========================================
+ Hits         9869    10044     +175
+ Misses        150      143       -7
  Partials        6        6

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


Create upgrade-to-cilium.md

Let's make the upgrade-to-cilium intranet doc public
https://intranet.giantswarm.io/docs/support-and-ops/ops-recipes/upgrade-to-cilium/

It might be necessary to create the _index.md in each newly created folder - for example: https://github.com/giantswarm/handbook/blob/main/content/docs/dev-and-releng/_index.md

@MarcelMue added index files ⏫

LGTM


Cannot stop rust program while running python code

Bug Description
When I run python code in fast loop from rust and want to stop the program, python takes interrupt so rust program won't exit.
Steps to Reproduce
Run python code in Rust
Backtrace
No response
Your operating system and version
tested in mac, linux
Your Python version (python --version)
Python 3.11.3
Your Rust version (rustc --version)
rustc 1.70.0 (90c541806 2023-05-31)
Your PyO3 version
0.19.0
How did you install python? Did you use a virtualenv?
mac with brew
and apt for linux
Additional Info
Thank you.

Could you share some code showing what exactly you are doing?
For example, doesn't Python raise an exception when the signal is received? Where is that exception handled?

Sorry for few information.
I think the CTRL-C is captured at python side, and thought That shouldn't happen since It's blocking input to main process, But I'll investigate more and re-open issue.
Thank you for reply

You can disable Python's SIGINT handler with
signal.signal(signal.SIGINT, signal.SIG_DFL)

@birkenfeld Thank you for your kind help :)


removed unnecessary else keyword

http://williamdurand.fr/2013/06/03/object-calisthenics/#2-don-t-use-the-else-keyword

I like to err on the side of being a little too explicit at times. Appreciate all the PRs!


Add bower.json for better compatibility with Bower.

This is especially useful if something like grunt-bower-install is used because it can take the entries in the main attribute and automatically include e.g. the JS files in index.html.

What's the status for this? Currently there is .bower.json file after bower install, but still no main attribute.

This should be fixed in version 0.3.3
The main attribute points to src/showdown,js file (uncompressed/unconcatenated).
If you want to include any extension or the angular integration, you still need to add them manually.


I added quora and medium to social using the following code in _includes/social

{% if site.medium_username %}{% endif %}
    {% if site.quora_username %}{% endif %}

Can you make a PR @mkakodkar ? This seems like something that could be added.

Oh yes I will do that

https://github.com/alshedivat/al-folio/pull/40

Addressed in #40.


Can I choose different service ID for UART terminal?

e.g., using BLE modules with difference or customized service id and feature id

Unfortunately, it's not supported by the app. But feel free to fork the repo and implement your service service.


Android Video Stream problem when in portrait mode

Hi,
I used another webrtc project for mobile platforms and I managed to make a call between hololens and mobile devices. Everything works fine in IOS.  But when I use Android, the hololens does not show android s camera view(audio is ok). After some research I realized that it does not work when Android is in portrait mode but works fine in Landscape mode. I think there is problem in decoding the image without a 0 angle rotation.
Thanks

See #181. Also Android is not currently supported; see #193.


fix readme

Signed-off-by: Nobuhiro MIKI<EMAIL_ADDRESS>

Codecov Report

Merging #19 (1936231) into main (61ae93b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #19   +/-   ##
=======================================
  Coverage   63.39%   63.39%
=======================================
  Files          10       10
  Lines         224      224
=======================================
  Hits          142      142
  Misses         82       82

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Update to Kubernetes v1.27.12

Update dependencies and update client-go to Kubernetes v1.27.12

:+1:

:+1:

:+1:


es08a.js crashes the edison

Have updated the Edison to last firmware, and opkg update, opkg upgrade.
just running that file as is, with the servo on port 5 ... crashes the edison: ie. reboots

Please don't hook up the ES08A to the Intel Edison without using the external power supply. USB alone can't drive the motor, and you risk burning the servo, or even worse, damaging the board! While 1 (tiny) servo alone might be OK when using external power, I highly recommend using a dedicated servo shield for anything that requires more.

Updated on list of known limitations too.


require_grad is False when actor_grad is dynamic

When running the code on DMC, because the actor_grad is dynamics; therefore, loss_policy would be -value_target. value_target is not dependent on the actor's policy distribution, and so, loss_policy does not have any gradient flowing through it with respect to the actor's parameters.
The assertion will be assert (False and True) or not True, since loss_policy does not require gradients. Therefore, the assertion becomes False.
How can we fix it?

I could be completely wrong, but is it possible that the assert is hard-coded for the case when actor_grad == "reinforce"?

Same problem here!

You are right, it is very likely that assertion was written assuming actor_grad=reinforce. What if you simply remove it, does it work then?
To be honest, I did way less testing with actor_grad=dynamics. The functionality did work at one point and was tested with DMC, but something could have changed since then.

If you use the reinforce policy gradient then you don't back-prop through the dynamics anymore.


[WIP] cuDF integration into XGBoost

Enable XGBoost by providing native support for cuDF: https://github.com/rapidsai/cudf
Note: this PR is currently a work in progress. We are publishing it to acquire early feedback, so that we can ensure smooth integration with DMLC/XGBoost.
This PR provides the following:

Support for cudf.Dataframe at data ingest in Python
Support for DMatrix construction from gdf_column types
Updates to build infrastructure for compiling with cudf support.

@mt-jones in general there is no dependency on cudf in python due to the compat.py module creating dummy classes if there is no cudf. Obviously you will need cudf installed to actually pass a cudf dataframe.
I will tidy up the python code when I see what the cudf side looks like.
@hcho3 can I get a review please. The python code is in flux but the native code is ready.

@hcho3 I just noticed we have some strange methods for DMatrix in the Python API such as set_weight_npy2d. Shouldn't set_float_info automatically detect the input type and call the appropriate c_api function? All of these _npy2d functions seem redundant.

@RAMitchell Will review this after 0.82 release.

@hcho3 @trivialfis given that this will not be integrated into the 0.82 Release, we're thinking of generalizing this PR which would involve the following changes:

Remove the interchange format altogether
Enable XGB ingest of Apache Arrow via passing opaque pointers to data structure (device side)

I believe this is a more robust solution that provides a large community access to XGB, but I wanted to probe for thoughts on this matter.
Thanks.

@mt-jones Sounds interesting. :)

@mt-jones Interesting. I particularly like the idea of integrating Apache Arrow.

@mt-jones interesting idea, I'd share some experience related to Arrow&XGB before
we have tried to integrate with Apache Arrow but find it doesn't provide enough benefits which beats the concerning of code complexity in the middle of the process
our previous concern is that the memory footprint to copy data from JVM to native layer is too high in XGBoost-Spark leading to the scalability concerning. So we choose to use Arrow as the intermediate layer to avoid data copying
however, after we fix the memory leak caused by iterator.duplicate() in Scala language, we found the savings would be only the size of 32K records in the memory (which is the number of records we copy from jvm to native for every batch)
more details with back-of-envelope calculation:
With Arrow: we translate training data from Spark's LabeledPoint to Arrow format
Without Arrow: we translate LabeledPoints from Spark's LabeledPoint to XGBoost's LabeledPoint and then copy to native memory with 32K records batch by batch
so, the additional memory footprint in Without Arrow case is that 32K records
BTW I think this type of potentially huge change and roadmap thing is better to come up with a RFC for discussion

Another concern making us discard the Arrow experiment in the middle is that, Arrow essentially put everything in memory and in most of shared Hadoop clusters, memory size used by each container is strictly limited, Arrow brings more user complaints about why my container is killed (actually because they use too much memory)
to make it more aligned with other undergoing work, maybe we should focus on one thing in this PR, integrate cuDF and work with others to have a co-design about how the data layer of xgboost should look like, e.g. as @trivialfis mentioned in the thread of https://github.com/dmlc/xgboost/pull/4193

@CodingCat these are excellent considerations, and I think there are a lot of moving parts to this. I would say they can be broken down into three components.

Arrow ingest from the host
Arrow ingest from the device
Defining a data specification

Regarding (1), I think your points are well made. Probing how data migrates through different ecosystems helps us better understand the path of greatest performance, and of least code impact. I’m not sure I’m sold on a good solution for handling data with Arrow on the host.
Regarding (2) the proposition is as follows: cuDF’s specification is itself in flux as developments are made and features are added. One thing we work diligently to achieve is cohesion with the Arrow specification of the data structure. We are always compliant. So rather than building an interchange format which tries to encapsulate numerical types as floats, and building a matching structure in cuDF, we thought it made more sense to explicitly match the Arrow specification for the device side struct. That way, we guarantee some consistency moving forward. Materially, this will place a definition of the Arrow data struct device side into XGB. This is what we’d use to perform instantiation.
Ideally, there would be a matching feature addition for Arrow host-side. I don’t think it belongs in this PR because it would touch a lot more code, and delay this PR unnecessarily.
Regarding (3) I think co-designing a specification for a data structure will help us create matching interoperability in cuDF, making it easier to maintain a functional workflow that involves both libraries.
It would be awesome if we could perform a conversion internally, and pass a pointer to XGB and have it build a distributed DMatrix for training, etc.
Let me know what you’re thinking is with the above. Again, if you think it’s better to build in direct support for cuDF, we’re open to the idea; though, it would be predicated on (3), I think.

@mt-jones thanks for the reply!
IIUC, Arrow is chosen as a standardized specification for the intermediate data layer between "any frameworks running with hardware other than host" and XGBoost,
in future, if XGBoost supports other devices beyond GPU, say XPU, the frameworks operating on those devices are supposed to transform data to Arrow first so that XGBoost can directly consume from that

@CodingCat thanks for the insight. Let me make sure I understand.

Arrow is the standard for device interoperability.
If cuDF output a data structure which was Arrow compliant, XGBoost will handle it in the future
As far as I can tell, cuDF interoperability represents the first implementable undertaking which would require defining infrastructural components for ingest from GPU DataFrame (or similar) libraries

Is this correct?
If so, (3) prompts us to go a bit further by defining some of infrastructural components in XGBoost in conjunction with co-designing the DMatrix specification.
Looking forward to your thinking.

@CodingCat @mt-jones So we should review this PR as it is? Can I review it now?

@hcho3 I think we may go in a different direction, so there is no need right now.

@mt-jones yes, that’s what I meant and what I got from your first reply to me?
Did I bring something beyond what you originally scoped?

@mt-jones yes, that’s what I meant and what I got from your first reply to me?
Did I bring something beyond what you originally scoped?

Not at all. This is entirely consistent with our plans for this PR. Just making sure we’re aligned :)
I was surprised to hear about the host side issues with Arrow. But it makes sense.


Unable to connect to Luma3DS Repo

What model of system are you using?

[ ] Old 3DS
[X] Old 3DS XL
[ ] 2DS (non-XL)
[ ] New 3DS
[ ] New 3DS XL
[ ] New 2DS XL

What is your current Luma3DS version?
If you are running an hourly version of Luma3DS, please manually update to a stable version as I will no longer deal with people who are using hourlies.

[ ] Luma3DS v7.1 + boot9strap v1.0/v1.1
[ ] Luma3DS v8.0 + boot9strap v1.2+
[ ] Luma3DS v8.1 + boot9strap v1.2+
[ ] Luma3DS v8.1.1 + boot9strap v1.2+
[ ] Luma3DS v9.0 + boot9strap v1.2+
[ ] Luma3DS v9.1 + boot9strap v1.2+
[X] Luma3DS v10.0+ + boot9strap v1.2+

What version of Luma Updater are you using?

[ ] v2.0
[ ] v2.1
[ ] v2.1.1
[ ] v2.1.2
[ ] v2.2
[ ] v2.3
[ ] v2.4
[X] v2.5

How are you running Luma Updater?

[X] .cia
[ ] .3dsx + HBL/Rosalina

What problems are you experiencing?
"Could not obtain update details."
What is the exact error code you are receiving?
Loaded existing payload in memory, searching for version number...
Downloading https://api.github.com/repos/AuroraWright/Luma3DS/releases/latest...
Could not get Location header for 3xx reply
Ret code: ded92

I have v2.5 installed, and I have tried reinstalling it, but I am still getting this error.
Looking at the URL, I assume #73 would fix it.

Same here on a New 3DS XL and a New 3DS.
Notes :

I updated LumaUpdater to V2.5 on my "New 3DS XL" before to update Luma and run into this issue. Had to manually update Luma.
Then I updated Luma without any issue with LumaUpdater V2.4 on my daughter's "New 3DS", then, after V2.5 installation, run into the same issue.

Thanks for your work !

Same here on a New 3DS XL and a New 3DS.
Notes :

I updated LumaUpdater to V2.5 on my "New 3DS XL" before to update Luma and run into this issue. Had to manually update Luma.
Then I updated Luma without any issue with LumaUpdater V2.4 on my daughter's "New 3DS", then, after V2.5 installation, run into the same issue.

Thanks for your work !

It's because the correct URL is now
https://api.github.com/repos/LumaTeam/Luma3DS/releases/latest
It moved from AuroraWright to LumaTeam

It's because the correct URL is now
https://api.github.com/repos/LumaTeam/Luma3DS/releases/latest
It moved from AuroraWright to LumaTeam

Same here on Old 3DS.
Luma Updated 2.5
Current installed version: 10.2.1-c058e3f
Error: Could not obtain update details.

Same here on Old 3DS.
Luma Updated 2.5
Current installed version: 10.2.1-c058e3f
Error: Could not obtain update details.

I haven't done any proper testing so this is a bit of an assumption, but I noticed that the location header check specifically checks for the string "location". Doesn't start with a capital 'L'. GitHub's API seems to return a response with "Location". Perhaps that could be the issue?
https://github.com/KunoichiZ/lumaupdate/blob/757aec5b9425b17ded2ebaa3111a67d255da42fd/source/http.cpp#L24

I haven't done any proper testing so this is a bit of an assumption, but I noticed that the location header check specifically checks for the string "location". Doesn't start with a capital 'L'. GitHub's API seems to return a response with "Location". Perhaps that could be the issue?
https://github.com/KunoichiZ/lumaupdate/blob/757aec5b9425b17ded2ebaa3111a67d255da42fd/source/http.cpp#L24

I had looked through the source code and noticed something.
So, we have the release URL.
https://github.com/KunoichiZ/lumaupdate/blob/757aec5b9425b17ded2ebaa3111a67d255da42fd/source/release.cpp#L31
The message that comes up in this case is Could not get Location header for 3xx reply. Note that this is for the first request for the release URL, so from what I can tell, changing to a more accurate URL (LumaTeam) may not change the outcome (although probably should still update that).
https://github.com/KunoichiZ/lumaupdate/blob/757aec5b9425b17ded2ebaa3111a67d255da42fd/source/http.cpp#L24
The second parameter of httpc.GetResponseHeader() is where the header name goes. In this case, location. Note that it is entirely lowercase.
What does this function do?
https://github.com/KunoichiZ/lumaupdate/blob/757aec5b9425b17ded2ebaa3111a67d255da42fd/source/httpc.cpp#L84-L97
When it comes to the checking aspect, it loops through the response headers and looks for matches for the data provided in the second parameter. In this case, location.
Now, there might be a small problem. It is best practice to capitalise the initial letter of each word in headers. GitHub API appears to return Location as opposed to location.
From what I can tell by the code, it does not do any case conversion to the header names (and the headers to check for) so it might not be matching anymore because of a potential server-side change to the capitalisation of the location header.
I do doubt it is a certificate issue because the request and response itself (to obtain a URL to a JSON response with data relating to the latest release) was successful from what it appears. The second line of code mentioned in this comment would have not been executed otherwise.
I would put up a pull request with the simple change, but I had not tested to be absolutely sure that is the issue. So, if anyone is able to compile a build with their current setup, that might be worth looking at.

I had looked through the source code and noticed something.
So, we have the release URL.
https://github.com/KunoichiZ/lumaupdate/blob/757aec5b9425b17ded2ebaa3111a67d255da42fd/source/release.cpp#L31
The message that comes up in this case is Could not get Location header for 3xx reply. Note that this is for the first request for the release URL, so from what I can tell, changing to a more accurate URL (LumaTeam) may not change the outcome (although probably should still update that).
https://github.com/KunoichiZ/lumaupdate/blob/757aec5b9425b17ded2ebaa3111a67d255da42fd/source/http.cpp#L24
The second parameter of httpc.GetResponseHeader() is where the header name goes. In this case, location. Note that it is entirely lowercase.
What does this function do?
https://github.com/KunoichiZ/lumaupdate/blob/757aec5b9425b17ded2ebaa3111a67d255da42fd/source/httpc.cpp#L84-L97
When it comes to the checking aspect, it loops through the response headers and looks for matches for the data provided in the second parameter. In this case, location.
Now, there might be a small problem. It is best practice to capitalise the initial letter of each word in headers. GitHub API appears to return Location as opposed to location.
From what I can tell by the code, it does not do any case conversion to the header names (and the headers to check for) so it might not be matching anymore because of a potential server-side change to the capitalisation of the location header.
I do doubt it is a certificate issue because the request and response itself (to obtain a URL to a JSON response with data relating to the latest release) was successful from what it appears. The second line of code mentioned in this comment would have not been executed otherwise.
I would put up a pull request with the simple change, but I had not tested to be absolutely sure that is the issue. So, if anyone is able to compile a build with their current setup, that might be worth looking at.

When will a version with this fix be pushed out?

When will a version with this fix be pushed out?

@uintdev said that he had manually patched the 3dsx, could he release the patch if @KunoichiZ is ok with it?

@uintdev said that he had manually patched the 3dsx, could he release the patch if @KunoichiZ is ok with it?

The version that does not have the issue is v2.4 (https://github.com/KunoichiZ/lumaupdate/releases/tag/v2.4). Give that a try (especially if you prefer the CIA version).
To avoid SD card removal:

Find an online QR code encoder (https://www.the-qrcode-generator.com/ works)
Paste 'https://github.com/KunoichiZ/lumaupdate/releases/download/v2.4/lumaupdater.cia' into text field
Enter FBI application
Remove Luma3DS Updater title
Use the remote install via QR code feature
Scan the QR code
???
Profit

Note that the older version will ask to update to a newer version and will keep doing that on launch. For now, skip the notice.

The version that does not have the issue is v2.4 (https://github.com/KunoichiZ/lumaupdate/releases/tag/v2.4). Give that a try (especially if you prefer the CIA version).
To avoid SD card removal:

Find an online QR code encoder (https://www.the-qrcode-generator.com/ works)
Paste 'https://github.com/KunoichiZ/lumaupdate/releases/download/v2.4/lumaupdater.cia' into text field
Enter FBI application
Remove Luma3DS Updater title
Use the remote install via QR code feature
Scan the QR code
???
Profit

Note that the older version will ask to update to a newer version and will keep doing that on launch. For now, skip the notice.

Okay, you're right! The cia actually overwrites the old one so removing it isn't strictly needed, but, yep! Thanks!

Okay, you're right! The cia actually overwrites the old one so removing it isn't strictly needed, but, yep! Thanks!

The version that does not have the issue is v2.4 (https://github.com/KunoichiZ/lumaupdate/releases/tag/v2.4). Give that a try (especially if you prefer the CIA version).
To avoid SD card removal:

Find an online QR code encoder (https://www.the-qrcode-generator.com/ works)
Paste 'https://github.com/KunoichiZ/lumaupdate/releases/download/v2.4/lumaupdater.cia' into text field
Enter FBI application
Remove Luma3DS Updater title
Use the remote install via QR code feature
Scan the QR code
???
Profit

Note that the older version will ask to update to a newer version and will keep doing that on launch. For now, skip the notice.

Thanks for this! I just downgraded to Luma Updater 2.4 with this method :-)

The version that does not have the issue is v2.4 (https://github.com/KunoichiZ/lumaupdate/releases/tag/v2.4). Give that a try (especially if you prefer the CIA version).
To avoid SD card removal:

Find an online QR code encoder (https://www.the-qrcode-generator.com/ works)
Paste 'https://github.com/KunoichiZ/lumaupdate/releases/download/v2.4/lumaupdater.cia' into text field
Enter FBI application
Remove Luma3DS Updater title
Use the remote install via QR code feature
Scan the QR code
???
Profit

Note that the older version will ask to update to a newer version and will keep doing that on launch. For now, skip the notice.

Thanks for this! I just downgraded to Luma Updater 2.4 with this method :-)

Will 2.5 be able to update itself to fix the issue, or do I need to keep an eye out for an updated cia file to install?

The application fetches the latest release (for itself) found on the releases page. Which means the maintainer will have to add a new release.

Why did you close it? The issue still exists.

It would be because the fix was merged. Although, yes, there is no new build at this time that includes the changes.


Check if symlink points outside of destination directory

Resolves #242.

Seeing this PR get approved and then closed without any feedback is really discouraging.

There was feedback. The PR was inactive. And v3 is no longer being maintained in favor of v4, which doesn't even write to disk (currently -- the command needs to be rewritten for v4).


yarn dependency

it seems that yalc cannot work with pure npm, if i do yalc publish it fails with /bin/sh: yarn: command not found

Ah, but it is should be just an error message, but you should see in the end package@version-hash published, and the package will be published no?

true


[Feature][PyDolphinScheduler] Support DVC task in pyds #11922

Purpose of the pull request
close: #11922
Brief change log

[x] add pyds DVC task
[x] add YAML example
[x] add doc
[x] optimize DVC task plugin code

Verify this pull request

This pull request is 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:

(or)

@zhongjiajie @caishunfeng PTAL, thanks

Codecov Report

Merging #11941 (dea4160) into dev (0deafba) will increase coverage by 0.03%.
The diff coverage is 15.00%.

@@             Coverage Diff              @@
##                dev   #11941      +/-   ##
============================================
+ Coverage     38.57%   38.61%   +0.03%
+ Complexity     4049     3982      -67
============================================
  Files           995     1002       +7
  Lines         36739    36536     -203
  Branches       4278     4234      -44
============================================
- Hits          14172    14107      -65
+ Misses        20945    20809     -136
+ Partials       1622     1620       -2

Impacted Files
Coverage Δ

...dolphinscheduler/plugin/task/dvc/DvcConstants.java
0.00% <0.00%> (ø)

...olphinscheduler/plugin/task/dvc/DvcParameters.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...ache/dolphinscheduler/plugin/task/dvc/DvcTask.java
65.21% <75.00%> (ø)

...dolphinscheduler/dao/entity/ProcessDefinition.java
23.07% <0.00%> (-33.41%)
:arrow_down:

...phinscheduler/remote/utils/NamedThreadFactory.java
91.66% <0.00%> (-8.34%)
:arrow_down:

...eduler/server/worker/task/WorkerHeartBeatTask.java
69.38% <0.00%> (-8.17%)
:arrow_down:

...lphinscheduler/dao/entity/ProcessTaskRelation.java
0.00% <0.00%> (-8.00%)
:arrow_down:

...er/master/dispatch/host/assign/RandomSelector.java
77.77% <0.00%> (-5.56%)
:arrow_down:

...erver/master/processor/queue/TaskEventService.java
75.00% <0.00%> (-5.36%)
:arrow_down:

...che/dolphinscheduler/alert/AlertSenderService.java
46.00% <0.00%> (-3.65%)
:arrow_down:

... and 51 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Improvements to keyboard-only controls UI.

Some small fixes to improve keyboard only navigation. Fixed issue where the subtitle track could not be changed using the arrow keys. Fixed issue where volume slider remained visible after tabbing to a different player control.
I had some trouble in building the files because npm install wouldn't run. I had to change the version in package.json from 3.0 to 3.0.0 - I hope that's ok.
Should fix #438

@marmite22 As a rule of thumb don't do anything in the build folder. Please undo any changes in the build and package.json files so I can review the src files(s) you modified only.

Ah my bad - How's this? I reverted the change to package.json too just in case.

Yeah, that's it. I'll review it and merge if no feedback is necessary. Thanks

Can you please fix the conflicts so I can review this later?

Hey, that's done. It was caused by the BEM classes getting changed back.

Thanks. My apologies we merged that but we had to revert until a future decision is made. I'll review it as soon as I can

@marmite22 I reviewed this, and it's definitely much better in terms of enabling closed captioning.
The one thing I noticed that is left over from the prior version is that the up/down arrows are still bound to the volume controls to begin with, which produces a few effects

The up and down arrows control volume wherever you are focused in the player except the closed captioning controls

You can actually be focused on other unrelated items in the player (e.g. screen size toggle) and still use the up/down arrow keys to toggle the volume.

I expect that when I focus the playback speed control, that the up/down keys would toggle those items - but I am unable to interact with those speeds via the keyboard at all, and when I use the up/down keys here the volume is toggled once again.

In both cases I think there is some potential for confusion - I would suggest unbinding those keys until the user is focused on the volume control itself, so that as the user focuses each control in the playbar, the up/down keys toggle things as appropriate.

@evanhuntley Thanks for the update. I have a fix for the Speed feature and I'm looking just to fix one thing in there. I'll definitely take a look into the volume issue to restrict it to just interact with the up/down arrows if volume button or volume slider are focused

@marmite22 After more research and testing, it is coming to my realization that using radio checkboxes is not a good option neither for Closed Captioning and Speed given the tramps with tabs and to do this it will require a lot of hacks to make it work. I'd suggest to change the radio buttons for divs or button and include ARIA roles on each one of them so we avoid that tramp and have this working in the best possible way

@marmite22 You will see this if you have more than one video player in the same screen and both of them have closed captioning. Once you start using the arrows, it looses the focus on the current player you are at and focuses on the next one. That's the big and only issue with this

@marmite22 UPDATE: I think I found a way to make this work using tabindex. I'll keep you posted about this

@marmite22 I'm gonna merge this and I'll create a PR to fix the speed feature accessibility. I did more testing and included more videos in the same page and it's not an issue with Closed Captioning

@marmite22 Can you download the latest version of the plugin and test both Closed Captioning and Speed accessibility, please? I was able to change some things on the Speed feature, based on your fix for Closed Captioning to make it accessible as well. Please keep me posted. @evanhuntley FYI

Hi, can you tell me how closed captioning selection is supposed to work? I'm using 4.2.16 and don't seem to be able to get the arrow keys to control anything but the volume. See e.g.: https://avplayer.lib.berkeley.edu/Video-Public-Bancroft/(clir)00067


Errors in Train with Datasets Tensorflow code section on Huggingface.co

Describe the bug
Hi
Error 1
Running the Tensforlow code on Huggingface gives a TypeError: init() got an unexpected keyword argument 'return_tensors'
Error 2
DataCollatorWithPadding isn't imported
Steps to reproduce the bug
import tensorflow as tf
from datasets import load_dataset
from transformers import AutoTokenizer
dataset = load_dataset('glue', 'mrpc', split='train')
tokenizer = AutoTokenizer.from_pretrained('bert-base-cased')
dataset = dataset.map(lambda e: tokenizer(e['sentence1'], truncation=True, padding='max_length'), batched=True)
data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
  columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'],
  shuffle=True,
  batch_size=16,
  collate_fn=data_collator,
)

This is the same code on Huggingface.co
Actual results
TypeError: init() got an unexpected keyword argument 'return_tensors'
Environment info

datasets version: 2.0.0
Platform: Windows-10-10.0.19044-SP0
Python version: 3.9.7
PyArrow version: 6.0.0
Pandas version: 1.4.1

Hi @blackhat-coder, thanks for reporting.
Please note that the transformers library updated their data collators API last month (version 4.17.0):

huggingface/transformers#13105

now requiring to pass return_tensors argument at Data Collator instantiation.
And therefore, we also updated in the datasets library documentation all the examples using transformers data collators.
If you would like to follow our examples (using latest datasets and transformers versions), please update your installed transformers version:
pip install -U transformers


skip zero length strings in ERB template output

Ensure that rocommunity and friends can be explicitly disabled
by setting them to the empty string (not undefined).
Solves #36

Would it be possible to resubmit this PR against razorsedge:develop?

Hi Mike,
Sure, the only thing is it fails on Ruby 1.8.x (i.e. the template breaks).
Its pretty simple I just don't know how to solve the problem with the
earlier version of Ruby.
I'll get to it sometime this weekend.
Thanks,
Brett
On 20 March 2015 at 06:41, Mike Arnold<EMAIL_ADDRESS>wrote:

Would it be possible to resubmit this PR against razorsedge:develop?
—
Reply to this email directly or view it on GitHub
https://github.com/razorsedge/puppet-snmp/pull/37#issuecomment-83939470.

--
Kind regards,
Brett Delle Grazie

Possibly try .length instead of .size?

Actually, strike that.  The Travis failures are due to the use of rspec 3 on Ruby 1.8.7.  I have fixed that error in razorsedge:develop.

Cool, I'll rebase sometime this weekend.
Cheers,
Brett
On 20 March 2015 at 07:22, Mike Arnold<EMAIL_ADDRESS>wrote:

Actually, strike that. The Travis failures are due to the use of rspec 3
on Ruby 1.8.7. I have fixed that error in razorsedge:develop.
—
Reply to this email directly or view it on GitHub
https://github.com/razorsedge/puppet-snmp/pull/37#issuecomment-83942438.

--
Kind regards,
Brett Delle Grazie

or now :)
On 20 March 2015 at 07:23, Brett Delle Grazie<EMAIL_ADDRESS>wrote:

Cool, I'll rebase sometime this weekend.
Cheers,
Brett
On 20 March 2015 at 07:22, Mike Arnold<EMAIL_ADDRESS>wrote:

Actually, strike that. The Travis failures are due to the use of rspec 3
on Ruby 1.8.7. I have fixed that error in razorsedge:develop.
—
Reply to this email directly or view it on GitHub
https://github.com/razorsedge/puppet-snmp/pull/37#issuecomment-83942438
.

--
Kind regards,
Brett Delle Grazie

--
Kind regards,
Brett Delle Grazie

Rebasing makes things worse. :-(  GitHub does not let you change the target.  You will have to close this PR and submit a new one.

Closing as requested, will reopen again

Reopened as #41


Modulating float valve for tank inlets

In the UK it is very common for tanks to be controlled by a modulating float valve.
These valves will maintain a relatively constant level in storage tanks by admitting flow into the tank in direct proportion to the flow out of the tank. As the tank level changes, the float control proportionally opens or closes the main valve, keeping the liquid level nearly constant.
Commercial modelling software popular in the UK, such as InfoWorks WS Pro, includes the ability to model these valves  but there currently isn’t a simple way to do this in EPANET.
An example of this type of valve can be found on the Cla-Val website
Below are graphs showing observed data from SCADA and calibrated model results. The float valve was set with a control depth of 2.175m with a regulating range of 0.4m with a 150mm valve. The opening/loss Coeff. curve can also be supplied if it is of interest.

While the almost flat tank level has minimal change on downstream pressures, the matching of upstream flows is important in UK networks as they generally run with smaller diameter pipes with higher headloss than what is seen in North America.
The use of the EPANET engine is very low in the UK and the inclusion of modulating float valves could help users switch between commercial modelling packages and EPANET.
The two approaches that may work in getting modulating float valves into EPANET are:

A new valve type specifically created for modulating float valves
Add the ability to set modulated controls with rules - specifically allow a valve setting to be set from a curve with a lookup from the tank level

Any other additional thoughts or potential ways to solve this issue would be appreciated!

A very quick demo showing how this can be calculated using the EPANET toolkit can be found here:
https://modelcreate.github.io/epanet-js-float-valve-example/
With the source code in Typescript here:
https://github.com/modelcreate/epanet-js-float-valve-example/tree/master/src/utils

A simple way to add a modulating float valve to EPANET is to enhance the existing Flow Control Valve (FCV) element. An additional optional property, EN_FCV_LINK, is the index of the link whose current flow rate establishes the current setting of the FCV. A new function, resetfcvs() is called from the existing controls() function in hydraul.c at each time step to reset each FCV's flow setting if it has been assigned an EN_FCV_LINK.
I have implemented this idea and tested it on a slightly modified version of @lbutler 's example as shown below. The modulated FCV is used to maintain a constant water level in a tank with both inflow and outflow.

The results from running the model produce the required behavior as seen by the following plot:

I'm going to extract 2-3 example models that include the upstream monitored pressure points and then we can compare any approach with calibrated results. This way it also would be clear the effect that the inlet flow can have on the upstream network in UK networks and we can see tanks where the dip in tank level is more pronounced.
@LRossman in your approach above, do you think we could apply the same logic through more advanced control rules as described in #725?
While I believe named variables and expressions in SWMM are limited to checking conditions (though I may be wrong on this) could we also use them in the assigned setting?
For example:
VARIABLE OutflowTarget = Pipe TANK_OUTLET FLOW

RULE 1
IF TANK_OUTLET < 5
THEN VALVE Flow_Control SETTING = OutflowTarget

As described in my section option, we could use the same logic to set a Positional Control Valve (PCV) to act as a continuously regulating floating valve
VARIABLE T1_DEPTH = Tank T1 PRESSURE
EXPRESSION FLV_PERCENT = ( 4 - T1_DEPTH ) / 2 ; (controlDepth - currentLevel) / range

RULE 1
IF TANK_OUTLET < 2
THEN VALVE T1_Inlet_Valve SETTING = FLV_PERCENT

Alternatively, it becomes a native valve type, most likely a derivative of the PCV which paraments to set the control depth, range and valve curve.

@lbutler I also thought that the extended rule vocabulary could handle a modulating float valve while providing more versatility than the modified FCV approach. The downside is that it is more complicated to implement and there is the possibility that an unnecessary amount of time is spent recomputing network hydraulics when rules keep firing at each rule evaluation time step (whose default is 5 minutes). Such would be the case with your PCV example since T1_depth keeps changing at every rule time step.
Also I'm a little confused about whether the goal is to maintain a target tank depth (as in the second example you gave) or maintain an inflow that equals the tank's outflow (as in your first example). Both of these have a lot in common with the variable speed pump control feature that adjusts a pump's speed setting to maintain a fixed pressure at some downstream node. Like the modulating float valve, this feature appears in some commercial software but not yet in EPANET. Please see issue #530 for how it could be implemented (without the use of rules). Something similar might be applicable to the modulating float valve.


Frontend Project "PrimeFlix" 'Your favorite channels all in one place' Section Styling

Title and Issue number
Frontend Project "PrimeFlix" 'Your favorite channels all in one place' Section Styling
Close #3644
Output
Before

After

Checklist:

[x] I have mentioned the issue number in my Pull Request.
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have created a helpful and easy to understand README.md

@MohitGupta121 Kindly review this pull request.

Hi @MohitGupta121
Kindly review this pull request so that I can work on other issues.

@iamRabia-N please resolves conflicts

@MohitGupta121 Done with resolving conflicts. You can review now.


Style image's content leaks without style description.

Hi! I am trying stylization without style descriptions, using the project on the huggingface gradio, but meet serious content leak issue like below.

Some reference style images are difficult to understand by the CSD style descriptor (which we use in our terminal cost). For these images, you might want to add the style description in the text prompt for better results.


Media Events Data Models (reviewed)

This is a completely clean PR for the media DataModels.
prettier:text ran following instructions from PR99.

still this PR is not in the proper form ... closing


Document new derive macros

There is a new way for creating input objects and enums via custom derive.
They still need to be documented though!

This is documented sufficiently in the book now.


Store full BlockHeader with stake pool instead of only slot ids

Issue Number

Overview

[ ] I have stored full BlockHeader with stake pool instead of only slot ids

Comments

The whole block header is going to be needed by the chain follower in order to find intersection points between the local and remote chain.

bors r+

test/integration/Test/Integration/Jormungandr/Scenario/CLI/Server.hs:174:37:

Still our old friend. Merging anyway.


Update CONTRIBUTING.md

Added an instruction to Compile the JavaScript. This is required for pytest tests to pass.
Purpose

Does this introduce a breaking change?
When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.
[ ] Yes
[X] No

Does this require changes to learn.microsoft.com docs?
This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.
[ ] Yes
[X] No

Type of change
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[X] Documentation content changes
[ ] Other... Please describe:

Code quality checklist
See CONTRIBUTING.md for more details.

[X] The current tests all pass (python -m pytest).
[X] I added tests that prove my fix is effective or that my feature works
[X] I ran python -m pytest --cov to verify 100% coverage of added lines
[X] I ran python -m mypy to check for type errors
[X] I either used the pre-commit hooks or ran ruff and black manually on my code.

wrong repo


Create nissen.txt

@Jens0512 Pull request merged. Thank you!

@Jens0512 Pull request merged. Please notice that free educational license for JetBrains tools is for high and higher schools students, i.e. those who are over 13 of age. Thank you!


Support for collection FormType

I have been busy with the bundle the last few days, and I'm positively suprised about the amount of flexibility this bundle adds to the regular Symfony form component.
An extra feature that could be added, is extended support for the collection field type. This can be best explained based on your example about the car. It would be nice if steps could be repeated, based on for example the input of a previous step.

Give in the amount of wheels that a car has
Repeat the step to specify the wheels, based on the amount of the previous step

My own use-case is the need of a repeatable step, which actually is not dependent on previous input. I'm building a flow where users can give in their working experience, so probably I will also need some extra buttons like save + add extra.
This in my opinion could be something that can be arranged in the FormFlow. This also is something that is related to #67

Hi, @nerdsrescueme , @rvanlaak  :
did you managed to do that?
I'm in the same situation...

I'm having trouble to understand how this works too. I have entities with OneToMany relations and the example provided seems not to explain this.


chore(master): release 0.28.0

:robot: I have created a release beep boop
0.28.0 (2024-06-03)
Features

remove outdated features (be13f0e)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/indykite/indykite-sdk-go/releases/tag/v0.28.0 :sunflower:


[Docs] Add manifest CMake integration and eval order details

microsoft/vcpkg-docs is an independent vcpkg document repository, so migrate https://github.com/microsoft/vcpkg/pull/29121 into microsoft/vcpkg-docs.

All of this information has been added to https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/users/buildsystems/cmake-integration.md, which is the right place for it. Thanks!


Implemented namespace support for merge

I did something similar just recently in e456b4fe389c6410db5c1a813d2991e9f65688ee. Have a look?

@defnull: Hmm… what's the difference between merge and mount; in terms of use-case; BTW?

With e456b4f: Not much.
In general, merge() is meant to combine two applications (probably merging plugins and config, too, in the future) while mount() keeps the application separate.

Hmm, well if there is no longer any difference between the two, how about combining their logic, so that e.g.: merge calls mount?
/me thought merge did something special, with this new information this PR is no longer relevant…

There is a difference (mount keeps applications separate, merge merges two apps) or at least there will be a difference once the transition is complete. To maintain BC we have to change these things in small steps.


Feature/pynft

feature/pynft

See #

Details

new updated tool for firewall API => PyNFT
and documentation
and JSON protocol to go with nft wrapper

ok


After the test is completed, not all traces are displayed in ui

I use zipkin4net and docker-zipkin to track traces in my application. I have a unit test. Inside a unit test a client is created from which I send a request to the first server, then I send the request from the first server to the second, then from the second service I send a request to the third service, and then I return the response to the client. All this I do with the help of commands ClientSend - ServerReciev-ServerSend-ClientReciev. If the request is one, then all is well. If I send asynchronously 100 requests, then some of the traces are lost. But if I debug the test in debug mode, or when I end the test, I set a delay, then all the traces are displayed. It seems that all the traces simply do not have time to send to the collector. Can you help me?

troubleshooting is best done on gitter as it usually requires back and
forth. if we do it here people get alerted too much
gitter.im/openzipkin/zipkin
On Thu, 20 Sep 2018, 04:54 cosmonaut13<EMAIL_ADDRESS>wrote:

I use zipkin to track traces in my application. I have a unit test. Inside
a unit test a client is created from which I send a request to the first
server, then I send the request from the first server to the second, then
from the second service I send a request to the third service, and then I
return the response to the client. All this I do with the help of commands
ClientSend - ServerReciev-ServerSend-ClientReciev. If the request is one,
then all is well. If I send asynchronously 100 requests, then some of the
traces are lost. But if I debug the test in debug mode, or when I end the
test, I set a delay, then all the traces are displayed. It seems that all
the traces simply do not have time to send to the collector. Can you help
me?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/openzipkin/zipkin/issues/2192, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAD617WbO7XjWXsE6YVG8dIre3WLPd6Mks5uc4IJgaJpZM4Wx-CF
.


Determining the hub to use based on the request

Hi,
I want to use sseHub() with a different hub instance depending on the data in the request. Basically there are distinct sessions based on a token provided by the client, and each session should have its own hub. Since sseHub accepts ISseHubMiddlewareOptions that means I have to hard-code the hub, right? Is there any way to make it dynamic?
Basically, for each call of the API with the sseHub middleware, I need to first examine the request body to determine which hub to use for that client going forward.
I feel like I am going to end up subclassing Hub but I'm not sure of the direction, yet.

I have only compile tested this, but this seems to be the right approach:
/**
 * SSE middleware that configures an Express response for an SSE session, installs `sse.*` functions on the Response
 * object, as well as the `sse.broadcast.*` variants.
 *
 * @param options An ISseMiddlewareOptions to configure the middleware's behaviour.
 */
function dynamicSseHub(options: Partial<ISseMiddlewareOptions> = {}): Handler {

    function middleware(req: Request, res: ISseResponse, next: NextFunction): void {
        let hub : IHub = sessions.get(req.body.toString()).hub;
        //=> Register the SSE functions of that client on the hub
        hub.register(res.sse);

        //=> Unregister the user from the hub when its connection gets closed (close=client, finish=server)
        res.once('close', () => hub.unregister(res.sse));
        res.once('finish', () => hub.unregister(res.sse));

        //=> Make hub's functions available on the response
        (res as ISseHubResponse).sse.broadcast = {
            data: hub.data.bind(hub),
            event: hub.event.bind(hub),
            comment: hub.comment.bind(hub),
        };

        //=> Done
        next();
    }

    return compose(sse(options), middleware);
}

Hi,
Your solution is fine.
That's an interesting feature request you have here though, so I might implement it someday!


Add option to filter mitochondrial variants

Instead just added the mitochondrial codon table, so no pressing need to filter chrM. If we later need to filter MT variants for some other reason then we can reopen this.


Out-of-the-box watch mode

Overview
As a user, I want css-typed to have an out-of-the-box watch mode, so that I can speed up my development.
Notes

[ ] The README (at time of writing) mentions nodemon.
[ ] Can we "hook into" the tsc -w process? Do conventions exist for this?
[ ] Should css-typed provide this?

From a maintenance standpoint, I only have interest in doing this if it can hook into tsc -w process.
It is more likely that I document some VS Code practice or similar.

I’ve thought more about this, including looking at Node core and chokidar. I do not think this library needs to support watching out-of-the-box given its current state. VS Code has file watchers too.
Please open a new issue if you think this library should support watching out-of-the-box.
Cheers,
Connor


Extend module life-cycle states

The work related to issue #15 allows the retrieval of module properties without loading the module's shared library. This leads to new module life-cycle states, e.g. to be able to access a module's properties, it must first be installed into the system to be known to other modules.

Does merging https://github.com/saschazelzer/CppMicroServices/issues/31 resolve this issue?

Done with PR #105 .


Update _WD_ElementSelectAction

Pull request
Proposed changes
This PR is the target for the multiple existing PRs that modify _WD_ElementSelectAction
Checklist
Put an x in the boxes that apply. If you're unsure about any of them, don't hesitate to ask. We are here to help!
This is simply a reminder of what we are going to look for before merging your code.

[x] I have read and noticed the CODE OF CONDUCT document
[ ] I have read and noticed the CONTRIBUTING document
[ ] I have added necessary documentation or screenshots (if appropriate)

Types of changes
Please check x the type of change your PR introduces:

[ ] Bugfix (change which fixes an issue)
[x] Feature (change which adds functionality)
[x] Code style update (formatting, renaming)
[x] Refactoring (functional, structural)
[ ] Documentation content changes
[ ] Other (please describe)

What is the current behavior?
Please describe the current behavior that you are modifying, or link to a relevant issue.
What is the new behavior?
Please describe the behavior or changes that are being added by this PR.
Additional context
Add any other context about the problem here.
System under test
Please complete the following information.

OS: [e.g. Windows 10]
OS Arch.: [e.g. X64]
Browser [e.g. firefox]
Browser version [e.g. 96.0.3]

I have one potential case-related problem with SINGLESELECT.
I need to do tests and formulate a description of the problem.

I have one potential case-related problem with SINGLESELECT.
I need to do tests and formulate a description of the problem.

Please take a look at: _WD_ElementSelectAction comparing $vResult with empty string

I also wonder if we should mention in remarks that Labels are case sensitive .

I have one potential case-related problem with SINGLESELECT.

Does #380 resolve this for you?

I also wonder if we should mention in remarks that Labels are case sensitive .

There are likely ways to make it case-insensitive, which would be a nice improvement.

There are likely ways to make it case-insensitive, which would be a nice improvement.

So I will try to handle this scenario as default behavior.

I have one potential case-related problem with SINGLESELECT.

Does #380 resolve this for you?

No my issue was that when I have different case size then I get error and I thought that there is problem with case sensitivity of labels comparition.
But then I treat it as normal JS behavior and adopted my script to firstly get list of OPTIONS and then compare in AutoIt an after that use string case sensitivity accordingly  to current available Labels.
At the same time as I saw that I get incorrect/unexpected error number, this led me to the issue which I noted, describe and fix in #380
But as I said I will try to improve these functions to make them case-insensitive in label matching.

It looks like here we have good examples:
https://stackoverflow.com/a/24718430/5314940

It looks like here we have good examples: https://stackoverflow.com/a/24718430/5314940

Please take a look on my implementation here:
_ElementSelectAction : JS refactoring + case insensivity

btw.
Before you merge I will do finall review (compare current WIP version from this PR with my version on currently used version)

As i understand this is that moment for my finall review which I mention 4 hours ago ?

@mlipok This is ready for a final review. One area that I think we should examine is the logging --

Is there excessive logging that can be reduced by internally adjusting and resetting the value of $_WD_DEBUG within the function?

Should the following line be adjusted to provide more meaningful data?

	Local Const $sParameters = 'Parameters:    Command = ' & $sCommand & '    Parameters = ' & ((IsArray($vParameters)) ? ("(array)") : ("(string)"))
Suggestions --

Use "Options =" instead of listing "Parameters" twice
Provide the actual string value instead of using "(string)" will improve ability to review output and understand which command output that result.

Should the following line be adjusted to provide more meaningful data?

 Local Const $sParameters = 'Parameters: Command = ' & $sCommand & ' Parameters = ' & ((IsArray($vParameters)) ? ("(array)") : ("(string)"))

it is used only by MULTISELECT and SINGLESELECT
I propose to rename $vParameters to $vLabels
Func _WD_ElementSelectAction($sSession, $sSelectElement, $sCommand, $vLabels = Default)
	Local Const $sFuncName = "_WD_ElementSelectAction"
	Local Const $sParameters = 'Parameters:    Command=' & $sCommand & '    Labels=' & ((IsArray($vLabels)) ? ("(array)") : ("(string)"))

Provide the actual string value instead of using "(string)" will improve ability to review output and understand which command output that result.

as this will be shown only on $_WD_DEBUG_Full so I agree.

as this will be shown only on $_WD_DEBUG_Full so I agree.

Not sure how you came to that conclusion. I currently get this with $_WD_DEBUG_Info --
_WD_ElementSelectAction ==> Success [0 / 0] : Parameters:    Command = SELECTALL    Parameters = (string)    : Result = True

Is there excessive logging that can be reduced by internally adjusting and resetting the value of $_WD_DEBUG within the function?

there are only 3 kind of action which can throw logs to console

_WD_ElementAction($sSession, $sSelectElement, 'property', 'nodeName')

_WD_ExecuteScript($sSession,............

	Return SetError(__WD_Error($sFuncName, $iErr, $sMessage, $iExt), $iExt, $vResult)
EndFunc   ;==>_WD_ElementSelectAction

IMHO if we change any @error returned from CASE1 to $_WD_ERROR_GeneralError then only 3rd case is important for logging in debuging process in this function.
If you agree I can propose change soon.

as this will be shown only on $_WD_DEBUG_Full so I agree.

Not sure how you came to that conclusion. I currently get this with $_WD_DEBUG_Info --
_WD_ElementSelectAction ==> Success [0 / 0] : Parameters: Command = SELECTALL Parameters = (string) : Result = True

oops....
I think I'm little overworked....
so mayb such solution:
Local $sLabelsTemp = ($_WD_DEBUG = $_WD_DEBUG_Full) ? ($vLabels) : ("(string)")
Local Const $sParameters = 'Parameters:    Command=' & $sCommand & '    Labels=' & ((IsArray($vLabels)) ? ("(array)") : ($sLabelsTemp))

take a look on https://github.com/Danp2/au3WebDriver/pull/383
ps.
sorry for bad PR: ttps://github.com/Danp2/au3WebDriver/pull/382

IMHO if we change any @error returned from CASE1 to $_WD_ERROR_GeneralError then only 3rd case is important for logging in debuging process in this function.

I'm not following your logic.
Instead of changing the @error value, I wanted to reduce the level of unneeded logging output. Internally changing the logging level to $_WD_Debug_Error would accomplish this, right?

I'm not following your logic.
Instead of changing the @error value, I wanted to reduce the level of unneeded logging output. Internally changing the logging level to $_WD_Debug_Error would accomplish this, right?

Take a look on https://github.com/Danp2/au3WebDriver/pull/383 especially this solution:
https://github.com/Danp2/au3WebDriver/blob/1436d6b6e80e7e322b06ba54e447d928db4bb908/wd_helper.au3#L1088-L1098

If you agree I can propose change soon.

If you want my opinion, then you have to allow sufficient time to reply. 🙄 😄

If you agree I can propose change soon.

If you want my opinion, then you have to allow sufficient time to reply. 🙄 😄

I know but I was just doing all the other changes and this one was small so I added it right away.

Using MULTIPLESELECT on not multiple able  element sets $_WD_ERROR_ElementIssue.

Pretty sure we previously agreed to remove this. Are you wanting to discuss further?

Using MULTIPLESELECT on not multiple able <select> element sets $_WD_ERROR_ElementIssue.

Pretty sure we previously agreed to remove this. Are you wanting to discuss further?

Oh, I think I forget to remove it from my current DEV ENV
remarks stripped


Provide indication of which columns data is sorted by

Provide indication on which columns data is being sorted by.
Location: Email View pane

Fixed. Email list has indicator for which field the data is sorted by.


Cut dependency between plugins and xmlserializer

Add CElement::getXmlNameAttribute() method to isolate the plugins from
xmlserializer.
This patch comes in preparation to exporting the necessary symbols to plugins
in Windows environement (using export macros).
Signed-off-by: Patrick Benavoli<EMAIL_ADDRESS>

[ ]   General Comment
<img border=0 src='https://avatars.githubusercontent.com/u/820313?v=3' height=16 width=16'> warning, kevin reworked it and seem to have doubts about usefulness of the patch

warning, kevin reworked it and seem to have doubts about usefulness of the patch

Yes I reworked this patch in one of my branches. But I did not created a pull request because I could not test the patch effect. Is it realy cutting any dependency ?

I created a pull request with my rework. Adding my concern about it.


Fix query comments test

resolves #9860

Problem
test_query_comments.py::BaseMacroArgsQueryComments::test_matches_comment  is comparing dbt-core version with dbt adapter version, which is wrong assumption after decoupling dbt adapters from dbt-core version.
Solution
Remove version comparison at, as it isn't related to query comment feature.
Checklist

[x] I have read the contributing guide and understand what's expected of me
[ ] I have run this code in development and it appears to resolve the stated issue
[ ] This PR includes tests, or tests are not required/relevant for this PR
[ ] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
[ ] This PR includes type annotations for new and modified functions

Thanks for opening this PR @damian3031 !
A changelog entry isn't required for this one since the changes are local to the tests directory, but if you choose to add a changelog entry via changie new, then your contribution will also be credited within the changelog. Up to you either way!

Hi @dbeatty10, I added changelog entry


Removed get_domain_details and related code.

Removing source of automate log errors:
Following Relationship [miqaedb:/unknown/VM/Provisioning/Profile/EvmGroup-super_administrator#get_domains]
ERROR -- : Class [unknown/VM/Provisioning/Profile] not found in MiqAeDatastore
https://bugzilla.redhat.com/show_bug.cgi?id=1256300

@gmcculloug
Change made.

@gmcculloug Please review

@tinaafitz There is still a domain test "should have Domain class" in the spec/lib/miq_automation_engine/miq_ae_provision_spec.rb:142

@gmcculloug
Removed test.

@tinaafitz Please rebase

@gmcculloug
Rebased.


Fixes for Reanimated v3 + cleanup.

Rename to __read_codes_via_ml_kit to follow suite.
Remove Flipper
Remove Xcode test targets

Still doesn't work. My frame processors on iOS aren't being registered.

While a breaking change to rename the method (as that require changes to userland babel file). I believe moving off the default name is better in long run.


Profile Cluster Assignment Evaluation Frequency

We should evaluate whether it'd be useful to cache the log likelihood of a given cluster assignment for future lookup. To do so, we can run some celda model simulations, emitting every cluster assignment from every thread into a common place, and looking at how many times the same assignment was calculated (as well as the time-to-calculate for each).
It's probably not the biggest timesink in the code right now, but worth looking at in some spare time.

I think this will be difficult to implement and probably not worth it and doesn't really jive with how the Gibbs sampling works. I'm going to close for now.


MassTransit RabbitMq scheduling(UseMessageScheduler) messages not sent to consumer

I want to use MassTransit + RabbitMq bus for scheduling message from the bus. I write two C# console application, one for messages creator and send messages to schedular, and other for message consumer.
the following code for scheduling in the bus, so that send message to the scheduler one per second and then the scheduler send to consumer with 10 seconds delay. My problem is that No message is sent to the consumer or the consumer queue in rabbitMq client. Where is my mistake?
Note: UseInMemoryScheduler work fine but UseMessageScheduler doesn't work.
Bus message creator
class Program
{
	public static void Main(string[] args)
	{
		MainAsync(args).GetAwaiter().GetResult();

		Console.ReadKey();
	}

	static async Task MainAsync(string[] args)
	{
		var busControl = Bus.Factory.CreateUsingRabbitMq(rabbit =>
		{
			var host = rabbit.Host(new Uri("rabbitmq://localhost:5672"), settings =>
			{
				settings.Username("guest");
				settings.Password("guest");
			});

            //rabbit.UseInMemoryScheduler(); // This works
			rabbit.UseMessageScheduler(new Uri("rabbitmq://localhost/quartz"));// This doesn't work,
		});

		busControl.Start();

		var sendEndpoint = await busControl.GetSendEndpoint(new Uri("rabbitmq://localhost/quartz"));

		for (int i = 0; i < 1000000; i++)
		{
			await sendEndpoint.ScheduleSend(new Uri("rabbitmq://localhost/publisher"),
				DateTime.Now.AddSeconds(10),
				new MessageCreated()
				{
					Text = $"message {i}"
				});

			Thread.Sleep(1000);
		}

		Console.ReadKey();

		busControl.Stop();
	}
}

message consumer.
class Program
{
    static void Main(string[] args)
    {
		var busControl = Bus.Factory.CreateUsingRabbitMq(rabbit =>
        {
            var host = rabbit.Host(new Uri("rabbitmq://localhost:5672"), settings =>
            {
                settings.Password("guest");
                settings.Username("guest");
            });

            rabbit.ReceiveEndpoint(host, "publisher", conf =>
            {
                conf.Consumer<Consumer>();
            });
        });

        busControl.Start();
        Console.ReadKey();
        busControl.Stop();
    }
}

public class Consumer : IConsumer<MessageCreated>
{
    public Task Consume(ConsumeContext<MessageCreated> context)
    {
        MessageCreated message = context.Message;
        Console.WriteLine(message.Text);

        context.Publish(new MessagePublished
        {
            Text = message.Text,
        });

        return Task.FromResult(context.Message);
    }
}

Did you setup a service on the /quartz queue that is running Quartz? There are plenty of example, I'd suggest searching Stack Overflow.
https://stackoverflow.com/questions/20355573/mass-transit-with-quartz-scheduling-are-there-any-example-implementations-ou


Declarative mechanism to create Topic Subscription

In what area(s)?

/area operator
Describe the feature
The Current Mechanism a workload needs to ensure for subscribing to a topic is pretty microservice biased, where the workload defines an http handler to define the topic it's interested in and a callback route for dispatching the message. This mechanism might not be the best way to define a topic subscription for a serverless function, where these additional endpoint ,what the dapr sidecar would invoke, would probably not be the part of the serverless code. Hence, I propose a more declarative approach to define subscription to a topic. This API can be either defined as a Custom Resource Definition or any other API in conformance to Open Service Broker API specification, which any user can invoke to create subscription to a topic. I'd expect this API to have 2 mandatory parameters: 1) Topic of interest 2) Subscriber reference (url, k8s object reference, etc).

This makes sense, I'd like to flush out a design for this.
Would you mind drafting a CRD definition for how you'd like to see this?

Given the existing user simplicity offered by dapr, I could think of the following CRD.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
spec:
  group: dapr.io
  names:
    kind: Subscription
    plural: subscriptions
    singular: subscription
  scope: Namespaced
  versions:
    name: v1alpha1
    schema:
      openAPIV3Schema:
        properties:
          spec:
            properties:
              topic:
                description: corresponds to an event topic on which a published message should trigger a callback
                type: string
              subscriberURI:
                description: the destination URI that should receive the message.
                type: string

Given the existing user simplicity offered by dapr, I could think of the following CRD.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
spec:
  group: dapr.io
  names:
    kind: Subscription
    plural: subscriptions
    singular: subscription
  scope: Namespaced
  versions:
    name: v1alpha1
    schema:
      openAPIV3Schema:
        properties:
          spec:
            properties:
              topic:
                description: corresponds to an event topic on which a published message should trigger a callback
                type: string
              subscriberURI:
                description: the destination URI that should receive the message.
                type: string

This looks good. Now we need to be able to come up with a way to attach this to a specific app. We cannot use k8s selectors as this would violate the multi-platform principal, but given how Dapr already supports scoping components to specific apps, I think we can use that mechanism here and have it be explicitly required.
Here's an example based on the CRD above using scopes:
apiVersion: dapr.io/v1alpha1
kind: Subscription
metadata:
  name: myevent-subscription
spec:
  topic: newOrder
  subscriberURI: /api.v1/order
scopes:
- app1
- app2

/cc @mchmarny

The CRD lgtm. The use of scope for mapping apps to subscription(s) seems to redefine though the meaning of scope in components (limiting access). This is different object type so maybe that makes sense.
Any chance to use annotations for this in k8s deployments (e.g. dapr.io/subscription: "myevent-subscription")? In standalone mode this would be just another CLI arg at launch (e.g. `--app-subscription "myevent-subscription"). Just an idea

The CRD lgtm. The use of scope for mapping apps to subscription(s) seems to redefine the meaning of scope in components (limiting access). This is different object type so maybe that's OK.
Any chance to use annotations for this in k8s deployments (e.g. dapr.io/subscription: "myevent-subscription")? In standalone mode this would be just another CLI arg at launch (e.g. `--app-subscription "myevent-subscription").

There are two issues an annotation creates:

You cannot assign multiple subscriptions to a single app
A change to the subscription name results in the user needing to update the annotation, and restart the pod

The CRD lgtm. The use of scope for mapping apps to subscription(s) seems to redefine the meaning of scope in components (limiting access). This is different object type so maybe that's OK.
Any chance to use annotations for this in k8s deployments (e.g. dapr.io/subscription: "myevent-subscription")? In standalone mode this would be just another CLI arg at launch (e.g. `--app-subscription "myevent-subscription").

I see another issue with the annotation approach, we are tightly coupling subscription Resource to a kubernetes object, so in this case controllers of other types like HPA, statefulsets, serverless functions, etc will have to add an watcher for the annotation, or Am I missing something?

There are two issues an annotation creates:

You cannot assign multiple subscriptions to a single app
A change to the subscription name results in the user needing to update the annotation, and restart the pod

Both good points, @yaron2. handling multiple subscriptions in an annotation would require some concatenation and that'd be a kludge. The limitation on autoscaling makes sense too, @anishj0shi.
+1 on the use of scope in Subscription

Clarification: this will be another way for users to subscribe to events, it does not replace the existing subscription mechanism and users can choose what works best for them.

For a particular app, is using this method exclusive of using the existing one (/dapr/subscribe)?  What would happen if app1 subscribes declaratively, but app1 also specifies a different set of subscriptions in response to /dapr/subscribe?  Are these combined?

I think this is good. However, I wonder if we should consider making a common mechanism to describe/load/manage such objects across different component types. The subscription is basically an app-level configuration/sub-resource that can be attached to a pub/sub component, which is cluster-wide, isn't it? We do have the concept of configuration but it's not structured to be split across components.
I'd be okay with this particular feature implemented as a one-off effort. On the other hand, I propose we consider how to enable generic method to attach configurations (or traits :)? ) to components. For instance, we can attach "traits" to state store component to configure different consistency behaviors for different apps.

I think this is good. However, I wonder if we should consider making a common mechanism to describe/load/manage such objects across different component types. The subscription is basically an app-level configuration/sub-resource that can be attached to a pub/sub component, which is cluster-wide, isn't it? We do have the concept of configuration but it's not structured to be split across components.
I'd be okay with this particular feature implemented as a one-off effort. On the other hand, I propose we consider how to enable generic method to attach configurations (or traits :)? ) to components. For instance, we can attach "traits" to state store component to configure different consistency behaviors for different apps.

Notice the use of scopes above

I think this is good. However, I wonder if we should consider making a common mechanism to describe/load/manage such objects across different component types. The subscription is basically an app-level configuration/sub-resource that can be attached to a pub/sub component, which is cluster-wide, isn't it? We do have the concept of configuration but it's not structured to be split across components.
I'd be okay with this particular feature implemented as a one-off effort. On the other hand, I propose we consider how to enable generic method to attach configurations (or traits :)? ) to components. For instance, we can attach "traits" to state store component to configure different consistency behaviors for different apps.

Notice the use of scopes above

Yes I saw it. The point is to make such declarative configurations a common mechanism for all components, not just pub/subs.  Maybe instead of Subscription (and potentially other XYZ CRDs in the future), we can introduce some common object type (such as a Config). Then, we can use a common code base to make these objects available to components as we load them. In this way, we support a flexible system for use to tailor component behaviors for specific applications without us needing to do much. For example, a data store COMPONENT can contain server address, while different data store CONFIGURATION can contain credentials for specific applications. All Dap needs to do is to match up configurations with components and let component implementations to decide what to do.

Scopes is an existing feature already, for all components.

Hi @yaron2 just to keep you updated, there's a generic subscription api specification rolled out in kubecon by the cloudevents guys. it's make more sense if dapr's subscription api also conforms to that spec, WDYT?
ref: https://github.com/cloudevents/spec/blob/master/subscriptions-api.md#321-subscription-object

yea, makes sense.. but what we can do is add a validation webhook at the CRD Level to mention if the field is supported. by our platform or not.. My intention was to harmonise the user experience of defining subscription, WDYT?
To answer some things mentioned above:

id : i think this field is required to distinguish b/w consumer groups
protocol : i think this is for message dispatch. so currently the dispatching mechanism from sidecar to workload is based on either HTTP or gRPC communication but with specific protocal binding, we can also dispatch message with messaging protocols like AMQP or MQTT and the "best" of all Kafka (Sarcasm)

Yes, webhook validation is on the roadmap and is a separate item tracked here.

id : i think this field is required to distinguish b/w consumer groups

Consumer groups are handled by Dapr, using the dapr.io/app-id annotation as the ID, essentially creating a consumer group per app.

protocol : i think this is for message dispatch. so currently the dispatching mechanism from sidecar to workload is based on either HTTP or gRPC communication but with specific protocol binding, we can also dispatch message with messaging protocols like AMQP or MQTT and the "best" of all Kafka (Sarcasm)

This would first require that Dapr adds additional protocols to its channels. This is extensible in Dapr, but adding AMQP/MQTT channels is also a separate concern.
We'll start by implementing the above. When/If new channels arrive, we can easily add the protocol field in the CRD to support it.

For a particular app, is using this method exclusive of using the existing one (/dapr/subscribe)? What would happen if app1 subscribes declaratively, but app1 also specifies a different set of subscriptions in response to /dapr/subscribe? Are these combined?

they are combined, and in case of a conflict the app endpoint takes precedence.

@anishj0shi the PR for this has been opened: https://github.com/dapr/dapr/pull/2015


Replace directives with annotations for relationships

The new migration library uses custom annotations (using graphql-annotations) for many-to-many relationships. Example:
type User {
  id: ID!
  name: String
  """
  @db.manyToMany: 'friends'
  """
  friends: [User]
}

Graphback uses directives to map and generate relationships:
type Note {
  comment: [Comment!]! @OneToMany(field: "yourCustomField")
}

We should pick one common strategy for relationship implementation between graphql-migrations and Graphback.

As per the suggestion of @wtrocki this could be extracted into a separate package for reading and abstracting annotations, which could be used by both.

As per the suggestion of @wtrocki this could be extracted into a separate package for reading and abstracting annotations, which could be used by both.

Directives are challenging as they need to be dynamically suppied to every model in order to properly parse it. Then we do not know what kind of directives each individual element in ecosystem will require which requires us to have global list of directives.
This on the other hand will restrict community for building their own plugins (and directives) as there will be no easy way to append them - like in graphql-code-generator.
I think that graphql annotations perfectly resolve this issue.
You can suddenly drop some extra elements into the commend and supply your own handler for those elements without worring if schema is valid. Bonus point is that this comments
Directives will work for the cases where we want to actually leave the directive in generated code. For example hasRole, subscribe directive can be introduced etc.
FYI @darahayes

Directives will work for the cases where we want to actually leave the directive in generated code. For example hasRole, subscribe directive can be introduced etc.

This is a really strong point. How to safely distinguish between directives used for generation purposes which will possibly be removed from the final schema and directives that modify runtime behaviour and should be kept in the schema.

You can suddenly drop some extra elements into the comment and supply your own handler for those elements without worrying if the schema is valid

This is a very strong point too. The annotations are a bit more portable in the sense that if they don't cause any problems if there's nothing (during generation or runtime phases) actually doing anything with them.
I'm obviously not an expert here but I think having a clear distinction between the two is important. Annotations for generation/compilation/build behaviours and directives for runtime behaviours.
There's a small risk that having a mixture of both directives and annotations could introduce a lot of syntax that the user has to understand, but so long as there is a clear usage for both, I think it could work.

I'm obviously not an expert here but I think having a clear distinction between the two is important. Annotations for generation/compilation/build behaviours and directives for runtime behaviours.

Agreed. Right now directives are only used for generation purposes so it should be easy to make the distinction and switch.

Annotations for generation/compilation/build behaviours and directives for runtime behaviours.

Another clear distinction could be: annotations for database behaviours and directives for everything else.
With this, if a developer is happy with the default database settings and doesn't want to migrate then they only need to work with directives.
Another decision we need to make is whether to use the generated schema or the the input model as the GraphQL schema source during database migration.
Input Model

If we use the input model then the migration library would need to be aware of non-database related directives. This is bad and I don't see this as a viable option.

Generated schema
If we use the generated schema then we would need to transfer all annotations from the input model to the generated schema. This is less bad.
Annotations only
Another option would be to go all in on annotations and to use the input model for migrations. This has the extra benefit of the user not needing to remember if they are to use directives or annotations for a specific behaviour.
We could use the namespace to dictate whether an annotation should be in the generated schema.
@db.* - don't bring across database annotations.
@gen.* - don't bring across.

@runtime.* - bring across.

Another clear distinction could be: annotations for database behaviours and directives for everything else.

Not possible as annotations will drive a way we query data map field names etc.

There is a simple way to filter out directives in model so we can do that before sending schema to db migration.

If we are going to add annotations to the generated schema anyway why not just send the generated schema to db migration?

Conceptually - it should be no difference for the migration package, but this is simply more hacky as what we see now is the model and there is no straight connection to generation of the schema.
Schema can be generated into multiple formats that not necesairly play along with the string format of the migration package. I think we focusing a lot here on runtime use case where we can  get schema, but in cli use case we always get model and this will require refactoring of the cli which is currently in maintenance mode. What I think is just to keep it light and simple for the moment

TL;DR we might need to hack around passing whole schema, while model is just there.
For the migration package there should be no difference what we passing as Queries/Mutations do not affect db migration and we assumed we no longer do add things to schema

Conceptually - it should be no difference for the migration package, but this is simply more hacky as what we see now is the model and there is no straight connection to generation of the schema.

Got you.

Add @db.* annotations to InputModel[Field/Type]Context.
Replace relationship directives with db annotations. It should be close to a like for like swap.
Include @db annotations in generated schema.
Pass model schema to migration library.
Filter out all directives from schema from migration library. this could be added as an option to MigrationOptions.

100% on everything:

Add @db.* annotations to InputModel[Field/Type]Context.

I'm assuming that we will simply build abstract relationship model based on annotation - currently we using directives everywhere which is very bad in terms of extensibility.
We have done some of that work already - just need to follow up.
Le'ts also remove docs that cover this case.

Include @db annotations in generated schema.

Maybe this makes no sense now

Maybe this makes no sense now.

It depends on what we use it for. For now I guess we don't have any need for it.

Closed https://github.com/aerogear/graphback/pull/562