Upgrade k8s-openapi to 0.19.0 for v1_27 support

Runs cargo upgrade -p k8s-openapi and just bump-k8s.

Plan on releasing current main with this as 0.85 tomorrow.


Make function modules public, add Default impl's.

Which issue does this PR close?

Closes #10164
Rationale for this change
Code consistency.
What changes are included in this PR?
Code updates.
Are these changes tested?
Yes.
Are there any user-facing changes?
Functions are now accessible.

Thank you @Omega359 🙏


Dealing with custom JJTree AST classes

This plugin generates all classes for JJTree.
It is desirable to let developers write custom AST classes for some JJTree elements.
This plugin should detect and remove generated duplicates, which is the behaviour of the JavaCC Maven plugin.
Otherwise the generated classes and custom classes are in conflict at compilation time, resulting in duplicate class errors.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8829407-dealing-with-custom-jjtree-ast-classes?utm_campaign=plugin&utm_content=tracker%2F716012&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F716012&utm_medium=issues&utm_source=github).

Any update on this issue?

Sorry, I am working on this project on my spare time. With the Easter holiday coming, I should be able to release a new version fixing this issue. I had a look at the maven plugin and will provide similar functionality.
Please feel free to provide an example on your setup. My initial plan is to have the custom AST classes sit right where they should be in the sourceSet and to avoid generating matching classes in compileJavacc task.
Regards,
John

On Apr 2, 2015, at 06:02, Julien Ponge<EMAIL_ADDRESS>wrote:
Any update on this issue?
—
Reply to this email directly or view it on GitHub https://github.com/johnmartel/javaccPlugin/issues/13#issuecomment-88854752.

No worries :-)
We have a setup like that in golo-lang/golo-lang if you want to have a look, where some of the classes are overridden by us.

I solved this problem by adding
// Copying our node classes prevents JJTree from generating its own implementations
// of these classes.
// It seems that javaccPlugin 2.1.1 will address this issue.
task(copyJjtree, type: Copy) {
from compileJjtree.inputDirectory
into compileJjtree.outputDirectory
include '**/*.java'
}
compileJjtree.dependsOn copyJjtree
to 'build.gradle' as a workaround until it is sovled in 'javaccPlugin'.
Regards,
Peter

Still no fix in sight?

Fix is coming in slowly, custom AST classes are now supported when they live directly with the JavaCC source code. I'm working on supporting them in the Java sourcesets as well.

Thanks @johnmartel for fixing it. I will shortly try it on eclipse/golo-lang


Readable includes hup, but writable doesn't

I've spent quite a while looking at this code and trying to understand it, but I'm failing. poll_read checks the bits included in read_ready, which includes hup. poll_write, however, doesn't include hup-- it just checks the writable signal. Why is this? IMO it's weird that poll_read is ready on hup, but I understand the idea is to push users to attempt a read and then read the remaining data before discovering that the FD is closed. Additionally, since mio makes no guarantees about sending incorrect signals, you can't guarantee that seeing a hup means that the FD is closed. However, I'd expect the same things to apply to writing (not just reading). What was the logic here?

My own personal understanding of the hup signal is that it sort of happens sometimes only on Unix. IIRC The "sometimes" is that not all types of fds (files, sockets, pipes, etc) will generate a hup signal. I then am only aware of hup translating to "the remote end has hung up, there is no more data to read". That, I believe, is basically a signal for EOF (read returning 0)
I'm unaware of how hup signals might affect write readiness. (or more notably the write function). the general idea here was that if you're blocked on waiting for an object to become readable then it's our responsibility to forward that information to you, and it's not just "has read readiness" apparently but soemtimes this includes "hup readiness" to unblocked the reading task.

The issue I have is that you almost never only want to be awoken only on a read signal or a write signal-- in every case I can imagine, you'd always want to be awoken if the thing you were waiting to read from or write to has closed so that you can perform some garbage collection, issue an error, etc.

Is there a situation where something blocks today when it should wake up? If so that's probably just a bug that needs to be fixed?

Well, in order for Fuchsia to get notifications of closed signals I've had this section patched in our tree for a while to return CLOSED signals from the hup function. However, this means that poll_read returns Ready(()) when the channel is closed, not just when it is readable. Additionally, need_read unsets the CLOSED bit, but need_write doesn't. The fix in order to get the signals working is to use poll_ready manully and be aware of all of these different rules. It's not insurmountable by any means, but it does seem like there's a good deal of extra logic going on here that I don't understand the motivation for. My primary goal with this issue is to understand why "read" and "write" are asymmetric.

Hm ok so today the only reason read/write are asymmetric are so that you can split and then use the two halves as you would normally otherwise do. Handling of hup/closed/etc are then just enabling those use cases

Sorry, I don't follow why split makes it so that you only want poll_read to see the closed signal, but not poll_write. Can you explain more? BTW, I'm happy to close this issue and switch to IRC if there's good motivation here I'm just not understanding. I will say, though, that as someone trying to use the tokio-core API to build their own futures types, this inconsistency has caused confusion and led me to make mistakes.

Er sorry I think this is all being read into a little too much. We have a split function and we have general I/O objects and the goal is to make them "just work". That is, when you Read and get WouldBlock (or write) it's tokio's job to wake you up when you're otherwise ready to go. Everything after that is just an implementation detail. On Unix it just so happens (I believe) that hup wakes up readers and not writers. If that's not true for Fuchsia though then it's fine to tweak.

Right, I'm asking why a hup makes poll_read return Async::Ready-- why does poll_read check for readable | hup, rather than readable? The answer that I concluded from reading usages of poll_read is that it's used to signal when a socket it closed. Is that not correct? If it is correct, why does that signal not also result in poll_write returning Async::Ready?

TL; DR: why do this and this not match?

This may be a case where it's good to play around? You can try removing hup from the readable bit and I believe a test should fail.


Fixing missing tap=true & title/body in foreground

This PR brings the following changes:

tap=true is added when notification are tapped by user in 2 cases:

resuming a background app
cold starting the app

notification callback is not done anymore when resuming an app (previously even without tapped notification, the callback was called)
Notification title & body are added to the data passed to the javascript call back when notification is received in foreground. Those fields are put as: data.title & data.body

Tested and it works!
Thanks

Just wanted to add that prior to using your code, onNotificationOpen was not being called when tapping a notification while the app is closed (cold) on Android. Your changes seem to have fixed it.

@hassanthegooner Thanks for the feedback
Unfortunately this repo don't seem to be active at all and I have little hope that the PR will be merged any time soon.

@jfougere can you fix the readme? most of its contents has been removed in the pr

@robertarnesson done. Sorry for that.

Would be nice if you could merge this, I also need the values in my app

Hello, is the "tap=true" attribute working right now ?
I've installed the plugin and I can't see this attribute in my incoming payload.
Thank you !


add missing include for std::shared_ptr

Description
Building on Arch with GCC 11.2.0 resulted in a couple of :
In file included from odri_control_interface/src/joint_modules.cpp:12:
odri_control_interface/include/odri_control_interface/joint_modules.hpp:31:10: error: 'shared_ptr' in namespace 'std' does not name a template type
   31 |     std::shared_ptr<MasterBoardInterface> robot_if_;
      |          ^~~~~~~~~~
odri_control_interface/include/odri_control_interface/joint_modules.hpp:22:1: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
   21 | #include <odri_control_interface/common.hpp>
  +++ |+#include <memory>
   22 |

How I Tested
Compiled successfully
I fulfilled the following requirements

[x] All new code is formatted according to our style guide (for C++ run clang-format, for Python, run flake8 and fix all warnings).
[x] All new functions/classes are documented and existing documentation is updated according to changes.
[x] No commented code from testing/debugging is kept (unless there is a good reason to keep it).

Thanks for your contribution @nim65s !


Windowslogoff not found

Hey,
I've implemented this branch on multiple projects and it works all the time.
But, in one of my customers, after inserting the domain account it gives an error about not finding Windowslogoff.
It's problably a Windows/IIS feature, but I can't simulate it on my DEV machine.
Any ideas? How may i be able do discover what's causing it?

Hi,
It's hard to tell without details, Can you provide a stack trace or some debug info ?

I will be at a conference call with them at in 1h30. If i don't find anything i will give you the stacktrace, can't do it now because I don't have it.
Thank you for your time, in 3-4h I'll give you feedback and if I find the problem I'll post the solution here.

Oh, i forgot to say that "Windowslogoff" is called It's on WindowsLoginHandler line 45.
But in my Account controller, there is only one action to logoff an it's a Post. Could it be the problem? Since it doesn't specify Get or Post i assume that Get is the default.

Most probably, you can't call a Post action using Get.

But I didn't change that part of the code from that file?

I'm lost now, you have made no changes to account controller nor to windows login handler and you get an error about not finding Windowslogoff ?

Yes. WindowsLoginHandler and MixedAuthExtensions are exactly the same as mine.
AccountController have some differences, but my WindowsLogOff action is the same.
In this branch's Account controller WindowsLogOff is marked as Post and so do mine.

It's hard to guess without detailed error information. What's the exact error message you are getting ?
Is it unknonw action value 'WindowsLogoff' ?

WindowsLogoff not found in Windows Controller.

I think it's better to wait till you get detailed info about this :)

Hey, i resolved it.
Webconfig changed:
<authentication mode="Windows" />
to
<authentication mode="None" />
they changed it by themselves...
However, it doesn't explain the error about not finding the action and they didn't send me the stacktrace...

Thank you for this awesome handler!
Sorry about all the confusion.

Thanks for the feedback! May be simulate it on your DEV machine and find out if you get the same behavior :)

With mode="Windows", context.User.Identity.IsAuthenticated is always true.

Did you get the same error ?

Yes.

A public action method 'WindowsLogOff' was not found on controller '.Controllers.AccountController'.

 at System.Web.Mvc.Controller.HandleUnknownAction(String actionName)
  at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
  at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
  at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
  at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
  at System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag)
  at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
  at System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller)
  at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
  at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
  at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
  at System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag)
  at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
  at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
  at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
  at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
  at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
  at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
  at System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag)
  at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
  at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
  at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
  at MixedAuth.WindowsLoginHandler.<ExecuteController>d__10.MoveNext() in c:\<...>\Infrastructure\WindowsLogin\WindowsLoginHandler.cs:line 120
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
  at MixedAuth.WindowsLoginHandler.<WinLogoffAsync>d__c.MoveNext() in c:\<...>\Infrastructure\WindowsLogin\WindowsLoginHandler.cs:line 105
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
  at MixedAuth.WindowsLoginHandler.<ProcessRequestAsync>d__0.MoveNext() in c:\<...>\Infrastructure\WindowsLogin\WindowsLoginHandler.cs:line 43
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)
  at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Thanks, very much appreciated.


Program do not proceed.

I have cloned the project installed the required dependencies.
I'm using python 3.12 and PyCharm
After i run these scripts: any of the below ones.
python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --face_enhance
python inference_realesrgan.py -n RealESRGAN_x4plus -i test6.jpeg --face_enhance
I get few warnings and then my program is stuck
C:\Users\Talha\PycharmProjects\Real-ESRGAN\realesrgan\utils.py:63: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
loadnet = torch.load(model_path, map_location=torch.device('cpu'))
C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\torchvision\models_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=None.
warnings.warn(msg)
C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\facexlib\detection_init_.py:22: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle
module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a futu
re release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they a
re explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
load_net = torch.load(model_path, map_location=lambda storage, loc: storage)
C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\facexlib\parsing_init_.py:20: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle mo
dule implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future
release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are
explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
load_net = torch.load(model_path, map_location=lambda storage, loc: storage)
C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\gfpgan\utils.py:92: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicit
ly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the
default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly a
llowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
loadnet = torch.load(model_path)
Testing 0 00003
So the above line Testing 0 0003 or if i provide my own image it is Testing 0 test6 and then its stuck there and do not do anything i had waited around 45 minutes

我也遇到同样的问题，请问解决了吗

我也遇到同样的问题，请问解决了吗

So, by the end of 2024 there is still no answer? I faced the same issue...


Not setting history option in initial config leads to confusing error

What problem does this feature solve?
I'm trying to build my first Vue 3 project, and i'd like to include the new router as well. One thing i noticed is that you get an error that's a bit confusing when not providing the history option in the initial configuration, e.g.:
const router = createRouter({
    routes : [{
        path : '/',
        component : ScreenHome
    }]
});

Leads to an error:
Uncaught TypeError: Cannot read property 'location' of undefined
In the console. When i added the createWebHashHistory option everything worked fine.
I know this is mentioned in the docs, but it's easy to miss, and coming from the Vue2 router (where history is set to hash by default) i think this will probably trip up many people trying to convert existing projects or starting new ones.
What does the proposed API look like?
I think there would be three possible solutions:

Set a default history mode (like in v3)
Make the history option required
Provide an error message that's clearer ('Please provide a history option')

I would be really happy with either 1) or 2), but at least a better error message would be very helpful.

I think a dev only error makes sense for this (option 3)

Looks nice, thanks @posva and @cheng-github!


Missing (or difficult-to-find) documentation for eq, gt, etc.

Diesel provides lots of DSL sugar, and from the examples I can figure out how to do things like:
users.filter(created.gt(/* ... */))

However, I can't find a list of eq, gt, etc., in the documentation, so I don't know what predicates are supported. For example, there's probably a way to write a "non-null" predicate, but I can't find it in the documentation. Maybe it does exist, but if so, some indexing may be required...

http://docs.diesel.rs/diesel/expression/expression_methods/global_expression_methods/trait.ExpressionMethods.html#method.eq
The docs have a search function, that method is the first result when searching for eq. The method for IS NOT NULL is called is_not_null, and is documented here (again, found by typing is_not_null into the search bar)

It's true that is_not_null is documented, but to find that documentation I need to know either:

that it's called is_not_null (which is the thing I wanted to learn) or
that the list of such expressions are documented in diesel::expression::expression_methods::global_expression_methods::ExpressionMethods.

My suggestion is that something between the high-level http://diesel.rs/guides/getting-started and the low-level API docs could be helpful for people trying to learn Diesel. Something like "here's how these SQL clauses translate into Diesel expressions" would be great.

Yes, writing a guide on this is the second one on the list that I give for people who reach out to help with the docs.


ReferencePool serialization exception

Hi,
My copycat is version 0.6.SNAPSHOT
Trying to start 2 servers on the same machine from 2 different directories and 2 different ports using these commands
server1
c:\JDK64\<IP_ADDRESS>\bin\java -jar copycat-server.jar 1:my_local_host:8080 2:my_local_host:8090
server2
c:\JDK64\<IP_ADDRESS>\bin\java -jar copycat-server.jar 1:my_local_host:8090 2:my_local_host:8080
Got this exception
15/08/31 09:23:24 ERROR concurrent.SingleThreadContext: An uncaught exception occurred
net.kuujo.copycat.io.serializer.SerializationException: failed to serialize Java object
at net.kuujo.copycat.io.serializer.Serializer.writeSerializable(Serializer.java:625)
at net.kuujo.copycat.io.serializer.Serializer.writeObject(Serializer.java:549)
at net.kuujo.copycat.io.transport.NettyConnection.writeRequest(NettyConnection.java:214)
at net.kuujo.copycat.io.transport.NettyConnection.lambda$send$6(NettyConnection.java:288)
at net.kuujo.copycat.io.transport.NettyConnection$$Lambda$42/1838865044.run(Unknown Source)
at net.kuujo.copycat.util.concurrent.SingleThreadContext$1.lambda$execute$9(SingleThreadContext.java:28)
at net.kuujo.copycat.util.concurrent.SingleThreadContext$1$$Lambda$6/1018547642.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.NotSerializableException: net.kuujo.copycat.util.ReferencePool
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at net.kuujo.copycat.io.serializer.Serializer.writeSerializable(Serializer.java:620)
... 13 more

Just got latest version from github. Exception still exists....

Update - had to make PollRequest implements Serializable. Exception is now gone but now servers cannot connect to each other.

BTW, had to apply serialization to JoinRequest as well as to Member. I think the issue is in Serializer class. It checks if class is  instance of Serializable but those classes were instance of CopycatSerializable. Not sure if it is my local problem and nobody is experiencing same issue.

Latest update - after I changed domain name to localhost everything worked. But the question regarding serialization of objects remains. Am I missing something or it is the bug?

You should not make any internal Copycat classes Serializable. Copycat's Serializer does fall back to Java serialization when it can't find a serializer for the object, but Java serialization is slow, particularly for something as low level as a Request and Response. To make those interfaces Serializable is to treat the symptom, not the cause.
Copycat's serialization layer is much faster as it does not do any reflection or require serialization of full class names. Instead, it writes a 2-byte class identifier and objects are serialized directly to a Buffer by the CopycatSerializable class itself or a TypeSerializer (see the serialization documentation in the README or the website).
All internal Copycat classes that are written to disk or sent over the wire implement CopycatSerializable which has a readObject and writeObject method (e.g. see https://github.com/kuujo/copycat/blob/master/server/src/main/java/net/kuujo/copycat/raft/protocol/request/PollRequest.java). The problem it seems you're having is that the serializer is not finding the registered classes. By default, serializable classes are registered via Java's ServiceLoader API (those request/response classes are registered at https://github.com/kuujo/copycat/blob/master/protocol/src/main/resources/META-INF/services/net.kuujo.copycat.io.serializer.CopycatSerializable and https://github.com/kuujo/copycat/blob/master/server/src/main/resources/META-INF/services/net.kuujo.copycat.io.serializer.CopycatSerializable). This allows the Serializer to map a serializable type id to a Class during deserialization.
The original stack trace you posted implies that the serializer for some reason thought the class was not CopycatSerializable. The likely case was that the service loader did not pick up the file(s) I linked above for some reason, or it could be a bug wherein the ServiceLoaderTypeResolver is never added to the Serializer, and since Request is not Serializable it failed (as it should have). Alternatively, there is some potential that if two serializable types use the same type id, one will override the other. I'll investigate this. Which artifacts were you using? I'm wondering if there is a serializable type id conflict that doesn't occur in tests because modules are tested separately.

On Aug 31, 2015, at 12:24 PM, mikkazan<EMAIL_ADDRESS>wrote:
Latest update - after I changed domain name to localhost everything worked. But the question regarding serialization of objects remains. Am I missing something or it is the bug?
—
Reply to this email directly or view it on GitHub.

I am using the latest version. I believe it's 1.0.0-SNAPSHOT.

Some miracle happened. I reverted back my changes, moved jar files into directories  under my user and serialization error went away. Before the directories were under c: drive.
But test to read value form copycat is constantly failing although servers are up
@Test
public final void receiveMessageTest() throws InterruptedException, ExecutionException, UnknownHostException {
String key = "test-map";
Members members = Members.builder()
.addMember(new Member(1, "localhost", 8080))
.addMember(new Member(2, "localhost", 8090))
.build();
Copycat copycatClient = CopycatClient.builder(members)
.withTransport(new NettyTransport())
.build();
copycatClient.open().thenRun(() -> {
System.out.println("Client connected!");
});
    DistributedMap map = copycatClient.get(key, DistributedMap.class).get();
    System.out.println("Value in Server " + map.get("test-1-key"));

    if (copycatClient.isClosed()) {
        System.out.println("receiveMessageTest: Client is already closed ");
    } else {
        System.out.println("Closing client");
        copycatClient.close();
    }
}

java.util.concurrent.ExecutionException: java.lang.IllegalStateException: client not open
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1887)
at MessageTest.receiveMessageTest(MessageTest.java:67)
What am I doing wrong. Sorry I couldn't find proper docs how to read data.

Asynchronous programming is something that takes getting used to. You need to move your DistributedMap code inside the open() callback or block to wait for the client to connect.
If you put print statements in your code both inside of the open() callback and below the open() callback, you'll see that the code below the callback is run in the main thread before the code inside the callback is run on a Copycat thread. Basically, in asynchronous programming you cannot think of programs executing from top to bottom. Instead, programs execute from callback to callback.
http://stackoverflow.com/questions/16336367/what-is-the-difference-between-synchronous-and-asynchronous-programming-in-node
But for simplicity, you can force futures to block and therefore expect programs to execute from top to bottom. Just replace the open() callback with get() or join() instead of thenRun(...). This will force the thread to wait for the client to connect to the server before moving on to the next line of code.
You should definitely use the blocking get and join Future methods if you're not used to asynchronous programming. The reason for the asynchronous API is this:
When a client writes to the cluster, the client makes a request to the server to which it's connected, which makes a request to the leader, which logs the write to disk and then replicates it to a majority of the followers, then the leader responds to the server that forwarded the client's request, and finally the server responds to the client. When you block with get() or join() your thread is blocked while all that communication is taking place, and that can take a not insignificant amount of time. This may be acceptable for many applications, but for others, they have the option of using the asynchronous API. When using the asynchronous API, the user makes a call to a Copycat API and the program continues. This allows clients to submit many reads and writes concurrently, and Copycat will handle them in the order in which they were sent. So, a client can put 10 keys in the same map, and each of those changes will be handled concurrently by the Copycat cluster. One write may be on its way to the leader, while another may have already been logged and is in the process of being replicated. The asynchronous APIs maximizes throughout by allowing many concurrent operations from the same client.
In the case of your code, you're calling open() and registering an asynchronous callback to be called on another thread once the client has connected to the server and registered a new session. Then, since the calling thread is not blocked, the thread continues on to get the DistributedMap. But since the thread was not blocked and the Copycat.get call was not made inside the open() callback, the client is not yet open and therefore it throws an exception.
Add join() after copycatClient.open() - copycatClient.open().join(); - instead of thenRun(...) and you should be fine.

On Aug 31, 2015, at 2:56 PM, mikkazan<EMAIL_ADDRESS>wrote:
Some miracle happened. I reverted back my changes, moved jar files into directories under my user and serialization error went away. Before the directories were under c: drive.
But test to read value form copycat is constantly failing although servers are up
@Test
public final void receiveMessageTest() throws InterruptedException, ExecutionException, UnknownHostException {
String key = "test-map";
Members members = Members.builder()
.addMember(new Member(1, "localhost", 8080))
.addMember(new Member(2, "localhost", 8090))
.build();
Copycat copycatClient = CopycatClient.builder(members)
.withTransport(new NettyTransport())
.build();
copycatClient.open().thenRun(() -> {
System.out.println("Client connected!");
});
DistributedMap map = copycatClient.get(key, DistributedMap.class).get();
System.out.println("Value in Server " + map.get("test-1-key"));

if (copycatClient.isClosed()) {
    System.out.println("receiveMessageTest: Client is already closed ");
} else {
    System.out.println("Closing client");
    copycatClient.close();
}

}
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: client not open
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1887)
at MessageTest.receiveMessageTest(MessageTest.java:67)
What am I doing wrong. Sorry I couldn't find proper docs how to read data.
—
Reply to this email directly or view it on GitHub.

Thanks for the answer.
I did this
System.out.println("running sendMessageTest");
Members members = Members.builder()
.addMember(new Member(1, "localhost", 8080))
.addMember(new Member(2, "localhost", 8090))
.build();
Copycat copycatClient = CopycatClient.builder(members)
.withTransport(new NettyTransport())
.build();
String key = "test-map";
copycatClient.open().join();
Thread.sleep(1000);
But get this now
15/09/01 09:58:16 WARN session.ClientSession: Failed to connect to cluster
Could you give me the name of the tests which have message insertion and message retrieval? I had to disable test due to the fact that lots of them were failing while running the build.
Thanks,

Because the Transport is pluggable, all of the tests for the most part use LocalTransport to avoid having to create clients and servers for each test. Here are the DistributedMap tests:
https://github.com/kuujo/copycat/blob/master/collections/src/test/java/net/kuujo/copycat/collections/DistributedMapTest.java
You should be able to replace the LocalTransport in that test case with NettyTransport and see them work.
For network testing, the Jepsen tests use a cluster of 5 docker containers which use NettyTransport to communicate with one another:
https://github.com/jhalterman/copycat-jepsen
Jepsen tests cover a variety of failure scenarios including all manner of network partitions and server crashes.
BTW you don't have to call Thread.sleep(1000)... When you call copycatClient.open().join(), the join() is basically forcing the thread to block until the client is open.

On Sep 1, 2015, at 7:02 AM, mikkazan<EMAIL_ADDRESS>wrote:
Thanks for the answer.
I did this
System.out.println("running sendMessageTest");
Members members = Members.builder()
.addMember(new Member(1, "localhost", 8080))
.addMember(new Member(2, "localhost", 8090))
.build();
Copycat copycatClient = CopycatClient.builder(members)
.withTransport(new NettyTransport())
.build();
String key = "test-map";
copycatClient.open().join();
Thread.sleep(1000);
But get this now
15/09/01 09:58:16 WARN session.ClientSession: Failed to connect to cluster
Could you give me the name of the tests which have message insertion and message retrieval? I had to disable test due to the fact that lots of them were failing while running the build.
Thanks,
—
Reply to this email directly or view it on GitHub.

I'm sorry but I still struggle with it.
String host = null;
try {
host = InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException ex) {
Logger.getLogger(MessageTest.class.getName()).log(Level.SEVERE, null, ex);
}
Members members = Members.builder()
.addMember(new Member(1, host, 8080))
.addMember(new Member(2, host, 8090))
.build();
Copycat copycatClient = CopycatClient.builder(members)
.withTransport(new NettyTransport())
.build();
//        copycatClient.open().thenRun(() ->
//  I took this snippet from the README
copycatClient.create("/test-map", DistributedMap.class).thenAccept(map -> {
map.put("key", "value").thenRun(() -> {
map.get("key").thenAccept(value -> {
if (value.equals("value")) {
try {
// Set a key with a TTL
map.putIfAbsent("otherkey", "othervalue", Duration.ofSeconds(1)).get();
System.out.println("Finished operating with map");
} catch (InterruptedException | ExecutionException ex) {
Logger.getLogger(MessageTest.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
});
});
//);
But it is not even connecting to 2 copycat servers which I have running. Here is test log
running sendMessageTest
15/09/02 14:24:58 DEBUG logging.InternalLoggerFactory: Using SLF4J as the default logging framework
15/09/02 14:24:58 DEBUG channel.MultithreadEventLoopGroup: -Dio.netty.eventLoopThreads: 24
15/09/02 14:24:58 DEBUG internal.PlatformDependent0: java.nio.Buffer.address: available
15/09/02 14:24:58 DEBUG internal.PlatformDependent0: sun.misc.Unsafe.theUnsafe: available
15/09/02 14:24:58 DEBUG internal.PlatformDependent0: sun.misc.Unsafe.copyMemory: available
15/09/02 14:24:58 DEBUG internal.PlatformDependent0: java.nio.Bits.unaligned: true
15/09/02 14:24:58 DEBUG internal.PlatformDependent: Platform: Windows
15/09/02 14:24:58 DEBUG internal.PlatformDependent: Java version: 8
15/09/02 14:24:58 DEBUG internal.PlatformDependent: -Dio.netty.noUnsafe: false
15/09/02 14:24:58 DEBUG internal.PlatformDependent: sun.misc.Unsafe: available
15/09/02 14:24:58 DEBUG internal.PlatformDependent: -Dio.netty.noJavassist: false
15/09/02 14:24:58 DEBUG internal.PlatformDependent: Javassist: unavailable
15/09/02 14:24:58 DEBUG internal.PlatformDependent: You don't have Javassist in your class path or you don't have enough permission to load dynamically generated classes.  Please check the configuration for better performance.
15/09/02 14:24:58 DEBUG internal.PlatformDependent: -Dio.netty.tmpdir: C:\Users\MyUser\AppData\Local\Temp (java.io.tmpdir)
15/09/02 14:24:58 DEBUG internal.PlatformDependent: -Dio.netty.bitMode: 64 (sun.arch.data.model)
15/09/02 14:24:58 DEBUG internal.PlatformDependent: -Dio.netty.noPreferDirect: false
15/09/02 14:24:58 DEBUG nio.NioEventLoop: -Dio.netty.noKeySetOptimization: false
15/09/02 14:24:58 DEBUG nio.NioEventLoop: -Dio.netty.selectorAutoRebuildThreshold: 512
Tests run: 3, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 1.41 sec
Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 2
Notice that System.out.println didn't even print anything into the console. Sorry for bothering you that much but DistributedMapTest is using CopyCatReplica builder not CopycatClient and I am trying to make message submission and retreival working using CopycatC lient.

This conversation should be moved to the Google group (repost it there)

But to answer your question, if that is the full code in your test method, the test is completing before the client is ever connecting to the server. As I mentioned before, if you're not familiar with asynchronous programming, you should stick with the blocking get() and join() methods.
The main thread in your test is doing this:
copycatClient.create("/test-map", DistributedMap.class).thenAccept(...)

What his code says is, "create a DistributedMap and then call the Consumer registered in thenAccept." What it notably does not say is, block until the DustributedMap has been created. So, what is happening is this:
copycatCliebt.create...) is called in the main thread. Internally, Copycat queues the call on an internal copycat-* thread, and the main thread continues until it reaches the end of the test. So, your test is ending before the create(...) is ever sent to the cluster before you are making an asynchronous call rather than a synchronous call. As I mentioned, with asynchronous programming you cannot expect programs to execute from top to bottom. But the main thread will continue to execute from top to bottom, so if you put Thread.sleep(10000) at the bottom of your test or use blocking calls with all futures by calling get() or join() then your test will complete. Each time you use thebRun(...) or thenAccept(...) or whenComplete(...) you should assume that the code after the call will be executed before the code inside the callback. This is what makes it asynchronous. You are saying, "keep executing my program from top to bottom, and whenever the create(...) call finishes or the put(...) call finishes, call the callback created in thenAccept(...) or thenRun(...) on a different thread. Hence, you have to block the calling thread if you want to wait for those callbacks to run before your test finishes.

Look at this test: https://github.com/kuujo/copycat/blob/master/collections/src/test/java/net/kuujo/copycat/collections/DistributedMapTest.java
Everywhere where it says await(), it is saying "block the thread until the above callback has been called" and that's what you have to do (or just use get or join) if you want the things inside the callbacks to happen before the main thread reaches the end of the method

DistributedMap<String, String> map = copycatClient.create("test", DistributedMap.class).get();

map.put("foo", "bar").join();

assert map.get("foo").get().equals("bar");

Note that I called get() or join() on each call. This causes it to block and behave like the operation happens instantaneously (which it doesn't). This is what you should do if you don't need concurrency for a client (don't need many puts from a client being processed at the same time).


Ran gohack get github.com/user/somerepo and it is missing the .git directory

Hello.
Thought gohack was a great idea but my gohack'ed directory is missing .git. This makes it quite a bit less useful for hacking on things as I'd have to manually transfer the changes back to a version controlled directory.
Am I missing something in terms of usage? go 1.12.1 here, macOS.

Looks like a -vcs option was introduced but not mentioned in the README, submitted, https://github.com/rogpeppe/gohack/pull/47


Error: Signups forbidden [403]

when i created form register custom. any idea about this error?
thanks

its fixed when i was removed useraccounts:semantic-ui.

This is weird, did you see any bugs open on the github repository of the package?

Thanks for that. Can also approve something blocks meteor:
softwarerero:accounts-t9n  removed from your project
useraccounts:core          removed from your project
useraccounts:semantic-ui   removed from your project

useraccounts:semantic-ui: removed dependency

Did it also work after removing useraccounts:semantic-ui?

@matteodem I just removed useraccounts:semantic-ui - the above is the output of meteor remove useraccounts:semantic-ui - The easiest way to reproduce it is:

Install a clean meteor-boilerplate
orion reset
meteor add houston:admin
call http://localhost:3000/admin

okay, that's weird. I'll create a new ticket to investigate this issue.


AOT compiled Dart code fails running

Repro steps:

git clone https://github.com/dart-lang/dart_style.git
cd dart_style
pub get
dart2aot benchmark/benchmark.dart benchmark/benchmark.dart.aot
dartaotruntime benchmark/benchmark.dart benchmark/benchmark.dart.aot

=>
VM initialization failed: Invalid vm isolate snapshot seen

Environment:
$ dart --version
Dart VM version: 2.3.1 (Tue May 21 19:28:38 2019 +0200) on "macos_x64"

cc @cskau-g @mraleph

dartaotruntime benchmark/benchmark.dart benchmark/benchmark.dart.aot

I think you meant
$ dartaotruntime benchmark/benchmark.dart.aot

or maybe
$ dartaotruntime benchmark/benchmark.dart.aot benchmark/benchmark.dart

?

Doh.

Tracking error message improvement in https://github.com/dart-lang/sdk/issues/37223


polars 1.5 instead of 1.1

Going to change the pyproject.toml so we don't run into a dependency error

I guess I should just leave this until it is resolved


Kvantumanager not found in Arch Budgie

What happened?
When running Yin & Yang from the terminal using yin-yang this error comes up
Plugin Colors has no support for your desktop environment yet!
Using default configuration values.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/yin-yang/yin_yang/__main__.py", line 16, in <module>
    from yin_yang import daemon_handler
  File "/opt/yin-yang/yin_yang/daemon_handler.py", line 7, in <module>
    from .config import ConfigWatcher, config
  File "/opt/yin-yang/yin_yang/config.py", line 482, in <module>
    for pl in filter(lambda pl: pl.available, plugins):
  File "/opt/yin-yang/yin_yang/config.py", line 482, in <lambda>
    for pl in filter(lambda pl: pl.available, plugins):
                                ^^^^^^^^^^^^
  File "/opt/yin-yang/yin_yang/plugins/_plugin.py", line 167, in available
    return self.check_command([self.command[0], '--help'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/yin-yang/yin_yang/plugins/_plugin.py", line 156, in check_command
    subprocess.check_call(command, stdout=subprocess.DEVNULL)
  File "/usr/lib/python3.11/subprocess.py", line 408, in check_call
    retcode = call(*popenargs, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 389, in call
    with Popen(*popenargs, **kwargs) as p:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1953, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'kvantummanager'

When running it with sudo, the window appears which should not happen as the root user has no installed desktop environment. Also, none of the settings work. Changing the settings gives the error
Failed to connect to bus: No medium found
The repo says that it is supported with Budgie however i have no idea why it is not working.
Version
3.3
How did you install Yin & Yang?
AUR
What desktop environments are you seeing the problem on?
other :  Budgie for Arch Linux
Which plugin causes the issue?
None
What software version do you use?
OS: Arch Linux x86_64  DE: Budgie 10.9.1
Relevant log output
No response

Looks like yin yang can't execute kvantummanager --help. Make sure its executable as a normal user.

Failed to connect to bus: No medium found

That I have never seen. Which plugins are active? Looks like it's related to the dbus.

You're right @l0drex ! I don't have kvantumanager nor can I find where it is.
I don't know what you mean by plugins, sorry! I just clicked the Light/Dark button and this error popped up (when run as sudo)

Switching the themes after installing kvantum now throws the following error
Plugin Colors has no support for your desktop environment yet!
Error while loading translation. Using default language.
Exception in thread Wallpaper:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/yin-yang/yin_yang/plugins/_plugin.py", line 56, in set_mode
    self.set_theme(theme)
  File "/opt/yin-yang/yin_yang/plugins/_plugin.py", line 200, in set_theme
    raise ValueError(f'Theme \"{theme}\" is invalid')
ValueError: Theme "" is invalid

Oh, so you don't use kvantum? Then you don't need it. Thought you had it installed and yin yang couldn't use it. I'm in the middle of the woods right now, will take a look in the next days

I don't use Kvantum. No idea what it is to be fair. From first glance it just seems like another theming tool like GTK or KDE (as if that combination wasn't complicated enough!)
But knowing that it's not needed I'll uninstall it. No idea why the application requested for it.

Its kind of a theme manager for qt (kde) themes, like an alternative to breeze


ReportsTest should remove temp files.

ReportsTest creates a dir and a few files. After the test finish, this stuff should be deleted.

@paulodamaso/z please, pay attention to this issue

@0crat in

Bug was reported, see §29: +15 point(s) just awarded to @dgarus/z

The job #386 assigned to @hdouss/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@dgarus Please see PR #392

@HDouss Ok. What should I do?

@dgarus Nothing special. Mentioned you, so you can look at the solution and a link of this issue to the PR that solves it.

@dgarus PR #392 reviewed and merged. Please close the issue.

@sereshqua/z please review this job completed by @hdouss/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat quality good

Order was finished, quality is "good": +35 point(s) just awarded to @hdouss/z

Quality review completed: +4 point(s) just awarded to @sereshqua/z


Multiprocessing error when optimizing inside Jupyter notebook

🐛 Bug
I've been doing some prototyping in a Jupyter notebook and am getting errors with Litdata version 0.2.20 and up (0.2.19 works). It seems to occur for any call to optimize made from the notebook.
To Reproduce
Run the following in a Jupyter notebook cell.
from lightning.data import optimize

def process(x):
    yield (x,)

optimize(
    fn=process,
    inputs=list(range(100)),
    num_workers=1,
    output_dir="foo",
    chunk_bytes="64MB"
)

Error message:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/brendanfolie/.pyenv/versions/3.11.6/lib/python3.11/multiprocessing/spawn.py", line 122, in spawn_main
    exitcode = _main(fd, parent_sentinel)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/brendanfolie/.pyenv/versions/3.11.6/lib/python3.11/multiprocessing/spawn.py", line 132, in _main
    self = reduction.pickle.load(from_parent)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: Can't get attribute 'process' on <module '__main__' (built-in)>

I only see this issue when optimize is called from a cell in the Jupyter notebook. I can use Jupyter to invoke a method in a module which itself calls optimize and that works fine. Non-Jupyter usage is all working as expected.
Environment

Litdata 0.2.20 or 0.2.21 (no problem with 0.2.19 and below)
ipykernel 6.29.5
ipython 8.26.0
jupyter_client 8.6.2
jupyter_core 5.7.2
Python 3.11
OS Ubuntu

Additional context
Based on the error message this seems to be a multiprocessing issue. Something about version 0.2.20 triggered it. #284 is the only change I see related to multiprocessing, though it's not clear to me why that change would have this effect.

You need to use if name == "main"

@tchaton that's not working for me.
It works fine as a script, but not when from a cell in a Jupyter notebook


no attribute 'hadoop-cluster'

I'm trying to install HDP in static env with static blueprint but getting error:
TASK [Populate the hiveserver hosts list] **************************************************************************************************************************
fatal: [HDP-UT01-QA.mac.org.il]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'hadoop-cluster'\n\nThe error appears to have been in '/home/dba/playbooks/ansible-hortonworks/playbooks/set_variables.yml': line 295, column 11, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n        - name: Populate the hiveserver hosts list\n          ^ here\n"}
        to retry, use: --limit @/home/dba/playbooks/ansible-hortonworks/playbooks/install_cluster.retry

I've tried to debug it by myself but... :(
Additional chunk of output, that maybe could help to understand the root of the issue:
TASK [Add nodes to the hadoop-cluster group and groups representing the host_groups] *******************************************************************************
included: /home/dba/playbooks/ansible-hortonworks/playbooks/clouds/add_nodes_static.yml for localhost => (item=__omit_place_holder__5746c465ee63b979fbfd2ac75f9fb34b669bacab)

Files inventory/static , playbooks/group_vars/all  and playbooks/roles/ambari-blueprint/files/blueprint-HDP-QA.json attached.
files.zip
Thanks in advance,
Ilya

Hi Ilya,
I got it : in your file named static there are server ranges configured with square brackets and and dash when ansible expects square brackets and colon to define ranges. What's surprising is the fact ansible silently fails to parse the file.
If you change the dashes by colons then you should see in log TASK [Add nodes to hadoop-cluster group]
lines like the following ones :
TASK [Add nodes to hadoop-cluster group] ****************************************************************************************************************************************
changed: [localhost] => (item=HDP-MSTR01...)
changed: [localhost] => (item=HDP-DATA01...)
changed: [localhost] => (item=HDP-UT01...)
changed: [localhost] => (item=HDP-MSTR02-QA...)
changed: [localhost] => (item=HDP-UT02-QA..)
changed: [localhost] => (item=HDP-EDGE01-QA...)
[...]

Hope this helps,
Regards,
Christophe

Thank you Christophe, it solved the issue.
You are right, it is very strange that ansible failed to parse the file absolutely silently.

Great catch @csebille !
For Ansible, the inventory file was fine, it simply treated that alias as a string.
But these groups, hadoop-cluster and ambari-server are actually important for these playbooks, so I've added an additional check: https://github.com/hortonworks/ansible-hortonworks/commit/b756dba634e791f08bbb524471d2a3d2b3bcce7e
This should prevent the execution if these groups are not available, which hopefully will help when troubleshooting.


Windows 10 Defender says that retdec-v3.1-windows-32b.zip contains Trojan:Win32/Azden.B!cl

Subj. https://www.virustotal.com/ru/file/c8425d1ad4423c3d44e89526f3ba375f5fe768e5e7197988351ed5502ddf24cf/analysis/1531767720/

The funny thing about Trojan:Win32/Azden.B!cl is that every report of it on the internet is complaining about a false positive. I wouldn't be surprised if it was complaining about the unpacker, or the inclusion of cryptography libraries. Even crazier is that a number of others are suddenly detecting it as ransomware. Another instance of antivirus doing more harm than good.
https://www.microsoft.com/en-us/wdsi/antimalware-support/developer-resources is where you can report the Windows Defender alert, at least.

We looked into this and we think it is clean. We reported this as a false positive to the relevant AVs.


feat: \using fee credits

shall be merged after https://github.com/getAlby/getalby.com/pull/1847 is deployed

again. we don't need using_discontinued_wallet banner for the users before march? this will be not shown to them right?


Treat hidden IndexedStack children as offstage for test finder

An IndexedStack only ever shows one of its children. Other children aren't rendered or hit-tested. In this sense, I think these other children could be considered off-stage.
This PR changes the behavior of IndexedStack to hide inactive children from an element visitor only interested in on-stage children. The main effect is that inactive children are no longer found through a finder in widget tests by default.
This closes https://github.com/flutter/flutter/issues/111478.
Pre-launch Checklist

[X] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[X] I read the Tree Hygiene wiki page, which explains my responsibilities.
[X] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[X] I signed the CLA.
[X] I listed at least one issue that this PR fixes in the description above.
[ ] I updated/added relevant documentation (doc comments with ///).
[X] I added new tests to check the change I am making, or this PR is test-exempt.
[X] All existing and new tests are passing.

IMHO, IndexedStack says: https://api.flutter.dev/flutter/widgets/IndexedStack-class.html

The stack is always as big as the largest child.

But the offstage property, which IMHO is quite related to Offstage, says: https://api.flutter.dev/flutter/widgets/Offstage-class.html

A widget that lays the child out as if it was in the tree, but ... without taking any room in the parent.

So, I am worried whether making IndexedStack's inactive children offstage will violate its definition?

Thanks for the feedback!

But the offstage property, which IMHO is quite related to Offstage

On the other hand, the documentation of debugVisitOnstageChildren explicitly mentions Overlay as well:

Classes like Offstage and Overlay override this method to hide their children.

To me, that comment left the impression that using an Offstage widget isn't a requirement for an element being considered offstage. That documentation comment further says:

For example, when you instruct the test framework to tap on a widget, by default the finder will look for onstage elements and ignore the offstage ones.

I think this may be a reasonable behavior for IndexedStacks as well. Do you think this might be worth an opt-in flag on IndexedStack instead?

Aha that sounds pretty reasonable to me. So Flutter's "offstage" seems to at least has two meanings, one narrow and one broad.

@Piinks This sounds like something that should definitely be clarified in the docs here if that is the case. It sounds like there are a couple of opportunities listed in the comments here where the docs are not very helpful or clear.

#111524 trys to explain a little bit :)

This did break some customer tests that expect the current behavior.
@simolus3 is there another way we could achieve this? Or a non breaking way we could rework this?
Check out our breaking change policy, and let me know what your thoughts are if you would like to proceed with this change. Thanks!

Or a non breaking way we could rework this?

In c2dd76d0b944fbd5a8dc50f71ef884ef16fd514f, I have made this behavior opt-in. An IndexedStack will continue to behave like it did unless the hiddenChildrenAreOnstage field is disabled.

I chatted with @goderbauer about this recently, and I think this is something we should add to https://github.com/flutter/flutter/issues/24722
While your original proposal makes more sense, it is too breaking to change the API as it currently is. I don't know that the opt in flag approach is very beneficial here. I really appreciate you looking into this. I will add this to the list in the linked issue. At this time, I don't think we can accept this change.
Thank you for contributing!

Thanks for the explanation and for taking a look!

Today I realize Flutter is inconsistent here: RenderIndexedStack.debugDescribeChildren says those children are offstage. Thus, when users printing the debug renderobject tree, it will be very surprising - because it is marked as offstage but it is not matched by a offstage finder!
  @override
  List<DiagnosticsNode> debugDescribeChildren() {
    final List<DiagnosticsNode> children = <DiagnosticsNode>[];
    int i = 0;
    RenderObject? child = firstChild;
    while (child != null) {
      children.add(child.toDiagnosticsNode(
        name: 'child ${i + 1}',
        style: i != index ? DiagnosticsTreeStyle.offstage : null,
      ));
      child = (child.parentData! as StackParentData).nextSibling;
      i += 1;
    }
    return children;


[Feature] Bring SoftAssertions to Java

Node version has soft assertions now. Can we get soft assertions for Java too?

That's certainly possible but the lack of good integrated test runner like the one in nodejs makes it less convenient in java, let's see if there is more interest in bringing this to java.

If we could integrate it with assertJ’s soft assertions that might be good enough

+1 This is definitely something we should see in java and c#

+1, it should be brought to Java as well

+1

Let's not forget about Python too! Please!

Here is how to do it with JUnit 5:
import org.junit.jupiter.api.Test;

import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertAll;

public class TestSoftAssertions extends TestBase {
  @Test
  void testSoftAssertions() {
    page.setContent("
Text content
");
    Locator locator = page.locator("text=content");

    assertAll(
      () -> assertThat(locator).hasAttribute("id", "force fail"),
      () -> assertThat(locator).hasText("force fail")
    );
  }
}

@uchagani do you have a solution for TestNG :)

I don't unfortunately. Personally I've moved all of my codebases to junit 5 because it's so much better than testng in terms of extensibility and functionality.

+1, it's kind of blocking issue.

+1

I've created a new package that brings soft assertions to Playwright-Java: https://github.com/uchagani/playwright-java-soft-assertions
@yury-s @dgozman  I have an open PR for this implementation to be merged into this repo if you guys like the approach.  The full implementation is done and i can copy it over quickly but i'll need to update the tests to be more like how playwright does them which should only take a day or so.  Please let me know because i believe this belongs in this repo instead of a separate package.

@uchagani
We discussed the feature and its current implementation in the API review meeting today and several concerns were raised. We are going to revert the implementation for the upcoming release at least. Main concerns:

Soft assertions already work today with JUnit assertAll as you mentioned above

assertAll("Page assertions",
        () -> assertThat(page).hasTitle("Playwright"),
        () -> assertThat(page).hasURL("foo")

The implementation does not bring use close to integration with TestNG SoftAssert. At first glance, it seems that the assertions will need to implement IAssert somehow. With current implementation people who want to use builtin soft asserts and playwright's will end up having two instances of SoftAssert and SoftAssertions and two calls of assertAll.
If we consider these asserts an integration with AssertJ, that's okay, though it would be a bit different proposition. In that case we have to ensure that Playwright assertions integrate nicely with the builtin soft assertions and allow further extension. As far as I can tell the following code could do that for Page:

// PwPageSoftAssertions.java
package org.example.test;

import com.microsoft.playwright.Page;
import org.assertj.core.api.SoftAssertions;

public class PwPageSoftAssertions extends SoftAssertions {
    public PwPageAssert assertThat(Page actual) {
        return proxy(PwPageAssert.class, Page.class, actual);
    }
}

// PwPageAssert.java
package org.example.test;

import com.microsoft.playwright.Page;
import com.microsoft.playwright.assertions.PageAssertions;
import org.assertj.core.api.AbstractAssert;

import java.util.regex.Pattern;

import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat;

public class PwPageAssert  extends AbstractAssert<PwPageAssert, Page> implements PageAssertions {
    private final PageAssertions pageAssertions;

    public PwPageAssert(Page page) {
        super(page, PwPageAssert.class);
        pageAssertions = assertThat(page);
    }

    @Override
    public void hasTitle(String s, HasTitleOptions hasTitleOptions) {
        pageAssertions.hasTitle(s, hasTitleOptions);
    }

    @Override
    public void hasTitle(Pattern pattern, HasTitleOptions hasTitleOptions) {
        pageAssertions.hasTitle(pattern, hasTitleOptions);
    }

    @Override
    public void hasURL(String s, HasURLOptions hasURLOptions) {
        pageAssertions.hasURL(s, hasURLOptions);
    }

    @Override
    public void hasURL(Pattern pattern, HasURLOptions hasURLOptions) {
        pageAssertions.hasURL(pattern, hasURLOptions);
    }

    @Override
    public PageAssertions not() {
        return pageAssertions.not();
    }
}

//  Test method
  @Test
  public void testAssertjPageSoftAssertions() {
    Playwright playwright = Playwright.create();
    Browser browser = playwright.chromium().launch();
    BrowserContext context = browser.newContext();
    Page page = context.newPage();
    page.navigate("https://playwright.dev");

    PwPageSoftAssertions softly = new PwPageSoftAssertions();
    softly.assertThat(page).hasTitle("Playwright");
    softly.assertThat(page).hasURL("foo");
    softly.assertThat(2).isEqualTo(1);
    softly.assertAll();
  }

Current implementation of SoftAssertions does not help in this, moreover it encourages users to create a separate instance instance of SoftAssertions.
We decided to hold off this feature until these concers are addressed.

The motivation behind #1361 was to enable calling playwright-java's auto-waiting assertions in a soft way, without tying it to any other library, similar to playwright-java's assertions themselves.  They are not assertj assertions or testng assertions.

Soft assertions already work today with JUnit assertAll

While JUnit's soft assertions work, they are limited.  They won't let you do things do actions, assertions, more actions, more assertions, etc.  it's more to group assertions together.

The implementation does not bring use close to integration with TestNG SoftAssert.

This was never the intention of #1361 because then we are assuming that the user is using TestNG.  We can certainly provide better integration with TestNG similar to what we're doing with JUnit in #1371 but I think these are two different things: soft assertions for playwright vs soft assertions for playwright for TestNG.

If we consider these asserts an integration with AssertJ, that's okay, though it would be a bit different proposition

I think this is the same issue as tying soft assertions to another library.  Since playwright-java's assertions are not tied to AssertJ I don't see why the calling these same assertions in a soft way has to be.  If we tie it to AssertJ now we are limiting users to AssertJ and not other matchers that they might be using just because they want to call them softly.

it encourages users to create a separate instance instance of SoftAssertions.

This is correct but i'm open to other suggestions on how to handle this without tying it to a particular test runner (JUnit/TestNG) or a particular matcher (AssertJ/Hamcrest/).
playwright-java's assertions are self contained so that's what #1361 does.  We can provide support for AssertJ, Hamcrest, JUnit, and TestNG separately just for soft assertions but that seems like an odd thing to do when playwright-java's assertions don't care which test runner or assertion library one is using.

The motivation behind #1361 was to enable calling playwright-java's auto-waiting assertions in a soft way, without tying it to any other library, similar to playwright-java's assertions themselves. They are not assertj assertions or testng assertions.

I understand the objective was to provide soft assertions in a manner that does not tie it to any other libraries. There is a difference, though, between playwright web assertions and soft assertions on top of them. Playwright assertions introduced features not available before (auto-waiting). On the other hand, while adding soft assertions is definitely a convenience, similar functionalities could be implemented within existing testing frameworks using playwright assertions. Different testing frameworks take different approaches to soft assertions and if we'd like to be idiomatic, we need to play by their rules and provide a more seamless integrations. This is one of the reasons we were hesitant bringing this feature to java right away. We should have spotted this earlier.
Since there is no clear-cut solution that works for all frameworks, we usually hold-off shipping any suboptimal implementations and this what I suggest we do here. We can finish JUnit integration and then can see how this can fit into the new strucutre. Does it make sense?

Soft assertions already work today with JUnit assertAll

While JUnit's soft assertions work, it is awkward. You would basically have to wrap the whole test in an assertAll to be able to do multiple actions, then assertions, then more actions, etc.

Even though it may be cumbersome, this is how JUnit recommends to do soft assertions and changing their framework is not our goal. From our experience, it's usually sufficient to have a block of multiple soft asserts followed by actions, followed by another block of soft asserts. One rarely needs to check soft assertions scattered across distant parts of the test body. In those scenarions assertAll will work just fine.

The implementation does not bring us close to integration with TestNG SoftAssert.

This was never the intention of #1361 because then we are assuming that the user is using TestNG. We can certainly provide better integration with TestNG similar to what we're doing with JUnit in #1371 but I think these are two different things: soft assertions for playwright vs soft assertions for playwright for TestNG.

That was not a goal indeed. During the initial code review I was under impression that there is no built-in support in the current frameworks and everyone does it their own way and having SoftAsserts/assertAll was one of the best practices. On a closer look, it turned out that the client will likely have to reimplement SoftAsserts if they want good integration with existing builtin soft asserts. I should have spotted this problem earlier.  This is our regular practice in Playwright to no ship a feature (especially in language ports) if there is controversy.

If we consider these asserts an integration with AssertJ, that's okay, though it would be a bit different proposition

I think this is the same issue as tying soft assertions to another library. Since playwright-java's assertions are not tied to AssertJ I don't see why the calling these same assertions in a soft way has to be. If we tie it to AssertJ now we are limiting users to AssertJ and not other matchers that they might be using just because they want to call them softly.

it encourages users to create a separate instance instance of SoftAssertions.

This is correct but i'm open to other suggestions on how to handle this without tying it to a particular test runner (JUnit/TestNG) or a particular matcher (AssertJ/Hamcrest/).

I'd focus on JUnit integration and then get back to this. I believe it'd be better if we provide a solid integration with one of the testing frameworks, e.g. AssertJ, than if we end up with an implementation that doesn't integrate well with any framework.

playwright-java's assertions are self contained so that's what #1361 does. We can provide support for AssertJ, Hamcrest, JUnit, and TestNG separately just for soft assertions but that seems like an odd thing to do when playwright-java's assertions don't care which test runner or assertion library one is using.

I tried to explain above the difference from our perspective, basically soft assertions can be implemented using builtin mechanisms in each of these frameworks and playwright assertions APIs.


Cannot install SmartOs

Hi All
Getting this error when trying npm install node-sass

<EMAIL_ADDRESS>install /data/node_modules/node-sass
node scripts/install.js

Cannot download "https://github.com/sass/node-sass/releases/download/v3.4.2/sunos-x64-47_binding.node":
HTTP error 404 Not Found
Any help here would be appreciated. Running node v5.5.0 npm v3.3.12

https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#linuxosx

SmartOS is currently not supported.


fix: Amend standard sizes

This changes the node count from 3 for all sizes to 2, except xlarge and xxlarge.

This PR is included in version 4.10.2 :tada:


GitHub action to publish to jcenter

Setup is done. Just need to hook it up with a GitHub Action so it's triggered every time a new git tag is being made.

JCenter is closing down. So it should publish to mavenCentral instead

This has now been introduced