Skip to content

Conversation

@edsonCVN
Copy link
Contributor

@edsonCVN edsonCVN commented Oct 20, 2025

Introduce logging in the Oracle operations, similar to what we already
have in the SATP operations. Each operation include the following log
entries:

  1. Log "init" before starting the operation.
  2. Log "exec" immediately before executing the operation.
  3. After the operation is executed:
    • Log "done" if it was successful.
    • Log "fail" if it failed.

@edsonCVN edsonCVN force-pushed the oracle-logging branch 5 times, most recently from 5bbb367 to a1ede63 Compare October 20, 2025 13:24
@AndreAugusto11 AndreAugusto11 marked this pull request as ready for review October 20, 2025 14:13
@RafaelAPB RafaelAPB linked an issue Oct 20, 2025 that may be closed by this pull request
Copy link
Contributor

@AndreAugusto11 AndreAugusto11 left a comment

Choose a reason for hiding this comment

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

@edsonCVN could you please add some very simple tests to make sure everything is working as expected?

@AndreAugusto11
Copy link
Contributor

@edsonCVN, also merge both commits into a single one, update the description of the commit (and the PR) mentioning the linked issue that will be closed once this is merged

@edsonCVN
Copy link
Contributor Author

@edsonCVN, also merge both commits into a single one, update the description of the commit (and the PR) mentioning the linked issue that will be closed once this is merged

Thank you, I will do it

@edsonCVN
Copy link
Contributor Author

@edsonCVN could you please add some very simple tests to make sure everything is working as expected?

Thank you, I will add the test

@edsonCVN edsonCVN force-pushed the oracle-logging branch 2 times, most recently from cfb9eb8 to c621fdf Compare October 27, 2025 13:29
@edsonCVN edsonCVN changed the title feat(satp-hermes): logs in oracle operations fix(satp-hermes): logs in oracle operations Oct 27, 2025
@edsonCVN edsonCVN force-pushed the oracle-logging branch 7 times, most recently from b0adf70 to 42835c4 Compare October 30, 2025 16:57
@edsonCVN edsonCVN force-pushed the oracle-logging branch 2 times, most recently from 12695e6 to d3296f6 Compare November 10, 2025 11:24
@@ -0,0 +1,276 @@
import "jest-extended";
Copy link
Contributor

Choose a reason for hiding this comment

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

These tests are insufficient. We need to assert that, running a gateway with an oracle component, logs are sent to the stdout. The current test uses mocks and therefore does not give us the confidence that the current functionality works

Copy link
Contributor

@RafaelAPB RafaelAPB left a comment

Choose a reason for hiding this comment

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

Please make sure to add robust tests

Introduce logging in the Oracle operations, similar to what we already
have in the SATP operations. Each operation include the following log
entries:

1. Log "init" before starting the operation.
2. Log "exec" immediately before executing the operation.
3. After the operation is executed:
    - Log "done" if it was successful.
    - Log "fail" if it failed.

Closes hyperledger-cacti#3946

Signed-off-by: Edson da Veiga <edson.da.veiga@tecnico.ulisboa.pt>
Signed-off-by: Edson da Veiga <edson.da.veiga@tecnico.ulisboa.pt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(satp-hermes): create logs in oracle operations

3 participants