You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2023/01/10 22:16:36 UTC

[GitHub] [logging-log4j-tools] ppkarwasz opened a new pull request, #13: Add schema file

ppkarwasz opened a new pull request, #13:
URL: https://github.com/apache/logging-log4j-tools/pull/13

   A schema file might help remembering the new changelog format.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j-tools] vy commented on pull request #13: Add schema file

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on PR #13:
URL: https://github.com/apache/logging-log4j-tools/pull/13#issuecomment-1400221803

   @ppkarwasz, shouldn't we use two separate XSDs: one for `.release.xml` and the other for entry files? Otherwise, if I am not mistaken, a single XSD allows `release` and `entry` elements to be combined in the same document, right?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j-tools] vy commented on a diff in pull request #13: Add schema file

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on code in PR #13:
URL: https://github.com/apache/logging-log4j-tools/pull/13#discussion_r1083531299


##########
.gitignore:
##########
@@ -18,4 +18,8 @@ target/
 *.iml
 *.iws
 /out
-dependency-reduced-pom.xml
+.flattened-pom.xml

Review Comment:
   Is this necessary? I tried to make sure `flatten-maven-plugin` always outputs to `target`, have I missed something?



##########
log4j-changelog/src/main/resources/log4j-changelog.xsd:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+
+      https://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+  targetNamespace="https://logging.apache.org/log4j/log4j-changelog"
+  xmlns:cl="https://logging.apache.org/log4j/log4j-changelog" elementFormDefault="qualified">
+
+  <element name="release">
+    <complexType>
+      <simpleContent>
+        <extension base="string">
+          <attribute name="version" use="required"/>
+          <attribute name="date" use="required">
+            <simpleType>
+              <union memberTypes="date cl:tbd"/>
+            </simpleType>
+          </attribute>
+        </extension>
+      </simpleContent>
+    </complexType>
+  </element>
+
+  <simpleType name="tbd">
+    <restriction base="string">
+      <enumeration value="TBD"/>
+    </restriction>
+  </simpleType>
+
+  <element name="entry">
+    <complexType>
+      <sequence>
+        <element name="issue" type="cl:issueType" minOccurs="0" maxOccurs="unbounded"/>
+        <element name="author" type="cl:authorType" maxOccurs="unbounded"/>
+        <element name="description" type="cl:descriptionType"/>
+      </sequence>
+      <attribute name="type" type="cl:changeType" use="required"/>
+    </complexType>
+  </element>
+
+  <complexType name="issueType">
+    <simpleContent>
+      <extension base="string">
+        <attribute name="id" type="ID" use="required"/>

Review Comment:
   Judging from our conversation with you, `type` needs to be replaced with `string` here, since IDs in GitHub Issues are positive integers.
   
   ```suggestion
           <attribute name="id" type="string" use="required"/>
   ```



##########
log4j-changelog/src/main/resources/log4j-changelog.xsd:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+
+      https://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+  targetNamespace="https://logging.apache.org/log4j/log4j-changelog"
+  xmlns:cl="https://logging.apache.org/log4j/log4j-changelog" elementFormDefault="qualified">

Review Comment:
   We better have some versioning:
   
   ```suggestion
                    targetNamespace="https://logging.apache.org/log4j/changelog/1.0.0"
                    xmlns:cl="https://logging.apache.org/log4j/changelog/1.0.0"
                    elementFormDefault="qualified">
   ```



##########
log4j-changelog/src/main/resources/log4j-changelog.xsd:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+
+      https://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+  targetNamespace="https://logging.apache.org/log4j/log4j-changelog"
+  xmlns:cl="https://logging.apache.org/log4j/log4j-changelog" elementFormDefault="qualified">
+
+  <element name="release">
+    <complexType>
+      <simpleContent>
+        <extension base="string">
+          <attribute name="version" use="required"/>
+          <attribute name="date" use="required">
+            <simpleType>
+              <union memberTypes="date cl:tbd"/>
+            </simpleType>
+          </attribute>
+        </extension>
+      </simpleContent>
+    </complexType>
+  </element>
+
+  <simpleType name="tbd">
+    <restriction base="string">
+      <enumeration value="TBD"/>
+    </restriction>
+  </simpleType>
+
+  <element name="entry">
+    <complexType>
+      <sequence>
+        <element name="issue" type="cl:issueType" minOccurs="0" maxOccurs="unbounded"/>
+        <element name="author" type="cl:authorType" maxOccurs="unbounded"/>
+        <element name="description" type="cl:descriptionType"/>
+      </sequence>
+      <attribute name="type" type="cl:changeType" use="required"/>
+    </complexType>
+  </element>
+
+  <complexType name="issueType">
+    <simpleContent>
+      <extension base="string">
+        <attribute name="id" type="ID" use="required"/>
+        <attribute name="link" type="anyURI" use="required"/>
+      </extension>
+    </simpleContent>
+  </complexType>
+
+  <simpleType name="changeType">
+    <restriction base="string">
+      <enumeration value="added"/>
+      <enumeration value="changed"/>
+      <enumeration value="deprecated"/>
+      <enumeration value="removed"/>
+      <enumeration value="fixed"/>

Review Comment:
   Let's stick to the Keep-a-changelog spec for the time being. I will discuss this further in the `dev@` mailing list.
   ```suggestion
         <enumeration value="fixed"/>
         <enumeration value="security"/>
   ```



##########
log4j-changelog/src/main/resources/log4j-changelog.xsd:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+
+      https://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+  targetNamespace="https://logging.apache.org/log4j/log4j-changelog"
+  xmlns:cl="https://logging.apache.org/log4j/log4j-changelog" elementFormDefault="qualified">
+
+  <element name="release">
+    <complexType>
+      <simpleContent>
+        <extension base="string">
+          <attribute name="version" use="required"/>
+          <attribute name="date" use="required">
+            <simpleType>
+              <union memberTypes="date cl:tbd"/>
+            </simpleType>

Review Comment:
   No, a `.release.xml` cannot have a `TBD` date. It *must* be a valid date in `YYYY-mm-dd` format.



##########
log4j-changelog/src/main/resources/log4j-changelog.xsd:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+
+      https://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+  targetNamespace="https://logging.apache.org/log4j/log4j-changelog"
+  xmlns:cl="https://logging.apache.org/log4j/log4j-changelog" elementFormDefault="qualified">
+
+  <element name="release">
+    <complexType>
+      <simpleContent>
+        <extension base="string">
+          <attribute name="version" use="required"/>
+          <attribute name="date" use="required">
+            <simpleType>
+              <union memberTypes="date cl:tbd"/>
+            </simpleType>
+          </attribute>
+        </extension>
+      </simpleContent>
+    </complexType>
+  </element>
+
+  <simpleType name="tbd">
+    <restriction base="string">
+      <enumeration value="TBD"/>
+    </restriction>
+  </simpleType>
+
+  <element name="entry">
+    <complexType>
+      <sequence>
+        <element name="issue" type="cl:issueType" minOccurs="0" maxOccurs="unbounded"/>
+        <element name="author" type="cl:authorType" maxOccurs="unbounded"/>
+        <element name="description" type="cl:descriptionType"/>
+      </sequence>
+      <attribute name="type" type="cl:changeType" use="required"/>
+    </complexType>
+  </element>
+
+  <complexType name="issueType">
+    <simpleContent>
+      <extension base="string">
+        <attribute name="id" type="ID" use="required"/>
+        <attribute name="link" type="anyURI" use="required"/>
+      </extension>
+    </simpleContent>
+  </complexType>
+
+  <simpleType name="changeType">
+    <restriction base="string">
+      <enumeration value="added"/>
+      <enumeration value="changed"/>
+      <enumeration value="deprecated"/>
+      <enumeration value="removed"/>
+      <enumeration value="fixed"/>
+    </restriction>
+  </simpleType>
+
+  <complexType name="authorType">
+    <simpleContent>
+      <extension base="string">
+        <attribute name="id" type="ID"/>

Review Comment:
   Question: How do `type="ID"` and `type="string"` differ in our context?



##########
log4j-changelog/src/main/resources/log4j-changelog.xsd:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+
+      https://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+  targetNamespace="https://logging.apache.org/log4j/log4j-changelog"
+  xmlns:cl="https://logging.apache.org/log4j/log4j-changelog" elementFormDefault="qualified">
+
+  <element name="release">
+    <complexType>
+      <simpleContent>
+        <extension base="string">
+          <attribute name="version" use="required"/>
+          <attribute name="date" use="required">
+            <simpleType>
+              <union memberTypes="date cl:tbd"/>
+            </simpleType>
+          </attribute>
+        </extension>
+      </simpleContent>
+    </complexType>
+  </element>
+
+  <simpleType name="tbd">
+    <restriction base="string">
+      <enumeration value="TBD"/>
+    </restriction>
+  </simpleType>
+
+  <element name="entry">
+    <complexType>
+      <sequence>
+        <element name="issue" type="cl:issueType" minOccurs="0" maxOccurs="unbounded"/>
+        <element name="author" type="cl:authorType" maxOccurs="unbounded"/>
+        <element name="description" type="cl:descriptionType"/>
+      </sequence>
+      <attribute name="type" type="cl:changeType" use="required"/>
+    </complexType>
+  </element>
+
+  <complexType name="issueType">
+    <simpleContent>
+      <extension base="string">
+        <attribute name="id" type="ID" use="required"/>
+        <attribute name="link" type="anyURI" use="required"/>
+      </extension>
+    </simpleContent>
+  </complexType>
+
+  <simpleType name="changeType">
+    <restriction base="string">
+      <enumeration value="added"/>
+      <enumeration value="changed"/>
+      <enumeration value="deprecated"/>
+      <enumeration value="removed"/>
+      <enumeration value="fixed"/>
+    </restriction>
+  </simpleType>
+
+  <complexType name="authorType">
+    <simpleContent>
+      <extension base="string">
+        <attribute name="id" type="ID"/>
+        <attribute name="name"/>
+      </extension>
+    </simpleContent>
+  </complexType>
+
+  <complexType name="descriptionType">
+    <simpleContent>
+      <extension base="string">
+        <attribute name="type" use="required"/>

Review Comment:
   ```suggestion
           <attribute name="format" type="string" use="required" fixed="asciidoc"/>
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j-tools] ppkarwasz commented on a diff in pull request #13: Add schema file

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on code in PR #13:
URL: https://github.com/apache/logging-log4j-tools/pull/13#discussion_r1083982125


##########
.gitignore:
##########
@@ -18,4 +18,8 @@ target/
 *.iml
 *.iws
 /out
-dependency-reduced-pom.xml
+.flattened-pom.xml

Review Comment:
   Maybe not, I just replaced `dependency-reduced-pom.xml` with `.flattened-pom.xml`. Didn't check if this applies.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j-tools] ppkarwasz commented on a diff in pull request #13: Add schema file

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on code in PR #13:
URL: https://github.com/apache/logging-log4j-tools/pull/13#discussion_r1083988844


##########
log4j-changelog/src/main/resources/log4j-changelog.xsd:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+
+      https://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+  targetNamespace="https://logging.apache.org/log4j/log4j-changelog"
+  xmlns:cl="https://logging.apache.org/log4j/log4j-changelog" elementFormDefault="qualified">

Review Comment:
   I would rather keep the namespace constant, but add a `version` attribute (with a single possible value). Like `web-app-versionType` in the Servlet API: https://jakarta.ee/xml/ns/jakartaee/web-common_5_0.xsd



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j-tools] ppkarwasz commented on a diff in pull request #13: Add schema file

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on code in PR #13:
URL: https://github.com/apache/logging-log4j-tools/pull/13#discussion_r1083995629


##########
log4j-changelog/src/main/resources/log4j-changelog.xsd:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+
+      https://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+  targetNamespace="https://logging.apache.org/log4j/log4j-changelog"
+  xmlns:cl="https://logging.apache.org/log4j/log4j-changelog" elementFormDefault="qualified">
+
+  <element name="release">
+    <complexType>
+      <simpleContent>
+        <extension base="string">
+          <attribute name="version" use="required"/>
+          <attribute name="date" use="required">
+            <simpleType>
+              <union memberTypes="date cl:tbd"/>
+            </simpleType>
+          </attribute>
+        </extension>
+      </simpleContent>
+    </complexType>
+  </element>
+
+  <simpleType name="tbd">
+    <restriction base="string">
+      <enumeration value="TBD"/>
+    </restriction>
+  </simpleType>
+
+  <element name="entry">
+    <complexType>
+      <sequence>
+        <element name="issue" type="cl:issueType" minOccurs="0" maxOccurs="unbounded"/>
+        <element name="author" type="cl:authorType" maxOccurs="unbounded"/>
+        <element name="description" type="cl:descriptionType"/>
+      </sequence>
+      <attribute name="type" type="cl:changeType" use="required"/>
+    </complexType>
+  </element>
+
+  <complexType name="issueType">
+    <simpleContent>
+      <extension base="string">
+        <attribute name="id" type="ID" use="required"/>
+        <attribute name="link" type="anyURI" use="required"/>
+      </extension>
+    </simpleContent>
+  </complexType>
+
+  <simpleType name="changeType">
+    <restriction base="string">
+      <enumeration value="added"/>
+      <enumeration value="changed"/>
+      <enumeration value="deprecated"/>
+      <enumeration value="removed"/>
+      <enumeration value="fixed"/>
+    </restriction>
+  </simpleType>
+
+  <complexType name="authorType">
+    <simpleContent>
+      <extension base="string">
+        <attribute name="id" type="ID"/>

Review Comment:
   If `id` must be the username of an Apache Logging Services committer, I think that `ID` should be enough.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j-tools] vy merged pull request #13: Add schema file

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy merged PR #13:
URL: https://github.com/apache/logging-log4j-tools/pull/13


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org