-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add_session_metadata api is broken #641
Comments
@klimburg yes! I might take a short while to get to it because I'm a bit busy with other projects nowadays but fixes and PRs are always welcome! Having said that, it seems like the CI is currently broken, which is another topic I need to tackle when I find the time for it. Assuming the fix makes sense and is tested on your side, I'm open to accepting it without the CI accepting it for the time being. Thanks a lot for the help and patience! |
Great! This project really meets a lot of my needs so I don't mind contributing fixes and improvements as its still much less effort than rolling my own solution from scratch. Really appreciate all your efforts and understand being busy with other projects! Cheers! |
I dug into this today some more, it seems that Therefore it seems like the correct thing to do would be to delete these API endpoints unless they are left behind for backwards compatibility which was unintentionally broken. As a test author I can do the following to add session metadata or test metadata with the backslash plugin today backslash = slash.plugins.manager.get_plugin("backslash")
backslash.session.set_metadata_dict({"abc": 123})
backslash.current_test.set_metadata("foo", "bar") |
I think backward compatibility is important here. The API isn't really versioned, and I have no clear visibility over the current user base. Perhaps do this as a part of a major version bump so that people are aware of the differences (also a release notes explaining it) |
Ok once we get the CI working I’ll do that. |
The
add_session_metadata
api results in a 500.There are two separate issues in the implementation as it exists today.
Session.metadata_objects
does not exist but ratherSession.metadata_items
is the correct attribute and then the key doesnt get set. Its unclear whetheradd_session_metadata
is intended to add one item at a time or if the metadata dict is intended to set multiple items one for each key. Depending on the intent either of the following implementation works.One Item per call
Multiple Items per call
Personally I prefer the multiple items per call approach.
Finally I suspect
add_test_metadata
has a similar issue but I havent tested it yet. Just looking at the source I believe it should betest.metadatas
and nottest.metadata_objects
and similar with the missing key parameter to the TestMetadata constructor.@vmalloc If i submit fixes will they be taken? It seems like development has really slowed down.
The text was updated successfully, but these errors were encountered: