# Misleading dpl v2 deprecation warnings with v1 config

**URL:** <https://travis-ci.community/t/misleading-dpl-v2-deprecation-warnings-with-v1-config/8153>\
**Category:** v2\
**Tags:** travis-yml\
**Created:** [April 14, 2020, 7:10pm UTC](https://travis-ci.community/t/misleading-dpl-v2-deprecation-warnings-with-v1-config/8153 "2020-04-14T19:10:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![miles](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/miles/32/4329_2.png) [@miles](https://travis-ci.community/u/miles)\
**Post date:** [April 14, 2020, 7:10pm UTC](https://travis-ci.community/t/misleading-dpl-v2-deprecation-warnings-with-v1-config/8153/1 "2020-04-14T19:10:44Z")

</div>

In the following config:

```auto
deploy:
  provider: pages
  skip_cleanup: true
  local_dir: book
  github_token: $GITHUB_TOKEN

```

This warnings appears:

> `deploy`: deprecated key `skip_cleanup` (not supported in dpl v2, use `cleanup`)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/travis_ci/original/2X/4/4ad928870745173d86548e503d76d2d9dff94cff.png)

> **[Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/github/milesfrain/purescript-book/jobs/674951758/config)**
>
> Travis CI enables your team to test and ship your apps with confidence. Easily sync your projects with Travis CI and you'll be testing your code in minutes.

As a naive user, I then:

- Read the [cleanup docs](https://docs.travis-ci.com/user/deployment-v2#cleaning-up-the-git-working-directory)
- Converted `skip_cleanup:true` to `cleanup:false`
- Realized that this was the default value
- Removed this unnecessary default

I did not realize that I should have simply ignored that deprecation warning, because I was not actually using dpl v2.

**It would be better to suppress these v2 deprecation warnings unless v2 is actually being used in the config with `edge:true`.**

This would have spared me a bunch of [troubleshooting effort](https://travis-ci.org/github/milesfrain/purescript-book/builds) chasing down this non-obvious cleanup-related [error](https://travis-ci.org/github/milesfrain/purescript-book/jobs/674958853#L243-L263). It’s especially confusing that rsync complains about a missing `book` directory that git clearly lists as existing:

```auto
Deploying application
Initialized empty Git repository in /tmp/d20200414-4139-11ora7j/work/.git/
Switched to a new branch 'gh-pages'
cd -
cd /tmp/d20200414-4139-11ora7j/work
rsync: change_dir "/home/travis/build/milesfrain/purescript-book/book" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

Already up to date!
HEAD detached at 1796575
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	book/
	mdbook
	mdbook-v0.3.7-x86_64-unknown-linux-gnu.tar.gz

nothing added to commit but untracked files present (use "git add" to track)
Dropped refs/stash@{0} (7c55383b486a956992a842b7a11812a65b4e482a)
Could not copy /home/travis/build/milesfrain/purescript-book/book.
failed to deploy

```
