Project

Profile

Help

Story #5184

Updated by bmbouter over 4 years ago

h3. Problem 

 Currently the progress reports on a sync task look like this: 

 <pre> 
       progress_reports: 
       - message: Downloading Metadata 
         state: running 
         total: 10 
         done: 5 
         suffix: 
       - message: Downloading Artifacts 
         state: running 
         total: 10 
         done: 5 
         suffix: 
       - message: Associating Content 
         state: running 
         total: 10 
         done: 5 
         suffix: 
 </pre> 

 when trying to parse these, we have to use the 'message' field which is english text.    This text is internationalized and could be different system, to system, or if a user changes their language settings post installation. 

 It would be better if there was some 'key' that we could use such as 'associate.content' that we could be assured would never change or be affected by internationalization. 

 h3. Solution 

 Add a required field to "ProgressReport":https://github.com/pulp/pulpcore/blob/master/pulpcore/app/models/progress.py#L21 named <code>msg_id</code> that stores a 36 character long string. The intent of this string is that it identifies that type of progress report. It's different than the pk of the progress report which is different between two runs of the same task. This ID would be the same for all runs of that task code. It would not be internationalized. 

 36 is chosen in case the user wants to store UUIDs in this field.

Back