You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that there is a potential for artifact reports to conflict with each other. the artifact report filename is based on the display item. consider the alarms module code lines for reporting. it uses only the second line below.
if artifact1 and artifact2 use category names that are different but both call their artifact report names the same (say both want settings), the last one to write will win. this forces module developers to research or hope they are choosing a unique enough name for their report. last resort, it puts responsibility on repo maintainers to manually identify and resolve conflicts.
we should consider and discuss some methods of preventing this potential collision. each thought i have has some possible downsides.
include the category name (line 1 in code block above). this will help with uniqueness and make identification and resolution much easier, but would still require manual verification.
generate unique value for filename. be it random or generative hash, this would provide a much lower likelihood of filename collision. downside is the filenames get ugly. a balance could be a smaller hash like CRC or smaller random appended to the filename so it keeps the readable name on the front with a few chars on the end giving the uniqueness.
move artifact report files to sub-folders. this might be something to consider regardless of this problem as it would clean up the root output folder and leave a clear path for users to know what file to open. downside is it still doesnt 100% name collisions if multiple modules use the same category name, though its much easier to identify and resolve. this could also lead to a restructuring of the report files to where the common components such as header, left nav, footer are built in the main html file, and the content pane is dynamically loaded from artifact files. this can simplify the final report building process since it currently has to duplicate these common components onto each artifact report file as if its a standalone report.
any other thoughts?
it's not an immediate "problem" so theres no pressure to address right now.
The text was updated successfully, but these errors were encountered:
I just noticed that there is a potential for artifact reports to conflict with each other. the artifact report filename is based on the display item. consider the alarms module code lines for reporting. it uses only the second line below.
if
artifact1
andartifact2
use category names that are different but both call their artifact report names the same (say both wantsettings
), the last one to write will win. this forces module developers to research or hope they are choosing a unique enough name for their report. last resort, it puts responsibility on repo maintainers to manually identify and resolve conflicts.we should consider and discuss some methods of preventing this potential collision. each thought i have has some possible downsides.
any other thoughts?
it's not an immediate "problem" so theres no pressure to address right now.
The text was updated successfully, but these errors were encountered: