• Home
  • Raw
  • Download

Lines Matching +full:delete +full:- +full:branch

7 #      http://www.apache.org/licenses/LICENSE-2.0
42 # ------------------------------------------------------------------------------
44 # ------------------------------------------------------------------------------
52 - Auditability in logs: it's easier to scrape logs and debug.
53 - Stability: an exception fails only the current task not the whole function.
54 - Reliability: The AppEngine runtime will retry failed tasks with exponential
56 - Performance: tasks are run concurrently, which is quite important given that
60 queue_name='deferred-jobs',
107 # ------------------------------------------------------------------------------
109 # ------------------------------------------------------------------------------
121 if now - last_tick < GERRIT_POLL_SEC - 1:
134 date_limit = (datetime.utcnow() - timedelta(days=1)).strftime('%Y-%m-%d')
137 url += '&q=branch:main+project:%s' % GERRIT_PROJECT
144 prs_ready = change['labels'].get('Presubmit-Ready', {}).get('approved', {})
147 # account or are marked as Presubmit-Verified by a trustd account.
164 Jobs are keyed by timestamp-cl-patchset-config to get a fair schedule (workers
174 job_id = '%s--%s--%s' % (timestamp, src.replace('/', '-'), cfg_name)
190 If exists check if a Presubmit-Ready label has been added and if so updates it
204 # might have addeed a Presubmit-Ready label after we created the CL. In
206 vote_prop = req('GET', '%s/cls/%s-%s/wants_vote.json' % (DB, cl, patchset))
209 logging.info('Updating wants_vote flag on %s-%s', cl, patchset)
210 req('PUT', '%s/cls/%s-%s/wants_vote.json' % (DB, cl, patchset), body=True)
213 defer('check_pending_cl', cl_and_ps='%s-%s' % (cl, patchset))
221 src = 'cls/%s-%s' % (cl, patchset)
224 patch_obj['cls_pending/%s-%s' % (cl, patchset)] = 0
239 first_key = '%s-0' % cl
240 last_key = '%s-z' % cl
244 ps = int(cl_and_ps.split('-')[-1])
261 # Presubmit-Ready label is applied after we have finished running all the
275 age_sec = (datetime.utcnow() - t_queued).total_seconds()
286 'cls_pending/%s' % cl_and_ps: {}, # = DELETE
318 if '-ui-' in job_id:
322 'https://storage.googleapis.com/%s/%s/ui-test-artifacts/index.html' %
327 cl_vote = -1
338 '- %s/%s (%s)\n' % (log_url, job_id, status)
343 msg += ''.join(['- %s/%s\n' % (log_url, job_id) for job_id in passed_jobs])
345 msg += '\nArtifacts:\n' + ''.join('- %s\n' % link for link in ui_links)
347 msg += '- https://ci.perfetto.dev/#!/cls/%s\n' % cl_and_ps.split('-')[0]
350 body['labels']['Code-Review'] = cl_vote
359 '''Creates the jobs entries in the DB for the given branch or revision
362 1. ?branch=main: Will retrieve the SHA1 of main and call the one below.
363 2. ?branch=main&rev=deadbeef1234: queues jobs for the given revision.
366 branch = handler.request.get('branch')
368 assert branch
371 # Get the commit SHA1 of the head of the branch.
372 url = 'https://%s/a/projects/%s/branches/%s' % (GERRIT_HOST, prj, branch)
375 defer('queue_postsubmit_jobs', branch=branch, revision=revision)
382 time_committed = datetime.strptime(time_committed, '%Y-%m-%d %H:%M:%S')
385 src = 'branches/%s-%s' % (branch, time_committed.strftime('%Y%m%d%H%M%S'))
397 ref = 'refs/heads/' + branch
411 age = (datetime.now() - time_started).total_seconds()
424 'jobs_running/%s' % job_id: {}, # = DELETE,
425 'jobs_queued/%s' % job_id: {}, # = DELETE,
436 age_days = (datetime.now() - datetime.strptime(job_id[:8], '%Y%m%d')).days
442 req('DELETE', '%s/logs/%s.json' % (DB, handler.request.get('job_id')))
452 'v': int((t_ended - t_queued).total_seconds())
468 'v': int((t_started - t_queued).total_seconds())
477 'v': int((t_ended - t_started).total_seconds())