-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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(editor): Add cloud ExecutionsUsage and API blocking using licenses #6159
feat(editor): Add cloud ExecutionsUsage and API blocking using licenses #6159
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
Files matching
Files matching
Files matching
Make sure to check off this list before asking for review. |
6647913
to
c2c7ed8
Compare
c2c7ed8
to
a87b0b6
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #6159 +/- ##
==========================================
+ Coverage 27.39% 27.50% +0.11%
==========================================
Files 2937 2940 +3
Lines 180177 180626 +449
Branches 19557 19563 +6
==========================================
+ Hits 49362 49685 +323
- Misses 130082 130206 +124
- Partials 733 735 +2
☔ View full report in Codecov by Sentry. |
export interface CloudPlanData { | ||
planSpec: PlanSpec; | ||
instance: Instance; | ||
usage: Usage; | ||
} | ||
|
||
export interface PlanSpec { | ||
planId: number; | ||
monthlyExecutionsLimit: number; | ||
activeWorkflowsLimit: number; | ||
credentialsLimit: number; | ||
isActive: boolean; | ||
displayName: string; | ||
expirationDate: string; | ||
metadata: PlanMetadata; | ||
} | ||
export interface PlanMetadata { | ||
version: 'v1'; | ||
group: 'opt-out' | 'opt-in'; | ||
slug: 'pro-1' | 'pro-2' | 'starter' | 'trial-1'; | ||
trial?: Trial; | ||
} | ||
export interface Trial { | ||
length: number; | ||
gracePeriod: number; | ||
} | ||
export interface Instance { | ||
createdAt: string; | ||
} | ||
export interface Usage { | ||
executions: number; | ||
activeWorkflows: number; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you duplicating the types here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not possible to use an external type for the defineProps method. See vuejs/core#4294. It can be done with a plugin, but I guess we can do that later on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damn did not know this.. maybe we can just extend the original types then so we are not duplicating the types completely.. @OlegIvaniv can you take a look here?
interface CloudPlanLocal extends CloudPlan {}
packages/editor-ui/src/App.vue
Outdated
// TODO: remove before releasing | ||
plan.usage.executions += acc; | ||
acc += 20; | ||
this.usersStore.setCloudPLan(plan); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be done as part of the store action..
export interface CloudPlanData { | ||
planSpec: PlanSpec; | ||
instance: Instance; | ||
usage: Usage; | ||
} | ||
|
||
export interface PlanSpec { | ||
planId: number; | ||
monthlyExecutionsLimit: number; | ||
activeWorkflowsLimit: number; | ||
credentialsLimit: number; | ||
isActive: boolean; | ||
displayName: string; | ||
expirationDate: string; | ||
metadata: PlanMetadata; | ||
} | ||
export interface PlanMetadata { | ||
version: 'v1'; | ||
group: 'opt-out' | 'opt-in'; | ||
slug: 'pro-1' | 'pro-2' | 'starter' | 'trial-1'; | ||
trial?: Trial; | ||
} | ||
export interface Trial { | ||
length: number; | ||
gracePeriod: number; | ||
} | ||
export interface Instance { | ||
createdAt: string; | ||
} | ||
export interface Usage { | ||
executions: number; | ||
activeWorkflows: number; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damn did not know this.. maybe we can just extend the original types then so we are not duplicating the types completely.. @OlegIvaniv can you take a look here?
interface CloudPlanLocal extends CloudPlan {}
Looks good overall.. 🙂 just needs tests now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good.. couple of minor questions and nitpicks..
…oud users (#6187) * rename planSpec to plan * Remove instance property as it's not needed anymore * Flatten plan object * remove console.log * feat: disable api using license * feat: add api page * chore: resolve conflicts * chore: resolve conflicts * feat: update and refactor a bit * fix: update endpoints * fix: update endpoints * fix: use host * feat: update copy * fix linting issues --------- Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
✅ All Cypress E2E specs passed |
✅ All Cypress E2E specs passed |
* master: (22 commits) fix: Remove workflow execution credential error message when instance owner (#6116) refactor(editor): Drop vue-typed-mixins (no-changelog) (#6257) feat(core): Return OAuth2 error body if available (#5794) fix: Add itemSize config to workflows view recycle scroller (no-changelog) (#6238) fix(editor): Fix close and cancel operations on useMessage (no-changelog) (#6260) feat(editor): Add cloud ExecutionsUsage and API blocking using licenses (#6159) refactor(editor): Turn showMessage mixin to composable (#6081) (#6244) feat(core): Add experimental proxy support to License-SDK (no-changelog) (#6253) feat(core): Reduce the number of events sent to Sentry (#6235) feat(editor): Drop support for legacy browsers that do not have native ESM support (#6239) refactor(editor): Add missing interface IUserListAction (no-changelog) (#6241) ci: Debug e2e pipeline (no-changelog) (#6240) Revert "refactor(editor): Turn showMessage mixin to composable" (#6243) feat(editor): Updating node reference pattern in expression editor (#6228) refactor(editor): Remove unused dependencies (no-changelog) (#6223) refactor(editor): Turn showMessage mixin to composable (#6081) feat(editor): Version Control settings update (WIP) (#6233) ci: Fix linting issue on master (no-changelog) (#6232) fix: Prevent type error messages for manual executions (no-changelog) (#6229) fix(Code Node): Restore help text (#6231) ...
Got released with |
Github issue / Community forum post (link here to close automatically):