Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] Operations and cancellation support...

Hi everyone,

[I might be sending this a second time...but I think iOS just deleted
my first draft so maybe this is the first time I'm sending this.]

I spent the morning today looking at adding cancellation support to
Node [1] (before you ask, my students were taking tests today so I
didn't have to teach any classes in the morning :)). I noticed
cancellation support was added into the Java server a few years back
[2]. The reason I wanted this implemented was because `git log` is
almost unusable in Node when performed on a file [3].

Now the actual implementation is not too bad, we just need to add PUT
support into the Node server's tasks service so that's pretty easy and
straightforward. However, I noticed that only operations deemed as
non-temporary could be canceled because those were the only ones that
were visible in the operations page. And as far as I know, please feel
free to prove me wrong as I'm still new to all of this, the only way
to cancel something is by canceling it in the operations page. If
that's the case, then that just seems wrong to me.

Just because an operation is a "temporary" operation (I'm not even
sure what criteria we are using for this, I guess it's up to the
service provider) shouldn't mean that that operation is
non-cancelable. I think all operations should be shown in the
operations page. Or, y'know, we could add some states like what we
have in Eclipse with system jobs, regular Joe jobs, and user jobs and
the user could filter the operations page as they please. Then the
user could just set filters and see whatever they want to see.

------------------

I was wondering if there was any discussion around surfacing
cancellation support more clearly to the user after an operation has
started. The operations page is kind of hidden of to the side so the
fact that an operation can be cancelled is kind of hidden to the user
in my opinion. Admittedly, unless you've opened that page in a new
tab, opening the operations page kind of throws your entire context
away (since you're no longer in an editor). So, maybe the idea here is
that you're usually not thinking about cancelling an operation when
you look at the operations page because whatever operation was
previously running has effectively been "cancelled" by you having
"abandoned" your context...I guess?

------------------

As an aside, when a task is canceled, should a 200 be returned or a
202? I feel like a 202 makes more sense since the service cannot
guarantee when the cancel request will be honoured...if it ever even
does. Do we have any guidelines in Orion as to when to use a 200 and
when to use a 202?

Thank you for your time.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=508095

[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=397899

[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=507334

Regards,
Remy


Back to the top