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

Debugging and logging improvements #476

Merged
merged 30 commits into from
Oct 6, 2022
Merged

Debugging and logging improvements #476

merged 30 commits into from
Oct 6, 2022

Conversation

grafnu
Copy link
Collaborator

@grafnu grafnu commented Oct 3, 2022

No description provided.

@grafnu grafnu marked this pull request as ready for review October 5, 2022 22:08
@@ -57,7 +57,7 @@ if [[ $i -eq $WAITING ]]; then
false
fi

bin/sequencer -v $site_path $project_id $device_id $serial_no
bin/sequencer ${SEQUENCER_OPTS} $site_path $project_id $device_id $serial_no
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we be consistent about $ { } braces (I prefer the latter)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure what you mean by "latter" as you only mention one, but I made it consistent with the others on the line.

@@ -599,7 +601,7 @@ protected void updateConfig(String reason) {
updateConfig(SubFolder.LOCALNET, deviceConfig.localnet);
updateConfig(SubFolder.BLOBSET, deviceConfig.blobset);
updateConfig(SubFolder.DISCOVERY, deviceConfig.discovery);
recordDeviceConfig(reason);
localConfigChange(reason);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can't comment on L 636 here.

I am a little concerned about adding arbitrary fields that can't be validated by the schema. Could we consider putting the nonce field, without the field itself being defined by the schema, into a "debug" map that IS formally defined? We can define the whole thing as hands-off/no expectations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The field should never be exposed to a place where it should be validated. It's meant to be low-level under-the-hood, which means that it should be removed before anything "external" to the core sees it. Adding it to the schema in some way implies that it has some semantic meaning that people "outside the core" should care about, which it very much explicitly is not.

The debug section would work, yes -- but -- I don't have much more time to spend on this (other things are backed up), so the options I'd put out there are 1) not for now, maybe later, 2) not submit this and have it linger, 3) you could pick it up and convert to the debug structure. I'm not a big fan of #2, and also consider that for better of worse the config nonce field is already there (it's not new) -- this is just cleaning it up some.

Copy link
Collaborator

Choose a reason for hiding this comment

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

How about renaming it to debug_nonce? That would achieve more goals and make it stand out more as hands-off.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed to debug_config_nonce

@@ -599,7 +601,7 @@ protected void updateConfig(String reason) {
updateConfig(SubFolder.LOCALNET, deviceConfig.localnet);
updateConfig(SubFolder.BLOBSET, deviceConfig.blobset);
updateConfig(SubFolder.DISCOVERY, deviceConfig.discovery);
recordDeviceConfig(reason);
localConfigChange(reason);
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about renaming it to debug_nonce? That would achieve more goals and make it stand out more as hands-off.

@grafnu grafnu merged commit a7d3db4 into faucetsdn:master Oct 6, 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