Skip to content

Commit

Permalink
Warn user before trying to add a stage to their pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon committed Oct 20, 2023
1 parent 36267e0 commit 3b413f1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions extension/src/pipeline/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { getInput, getValidInput } from '../vscode/inputBox'
import { Title } from '../vscode/title'
import { quickPickOne, quickPickOneOrInput } from '../vscode/quickPick'
import { pickFile } from '../vscode/resourcePicker'
import { Modal } from '../vscode/modal'
import { Response } from '../vscode/response'

export enum ScriptCommand {
JUPYTER = 'jupyter nbconvert --to notebook --inplace --execute',
Expand Down Expand Up @@ -150,6 +152,16 @@ export class Pipeline extends DeferredDisposable {
}

private async addPipeline() {
const response = await Modal.showInformation(
'To continue you must add a stage to the dvc.yaml file. Would you like to add a stage now?',
Response.YES,
Response.NO
)

if (response !== Response.YES) {
return
}

const stageName = await this.askForStageName()
if (!stageName) {
return
Expand Down

0 comments on commit 3b413f1

Please sign in to comment.