-
Notifications
You must be signed in to change notification settings - Fork 241
Missing fields for session creation #66
Comments
For some reason, the session client takes JSON as a string. I haven't fixed it yet, and I wasn't very diligent when I reviewed the session client pull request. I can fix. |
@rickfast Awesome. 👍 |
Is there any progress on this addition? I also ran into an error when trying to read the session info by calling getSessionInfo(sessionId). The error seems to say the TTL value of "30s" cannot be demarshaled to a String?
|
Orbitz has been in the process of integration with Expedia the past two weeks, and I've been mostly unable to code. I should be able to tackle this early next week. Sorry for the slowness. As always, PRs welcome. |
@rickfast , I was going to take a look at #70, but after checking out the existing code + this issue, it seems the lib would be better served by rewriting the session client. I may be able to put in some time on it this week, but I don't want to duplicate efforts as it's non-trivial. Are you still planning to work on this? want me to take a crack at it? |
I'm actually rewriting it as we speak. I wish I had looked harder at the pull request with this. Should be ready in just a bit. |
nice! i'll be happy to review it if u like |
Please: #71 |
Fixed by edfdd46 |
Awesome! Do you think you could maybe make a release with this? 🙏 ;) |
Yup. I'll do it first thing this morning |
❤️ |
|
Sweet! Thanks! |
Have anyone tried to set the session parameters with the new implementation? It seems that creating a session would fail with a 400 Bad Request if the ttl or lockDelay is set. Creating an empty session or a session with name as a single parameter works as in the test class. I haven’t tried the other three parameters. This is with Maven build, ConsulAgent 0.9.11. My code looks like this: Session sessionSettings = ImmutableSession.builder().lockDelay("30").build(); The stack trace: Exception in thread "main" javax.ws.rs.BadRequestException: HTTP 400 Bad Request Did I miss anything in my code?
|
Try |
“30s” works. Thanks!
|
Yeah, I can add this |
👍 |
The Consul documentation on sessions states that one can specify the following fields when creating a session:
Based on the methods on the
SessionClient
, it looks like onlyName
(parameter namevalue
I assume is name) can be given. Let me know if I've missed something.The text was updated successfully, but these errors were encountered: