Skip to content
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 ORIGINAL_TRIGGER link type to ActT/TCT/TSS #355

Merged
merged 8 commits into from Jun 30, 2023

Conversation

magnusbaeck
Copy link
Member

@magnusbaeck magnusbaeck commented Jun 29, 2023

Applicable Issues

Fixes #246

Description of the Change

Add a new ORIGINAL_TRIGGER link type to ActT, TCT, and TSS to be able to describe the retry/retrigger/rebuild relationship of subsequent activities and the original activity.

Alternate Designs

We've quibbled over the name of the link type (see linked issue) but implementation-wise there aren't that many options.

Benefits

Retries can be modeled with Eiffel.

Possible Drawbacks

Introducing another relationship for activities could make it harder to understand.

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Signed-off-by: Magnus Bäck <magnus.back@axis.com>

@magnusbaeck magnusbaeck changed the title Add ORIGINAL_TRIGGER link type to ActT/TCT/TCS Add ORIGINAL_TRIGGER link type to ActT/TCT/TSS Jun 29, 2023
@magnusbaeck
Copy link
Member Author

Note that this PR branch is based on the #354 PR branch. You'll want to filter the PR diff view to only show the last commit. I deliberately haven't added new versions of TCT and TSS since you might have opinions about the wording of the ORIGINAL_TRIGGER documentation.

This new link type is useful to describe the relationship between the
original attempt to complete a task (e.g. a build) and subsequent
activities that retry the first one.
@magnusbaeck
Copy link
Member Author

The PR branch has been rebased and it now based on the master branch instead of the (now merged) PR.

@magnusbaeck
Copy link
Member Author

Here's a diff between newly added event versions and their predecessors:

diff -u schemas/EiffelActivityTriggeredEvent/4.2.0.json schemas/EiffelActivityTriggeredEvent/4.3.0.json
--- definitions/EiffelActivityTriggeredEvent/4.2.0.yml	2023-06-28 22:52:10.317452149 +0200
+++ definitions/EiffelActivityTriggeredEvent/4.3.0.yml	2023-06-29 15:02:32.138578544 +0200
@@ -126,6 +126,18 @@
       any_type: false
       types:
         - EiffelFlowContextDefinedEvent
+  ORIGINAL_TRIGGER:
+    description: 'Used when the current activity is a new attempt at
+      completing a previous activity, typically because the latter failed.
+      Although this activity may have been manually triggered and thus
+      lacks a cause that can be described with Eiffel, this link can be
+      used to convey the second-order cause.'
+    required: false
+    multiple: false
+    targets:
+      any_type: false
+      types:
+        - EiffelActivityTriggeredEvent
   PRECURSOR:
     description: 'Used to declare temporal relationships between
       [activities](../eiffel-syntax-and-usage/glossary.md#activity) in a
@@ -141,6 +153,8 @@
       types:
         - EiffelActivityTriggeredEvent
 _history:
+  - version: 4.3.0
+    changes: Add ORIGINAL_TRIGGER link (see [Issue 246](https://github.com/eiffel-community/eiffel/issues/246)).
   - version: 4.2.0
     introduced_in: edition-arica
     changes: Add schema URL to the meta object (see [Issue 280](https://github.com/eiffel-community/eiffel/issues/280)).
--- schemas/EiffelActivityTriggeredEvent/4.2.0.json	2023-06-24 23:13:33.814444317 +0200
+++ schemas/EiffelActivityTriggeredEvent/4.3.0.json	2023-06-29 15:02:32.138578544 +0200
@@ -18,9 +18,9 @@
         "version": {
           "type": "string",
           "enum": [
-            "4.2.0"
+            "4.3.0"
           ],
-          "default": "4.2.0"
+          "default": "4.3.0"
         },
         "time": {
           "type": "integer"

Copy link
Member

@e-backmark-ericsson e-backmark-ericsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current state of this PR is good enough, so I will not request changes to be made (in order to not hinder it being merged if I'm off later). But I have some wishes for improvements that could be considered if you agree.

definitions/EiffelActivityTriggeredEvent/4.3.0.yml Outdated Show resolved Hide resolved
eiffel-syntax-and-usage/activity-linking.md Outdated Show resolved Hide resolved
eiffel-syntax-and-usage/activity-linking.md Show resolved Hide resolved
eiffel-vocabulary/EiffelActivityTriggeredEvent.md Outdated Show resolved Hide resolved
magnusbaeck and others added 2 commits June 30, 2023 09:28
Co-authored-by: Emil Bäckmark <emil.backmark@ericsson.com>
Co-authored-by: Emil Bäckmark <emil.backmark@ericsson.com>
@magnusbaeck magnusbaeck marked this pull request as ready for review June 30, 2023 09:16
@magnusbaeck magnusbaeck requested a review from a team as a code owner June 30, 2023 09:16
@magnusbaeck
Copy link
Member Author

New diff that includes new TCT and TSS versions:

--- definitions/EiffelActivityTriggeredEvent/4.2.0.yml	2023-06-28 14:36:17.698687697 +0200
+++ definitions/EiffelActivityTriggeredEvent/4.3.0.yml	2023-06-30 11:16:10.146364791 +0200
@@ -126,6 +126,18 @@
       any_type: false
       types:
         - EiffelFlowContextDefinedEvent
+  ORIGINAL_TRIGGER:
+    description: 'Used when the current activity is a new attempt at
+      completing a previous activity, typically because the previous one
+      failed. Although this activity may have been manually triggered and
+      thus lacks a cause that can be described with Eiffel, this link can
+      be used to convey the second-order cause.'
+    required: false
+    multiple: false
+    targets:
+      any_type: false
+      types:
+        - EiffelActivityTriggeredEvent
   PRECURSOR:
     description: 'Used to declare temporal relationships between
       [activities](../eiffel-syntax-and-usage/glossary.md#activity) in a
@@ -141,6 +153,8 @@
       types:
         - EiffelActivityTriggeredEvent
 _history:
+  - version: 4.3.0
+    changes: Add ORIGINAL_TRIGGER link (see [Issue 246](https://github.com/eiffel-community/eiffel/issues/246)).
   - version: 4.2.0
     introduced_in: edition-arica
     changes: Add schema URL to the meta object (see [Issue 280](https://github.com/eiffel-community/eiffel/issues/280)).
--- schemas/EiffelActivityTriggeredEvent/4.2.0.json	2023-06-30 11:14:52.643105581 +0200
+++ schemas/EiffelActivityTriggeredEvent/4.3.0.json	2023-06-30 11:16:10.150364753 +0200
@@ -18,9 +18,9 @@
         "version": {
           "type": "string",
           "enum": [
-            "4.2.0"
+            "4.3.0"
           ],
-          "default": "4.2.0"
+          "default": "4.3.0"
         },
         "time": {
           "type": "integer"
--- definitions/EiffelTestCaseTriggeredEvent/3.4.0.yml	2023-06-28 14:36:17.710687580 +0200
+++ definitions/EiffelTestCaseTriggeredEvent/3.5.0.yml	2023-06-30 11:16:10.146364791 +0200
@@ -174,6 +174,18 @@
         - EiffelCompositionDefinedEvent
         - EiffelSourceChangeCreatedEvent
         - EiffelSourceChangeSubmittedEvent
+  ORIGINAL_TRIGGER:
+    description: 'Used when the current test case execution is a new attempt
+      at completing a previous test case execution, typically because the
+      previous one failed. Although this activity may have been manually
+      triggered and thus lacks a cause that can be described with Eiffel,
+      this link can be used to convey the second-order cause.'
+    required: false
+    multiple: false
+    targets:
+      any_type: false
+      types:
+        - EiffelTestCaseTriggeredEvent
   PRECURSOR:
     description: 'Used to declare temporal relationships between
       [activities](../eiffel-syntax-and-usage/glossary.md#activity) in a
--- schemas/EiffelTestCaseTriggeredEvent/3.4.0.json	2023-06-30 11:14:59.575039340 +0200
+++ schemas/EiffelTestCaseTriggeredEvent/3.5.0.json	2023-06-30 11:16:10.150364753 +0200
@@ -18,9 +18,9 @@
         "version": {
           "type": "string",
           "enum": [
-            "3.4.0"
+            "3.5.0"
           ],
-          "default": "3.4.0"
+          "default": "3.5.0"
         },
         "time": {
           "type": "integer"
--- definitions/EiffelTestSuiteStartedEvent/3.3.0.yml	2023-06-28 14:36:17.714687540 +0200
+++ definitions/EiffelTestSuiteStartedEvent/3.4.0.yml	2023-06-30 11:16:10.146364791 +0200
@@ -145,6 +145,18 @@
       any_type: false
       types:
         - EiffelFlowContextDefinedEvent
+  ORIGINAL_TRIGGER:
+    description: 'Used when the current test suite execution is a new attempt
+      at completing a previous test suite execution, typically because the
+      previous one failed. Although this activity may have been manually triggered
+      and thus lacks a cause that can be described with Eiffel, this link can
+      be used to convey the second-order cause.'
+    required: false
+    multiple: false
+    targets:
+      any_type: false
+      types:
+        - EiffelTestSuiteStartedEvent
   PRECURSOR:
     description: 'Used to declare temporal relationships between
       [activities](../eiffel-syntax-and-usage/glossary.md#activity) in a
--- schemas/EiffelTestSuiteStartedEvent/3.3.0.json	2023-06-30 11:15:01.195023858 +0200
+++ schemas/EiffelTestSuiteStartedEvent/3.4.0.json	2023-06-30 11:16:10.150364753 +0200
@@ -18,9 +18,9 @@
         "version": {
           "type": "string",
           "enum": [
-            "3.3.0"
+            "3.4.0"
           ],
-          "default": "3.3.0"
+          "default": "3.4.0"
         },
         "time": {
           "type": "integer"

@magnusbaeck
Copy link
Member Author

Ha, the newly added test for history table existence caught me. Sorry for not catching this before pushing this and requesting your reviews.

@magnusbaeck magnusbaeck merged commit 9898341 into eiffel-community:master Jun 30, 2023
2 checks passed
@magnusbaeck magnusbaeck deleted the trig branch June 30, 2023 11:03
@magnusbaeck magnusbaeck added protocol All protocol changes and removed enhancement labels Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol All protocol changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better linking from ActT to SCC/SCS
3 participants