Quantcast

So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Thomas Mortagne
Administrator
Hi devs,

We have a unintended regression in the standard import: if what you
import is identical to what is already in the database (including the
author) it won't add a new version (if you use the default option "Add
a new version to the existing page").

What happen in practice is that if you keep calling XWikiDocument#set*
methods with the same data it won't update the metadata or content
dirty flags. This flags are what hibernate store look at to know if it
should add a new version or not.

You can reproduce the same behavior with a simple script which load a
document, always set the same content and save. You will notice that
the history of that document does not change.

So the question is do we force metadata dirty to true all the time in
the instance output filter or do we keep this feature (in which case
we should optimize it a bit to not do the useless XWiki#saveDocument
but that's another subject).

WDYT ?

It could be seen as a nice feature but in practice my first reaction
was WTF and you often want to be sure the import actually did
something so I'm +1 to force metadata dirty. But I'm +0 to keep the
current behavior if there is a majority for it.

--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Guillaume Delhumeau
Not storing unnecessary versions looks like a feature for me.

Imagine a scheduler job that update some pages every night, I would be glad
that it does not create new versions when nothing has changed in the end.

Maybe I look at this with a biased vision: I know that having a lot of
versions of a document can cause problems (when we move the document for
example). If we had not this problem, maybe I would have the same opinion
than you.

Thanks,

2017-02-08 14:33 GMT+01:00 Thomas Mortagne <[hidden email]>:

> Hi devs,
>
> We have a unintended regression in the standard import: if what you
> import is identical to what is already in the database (including the
> author) it won't add a new version (if you use the default option "Add
> a new version to the existing page").
>
> What happen in practice is that if you keep calling XWikiDocument#set*
> methods with the same data it won't update the metadata or content
> dirty flags. This flags are what hibernate store look at to know if it
> should add a new version or not.
>
> You can reproduce the same behavior with a simple script which load a
> document, always set the same content and save. You will notice that
> the history of that document does not change.
>
> So the question is do we force metadata dirty to true all the time in
> the instance output filter or do we keep this feature (in which case
> we should optimize it a bit to not do the useless XWiki#saveDocument
> but that's another subject).
>
> WDYT ?
>
> It could be seen as a nice feature but in practice my first reaction
> was WTF and you often want to be sure the import actually did
> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
> current behavior if there is a majority for it.
>
> --
> Thomas Mortagne
>



--
Guillaume Delhumeau ([hidden email])
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Guillaume Delhumeau
Note that in GIT, you cannot add a file to a commit if this file has no
change.

2017-02-08 15:12 GMT+01:00 Guillaume Delhumeau <
[hidden email]>:

> Not storing unnecessary versions looks like a feature for me.
>
> Imagine a scheduler job that update some pages every night, I would be
> glad that it does not create new versions when nothing has changed in the
> end.
>
> Maybe I look at this with a biased vision: I know that having a lot of
> versions of a document can cause problems (when we move the document for
> example). If we had not this problem, maybe I would have the same opinion
> than you.
>
> Thanks,
>
> 2017-02-08 14:33 GMT+01:00 Thomas Mortagne <[hidden email]>:
>
>> Hi devs,
>>
>> We have a unintended regression in the standard import: if what you
>> import is identical to what is already in the database (including the
>> author) it won't add a new version (if you use the default option "Add
>> a new version to the existing page").
>>
>> What happen in practice is that if you keep calling XWikiDocument#set*
>> methods with the same data it won't update the metadata or content
>> dirty flags. This flags are what hibernate store look at to know if it
>> should add a new version or not.
>>
>> You can reproduce the same behavior with a simple script which load a
>> document, always set the same content and save. You will notice that
>> the history of that document does not change.
>>
>> So the question is do we force metadata dirty to true all the time in
>> the instance output filter or do we keep this feature (in which case
>> we should optimize it a bit to not do the useless XWiki#saveDocument
>> but that's another subject).
>>
>> WDYT ?
>>
>> It could be seen as a nice feature but in practice my first reaction
>> was WTF and you often want to be sure the import actually did
>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>> current behavior if there is a majority for it.
>>
>> --
>> Thomas Mortagne
>>
>
>
>
> --
> Guillaume Delhumeau ([hidden email])
> Research & Development Engineer at XWiki SAS
> Committer on the XWiki.org project
>



--
Guillaume Delhumeau ([hidden email])
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

vmassol
Administrator
In reply to this post by Thomas Mortagne
Hi Thomas,

> On 8 Feb 2017, at 14:33, Thomas Mortagne <[hidden email]> wrote:
>
> Hi devs,
>
> We have a unintended regression in the standard import: if what you
> import is identical to what is already in the database (including the
> author) it won't add a new version (if you use the default option "Add
> a new version to the existing page").
>
> What happen in practice is that if you keep calling XWikiDocument#set*
> methods with the same data it won't update the metadata or content
> dirty flags. This flags are what hibernate store look at to know if it
> should add a new version or not.
>
> You can reproduce the same behavior with a simple script which load a
> document, always set the same content and save. You will notice that
> the history of that document does not change.
>
> So the question is do we force metadata dirty to true all the time in
> the instance output filter or do we keep this feature (in which case
> we should optimize it a bit to not do the useless XWiki#saveDocument
> but that's another subject).
>
> WDYT ?
>
> It could be seen as a nice feature but in practice my first reaction
> was WTF and you often want to be sure the import actually did
> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
> current behavior if there is a majority for it.

It’s hard to decide...

Same as you, I also thought it was a nice feature when I learnt that this was what was happening :)

Actually something I’ve always wanted was to avoid generating new revisions when users edit a page and click save without changing any content instead of clicking cancel (a lot of users do this, generating unnecessary revisions and when you’re the owner of a wiki, it’s a pain to check the diffs to find out that there was no changes). But this could be a feature implemented at the level of the editor save button I guess. It’s a bit different since the author would be different but we wouldn’t want a save in this case.

So I’m +0 for both behaviours with a slight preference toward forcing a rev to be created.

Thanks
-Vincent

> --
> Thomas Mortagne

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Thomas Mortagne
Administrator
In reply to this post by Guillaume Delhumeau
The idea right now is only to discuss import use case, not the
behavior of XWiki#saveDocument.

On Wed, Feb 8, 2017 at 3:12 PM, Guillaume Delhumeau
<[hidden email]> wrote:

> Not storing unnecessary versions looks like a feature for me.
>
> Imagine a scheduler job that update some pages every night, I would be glad
> that it does not create new versions when nothing has changed in the end.
>
> Maybe I look at this with a biased vision: I know that having a lot of
> versions of a document can cause problems (when we move the document for
> example). If we had not this problem, maybe I would have the same opinion
> than you.
>
> Thanks,
>
> 2017-02-08 14:33 GMT+01:00 Thomas Mortagne <[hidden email]>:
>
>> Hi devs,
>>
>> We have a unintended regression in the standard import: if what you
>> import is identical to what is already in the database (including the
>> author) it won't add a new version (if you use the default option "Add
>> a new version to the existing page").
>>
>> What happen in practice is that if you keep calling XWikiDocument#set*
>> methods with the same data it won't update the metadata or content
>> dirty flags. This flags are what hibernate store look at to know if it
>> should add a new version or not.
>>
>> You can reproduce the same behavior with a simple script which load a
>> document, always set the same content and save. You will notice that
>> the history of that document does not change.
>>
>> So the question is do we force metadata dirty to true all the time in
>> the instance output filter or do we keep this feature (in which case
>> we should optimize it a bit to not do the useless XWiki#saveDocument
>> but that's another subject).
>>
>> WDYT ?
>>
>> It could be seen as a nice feature but in practice my first reaction
>> was WTF and you often want to be sure the import actually did
>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>> current behavior if there is a majority for it.
>>
>> --
>> Thomas Mortagne
>>
>
>
>
> --
> Guillaume Delhumeau ([hidden email])
> Research & Development Engineer at XWiki SAS
> Committer on the XWiki.org project



--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Guillaume Delhumeau
In that case it seems more natural to have a new revision anyway, to make
sure it has been imported correctly.

2017-02-08 15:43 GMT+01:00 Thomas Mortagne <[hidden email]>:

> The idea right now is only to discuss import use case, not the
> behavior of XWiki#saveDocument.
>
> On Wed, Feb 8, 2017 at 3:12 PM, Guillaume Delhumeau
> <[hidden email]> wrote:
> > Not storing unnecessary versions looks like a feature for me.
> >
> > Imagine a scheduler job that update some pages every night, I would be
> glad
> > that it does not create new versions when nothing has changed in the end.
> >
> > Maybe I look at this with a biased vision: I know that having a lot of
> > versions of a document can cause problems (when we move the document for
> > example). If we had not this problem, maybe I would have the same opinion
> > than you.
> >
> > Thanks,
> >
> > 2017-02-08 14:33 GMT+01:00 Thomas Mortagne <[hidden email]>:
> >
> >> Hi devs,
> >>
> >> We have a unintended regression in the standard import: if what you
> >> import is identical to what is already in the database (including the
> >> author) it won't add a new version (if you use the default option "Add
> >> a new version to the existing page").
> >>
> >> What happen in practice is that if you keep calling XWikiDocument#set*
> >> methods with the same data it won't update the metadata or content
> >> dirty flags. This flags are what hibernate store look at to know if it
> >> should add a new version or not.
> >>
> >> You can reproduce the same behavior with a simple script which load a
> >> document, always set the same content and save. You will notice that
> >> the history of that document does not change.
> >>
> >> So the question is do we force metadata dirty to true all the time in
> >> the instance output filter or do we keep this feature (in which case
> >> we should optimize it a bit to not do the useless XWiki#saveDocument
> >> but that's another subject).
> >>
> >> WDYT ?
> >>
> >> It could be seen as a nice feature but in practice my first reaction
> >> was WTF and you often want to be sure the import actually did
> >> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
> >> current behavior if there is a majority for it.
> >>
> >> --
> >> Thomas Mortagne
> >>
> >
> >
> >
> > --
> > Guillaume Delhumeau ([hidden email])
> > Research & Development Engineer at XWiki SAS
> > Committer on the XWiki.org project
>
>
>
> --
> Thomas Mortagne
>



--
Guillaume Delhumeau ([hidden email])
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Thomas Mortagne
Administrator
In reply to this post by vmassol
On Wed, Feb 8, 2017 at 3:18 PM, Vincent Massol <[hidden email]> wrote:

> Hi Thomas,
>
>> On 8 Feb 2017, at 14:33, Thomas Mortagne <[hidden email]> wrote:
>>
>> Hi devs,
>>
>> We have a unintended regression in the standard import: if what you
>> import is identical to what is already in the database (including the
>> author) it won't add a new version (if you use the default option "Add
>> a new version to the existing page").
>>
>> What happen in practice is that if you keep calling XWikiDocument#set*
>> methods with the same data it won't update the metadata or content
>> dirty flags. This flags are what hibernate store look at to know if it
>> should add a new version or not.
>>
>> You can reproduce the same behavior with a simple script which load a
>> document, always set the same content and save. You will notice that
>> the history of that document does not change.
>>
>> So the question is do we force metadata dirty to true all the time in
>> the instance output filter or do we keep this feature (in which case
>> we should optimize it a bit to not do the useless XWiki#saveDocument
>> but that's another subject).
>>
>> WDYT ?
>>
>> It could be seen as a nice feature but in practice my first reaction
>> was WTF and you often want to be sure the import actually did
>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>> current behavior if there is a majority for it.
>
> It’s hard to decide...
>
> Same as you, I also thought it was a nice feature when I learnt that this was what was happening :)
>

> Actually something I’ve always wanted was to avoid generating new revisions when users edit a page and click save without changing any content instead of clicking cancel (a lot of users do this, generating unnecessary revisions and when you’re the owner of a wiki, it’s a pain to check the diffs to find out that there was no changes). But this could be a feature implemented at the level of the editor save button I guess. It’s a bit different since the author would be different but we wouldn’t want a save in this case.

The reason it does that is because we force it. See
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java#L160.

>
> So I’m +0 for both behaviours with a slight preference toward forcing a rev to be created.
>
> Thanks
> -Vincent
>
>> --
>> Thomas Mortagne
>



--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Sergiu Dumitriu-3
In reply to this post by Thomas Mortagne
I wouldn't want to have empty revisions.

If you want to change the import, then you can manually call
doc.setContentDirty(true).

On 02/08/2017 08:33 AM, Thomas Mortagne wrote:

> Hi devs,
>
> We have a unintended regression in the standard import: if what you
> import is identical to what is already in the database (including the
> author) it won't add a new version (if you use the default option "Add
> a new version to the existing page").
>
> What happen in practice is that if you keep calling XWikiDocument#set*
> methods with the same data it won't update the metadata or content
> dirty flags. This flags are what hibernate store look at to know if it
> should add a new version or not.
>
> You can reproduce the same behavior with a simple script which load a
> document, always set the same content and save. You will notice that
> the history of that document does not change.
>
> So the question is do we force metadata dirty to true all the time in
> the instance output filter or do we keep this feature (in which case
> we should optimize it a bit to not do the useless XWiki#saveDocument
> but that's another subject).
>
> WDYT ?
>
> It could be seen as a nice feature but in practice my first reaction
> was WTF and you often want to be sure the import actually did
> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
> current behavior if there is a majority for it.
>


--
Sergiu Dumitriu
http://purl.org/net/sergiu
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Thomas Mortagne
Administrator
On Wed, Feb 8, 2017 at 3:53 PM, Sergiu Dumitriu <[hidden email]> wrote:
> I wouldn't want to have empty revisions.
>
> If you want to change the import, then you can manually call
> doc.setContentDirty(true).

"So the question is do we force metadata dirty to true all the time in
the instance output filter"

Again the subject here is default import mode only. We are not talking
about XWiki#saveDocument and I would be -1 to force new revision all
the time since we have use cases for this.

>
> On 02/08/2017 08:33 AM, Thomas Mortagne wrote:
>> Hi devs,
>>
>> We have a unintended regression in the standard import: if what you
>> import is identical to what is already in the database (including the
>> author) it won't add a new version (if you use the default option "Add
>> a new version to the existing page").
>>
>> What happen in practice is that if you keep calling XWikiDocument#set*
>> methods with the same data it won't update the metadata or content
>> dirty flags. This flags are what hibernate store look at to know if it
>> should add a new version or not.
>>
>> You can reproduce the same behavior with a simple script which load a
>> document, always set the same content and save. You will notice that
>> the history of that document does not change.
>>
>> So the question is do we force metadata dirty to true all the time in
>> the instance output filter or do we keep this feature (in which case
>> we should optimize it a bit to not do the useless XWiki#saveDocument
>> but that's another subject).
>>
>> WDYT ?
>>
>> It could be seen as a nice feature but in practice my first reaction
>> was WTF and you often want to be sure the import actually did
>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>> current behavior if there is a majority for it.
>>
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu



--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Sergiu Dumitriu-3
On 02/08/2017 10:05 AM, Thomas Mortagne wrote:

> On Wed, Feb 8, 2017 at 3:53 PM, Sergiu Dumitriu <[hidden email]> wrote:
>> I wouldn't want to have empty revisions.
>>
>> If you want to change the import, then you can manually call
>> doc.setContentDirty(true).
>
> "So the question is do we force metadata dirty to true all the time in
> the instance output filter"
>
> Again the subject here is default import mode only. We are not talking
> about XWiki#saveDocument and I would be -1 to force new revision all
> the time since we have use cases for this.

Yep, and I was agreeing.

>>
>> On 02/08/2017 08:33 AM, Thomas Mortagne wrote:
>>> Hi devs,
>>>
>>> We have a unintended regression in the standard import: if what you
>>> import is identical to what is already in the database (including the
>>> author) it won't add a new version (if you use the default option "Add
>>> a new version to the existing page").
>>>
>>> What happen in practice is that if you keep calling XWikiDocument#set*
>>> methods with the same data it won't update the metadata or content
>>> dirty flags. This flags are what hibernate store look at to know if it
>>> should add a new version or not.
>>>
>>> You can reproduce the same behavior with a simple script which load a
>>> document, always set the same content and save. You will notice that
>>> the history of that document does not change.
>>>
>>> So the question is do we force metadata dirty to true all the time in
>>> the instance output filter or do we keep this feature (in which case
>>> we should optimize it a bit to not do the useless XWiki#saveDocument
>>> but that's another subject).
>>>
>>> WDYT ?
>>>
>>> It could be seen as a nice feature but in practice my first reaction
>>> was WTF and you often want to be sure the import actually did
>>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>>> current behavior if there is a majority for it.
>>>
>>
>>
>> --
>> Sergiu Dumitriu
>> http://purl.org/net/sergiu
>
>
>


--
Sergiu Dumitriu
http://purl.org/net/sergiu
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Marius Dumitru Florea
In reply to this post by Thomas Mortagne
If we generate a new version then the user may get confused when comparing
the versions. Seeing "No changes" when comparing two consecutive versions
of a page can make the user loose his trust in the diff: "There must be
some change that the diff doesn't detect because otherwise I wouldn't have
two versions".

I think we should keep the current behavior but we should improve the
status displayed after the import. Besides the list of pages that have been
imported (saved with a new version) we can have a list of pages that have
been skipped (because there were no changes). Or we could mark the skipped
pages distinctly in the list of imported pages. I think the users will
appreciate this, especially since it allows them to see clearly what pages
have really been changed by the import.

Thanks,
Marius

On Wed, Feb 8, 2017 at 3:33 PM, Thomas Mortagne <[hidden email]>
wrote:

> Hi devs,
>
> We have a unintended regression in the standard import: if what you
> import is identical to what is already in the database (including the
> author) it won't add a new version (if you use the default option "Add
> a new version to the existing page").
>
> What happen in practice is that if you keep calling XWikiDocument#set*
> methods with the same data it won't update the metadata or content
> dirty flags. This flags are what hibernate store look at to know if it
> should add a new version or not.
>
> You can reproduce the same behavior with a simple script which load a
> document, always set the same content and save. You will notice that
> the history of that document does not change.
>
> So the question is do we force metadata dirty to true all the time in
> the instance output filter or do we keep this feature (in which case
> we should optimize it a bit to not do the useless XWiki#saveDocument
> but that's another subject).
>
> WDYT ?
>
> It could be seen as a nice feature but in practice my first reaction
> was WTF and you often want to be sure the import actually did
> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
> current behavior if there is a majority for it.
>
> --
> Thomas Mortagne
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

vmassol
Administrator

> On 9 Feb 2017, at 10:18, Marius Dumitru Florea <[hidden email]> wrote:
>
> If we generate a new version then the user may get confused when comparing
> the versions. Seeing "No changes" when comparing two consecutive versions
> of a page can make the user loose his trust in the diff: "There must be
> some change that the diff doesn't detect because otherwise I wouldn't have
> two versions".
>
> I think we should keep the current behavior but we should improve the
> status displayed after the import. Besides the list of pages that have been
> imported (saved with a new version) we can have a list of pages that have
> been skipped (because there were no changes). Or we could mark the skipped
> pages distinctly in the list of imported pages. I think the users will
> appreciate this, especially since it allows them to see clearly what pages
> have really been changed by the import.

Sounds good to me. Would be nice to have some saved job logs for imports too (as we have for DW upgrades) and the info that the page was skipped would be in that log and the admin could go back to check what was done for a given import. Or something like this. But having a temporary report showing this info would already be a good first step.

Thanks
-Vincent

>
> Thanks,
> Marius
>
> On Wed, Feb 8, 2017 at 3:33 PM, Thomas Mortagne <[hidden email]>
> wrote:
>
>> Hi devs,
>>
>> We have a unintended regression in the standard import: if what you
>> import is identical to what is already in the database (including the
>> author) it won't add a new version (if you use the default option "Add
>> a new version to the existing page").
>>
>> What happen in practice is that if you keep calling XWikiDocument#set*
>> methods with the same data it won't update the metadata or content
>> dirty flags. This flags are what hibernate store look at to know if it
>> should add a new version or not.
>>
>> You can reproduce the same behavior with a simple script which load a
>> document, always set the same content and save. You will notice that
>> the history of that document does not change.
>>
>> So the question is do we force metadata dirty to true all the time in
>> the instance output filter or do we keep this feature (in which case
>> we should optimize it a bit to not do the useless XWiki#saveDocument
>> but that's another subject).
>>
>> WDYT ?
>>
>> It could be seen as a nice feature but in practice my first reaction
>> was WTF and you often want to be sure the import actually did
>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>> current behavior if there is a majority for it.
>>
>> --
>> Thomas Mortagne
>>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Thomas Mortagne
Administrator
Rewriting the import UI is not part of the proposed options right now.
If you have the time to do it, sure.

In the meantime what we have right now is that you ask to import some
page and don't see anything in the page history while I think most
people will expect to see a new version with an "import" comment.

On Thu, Feb 9, 2017 at 10:25 AM, Vincent Massol <[hidden email]> wrote:

>
>> On 9 Feb 2017, at 10:18, Marius Dumitru Florea <[hidden email]> wrote:
>>
>> If we generate a new version then the user may get confused when comparing
>> the versions. Seeing "No changes" when comparing two consecutive versions
>> of a page can make the user loose his trust in the diff: "There must be
>> some change that the diff doesn't detect because otherwise I wouldn't have
>> two versions".
>>
>> I think we should keep the current behavior but we should improve the
>> status displayed after the import. Besides the list of pages that have been
>> imported (saved with a new version) we can have a list of pages that have
>> been skipped (because there were no changes). Or we could mark the skipped
>> pages distinctly in the list of imported pages. I think the users will
>> appreciate this, especially since it allows them to see clearly what pages
>> have really been changed by the import.
>
> Sounds good to me. Would be nice to have some saved job logs for imports too (as we have for DW upgrades) and the info that the page was skipped would be in that log and the admin could go back to check what was done for a given import. Or something like this. But having a temporary report showing this info would already be a good first step.
>
> Thanks
> -Vincent
>
>>
>> Thanks,
>> Marius
>>
>> On Wed, Feb 8, 2017 at 3:33 PM, Thomas Mortagne <[hidden email]>
>> wrote:
>>
>>> Hi devs,
>>>
>>> We have a unintended regression in the standard import: if what you
>>> import is identical to what is already in the database (including the
>>> author) it won't add a new version (if you use the default option "Add
>>> a new version to the existing page").
>>>
>>> What happen in practice is that if you keep calling XWikiDocument#set*
>>> methods with the same data it won't update the metadata or content
>>> dirty flags. This flags are what hibernate store look at to know if it
>>> should add a new version or not.
>>>
>>> You can reproduce the same behavior with a simple script which load a
>>> document, always set the same content and save. You will notice that
>>> the history of that document does not change.
>>>
>>> So the question is do we force metadata dirty to true all the time in
>>> the instance output filter or do we keep this feature (in which case
>>> we should optimize it a bit to not do the useless XWiki#saveDocument
>>> but that's another subject).
>>>
>>> WDYT ?
>>>
>>> It could be seen as a nice feature but in practice my first reaction
>>> was WTF and you often want to be sure the import actually did
>>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>>> current behavior if there is a majority for it.
>>>
>>> --
>>> Thomas Mortagne
>>>
>



--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

vmassol
Administrator

> On 9 Feb 2017, at 12:14, Thomas Mortagne <[hidden email]> wrote:
>
> Rewriting the import UI is not part of the proposed options right now.
> If you have the time to do it, sure.
>
> In the meantime what we have right now is that you ask to import some
> page and don't see anything in the page history while I think most
> people will expect to see a new version with an "import" comment.

That’s maybe a technical POV. From a non tech POV, users probably just expect that the content of their wiki after the import is the same as what is in the XAR.

As a long time xwiki tech user, checking the history of a page that I know was in a XAR and not seeing an entry and comment would be a WTF for me :)

Thanks
-Vincent

> On Thu, Feb 9, 2017 at 10:25 AM, Vincent Massol <[hidden email]> wrote:
>>
>>> On 9 Feb 2017, at 10:18, Marius Dumitru Florea <[hidden email]> wrote:
>>>
>>> If we generate a new version then the user may get confused when comparing
>>> the versions. Seeing "No changes" when comparing two consecutive versions
>>> of a page can make the user loose his trust in the diff: "There must be
>>> some change that the diff doesn't detect because otherwise I wouldn't have
>>> two versions".
>>>
>>> I think we should keep the current behavior but we should improve the
>>> status displayed after the import. Besides the list of pages that have been
>>> imported (saved with a new version) we can have a list of pages that have
>>> been skipped (because there were no changes). Or we could mark the skipped
>>> pages distinctly in the list of imported pages. I think the users will
>>> appreciate this, especially since it allows them to see clearly what pages
>>> have really been changed by the import.
>>
>> Sounds good to me. Would be nice to have some saved job logs for imports too (as we have for DW upgrades) and the info that the page was skipped would be in that log and the admin could go back to check what was done for a given import. Or something like this. But having a temporary report showing this info would already be a good first step.
>>
>> Thanks
>> -Vincent
>>
>>>
>>> Thanks,
>>> Marius
>>>
>>> On Wed, Feb 8, 2017 at 3:33 PM, Thomas Mortagne <[hidden email]>
>>> wrote:
>>>
>>>> Hi devs,
>>>>
>>>> We have a unintended regression in the standard import: if what you
>>>> import is identical to what is already in the database (including the
>>>> author) it won't add a new version (if you use the default option "Add
>>>> a new version to the existing page").
>>>>
>>>> What happen in practice is that if you keep calling XWikiDocument#set*
>>>> methods with the same data it won't update the metadata or content
>>>> dirty flags. This flags are what hibernate store look at to know if it
>>>> should add a new version or not.
>>>>
>>>> You can reproduce the same behavior with a simple script which load a
>>>> document, always set the same content and save. You will notice that
>>>> the history of that document does not change.
>>>>
>>>> So the question is do we force metadata dirty to true all the time in
>>>> the instance output filter or do we keep this feature (in which case
>>>> we should optimize it a bit to not do the useless XWiki#saveDocument
>>>> but that's another subject).
>>>>
>>>> WDYT ?
>>>>
>>>> It could be seen as a nice feature but in practice my first reaction
>>>> was WTF and you often want to be sure the import actually did
>>>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>>>> current behavior if there is a majority for it.
>>>>
>>>> --
>>>> Thomas Mortagne
>>>>
>>
>
>
>
> --
> Thomas Mortagne

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Thomas Mortagne
Administrator
On Thu, Feb 9, 2017 at 1:44 PM, Vincent Massol <[hidden email]> wrote:

>
>> On 9 Feb 2017, at 12:14, Thomas Mortagne <[hidden email]> wrote:
>>
>> Rewriting the import UI is not part of the proposed options right now.
>> If you have the time to do it, sure.
>>
>> In the meantime what we have right now is that you ask to import some
>> page and don't see anything in the page history while I think most
>> people will expect to see a new version with an "import" comment.
>
> That’s maybe a technical POV. From a non tech POV, users probably just expect that the content of their wiki after the import is the same as what is in the XAR.
>
> As a long time xwiki tech user, checking the history of a page that I know was in a XAR and not seeing an entry and comment would be a WTF for me :)

Importing a XAR is quite technical now since you usually don't use
that to install applications and if ever a non technical user import a
XAR he will probably not even look at the history anyway.

>
> Thanks
> -Vincent
>
>> On Thu, Feb 9, 2017 at 10:25 AM, Vincent Massol <[hidden email]> wrote:
>>>
>>>> On 9 Feb 2017, at 10:18, Marius Dumitru Florea <[hidden email]> wrote:
>>>>
>>>> If we generate a new version then the user may get confused when comparing
>>>> the versions. Seeing "No changes" when comparing two consecutive versions
>>>> of a page can make the user loose his trust in the diff: "There must be
>>>> some change that the diff doesn't detect because otherwise I wouldn't have
>>>> two versions".
>>>>
>>>> I think we should keep the current behavior but we should improve the
>>>> status displayed after the import. Besides the list of pages that have been
>>>> imported (saved with a new version) we can have a list of pages that have
>>>> been skipped (because there were no changes). Or we could mark the skipped
>>>> pages distinctly in the list of imported pages. I think the users will
>>>> appreciate this, especially since it allows them to see clearly what pages
>>>> have really been changed by the import.
>>>
>>> Sounds good to me. Would be nice to have some saved job logs for imports too (as we have for DW upgrades) and the info that the page was skipped would be in that log and the admin could go back to check what was done for a given import. Or something like this. But having a temporary report showing this info would already be a good first step.
>>>
>>> Thanks
>>> -Vincent
>>>
>>>>
>>>> Thanks,
>>>> Marius
>>>>
>>>> On Wed, Feb 8, 2017 at 3:33 PM, Thomas Mortagne <[hidden email]>
>>>> wrote:
>>>>
>>>>> Hi devs,
>>>>>
>>>>> We have a unintended regression in the standard import: if what you
>>>>> import is identical to what is already in the database (including the
>>>>> author) it won't add a new version (if you use the default option "Add
>>>>> a new version to the existing page").
>>>>>
>>>>> What happen in practice is that if you keep calling XWikiDocument#set*
>>>>> methods with the same data it won't update the metadata or content
>>>>> dirty flags. This flags are what hibernate store look at to know if it
>>>>> should add a new version or not.
>>>>>
>>>>> You can reproduce the same behavior with a simple script which load a
>>>>> document, always set the same content and save. You will notice that
>>>>> the history of that document does not change.
>>>>>
>>>>> So the question is do we force metadata dirty to true all the time in
>>>>> the instance output filter or do we keep this feature (in which case
>>>>> we should optimize it a bit to not do the useless XWiki#saveDocument
>>>>> but that's another subject).
>>>>>
>>>>> WDYT ?
>>>>>
>>>>> It could be seen as a nice feature but in practice my first reaction
>>>>> was WTF and you often want to be sure the import actually did
>>>>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>>>>> current behavior if there is a majority for it.
>>>>>
>>>>> --
>>>>> Thomas Mortagne
>>>>>
>>>
>>
>>
>>
>> --
>> Thomas Mortagne
>



--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

Denis Gervalle-2
On Thu, Feb 9, 2017 at 13:55, Thomas Mortagne <[hidden email]> wrote:
On Thu, Feb 9, 2017 at 1:44 PM, Vincent Massol <[hidden email]> wrote:

>
>> On 9 Feb 2017, at 12:14, Thomas Mortagne <[hidden email]> wrote:
>>
>> Rewriting the import UI is not part of the proposed options right now.
>> If you have the time to do it, sure.
>>
>> In the meantime what we have right now is that you ask to import some
>> page and don't see anything in the page history while I think most
>> people will expect to see a new version with an "import" comment.
>
> That’s maybe a technical POV. From a non tech POV, users probably just expect that the content of their wiki after the import is the same as what is in the XAR.
>
> As a long time xwiki tech user, checking the history of a page that I know was in a XAR and not seeing an entry and comment would be a WTF for me :)

Importing a XAR is quite technical now since you usually don't use
that to install applications and if ever a non technical user import a
XAR he will probably not even look at the history anyway.
Exactly, the only very small improvement that could be made, is about the option checked. Currently it is saying “Add a new version to the existing page”, which might allow arguing about none being added. So, maybe we could write, "Add a new version to the existing page (when modified)” or anything similar.
wdyt ?

>
> Thanks
> -Vincent
>
>> On Thu, Feb 9, 2017 at 10:25 AM, Vincent Massol <[hidden email]> wrote:
>>>
>>>> On 9 Feb 2017, at 10:18, Marius Dumitru Florea <[hidden email]> wrote:
>>>>
>>>> If we generate a new version then the user may get confused when comparing
>>>> the versions. Seeing "No changes" when comparing two consecutive versions
>>>> of a page can make the user loose his trust in the diff: "There must be
>>>> some change that the diff doesn't detect because otherwise I wouldn't have
>>>> two versions".
>>>>
>>>> I think we should keep the current behavior but we should improve the
>>>> status displayed after the import. Besides the list of pages that have been
>>>> imported (saved with a new version) we can have a list of pages that have
>>>> been skipped (because there were no changes). Or we could mark the skipped
>>>> pages distinctly in the list of imported pages. I think the users will
>>>> appreciate this, especially since it allows them to see clearly what pages
>>>> have really been changed by the import.
>>>
>>> Sounds good to me. Would be nice to have some saved job logs for imports too (as we have for DW upgrades) and the info that the page was skipped would be in that log and the admin could go back to check what was done for a given import. Or something like this. But having a temporary report showing this info would already be a good first step.
>>>
>>> Thanks
>>> -Vincent
>>>
>>>>
>>>> Thanks,
>>>> Marius
>>>>
>>>> On Wed, Feb 8, 2017 at 3:33 PM, Thomas Mortagne <[hidden email]>
>>>> wrote:
>>>>
>>>>> Hi devs,
>>>>>
>>>>> We have a unintended regression in the standard import: if what you
>>>>> import is identical to what is already in the database (including the
>>>>> author) it won't add a new version (if you use the default option "Add
>>>>> a new version to the existing page").
>>>>>
>>>>> What happen in practice is that if you keep calling XWikiDocument#set*
>>>>> methods with the same data it won't update the metadata or content
>>>>> dirty flags. This flags are what hibernate store look at to know if it
>>>>> should add a new version or not.
>>>>>
>>>>> You can reproduce the same behavior with a simple script which load a
>>>>> document, always set the same content and save. You will notice that
>>>>> the history of that document does not change.
>>>>>
>>>>> So the question is do we force metadata dirty to true all the time in
>>>>> the instance output filter or do we keep this feature (in which case
>>>>> we should optimize it a bit to not do the useless XWiki#saveDocument
>>>>> but that's another subject).
>>>>>
>>>>> WDYT ?
>>>>>
>>>>> It could be seen as a nice feature but in practice my first reaction
>>>>> was WTF and you often want to be sure the import actually did
>>>>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>>>>> current behavior if there is a majority for it.
>>>>>
>>>>> --
>>>>> Thomas Mortagne
>>>>>
>>>
>>
>>
>>
>> --
>> Thomas Mortagne
>



--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

vmassol
Administrator

> On 9 Feb 2017, at 14:02, Denis Gervalle <[hidden email]> wrote:
>
> On Thu, Feb 9, 2017 at 13:55, Thomas Mortagne <[hidden email]> wrote:
> On Thu, Feb 9, 2017 at 1:44 PM, Vincent Massol <[hidden email]> wrote:
>>
>>> On 9 Feb 2017, at 12:14, Thomas Mortagne <[hidden email]> wrote:
>>>
>>> Rewriting the import UI is not part of the proposed options right now.
>>> If you have the time to do it, sure.
>>>
>>> In the meantime what we have right now is that you ask to import some
>>> page and don't see anything in the page history while I think most
>>> people will expect to see a new version with an "import" comment.
>>
>> That’s maybe a technical POV. From a non tech POV, users probably just expect that the content of their wiki after the import is the same as what is in the XAR.
>>
>> As a long time xwiki tech user, checking the history of a page that I know was in a XAR and not seeing an entry and comment would be a WTF for me :)
>
> Importing a XAR is quite technical now since you usually don't use
> that to install applications and if ever a non technical user import a
> XAR he will probably not even look at the history anyway.
> Exactly, the only very small improvement that could be made, is about the option checked. Currently it is saying “Add a new version to the existing page”, which might allow arguing about none being added. So, maybe we could write, "Add a new version to the existing page (when modified)” or anything similar.
> wdyt ?

Yes that could a simple low cost solution for now.

Thanks
-Vincent

> Thanks
>> -Vincent
>>
>>> On Thu, Feb 9, 2017 at 10:25 AM, Vincent Massol <[hidden email]> wrote:
>>>>
>>>>> On 9 Feb 2017, at 10:18, Marius Dumitru Florea <[hidden email]> wrote:
>>>>>
>>>>> If we generate a new version then the user may get confused when comparing
>>>>> the versions. Seeing "No changes" when comparing two consecutive versions
>>>>> of a page can make the user loose his trust in the diff: "There must be
>>>>> some change that the diff doesn't detect because otherwise I wouldn't have
>>>>> two versions".
>>>>>
>>>>> I think we should keep the current behavior but we should improve the
>>>>> status displayed after the import. Besides the list of pages that have been
>>>>> imported (saved with a new version) we can have a list of pages that have
>>>>> been skipped (because there were no changes). Or we could mark the skipped
>>>>> pages distinctly in the list of imported pages. I think the users will
>>>>> appreciate this, especially since it allows them to see clearly what pages
>>>>> have really been changed by the import.
>>>>
>>>> Sounds good to me. Would be nice to have some saved job logs for imports too (as we have for DW upgrades) and the info that the page was skipped would be in that log and the admin could go back to check what was done for a given import. Or something like this. But having a temporary report showing this info would already be a good first step.
>>>>
>>>> Thanks
>>>> -Vincent
>>>>
>>>>>
>>>>> Thanks,
>>>>> Marius
>>>>>
>>>>> On Wed, Feb 8, 2017 at 3:33 PM, Thomas Mortagne <[hidden email]>
>>>>> wrote:
>>>>>
>>>>>> Hi devs,
>>>>>>
>>>>>> We have a unintended regression in the standard import: if what you
>>>>>> import is identical to what is already in the database (including the
>>>>>> author) it won't add a new version (if you use the default option "Add
>>>>>> a new version to the existing page").
>>>>>>
>>>>>> What happen in practice is that if you keep calling XWikiDocument#set*
>>>>>> methods with the same data it won't update the metadata or content
>>>>>> dirty flags. This flags are what hibernate store look at to know if it
>>>>>> should add a new version or not.
>>>>>>
>>>>>> You can reproduce the same behavior with a simple script which load a
>>>>>> document, always set the same content and save. You will notice that
>>>>>> the history of that document does not change.
>>>>>>
>>>>>> So the question is do we force metadata dirty to true all the time in
>>>>>> the instance output filter or do we keep this feature (in which case
>>>>>> we should optimize it a bit to not do the useless XWiki#saveDocument
>>>>>> but that's another subject).
>>>>>>
>>>>>> WDYT ?
>>>>>>
>>>>>> It could be seen as a nice feature but in practice my first reaction
>>>>>> was WTF and you often want to be sure the import actually did
>>>>>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>>>>>> current behavior if there is a majority for it.
>>>>>>
>>>>>> --
>>>>>> Thomas Mortagne
>>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Thomas Mortagne
>>
>
>
>
> --
> Thomas Mortagne

Loading...