after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def update(
self, update_expression, expression_attribute_names, expression_attribute_values
):
# Update subexpressions are identifiable by the operator keyword, so split on that and
# get rid of the empty leading string.
parts = [
p
for p in re.split(r"\b(SET|REMOVE|ADD|DELETE)\b", upda... | def update(
self, update_expression, expression_attribute_names, expression_attribute_values
):
# Update subexpressions are identifiable by the operator keyword, so split on that and
# get rid of the empty leading string.
parts = [
p
for p in re.split(r"\b(SET|REMOVE|ADD|DELETE)\b", upda... | https://github.com/spulec/moto/issues/847 | Traceback (most recent call last):
File "poc.py", line 35, in <module>
update_does_not_work()
File "/usr/local/lib/python2.7/site-packages/moto/core/models.py", line 71, in wrapper
result = func(*args, **kwargs)
File "poc.py", line 30, in update_does_not_work
':map': {'M': {'EntryKey': {'SS': ['thing1', 'thing2']}}}
Fi... | ValueError |
def __init__(self, job_id, tier, arn, archive_id):
self.job_id = job_id
self.tier = tier
self.arn = arn
self.archive_id = archive_id
Job.__init__(self, tier)
| def __init__(self, job_id, archive_id):
self.job_id = job_id
self.archive_id = archive_id
| https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def to_dict(self):
d = {
"Action": "ArchiveRetrieval",
"ArchiveId": self.archive_id,
"ArchiveSizeInBytes": 0,
"ArchiveSHA256TreeHash": None,
"Completed": False,
"CreationDate": self.st.strftime("%Y-%m-%dT%H:%M:%S.000Z"),
"InventorySizeInBytes": 0,
"Job... | def to_dict(self):
return {
"Action": "InventoryRetrieval",
"ArchiveId": self.archive_id,
"ArchiveSizeInBytes": 0,
"ArchiveSHA256TreeHash": None,
"Completed": True,
"CompletionDate": "2013-03-20T17:03:43.221Z",
"CreationDate": "2013-03-20T17:03:43.221Z",
... | https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def __init__(self, vault_name, region):
self.st = datetime.datetime.now()
self.vault_name = vault_name
self.region = region
self.archives = {}
self.jobs = {}
| def __init__(self, vault_name, region):
self.vault_name = vault_name
self.region = region
self.archives = {}
self.jobs = {}
| https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def to_dict(self):
archives_size = 0
for k in self.archives:
archives_size += self.archives[k]["size"]
d = {
"CreationDate": self.st.strftime("%Y-%m-%dT%H:%M:%S.000Z"),
"LastInventoryDate": self.st.strftime("%Y-%m-%dT%H:%M:%S.000Z"),
"NumberOfArchives": len(self.archives),
... | def to_dict(self):
return {
"CreationDate": "2013-03-20T17:03:43.221Z",
"LastInventoryDate": "2013-03-20T17:03:43.221Z",
"NumberOfArchives": None,
"SizeInBytes": None,
"VaultARN": self.arn,
"VaultName": self.vault_name,
}
| https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def create_archive(self, body, description):
archive_id = hashlib.md5(body).hexdigest()
self.archives[archive_id] = {}
self.archives[archive_id]["body"] = body
self.archives[archive_id]["size"] = len(body)
self.archives[archive_id]["sha256"] = hashlib.sha256(body).hexdigest()
self.archives[archi... | def create_archive(self, body):
archive_id = hashlib.sha256(body).hexdigest()
self.archives[archive_id] = body
return archive_id
| https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def get_archive_body(self, archive_id):
return self.archives[archive_id]["body"]
| def get_archive_body(self, archive_id):
return self.archives[archive_id]
| https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def initiate_job(self, job_type, tier, archive_id):
job_id = get_job_id()
if job_type == "inventory-retrieval":
job = InventoryJob(job_id, tier, self.arn)
elif job_type == "archive-retrieval":
job = ArchiveJob(job_id, tier, self.arn, archive_id)
self.jobs[job_id] = job
return job_i... | def initiate_job(self, archive_id):
job_id = get_job_id()
job = ArchiveJob(job_id, archive_id)
self.jobs[job_id] = job
return job_id
| https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def get_job_output(self, job_id):
job = self.describe_job(job_id)
jobj = job.to_dict()
if jobj["Action"] == "InventoryRetrieval":
archives = self.get_archive_list()
return {
"VaultARN": self.arn,
"InventoryDate": jobj["CompletionDate"],
"ArchiveList": arch... | def get_job_output(self, job_id):
job = self.describe_job(job_id)
archive_body = self.get_archive_body(job.archive_id)
return archive_body
| https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def initiate_job(self, vault_name, job_type, tier, archive_id):
vault = self.get_vault(vault_name)
job_id = vault.initiate_job(job_type, tier, archive_id)
return job_id
| def initiate_job(self, vault_name, archive_id):
vault = self.get_vault(vault_name)
job_id = vault.initiate_job(archive_id)
return job_id
| https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def _vault_archive_response(self, request, full_url, headers):
method = request.method
if hasattr(request, "body"):
body = request.body
else:
body = request.data
description = ""
if "x-amz-archive-description" in request.headers:
description = request.headers["x-amz-archive-d... | def _vault_archive_response(self, request, full_url, headers):
method = request.method
body = request.body
parsed_url = urlparse(full_url)
querystring = parse_qs(parsed_url.query, keep_blank_values=True)
vault_name = full_url.split("/")[-2]
if method == "POST":
return self._vault_archiv... | https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def _vault_archive_response_post(
self, vault_name, body, description, querystring, headers
):
vault = self.backend.get_vault(vault_name)
vault_id = vault.create_archive(body, description)
headers["x-amz-archive-id"] = vault_id
return 201, headers, ""
| def _vault_archive_response_post(self, vault_name, body, querystring, headers):
vault = self.backend.get_vault(vault_name)
vault_id = vault.create_archive(body)
headers["x-amz-archive-id"] = vault_id
return 201, headers, ""
| https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def _vault_jobs_response(self, request, full_url, headers):
method = request.method
if hasattr(request, "body"):
body = request.body
else:
body = request.data
account_id = full_url.split("/")[1]
vault_name = full_url.split("/")[-2]
if method == "GET":
jobs = self.backend... | def _vault_jobs_response(self, request, full_url, headers):
method = request.method
body = request.body
account_id = full_url.split("/")[1]
vault_name = full_url.split("/")[-2]
if method == "GET":
jobs = self.backend.list_jobs(vault_name)
headers["content-type"] = "application/json"... | https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def _vault_jobs_output_response(self, request, full_url, headers):
vault_name = full_url.split("/")[-4]
job_id = full_url.split("/")[-2]
vault = self.backend.get_vault(vault_name)
if vault.job_ready(job_id):
output = vault.get_job_output(job_id)
if isinstance(output, dict):
h... | def _vault_jobs_output_response(self, request, full_url, headers):
vault_name = full_url.split("/")[-4]
job_id = full_url.split("/")[-2]
vault = self.backend.get_vault(vault_name)
output = vault.get_job_output(job_id)
headers["content-type"] = "application/octet-stream"
return 200, headers, out... | https://github.com/spulec/moto/issues/1113 | 127.0.0.1 - - [06/Sep/2017 14:40:32] "POST /kefo/vaults/testvault/archives HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/Users/kford1/Work/motoenv/lib/python3.5/site-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/Users/kford1/Work/motoenv/lib/python3.5... | AttributeError |
def get_s3_bucket_list(boto3_session):
client = boto3_session.client("s3")
# NOTE no paginator available for this operation
buckets = client.list_buckets()
for bucket in buckets["Buckets"]:
bucket["Region"] = client.get_bucket_location(Bucket=bucket["Name"])[
"LocationConstraint"
... | def get_s3_bucket_list(boto3_session):
client = boto3_session.client("s3")
# NOTE no paginator available for this operation
return client.list_buckets()
| https://github.com/lyft/cartography/issues/231 | ERROR:cartography.sync:Unhandled exception during sync stage 'aws'
Traceback (most recent call last):
File "/usr/local/bin/cartography", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/cartography/cli.py", line 216, in main
return CLI(default_sync, prog='cartography').main(argv)
File "... | botocore.exceptions.ClientError |
def get_s3_bucket_details(boto3_session, bucket_data):
"""
Iterates over all S3 buckets. Yields bucket name (string) and pairs of S3 bucket policies (JSON) and ACLs (JSON)
"""
# a local store for s3 clients so that we may re-use clients for an AWS region
s3_regional_clients = {}
for bucket in b... | def get_s3_bucket_details(boto3_session, bucket_data):
"""
Iterates over all S3 buckets. Yields bucket name (string) and pairs of S3 bucket policies (JSON) and ACLs (JSON)
"""
client = boto3_session.client("s3")
for bucket in bucket_data["Buckets"]:
acl = get_acl(bucket, client)
poli... | https://github.com/lyft/cartography/issues/231 | ERROR:cartography.sync:Unhandled exception during sync stage 'aws'
Traceback (most recent call last):
File "/usr/local/bin/cartography", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/cartography/cli.py", line 216, in main
return CLI(default_sync, prog='cartography').main(argv)
File "... | botocore.exceptions.ClientError |
def get_policy(bucket, client):
"""
Gets the S3 bucket policy. Returns policy string or None if no policy
"""
try:
policy = client.get_bucket_policy(Bucket=bucket["Name"])
except ClientError as e:
# no policy is defined for this bucket
if "NoSuchBucketPolicy" in e.args[0]:
... | def get_policy(bucket, client):
"""
Gets the S3 bucket policy. Returns policy string or None if no policy
"""
try:
policy = client.get_bucket_policy(Bucket=bucket["Name"])
except ClientError as e:
# no policy is defined for this bucket
if "NoSuchBucketPolicy" in e.args[0]:
... | https://github.com/lyft/cartography/issues/231 | ERROR:cartography.sync:Unhandled exception during sync stage 'aws'
Traceback (most recent call last):
File "/usr/local/bin/cartography", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/cartography/cli.py", line 216, in main
return CLI(default_sync, prog='cartography').main(argv)
File "... | botocore.exceptions.ClientError |
def get_acl(bucket, client):
"""
Gets the S3 bucket ACL. Returns ACL string
"""
try:
acl = client.get_bucket_acl(Bucket=bucket["Name"])
except ClientError as e:
if "AccessDenied" in e.args[0]:
logger.warning(
"Failed to retrieve S3 bucket {} ACL - Access D... | def get_acl(bucket, client):
"""
Gets the S3 bucket ACL. Returns ACL string
"""
try:
acl = client.get_bucket_acl(Bucket=bucket["Name"])
except ClientError as e:
if "AccessDenied" in e.args[0]:
logger.warning(
"Failed to retrieve S3 bucket {} ACL - Access D... | https://github.com/lyft/cartography/issues/231 | ERROR:cartography.sync:Unhandled exception during sync stage 'aws'
Traceback (most recent call last):
File "/usr/local/bin/cartography", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/cartography/cli.py", line 216, in main
return CLI(default_sync, prog='cartography').main(argv)
File "... | botocore.exceptions.ClientError |
def load_s3_buckets(neo4j_session, data, current_aws_account_id, aws_update_tag):
ingest_bucket = """
MERGE (bucket:S3Bucket{id:{BucketName}})
ON CREATE SET bucket.firstseen = timestamp(), bucket.creationdate = {CreationDate}
SET bucket.name = {BucketName}, bucket.region = {BucketRegion}, bucket.arn = {... | def load_s3_buckets(neo4j_session, data, current_aws_account_id, aws_update_tag):
ingest_bucket = """
MERGE (bucket:S3Bucket{id:{BucketName}})
ON CREATE SET bucket.firstseen = timestamp(), bucket.creationdate = {CreationDate}
SET bucket.name = {BucketName}, bucket.arn = {Arn}, bucket.lastupdated = {aws_... | https://github.com/lyft/cartography/issues/231 | ERROR:cartography.sync:Unhandled exception during sync stage 'aws'
Traceback (most recent call last):
File "/usr/local/bin/cartography", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/cartography/cli.py", line 216, in main
return CLI(default_sync, prog='cartography').main(argv)
File "... | botocore.exceptions.ClientError |
def load_ecr_repositories(
neo4j_session, data, region, current_aws_account_id, aws_update_tag
):
query = """
MERGE (repo:ECRRepository{id: {RepositoryArn}})
ON CREATE SET repo.firstseen = timestamp(), repo.arn = {RepositoryArn}, repo.name = {RepositoryName},
repo.region = {Region}, repo.created... | def load_ecr_repositories(
neo4j_session, data, region, current_aws_account_id, aws_update_tag
):
query = """
MERGE (repo:ECRRepository{id: {RepositoryArn}})
ON CREATE SET repo.firstseen = timestamp(), repo.arn = {RepositoryArn}, repo.name = {RepositoryName},
repo.region = {Region}, repo.created... | https://github.com/lyft/cartography/issues/440 | Traceback (most recent call last):
File "{PATH}/lib/python3.6/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{OTHER_PATH}/intelmodules/lyft/aws.py", line 234, in lyft_start_aws_ingestion
common_job_parameters
File "{PATH}/lib/python3.6/site-packages/cartography/intel/aws/__i... | ConnectionResetError |
def load_ecr_repository_images(neo4j_session, data, region, aws_update_tag):
query = """
MERGE (repo_image:ECRRepositoryImage{id: {RepositoryImageUri}})
ON CREATE SET repo_image.firstseen = timestamp()
SET repo_image.lastupdated = {aws_update_tag}, repo_image.tag = {ImageTag},
repo_image.uri = {... | def load_ecr_repository_images(neo4j_session, data, region, aws_update_tag):
query = """
MERGE (repo_image:ECRRepositoryImage{id: {RepositoryImageUri}})
ON CREATE SET repo_image.firstseen = timestamp()
SET repo_image.lastupdated = {aws_update_tag}, repo_image.tag = {ImageTag},
repo_image.uri = {... | https://github.com/lyft/cartography/issues/440 | Traceback (most recent call last):
File "{PATH}/lib/python3.6/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{OTHER_PATH}/intelmodules/lyft/aws.py", line 234, in lyft_start_aws_ingestion
common_job_parameters
File "{PATH}/lib/python3.6/site-packages/cartography/intel/aws/__i... | ConnectionResetError |
def load_ecr_image_scan_findings(neo4j_session, data, aws_update_tag):
"""
Creates the path (:Risk:CVE:ECRScanFinding)-[:AFFECTS]->(:Package)-[:DEPLOYED]->(:ECRImage)
:param neo4j_session: The Neo4j session object
:param data: A dict that has been run through transform_ecr_scan_finding_attributes().
... | def load_ecr_image_scan_findings(neo4j_session, data, aws_update_tag):
"""
Creates the path (:Risk:CVE:ECRScanFinding)-[:AFFECTS]->(:Package)-[:DEPLOYED]->(:ECRImage)
:param neo4j_session: The Neo4j session object
:param data: A dict that has been run through transform_ecr_scan_finding_attributes().
... | https://github.com/lyft/cartography/issues/440 | Traceback (most recent call last):
File "{PATH}/lib/python3.6/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{OTHER_PATH}/intelmodules/lyft/aws.py", line 234, in lyft_start_aws_ingestion
common_job_parameters
File "{PATH}/lib/python3.6/site-packages/cartography/intel/aws/__i... | ConnectionResetError |
def get_tgw_attachments(boto3_session, region):
client = boto3_session.client(
"ec2", region_name=region, config=get_botocore_config()
)
tgw_attachments = []
try:
paginator = client.get_paginator("describe_transit_gateway_attachments")
for page in paginator.paginate():
... | def get_tgw_attachments(boto3_session, region):
client = boto3_session.client(
"ec2", region_name=region, config=get_botocore_config()
)
paginator = client.get_paginator("describe_transit_gateway_attachments")
tgw_attachments = []
for page in paginator.paginate():
tgw_attachments.ext... | https://github.com/lyft/cartography/issues/428 | $ cartography --neo4j-uri bolt://localhost:7687
INFO:cartography.sync:Starting sync with update tag '1603410623'
INFO:cartography.sync:Starting sync stage 'create-indexes'
INFO:cartography.intel.create_indexes:Creating indexes for cartography node types.
INFO:cartography.sync:Finishing sync stage 'create-indexes'
INFO:... | botocore.exceptions.ClientError |
def get_tgw_vpc_attachments(boto3_session, region):
client = boto3_session.client(
"ec2", region_name=region, config=get_botocore_config()
)
tgw_vpc_attachments = []
try:
paginator = client.get_paginator("describe_transit_gateway_vpc_attachments")
for page in paginator.paginate()... | def get_tgw_vpc_attachments(boto3_session, region):
client = boto3_session.client(
"ec2", region_name=region, config=get_botocore_config()
)
paginator = client.get_paginator("describe_transit_gateway_vpc_attachments")
tgw_vpc_attachments = []
for page in paginator.paginate():
tgw_vpc... | https://github.com/lyft/cartography/issues/428 | $ cartography --neo4j-uri bolt://localhost:7687
INFO:cartography.sync:Starting sync with update tag '1603410623'
INFO:cartography.sync:Starting sync stage 'create-indexes'
INFO:cartography.intel.create_indexes:Creating indexes for cartography node types.
INFO:cartography.sync:Finishing sync stage 'create-indexes'
INFO:... | botocore.exceptions.ClientError |
def get_role_policy_data(boto3_session, role_list):
resource_client = boto3_session.resource("iam")
policies = {}
for role in role_list:
name = role["RoleName"]
arn = role["Arn"]
resource_role = resource_client.Role(name)
try:
policies[arn] = {
p.n... | def get_role_policy_data(boto3_session, role_list):
resource_client = boto3_session.resource("iam")
policies = {}
for role in role_list:
name = role["RoleName"]
arn = role["Arn"]
resource_role = resource_client.Role(name)
policies[arn] = {
p.name: p.policy_documen... | https://github.com/lyft/cartography/issues/406 | Traceback (most recent call last):
File "{PATH}/intelmodules/syncgraph.py", line 220, in <module>
main(argv)
File "{PATH}/intelmodules/syncgraph.py", line 210, in main
return cartography.sync.run_with_config(sync, config)
File "/lib/python3.6/site-packages/cartography/sync.py", line 145, in run_with_config
return sync.... | botocore.errorfactory.NoSuchEntityException |
def _services_enabled_on_project(serviceusage, project_id):
"""
Return a list of all Google API services that are enabled on the given project ID.
See https://cloud.google.com/service-usage/docs/reference/rest/v1/services/list for data shape.
:param serviceusage: the serviceusage resource provider. See ... | def _services_enabled_on_project(serviceusage, project_id):
"""
Return a list of all Google API services that are enabled on the given project ID.
See https://cloud.google.com/service-usage/docs/reference/rest/v1/services/list for data shape.
:param serviceusage: the serviceusage resource provider. See ... | https://github.com/lyft/cartography/issues/377 | Traceback (most recent call last):
File "{path}/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{path}/site-packages/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{path}/site-packages/cartography/intel/gcp/__init__.py", line 218, in start_gcp_... | googleapiclient.errors.HttpError |
def sync_gcp_instances(
neo4j_session, compute, project_id, zones, gcp_update_tag, common_job_parameters
):
"""
Get GCP instances using the Compute resource object, ingest to Neo4j, and clean up old data.
:param neo4j_session: The Neo4j session object
:param compute: The GCP Compute resource object
... | def sync_gcp_instances(
neo4j_session, compute, project_id, zones, gcp_update_tag, common_job_parameters
):
"""
Get GCP instances using the Compute resource object, ingest to Neo4j, and clean up old data.
:param neo4j_session: The Neo4j session object
:param compute: The GCP Compute resource object
... | https://github.com/lyft/cartography/issues/377 | Traceback (most recent call last):
File "{path}/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{path}/site-packages/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{path}/site-packages/cartography/intel/gcp/__init__.py", line 218, in start_gcp_... | googleapiclient.errors.HttpError |
def sync_gcp_vpcs(
neo4j_session, compute, project_id, gcp_update_tag, common_job_parameters
):
"""
Get GCP VPCs, ingest to Neo4j, and clean up old data.
:param neo4j_session: The Neo4j session
:param compute: The GCP Compute resource object
:param project_id: The project ID to sync
:param g... | def sync_gcp_vpcs(
neo4j_session, compute, project_id, gcp_update_tag, common_job_parameters
):
"""
Get GCP VPCs, ingest to Neo4j, and clean up old data.
:param neo4j_session: The Neo4j session
:param compute: The GCP Compute resource object
:param project_id: The project ID to sync
:param g... | https://github.com/lyft/cartography/issues/377 | Traceback (most recent call last):
File "{path}/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{path}/site-packages/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{path}/site-packages/cartography/intel/gcp/__init__.py", line 218, in start_gcp_... | googleapiclient.errors.HttpError |
def sync_gcp_subnets(
neo4j_session, compute, project_id, regions, gcp_update_tag, common_job_parameters
):
for r in regions:
subnet_res = get_gcp_subnets(project_id, r, compute)
subnets = transform_gcp_subnets(subnet_res)
load_gcp_subnets(neo4j_session, subnets, gcp_update_tag)
... | def sync_gcp_subnets(
neo4j_session, compute, project_id, regions, gcp_update_tag, common_job_parameters
):
for r in regions:
subnet_res = get_gcp_subnets(project_id, r, compute)
subnets = transform_gcp_subnets(subnet_res)
load_gcp_subnets(neo4j_session, subnets, gcp_update_tag)
... | https://github.com/lyft/cartography/issues/377 | Traceback (most recent call last):
File "{path}/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{path}/site-packages/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{path}/site-packages/cartography/intel/gcp/__init__.py", line 218, in start_gcp_... | googleapiclient.errors.HttpError |
def sync_gcp_firewall_rules(
neo4j_session, compute, project_id, gcp_update_tag, common_job_parameters
):
"""
Sync GCP firewalls
:param neo4j_session: The Neo4j session
:param compute: The Compute resource object
:param project_id: The project ID that the firewalls are in
:param common_job_p... | def sync_gcp_firewall_rules(
neo4j_session, compute, project_id, gcp_update_tag, common_job_parameters
):
"""
Sync GCP firewalls
:param neo4j_session: The Neo4j session
:param compute: The Compute resource object
:param project_id: The project ID that the firewalls are in
:param common_job_p... | https://github.com/lyft/cartography/issues/377 | Traceback (most recent call last):
File "{path}/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{path}/site-packages/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{path}/site-packages/cartography/intel/gcp/__init__.py", line 218, in start_gcp_... | googleapiclient.errors.HttpError |
def get_gke_clusters(container, project_id):
"""
Returns a GCP response object containing a list of GKE clusters within the given project.
:type container: The GCP Container resource object
:param container: The Container resource object created by googleapiclient.discovery.build()
:type project_i... | def get_gke_clusters(container, project_id):
"""
Returns a list of GKE clusters within some given project.
:type container: The GCP Container resource object
:param container: The Container resource object created by googleapiclient.discovery.build()
:type project_id: str
:param project_id: Th... | https://github.com/lyft/cartography/issues/377 | Traceback (most recent call last):
File "{path}/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{path}/site-packages/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{path}/site-packages/cartography/intel/gcp/__init__.py", line 218, in start_gcp_... | googleapiclient.errors.HttpError |
def load_gke_clusters(neo4j_session, cluster_resp, project_id, gcp_update_tag):
"""
Ingest GCP GKE Clusters to Neo4j
:type neo4j_session: Neo4j session object
:param neo4j session: The Neo4j session object
:type cluster_resp: Dict
:param cluster_resp: A cluster response object from the GKE API... | def load_gke_clusters(neo4j_session, gke_list, project_id, gcp_update_tag):
"""
Ingest GCP GKE Clusters to Neo4j
:type neo4j_session: Neo4j session object
:param neo4j session: The Neo4j session object
:type gke_list: list
:param gke_list: List of GCP GKE Clusters to inject
:type gcp_upda... | https://github.com/lyft/cartography/issues/377 | Traceback (most recent call last):
File "{path}/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{path}/site-packages/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{path}/site-packages/cartography/intel/gcp/__init__.py", line 218, in start_gcp_... | googleapiclient.errors.HttpError |
def sync_gke_clusters(
neo4j_session, container, project_id, gcp_update_tag, common_job_parameters
):
"""
Get GCP GKE Clusters using the Container resource object, ingest to Neo4j, and clean up old data.
:type neo4j_session: The Neo4j session object
:param neo4j_session: The Neo4j session
:typ... | def sync_gke_clusters(
neo4j_session, container, project_id, gcp_update_tag, common_job_parameters
):
"""
Get GCP GKE Clusters using the Container resource object, ingest to Neo4j, and clean up old data.
:type neo4j_session: The Neo4j session object
:param neo4j_session: The Neo4j session
:typ... | https://github.com/lyft/cartography/issues/377 | Traceback (most recent call last):
File "{path}/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{path}/site-packages/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{path}/site-packages/cartography/intel/gcp/__init__.py", line 218, in start_gcp_... | googleapiclient.errors.HttpError |
def sync_gcp_buckets(
neo4j_session, storage, project_id, gcp_update_tag, common_job_parameters
):
"""
Get GCP instances using the Storage resource object, ingest to Neo4j, and clean up old data.
:type neo4j_session: The Neo4j session object
:param neo4j_session: The Neo4j session
:type storag... | def sync_gcp_buckets(
neo4j_session, storage, project_id, gcp_update_tag, common_job_parameters
):
"""
Get GCP instances using the Storage resource object, ingest to Neo4j, and clean up old data.
:type neo4j_session: The Neo4j session object
:param neo4j_session: The Neo4j session
:type storag... | https://github.com/lyft/cartography/issues/377 | Traceback (most recent call last):
File "{path}/site-packages/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{path}/site-packages/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{path}/site-packages/cartography/intel/gcp/__init__.py", line 218, in start_gcp_... | googleapiclient.errors.HttpError |
def get_transit_gateways(boto3_session, region):
client = boto3_session.client(
"ec2", region_name=region, config=get_botocore_config()
)
data = []
try:
data = client.describe_transit_gateways()["TransitGateways"]
except botocore.exceptions.ClientError as e:
# https://boto3.a... | def get_transit_gateways(boto3_session, region):
client = boto3_session.client(
"ec2", region_name=region, config=get_botocore_config()
)
return client.describe_transit_gateways()["TransitGateways"]
| https://github.com/lyft/cartography/issues/375 | Traceback (most recent call last):
[...]
File "{PATH}/site-packages/cartography/intel/aws/__init__.py", line 96, in _sync_multiple_accounts
_sync_one_account(neo4j_session, boto3_session, account_id, sync_tag, common_job_parameters)
File "{PATH}/site-packages/cartography/intel/aws/__init__.py", line 44, in _sync_one_ac... | botocore.exceptions.ClientError |
def get_zones_in_project(project_id, compute, max_results=None):
"""
Return the zones where the Compute Engine API is enabled for the given project_id.
See https://cloud.google.com/compute/docs/reference/rest/v1/zones and
https://cloud.google.com/compute/docs/reference/rest/v1/zones/list.
If the API... | def get_zones_in_project(project_id, compute, max_results=None):
"""
Return the zones where the Compute Engine API is enabled for the given project_id.
See https://cloud.google.com/compute/docs/reference/rest/v1/zones and
https://cloud.google.com/compute/docs/reference/rest/v1/zones/list.
If the API... | https://github.com/lyft/cartography/issues/371 | Traceback (most recent call last):
File "{Path}/cartography/sync.py", line 145, in run_with_config
return sync.run(neo4j_driver, config)
File "{Path}/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "{Path}/cartography/util.py", line 58, in timed
result = method(*args, **kwargs)
File "{Path}... | googleapiclient.errors.HttpError |
def get_user_managed_policy_data(boto3_session, user_list):
resource_client = boto3_session.resource("iam")
policies = {}
for user in user_list:
name = user["UserName"]
arn = user["Arn"]
resource_user = resource_client.User(name)
try:
policies[arn] = {
... | def get_user_managed_policy_data(boto3_session, user_list):
resource_client = boto3_session.resource("iam")
policies = {}
for user in user_list:
name = user["UserName"]
arn = user["Arn"]
resource_user = resource_client.User(name)
policies[arn] = {
p.policy_name: p... | https://github.com/lyft/cartography/issues/328 | Traceback (most recent call last):
File "/usr/local/bin/cartography", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/cartography/cli.py", line 308, in main
return CLI(default_sync, prog='cartography').main(argv)
File "/usr/local/lib/python3.7/site-packages/cartography/cli.py", line 28... | botocore.errorfactory.NoSuchEntityException |
def get_user_policy_data(boto3_session, user_list):
resource_client = boto3_session.resource("iam")
policies = {}
for user in user_list:
name = user["UserName"]
arn = user["Arn"]
resource_user = resource_client.User(name)
try:
policies[arn] = {
p.n... | def get_user_policy_data(boto3_session, user_list):
resource_client = boto3_session.resource("iam")
policies = {}
for user in user_list:
name = user["UserName"]
arn = user["Arn"]
resource_user = resource_client.User(name)
policies[arn] = {
p.name: p.policy_documen... | https://github.com/lyft/cartography/issues/328 | Traceback (most recent call last):
File "/usr/local/bin/cartography", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/cartography/cli.py", line 308, in main
return CLI(default_sync, prog='cartography').main(argv)
File "/usr/local/lib/python3.7/site-packages/cartography/cli.py", line 28... | botocore.errorfactory.NoSuchEntityException |
def _attach_firewall_rules(neo4j_session, fw, gcp_update_tag):
"""
Attach the allow_rules to the Firewall object
:param neo4j_session: The Neo4j session
:param fw: The Firewall object
:param gcp_update_tag: The timestamp
:return: Nothing
"""
template = Template("""
MATCH (fw:GCPFirew... | def _attach_firewall_rules(neo4j_session, fw, gcp_update_tag):
"""
Attach the allow_rules to the Firewall object
:param neo4j_session: The Neo4j session
:param fw: The Firewall object
:param gcp_update_tag: The timestamp
:return: Nothing
"""
query = """
MATCH (fw:GCPFirewall{id:{FwPa... | https://github.com/lyft/cartography/issues/183 | ...
INFO:cartography.sync:Finishing sync stage 'aws'
INFO:cartography.sync:Starting sync stage 'gcp'
INFO:oauth2client.transport:Attempting refresh to obtain initial access_token
INFO:oauth2client.client:Refreshing access_token
INFO:oauth2client.transport:Attempting refresh to obtain initial access_token
INFO:oauth2cli... | neobolt.exceptions.CypherSyntaxError |
def start_okta_ingestion(neo4j_session, config):
"""
Starts the OKTA ingestion process
:param neo4j_session: The Neo4j session
:param config: A `cartography.config` object
:return: Nothing
"""
if not config.okta_api_key:
logger.warning(
"No valid Okta credentials could be... | def start_okta_ingestion(neo4j_session, config):
"""
Starts the OKTA ingestion process
:param neo4j_session: The Neo4j session
:param config: A `cartography.config` object
:return: Nothing
"""
logger.debug(f"Starting Okta sync on {config.okta_org_id}")
common_job_parameters = {
... | https://github.com/lyft/cartography/issues/202 | INFO:cartography.sync:Starting sync stage 'okta'
ERROR:cartography.sync:Unhandled exception during sync stage 'okta'
Traceback (most recent call last):
File "/home/ec2-user/venv/lib64/python3.6/site-packages/cartography/sync.py", line 69, in run
stage_func(neo4j_session, config)
File "/home/ec2-user/venv/lib64/python3.... | AttributeError |
def _sign_and_dump_metadata(metadata, args):
"""
<Purpose>
Internal method to sign link or layout metadata and dump it to disk.
<Arguments>
metadata:
Metablock object (contains Link or Layout object)
args:
see argparser
<Exceptions>
SystemExit(0) if ... | def _sign_and_dump_metadata(metadata, args):
"""
<Purpose>
Internal method to sign link or layout metadata and dump it to disk.
<Arguments>
metadata:
Metablock object (contains Link or Layout object)
args:
see argparser
<Exceptions>
SystemExit(0) if ... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def main():
"""Parse arguments, load link or layout metadata file and either sign
metadata file or verify its signatures."""
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""
Provides command line interface to sign in-toto link or layout... | def main():
"""Parse arguments, load link or layout metadata file and either sign
metadata file or verify its signatures."""
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""
Provides command line interface to sign in-toto link or layout... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def add_functionary_key(self, key):
"""
<Purpose>
Add the passed functionary public key to the layout's dictionary of keys.
<Arguments>
key:
A functionary public key conformant with
securesystemslib.formats.ANY_PUBKEY_SCHEMA.
<Exceptions>
securesystemslib.... | def add_functionary_key(self, key):
"""
<Purpose>
Add the passed functionary public key to the layout's dictionary of keys.
<Arguments>
key:
A functionary public key conformant with
in_toto.formats.ANY_PUBKEY_SCHEMA.
<Exceptions>
securesystemslib.exception... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def add_functionary_key_from_gpg_keyid(self, gpg_keyid, gpg_home=None):
"""
<Purpose>
Load a functionary public key from the GPG keychain, located at the
passed GPG home path, identified by the passed GPG keyid, and add it to
the layout's dictionary of keys.
<Arguments>
gpg_keyid:
... | def add_functionary_key_from_gpg_keyid(self, gpg_keyid, gpg_home=None):
"""
<Purpose>
Load a functionary public key from the GPG keychain, located at the
passed GPG home path, identified by the passed GPG keyid, and add it to
the layout's dictionary of keys.
<Arguments>
gpg_keyid:
... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def add_functionary_keys_from_gpg_keyids(self, gpg_keyid_list, gpg_home=None):
"""
<Purpose>
Load functionary public keys from the GPG keychain, located at the
passed GPG home path, identified by the passed GPG keyids, and add it to
the layout's dictionary of keys.
<Arguments>
gpg_k... | def add_functionary_keys_from_gpg_keyids(self, gpg_keyid_list, gpg_home=None):
"""
<Purpose>
Load functionary public keys from the GPG keychain, located at the
passed GPG home path, identified by the passed GPG keyids, and add it to
the layout's dictionary of keys.
<Arguments>
gpg_k... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def _validate_keys(self):
"""Private method to ensure that the keys contained are right."""
securesystemslib.formats.ANY_PUBKEY_DICT_SCHEMA.check_match(self.keys)
| def _validate_keys(self):
"""Private method to ensure that the keys contained are right."""
in_toto.formats.ANY_PUBKEY_DICT_SCHEMA.check_match(self.keys)
| https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def sign_gpg(self, gpg_keyid=None, gpg_home=None):
"""
<Purpose>
Signs the utf-8 encoded canonical JSON bytes of the Link or Layout object
contained in `self.signed` using `gpg.functions.create_signature` and
appends the created signature to `self.signatures`.
<Arguments>
gpg_keyid:... | def sign_gpg(self, gpg_keyid=None, gpg_home=None):
"""
<Purpose>
Signs the utf-8 encoded canonical JSON bytes of the Link or Layout object
contained in `self.signed` using `gpg.functions.gpg_sign_object` and
appends the created signature to `self.signatures`.
<Arguments>
gpg_keyid: ... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def verify_signature(self, verification_key):
"""
<Purpose>
Verifies the signature, found in `self.signatures`, corresponding to the
passed verification key, or in case of GPG one of its subkeys, identified
by the key's keyid, using the passed verification key and the utf-8
encoded canon... | def verify_signature(self, verification_key):
"""
<Purpose>
Verifies the signature, found in `self.signatures`, corresponding to the
passed verification key, or in case of GPG one of its subkeys, identified
by the key's keyid, using the passed verification key and the utf-8
encoded canon... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def _validate_signatures(self):
"""Private method to check that the 'signatures' attribute is a list of
signatures in the format 'securesystemslib.formats.ANY_SIGNATURE_SCHEMA'.
"""
if not isinstance(self.signatures, list):
raise securesystemslib.exceptions.FormatError(
"The Metablo... | def _validate_signatures(self):
"""Private method to check that the 'signatures' attribute is a list of
signatures in the format 'in_toto.formats.ANY_SIGNATURE_SCHEMA'."""
if not isinstance(self.signatures, list):
raise securesystemslib.exceptions.FormatError(
"The Metablock's 'signatur... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def unpack_rule(rule):
"""
Parses the rule and extracts and returns the necessary data to apply the
rule. Can also be used to verify if a rule complies with any of the formats
<Arguments>
rule:
The list of rule elements, in one of the following formats:
MATCH <pattern> [IN <so... | def unpack_rule(rule):
"""
Parses the rule and extracts and returns the necessary data to apply the
rule. Can also be used to verify if a rule complies with any of the formats
<Arguments>
rule:
The list of rule elements, in one of the following formats:
MATCH <pattern> [IN <so... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def pack_rule(
rule_type,
pattern,
source_prefix=None,
dest_type=None,
dest_prefix=None,
dest_name=None,
):
"""
<Purpose>
Create an artifact rule in the passed arguments and return it as list
as it is stored in a step's or inspection's expected_material or
expected_prod... | def pack_rule(
rule_type,
pattern,
source_prefix=None,
dest_type=None,
dest_prefix=None,
dest_name=None,
):
"""
<Purpose>
Create an artifact rule in the passed arguments and return it as list
as it is stored in a step's or inspection's expected_material or
expected_prod... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def execute_link(link_cmd_args, record_streams):
"""
<Purpose>
Executes the passed command plus arguments in a subprocess and returns
the return value of the executed command. If the specified standard output
and standard error of the command are recorded and also returned to the
caller.... | def execute_link(link_cmd_args, record_streams):
"""
<Purpose>
Executes the passed command plus arguments in a subprocess and returns
the return value of the executed command. If the specified standard output
and standard error of the command are recorded and also returned to the
caller.... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def in_toto_run(
name,
material_list,
product_list,
link_cmd_args,
record_streams=False,
signing_key=None,
gpg_keyid=None,
gpg_use_default=False,
gpg_home=None,
exclude_patterns=None,
base_path=None,
compact_json=False,
record_environment=False,
normalize_line_end... | def in_toto_run(
name,
material_list,
product_list,
link_cmd_args,
record_streams=False,
signing_key=None,
gpg_keyid=None,
gpg_use_default=False,
gpg_home=None,
exclude_patterns=None,
base_path=None,
compact_json=False,
record_environment=False,
normalize_line_end... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def in_toto_record_start(
step_name,
material_list,
signing_key=None,
gpg_keyid=None,
gpg_use_default=False,
gpg_home=None,
exclude_patterns=None,
base_path=None,
record_environment=False,
normalize_line_endings=False,
lstrip_paths=None,
):
"""
<Purpose>
Starts ... | def in_toto_record_start(
step_name,
material_list,
signing_key=None,
gpg_keyid=None,
gpg_use_default=False,
gpg_home=None,
exclude_patterns=None,
base_path=None,
record_environment=False,
normalize_line_endings=False,
lstrip_paths=None,
):
"""
<Purpose>
Starts ... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def in_toto_record_stop(
step_name,
product_list,
signing_key=None,
gpg_keyid=None,
gpg_use_default=False,
gpg_home=None,
exclude_patterns=None,
base_path=None,
normalize_line_endings=False,
lstrip_paths=None,
):
"""
<Purpose>
Finishes creating link metadata for a m... | def in_toto_record_stop(
step_name,
product_list,
signing_key=None,
gpg_keyid=None,
gpg_use_default=False,
gpg_home=None,
exclude_patterns=None,
base_path=None,
normalize_line_endings=False,
lstrip_paths=None,
):
"""
<Purpose>
Finishes creating link metadata for a m... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def import_gpg_public_keys_from_keyring_as_dict(keyids, gpg_home=False):
"""Creates a dictionary of gpg public keys retrieving gpg public keys
identified by the list of passed `keyids` from the gpg keyring at `gpg_home`.
If `gpg_home` is False the default keyring is used."""
key_dict = {}
for gpg_ke... | def import_gpg_public_keys_from_keyring_as_dict(keyids, gpg_home=False):
"""Creates a dictionary of gpg public keys retrieving gpg public keys
identified by the list of passed `keyids` from the gpg keyring at `gpg_home`.
If `gpg_home` is False the default keyring is used."""
key_dict = {}
for gpg_ke... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def verify_layout_signatures(layout_metablock, keys_dict):
"""
<Purpose>
Iteratively verifies the signatures of a Metablock object containing
a Layout object for every verification key in the passed keys dictionary.
Requires at least one key to be passed and requires every passed key to
... | def verify_layout_signatures(layout_metablock, keys_dict):
"""
<Purpose>
Iteratively verifies the signatures of a Metablock object containing
a Layout object for every verification key in the passed keys dictionary.
Requires at least one key to be passed and requires every passed key to
... | https://github.com/in-toto/in-toto/issues/282 | ======================================================================
FAIL: test_in_toto_run_with_byproduct (tests.test_runlib.TestInTotoRun)
Successfully run, verify recorded byproduct.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/l... | AssertionError |
def request(self, method, url, **kwargs):
if "params" not in kwargs:
kwargs["params"] = {"access_token": self.token}
r = requests.request(method=method, url=url, **kwargs)
r.raise_for_status()
json = r.json()
if check_error(json):
return json
| def request(self, method, url, **kwargs):
kwargs.setdefault(
"params",
{
"access_token": self.token,
},
)
r = requests.request(method=method, url=url, **kwargs)
r.raise_for_status()
json = r.json()
if check_error(json):
return json
| https://github.com/offu/WeRoBot/issues/37 | In [1]: import six
In [2]: def to_text(value, encoding="utf-8"):
...: if isinstance(value, (six.string_types, six.binary_type)):
...: return value.decode(encoding)
...: if isinstance(value, int):
...: return six.text_type(value)
...: assert isinstance(value, six.... | UnicodeEncodeError |
def grant_token(self):
"""
获取 Access Token 。
详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=通用接口文档
:return: 返回的 JSON 数据包
"""
return self.get(
url="https://api.weixin.qq.com/cgi-bin/token",
params={
"grant_type": "client_credential",
"appid": self.appi... | def grant_token(self):
"""
获取 Access Token 。
详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=通用接口文档
:param appid: 第三方用户唯一凭证
:param appsecret: 第三方用户唯一凭证密钥,即 App Secret
:return: 返回的 JSON 数据包
"""
return self.get(
url="https://api.weixin.qq.com/cgi-bin/token",
params={
... | https://github.com/offu/WeRoBot/issues/37 | In [1]: import six
In [2]: def to_text(value, encoding="utf-8"):
...: if isinstance(value, (six.string_types, six.binary_type)):
...: return value.decode(encoding)
...: if isinstance(value, int):
...: return six.text_type(value)
...: assert isinstance(value, six.... | UnicodeEncodeError |
def create_menu(self, menu_data):
"""
创建自定义菜单 ::
client = Client("id", "secret")
client.create_menu({
"button":[
{
"type":"click",
"name":"今日歌曲",
"key":"V1001_TODAY_MUSIC"
},
... | def create_menu(self, menu_data):
"""
创建自定义菜单 ::
client = Client("id", "secret")
client.create_menu({
"button":[
{
"type":"click",
"name":"今日歌曲",
"key":"V1001_TODAY_MUSIC"
},
... | https://github.com/offu/WeRoBot/issues/37 | In [1]: import six
In [2]: def to_text(value, encoding="utf-8"):
...: if isinstance(value, (six.string_types, six.binary_type)):
...: return value.decode(encoding)
...: if isinstance(value, int):
...: return six.text_type(value)
...: assert isinstance(value, six.... | UnicodeEncodeError |
def upload_media(self, media_type, media_file):
"""
上传多媒体文件。
详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=上传下载多媒体文件
:param media_type: 媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)
:param media_file:要上传的文件,一个 File-object
:return: 返回的 JSON 数据包
"""
return self.post(
ur... | def upload_media(self, type, media):
"""
上传多媒体文件。
详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=上传下载多媒体文件
:param type: 媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)
:param media:要上传的文件,一个 File-object
:return: 返回的 JSON 数据包
"""
return self.post(
url="https://api.weixin.... | https://github.com/offu/WeRoBot/issues/37 | In [1]: import six
In [2]: def to_text(value, encoding="utf-8"):
...: if isinstance(value, (six.string_types, six.binary_type)):
...: return value.decode(encoding)
...: if isinstance(value, int):
...: return six.text_type(value)
...: assert isinstance(value, six.... | UnicodeEncodeError |
def create_group(self, name):
"""
创建分组
详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=分组管理接口
:param name: 分组名字(30个字符以内)
:return: 返回的 JSON 数据包
"""
name = to_text(name)
return self.post(
url="https://api.weixin.qq.com/cgi-bin/groups/create",
data={"group": {"name": na... | def create_group(self, name):
"""
创建分组
详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=分组管理接口
:param name: 分组名字(30个字符以内)
:return: 返回的 JSON 数据包
"""
name = to_unicode(name)
return self.post(
url="https://api.weixin.qq.com/cgi-bin/groups/create",
data={"group": {"name":... | https://github.com/offu/WeRoBot/issues/37 | In [1]: import six
In [2]: def to_text(value, encoding="utf-8"):
...: if isinstance(value, (six.string_types, six.binary_type)):
...: return value.decode(encoding)
...: if isinstance(value, int):
...: return six.text_type(value)
...: assert isinstance(value, six.... | UnicodeEncodeError |
def update_group(self, group_id, name):
"""
修改分组名
详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=分组管理接口
:param group_id: 分组id,由微信分配
:param name: 分组名字(30个字符以内)
:return: 返回的 JSON 数据包
"""
return self.post(
url="https://api.weixin.qq.com/cgi-bin/groups/update",
data={"gr... | def update_group(self, group_id, name):
"""
修改分组名
详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=分组管理接口
:param group_id: 分组id,由微信分配
:param name: 分组名字(30个字符以内)
:return: 返回的 JSON 数据包
"""
return self.post(
url="https://api.weixin.qq.com/cgi-bin/groups/update",
data={"gr... | https://github.com/offu/WeRoBot/issues/37 | In [1]: import six
In [2]: def to_text(value, encoding="utf-8"):
...: if isinstance(value, (six.string_types, six.binary_type)):
...: return value.decode(encoding)
...: if isinstance(value, int):
...: return six.text_type(value)
...: assert isinstance(value, six.... | UnicodeEncodeError |
def to_text(value, encoding="utf-8"):
if isinstance(value, six.binary_type):
return value.decode(encoding)
if isinstance(value, six.integer_types):
return six.text_type(value)
assert isinstance(value, six.text_type)
return value
| def to_text(value, encoding="utf-8"):
if isinstance(value, (six.string_types, six.binary_type)):
return value.decode(encoding)
if isinstance(value, int):
return six.text_type(value)
assert isinstance(value, six.text_type)
return value
| https://github.com/offu/WeRoBot/issues/37 | In [1]: import six
In [2]: def to_text(value, encoding="utf-8"):
...: if isinstance(value, (six.string_types, six.binary_type)):
...: return value.decode(encoding)
...: if isinstance(value, int):
...: return six.text_type(value)
...: assert isinstance(value, six.... | UnicodeEncodeError |
def to_binary(value, encoding="utf-8"):
if isinstance(value, six.text_type):
return value.encode(encoding)
if isinstance(value, six.integer_types):
return six.binary_type(value)
assert isinstance(value, six.binary_type)
return value
| def to_binary(value, encoding="utf-8"):
if isinstance(value, six.text_type):
return value.encode(encoding)
if isinstance(value, int):
return six.binary_type(value)
assert isinstance(value, six.binary_type)
return value
| https://github.com/offu/WeRoBot/issues/37 | In [1]: import six
In [2]: def to_text(value, encoding="utf-8"):
...: if isinstance(value, (six.string_types, six.binary_type)):
...: return value.decode(encoding)
...: if isinstance(value, int):
...: return six.text_type(value)
...: assert isinstance(value, six.... | UnicodeEncodeError |
def format(self, record):
"""Prettify the log output, annotate with simulation time"""
msg = record.getMessage()
# Need to colour each line in case coloring is applied in the message
msg = "\n".join(
[
SimColourLogFormatter.loglevel2colour.get(record.levelno, "%s") % line
... | def format(self, record):
"""Prettify the log output, annotate with simulation time"""
msg = record.getMessage()
# Need to colour each line in case coloring is applied in the message
msg = "\n".join(
[
SimColourLogFormatter.loglevel2colour[record.levelno] % line
for lin... | https://github.com/cocotb/cocotb/issues/2362 | Traceback (most recent call last):
File "/Users/raysalemi/opt/anaconda3/lib/python3.8/logging/__init__.py", line 1081, in emit
msg = self.format(record)
File "/Users/raysalemi/opt/anaconda3/lib/python3.8/logging/__init__.py", line 925, in format
return fmt.format(record)
File "/Users/raysalemi/opt/anaconda3/lib/python3... | KeyError |
def format(self, record):
"""Prettify the log output, annotate with simulation time"""
msg = record.getMessage()
level = record.levelname.ljust(_LEVEL_CHARS)
return self._format(level, record, msg)
| def format(self, record):
"""Prettify the log output, annotate with simulation time"""
if record.args:
msg = record.msg % record.args
else:
msg = record.msg
msg = str(msg)
level = record.levelname.ljust(_LEVEL_CHARS)
return self._format(level, record, msg)
| https://github.com/cocotb/cocotb/issues/1408 | Traceback (most recent call last):
File "/usr/lib64/python3.7/logging/__init__.py", line 1034, in emit
msg = self.format(record)
File "/usr/lib64/python3.7/logging/__init__.py", line 880, in format
return fmt.format(record)
File "/home/philipp/.local/lib/python3.7/site-packages/cocotb/log.py", line 201, in format
msg =... | AttributeError |
def format(self, record):
"""Prettify the log output, annotate with simulation time"""
msg = record.getMessage()
# Need to colour each line in case coloring is applied in the message
msg = "\n".join(
[
SimColourLogFormatter.loglevel2colour[record.levelno] % line
for lin... | def format(self, record):
"""Prettify the log output, annotate with simulation time"""
if record.args:
msg = record.msg % record.args
else:
msg = record.msg
# Need to colour each line in case coloring is applied in the message
msg = "\n".join(
[
SimColourLogForm... | https://github.com/cocotb/cocotb/issues/1408 | Traceback (most recent call last):
File "/usr/lib64/python3.7/logging/__init__.py", line 1034, in emit
msg = self.format(record)
File "/usr/lib64/python3.7/logging/__init__.py", line 880, in format
return fmt.format(record)
File "/home/philipp/.local/lib/python3.7/site-packages/cocotb/log.py", line 201, in format
msg =... | AttributeError |
def build_edges(nodes: List[ManifestNode]):
"""Build the forward and backward edges on the given list of ParsedNodes
and return them as two separate dictionaries, each mapping unique IDs to
lists of edges.
"""
backward_edges: Dict[str, List[str]] = {}
# pre-populate the forward edge dict for sim... | def build_edges(nodes: List[ManifestNode]):
"""Build the forward and backward edges on the given list of ParsedNodes
and return them as two separate dictionaries, each mapping unique IDs to
lists of edges.
"""
backward_edges: Dict[str, List[str]] = {}
# pre-populate the forward edge dict for sim... | https://github.com/fishtown-analytics/dbt/issues/2875 | ~/git/jaffle_shop(bug/defer-with-filters) » dbt -d run --models config.materialized:table,state:modified+ --defer --state ./deferring_target 2 ↵ naveen@Naveens-MacBook-Pro
2020-11-09 22:41:10.593567 (MainThread): Running with dbt=0.18.1
2020-11-09 22:41:12.097193 (MainThread): running db... | KeyError |
def fetch_cluster_credentials(
cls, db_user, db_name, cluster_id, iam_profile, duration_s, autocreate, db_groups
):
"""Fetches temporary login credentials from AWS. The specified user
must already exist in the database, or else an error will occur"""
if iam_profile is None:
session = boto3.Sess... | def fetch_cluster_credentials(
cls, db_user, db_name, cluster_id, iam_profile, duration_s, autocreate, db_groups
):
"""Fetches temporary login credentials from AWS. The specified user
must already exist in the database, or else an error will occur"""
if iam_profile is None:
boto_client = boto3.... | https://github.com/fishtown-analytics/dbt/issues/2756 | 2020-09-14 11:15:23.743840 (MainThread): Traceback (most recent call last):
File "/Users/xxx/venv/lib/python3.7/site-packages/dbt/adapters/postgres/connections.py", line 46, in exception_handler
yield
File "/Users/xxx/venv/lib/python3.7/site-packages/dbt/adapters/sql/connections.py", line 76, in add_query
cursor = conn... | KeyError |
def get_result_from_cursor(cls, cursor: Any) -> agate.Table:
data: List[Any] = []
column_names: List[str] = []
if cursor.description is not None:
column_names = [col[0] for col in cursor.description]
rows = cursor.fetchall()
data = cls.process_results(column_names, rows)
return... | def get_result_from_cursor(cls, cursor: Any) -> agate.Table:
data: List[Any] = []
column_names: List[str] = []
if cursor.description is not None:
column_names = [col[0] for col in cursor.description]
rows = cursor.fetchall()
data = cls.process_results(column_names, rows)
return... | https://github.com/fishtown-analytics/dbt/issues/2337 | Traceback (most recent call last):
File \"/Users/drew/fishtown/dbt/core/dbt/node_runners.py\", line 227, in safe_run
result = self.compile_and_execute(manifest, ctx)
File \"/Users/drew/fishtown/dbt/core/dbt/node_runners.py\", line 170, in compile_and_execute
result = self.run(ctx.node, manifest)
File \"/Users/drew/fish... | ValueError |
def execute_macro(
self,
macro_name: str,
manifest: Optional[Manifest] = None,
project: Optional[str] = None,
context_override: Optional[Dict[str, Any]] = None,
kwargs: Dict[str, Any] = None,
release: bool = False,
text_only_columns: Optional[Iterable[str]] = None,
) -> agate.Table:
... | def execute_macro(
self,
macro_name: str,
manifest: Optional[Manifest] = None,
project: Optional[str] = None,
context_override: Optional[Dict[str, Any]] = None,
kwargs: Dict[str, Any] = None,
release: bool = False,
) -> agate.Table:
"""Look macro_name up in the manifest and execute its r... | https://github.com/fishtown-analytics/dbt/issues/2175 | 2020-03-02 09:10:33,888249 (MainThread): 'decimal.Decimal' object has no attribute 'lower'
2020-03-02 09:10:33,892358 (MainThread): Traceback (most recent call last):
File "/usr/local/Cellar/dbt/0.15.2_1/libexec/lib/python3.7/site-packages/dbt/main.py", line 80, in main
results, succeeded = handle_and_check(args)
File ... | AttributeError |
def _catalog_filter_table(cls, table: agate.Table, manifest: Manifest) -> agate.Table:
"""Filter the table as appropriate for catalog entries. Subclasses can
override this to change filtering rules on a per-adapter basis.
"""
# force database + schema to be strings
table = table_from_rows(
t... | def _catalog_filter_table(cls, table: agate.Table, manifest: Manifest) -> agate.Table:
"""Filter the table as appropriate for catalog entries. Subclasses can
override this to change filtering rules on a per-adapter basis.
"""
return table.where(_catalog_filter_schemas(manifest))
| https://github.com/fishtown-analytics/dbt/issues/2175 | 2020-03-02 09:10:33,888249 (MainThread): 'decimal.Decimal' object has no attribute 'lower'
2020-03-02 09:10:33,892358 (MainThread): Traceback (most recent call last):
File "/usr/local/Cellar/dbt/0.15.2_1/libexec/lib/python3.7/site-packages/dbt/main.py", line 80, in main
results, succeeded = handle_and_check(args)
File ... | AttributeError |
def table_from_data(data, column_names: Iterable[str]) -> agate.Table:
"Convert list of dictionaries into an Agate table"
# The agate table is generated from a list of dicts, so the column order
# from `data` is not preserved. We can use `select` to reorder the columns
#
# If there is no data, crea... | def table_from_data(data, column_names):
"Convert list of dictionaries into an Agate table"
# The agate table is generated from a list of dicts, so the column order
# from `data` is not preserved. We can use `select` to reorder the columns
#
# If there is no data, create an empty table with the spe... | https://github.com/fishtown-analytics/dbt/issues/2175 | 2020-03-02 09:10:33,888249 (MainThread): 'decimal.Decimal' object has no attribute 'lower'
2020-03-02 09:10:33,892358 (MainThread): Traceback (most recent call last):
File "/usr/local/Cellar/dbt/0.15.2_1/libexec/lib/python3.7/site-packages/dbt/main.py", line 80, in main
results, succeeded = handle_and_check(args)
File ... | AttributeError |
def table_from_data_flat(data, column_names: Iterable[str]) -> agate.Table:
"Convert list of dictionaries into an Agate table"
rows = []
for _row in data:
row = []
for value in list(_row.values()):
if isinstance(value, (dict, list, tuple)):
row.append(json.dumps(... | def table_from_data_flat(data, column_names):
"Convert list of dictionaries into an Agate table"
rows = []
for _row in data:
row = []
for value in list(_row.values()):
if isinstance(value, (dict, list, tuple)):
row.append(json.dumps(value))
else:
... | https://github.com/fishtown-analytics/dbt/issues/2175 | 2020-03-02 09:10:33,888249 (MainThread): 'decimal.Decimal' object has no attribute 'lower'
2020-03-02 09:10:33,892358 (MainThread): Traceback (most recent call last):
File "/usr/local/Cellar/dbt/0.15.2_1/libexec/lib/python3.7/site-packages/dbt/main.py", line 80, in main
results, succeeded = handle_and_check(args)
File ... | AttributeError |
def run(self) -> CatalogResults:
compile_results = None
if self.args.compile:
compile_results = CompileTask.run(self)
if any(r.error is not None for r in compile_results):
dbt.ui.printer.print_timestamped_line(
"compile failed, cannot generate docs"
)
... | def run(self):
compile_results = None
if self.args.compile:
compile_results = CompileTask.run(self)
if any(r.error is not None for r in compile_results):
dbt.ui.printer.print_timestamped_line(
"compile failed, cannot generate docs"
)
return Cat... | https://github.com/fishtown-analytics/dbt/issues/2090 | 2020-02-04 02:04:58,798143 (MainThread): Traceback (most recent call last):
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 81, in main
results, succeeded = handle_and_check(args)
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 159, in handle_and_check
task, res = run_from_args(parsed)
File "/Users/drew/f... | dbt.exceptions.InternalException |
def interpret_results(self, results: Optional[CatalogResults]) -> bool:
if results is None:
return False
if results.errors:
return False
compile_results = results._compile_results
if compile_results is None:
return True
return super().interpret_results(compile_results)
| def interpret_results(self, results):
if results.errors:
return False
compile_results = results._compile_results
if compile_results is None:
return True
return super().interpret_results(compile_results)
| https://github.com/fishtown-analytics/dbt/issues/2090 | 2020-02-04 02:04:58,798143 (MainThread): Traceback (most recent call last):
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 81, in main
results, succeeded = handle_and_check(args)
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 159, in handle_and_check
task, res = run_from_args(parsed)
File "/Users/drew/f... | dbt.exceptions.InternalException |
def find_blocks(self, allowed_blocks=None, collect_raw_data=True):
"""Find all top-level blocks in the data."""
if allowed_blocks is None:
allowed_blocks = {"snapshot", "macro", "materialization", "docs"}
for tag in self.tag_parser.find_tags():
if tag.block_type_name in _CONTROL_FLOW_TAGS:
... | def find_blocks(self, allowed_blocks=None, collect_raw_data=True):
"""Find all top-level blocks in the data."""
if allowed_blocks is None:
allowed_blocks = {"snapshot", "macro", "materialization", "docs"}
for tag in self.tag_parser.find_tags():
if tag.block_type_name in _CONTROL_FLOW_TAGS:
... | https://github.com/fishtown-analytics/dbt/issues/2066 | Running with dbt=0.15.2-a1
Encountered an error:
Traceback (most recent call last):
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 80, in main
results, succeeded = handle_and_check(args)
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 158, in handle_and_check
task, res = run_from_args(parsed)
File "/User... | AttributeError |
def node_to_string(self, node):
if node is None:
return "<Unknown>"
if not hasattr(node, "name"):
# we probably failed to parse a block, so we can't know the name
return "{} ({})".format(node.resource_type, node.original_file_path)
if hasattr(node, "contents"):
# handle File... | def node_to_string(self, node):
if node is None:
return "<Unknown>"
if not hasattr(node, "name"):
# we probably failed to parse a block, so we can't know the name
return "{} ({})".format(node.resource_type, node.original_file_path)
return "{} {} ({})".format(node.resource_type, node.... | https://github.com/fishtown-analytics/dbt/issues/2066 | Running with dbt=0.15.2-a1
Encountered an error:
Traceback (most recent call last):
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 80, in main
results, succeeded = handle_and_check(args)
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 158, in handle_and_check
task, res = run_from_args(parsed)
File "/User... | AttributeError |
def extract_blocks(self, source_file: FileBlock) -> Iterable[BlockTag]:
try:
blocks = extract_toplevel_blocks(
source_file.contents,
allowed_blocks=self.allowed_blocks,
collect_raw_data=False,
)
# this makes mypy happy, and this is an invariant we really n... | def extract_blocks(self, source_file: FileBlock) -> Iterable[BlockTag]:
try:
blocks = extract_toplevel_blocks(
source_file.contents,
allowed_blocks=self.allowed_blocks,
collect_raw_data=False,
)
# this makes mypy happy, and this is an invariant we really n... | https://github.com/fishtown-analytics/dbt/issues/2066 | Running with dbt=0.15.2-a1
Encountered an error:
Traceback (most recent call last):
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 80, in main
results, succeeded = handle_and_check(args)
File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 158, in handle_and_check
task, res = run_from_args(parsed)
File "/User... | AttributeError |
def __init__(
self,
log_dir: Optional[str] = None,
level=logbook.DEBUG,
filter=None,
bubble=True,
max_size=10 * 1024 * 1024, # 10 mb
backup_count=5,
) -> None:
self.disabled = False
self._msg_buffer: Optional[List[logbook.LogRecord]] = []
# if we get 1k messages without a logfil... | def __init__(
self,
log_dir: Optional[str] = None,
level=logbook.DEBUG,
filter=None,
bubble=True,
) -> None:
self.disabled = False
self._msg_buffer: Optional[List[logbook.LogRecord]] = []
# if we get 1k messages without a logfile being set, something is wrong
self._bufmax = 1000
... | https://github.com/fishtown-analytics/dbt/issues/1865 | 2019-10-25 03:10:31,150080 (MainThread): Running with dbt=0.15.0-b2
2019-10-25 03:10:31,478080 (MainThread): running dbt with arguments Namespace(cls=<class 'dbt.task.test.TestTask'>, data=False, debug=True, exclude=None, log_cache_events=False, log_format='default', models=['dim_agency_assert_agency_id'], partial_pars... | FileExistsError |
def _super_init(self, log_path):
logbook.RotatingFileHandler.__init__(
self,
filename=log_path,
level=self.level,
filter=self.filter,
delay=True,
max_size=self._max_size,
backup_count=self._backup_count,
bubble=self.bubble,
format_string=DEBUG_... | def _super_init(self, log_path):
logbook.TimedRotatingFileHandler.__init__(
self,
filename=log_path,
level=self.level,
filter=self.filter,
bubble=self.bubble,
format_string=DEBUG_LOG_FORMAT,
date_format="%Y-%m-%d",
backup_count=7,
timed_filenam... | https://github.com/fishtown-analytics/dbt/issues/1865 | 2019-10-25 03:10:31,150080 (MainThread): Running with dbt=0.15.0-b2
2019-10-25 03:10:31,478080 (MainThread): running dbt with arguments Namespace(cls=<class 'dbt.task.test.TestTask'>, data=False, debug=True, exclude=None, log_cache_events=False, log_format='default', models=['dim_agency_assert_agency_id'], partial_pars... | FileExistsError |
def Table(cls) -> str:
return str(RelationType.Table)
| def Table(self) -> str:
return str(RelationType.Table)
| https://github.com/fishtown-analytics/dbt/issues/1698 | dbt --debug run
Running with dbt=0.14.0
2019-08-26 10:41:40,953 (MainThread): Tracking: tracking
2019-08-26 10:41:40,959 (MainThread): Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x10eda3bd0>, <snowplow_tr... | dbt.exceptions.InternalException |
def CTE(cls) -> str:
return str(RelationType.CTE)
| def CTE(self) -> str:
return str(RelationType.CTE)
| https://github.com/fishtown-analytics/dbt/issues/1698 | dbt --debug run
Running with dbt=0.14.0
2019-08-26 10:41:40,953 (MainThread): Tracking: tracking
2019-08-26 10:41:40,959 (MainThread): Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x10eda3bd0>, <snowplow_tr... | dbt.exceptions.InternalException |
def View(cls) -> str:
return str(RelationType.View)
| def View(self) -> str:
return str(RelationType.View)
| https://github.com/fishtown-analytics/dbt/issues/1698 | dbt --debug run
Running with dbt=0.14.0
2019-08-26 10:41:40,953 (MainThread): Tracking: tracking
2019-08-26 10:41:40,959 (MainThread): Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x10eda3bd0>, <snowplow_tr... | dbt.exceptions.InternalException |
def External(cls) -> str:
return str(RelationType.External)
| def External(self) -> str:
return str(RelationType.External)
| https://github.com/fishtown-analytics/dbt/issues/1698 | dbt --debug run
Running with dbt=0.14.0
2019-08-26 10:41:40,953 (MainThread): Tracking: tracking
2019-08-26 10:41:40,959 (MainThread): Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x10eda3bd0>, <snowplow_tr... | dbt.exceptions.InternalException |
def _add_link(self, referenced_key, dependent_key):
"""Add a link between two relations to the database. Both the old and
new entries must alraedy exist in the database.
:param _ReferenceKey referenced_key: The key identifying the referenced
model (the one that if dropped will drop the dependent mo... | def _add_link(self, referenced_key, dependent_key):
"""Add a link between two relations to the database. Both the old and
new entries must alraedy exist in the database.
:param _ReferenceKey referenced_key: The key identifying the referenced
model (the one that if dropped will drop the dependent mo... | https://github.com/fishtown-analytics/dbt/issues/1698 | dbt --debug run
Running with dbt=0.14.0
2019-08-26 10:41:40,953 (MainThread): Tracking: tracking
2019-08-26 10:41:40,959 (MainThread): Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x10eda3bd0>, <snowplow_tr... | dbt.exceptions.InternalException |
def add_link(self, referenced, dependent):
"""Add a link between two relations to the database. If either relation
does not exist, it will be added as an "external" relation.
The dependent model refers _to_ the referenced model. So, given
arguments of (jake_test, bar, jake_test, foo):
both values a... | def add_link(self, referenced, dependent):
"""Add a link between two relations to the database. Both the old and
new entries must already exist in the database.
The dependent model refers _to_ the referenced model. So, given
arguments of (jake_test, bar, jake_test, foo):
both values are in the sche... | https://github.com/fishtown-analytics/dbt/issues/1698 | dbt --debug run
Running with dbt=0.14.0
2019-08-26 10:41:40,953 (MainThread): Tracking: tracking
2019-08-26 10:41:40,959 (MainThread): Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x10eda3bd0>, <snowplow_tr... | dbt.exceptions.InternalException |
def _link_cached_database_relations(self, schemas):
"""
:param Set[str] schemas: The set of schemas that should have links
added.
"""
database = self.config.credentials.database
table = self.execute_macro(GET_RELATIONS_MACRO_NAME)
for dep_schema, dep_name, refed_schema, refed_name in t... | def _link_cached_database_relations(self, schemas):
"""
:param Set[str] schemas: The set of schemas that should have links
added.
"""
database = self.config.credentials.database
table = self.execute_macro(GET_RELATIONS_MACRO_NAME)
for refed_schema, refed_name, dep_schema, dep_name in t... | https://github.com/fishtown-analytics/dbt/issues/1698 | dbt --debug run
Running with dbt=0.14.0
2019-08-26 10:41:40,953 (MainThread): Tracking: tracking
2019-08-26 10:41:40,959 (MainThread): Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x10eda3bd0>, <snowplow_tr... | dbt.exceptions.InternalException |
def find_matching(root_path, relative_paths_to_search, file_pattern):
"""
Given an absolute `root_path`, a list of relative paths to that
absolute root path (`relative_paths_to_search`), and a `file_pattern`
like '*.sql', returns information about the files. For example:
> find_matching('/root/path... | def find_matching(root_path, relative_paths_to_search, file_pattern):
"""
Given an absolute `root_path`, a list of relative paths to that
absolute root path (`relative_paths_to_search`), and a `file_pattern`
like '*.sql', returns information about the files. For example:
> find_matching('/root/path... | https://github.com/fishtown-analytics/dbt/issues/1723 | 2019-09-04 16:36:25,854704 (MainThread): Acquiring new postgres connection "seedtable".
2019-09-04 16:36:25,854894 (MainThread): Re-using an available connection from the pool (formerly model_2).
2019-09-04 16:36:25,963811 (MainThread): Unhandled error while executing seed.minimal.seedtable
[Errno 2] No such file or di... | FileNotFoundError |
def _build_load_agate_table(
model: Union[ParsedSeedNode, CompiledSeedNode],
) -> Callable[[], agate.Table]:
def load_agate_table():
path = model.seed_file_path
try:
table = dbt.clients.agate_helper.from_csv(path)
except ValueError as e:
dbt.exceptions.raise_compi... | def _build_load_agate_table(model):
def load_agate_table():
path = model.original_file_path
try:
table = dbt.clients.agate_helper.from_csv(path)
except ValueError as e:
dbt.exceptions.raise_compiler_error(str(e))
table.original_abspath = os.path.abspath(path)
... | https://github.com/fishtown-analytics/dbt/issues/1723 | 2019-09-04 16:36:25,854704 (MainThread): Acquiring new postgres connection "seedtable".
2019-09-04 16:36:25,854894 (MainThread): Re-using an available connection from the pool (formerly model_2).
2019-09-04 16:36:25,963811 (MainThread): Unhandled error while executing seed.minimal.seedtable
[Errno 2] No such file or di... | FileNotFoundError |
def load_agate_table():
path = model.seed_file_path
try:
table = dbt.clients.agate_helper.from_csv(path)
except ValueError as e:
dbt.exceptions.raise_compiler_error(str(e))
table.original_abspath = os.path.abspath(path)
return table
| def load_agate_table():
path = model.original_file_path
try:
table = dbt.clients.agate_helper.from_csv(path)
except ValueError as e:
dbt.exceptions.raise_compiler_error(str(e))
table.original_abspath = os.path.abspath(path)
return table
| https://github.com/fishtown-analytics/dbt/issues/1723 | 2019-09-04 16:36:25,854704 (MainThread): Acquiring new postgres connection "seedtable".
2019-09-04 16:36:25,854894 (MainThread): Re-using an available connection from the pool (formerly model_2).
2019-09-04 16:36:25,963811 (MainThread): Unhandled error while executing seed.minimal.seedtable
[Errno 2] No such file or di... | FileNotFoundError |
def parsed_instance_for(compiled: CompiledNode) -> ParsedNode:
cls = PARSED_TYPES.get(compiled.resource_type)
if cls is None:
# how???
raise ValueError("invalid resource_type: {}".format(compiled.resource_type))
# validate=False to allow extra keys from compiling
return cls.from_dict(co... | def parsed_instance_for(compiled: CompiledNode) -> ParsedNode:
cls = PARSED_TYPES.get(compiled.resource_type)
if cls is None:
# how???
raise ValueError("invalid resource_type: {}".format(compiled.resource_type))
# validate=False to allow extra keys from copmiling
return cls.from_dict(co... | https://github.com/fishtown-analytics/dbt/issues/1723 | 2019-09-04 16:36:25,854704 (MainThread): Acquiring new postgres connection "seedtable".
2019-09-04 16:36:25,854894 (MainThread): Re-using an available connection from the pool (formerly model_2).
2019-09-04 16:36:25,963811 (MainThread): Unhandled error while executing seed.minimal.seedtable
[Errno 2] No such file or di... | FileNotFoundError |
def search_key(self) -> str:
# TODO: should this be project name + path relative to project root?
return self.absolute_path
| def search_key(self):
# TODO: should this be project root + original_file_path?
return self.absolute_path
| https://github.com/fishtown-analytics/dbt/issues/1723 | 2019-09-04 16:36:25,854704 (MainThread): Acquiring new postgres connection "seedtable".
2019-09-04 16:36:25,854894 (MainThread): Re-using an available connection from the pool (formerly model_2).
2019-09-04 16:36:25,963811 (MainThread): Unhandled error while executing seed.minimal.seedtable
[Errno 2] No such file or di... | FileNotFoundError |
def original_file_path(self) -> str:
# this is mostly used for reporting errors. It doesn't show the project
# name, should it?
return os.path.join(self.searched_path, self.relative_path)
| def original_file_path(self):
return os.path.join(self.searched_path, self.relative_path)
| https://github.com/fishtown-analytics/dbt/issues/1723 | 2019-09-04 16:36:25,854704 (MainThread): Acquiring new postgres connection "seedtable".
2019-09-04 16:36:25,854894 (MainThread): Re-using an available connection from the pool (formerly model_2).
2019-09-04 16:36:25,963811 (MainThread): Unhandled error while executing seed.minimal.seedtable
[Errno 2] No such file or di... | FileNotFoundError |
def parse_args(args):
p = DBTArgumentParser(
prog="dbt",
description="""
An ELT tool for managing your SQL transformations and data models.
For more documentation on these commands, visit: docs.getdbt.com
""",
epilog="""
Specify one of these sub-commands and y... | def parse_args(args):
p = DBTArgumentParser(
prog="dbt",
description="""
An ELT tool for managing your SQL transformations and data models.
For more documentation on these commands, visit: docs.getdbt.com
""",
epilog="""
Specify one of these sub-commands and y... | https://github.com/fishtown-analytics/dbt/issues/1723 | 2019-09-04 16:36:25,854704 (MainThread): Acquiring new postgres connection "seedtable".
2019-09-04 16:36:25,854894 (MainThread): Re-using an available connection from the pool (formerly model_2).
2019-09-04 16:36:25,963811 (MainThread): Unhandled error while executing seed.minimal.seedtable
[Errno 2] No such file or di... | FileNotFoundError |
def get_paths(self) -> List[FilePath]:
path = FilePath(
project_root=self.project.project_root,
searched_path=".",
relative_path="dbt_project.yml",
)
return [path]
| def get_paths(self):
searched_path = "."
relative_path = "dbt_project.yml"
absolute_path = os.path.normcase(
os.path.abspath(
os.path.join(self.project.project_root, searched_path, relative_path)
)
)
path = FilePath(
searched_path=".",
relative_path="relat... | https://github.com/fishtown-analytics/dbt/issues/1723 | 2019-09-04 16:36:25,854704 (MainThread): Acquiring new postgres connection "seedtable".
2019-09-04 16:36:25,854894 (MainThread): Re-using an available connection from the pool (formerly model_2).
2019-09-04 16:36:25,963811 (MainThread): Unhandled error while executing seed.minimal.seedtable
[Errno 2] No such file or di... | FileNotFoundError |
def __iter__(self) -> Iterator[FilePath]:
ext = "[!.#~]*" + self.extension
root = self.project.project_root
for result in find_matching(root, self.relative_dirs, ext):
if "searched_path" not in result or "relative_path" not in result:
raise InternalException(
"Invalid r... | def __iter__(self) -> Iterator[FilePath]:
ext = "[!.#~]*" + self.extension
root = self.project.project_root
for result in find_matching(root, self.relative_dirs, ext):
file_match = FilePath(**{k: os.path.normcase(v) for k, v in result.items()})
yield file_match
| https://github.com/fishtown-analytics/dbt/issues/1723 | 2019-09-04 16:36:25,854704 (MainThread): Acquiring new postgres connection "seedtable".
2019-09-04 16:36:25,854894 (MainThread): Re-using an available connection from the pool (formerly model_2).
2019-09-04 16:36:25,963811 (MainThread): Unhandled error while executing seed.minimal.seedtable
[Errno 2] No such file or di... | FileNotFoundError |
def _parse_column(self, target, column, package_name, root_dir, path, refs):
# this should yield ParsedNodes where resource_type == NodeType.Test
column_name = column["name"]
description = column.get("description", "")
refs.add(column_name, description)
context = {"doc": dbt.context.parser.docs(tar... | def _parse_column(self, target, column, package_name, root_dir, path, refs):
# this should yield ParsedNodes where resource_type == NodeType.Test
column_name = column["name"]
description = column.get("description", "")
refs.add(column_name, description)
context = {"doc": dbt.context.parser.docs(tar... | https://github.com/fishtown-analytics/dbt/issues/1325 | 2019-02-27 12:11:45,010 (MainThread): Parsing test.dbt_utils.at_least_one_eng_active_subs_next_fy_earliest_subscription_engagement_date
2019-02-27 12:11:45,014 (MainThread): Flushing usage events
2019-02-27 12:11:45,014 (MainThread): Encountered an error:
2019-02-27 12:11:45,014 (MainThread): list indices must be integ... | TypeError |
def parse_models_entry(self, model_dict, path, package_name, root_dir):
model_name = model_dict["name"]
refs = ParserRef()
for column in model_dict.get("columns", []):
column_tests = self._parse_column(
model_dict, column, package_name, root_dir, path, refs
)
for node in ... | def parse_models_entry(self, model_dict, path, package_name, root_dir):
model_name = model_dict["name"]
refs = ParserRef()
for column in model_dict.get("columns", []):
column_tests = self._parse_column(
model_dict, column, package_name, root_dir, path, refs
)
for node in ... | https://github.com/fishtown-analytics/dbt/issues/1325 | 2019-02-27 12:11:45,010 (MainThread): Parsing test.dbt_utils.at_least_one_eng_active_subs_next_fy_earliest_subscription_engagement_date
2019-02-27 12:11:45,014 (MainThread): Flushing usage events
2019-02-27 12:11:45,014 (MainThread): Encountered an error:
2019-02-27 12:11:45,014 (MainThread): list indices must be integ... | TypeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.