-
Notifications
You must be signed in to change notification settings - Fork 28
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
[FASTEN server] Fix paths in input records on-the-fly #445
base: develop
Are you sure you want to change the base?
Conversation
@mir-am I am a bit confused, didn't the FASTEN server have the |
Should it say that an optional |
I am not 100% sure yet, whether the proposed fix addresses the problem, as the broken path might be in different locations in the @gdrosos or @michelescarlato: Could you chime in here and help to clarify a bit, in which cases messages currently contain broken paths and how these paths should be fixed? One fundamental problem with our current file handling is that we have multiple base paths and it is impossible to distinguish them... we have the FASTEN base folder that is mounted ( What I would therefore advocate for is that we should either 1) have multiple of these base path variables (e.g., The challenge that we are facing is that replacing file paths is a fundamental change which might break multiple components in the system, so we need to be extra careful before we put this into production. @mir-am As a minor request, please stop introducing these ultra-short names, as it becomes really hard to decipher what they mean. There is no harm in using a full name to describe the option, the only moment in which they are used is in a config file, so "readability" > "saved keystrokes". |
Sorry, I've corrected the PR text. The introduced CLI arg is
Only plug-ins that have So, if a plug-in has It also works with absolute paths for backward compatibility. |
I agree with Sebastian that this is quite a fundamental change, which can impact many components. What path-containing-fields are we actually changing here? There is We should keep in mind that other plugins, also non-Java ones, should be able to be configured easily to account for paths becoming relative. Since we are trying to synchronise these paths across plugins, I always thought have a sort-of "shared root" was not a bad idea, and it seems |
At the moment, there are no issues, but the issue arises, for example, when we want to move fasten data ( That said, I agree that this is a fundamental change and we should consider all the possible consequences and involve partners. |
Some messages of the output topic of the cscout which is employed to produce C Call Graphs contained broken paths due to a minor bug described here. I have fixed the issue and I am redeploying the plugin on the |
@gdrosos, is the path to C call graphs absolute or relative? |
The path specifying the sourcePath is absolute in both CScout and PyCG. Also I noticed that the messages of the MetadataBBCExtension also contain aboslute paths in the payload field |
Description
This PR makes the following changes to the FASTEN server:
--pi
, which is a base directory for reading input records. E.g., the MetadataDBExtension requires this argument as it reads CG files from the disk.fixPathInRecord
, which adds the base directory to the relative paths so that the plug-ins can read input records.dir
field ofpayload
in the output records.This is a backward-compatible change. Therefore, output records with absolute paths can still be processed.
Motivation and context
As discussed in the previous dev. call, in output records, we would like to store relative paths to the FASTEN data on the disk such as CGs and GID graphs.
Testing
Tested with the DC locally.
Task list
--pi
argument to the Docker compose setup.--pi
argument to the production deployments