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

Correct writeback_state sequence test #450

Merged
merged 29 commits into from
Sep 21, 2022

Conversation

noursaidi
Copy link
Collaborator

Correct behaviour of writeback_state sequence test

@noursaidi
Copy link
Collaborator Author

@grafnu what needs to be done to fix the generated.md as below:

Looking at the other sequences, it should at least include the change config, e.g.:

1. Update config for writeback
 * Set "pointset.points.filter_alarm_pressure_status.set_value" = false
 * Set "pointset.points.filter_differential_pressure_setpoint.set_value" = 60
 * Set "pointset.points.filter_differential_pressure_sensor.set_value" = 15

And ideally it would include some of the metadata around the tests

invalidTarget.target_point = invalidTarget.target_value
failureTarget.target_point = failureTarget.target_value
appliedTarget.target_point = appliedTarget.target_value

@grafnu
Copy link
Collaborator

grafnu commented Sep 12, 2022 via email

@noursaidi
Copy link
Collaborator Author

At the moment the values/config diffs don't show up in generated.md at all.

The specific values would not be documented (as they're device specific), rather what they represent should

So looking at one line from the example in my comment, Instead of showing something like
* Set "pointset.points.filter_alarm_pressure_status.set_value" = false.

The point filter_alarm_pressure_status.set_value and the value false both come from invalidTarget.target_point and invalidTarget.target_value in the Java code respectively.

Ideally, we would document in generated.md something generic e.g. * Set "pointset.points.INVALID_POINT.set_value" = INVALID_VALUE instead

@grafnu
Copy link
Collaborator

grafnu commented Sep 12, 2022 via email

@noursaidi
Copy link
Collaborator Author

Thanks Trevor for you PR, seems to have fixed the bug so generated.md now accurately represents

But it's introduce an error with the single_scan and periodic_scan - Test failed: Unexpected non-semantic Date in semantic value calculation - relevant diffs and logs in this test run -> https://github.com/noursaidi/udmi/actions/runs/3044131852/jobs/4904263182#step:5:11915

@noursaidi noursaidi marked this pull request as ready for review September 13, 2022 15:31
Copy link
Collaborator

@grafnu grafnu left a comment

Choose a reason for hiding this comment

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

Oy, I think this needs a merge with master before review! (GitHub algorithms seem to be bad??!)

@noursaidi noursaidi force-pushed the writeback_test1 branch 2 times, most recently from c9a0697 to 05b93a1 Compare September 14, 2022 08:48
@noursaidi
Copy link
Collaborator Author

@grafnu made a mistake when I did a merge hence the issues you saw (I think GitHub's algos were fine)

There are still 249 modified files, but the bulk of these are the sequencer outputs in validator/sequences, I copied in my latest run. All other changed files are as expected and should be reviewed.

bin/clone_model Outdated
@@ -5,7 +5,7 @@ mkdir -p $ROOT_DIR/sites
cd $ROOT_DIR/sites

MODEL_DIR=udmi_site_model
MODEL_VER=1.7
MODEL_VER=808aa06fbe922b9f749d2a6b52ff03b6f9074b48
Copy link
Collaborator

Choose a reason for hiding this comment

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

needs 1.8 tag

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do, but you also need to create a 1.8 tag for that repo.

@@ -6,5 +6,5 @@
"subType" : "config",
"category" : "commands",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these should be added to .gitattributes to ignore the diffs so it's clear to the reviewer!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What files need to be included in this directory? Without any redaction, all the files will change with every run except for the sequence.md? Should we only include sequence.md and ignore the rest?

@grafnu
Copy link
Collaborator

grafnu commented Sep 14, 2022 via email

@grafnu
Copy link
Collaborator

grafnu commented Sep 14, 2022 via email

@noursaidi
Copy link
Collaborator Author

Great, CI test all clear now so should be mergeable. I've also made the requested to .gitattributes.

I was just stating all the files will be modified when they're copied over (because timestamps, etc), including for those tests which did not change. I was just wondering if all the files were needed or some redaction was needed, but as you said its good to have the complete set

@grafnu
Copy link
Collaborator

grafnu commented Sep 16, 2022

Nour, can you separate out all the "I don't care" log files into a separate PR and then either push that through or have this PR against that one? Even though they're not visible by default, it's near impossible to review this PR because of the sheer number of "must ignore" files, and there's ways around that!

@@ -111,6 +111,9 @@ jobs:
more /tmp/sequencer.out
diff -u /tmp/sequencer.out etc/sequencer.out
diff -u /tmp/generated.md docs/specs/sequences/generated.md
ls -1 validator/sequences | xargs -I% diff -u \
Copy link
Collaborator

Choose a reason for hiding this comment

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

be warned, what I discovered the other day is that the shell in GitHub Actions doesn't always process failure conditions correctly. Did you check that this actually fails the run when there's a problem? ( You could quickly check by tweaking the validator/sequences/%/sequence.md file)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, I've checked and it does fail when there is a difference or missing file.

@noursaidi noursaidi merged commit 8d6fd1b into faucetsdn:master Sep 21, 2022
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.

None yet

2 participants