Ticket #2040 (closed defect: fixed)

Opened 23 months ago

Last modified 21 months ago

.buildbot-sourcedata sometimes contains unicode strings, causes full resync during builds

Reported by: dberger Owned by:
Priority: major Milestone: 0.8.5
Version: 0.8.4p1 Keywords: p4
Cc:

Description

we don't have a perfect repro yet, but we noticed that some of our upgraded builders (0.7.11p3 -> 0.8.4p1) like to do full resyncs on force builds and after build failures. a newly created builder hasn't exhibited this problem.

we're using perforce.

after much tracking down, it looks like the common thread is that the misbehaving builders have u'/perforce/branch/path' in their buildbot-sourcedata file, rather than '/perforce/branch/path' - which suggests that argsbranch? is coming in unicode, and being written to the file that way.

If/as we learn more, I'll update the ticket.

Change History

comment:1 Changed 23 months ago by dberger

we manually fixed a couple buildbot-sourceinfo files on windows builders, and they didn't force-sync on a force build. performing the same transformation on linux/mac builders didn't fix it, so there's more going on here.

comment:2 Changed 23 months ago by dustin

  • Keywords p4 added
  • Milestone changed from undecided to 0.8.5

Any further progress? Python will compare u'...' as equal to '...' (by casting the latter to unicode).

comment:3 Changed 23 months ago by dberger

It won't when the comparison is against str([list, of, values]) and some of the values are unicode - you end up comparing '["foo","bar"]' against '["foo",u"bar"]' - and they're different. (this may be/is specific to the p4 code)

I believe we've gotten all the builders happy by manually modifying their on disk soucedata files - I'll confirm when I'm back in the office Monday.

Last edited 23 months ago by dberger (previous) (diff)

comment:4 Changed 23 months ago by dustin

Ah, yes, the u'..' gets encoded there, then. Hrm. Can you suggest a test and subsequent code fix for this? I don't think Buildbot has too many P4 users, but I'd hate for all of them to have to make this change manually.

comment:5 Changed 21 months ago by Dustin J. Mitchell

  • Status changed from new to closed
  • Resolution set to fixed

Be consistent about string handling in Perforce's sourcedata string

Fixes #2040.

Changeset: 2fc90f01ba845db05f804d3d7e969a2b72a95da4

Note: See TracTickets for help on using tickets.