Example #1
0
  def add_failure_to_flake(name, flaky_run_key, failure_time):
    flake = Flake.get_by_id(name)
    if not flake:
      flake = Flake(name=name, id=name, last_time_seen=datetime.datetime.min)
      flake.put()

    flake.occurrences.append(flaky_run_key)
    util.add_occurrence_time_to_flake(flake, failure_time)
    flake.put()
Example #2
0
def add_failure_to_flake(name, flaky_run):
  flake = Flake.get_by_id(name)
  if not flake:
    flake = Flake(name=name, id=name, last_time_seen=datetime.datetime.min)
    flake.put()

  flake.occurrences.append(flaky_run.key)

  flaky_run_time = flaky_run.failure_run.get().time_finished
  add_occurance_time_to_flake(flake, flaky_run_time)

  flake.put()
Example #3
0
  def add_failure_to_flake(name, flaky_run_key, failure_time, is_step):
    flake = Flake.get_by_id(name)
    if not flake:
      flake = Flake(name=name, id=name, last_time_seen=datetime.datetime.min,
                    is_step=is_step)
      flake.put()

    flake.occurrences.append(flaky_run_key)
    # TODO(sergiyb): This is necessary to update existing flakes. Remove in July
    # 2016 or later.
    flake.is_step = is_step
    util.add_occurrence_time_to_flake(flake, failure_time)
    flake.put()
Example #4
0
 def put_flake(self, attr, count):
   flake = Flake(name='foo')
   setattr(flake, 'last_%s' % attr, True)
   setattr(flake, 'count_%s' % attr, count)
   flake.put()
 def put_flake(self, attr, count):
   flake = Flake(name='foo')
   setattr(flake, 'last_%s' % attr, True)
   setattr(flake, 'count_%s' % attr, count)
   flake.put()