Multiple NSEntityDescriptions claim the NSManagedObject subclass ...

Hi Drew,
In Xcode 10 I'm getting this warning in the console when I save new objects to Core Data. (Context: I have an NSManagedObject subclass called CDEvent which I'm creating and saving in this case, and my Core Data stack lives in a shared framework called FeedingKit.)
2018-07-26 16:34:30.268969-0400 Feeding[2936:3350281] [error] warning: Multiple NSEntityDescriptions claim the NSManagedObject subclass 'FeedingKit.CDEvent' so +entity is unable to disambiguate.
CoreData: warning: Multiple NSEntityDescriptions claim the NSManagedObject subclass 'FeedingKit.CDEvent' so +entity is unable to disambiguate.
2018-07-26 16:34:30.269522-0400 Feeding[2936:3350281] [error] warning:  	 'CDEvent' (0x7ffcb082c570) from NSManagedObjectModel (0x7ffcae58a4c0) claims 'FeedingKit.CDEvent'.
CoreData: warning:  	 'CDEvent' (0x7ffcb082c570) from NSManagedObjectModel (0x7ffcae58a4c0) claims 'FeedingKit.CDEvent'.
2018-07-26 16:34:30.269984-0400 Feeding[2936:3350281] [error] warning:  	 'CDEvent' (0x7ffcb0c09380) from NSManagedObjectModel (0x7ffcb0c06530) claims 'FeedingKit.CDEvent'.
CoreData: warning:  	 'CDEvent' (0x7ffcb0c09380) from NSManagedObjectModel (0x7ffcb0c06530) claims 'FeedingKit.CDEvent'.

I investigated a little bit using the memory graph debugger and noticed that there are three NSManagedObjectModels while my app is running. One of them comes from my own Core Data stack, and two of them come from Ensembles (CDEPersistentStoreEnsemble has a managedObjectModel, and CDEEventStore has a managedObjectContext that points to a persistentStoreEnsemble which points to a managedObjectModel). The two managed object models that the warnings reference correspond to the one from my own Core Data stack, and the CDEPersistentStoreEnsemble's directly-owned managedObjectModel.
So far, I haven't noticed this warning actually causing any problems - my app and Ensembles work as desired. The warning is disconcerting, though, and I'm not sure if you're already aware of it and/or have an easy solution to fix or suppress it. Any ideas?

How are you creating the model object? You should not use the merged model method, but load it with the file initializer.
Could also have to do with Swift modules.
Kind regards,
Drew

On 26 Jul 2018, at 22:43, Jason Ji<EMAIL_ADDRESS>wrote:
Hi Drew,
In Xcode 10 I'm getting this warning in the console when I save new objects to Core Data. (Context: I have an NSManagedObject subclass called CDEvent which I'm creating and saving in this case, and my Core Data stack lives in a shared framework called FeedingKit.)
2018-07-26 16:34:30.268969-0400 Feeding[2936:3350281] [error] warning: Multiple NSEntityDescriptions claim the NSManagedObject subclass 'FeedingKit.CDEvent' so +entity is unable to disambiguate.
CoreData: warning: Multiple NSEntityDescriptions claim the NSManagedObject subclass 'FeedingKit.CDEvent' so +entity is unable to disambiguate.
2018-07-26 16:34:30.269522-0400 Feeding[2936:3350281] [error] warning:  	 'CDEvent' (0x7ffcb082c570) from NSManagedObjectModel (0x7ffcae58a4c0) claims 'FeedingKit.CDEvent'.
CoreData: warning:  	 'CDEvent' (0x7ffcb082c570) from NSManagedObjectModel (0x7ffcae58a4c0) claims 'FeedingKit.CDEvent'.
2018-07-26 16:34:30.269984-0400 Feeding[2936:3350281] [error] warning:  	 'CDEvent' (0x7ffcb0c09380) from NSManagedObjectModel (0x7ffcb0c06530) claims 'FeedingKit.CDEvent'.
CoreData: warning:  	 'CDEvent' (0x7ffcb0c09380) from NSManagedObjectModel (0x7ffcb0c06530) claims 'FeedingKit.CDEvent'.
I investigated a little bit using the memory graph debugger and noticed that there are in fact three NSManagedObjectModels while my app is running. One of them comes from my own Core Data stack, and two of them come from Ensembles (CDEPersistentStoreEnsemble has a managedObjectModel, and CDEEventStore has a managedObjectContext that points to a persistentStoreEnsemble which points to a managedObjectModel).
So far, I haven't noticed this warning actually causing any problems - my app and Ensembles work as desired. The warning is disconcerting, though, and I'm not sure if you're already aware of it and/or have an easy solution to fix or suppress it. Any ideas?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@drewmccormack I'm creating the model object the same way Ensembles is, I believe - by using init(contentsOfURL:).
I'm curious about your comment about Swift modules. How do you think that could affect things? In my xcdatamodeld file, I have the module for my Core Data object defined as Current Product Module.  Really, this is a tricky one for me to debug because I have very little insight into how Core Data works under the hood, including the relationship between NSEntityDescription and NSManagedObjectModel.

Actually, your comment about asking about the model object helped me to realize I need to be researching NSManagedObjectModel and NSEntityDescription, and I realized after reading up on the documentation about those two classes what the problem was. I was creating my managed objects using the convenience initializer init(context:), which probably calls into the designated initializer init(entity:insertInto:).
If I create an entity description myself and use it to call the designated initializer, the warning is no longer generated. I guess whatever entity description they try to use in that convenience method was getting confused by the multiple managed object models.
Anyway, resolved - thank you for your comment, which was helpful!

Ah, good catch. Glad you found it.

On 29 Jul 2018, at 04:06, Jason Ji<EMAIL_ADDRESS>wrote:
Actually, your comment about asking about the model object helped me to realize I need to be researching NSManagedObjectModel and NSEntityDescription, and I realized after reading up on the documentation about those two classes what the problem was. I was creating my managed objects using the convenience initializer init(context:) https://developer.apple.com/documentation/coredata/nsmanagedobject/1640602-init?changes=_2, which probably calls into the designated initializer init(entity:insertInto:) https://developer.apple.com/documentation/coredata/nsmanagedobject/1506357-init?changes=_2.
If I create an entity description myself and use it to call the designated initializer, the warning is no longer generated. I guess whatever entity description they try to use in that convenience method was getting confused by the multiple managed object models.
Anyway, resolved - thank you for your comment, which was helpful!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-408646755, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEuABSBG4k0awDaQBoQoWIWn1VhsBQtks5uLRiLgaJpZM4VihCJ.

Just a comment to @shaps80 that it is probably best not to override the preferred initializer and instead provide a new convenience initializer, i.e. convenience init(using context: NSManagedObjectContext) that does the same as what you describe.

@ksoftllc fair call 😬

@shaps80 Your suggestion has saved me twice! Great call.

Hi Drew,
I stumbled across this issue as well, and the problem really is, that the managedObjectModel should not be loaded more than one time.  I have these strange crashes as well when using NSManagedObject.init(entity:insertIntoContext:). In some classes it works, in others it does not.
And it does only crash, when I have ensembles enabled. When it is disabled then it never crashes.
So I experimentally just changed the API to provide the NSManagedObjectModel instead of the URL to the model, so that Ensembles does not need to load it (again). After that my code just worked.
I have found multiple entries in Stack Overflow that talk about this problem.
So the real fix is, that the API of Ensembles should be changed to using the already loaded managed object model. This would permanently fix this issue.
What do you think?

I don’t think that allows Ensembles to do a version check, which is the reason we get the URL. Ensembles needs to be able to access all the model versions, not just the most recent.
There should be no user loading a model more than once, but maybe there is a thread issue. Perhaps we can ensure the model is loaded on the main thread.
Drew

On 11 Apr 2021, at 14:35, pascalfribi @.***> wrote:

Hi Drew,
I stumbled across this issue as well, and the problem really is, that the managedObjectModel should not be loaded more than one time. I have these strange crashes as well when using NSManagedObject.init(entity:insertIntoContext:). In some classes it works, in others it does not.
And it does only crash, when I have ensembles enabled. When it is disabled then it never crashes.
So I experimentally just changed the API to provide the NSManagedObjectModel instead of the URL to the model, so that Ensembles does not need to load it (again). After that my code just worked.
I have found multiple entries in Stack Overflow that talk about this problem.
So the real fix is, that the API of Ensembles should be changed to using the already loaded managed object model. This would permanently fix this issue.
What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

In my case the model is loaded on the main thread. Also Ensembles loads the model on the main thread. So this is not the issue.
But I understand your issue.
What about changing the API to provide both? We could still leave the old API for backwards compatibility and provide a Deprecated indication so that we do not break all the apps. And then introduce the new API which provides both model and modelURL.
What do you think?

On 11 Apr 2021, at 14:58, Drew McCormack @.***> wrote:
I don’t think that allows Ensembles to do a version check, which is the reason we get the URL. Ensembles needs to be able to access all the model versions, not just the most recent.
There should be no user loading a model more than once, but maybe there is a thread issue. Perhaps we can ensure the model is loaded on the main thread.
Drew

On 11 Apr 2021, at 14:35, pascalfribi @.***> wrote:

Hi Drew,
I stumbled across this issue as well, and the problem really is, that the managedObjectModel should not be loaded more than one time. I have these strange crashes as well when using NSManagedObject.init(entity:insertIntoContext:). In some classes it works, in others it does not.
And it does only crash, when I have ensembles enabled. When it is disabled then it never crashes.
So I experimentally just changed the API to provide the NSManagedObjectModel instead of the URL to the model, so that Ensembles does not need to load it (again). After that my code just worked.
I have found multiple entries in Stack Overflow that talk about this problem.
So the real fix is, that the API of Ensembles should be changed to using the already loaded managed object model. This would permanently fix this issue.
What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817303896, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAO5BGCUC4DH57QHDVKH3TIGMHFANCNFSM4FMKCCEQ.

I don’t think that will work. The URL is needed to load each version in the model, so Ensembles will still load the model again. It can’t use the model you pass to check for compatibility, because it is only the most recent model.
If you can find a way to do it, put in a PR and I am happy to look at it.
To me, this is a very poor API from Apple. They provide the means to load a model as much as you like, in different situations. There should be no assumption that an app only loads a model once. There is a similar problem with the mergedModel, which will just take any core data model it finds and put it all together, including the internal Ensembles model!
Drew

On 11 Apr 2021, at 15:12, pascalfribi @.***> wrote:
In my case the model is loaded on the main thread. Also Ensembles loads the model on the main thread. So this is not the issue.
But I understand your issue.
What about changing the API to provide both? We could still leave the old API for backwards compatibility and provide a Deprecated indication so that we do not break all the apps. And then introduce the new API which provides both model and modelURL.
What do you think?

On 11 Apr 2021, at 14:58, Drew McCormack @.***> wrote:
I don’t think that allows Ensembles to do a version check, which is the reason we get the URL. Ensembles needs to be able to access all the model versions, not just the most recent.
There should be no user loading a model more than once, but maybe there is a thread issue. Perhaps we can ensure the model is loaded on the main thread.
Drew

On 11 Apr 2021, at 14:35, pascalfribi @.***> wrote:

Hi Drew,
I stumbled across this issue as well, and the problem really is, that the managedObjectModel should not be loaded more than one time. I have these strange crashes as well when using NSManagedObject.init(entity:insertIntoContext:). In some classes it works, in others it does not.
And it does only crash, when I have ensembles enabled. When it is disabled then it never crashes.
So I experimentally just changed the API to provide the NSManagedObjectModel instead of the URL to the model, so that Ensembles does not need to load it (again). After that my code just worked.
I have found multiple entries in Stack Overflow that talk about this problem.
So the real fix is, that the API of Ensembles should be changed to using the already loaded managed object model. This would permanently fix this issue.
What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817303896, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAO5BGCUC4DH57QHDVKH3TIGMHFANCNFSM4FMKCCEQ.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817305910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAS4ABPEN4AB3GUSXUQCRTTIGN43ANCNFSM4FMKCCEQ.

I agree on the poor design from Apple’s side. Core Data has some strange issues that are really hard to debug.
The even stranger thing is, that the other loads in ensembles of the managed object model do not seem to bother at all. Do not ask me why!
I will make some more tests to see, if with this API change I can permanently solve the issue. If it works I will provide the Pull request.
Pascal

On 11 Apr 2021, at 15:46, Drew McCormack @.***> wrote:
I don’t think that will work. The URL is needed to load each version in the model, so Ensembles will still load the model again. It can’t use the model you pass to check for compatibility, because it is only the most recent model.
If you can find a way to do it, put in a PR and I am happy to look at it.
To me, this is a very poor API from Apple. They provide the means to load a model as much as you like, in different situations. There should be no assumption that an app only loads a model once. There is a similar problem with the mergedModel, which will just take any core data model it finds and put it all together, including the internal Ensembles model!
Drew

On 11 Apr 2021, at 15:12, pascalfribi @.***> wrote:
In my case the model is loaded on the main thread. Also Ensembles loads the model on the main thread. So this is not the issue.
But I understand your issue.
What about changing the API to provide both? We could still leave the old API for backwards compatibility and provide a Deprecated indication so that we do not break all the apps. And then introduce the new API which provides both model and modelURL.
What do you think?

On 11 Apr 2021, at 14:58, Drew McCormack @.***> wrote:
I don’t think that allows Ensembles to do a version check, which is the reason we get the URL. Ensembles needs to be able to access all the model versions, not just the most recent.
There should be no user loading a model more than once, but maybe there is a thread issue. Perhaps we can ensure the model is loaded on the main thread.
Drew

On 11 Apr 2021, at 14:35, pascalfribi @.***> wrote:

Hi Drew,
I stumbled across this issue as well, and the problem really is, that the managedObjectModel should not be loaded more than one time. I have these strange crashes as well when using NSManagedObject.init(entity:insertIntoContext:). In some classes it works, in others it does not.
And it does only crash, when I have ensembles enabled. When it is disabled then it never crashes.
So I experimentally just changed the API to provide the NSManagedObjectModel instead of the URL to the model, so that Ensembles does not need to load it (again). After that my code just worked.
I have found multiple entries in Stack Overflow that talk about this problem.
So the real fix is, that the API of Ensembles should be changed to using the already loaded managed object model. This would permanently fix this issue.
What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817303896, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAO5BGCUC4DH57QHDVKH3TIGMHFANCNFSM4FMKCCEQ.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817305910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAS4ABPEN4AB3GUSXUQCRTTIGN43ANCNFSM4FMKCCEQ.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817310552, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAO5BHZJN6IBY7CGFXIWTTIGR4LANCNFSM4FMKCCEQ.

The issue isn’t really Core Data per se. It always worked before. The problem appeared when they added Swift support. In my view, they tried to be too cute, and their API is incomplete. I guess they were trying to make it super easy, and it is, but as soon as you want to do something a bit more advanced, it all breaks down.
Drew

On 11 Apr 2021, at 16:09, pascalfribi @.***> wrote:
I agree on the poor design from Apple’s side. Core Data has some strange issues that are really hard to debug.
The even stranger thing is, that the other loads in ensembles of the managed object model do not seem to bother at all. Do not ask me why!
I will make some more tests to see, if with this API change I can permanently solve the issue. If it works I will provide the Pull request.
Pascal

On 11 Apr 2021, at 15:46, Drew McCormack @.***> wrote:
I don’t think that will work. The URL is needed to load each version in the model, so Ensembles will still load the model again. It can’t use the model you pass to check for compatibility, because it is only the most recent model.
If you can find a way to do it, put in a PR and I am happy to look at it.
To me, this is a very poor API from Apple. They provide the means to load a model as much as you like, in different situations. There should be no assumption that an app only loads a model once. There is a similar problem with the mergedModel, which will just take any core data model it finds and put it all together, including the internal Ensembles model!
Drew

On 11 Apr 2021, at 15:12, pascalfribi @.***> wrote:
In my case the model is loaded on the main thread. Also Ensembles loads the model on the main thread. So this is not the issue.
But I understand your issue.
What about changing the API to provide both? We could still leave the old API for backwards compatibility and provide a Deprecated indication so that we do not break all the apps. And then introduce the new API which provides both model and modelURL.
What do you think?

On 11 Apr 2021, at 14:58, Drew McCormack @.***> wrote:
I don’t think that allows Ensembles to do a version check, which is the reason we get the URL. Ensembles needs to be able to access all the model versions, not just the most recent.
There should be no user loading a model more than once, but maybe there is a thread issue. Perhaps we can ensure the model is loaded on the main thread.
Drew

On 11 Apr 2021, at 14:35, pascalfribi @.***> wrote:

Hi Drew,
I stumbled across this issue as well, and the problem really is, that the managedObjectModel should not be loaded more than one time. I have these strange crashes as well when using NSManagedObject.init(entity:insertIntoContext:). In some classes it works, in others it does not.
And it does only crash, when I have ensembles enabled. When it is disabled then it never crashes.
So I experimentally just changed the API to provide the NSManagedObjectModel instead of the URL to the model, so that Ensembles does not need to load it (again). After that my code just worked.
I have found multiple entries in Stack Overflow that talk about this problem.
So the real fix is, that the API of Ensembles should be changed to using the already loaded managed object model. This would permanently fix this issue.
What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817303896, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAO5BGCUC4DH57QHDVKH3TIGMHFANCNFSM4FMKCCEQ.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817305910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAS4ABPEN4AB3GUSXUQCRTTIGN43ANCNFSM4FMKCCEQ.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817310552, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAO5BHZJN6IBY7CGFXIWTTIGR4LANCNFSM4FMKCCEQ.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817314060, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAS4ACY6FJQJ5IL6OIGBLLTIGUR7ANCNFSM4FMKCCEQ.

I agree and they just do not fix it. This is a longstanding problem.
I even tried to move to the new way to create the stores with NSPersistentContainer, but also this does not solve this issue.
Pascal

On 11 Apr 2021, at 16:27, Drew McCormack @.***> wrote:
The issue isn’t really Core Data per se. It always worked before. The problem appeared when they added Swift support. In my view, they tried to be too cute, and their API is incomplete. I guess they were trying to make it super easy, and it is, but as soon as you want to do something a bit more advanced, it all breaks down.
Drew

On 11 Apr 2021, at 16:09, pascalfribi @.***> wrote:
I agree on the poor design from Apple’s side. Core Data has some strange issues that are really hard to debug.
The even stranger thing is, that the other loads in ensembles of the managed object model do not seem to bother at all. Do not ask me why!
I will make some more tests to see, if with this API change I can permanently solve the issue. If it works I will provide the Pull request.
Pascal

On 11 Apr 2021, at 15:46, Drew McCormack @.***> wrote:
I don’t think that will work. The URL is needed to load each version in the model, so Ensembles will still load the model again. It can’t use the model you pass to check for compatibility, because it is only the most recent model.
If you can find a way to do it, put in a PR and I am happy to look at it.
To me, this is a very poor API from Apple. They provide the means to load a model as much as you like, in different situations. There should be no assumption that an app only loads a model once. There is a similar problem with the mergedModel, which will just take any core data model it finds and put it all together, including the internal Ensembles model!
Drew

On 11 Apr 2021, at 15:12, pascalfribi @.***> wrote:
In my case the model is loaded on the main thread. Also Ensembles loads the model on the main thread. So this is not the issue.
But I understand your issue.
What about changing the API to provide both? We could still leave the old API for backwards compatibility and provide a Deprecated indication so that we do not break all the apps. And then introduce the new API which provides both model and modelURL.
What do you think?

On 11 Apr 2021, at 14:58, Drew McCormack @.***> wrote:
I don’t think that allows Ensembles to do a version check, which is the reason we get the URL. Ensembles needs to be able to access all the model versions, not just the most recent.
There should be no user loading a model more than once, but maybe there is a thread issue. Perhaps we can ensure the model is loaded on the main thread.
Drew

On 11 Apr 2021, at 14:35, pascalfribi @.***> wrote:

Hi Drew,
I stumbled across this issue as well, and the problem really is, that the managedObjectModel should not be loaded more than one time. I have these strange crashes as well when using NSManagedObject.init(entity:insertIntoContext:). In some classes it works, in others it does not.
And it does only crash, when I have ensembles enabled. When it is disabled then it never crashes.
So I experimentally just changed the API to provide the NSManagedObjectModel instead of the URL to the model, so that Ensembles does not need to load it (again). After that my code just worked.
I have found multiple entries in Stack Overflow that talk about this problem.
So the real fix is, that the API of Ensembles should be changed to using the already loaded managed object model. This would permanently fix this issue.
What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817303896, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAO5BGCUC4DH57QHDVKH3TIGMHFANCNFSM4FMKCCEQ.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817305910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAS4ABPEN4AB3GUSXUQCRTTIGN43ANCNFSM4FMKCCEQ.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817310552, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAO5BHZJN6IBY7CGFXIWTTIGR4LANCNFSM4FMKCCEQ.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817314060, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAS4ACY6FJQJ5IL6OIGBLLTIGUR7ANCNFSM4FMKCCEQ.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/drewmccormack/ensembles/issues/275#issuecomment-817316837, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPAO5ADK2UHLO3G5HM6W6LTIGWWZANCNFSM4FMKCCEQ.

hello im getting this same error,
would you anyone be able to sugggest what to change in my code so that error goes again properly?
`class TailorPersistentController: ObservableObject {
var persistentContainer = NSPersistentContainer(name: "Model")
private var clientFetchRequest = CustomerCD.fetchRequest()
private var measurestFetchRequest = MeasurementsCD.fetchRequest()
private var jobsEventFetchRequest = JobsDueCD.fetchRequest()

@Published var editTask: JobsDueCD?
@Published var jobsEventDue: JobsEvents?

init() {
    persistentContainer.loadPersistentStores { storeDescription, error in
        if let error = error {
            print("error = \(error)")
        }
    }

}

func saveCustomerToCoreData(customer: CustomersMeasurementsAndDetails) -> UUID {
    let managedObjectContext = persistentContainer.viewContext

//        let clientsCDList = try? managedObjectContext.fetch(clientFetchRequest)
//        print("clientsCDList = (clientsCDList)")
//        guard let clientsCDList = clientsCDList else {
//            return
//        }
let id = UUID()
let customerCD = CustomerCD(context: managedObjectContext)
customerCD.fullName = customer.clientInfo.fullName
customerCD.gender =  customer.clientInfo.gender?.rawValue
customerCD.id = id
customerCD.phone = customer.clientInfo.phone
customerCD.comments = customer.clientInfo.comments
//        let forCustomerCD = MeasurementsCD(context: managedObjectContext)
//
//
//
//        forCustomerCD.clothType = customer.pantsMeasurment.clothType
//        forCustomerCD.length = customer.pantsMeasurment.length
//        forCustomerCD.trouserRoll = customer.pantsMeasurment.trouserRoll
//        forCustomerCD.knee = customer.pantsMeasurment.knee
//        forCustomerCD.flyFrontKnuckle = customer.pantsMeasurment.flyFrontKnuckle
//        forCustomerCD.hips = customer.pantsMeasurment.hips
//        forCustomerCD.waist = customer.pantsMeasurment.waist
//        forCustomerCD.rearKnuckleLength = customer.pantsMeasurment.rearKnuckleLength
//        forCustomerCD.customerID = customerCD.id
//        forCustomerCD.forCustomer = customerCD
//        let id = UUID()
//        let customerCD = CustomerCD(context: managedObjectContext)
//        customerCD.fullName = customer.clientInfo.fullName
//        customerCD.gender =  customer.clientInfo.gender.rawValue
//        customerCD.id = forCustomerCD.customerID
//        customerCD.phone = customer.clientInfo.phone
//        customerCD.comments = customer.clientInfo.comments
//        customerCD.hasMeasures = customer.
//        if let hasMeasures = customerCD.hasMeasures?.allObjects as? [MeasurementsCD]  {
//            hasMeasures.map { MeasurementsCD in
//                MeasurementsCD.clothType = customer.pantsMeasurment?.clothType
//                MeasurementsCD.length = customer.pantsMeasurment?.length
//                MeasurementsCD.trouserRoll = customer.pantsMeasurment?.trouserRoll
//                MeasurementsCD.knee = customer.pantsMeasurment?.knee
//                MeasurementsCD.flyFrontKnuckle = customer.pantsMeasurment?.flyFrontKnuckle
//                MeasurementsCD.hips = customer.pantsMeasurment?.hips
//                MeasurementsCD.waist = customer.pantsMeasurment?.waist
//                MeasurementsCD.rearKnuckleLength = customer.pantsMeasurment?.rearKnuckleLength
//            }
//        }
//        guard let hasMeasures2 = customerCD.hasMeasures?.allObjects as? [MeasurementsCD] else {
//            return
//        }
    // 5. save changes
    try? managedObjectContext.save()

    return id
}

//save pants measurements
func savePantsMeasurementsToCoreData(customerMeasurements: CustomersMeasurementsAndDetails.PantsMeasuresDetails,
                                customerId: UUID) {

    let managedObjectContext = persistentContainer.viewContext

    //MARK: done to be able to save the pants to the existing customer
    let findClientFetchRequest = CustomerCD.fetchRequest()
    let searchPredicate = NSPredicate(
        format: "id == %@", customerId as CVarArg
    )

    findClientFetchRequest.predicate = searchPredicate

    let clientsCDList = try? managedObjectContext.fetch(findClientFetchRequest)

    guard let clientsCDList = clientsCDList else {
        return
    }

    let customerCD = clientsCDList.first

    let measurementsCD = MeasurementsCD(context: managedObjectContext)
    measurementsCD.clothType = ClothType.pants.rawValue
    measurementsCD.customerID = customerId
    measurementsCD.forCustomer = customerCD
    measurementsCD.id = UUID()
    measurementsCD.trouserRoll = customerMeasurements.trouserRoll
    measurementsCD.knee = customerMeasurements.knee
    measurementsCD.flyFrontKnuckle = customerMeasurements.flyFrontKnuckle
    measurementsCD.hips = customerMeasurements.hips
    measurementsCD.waist = customerMeasurements.waist
    measurementsCD.length = customerMeasurements.length
    measurementsCD.rearKnuckleLength = customerMeasurements.rearKnuckleLength
    measurementsCD.otherPants = customerMeasurements.other
    // 5. save changes
    try? managedObjectContext.save()
}

//save job due events
func saveJobEFormToCoreData(jobsEventDue: JobsEvents
                                )-> UUID {

    let managedObjectContext = persistentContainer.viewContext

//        var task: JobsEvents!
//        if let editTask = editTask {
//            task = editTask
//        } else {
//
//        }
let jodsDueCD = JobsDueCD(context: managedObjectContext)
let id = UUID()
//        let measurementsCD = MeasurementsCD(context: managedObjectContext)
jodsDueCD.clothingType = jobsEventDue.jobsEventType.rawValue
jodsDueCD.isCompleted = jobsEventDue.isComplete
jodsDueCD.date = jobsEventDue.datetime
jodsDueCD.customerName = jobsEventDue.customerName
jodsDueCD.clothingType = jobsEventDue.taskType
//        jodsDueCD.status = jobsEventDue.status.rawValue
jodsDueCD.pieacesClothingtoMake = jobsEventDue.numPieacesOfClothingDue
jodsDueCD.numPants = jobsEventDue.numPants
jodsDueCD.numJackets = jobsEventDue.numJacket
jodsDueCD.numDress = jobsEventDue.numDress
jodsDueCD.numShorts = jobsEventDue.numShorts
jodsDueCD.numSkirts = jobsEventDue.numSkirts
jodsDueCD.amountDue = jobsEventDue.totalDue
jodsDueCD.amountPaid = jobsEventDue.amountPaid
jodsDueCD.notes = jobsEventDue.note
    // 5. save changes
    try? managedObjectContext.save()

    return id
}

func fetchClientsFromCoreData() -> [CustomersMeasurementsAndDetails] {

    let clientNameSortDescriptor = NSSortDescriptor(key: "fullName",
                                                       ascending: true)

    clientFetchRequest.sortDescriptors = [clientNameSortDescriptor]
    let clientsCDList = try? persistentContainer.viewContext.fetch(clientFetchRequest)
    var convertedClients: [CustomersMeasurementsAndDetails] = []

    guard let clientsCDList = clientsCDList else {
        return []
    }

//        let measuresCDList = try? persistentContainer.viewContext.fetch(measurestFetchRequest)
//        var convertedMeasures: [CustomersMeasurementsAndDetails.PantsMeasuresDetails] = []
//
//        guard let measuresCDList = measuresCDList else {
//            return []
//        }
//
//        //todo: maybe we can do this later when going inside client screen
//        for measureCD in measuresCDList {
//
//            let measure = CustomersMeasurementsAndDetails.PantsMeasuresDetails(id: measureCD.customerID?.uuidString ?? "",
//                                                                               clothType: "",
//                                                                               waist: measureCD.clothType ?? "" ,
//                                                                               hips: "",
//                                                                               flyFrontKnuckle: "",
//                                                                               knee: "", trouserRoll: "",
//                                                                               length: measureCD.length ?? "",
//                                                                               rearKnuckleLength: "",
//                                                                               other: "")
//
//            convertedMeasures.append(measure)
//        }
    for clientCD in clientsCDList {

//           guard let hasmeasures = clientCD.hasMeasures?.allObjects as? [MeasurementsCD] else {
//                return []
//            }
//            hasmeasures.map { measure in
//                let client = CustomersMeasurementsAndDetails(id: clientCD.id?.uuidString ?? "", clientInfo: CustomersMeasurementsAndDetails.ClientInfo(fullName: clientCD.fullName ?? "", phone: clientCD.phone ?? "", comments: clientCD.comments ?? "")
//                                                                 , pantsMeasurment: CustomersMeasurementsAndDetails.PantsMeasuresDetails(id: clientCD.id?.uuidString ?? "", clothType: measure.clothType ?? "", waist: measure.waist ?? "", hips: measure.hips ?? "", flyFrontKnuckle: measure.flyFrontKnuckle ?? "", knee: measure.knee ?? "" , trouserRoll: measure.trouserRoll ?? "", length: measure.length ?? "" , rearKnuckleLength: measure.rearKnuckleLength ?? "", other: "" )
//                )
//                convertedClients.append(client)
//            }
        let client = CustomersMeasurementsAndDetails(id: clientCD.id?.uuidString ?? "", clientInfo: CustomersMeasurementsAndDetails.ClientInfo(fullName: clientCD.fullName ?? "", phone: clientCD.phone ?? "", comments: clientCD.comments ?? "")
                                                         , pantsMeasurment: CustomersMeasurementsAndDetails.PantsMeasuresDetails(id:  "", clothType: "", waist: "", hips: "", flyFrontKnuckle:  "", knee: "" , trouserRoll: "", length: "" , rearKnuckleLength:  "", other: "" )
        )
        convertedClients.append(client)

    }
    print("checking whats inside of this \(convertedClients)")

    return convertedClients

    }

//fetch events
func fetchEventsFromCoreData(currentTab: String) -> [JobsEvents] {
    // MARK: Predicate to Filter current date Tasks
    let calendar = Calendar.current
    var predicate: NSPredicate!
    if currentTab == "Today"{
        let today = calendar.startOfDay(for: Date())
        let tommorow = calendar.date(byAdding: .day, value: 1, to: today)!

        // Filter Key
        let filterKey = "date"

        // This will fetch task between today and tommorow which is 24 HRS
        // 0-false, 1-true
        predicate = NSPredicate(format: "\(filterKey) >= %@ AND \(filterKey) < %@ AND isCompleted == %i", argumentArray: [today,tommorow,0])
    }else if currentTab == "Upcoming"{
        let today = calendar.startOfDay(for: calendar.date(byAdding: .day, value: 1, to: Date())!)
        let tommorow = Date.distantFuture

        // Filter Key
        let filterKey = "date"

        // This will fetch task between today and tommorow which is 24 HRS
        // 0-false, 1-true

        predicate = NSPredicate(format: "\(filterKey) >= %@ AND \(filterKey) < %@ AND isCompleted == %i", argumentArray: [today,tommorow,0])
    }else if currentTab == "Delayed"{
        let today = calendar.startOfDay(for: Date())
        let past = Date.distantPast

        // Filter Key
        let filterKey = "date"

        // This will fetch task between today and tommorow which is 24 HRS
        // 0-false, 1-true
        predicate = NSPredicate(format: "\(filterKey) >= %@ AND \(filterKey) < %@ AND isCompleted == %i", argumentArray: [past,today,0])
    }
    else{
        // 0-false, 1-true
        predicate = NSPredicate(format: "isCompleted == %i", argumentArray: [1])
    }

//        // MARK: Predicate to Filter current date Tasks
//        let calendar = Calendar.current
//
//        let today = calendar.startOfDay(for: Date())
//        let tommorow = calendar.date(byAdding: .day, value: 1, to: today)!
//
//        // Filter Key
//        let filterKey = "date"
//
//        // This will fetch task between today and tommorow which is 24 HRS
//        let predicate = NSPredicate(format: "(filterKey) >= %@ AND (filterKey) < %@", argumentArray: [today,tommorow,0])
//
//        jobsEventFetchRequest.predicate = predicate
jobsEventFetchRequest.sortDescriptors = [.init(keyPath: \JobsDueCD.date, ascending: false)]
    let jobseventsCDList = try? persistentContainer.viewContext.fetch(jobsEventFetchRequest)
    var convertedjobevents: [JobsEvents] = []

    guard let jobseventsCDList = jobseventsCDList else {
        return []
    }

    for eventsCD in jobseventsCDList {

        let events =

        JobsEvents(amountPaid: eventsCD.amountPaid ?? "",
                   totalDue: eventsCD.amountDue ?? "",

//                       jobsEventType: eventsCD.clothingType,
datetime: eventsCD.date ?? Date(),
note: eventsCD.notes ?? "",
numPieacesOfClothingDue: eventsCD.pieacesClothingtoMake ?? "",
numPants: eventsCD.numPants ?? "",
numjacket: eventsCD.numJackets ?? "",
numShorts: eventsCD.numShorts ?? "",
numskirts: eventsCD.numSkirts ?? "",
numDress: eventsCD.numDress ?? "",
isComplete: eventsCD.isCompleted,
taskType: eventsCD.clothingType ?? "",
customerName: eventsCD.customerName ?? "",
clothToMake: eventsCD.clothingToMake ?? ""
)
        convertedjobevents.append(events)
    }

    return convertedjobevents

    }

}`

I'm not that familiar with NSPersistentContainer, but my guess is that it is just using the default models, merging them all into one. With Ensembles, it is necessary that you keep the models apart, because Ensembles has its own Core Data models.
There should be a way with the persistent container to setup your own model, using the URL of your momd file, rather than letting the container look for all models. Take a look and google around for how you can setup the model for the container. (ChatGPT may even be able to write you code for this.)

Here is code from ChatGPT. Don't know if it is correct, but probably is reasonable...
Yes, I can certainly help you with that! Here's an example Swift code that sets up an NSPersistentContainer for Core Data using a specific model file:
import CoreData

// Specify the name of your Core Data model file (without the file extension)
let modelName = "MyCoreDataModel"

// Get the URL of the specified model file in your app bundle
guard let modelURL = Bundle.main.url(forResource: modelName, withExtension: "momd") else {
    fatalError("Failed to find model file with name: \(modelName).")
}

// Initialize an NSManagedObjectModel instance with the specified model file
guard let managedObjectModel = NSManagedObjectModel(contentsOf: modelURL) else {
    fatalError("Failed to initialize managed object model with URL: \(modelURL).")
}

// Initialize an NSPersistentContainer with the specified managed object model
let persistentContainer = NSPersistentContainer(name: modelName, managedObjectModel: managedObjectModel)

// Load the persistent store for the container
persistentContainer.loadPersistentStores { storeDescription, error in
    if let error = error as NSError? {
        fatalError("Failed to load persistent store: \(error), \(error.userInfo)")
    }
}

In this example, you first specify the name of your Core Data model file (without the file extension) in a variable called modelName. Then, you get the URL of the specified model file in your app bundle using the Bundle.main.url(forResource:withExtension:) method.
Next, you initialize an NSManagedObjectModel instance with the specified model file URL using the NSManagedObjectModel(contentsOf:) method.
Then, you initialize an NSPersistentContainer instance with the specified managed object model using the NSPersistentContainer(name:managedObjectModel:) method.
Finally, you load the persistent store for the container using the loadPersistentStores(completionHandler:) method, and handle any errors that may occur during the loading process.


Error on processing more than 10 pages

I'm trying to convert pdf with more than 10 pages to images but it is giving following error:
"Error: gm().stream() or gm().write() with a non-readable stream.",
"    at gm._spawn (/myproject/node_modules/gm/lib/command.js:275:19)",
"    at /myproject/node_modules/gm/lib/command.js:139:19",
"    at series (/myproject/node_modules/array-series/index.js:11:36)",
"    at gm._preprocess (/myproject/node_modules/gm/lib/command.js:176:5)",
"    at gm.stream (/myproject/node_modules/gm/lib/command.js:137:10)",
"    at /myproject/node_modules/pdf2pic/dist/index.js:1:1362",
"    at new Promise (<anonymous>)",
"    at a.toBuffer (/myproject/node_modules/pdf2pic/dist/index.js:1:1317)",
"    at o (/myproject/node_modules/pdf2pic/dist/index.js:1:3412)",
"    at /myproject/node_modules/pdf2pic/dist/index.js:1:3517",
"    at Array.map (<anonymous>)",
"    at m (/myproject/node_modules/pdf2pic/dist/index.js:1:3509)",
"    at /myproject/node_modules/pdf2pic/dist/index.js:1:3870",
"    at Generator.next (<anonymous>)",
"    at a (/myproject/node_modules/pdf2pic/dist/index.js:1:294)",
"    at processTicksAndRejections (node:internal/process/task_queues:96:5)"

Usage:
const pdfConvert = fromBuffer(buffer);
const imgArr = await pdfConvert.bulk(-1, { responseType: 'buffer' });

Hi @piyushk96, thank you for reporting it.
The latest version (3.0.3) should have this fixed.
Let me know if you still have problems with it.

Thanks for the quick update 👍🏻. It's working now


Fix MDNS vendor / add TimedRequest support

Required for iOS / Android support

Need approval again after adding spec ref


Upgrade Pulsar Admin Console to 2.1.1

Fixes: #240

Converting to draft, as I encountered several issues while validating the changes. I still need to update the configuration of the admin console to use the updated keycloak integration.

Superseded by https://github.com/datastax/pulsar-helm-chart/pull/246.


docker push fails

Description
Hello,
gitea is run on a custom port and subpath behind a separate firewall with NAT
https://domain.com:8443/gitea
Self-check page shows no problems
docker push from external machine works fine.
docker login succeeds in the VM that hosts gitea.
Push fails from the VM that hosts gitea.
Some gitea logs are below;
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed GET /v2/ for <IP_ADDRESS>:0, 401 Unauthorized in 0.3ms @ container/container.go:126(container.ReqContainerAccess)
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed GET /v2/token?scope=repository%3A---------%2F---------%3Apush%2Cpull&service=container_registry for <IP_ADDRESS>:0, 200 OK in 0.2ms @ container/container.go>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed HEAD /v2/---------/blobs/sha256:2fe3f9fcc07ad363a19d33bb9f38f3540c724121f112de29713ae8cd98ab6343 for <IP_ADDRESS>:0, 404 Not Found in 1.1ms @ cont>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed HEAD /v2/---------/blobs/sha256:46401f65b78c42a666f8b63e8beab24b33558f5eee661d8e7ba7efe7cfa56b35 for <IP_ADDRESS>:0, 404 Not Found in 1.5ms @ cont>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed HEAD /v2/---------/blobs/sha256:75cceec2ae3fd04477c61b35783c4a727362703003063f084100448d6b72ed75 for <IP_ADDRESS>:0, 404 Not Found in 0.7ms @ cont>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed HEAD /v2/---------/blobs/sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 for <IP_ADDRESS>:0, 404 Not Found in 0.6ms @ cont>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed POST /v2/---------/blobs/uploads/ for <IP_ADDRESS>:0, 401 Unauthorized in 0.4ms @ packages/api.go:42(packages.ContainerRoutes.func2.1.reqPackageAc>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed HEAD /v2/---------/blobs/sha256:e15b63474834ed288774bd3d34953acb26783b0ffe61715eb039ab4a8f270fa7 for <IP_ADDRESS>:0, 404 Not Found in 1.3ms @ cont>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed POST /v2/---------/blobs/uploads/ for <IP_ADDRESS>:0, 401 Unauthorized in 0.4ms @ packages/api.go:42(packages.ContainerRoutes.func2.1.reqPackageAc>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed POST /v2/---------/blobs/uploads/ for <IP_ADDRESS>:0, 401 Unauthorized in 0.4ms @ packages/api.go:42(packages.ContainerRoutes.func2.1.reqPackageAc>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed POST /v2/---------/blobs/uploads/ for <IP_ADDRESS>:0, 401 Unauthorized in 0.4ms @ packages/api.go:42(packages.ContainerRoutes.func2.1.reqPackageAc>
2024/08/08 03:11:22 ...eb/routing/logger.go:102:func1() [I] router: completed POST /v2/---------/blobs/uploads/ for <IP_ADDRESS>:0, 401 Unauthorized in 0.4ms @ packages/api.go:42(packages.ContainerRoutes.func2.1.reqPackageAc
Gitea Version
1.22  1.22.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
docker
https://domain.com:8443/gitea
Database
None

What's your configuration for the ROOT_URL?

https://domain.com:8443/gitea
Logs show that docker registry auth is fine. The POST request is failing

Maybe the docker user has no permission to push to the target scope.

@KN4CK3R Could you clarify?
The same gitea (admin) user is used to push images from external machine (where push is working)

That sounds like what I said earlier, the docker user has no permission to push to adminusername. Only that user or another admin has permission to do so.


Add HTML import and export support

Support creating RichTextValue from a html string
Support exporting RichTextValue as html string

This could be helpful specially when dealing with api and you need to share the rich text content between mobile and web so it needs it be saved as html in the database.

Well, it seams that this feature needs a lot of work because we don't have a Kotlin multiplatform HTML parser. I'm working on a Kotlin multiplatform HTML parser library and I'm going to use it in the compose rich editor library to support HTML

I released Ksoup which is a KMP Html Parser and I'm going to use it for adding support to HTML import/export


StatsdClient can now be given a postfix to append to all logging messages

Also fixed the unit tests.
The unit tests were completely broken due to the change to async
everywhere so they are now fixed and Moq is mostly eliminated in favor
of a simple stub object.
StatsdClient can now be given a postfix name which will be appended to
every stat.  If the Statsd Client object is given the prefix
"some.prefix" and the postfix "hostname" then using
client.LogGauge("mygauge", 1) will result in the gauge
"some.prefix.myguage.hostname" being sent to statsd.  The use case for
this feature is based on how Krux does monitoring, see presentation
here:
https://puppetlabs.com/presentations/puppet-camp-london-2014-how-measure-everything-million-metrics-second-minimal

What's the status of this @jefftucker ? Can this be merged safely?

Can you please update your pr and let me know about the perf diff. Then I'll get this merged in.

Can you please update your pr (resolve conflicts) and let me know about the perf diff. Then I'll get this merged in.

@jefftucker Can you please update the conflicts and update tests accordingly.


Use ResourceFlavorReference instead of string consistently

/kind cleanup

What would you like to be cleaned:
To use ResourceFlavorReference consistently, and only cast to string when absolutly needed
Why is this needed:
For example here:

flavor is casted ResourceFlavorReference -> string here
then down in the invocation stack it is casted back from string to ResourceFlavorReference: here

/good-first-issue
/help wanted

Hi @mimowo I understand the goal is to consistently use ResourceFlavorReference type instead of string throughout the codebase, particularly in ClusterQueuesUsingFlavor() and related methods, only casting to string when absolutely necessary (like in NamespacedName). Could you help clarify the specific scenarios where casting to string would still be necessary apart from NamespacedName ?

@shubhamch71 We need to use the TopologyReference type instead of string here:
https://github.com/kubernetes-sigs/kueue/blob/0f54466b991a7d198eeca306dc75f2aee518c482/apis/kueue/v1beta1/resourceflavor_types.go#L97
Like here:
https://github.com/kubernetes-sigs/kueue/blob/0f54466b991a7d198eeca306dc75f2aee518c482/apis/kueue/v1beta1/clusterqueue_types.go#L340-L341
This is an example how to initialize reference type:
https://github.com/kubernetes-sigs/kueue/blob/0f54466b991a7d198eeca306dc75f2aee518c482/apis/kueue/v1beta1/clusterqueue_types.go#L259-L262

the goal is to consistently use ResourceFlavorReference type instead of string throughout the codebase

yes

Could you help clarify the specific scenarios where casting to string would still be necessary apart from NamespacedName ?

AFAIK only when passing to NamespacedName, but I might be missing some place, it is part of the task to figure out all such places.

Also anything you can suggest to get started with this issue?

I think you are on the right track.

/assign
@shubhamch71 I've assigned this one to myself because it's still free and you didn't add any update in some time. However, if you already started with it please let me know.

@kaisoz Thanks for picking this up! I apologize for the delay on my end—I’ve been caught up with work and won’t be able to make further progress on it. Feel free to go ahead and take it forward.

@shubhamch71 No worries! I'll work on it, thanks for the response 😊


time- spinner.vue      this[type + 'Private'] = value.value&&value.value >= 0 ? value.value : value;

When using element-ui.com mon.js, there is a problem with the condition of the 152 lines in time- spinner. When value. Value is undefined, the judgment condition is false, and the obtained value is undefined

When using element-ui.com mon.js, there is a problem with the condition of the 152 lines in time- spinner. When value. Value is undefined, the judgment condition is false, and the obtained value is undefined


LANGUAGE SUPPORT | Can you add TOML files supported?

In my python project, if I use a toml file it says to add language support, but I'm not sure how. Can you give me some instructions?

Sure I'm doing that today


Add webpack.prod.conf.js support

Add webpack.prod.conf.js support
Changes proposed:

[x] Add

That's my fault. I missed that entry when I made the switch.
Sorry for any inconvenience caused.

@JimiC No problem.


fix npm install warnings

npm WARN deprecated<EMAIL_ADDRESS>Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated<EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated<EMAIL_ADDRESS>graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to<EMAIL_ADDRESS>as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated<EMAIL_ADDRESS>Deprecated, use jstransformer
npm WARN deprecated<EMAIL_ADDRESS>use uuid module instead
npm WARN prefer global<EMAIL_ADDRESS>should be installed with -g

can see them on travis -
https://travis-ci.org/OriHoch/Spark#L152

From that list what's left is: Jade
I'll fix it.


Remove link to frontend repo that doesn't exist

Our frontend code isn't its own repo anymore! Removing the link from the graphql guide 😊

👍


Long session names lead to unwieldy agenda filter parameter keywords

The agenda filtering system assigns a keyword to enable/disable display of many types of sessions based on the session's assigned name. If that session has a long name as is sometimes done to add important information to the agenda, this translates into impractically long keywords. (E.g., /meeting/agenda/?show=newcomers-dinner-open-to-newcomers-note-that-pre-registration-is-required-and-a-25usd-fee-will-be-charged)
This is not a technical problem, but contradicts the goal of having human-manageable URL parameters for the agenda page.

At the 114 sprint, get Liz to explain why the session has all this extra stuff in the name. We may be able to better model what she needs and avoid this problem altogether.

Talked to @flynnliz (who should correct me if I get this wrong). The need was for a way to show additional essential information directly on the agenda. A subtitle or description field that appears prominently along with the session name should avoid the temptation to use long names.

Related #4457

I think using the existing agenda_note may do the trick. Setting that causes a note to show up below the session title as is most visible for the "Joint with xyz" notes on recent meeting agendas.

I'm planning to make it easier to edit that field.


Error: Permission denied

Description of issue
Every time I user brew cask install , I face the same issue. But I still can use brew install..
Output of brew cask install filezilla --verbose
==> Downloading http://downloads.sourceforge.net/project/filezilla/FileZilla_Client/3.18.0/FileZilla_3.18.0_macosx-x86.app.tar.bz2
Already downloaded: /Users/jihan/Library/Caches/Homebrew/filezilla-3.18.0.tar.bz2
==> Verifying checksum for Cask filezilla
==> Moving App 'FileZilla.app' to '/Applications/FileZilla.app'
Error: Permission denied - (/usr/local/Caskroom/filezilla/3.18.0/FileZilla.app, /Applications/FileZilla.app)
  Most likely, this means you have an outdated version of homebrew-cask. Please run:

      brew uninstall --force brew-cask; brew untap phinze/cask; brew update; brew cleanup; brew cask cleanup

  If this doesn’t fix the problem, please report this bug:

      https://github.com/caskroom/homebrew-cask#reporting-bugs

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:519:in `rename'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:519:in `block in mv'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1558:in `block in fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1574:in `fu_each_src_dest0'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1556:in `fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:508:in `mv'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/artifact/moved.rb:50:in `move'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/artifact/moved.rb:26:in `block in install_phase'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/artifact/moved.rb:43:in `block in each_artifact'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/artifact/moved.rb:42:in `each'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/artifact/moved.rb:42:in `each_artifact'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/artifact/moved.rb:22:in `install_phase'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:129:in `block in install_artifacts'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:126:in `each'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:126:in `install_artifacts'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:75:in `install'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/install.rb:21:in `block in install_casks'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/install.rb:18:in `each'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/install.rb:18:in `install_casks'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/install.rb:7:in `run'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:83:in `run_command'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:121:in `process'
/usr/local/Library/Taps/caskroom/homebrew-cask/cmd/brew-cask.rb:26:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/brew.rb:22:in `require?'
/usr/local/Library/brew.rb:93:in `<main>'
Error: Kernel.exit

Output of brew doctor
Your system is ready to brew.

Please migrate your Casks to the new location, or if you would like to keep your
Caskroom at /opt/homebrew-cask/Caskroom, add the following to your HOMEBREW_CASK_OPTS:

  --caskroom=/opt/homebrew-cask/Caskroom

For more details on each of those options, see https://github.com/caskroom/homebrew-cask/issues/21913.
==> Satisfying dependencies
==> Installing Cask dependencies: virtualbox
virtualbox ...
==> Downloading http://download.virtualbox.org/virtualbox/5.0.22/VirtualBox-5.0.22-108108-OSX.dmg
######################################################################## 100.0%
==> Verifying checksum for Cask virtualbox
Error: Permission denied - /opt/homebrew-cask/Caskroom/virtualbox/5.0.22-108108
  Most likely, this means you have an outdated version of homebrew-cask. Please run:

      brew uninstall --force brew-cask; brew untap phinze/cask; brew update; brew cleanup; brew cask cleanup

  If this doesn’t fix the problem, please report this bug:

      https://github.com/caskroom/homebrew-cask#reporting-bugs

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:109:in `extract_primary_container'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:74:in `install'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:214:in `block in cask_dependencies'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:207:in `each'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:207:in `cask_dependencies'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:143:in `satisfy_dependencies'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:71:in `install'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/install.rb:21:in `block in install_casks'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/install.rb:18:in `each'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/install.rb:18:in `install_casks'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/install.rb:7:in `run'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:83:in `run_command'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:121:in `process'
/usr/local/homebrew/Library/Taps/caskroom/homebrew-cask/cmd/brew-cask.rb:26:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/homebrew/Library/brew.rb:22:in `require?'
/usr/local/homebrew/Library/brew.rb:93:in `<main>'

i have sane issue

What are the permissions on that directory, and all of them to the top (/opt, /opt/homebrew-cask, …)?

hm...  this can be a solution!

So, for some reason caprine is under root. I’m guessing we’ll see a similar pattern from @surfer190 and @abuumair-dsi.
I ask that you correct the ownership of the directories. This is likely due to one of the recent changes. Only to worry if it happens again, after you manually correct the ownership.

I had the same error message:
Error: Permission denied - (/Users/jt3k/Library/Caches/Homebrew/black-screen-0.0.3.zip, /Users/jt3k/Library/Caches/Homebrew/Casks/black-screen-0.0.3.zip)
Following command fixed my problem.
sudo chown -R $(whoami):staff ~/Library/Caches/Homebrew /opt/homebrew-cask/

thanx

@vitorgalvao , thanks for your help... ls: /opt: No such file or directory what should I do now?

Im my case (#22081) changing ownership doesn't help, tried:
sudo chown -R $(whoami):staff ~/Library/Caches/Homebrew /usr/local/Caskroom/ /usr/local/Library/Homebrew/
Before: :admin; After: :stuff

Yes like @jt3k my problem was solved by giving ownership of all the files in the homebrew-cask folder to my user.

@abuumair-dsi You are probably using the new cask location: /usr/local/Caskroom/

@abuumair-dsi You are probably using the new cask location: /usr/local/Caskroom/

That is correct. Look at your error, @abuumair-dsi, and you’ll see that is the case. Run the command to that directory.

It's solved my problem
sudo chown -R $(whoami):staff /Applications/
Thanks everyone..

In my case the issue not not been solved that way, if get mostly "Operation not permitted" via chown on /Applications, example
sudo chown -R $(whoami):staff /Applications/
...
chown: /Applications/App Store.app: Operation not permitted
chown: /Applications/Automator.app: Operation not permitted

Can someone explain, what is the root-cause if this issue?
In my case my user is member of the "admin" group and mostly in the filesystems the dirs are assigned to the admin group. What is the reason to try to change the different directories to staff? Is staff been used in homebrew as default?

@mathiashro You shouldn’t be trying to change the permissions of /Applications, but of your Caskroom.
The group is irrelevant, just your user needs to be correct.

OK. Clear. I did checked the user, everything looks good:
$ whoami
mat

$ ls -la /usr/local/Caskroom/
total 0
drwxr-xr-x   9 mat  admin  306 26 Apr 21:10 .
drwxr-xr-x@ 29 mat  admin  986 17 Jun 12:32 ..
...
drwxr-xr-x   4 mat  admin  136 19 Jun 19:50 bitcoin-core
...
```

```
$ brew cask install bitcoin-core
==> Downloading https://bitcoin.org/bin/bitcoin-core-0.12.1/bitcoin-0.12.1-osx.dmg
Already downloaded: /Users/mat/Library/Caches/Homebrew/bitcoin-core-0.12.1.dmg
==> Verifying checksum for Cask bitcoin-core
==> Moving App 'Bitcoin-Qt.app' to '/Applications/Bitcoin Core.app'
Error: Permission denied - (/usr/local/Caskroom/bitcoin-core/0.12.1/Bitcoin-Qt.app, /Applications/Bitcoin Core.app)
```

Try to install with --force.

Same result. Output:
$ brew cask install --force bitcoin-core
==> Downloading https://bitcoin.org/bin/bitcoin-core-0.12.1/bitcoin-0.12.1-osx.dmg
Already downloaded: /Users/mat/Library/Caches/Homebrew/bitcoin-core-0.12.1.dmg
==> Verifying checksum for Cask bitcoin-core
==> Moving App 'Bitcoin-Qt.app' to '/Applications/Bitcoin Core.app'
Error: Permission denied - (/usr/local/Caskroom/bitcoin-core/0.12.1/Bitcoin-Qt.app, /Applications/Bitcoin Core.app)

@mathiashro
show me the output of this commands
ll /usr/local/Caskroom/ #need only a part of the output
groups
ll /Applications # need only a part of the output

See also above.

(Removed the real app names.)

So in this case, the issue is with Bitcoin Core itself. See https://github.com/caskroom/homebrew-cask/pull/22248.

@mathiashro sorry. i have no idea.
go to link by @vitorgalvao

What if the current user is not in admin group?

@cybertk Install to another directory, then: https://github.com/caskroom/homebrew-cask/issues/22335#issuecomment-228004961.

The suggestions to change the ownership/permissions of /Application/ are absolutely terrible. This is not a solution. Apple set up these permissions for a reason. My user isn't in the admin group for a reason.

My caskroom is in /Users/robindegen/Scripts/brew/Caskroom/, and is (since it's in my home folder) owned by my user. I still get the the same error.
==> Moving App 'kdiff3.app' to '/Applications/kdiff3.app'
Error: Permission denied - (/Users/robindegen/Scripts/brew/Caskroom/kdiff3/0.9.98/kdiff3.app, /Applications/kdiff3.app)

@robindegen Trouble is where it’s installing to, not from.

I was getting this:
$ brew cask reinstall xquartz
==> Migrating Caskroom from /opt/homebrew-cask/Caskroom to /usr/local/Caskroom.
Error: Permission denied - (/opt/homebrew-cask/Caskroom, /usr/local/Caskroom)
Follow the instructions here:
  https://github.com/caskroom/homebrew-cask#reporting-bugs
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:519:in `rename'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:519:in `block in mv'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1558:in `block in fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1574:in `fu_each_src_dest0'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1556:in `fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:508:in `mv'
/usr/local/Homebrew/Library/Homebrew/compat/hbc/caskroom.rb:15:in `migrate_legacy_caskroom'
/usr/local/Homebrew/Library/Homebrew/compat/hbc.rb:15:in `init'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:167:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:132:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'

and the fix was to
mkdir /usr/local/Caskroom

fix my issue with this command sudo chown -R $(whoami):staff /usr/local/Caskroom


Fails to parse Hashes as keys for Hashes

This fails to parse:
x = {{:a => 4, :b => 5} => [1, 2], {:a => 9, :b => 2} => [6, 5]}

But this works: (notice the extra space)
x = { {:a => 4, :b => 5} => [1, 2], {:a => 9, :b => 2} => [6, 5]}

This certainly conflict with {{ (beginning of a macro.

@MaloJaffre Didn't notice that, thanks. I believe this is not fixable then (without backtracking on the parser, which can get slow)

Yes not sure we want to allow it, I'll let Ary decide.

Yes, this is correct behaviour, and the formatter even has a check to output that space.

To elaborate why it's not worth the complexity: You shouldn't use hashes, or generally mutable or likely to mutate datastructures as hash keys anyway. Chances are you're not going to look up your values by these keys, so for example a Array({K, V}) or Array(Array(K|V)) would be more correct and efficient anyway.


Update OozieClientException.java

Fixed a spelling mistake in file OozieClientException.java

Hi, thanks for your interest in contributing to Apache Oozie. We don't do PR for Apache Oozie.  Have a look at other jiras for oozie such as https://issues.apache.org/jira/browse/OOZIE-2457. Also you can look fo jiras having label "newbie" that would be good point to start contributing. https://issues.apache.org/jira/browse/OOZIE-2824?jql=project %3D oozie and labels %3D newbie


Mermaid-Block not shown within Tabs

Describe the bug
When using mermaid diagrams inside tabs, only the initially shown tab renders the mermaid diagram, on the other tabs, the diagram is not shown. The result is the same for the compiled page and for the page running with the dev-server.
To Reproduce
Insert the following code to a mdx page in docusaurus (V2.1.0):

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="tab-a">

The following mermaid diagram is shown:

```mermaid
graph LR
  a ---> c(10)
  b ---> c(10)
```

</TabItem>

<TabItem value="tab-b">

This mermaid diagram is not displayed:

```mermaid
graph LR
  d ---> z(42)
  e ---> z(42)
```

</TabItem>
</Tabs>

Expected behavior
Mermaid diagrams are rendered correctly on each tab
Screenshots

Tool chain used:

docusaurus v2.1.0
mermaid v9.1.6
mdx-mermaid v1.3.2

official docusaurus mermaid support is coming in https://github.com/facebook/docusaurus/pull/7490
Your mermaid in tabs case should work, see https://deploy-preview-7490--docusaurus-2.netlify.app/tests/pages/diagrams#mermaid-in-tabs

Cool 🥳 Thanks!


[call_tf] Some cleanup of call_tf implementation

The main cleanup is around _code_generator_and_avals, which in an earlier version of the code was used for both abstract values and for code generation. That is why it was cached, and why it returned a code generator and abstract values. A while ago we did a first round of cleaning to not use it for abstract values. Now we can actually eliminate the function and inline it directly.
A second improvement is to add the explicit error message from TF commpilation, instead of just the generic message that call_tf cannot be used with non-compileable functions.

@maxwillzq @rxsang PTAL


[feature] Upgrade tone mapping function

Is your feature request related to a problem? Please describe.
The existing tone mapping implementation has two issues:

Looking at other post processing stacks it appears that simply gamma correcting the linear output with 2.2 is not correct, so making the user convert linear to sRGB isn't viable
Without the user implementing a full exposure system themselves (or using an extension), the tone mapping function is effectively useless for good quality renders

Describe the solution you'd like
When researching post processing stacks for VisCam I decided to validate the implementation of converting the linear HDR rendered image to LDR, revisiting the repository I got the ACES tone mapping fit from: https://github.com/TheRealMJP/BakingLab/blob/master/BakingLab/ToneMapping.hlsl#L105
As you can see the ACES fit output is converted to sRGB using the full function which the tone mapper should also do
As for exposure, the function should have a boolean input, defaulting to true, that toggles full image luminance auto exposure. This means anyone can get good renders without needing to implement their own exposure function
Additional context
True sRGB vs gamma 2.2: https://www.shadertoy.com/view/7sjBWD

Should probably default auto exposure to false to avoid breaking existing renderers


Some systems failed to build for Quicklisp dist

Building with SBCL 2.3.6 / ASDF 3.3.5 for quicklisp dist creation.
Trying to build commit id 74fbfa8f76710ff5d83dcc4a520a9481ba425d1b
data-frame fails to build with the following error:
; caught ERROR:
;   READ error during COMPILE-FILE: Symbol "MAP-ARRAY" not found in the ARRAY-OPERATIONS/ALL package. Line: 28, Column: 19, File-Position: 830 Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/quicklisp/quicklisp-controller/dist/build-cache/data-frame/e068a24f92b8e1cec7a5d2064866edf60b6aef11/data-frame-20230722-git/src/missing.lisp" {1013538ED3}>
...
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD tid=1026045 "main thread" RUNNING {1001770003}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "data-frame" "missing">

data-frame/tests fails to build because of a failure in  data-frame.
Full log here

Have you got the latest array-operations?

I'm using the latest release, as requested, which is 1.0.0 from June of
last year.
On Sat, Jul 22, 2023 at 8:38 AM Steve Nunez @.***>
wrote:

Have you got the latest array-operations?
—
Reply to this email directly, view it on GitHub
https://github.com/Lisp-Stat/data-frame/issues/22#issuecomment-1646575445,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACPNLLAHLQNFFZD2PNAORDXRPCUXANCNFSM6AAAAAA2TZXGQQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Opps. I forgot that system uses releases.  I've just created one and it should work now.


Combining functions will crash application without any exception

Issue Title
Combining functions will crash the application without any error. Even surrounding with try-catch will not help.
General
In an application, I have the ability to specify filters for data being processed. It is working fine when I have just one filter, but when there are multiple filters combined with || operator, the application (asp.net core 3.1) just stop debugging without any exceptions thrown.
Example test that will not pass, not fail just crash:
[Fact]
public void ShouldFilterWithFilterGroup()
{
    // Arrange
    var filters = new List<Func<object, bool>>();
    filters.Add(x => true);
    filters.Add(x => true);

    Func<object, bool> filterFunction = null;
    foreach (var item in filters)
    {
        if (filterFunction == null)
        {
            filterFunction = x => item(x);
        }
        else
        {
            filterFunction = x => filterFunction(x) || item(x);
        }
    }

    // Act
    var filterResult = filterFunction(null); // Test just stops here with no errors

    // Assert
    Assert.True(filterResult);
}

When I run your code, I get Stack overflow.. I think this line isn't doing what you think:
filterFunction = x => filterFunction(x) || item(x);

The lambda captures the variable filterFunction, not its value, so the result recurses infinitely. Changing it to this fixes it for me:
var oldFilterFunction = filterFunction;
filterFunction = x => oldFilterFunction(x) || item(x);

Looks like @dagood figured it out; closing the issue.


Possible parameter error in time series Transformer model example

The the example for time series classification with transformer, the the function build_model() is defined as:
def build_model(
    input_shape,
    head_size,
    num_heads,
    ff_dim,
    num_transformer_blocks,
    mlp_units,
    dropout=0,
    mlp_dropout=0,
):
    inputs = keras.Input(shape=input_shape)
    x = inputs
    for _ in range(num_transformer_blocks):
        x = transformer_encoder(x, head_size, num_heads, ff_dim, dropout)

    x = layers.GlobalAveragePooling1D(data_format="channels_first")(x) #<- This line appears to be wrong.
    for dim in mlp_units:
        x = layers.Dense(dim, activation="relu")(x)
        x = layers.Dropout(mlp_dropout)(x)
    outputs = layers.Dense(n_classes, activation="softmax")(x)
    return keras.Model(inputs, outputs)

The pooling layer is initialised as x = layers.GlobalAveragePooling1D(data_format="channels_first")(x). Isn't the data format however channels_last?

Hi @stallam-unb ,
The tutorial time series classification with transformer used FordA dataset which as per my understanding is actually time series data collected in 500 timestamps for one feature (i.e Noise). So the dataset which is initially of shape (x,500) converted into (x,500,1) and theoritically it should be of form (batch_size, steps, features).
Even in the Tutorial page under model summary it is mentioned like below.

Our model processes a tensor of shape (batch size, sequence length, features), where sequence length is the number of time steps and features is each input timeseries.

But as per documentation of GlobalAveragePooling1D, data_format="channels_first" means the data should be of shape (batch_size, features, steps)
As per the data we are passing it should be data_format="channels_last.
I may raise a PR for same.


Adding feature Dissimilarity.

This is just a new feature being added to support the parity with scikit image. This PR just implements a simple feature called Dissimilarity. Its equation was added into the documents also.

@Eve-ning sorry to bother you again. Is there any section explaining how can I test it locally before submitting a PR?

A v2 was sent to change Enum to IntEnum.

The PR generally looks fine, I'll take a closer look in a few

@Eve-ning sorry to bother you again. Is there any section explaining how can I test it locally before submitting a PR?
Running the integration tests should be fine.
Since you've added dissimilarity, there 2 tests needed

Checking consistency between CuPy & Pure Python

Implementing (dissimilarity) it in pure Python
Implementing (dissimilarity) it in CuPy
Testing if they are consistent across random inputs

Checking consistency across runs

If 1) passes, then export the current result as a pickle .pkl
Check if the result changes across runs, it shouldn't (too much)

not sure if there's a more robust way to do this

Btw, we should also enable tests for PRs hehe
not sure if there's another way to integrate testing since the environment depends on cupy

If there is not, we should include some Contribution Guidelines into the README.md
initially didn't expect this project to get traction, I'll add a contribution guideline some time

@jcfaracco I've added 2 MRs on your fork, should be good to go after you've checked & merged them.

will be away till the 22-23, will do one last check and this should be good to go

@Eve-ning don't worry. 😃

Note: Minor afterfix to the NumPy array as it was cached with the unnormalized Dissimilarity Feature


Invalid default value for value types

 Issue by maheeka
Monday Dec 04, 2017 at 11:58 GMT
Originally opened as https://github.com/ballerina-lang/composer/issues/4785

Description:
String has default value as {} in function invocations.

Affected Product Version: 0.95.3
OS, DB, other environment details and versions:    N/A
Steps to reproduce:
Drag and drop a function which has strings as parameters

 Comment by maheeka
Tuesday Dec 05, 2017 at 12:48 GMT

This has impacted, endpoint declaration, action invocation as well.

Implementation differed


Add pricegun sound

About the PR
Fixes #33473
Adds a sound that plays when the Appraisal Tool successfully appraises an entity.
Why / Balance
Previously, the Appraisal Tool had no sound, this improves feedback of the tool with audio.
Technical details
added SoundPathSpecifier to "Machines/chime.ogg" to PriceGunComponent class
added PlayPredicted to SharedPriceGunSystems class in the OnAfterIntereact method.
Media
https://github.com/user-attachments/assets/b1154ee6-4c74-4c71-a8dc-30d7c3676cae
Requirements

[X] I have read and am following the Pull Request and Changelog Guidelines
[X] I have added media to this PR or it does not require an ingame showcase.

Breaking changes
None
Changelog
add: Added appraisal tool sound

Also your changelog is formatted wrong. Please have a look at the PR guidelines to see how to do it correctly, so that the bot can add it to the in-game changelog.

Fun idea!


Override Retry configuration for Unit Tests

We have a Reconciler implementing ErrorStatusHandler. It uses DefaultRetryConfiguration by default.
We have a Unit Test for this Reconciler annotated to run within Quarkus's Open Shift Test Server. @QuarkusTest @WithOpenShiftTestServer. The Unit Test invokes the Reconciler by creating a suitable resource that the Reconciler handles: kubernetesClient.resources(X.class).createOrReplace(expected).
We'd like to test the ErrorStatusHandler side of things by making our Reconciler throw an exception and let the retry mechanism enter our ErrorStatusHandler. We can then make assertions based on the operation of the ErrorStatusHandler logic.
It is not possible to override DefaultRetryConfiguration retry configuration just for the test.
The jist of the code is:
Reconciler
@Inject
MyService service;

@Override
public UpdateControl<X> reconcile(X x, Context context) {
  service.doSomething();
}

@Override
public Optional<X> updateErrorStatus(X x, RetryInfo retryInfo, RuntimeException e) {
  if (retryInfo.isLastAttempt()) {
    service.error();
  }
}

Test
@QuarkusTest
@WithOpenShiftTestServer
public class XTest {

@Inject
KubernetesClient client;

@InjectMock
MyService service;

@Test
public void test() {
  when(service.doSomething()).thenThrow(new NullPointerException());

  client.resources(X.class).createOrReplace(expected);

  // wait a bit

  verify(service).error();

}

We'd like to override the retry so that the Reconciler can effectively fail fast.

Hello,
you should be able to deactivate retry and so immediately it the last attempt when an error occured in the properties.
%test.quarkus.operator-sdk.controllers."`yourreconciler".retry.max-attempts=0
````

Hi @scrocquesel that sort of works....
ReconciliationDispatcher.handleErrorStatusHandler(...) is returning a RetryInfo with:
@Override
public boolean isLastAttempt() {
  return controller.getConfiguration().getRetryConfiguration() == null;
}

controller.getConfiguration().getRetryConfiguration() is returning PlainRetryConfiguration with max=0 (from application.properties). However since the call in isLastAttempt()checks if the retry configuration isnulland not that thecount==maxthe check for the last attempt is failing. Is the check only fornullcorrect or should it also be checkingcount==max? I don't know _how_ this mechanism works.. it might well be that after the penultimate attempt the retry info is meant to be set to null` somewhere.

See here although we're stuck on 2.1.3 due to the version of quarkus-operator-sdk we use.
[INFO] +- io.quarkiverse.operatorsdk:quarkus-operator-sdk:jar:3.0.6:compile
[INFO] |  +- io.quarkiverse.operatorsdk:quarkus-operator-sdk-common:jar:3.0.6:compile
[INFO] |  |  +- org.jboss:jandex:jar:2.4.2.Final:compile
[INFO] |  |  \- org.jboss.logging:jboss-logging:jar:3.4.3.Final:compile
[INFO] |  +- io.quarkus:quarkus-arc:jar:2.7.5.Final:compile
[INFO] |  |  \- org.eclipse.microprofile.context-propagation:microprofile-context-propagation-api:jar:1.2:compile
[INFO] |  +- io.javaoperatorsdk:operator-framework-core:jar:2.1.3:compile

Did test with max-attempts=1, and it works but you will got two attempts.

it might well be that after the penultimate attempt the retry info is meant to be set to null somewhere.

Actually, it's the contrary, the retry info is set on the context (and cached for subsequent attempt) after the first try. So the first attempt seems always to be attemptCount = 0, lastAttempt = false.
@csviri , I guess it's a bug. I can't find unit test in JOSDK with max attempt set to zero and testing for last attempt in error handler to confirm the expected behavior.

Thank-you @scrocquesel.
I can confirm that works and the general mechanism to override controller configuration seems to solve my issue.
Closing.


Request not count availability

Circle not count Uptime but only showing 100% Downtime.

I imported availability_dashboard.json file
This requset not working:
SELECT count("response_string_match") FROM "autogen"."http_response" WHERE ("host" =~ /^$server$/ AND "server" =~ /$url/ AND "result" = 'success') AND $timeFilter GROUP BY time($__interval)

Output of apache page shoud looks like: "status": "OK"
It is solution


Introducing Repositories, Images and Tags

Introduce the Repositories, Images and Tags entities:

A repository has many images.
An image belongs to a repository.
An image has many tags.

The database data is populated by parsing the 'push' events sent by the
registry.

@flavio I would say that everything you didn't created intentionally - should be dropped. As that is just scaffolding noise, which gives zero benefit

I'll take care of that.

Other than those small notes - looks good

great job!

Ok, all the tests are passing now. I fixed all the issues you pointed out.
If you are fine with it I would like to do an interactive rebase inside of this branch, squash all the commits into a single one and then merge that single commit back into master.


Adds sound effect to burning yourself on a light fixture

Closes #682
Closes #597
Additional notifications methods for player damage are still needed - it is still not obvious that you are taking damage.

Maybe find a different sound?
This one has an impact kick at the beginning of it which doesn't make much sense

Yeah this is a sound for a laser impact, which is definitely neat (we could use it for the laser gun) it's not exactly fitting.

Added a second sound that is more of a hiss, and is played instead on a burn. Not perfect, but I can't find anything better at the moment.

Already have the welder sound at /Resources/Audio/items/welder.ogg

Will get to this another time

You might just be able to crop the sear sound to cut out the initial laser hit. Seems like it'd sound great.