-
Notifications
You must be signed in to change notification settings - Fork 8
Maorba/feature/db connection string #144
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
base: master
Are you sure you want to change the base?
Conversation
…orba/feature/db-connection-string
bump pkg version
maorb-dev
left a comment
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
Shaharshaki2
left a comment
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.
Overall looks good,
left some comments
package.json
Outdated
| { | ||
| "name": "@mondaycom/apps-cli", | ||
| "version": "4.9.3", | ||
| "version": "4.9.4", |
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.
I'm gonna merge my "scanning-results" pr, so you'll probably need to change it
| if (!appId) appId = await DynamicChoicesService.chooseApp(); | ||
| const selectedRegion = await chooseRegionIfNeeded(parsedRegion, { appId }); | ||
| if (!name) name = await DynamicChoicesService.chooseSchedulerJob(appId, selectedRegion); | ||
| const jobs = await SchedulerService.listJobs(appId, selectedRegion); |
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 did you added this? don't you do the exact same thing inside the DynamicChoicesService.chooseSchedulerJob function?
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.
ahhh, I remember now.
the only reason we need the jobs is to validate that the name input matches an existing job, or otherwise it will end with 500.
so if the user doesnt input a job name, we are going to query for the jobs anyway, so we can return them from the inner function as well like you suggested.
BUT- if the user does input a name, we are not calling for "choose job" anyway, so we dont fetch jobs internally.
so either way, we need to fetch the job, so this change only makes sure we only do it once, not twice
| async chooseSchedulerJob(appId: AppId, region?: Region) { | ||
| const jobs = await SchedulerService.listJobs(appId, region); | ||
| async chooseSchedulerJob(appId: AppId, region?: Region, jobs?: SchedulerJob[]) { | ||
| if (!jobs) jobs = await SchedulerService.listJobs(appId, region); |
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.
I think you don't need to get the jobs as an argument, just keep doing it inside the function like before.
Shaharshaki2
left a comment
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, left comments
…orba/feature/db-connection-string
https://monday.monday.com/boards/3670992828/pulses/18380862511