Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: looks like a typo - network interfaces with attached elb wont lo… #1251

Merged
merged 1 commit into from
Sep 23, 2023

Conversation

petersutter5
Copy link
Contributor

When gathering network interfaces that have an attached ELB, neo4j ingestion fails due to this typo which turns the elbv1 variable into a tuple instead of a string.

reopening PR to fix CLA check

…ad into neo4j because they are tuple instead of string
@achantavy
Copy link
Contributor

Hi, thanks for the PR, this does look like a typo (oops). I'm surprised the tests didn't catch this - can you please post the crash log?

What version of neo4j are you using?

@achantavy
Copy link
Contributor

Oh, maybe the tests didn't catch it because the tests don't have a case where there is attached ELB. 🤔

@achantavy achantavy merged commit 43e5de3 into cartography-cncf:master Sep 23, 2023
@achantavy
Copy link
Contributor

Thank you!

@petersutter5
Copy link
Contributor Author

neo4j version 4.4.3

Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.8.16/Frameworks/Python.framework/Versions/3.8/bin/cartography", line 33, in
sys.exit(load_entry_point('cartography', 'console_scripts', 'cartography')())
File "/Users/petersutter/cartography/cartography/cli.py", line 709, in main
sys.exit(CLI(prog='cartography').main(argv))
File "/Users/petersutter/cartography/cartography/cli.py", line 690, in main
return cartography.sync.run_with_config(self.sync, config)
File "/Users/petersutter/cartography/cartography/sync.py", line 187, in run_with_config
return sync.run(neo4j_driver, config)
File "/Users/petersutter/cartography/cartography/sync.py", line 109, in run
stage_func(neo4j_session, config)
File "/Users/petersutter/cartography/cartography/util.py", line 178, in timed
return method(*args, **kwargs)
File "/Users/petersutter/cartography/cartography/intel/aws/init.py", line 298, in start_aws_ingestion
sync_successful = _sync_multiple_accounts(
File "/Users/petersutter/cartography/cartography/intel/aws/init.py", line 169, in _sync_multiple_accounts
_sync_one_account(
File "/Users/petersutter/cartography/cartography/intel/aws/init.py", line 64, in _sync_one_account
RESOURCE_FUNCTIONSfunc_name
File "/Users/petersutter/cartography/cartography/util.py", line 178, in timed
return method(*args, **kwargs)
File "/Users/petersutter/cartography/cartography/intel/aws/ec2/network_interfaces.py", line 258, in sync_network_interfaces
load_network_data(
File "/Users/petersutter/cartography/cartography/intel/aws/ec2/network_interfaces.py", line 233, in load_network_data
load_network_interfaces(neo4j_session, network_interface_list, region, current_aws_account_id, update_tag)
File "/Users/petersutter/cartography/cartography/util.py", line 178, in timed
return method(*args, **kwargs)
File "/Users/petersutter/cartography/cartography/intel/aws/ec2/network_interfaces.py", line 147, in load_network_interfaces
load(
File "/Users/petersutter/cartography/cartography/client/core/tx.py", line 254, in load
load_graph_data(neo4j_session, ingestion_query, dict_list, **kwargs)
File "/Users/petersutter/cartography/cartography/client/core/tx.py", line 210, in load_graph_data
neo4j_session.write_transaction(
File "/opt/homebrew/lib/python3.8/site-packages/neo4j/work/simple.py", line 434, in write_transaction
return self._run_transaction(WRITE_ACCESS, transaction_function, *args, **kwargs)
File "/opt/homebrew/lib/python3.8/site-packages/neo4j/work/simple.py", line 327, in _run_transaction
result = transaction_function(tx, *args, **kwargs)
File "/Users/petersutter/cartography/cartography/client/core/tx.py", line 191, in write_list_of_dicts_tx
tx.run(query, kwargs)
File "/opt/homebrew/lib/python3.8/site-packages/neo4j/work/transaction.py", line 143, in run
result._tx_ready_run(query, parameters)
File "/opt/homebrew/lib/python3.8/site-packages/neo4j/work/result.py", line 70, in _tx_ready_run
self._run(query, parameters, None, None, None, None)
File "/opt/homebrew/lib/python3.8/site-packages/neo4j/work/result.py", line 77, in _run
parameters = DataDehydrator.fix_parameters(
File "/opt/homebrew/lib/python3.8/site-packages/neo4j/data.py", line 340, in fix_parameters
raise TypeError("Parameters of type {} are not supported".format(type(value).name))
TypeError: Parameters of type tuple are not supported

@achantavy
Copy link
Contributor

Fixes #1253

@achantavy achantavy linked an issue Sep 25, 2023 that may be closed by this pull request
chandanchowdhury pushed a commit to juju4/cartography that referenced this pull request Jun 26, 2024
cartography-cncf#1251)

When gathering network interfaces that have an attached ELB, neo4j
ingestion fails due to this typo which turns the elbv1 variable into a
tuple instead of a string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug in 0.85.0 unable to complete AWS scans
2 participants