Skip to content

iam integrations #279

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

Merged
merged 11 commits into from
Sep 10, 2021
Merged

iam integrations #279

merged 11 commits into from
Sep 10, 2021

Conversation

msokoloff1
Copy link
Contributor

No description provided.

@msokoloff1 msokoloff1 requested a review from gszpak September 10, 2021 11:51
Copy link
Contributor

@gszpak gszpak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM - one thing I'm not a huge fan of is the create_dataset flow. The logic to use the default signer (or be able to pass the signer) should be part of createDataset mutation and handled by the backend

f"IAMIntegration {validation_result['validateDataset']['checks']['name']} was not successfully added added to the project."
)
except Exception as e:
dataset.delete()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering: can we add optional SignerId to createDatasetInput? This way we wouldn't have to do this rollback, it would all be handled by the backend

"""mutation validateDatasetPyApi($id: ID!){validateDataset(where: {id : $id}){
valid checks{name, success}}}
""", {'id': dataset.uid})
if not validation_result['validateDataset']['checks'][0]['success']:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure the IAM validation will always be at index 0? Why aren't we checking all results?

Copy link
Contributor Author

@msokoloff1 msokoloff1 Sep 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checks[0] is the dataset validation and it will always exist. Checks[1:] includes checks to see if each data row is valid and since there are no data rows we only need to check checks[0]. But also looking into this more, validation_result['validateDataset']['valid'] returns true only if all checks are true. So I'll use that instead.

provider = Field.String("provider")
valid = Field.Boolean("valid")
last_valid_at = Field.DateTime("last_valid_at")
is_org_default = Field.Boolean("is_org_default")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like we're missing settings field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh - I know. The union thing is a nightmare. But users might want to know which bucket they have access to. I'll try to figure something out.

"""

def __init__(self, client, data):
self.settings = data.pop('settings', {})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of keeping a dict, could we map it to a dataclass based on __typename? (Or to Entity - not sure how we represent "helper" gql types like eg GcpIamIntegrationSettings?)

@msokoloff1 msokoloff1 merged commit 4dce62d into develop Sep 10, 2021
@msokoloff1 msokoloff1 deleted the ms/iam-integrations branch September 10, 2021 20:57
msokoloff1 added a commit that referenced this pull request Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants