[Notes] [Git][BuildStream/buildstream][tristan/fix-terminated-status] 3 commits: cli.py: Add an obsoletion note to our deprecated commands.



Title: GitLab

Tristan Van Berkom pushed to branch tristan/fix-terminated-status at BuildStream / buildstream

Commits:

3 changed files:

Changes:

  • buildstream/_frontend/cli.py
    ... ... @@ -1106,7 +1106,7 @@ def artifact_log(app, artifacts):
    1106 1106
     ##################################################################
    
    1107 1107
     #                          Fetch Command                         #
    
    1108 1108
     ##################################################################
    
    1109
    -@cli.command(short_help="Fetch sources in a pipeline", hidden=True)
    
    1109
    +@cli.command(short_help="COMMAND OBSOLETE - Fetch sources in a pipeline", hidden=True)
    
    1110 1110
     @click.option('--except', 'except_', multiple=True,
    
    1111 1111
                   type=click.Path(readable=False),
    
    1112 1112
                   help="Except certain dependencies from fetching")
    
    ... ... @@ -1128,7 +1128,7 @@ def fetch(app, elements, deps, track_, except_, track_cross_junctions):
    1128 1128
     ##################################################################
    
    1129 1129
     #                          Track Command                         #
    
    1130 1130
     ##################################################################
    
    1131
    -@cli.command(short_help="Track new source references", hidden=True)
    
    1131
    +@cli.command(short_help="COMMAND OBSOLETE - Track new source references", hidden=True)
    
    1132 1132
     @click.option('--except', 'except_', multiple=True,
    
    1133 1133
                   type=click.Path(readable=False),
    
    1134 1134
                   help="Except certain dependencies from tracking")
    
    ... ... @@ -1148,7 +1148,7 @@ def track(app, elements, deps, except_, cross_junctions):
    1148 1148
     ##################################################################
    
    1149 1149
     #                        Checkout Command                        #
    
    1150 1150
     ##################################################################
    
    1151
    -@cli.command(short_help="Checkout a built artifact", hidden=True)
    
    1151
    +@cli.command(short_help="COMMAND OBSOLETE - Checkout a built artifact", hidden=True)
    
    1152 1152
     @click.option('--force', '-f', default=False, is_flag=True,
    
    1153 1153
                   help="Allow files to be overwritten")
    
    1154 1154
     @click.option('--deps', '-d', default='run',
    
    ... ... @@ -1175,7 +1175,7 @@ def checkout(app, element, location, force, deps, integrate, hardlinks, tar):
    1175 1175
     ################################################################
    
    1176 1176
     #                          Pull Command                        #
    
    1177 1177
     ################################################################
    
    1178
    -@cli.command(short_help="Pull a built artifact", hidden=True)
    
    1178
    +@cli.command(short_help="COMMAND OBSOLETE - Pull a built artifact", hidden=True)
    
    1179 1179
     @click.option('--deps', '-d', default='none',
    
    1180 1180
                   type=click.Choice(['none', 'all']),
    
    1181 1181
                   help='The dependency artifacts to pull (default: none)')
    
    ... ... @@ -1192,7 +1192,7 @@ def pull(app, elements, deps, remote):
    1192 1192
     ##################################################################
    
    1193 1193
     #                           Push Command                         #
    
    1194 1194
     ##################################################################
    
    1195
    -@cli.command(short_help="Push a built artifact", hidden=True)
    
    1195
    +@cli.command(short_help="COMMAND OBSOLETE - Push a built artifact", hidden=True)
    
    1196 1196
     @click.option('--deps', '-d', default='none',
    
    1197 1197
                   type=click.Choice(['none', 'all']),
    
    1198 1198
                   help='The dependencies to push (default: none)')
    

  • buildstream/_scheduler/jobs/job.py
    ... ... @@ -184,6 +184,16 @@ class Job():
    184 184
     
    
    185 185
             self._terminated = True
    
    186 186
     
    
    187
    +    # get_terminated()
    
    188
    +    #
    
    189
    +    # Check if a job has been terminated.
    
    190
    +    #
    
    191
    +    # Returns:
    
    192
    +    #     (bool): True in the main process if Job.terminate() was called.
    
    193
    +    #
    
    194
    +    def get_terminated(self):
    
    195
    +        return self._terminated
    
    196
    +
    
    187 197
         # terminate_wait()
    
    188 198
         #
    
    189 199
         # Wait for terminated jobs to complete
    

  • buildstream/_scheduler/queues/queue.py
    ... ... @@ -305,7 +305,7 @@ class Queue():
    305 305
                 self._done_queue.append(element)
    
    306 306
     
    
    307 307
                 # These lists are for bookkeeping purposes for the UI and logging.
    
    308
    -            if status == JobStatus.SKIPPED:
    
    308
    +            if status == JobStatus.SKIPPED or job.get_terminated():
    
    309 309
                     self.skipped_elements.append(element)
    
    310 310
                 elif status == JobStatus.OK:
    
    311 311
                     self.processed_elements.append(element)
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]