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 type
for message types
#484
Conversation
I think this is good, but given that it's changing the low-level messages I think we should add it to the WG meeting agenda to ensure there aren't any concerns / people are aware of the change. |
The Browser Testing and Tools Working Group just discussed The full IRC log of that discussion<jgraham_> Topic: add `type` for `Message` types<orkon> jgraham_ (IRC): yeah, it makes sense, so we don't block on url pattern <jgraham_> github: https://github.com//pull/484 <jrandolf> q+ <jrandolf> https://github.com//pull/484 <jgraham_> ack jrandolf <orkon> jrandolf: while working on the chromium impl for webdriver bidi, we face problems to discriminate between message types in particular between top level types <orkon> jrandolf: we wanted to implement a mechanism to discriminate them so we want to add a type attribute to messages <jgraham_> q+ <orkon> jrandolf: or we could get rid of Extensible in the spec <jrandolf> q- <jgraham_> ack jgraham_ <JimEvans> q+ <orkon> jgraham_ (IRC): I am in favour of adding the type and it matches the pattern that we adopted for other places in the spec <orkon> jgraham_ (IRC): we should be aware that it is a fundamental change so people should be aware but I do not think it will cause problems <jrandolf> q+ <orkon> jgraham_ (IRC): based on previous discussions cddl has semantic to ignore extra fields so perhaps we dont need extensible but we perhaps need to explain in the spec what are the requirements for vendor extensions <orkon> jgraham_ (IRC): for example in webdriver we used reserved key name patterns <jgraham_> ack jrandolf <orkon> jgraham_ (IRC): having some way to do vendor specific stuff is important. Whether it needs to be on the top level, idk but perhaps there are use cases for that. For example, logging through an intermediarz <orkon> s/intermediarz/intermediary/ <orkon> Jim Evans: as a client author, I think adding the type property is no problem and seems natural <orkon> Jim Evans: as far as extensible goes, as a client author, it is important to be able to handle that come across the wire that may not strictly, e.g., if the client receives smth from the remote end where the client has not caught up yet <jgraham_> ack jrandolf <orkon> Jim Evans: we need some mechanism to say that there will be other properties that you might or might not need to handle as a client <jgraham_> ack JimEvans <jgraham_> q+ <orkon> jrandolf: James you mentioned that Extensible can be used as a means of transporting implementation specific metadata. From looking from the users it was built to allow future keys <orkon> jrandolf: I find it weird that we do it for the future compatibility <orkon> jrandolf: to reserve the space to change the spec <orkon> jrandolf: the way I see it if it is for metadata why not have the metadata field and get rid of extensiblity <jgraham_> ack jgraham_ <orkon> jgraham_ (IRC): I don't really understand the point about the metadata specifically <orkon> jgraham_ (IRC): there are a couple of kinds of extensibility: we want to be able to add stuff to the spec to allow existing client to not refuse the message. As long as the client data is there, they should process the message. If we want the behaviour to change, we need to make it explicit so that the clients process it with the new semantic <jrandolf> q+ <orkon> jgraham_ (IRC): so it looks like cddl supports this explicitly. <orkon> jgraham_ (IRC): the second kind is when the people want to add vendor-specific data and that is not necessarily metadata <orkon> jgraham_ (IRC): new session is a clear example where there are browser specific options <orkon> jgraham_ (IRC): so to be able to dump this stuff into the message seems fine <orkon> jgraham_ (IRC): example from classic, if you talk to selenium grid or other components, and they might need to add some extra data that might be metadata but is it really? perhaps <orkon> jgraham_ (IRC): I guess that stuff makes sense perhaps to add to metadata but then we have the same issue with the metadata field to avoid collision <orkon> jgraham_ (IRC): and we end up with key namespaces <jgraham_> ack jrandolf <orkon> jgraham_ (IRC): it is where we ended up for classic <orkon> jrandolf: I think it should be made clear that cddl does not define that more entries match or does not match the spec and it means that it is ambigious state. <orkon> jrandolf: for sure having this extensible map is actually good if we want the client authors to understand that there will be extensions in the future. However, I don't see how the extensible trait guarantee any kind ... make anything easier? it is meant for documentation? <orkon> jrandolf: you mentioned the namespacing but that was the point of metadata and we put this extra vendor information into this dedicated key <orkon> jrandolf: in other rfcs usually a registry get created so that top level is not polluted <orkon> jrandolf: metadata could be on anything and based on interpretation <jrandolf> +1 <orkon> jgraham_ (IRC): I think there is clearly more to discuss. No objects to type key so we can go ahead. More discussion needed about extensible <orkon> q+ |
@jrandolf given that this PR is merged and no tests have been updated I wonder if you already implemented the |
Yes, we've added it to our side. I'll add tests soon. |
@jrandolf, to avoid test bustage on our side we would happily take the work in updating the tests to make the |
Please link the WPT PR to this bug once you send it (whoever sends one first) |
Note that no new tests need to be added given that the webdriver client can actually handle the type to better differentiate between the message types. I'm going to make those changes on https://bugzilla.mozilla.org/show_bug.cgi?id=1844009. |
@jrandolf could it be that the required changes are not yet part of a chromedriver release? When I tried my patch https://phabricator.services.mozilla.com/D185173 for the webdriver client it's hanging. I see the same when I remove the type field in Firefox. So I assume a chromedriver release is needed? |
@nechaev-chromium or @mathiasbynens could one of you please help? Thanks. |
The mapper was rolled last Monday (https://chromium-review.googlesource.com/c/chromium/src/+/4738162), so it should be in the Chromedriver by now. Could you retry the run? |
Per https://chromiumdash.appspot.com/commit/c6d8a1c01af25b5246ac1c331a95b7634ee419ca the roll commit made it to 117.0.5927.0. Any ChromeDriver of that version or more recent should include the changes. |
It doesn't work with https://chromedriver.storage.googleapis.com/112.0.5615.49/chromedriver_mac_arm64.zip which is downloaded by wpt automatically. But as per the Chromedriver download page the latest release is 114. |
The latest Stable Chrome version is 115. Why is WPT using 112? If the infra is running that far behind, it’s gonna take a while to catch up to M117 where the change landed :(
|
Per https://community.taskcluster-artifacts.net/L4is0pM-Ssm-sgEGnP5LlQ/0/public/logs/live_backing.log a recent master run is downloading Chromedriver 116. Are you sure you're passing in the right |
Oh, I have Chrome installed locally and wpt picks it up automatically. Sadly this is a 112 release. After upgrading Chrome locally it now tries to download the new 115 chromedriver binary but it fails with:
@mathiasbynens could you please check why from https://storage.googleapis.com/chromium-browser-snapshots/Mac_Arm/1148911/chromedriver_mac64.zip is not valid? |
It looks like the download URLs have been changed to https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.170/mac-arm64/chromedriver-mac-arm64.zip. @jgraham do we miss an upstream change which hasn't been downstream synced yet? |
The same failure can actually be seen when running chrome tests in the upstream repository itself. Given that this is a wpt issue I filed web-platform-tests/wpt#41359. |
Fixed: #480
Preview | Diff