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

fix: Update 'import' deprecation warning with a date. #572

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/stacker_yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ The deprecated `import` directive works like `imports` except that
the entries in the `import` array will be placed into `/stacker/` rather
than `/stacker/imports`.

See https://github.com/project-stacker/stacker/issues/571 for timeline and migration info.

### `overlay_dirs`
This directive works only with OverlayFS backend storage.

Expand Down
7 changes: 5 additions & 2 deletions pkg/types/stackerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,11 @@ func NewStackerfile(stackerfile string, validateHash bool, substitutions []strin
for _, name := range sf.FileOrder {
layer := sf.internal[name]
if layer.WasLegacyImport() {
log.Warnf("Deprecated 'import' directive used in layer '%s' of file '%s'. "+
"Change from 'import' to 'imports', and '/stacker/' to '/stacker/imports/'", name, stackerfile)
log.Warnf("'import' directive used in layer '%s' inside file '%s' is deprecated. "+
smoser marked this conversation as resolved.
Show resolved Hide resolved
"Support for 'import' will be removed in releases after 2025-01-01. "+
"Migrate by changing 'import' to 'imports' and '/stacker' to '/stacker/imports'. "+
"See https://github.com/project-stacker/stacker/issues/571 for migration.",
name, stackerfile)
}
}

Expand Down
Loading