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

(GH-2549) Use new default modulepath #2587

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

beechtom
Copy link
Contributor

This updates Bolt to use the new default modulepath ['modules'] and
append the .modules/ directory to the end of both the default
modulepath and configured modulepath.

!feature

  • Update default modulepath
    (#2549)

    Bolt's default modulepath is now ['modules'] instead of
    ['modules', 'site', 'site-modules']. Bolt will also automatically
    append the project's .modules/ directory to all modulepaths,
    whether a project uses the default modulepath or a configured
    modulepath.

@beechtom beechtom linked an issue Jan 27, 2021 that may be closed by this pull request
@beechtom beechtom force-pushed the 2549/modulepath branch 2 times, most recently from 558f6e0 to 60594f3 Compare January 28, 2021 18:41
@beechtom beechtom marked this pull request as ready for review January 28, 2021 19:04
@beechtom beechtom requested a review from a team as a code owner January 28, 2021 19:04
@beechtom beechtom requested review from hestonhoffman and a team as code owners January 28, 2021 19:53
@hestonhoffman
Copy link
Contributor

hestonhoffman commented Jan 28, 2021

QQ: Does this update the generated reference docs (like bolt_project_reference) with the new defaults? When I checked this branch out and ran the rake task, I still got:

- **Type:** Array, String
- **Default:** ["project/modules", "project/site-modules", "project/site"]

But I might be doing it wrong 😊

@beechtom
Copy link
Contributor Author

Ah, nope, forgot to update the default. Good catch! 👍

This updates Bolt to use the new default modulepath `['modules']` and
append the `.modules/` directory to the end of both the default
modulepath and configured modulepath.

!feature

* **Update default modulepath**
  ([puppetlabs#2549](puppetlabs#2549))

  Bolt's default modulepath is now `['modules']` instead of
  `['modules', 'site', 'site-modules']`. Bolt will also automatically
  append the project's `.modules/` directory to all modulepaths,
  whether a project uses the default modulepath or a configured
  modulepath.
Copy link
Contributor

@hestonhoffman hestonhoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs LGTM!

@lucywyman
Copy link
Contributor

  • Updates the default modulepath to ['modules'] if modulepath isn't configured
  • Appends .modules/ to the modulepath
    • When modulepath is configured
    • When modulepath isn't configured
  • Uses the default modulepath even if modulepath is "set" in bolt-defaults.yaml
  • project migrate moves modules from the previous default modulepath ['modules', 'site-modules', 'site'] to the modules directory Note: this does mean that if modules have the same name, one will get overridden
    • If modulepath isn't configured
    • If modulepath is configured to ['modules']
    • If modulepath is configured to 'modules'
    • Does not move modules if modulepath is configured to anything other than ['modules']
    • If modulepath is ['modules', 'site-modules', 'site']
  • Still appends the project to the modulepath if named
  • Is still overridden by --modulepath

@lucywyman lucywyman merged commit f4b67f7 into puppetlabs:3.0 Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Bolt to only use new default modulepath
3 participants