<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://planeshift.top-ix.org//pswiki/index.php?action=history&amp;feed=atom&amp;title=Socorro_add_code</id>
	<title>Socorro add code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://planeshift.top-ix.org//pswiki/index.php?action=history&amp;feed=atom&amp;title=Socorro_add_code"/>
	<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Socorro_add_code&amp;action=history"/>
	<updated>2026-04-08T20:02:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Socorro_add_code&amp;diff=19672&amp;oldid=prev</id>
		<title>Talad at 20:58, 22 November 2013</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Socorro_add_code&amp;diff=19672&amp;oldid=prev"/>
		<updated>2013-11-22T20:58:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:58, 22 November 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &amp;lt;nowiki&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;def json_PlaneShift_transform_predicate(*args, **kwargs):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;def json_PlaneShift_transform_predicate(*args, **kwargs):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/del&gt;return True&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   &lt;/ins&gt;return True&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;def json_PlaneShift_transform_action(raw_crash, processor):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;def json_PlaneShift_transform_action(raw_crash, processor):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l51&quot;&gt;Line 51:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     )&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     return True&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     return True&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &amp;lt;/nowiki&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Socorro_add_code&amp;diff=19671&amp;oldid=prev</id>
		<title>Talad: Created page with &quot;def json_PlaneShift_transform_predicate(*args, **kwargs):   return True  def json_PlaneShift_transform_action(raw_crash, processor):     &quot;&quot;&quot;a TransformRule action function tha...&quot;</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Socorro_add_code&amp;diff=19671&amp;oldid=prev"/>
		<updated>2013-11-22T20:55:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;def json_PlaneShift_transform_predicate(*args, **kwargs):   return True  def json_PlaneShift_transform_action(raw_crash, processor):     &amp;quot;&amp;quot;&amp;quot;a TransformRule action function tha...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;def json_PlaneShift_transform_predicate(*args, **kwargs):&lt;br /&gt;
  return True&lt;br /&gt;
&lt;br /&gt;
def json_PlaneShift_transform_action(raw_crash, processor):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;a TransformRule action function that will change the buildid of a&lt;br /&gt;
    product.&lt;br /&gt;
&lt;br /&gt;
    parameters:&lt;br /&gt;
        json_doc - the destination mapping for the rewrite&lt;br /&gt;
        processor - a source for a logger, caching and a database connection&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    if not hasattr(processor, &amp;#039;builddate_cache&amp;#039;):&lt;br /&gt;
        # not very thread safe...&lt;br /&gt;
        processor.builddate_cache = {}&lt;br /&gt;
    try:&lt;br /&gt;
        build_date = processor.builddate_cache[(&lt;br /&gt;
            raw_crash[&amp;#039;ProductName&amp;#039;],&lt;br /&gt;
            raw_crash[&amp;#039;Version&amp;#039;]&lt;br /&gt;
        )]&lt;br /&gt;
    except KeyError:&lt;br /&gt;
        try:&lt;br /&gt;
            processor.config.logger.debug(&amp;#039;DEBUG: product %s version %s&amp;#039;,raw_crash[&amp;#039;ProductName&amp;#039;], raw_crash[&amp;#039;Version&amp;#039;])&lt;br /&gt;
            sql = (&lt;br /&gt;
                &amp;quot;select build_id &amp;quot;&lt;br /&gt;
                &amp;quot;from product_version_builds b, product_versions v &amp;quot;&lt;br /&gt;
                &amp;quot;where b.product_version_id=v.product_version_id and &amp;quot;&lt;br /&gt;
                &amp;quot;product_name = %s and version_string = %s&amp;quot;&lt;br /&gt;
            )&lt;br /&gt;
            product_version_tuple = (&lt;br /&gt;
                raw_crash[&amp;#039;ProductName&amp;#039;],&lt;br /&gt;
                raw_crash[&amp;#039;Version&amp;#039;]&lt;br /&gt;
            )&lt;br /&gt;
            build_date = processor.transaction(&lt;br /&gt;
                single_value_sql,&lt;br /&gt;
                sql,&lt;br /&gt;
                (raw_crash[&amp;#039;ProductName&amp;#039;],raw_crash[&amp;#039;Version&amp;#039;])&lt;br /&gt;
            )&lt;br /&gt;
            processor.builddate_cache[product_version_tuple] = build_date&lt;br /&gt;
        except Exception:&lt;br /&gt;
            processor.config.logger.error(&lt;br /&gt;
                &amp;#039;cannot fetch build_date for %s %s&amp;#039;,&lt;br /&gt;
                raw_crash[&amp;#039;ProductName&amp;#039;],&lt;br /&gt;
                raw_crash[&amp;#039;Version&amp;#039;],&lt;br /&gt;
            )&lt;br /&gt;
            return False&lt;br /&gt;
&lt;br /&gt;
    raw_crash[&amp;#039;BuildID&amp;#039;] = str(build_date)&lt;br /&gt;
    processor.config.logger.debug(&lt;br /&gt;
        &amp;#039;BuildID changed to %s&amp;#039;,&lt;br /&gt;
        build_date,&lt;br /&gt;
    )&lt;br /&gt;
    return True&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
</feed>