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

bug: Referencing a single relation table might include other non related relation tables #18206

Closed
2 tasks done
erezrokah opened this issue Jun 11, 2024 · 0 comments · Fixed by cloudquery/plugin-sdk#1720
Closed
2 tasks done

Comments

@erezrokah
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Referencing a single relation table might include other non related relation tables, e.g.

  • EntraID source plugin tables: ["entraid_group_members"] includes also entraid_group_owners, entraid_group_settings
  • AWS source plugin tables: ["aws_s3_bucket_policies"] includes also aws_s3_bucket_objects, aws_s3_bucket_object_grants , aws_s3_bucket_object_heads

Expected Behavior

  • EntraID - only entraid_group_members and entraid_groups (the parent) should be included
  • AWS - only aws_s3_bucket_policies and aws_s3_buckets (the parent) should be inclued

CloudQuery (redacted) config

kind: source
spec:
  name: "entraid"
  path: "cloudquery/entraid"
  version: "v1.1.0"
  destinations: ["postgresql"]
  tables: ["entraid_group_members"]
---
kind: source
spec:
  name: aws
  path: cloudquery/aws
  version: "v26.10.0"
  tables: ["aws_s3_bucket_policies"]
  destinations: ["postgresql"]
---
kind: destination
spec:
  name: "postgresql"
  path: "cloudquery/postgresql"
  version: "v8.0.4"
  migrate_mode: forced
  spec:
    connection_string: "postgresql://postgres:pass@localhost:5432/postgres?sslmode=disable"

Steps To Reproduce

  1. Run cloudquery migrate on the above config and see the logs/created tables

CloudQuery (redacted) logs

N/A

CloudQuery version

cloudquery version 5.20.5

Additional Context

Fixed in cloudquery/plugin-sdk#1720

Pull request (optional)

  • I can submit a pull request
@erezrokah erezrokah self-assigned this Jun 11, 2024
kodiakhq bot pushed a commit to cloudquery/plugin-sdk that referenced this issue Jun 14, 2024
…#1720)

#### Summary

Fixes cloudquery/cloudquery#18206

- [ ] Read the [contribution guidelines](../blob/main/CONTRIBUTING.md) 🧑‍🎓
- [ ] Run `go fmt` to format your code 🖊
- [ ] Lint your changes via `golangci-lint run` 🚨 (install golangci-lint [here](https://golangci-lint.run/usage/install/#local-installation))
- [ ] Update or add tests 🧪
- [ ] Ensure the status checks below are successful ✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant