Skip to content

unlink creates race conditions #2184

unlink creates race conditions

unlink creates race conditions #2184

GitHub Actions / Test Results failed Jan 10, 2025 in 0s

4 fail, 1 skipped, 234 pass in 1m 35s

239 tests  ±0   234 ✅ ±0   1m 35s ⏱️ -1s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     4 ❌ ±0 

Results for commit 98c55eb. ± Comparison against earlier commit c2467c1.

Annotations

Check warning on line 0 in sarracenia.config_test

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_source_from_exchange (sarracenia.config_test) failed

tests/junit/test-results.xml [took 0s]
Raw output
AttributeError: 'Config' object has no attribute 'subtopic_seen'
def test_source_from_exchange():
    
         options = copy.deepcopy(sarracenia.config.default_config())
    
         # crasher input:
         options.parse_line( "subscribe", "ex1", "subscribe/ex1", 1, "declare source tsource" )
         assert( 'tsource' in options.declared_users )
         assert( options.declared_users['tsource'] == 'source' )
    
>        options.parse_line( "subscribe", "ex1", "subscribe/ex1", 1, "exchange xs_tsource_favourite" )

tests/sarracenia/config_test.py:309: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sarracenia.config.Config object at 0x7f5247ade8d0>
component = 'subscribe', cfg = 'ex1', cfname = 'subscribe/ex1', lineno = 1
l = 'exchange xs_tsource_favourite'

    def parse_line(self, component, cfg, cfname, lineno, l ):
        self.lineno = lineno
        line = l.split()
    
        #print('FIXME parsing %s:%d %s' % (cfg, lineno, line ))
    
        if (len(line) < 1) or (line[0].startswith('#')):
            return
    
        k = line[0]
        if k in Config.synonyms:
            k = Config.synonyms[k]
        elif k == 'destination':
            if component == 'poll':
                k = 'pollUrl'
            else:
                k = 'sendTo'
        elif k == 'broker' and component == 'poll' :
            k = 'post_broker'
    
        if (k in convert_to_v3):
            self.log_flowcb_needed |= '_log' in k
    
    
            if (len(line) > 1):
                v = line[1].replace('.py', '', 1)
                if (v in convert_to_v3[k]):
                    line = convert_to_v3[k][v]
                    k = line[0]
                    if 'continue' in line:
                        logger.debug( f'{cfname}:{lineno} obsolete v2: \"{l}\" ignored' )
                    else:
                        logger.debug( f'{cfname}:{lineno} obsolete v2:\"{l}\" converted to sr3:\"{" ".join(line)}\"' )
            else:
                if convert_to_v3[k] == 'continue':
                    if k in self.undeclared:
                        self.undeclared.remove(k)
    
                line = convert_to_v3[k]
                if 'continue' in line:
                    if k in self.unknown:
                        self.unknown.remove(k)
                    return
                k=line[0]
                v=line[1]
    
        if k == 'continue':
            return
    
        line = list(map(lambda x: self._varsub(x), line))
    
        if len(line) == 1:
            v = True
        else:
            v = line[1]
    
        # FIXME... I think synonym check should happen here, but no time to check right now.
    
        if k in flag_options:
            if len(line) == 1:
                setattr(self, k, True)
            else:
                setattr(self, k, isTrue(v))
            if k in ['logReject'] and self.logReject:
                self.logEvents = self.logEvents | set(['reject'])
    
            if k in ['logDuplicates'] and self.logDuplicates:
                self.logEvents = self.logEvents | set(['nodupe'])
            return
    
>       if k in queue_options and self.subtopic_seen:
E       AttributeError: 'Config' object has no attribute 'subtopic_seen'

sarracenia/config/__init__.py:1636: AttributeError

Check warning on line 0 in sarracenia.config_test

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_subscription (sarracenia.config_test) failed

tests/junit/test-results.xml [took 0s]
Raw output
AttributeError: 'Config' object has no attribute 'subtopic_seen'
def test_subscription():
    
         o = copy.deepcopy(sarracenia.config.default_config())
    
         o.component = 'subscribe'
         o.config = 'ex1'
         o.action = 'start'
         o.no = 1
         before_add=len(o.credentials.credentials)
         o.credentials.add( 'amqp://lapinferoce:etpoilu@localhost' )
         o.credentials.add( 'amqp://capelli:tropcuit@localhost' )
>        o.parse_line( o.component, o.config, "subscribe/ex1", 1, "broker amqp://lapinferoce@localhost" )

tests/sarracenia/config_test.py:327: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sarracenia.config.Config object at 0x7f5247addb20>
component = 'subscribe', cfg = 'ex1', cfname = 'subscribe/ex1', lineno = 1
l = 'broker amqp://lapinferoce@localhost'

    def parse_line(self, component, cfg, cfname, lineno, l ):
        self.lineno = lineno
        line = l.split()
    
        #print('FIXME parsing %s:%d %s' % (cfg, lineno, line ))
    
        if (len(line) < 1) or (line[0].startswith('#')):
            return
    
        k = line[0]
        if k in Config.synonyms:
            k = Config.synonyms[k]
        elif k == 'destination':
            if component == 'poll':
                k = 'pollUrl'
            else:
                k = 'sendTo'
        elif k == 'broker' and component == 'poll' :
            k = 'post_broker'
    
        if (k in convert_to_v3):
            self.log_flowcb_needed |= '_log' in k
    
    
            if (len(line) > 1):
                v = line[1].replace('.py', '', 1)
                if (v in convert_to_v3[k]):
                    line = convert_to_v3[k][v]
                    k = line[0]
                    if 'continue' in line:
                        logger.debug( f'{cfname}:{lineno} obsolete v2: \"{l}\" ignored' )
                    else:
                        logger.debug( f'{cfname}:{lineno} obsolete v2:\"{l}\" converted to sr3:\"{" ".join(line)}\"' )
            else:
                if convert_to_v3[k] == 'continue':
                    if k in self.undeclared:
                        self.undeclared.remove(k)
    
                line = convert_to_v3[k]
                if 'continue' in line:
                    if k in self.unknown:
                        self.unknown.remove(k)
                    return
                k=line[0]
                v=line[1]
    
        if k == 'continue':
            return
    
        line = list(map(lambda x: self._varsub(x), line))
    
        if len(line) == 1:
            v = True
        else:
            v = line[1]
    
        # FIXME... I think synonym check should happen here, but no time to check right now.
    
        if k in flag_options:
            if len(line) == 1:
                setattr(self, k, True)
            else:
                setattr(self, k, isTrue(v))
            if k in ['logReject'] and self.logReject:
                self.logEvents = self.logEvents | set(['reject'])
    
            if k in ['logDuplicates'] and self.logDuplicates:
                self.logEvents = self.logEvents | set(['nodupe'])
            return
    
>       if k in queue_options and self.subtopic_seen:
E       AttributeError: 'Config' object has no attribute 'subtopic_seen'

sarracenia/config/__init__.py:1636: AttributeError

Check warning on line 0 in sarracenia.config_test

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_broker_finalize (sarracenia.config_test) failed

tests/junit/test-results.xml [took 0s]
Raw output
AttributeError: 'Config' object has no attribute 'subtopic_seen'
def test_broker_finalize():
    
         options = copy.deepcopy(sarracenia.config.default_config())
         options.component = 'subscribe'
         options.config = 'ex1'
         options.action = 'start'
    
         before_add=len(options.credentials.credentials)
    
         options.credentials.add( 'amqp://bunnypeer:passthepoi@localhost' )
    
         after_add=len(options.credentials.credentials)
         logger.info( f" {before_add=}  {after_add=} " )
    
         assert( before_add + 1 == after_add )
    
>        options.parse_line( options.component, options.config, "subscribe/ex1", 1, "broker amqp://bunnypeer@localhost" )

tests/sarracenia/config_test.py:369: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sarracenia.config.Config object at 0x7f5247adc380>
component = 'subscribe', cfg = 'ex1', cfname = 'subscribe/ex1', lineno = 1
l = 'broker amqp://bunnypeer@localhost'

    def parse_line(self, component, cfg, cfname, lineno, l ):
        self.lineno = lineno
        line = l.split()
    
        #print('FIXME parsing %s:%d %s' % (cfg, lineno, line ))
    
        if (len(line) < 1) or (line[0].startswith('#')):
            return
    
        k = line[0]
        if k in Config.synonyms:
            k = Config.synonyms[k]
        elif k == 'destination':
            if component == 'poll':
                k = 'pollUrl'
            else:
                k = 'sendTo'
        elif k == 'broker' and component == 'poll' :
            k = 'post_broker'
    
        if (k in convert_to_v3):
            self.log_flowcb_needed |= '_log' in k
    
    
            if (len(line) > 1):
                v = line[1].replace('.py', '', 1)
                if (v in convert_to_v3[k]):
                    line = convert_to_v3[k][v]
                    k = line[0]
                    if 'continue' in line:
                        logger.debug( f'{cfname}:{lineno} obsolete v2: \"{l}\" ignored' )
                    else:
                        logger.debug( f'{cfname}:{lineno} obsolete v2:\"{l}\" converted to sr3:\"{" ".join(line)}\"' )
            else:
                if convert_to_v3[k] == 'continue':
                    if k in self.undeclared:
                        self.undeclared.remove(k)
    
                line = convert_to_v3[k]
                if 'continue' in line:
                    if k in self.unknown:
                        self.unknown.remove(k)
                    return
                k=line[0]
                v=line[1]
    
        if k == 'continue':
            return
    
        line = list(map(lambda x: self._varsub(x), line))
    
        if len(line) == 1:
            v = True
        else:
            v = line[1]
    
        # FIXME... I think synonym check should happen here, but no time to check right now.
    
        if k in flag_options:
            if len(line) == 1:
                setattr(self, k, True)
            else:
                setattr(self, k, isTrue(v))
            if k in ['logReject'] and self.logReject:
                self.logEvents = self.logEvents | set(['reject'])
    
            if k in ['logDuplicates'] and self.logDuplicates:
                self.logEvents = self.logEvents | set(['nodupe'])
            return
    
>       if k in queue_options and self.subtopic_seen:
E       AttributeError: 'Config' object has no attribute 'subtopic_seen'

sarracenia/config/__init__.py:1636: AttributeError

Check warning on line 0 in sarracenia.flowcb.filter.geometry_test

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_after_accept (sarracenia.flowcb.filter.geometry_test) failed

tests/junit/test-results.xml [took 0s]
Raw output
assert 1 == 2
 +  where 1 = len([{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "Point", "coordinates": [-76, 39.284]}'}])
 +    where [{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "Point", "coordinates": [-76, 39.284]}'}] = namespace(ok=[], incoming=[{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_d...wFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "LineString", "coordinates": [93, 100]}'}], directories_ok=[]).rejected
def test_after_accept():
        options = sarracenia.config.default_config()
        options.logLevel = 'DEBUG'
    
        # Testing when the config is a polygon
        options.geometry = [features['poly1']]
        geojson = sarracenia.flowcb.filter.geometry.Geometry(options)
    
        worklist = make_worklist()
        #accepted
        worklist.incoming.append(make_message("poly2"))
        worklist.incoming.append(make_message("pointA"))
        #rejected
        worklist.incoming.append(make_message("poly3"))
        worklist.incoming.append(make_message("pointB"))
        #failed
        worklist.incoming.append(make_message("line1"))
    
        geojson.after_accept(worklist)
>       assert len(worklist.rejected) == 2
E       assert 1 == 2
E        +  where 1 = len([{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "Point", "coordinates": [-76, 39.284]}'}])
E        +    where [{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "Point", "coordinates": [-76, 39.284]}'}] = namespace(ok=[], incoming=[{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_d...wFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "LineString", "coordinates": [93, 100]}'}], directories_ok=[]).rejected

tests/sarracenia/flowcb/filter/geometry_test.py:100: AssertionError