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

feat(dal): update integration entity schema for multi provider #3625

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

p-fernandez
Copy link
Contributor

What change does this PR introduce?

Update integration entity schema...

Why was this change needed?

...to support multi provider configuration.

Other information (Screenshots)

@p-fernandez p-fernandez self-assigned this Jun 20, 2023
@linear
Copy link

linear bot commented Jun 20, 2023

NV-2411 Update integration entity schema

What?

Update the integration entity schema based on the decisions that were taken in the tech doc: https://www.notion.so/novuhq/Technical-working-process-2ece7a460b3447bd8b6c1a11770a73f5?pvs=4#b93679d09da84266b01d4e73a269f344

The condition rules are out of scope.

Why? (Context)

Definition of Done

  • The integration entity schema is updated and is reflecting the structure from the tech doc.


identifier?: string;

kind?: ProviderKindEnum;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typing as ProviderKindEnum in case in the future we have kinds in other entities to help the readability and searcheability.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure about 'kind'. What do you think about 'category' ? Both don't feel completely right🤷🏼‍♀️

Copy link
Contributor

Choose a reason for hiding this comment

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

A small question regarding the kind property, if we are doing the "conditions" array, doesn't it mean that the kinds can be combined in a more dynamic way inside the the conditions array. Meaning that you can have the following dynamic conditions:

  • TenantId = 123
  • AND
  • Environment = production
  • AND
  • Workflow = 123

So in this case it's either the "kind" or "conditions" approach, not the two of them combined. What are your thoughts on this, maybe I'm missing something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ainouzgali kind and category are synonims in a way. In the technical design I chose kind as it is used to define entities in places like GCP and I come from working a lot with GCP.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A small question regarding the kind property, if we are doing the "conditions" array, doesn't it mean that the kinds can be combined in a more dynamic way inside the the conditions array. Meaning that you can have the following dynamic conditions:

  • TenantId = 123
  • AND
  • Environment = production
  • AND
  • Workflow = 123

So in this case it's either the "kind" or "conditions" approach, not the two of them combined. What are your thoughts on this, maybe I'm missing something

Ok, I wasn't aware that we totally ditched the kind property. Makes no sense if we are going to go conditions approach.

Comment on lines 3 to 7
export enum ProviderKindEnum {
ENVIRONMENT = 'environment',
TENANT = 'tenant',
WORKFLOW = 'workflow',
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

So far we will only use the environment kind but ready for the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm probably jumping ahead - but maybe already add this type to shared ? As we would use it everywhere for sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. But going to delete it as we do not need it until we create the conditions in the future.

Copy link
Contributor

@ainouzgali ainouzgali left a comment

Choose a reason for hiding this comment

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

⭐️

Comment on lines 52 to 55
name: Schema.Types.String,
identifier: Schema.Types.String,
kind: Schema.Types.String,
kindId: Schema.Types.ObjectId,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we already add conditions? But as an empty array for now?
To make it easier for next phase

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better wait for now. If we then change our mind we might forget to clean it.

Comment on lines 3 to 7
export enum ProviderKindEnum {
ENVIRONMENT = 'environment',
TENANT = 'tenant',
WORKFLOW = 'workflow',
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm probably jumping ahead - but maybe already add this type to shared ? As we would use it everywhere for sure


identifier?: string;

kind?: ProviderKindEnum;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure about 'kind'. What do you think about 'category' ? Both don't feel completely right🤷🏼‍♀️

@djabarovgeorge
Copy link
Contributor

Not sure i followed how is the new kind param will be used :(

Copy link
Contributor

@ainouzgali ainouzgali left a comment

Choose a reason for hiding this comment

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

🚀

@ainouzgali
Copy link
Contributor

Oh @p-fernandez , a question. We now don't have a field to save the environment the user chooses for the instance.
Screen Shot 2023-06-21 at 16 00 12

@p-fernandez
Copy link
Contributor Author

Oh @p-fernandez , a question. We now don't have a field to save the environment the user chooses for the instance. Screen Shot 2023-06-21 at 16 00 12

But that looks like a presentational thing. At the end we are storing the environmentId in the provider. I think.

@ainouzgali
Copy link
Contributor

Oh @p-fernandez , a question. We now don't have a field to save the environment the user chooses for the instance. Screen Shot 2023-06-21 at 16 00 12

But that looks like a presentational thing. At the end we are storing the environmentId in the provider. I think.

OK. I think we can go that way until we decide on the conditions structure

@p-fernandez p-fernandez added this pull request to the merge queue Jun 22, 2023
Merged via the queue into next with commit 1a7445b Jun 22, 2023
34 checks passed
@p-fernandez p-fernandez deleted the nv-2411-update-integration-entity-schema branch June 22, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants