Chemistry
  1. Chemistry
  2. CMIS-431

TCK expects PWC object to have cmis:isLatestVersion=true

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: OpenCMIS 0.5.0
    • Fix Version/s: OpenCMIS 0.7.0
    • Component/s: opencmis-tck
    • Labels:
      None

      Description

      First a bit of clarification on the spec so that we are all on the same page. In case I am making an incorrect assumption.

      The spec treats PWC's as a separate class of objects from Versions. That is; a PWC is not the latest version until it is checked in. Before that it is not a version. (section 2.1.9.4.1 states "...Until it is checked in (using the checkIn service), the PWC MUST NOT be considered the LatestMajorVersion in the Version Series. )

      So if I have a version series with 3 objects as follows
      V1.0 - V2.0 - pwc
      then the values of cmis:isLatestVersion should be as follows:
      V1.0 (false) - V2.0 (true) - pwc (false)

      If we are in agreement on this point (are we?) Then the TCK class ...tck.tests.versioning.CheckedOutTest (method - checkPWCs )
      at line 73 causes a failure to be added if the pwc's isLatestVersion property is false.
      addResult(assertIsTrue(pwc.isLatestVersion(), null, f));

      This should be changed to assert that the pwc's value should == false.

        Activity

        Hide
        Florian Müller added a comment -

        The PWC is the latest version for users that can see it.

        The latest version is defined in section 2.1.9.2 as:
        "The version that has the most recent LastModificationDate is called the Latest Version of the series, or equivalently, the latest version of any Document object in the series."
        This is true for the PWC.

        The PWC is never the latest major version because it is not considered as a major version. That what's stated in section 2.1.9.4.1.

        Show
        Florian Müller added a comment - The PWC is the latest version for users that can see it. The latest version is defined in section 2.1.9.2 as: "The version that has the most recent LastModificationDate is called the Latest Version of the series, or equivalently, the latest version of any Document object in the series." This is true for the PWC. The PWC is never the latest major version because it is not considered as a major version. That what's stated in section 2.1.9.4.1.
        Hide
        jay brown added a comment -

        OK. I thought that there was a Oasis/CMIS Jira issue where the claim was made that PWCs were not versions, but I can't seem to find it now. Anyway if that was the case then the AllVersions feed would not be able to include PWC's which would be incorrect. So I agree with your assertion. Closing the item. Thanks Florian.

        Show
        jay brown added a comment - OK. I thought that there was a Oasis/CMIS Jira issue where the claim was made that PWCs were not versions, but I can't seem to find it now. Anyway if that was the case then the AllVersions feed would not be able to include PWC's which would be incorrect. So I agree with your assertion. Closing the item. Thanks Florian.
        Hide
        Florent Guillaume added a comment - - edited

        Hi,

        Florian, I'm surprised by this interpretation which is contrary to what I expected. I agree with Jay's initial analysis in the description, that PWCs are a separate class of objects from Versions and are never considered a version or the latest version or the latest major version.

        To support this interpretation here's what's in the spec in another section:

        2.1.9.2 Latest Version
        The version that has the most recent LastModificationDate is called the Latest Version of the series, or equivalently, the latest version of any Document object in the series.

        Reading this, only a version can be the Latest Version. The Latest Version is the most recent of the version series. The PWC does not enter that picture.

        I really think that the sentence:

        Until it is checked in (using the checkIn service), the PWC MUST NOT be considered the LatestMajorVersion in the Version Series.

        is a typo and that it should say Latest Version, not just major.

        I'm reopening as I'd like this raised and clarified in the TC (http://tools.oasis-open.org/issues/browse/CMIS-728).

        Show
        Florent Guillaume added a comment - - edited Hi, Florian, I'm surprised by this interpretation which is contrary to what I expected. I agree with Jay's initial analysis in the description, that PWCs are a separate class of objects from Versions and are never considered a version or the latest version or the latest major version. To support this interpretation here's what's in the spec in another section: 2.1.9.2 Latest Version The version that has the most recent LastModificationDate is called the Latest Version of the series, or equivalently, the latest version of any Document object in the series. Reading this, only a version can be the Latest Version. The Latest Version is the most recent of the version series. The PWC does not enter that picture. I really think that the sentence: Until it is checked in (using the checkIn service), the PWC MUST NOT be considered the LatestMajorVersion in the Version Series. is a typo and that it should say Latest Version, not just major. I'm reopening as I'd like this raised and clarified in the TC ( http://tools.oasis-open.org/issues/browse/CMIS-728 ).
        Hide
        Florian Müller added a comment -

        There is no hint in the spec that the PWC is a standalone object. There are several places in the spec that suggest that the PWC is part of the version series. (For example: "... the PWC MUST NOT be considered the LatestMajorVersion in the Version Series ...") Therefore, the PWC has to follow the version series rules.

        Following the letters of the CMIS 1.0 spec, the PWC is the latest version because it must have the most recent LastModificationDate. We could argue if that make sense, but the spec is pretty clear on that.

        Show
        Florian Müller added a comment - There is no hint in the spec that the PWC is a standalone object. There are several places in the spec that suggest that the PWC is part of the version series. (For example: "... the PWC MUST NOT be considered the LatestMajorVersion in the Version Series ...") Therefore, the PWC has to follow the version series rules. Following the letters of the CMIS 1.0 spec, the PWC is the latest version because it must have the most recent LastModificationDate. We could argue if that make sense, but the spec is pretty clear on that.
        Hide
        Dieter Guendisch added a comment -

        Hi,

        I'm not an expert on the CMIS spec but currently digging into versioning.
        However the first two sentences of Section 2.1.9.4.1 (http://docs.oasis-open.org/cmis/CMIS/v1.0/os/cmis-spec-v1.0.html#_Toc243905414) strongly indicate (at least to me) that PWCs are a different beast than versions:
        1. sentence: "A new version of a versionable Document object is created when the checkIn service is invoked on the Private Working copy (PWC) of this object."
        From this sentence I understand that a new version is born when calling checkIn on the PWC.
        2. sentence: "A PWC is created by invoking checkOut on a versionable Document object."
        From this sencence I read that a PWC is "born" by calling checkOut. As I haven't called checkIn to create the PWC, I have not created a new version.
        I agree that the spec does not forbid a PWC to be a version as well, but it doesn't mandate it nor does it suggest it. I read the opposite from these two sentences.

        Show
        Dieter Guendisch added a comment - Hi, I'm not an expert on the CMIS spec but currently digging into versioning. However the first two sentences of Section 2.1.9.4.1 ( http://docs.oasis-open.org/cmis/CMIS/v1.0/os/cmis-spec-v1.0.html#_Toc243905414 ) strongly indicate (at least to me) that PWCs are a different beast than versions: 1. sentence: "A new version of a versionable Document object is created when the checkIn service is invoked on the Private Working copy (PWC) of this object." From this sentence I understand that a new version is born when calling checkIn on the PWC. 2. sentence: "A PWC is created by invoking checkOut on a versionable Document object." From this sencence I read that a PWC is "born" by calling checkOut. As I haven't called checkIn to create the PWC, I have not created a new version. I agree that the spec does not forbid a PWC to be a version as well, but it doesn't mandate it nor does it suggest it. I read the opposite from these two sentences.
        Hide
        Florian Müller added a comment -

        The PWC is a member of the version series. It therefore can be called a "version" in the context of the spec. Also, getAllVersions() MUST return the PWC, which indicates that it is at least treated as a version.

        Additionally, a document can be created in checked-out state (section 2.1.9.6). The created version series only consists of the PWC. Since all version series MUST have a latest version (section 2.1.9.3), the PWC must be it.

        Show
        Florian Müller added a comment - The PWC is a member of the version series. It therefore can be called a "version" in the context of the spec. Also, getAllVersions() MUST return the PWC, which indicates that it is at least treated as a version. Additionally, a document can be created in checked-out state (section 2.1.9.6). The created version series only consists of the PWC. Since all version series MUST have a latest version (section 2.1.9.3), the PWC must be it.
        Hide
        Dieter Guendisch added a comment -

        As getAllVersions also returns the PWC, I guess you're right

        Show
        Dieter Guendisch added a comment - As getAllVersions also returns the PWC, I guess you're right
        Hide
        jay brown added a comment -

        In yesterday's Oasis CMIS meeting the TC agreed that it was the intent of the spec that PWC's were not to be considered versions. (when discussing http://tools.oasis-open.org/issues/browse/CMIS-728 ) Although this does not change the fact that the current spec (mistakenly) says otherwise. Since the next version of the spec will reflect this I was going to leave our repository the way that it is since it will eventually be correct when the spec is fixed. Can we change the TCK such that it will no longer call this issue out as an error? I understand that technically it cannot call out the 1.0 compliant interpretation as an error either. Perhaps a warning saying that although this is correct it will be changing in the future?

        Show
        jay brown added a comment - In yesterday's Oasis CMIS meeting the TC agreed that it was the intent of the spec that PWC's were not to be considered versions. (when discussing http://tools.oasis-open.org/issues/browse/CMIS-728 ) Although this does not change the fact that the current spec (mistakenly) says otherwise. Since the next version of the spec will reflect this I was going to leave our repository the way that it is since it will eventually be correct when the spec is fixed. Can we change the TCK such that it will no longer call this issue out as an error? I understand that technically it cannot call out the 1.0 compliant interpretation as an error either. Perhaps a warning saying that although this is correct it will be changing in the future?
        Hide
        Florian Müller added a comment -

        I have changed the PWC latest version check from FAILURE to WARNING and added a comment to the message.

        Show
        Florian Müller added a comment - I have changed the PWC latest version check from FAILURE to WARNING and added a comment to the message.
        Hide
        Florian Müller added a comment -

        Changed FAILURE to WARNING. Has to be revisited when we implement CMIS 1.1.

        Show
        Florian Müller added a comment - Changed FAILURE to WARNING. Has to be revisited when we implement CMIS 1.1.

          People

          • Assignee:
            Florian Müller
            Reporter:
            jay brown
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development