Comments (5)
I acknowledge that this is a bug that does make g10k incompatible with r10k.
My problem is that I am declaring a module a Puppetlabs Forge module if I encounter the owner/modulename syntax (
Lines 89 to 90 in cf471fd
That's why g10k is trying to fetch something from the forge API in this case.
What I need to do to support the owner/modulename syntax for Git modules is to completely rewrite the Puppetfile config parsing, which is currently done with extremely ugly regexes. Start differentiating between Git and Puppetlabs Forge modules by looking at the given attributes.
If :git then it's definitely a Git module so remove "owner/" and so on.
I'll try to do that in https://github.com/xorpaul/g10k/tree/fix_modulename
The fact that the Puppetfile syntax is horrible to parse with anything except ruby where you can use the puppet library parser and the high maintenance/debug cost that this implies does make want to reject this bug and putting my effort into supporting a standard data format like JSON, YAML, TOML etc instead.
For now please use mod 'php' for your Git module and we will see if I can rework the config parsing in the near future with justified effort.
from g10k.
The "namespacing-feature" in r10k when handling Forge modules is not something that should be re-implemented when it comes to GIT, as the underlying reason for said namespacing does not exists there, afaik.
Forge: Modules have to be addressed as "maintainer/module name", since the maintainer part of this is the only available differentiator when querying the forge - "team1/ntp" vs. "team2/ntp". So the namespacing there is fixed.
Git: With GIT it's quite a different story, there is no such definition central to GIT that would lead to such a rigorous, predictable namespacing.
With something like gitlab you have /GitlabGroup/Repo.git - with other git providers you do not necessarily have that namespacing at all, so there the mapping into "maintainer/module" would make no sense.
Point being that carrying this over 1:1 from the Forge might be useful to some incarnations of git services (and even there only if the Puppetfile capabilities get vastly expanded upon), but definitely not all, so this can't be a "general g10k/GIT" feature, but a specific one for "g10k/gitlab | g10k/github".
If this got implemented with no additional features around this, this does not seem to actually serve any purpose beyond keeping the status as a "drop in" replacement for r10k.
In r10k this actually leads to bad/buggy behaviour right now - you can make r10k merge 2 different modules with the same name from different owners into the same target module directory, simply by combining in the same Puppetfile
ForgeModule "team1/ntp" and
GITModule "team2/ntp"
This will create 1 ntp module dir with mashed up module content from both sources.
Not sure this should be emulated here, just for consistency? ;)
from g10k.
Well, indeed it doesn't seem to be a good idea to be consistent just for the sake of consistency when this results in such a bad merge behavior. However, I think a better error message than the current one would definitely be helpful, e.g. pointing out that the use of "maintainer/modulename" is not supported with Git addresses. But this still leaves the problem with syntax and regular expressions. ;)
from g10k.
Yeah, I will definitely add better error handling for this.
from g10k.
Puppet best practice is that all modules are named $org-$module, even for internal modules. You will see this if you run the metadata-json-lint on one of your modules. This bug makes g10k unusable and it is not a "drop-in" replacement. The documentation should be updated to reflect this.
from g10k.
Related Issues (20)
- possibly unsafe use of /tmp for cache directory
- Distinct SSH keys don't work.
- Distinct SSH keys don't work HOT 8
- Branch filtering doesn't work as expected HOT 7
- Use ssh-agent to get key password HOT 7
- Travis-ci: build is failing on AMD64 HOT 2
- Yaml instead of Puppetfile? HOT 5
- "deploy module" appears to update the entire environment anyway? HOT 4
- retry with `main` as a default branch if `master` is not available HOT 4
- Purge does not work HOT 14
- make `-check4update` work again HOT 1
- Changing a remote's Git URL doesn't update the cache HOT 5
- Deprecation warnings go 17.1
- Deprecation warnings go 17.1 HOT 1
- Can't build g10k for OSX Monterey
- add flag to keep .git directories HOT 3
- -clonegit unexpectedly fails with commit refs HOT 2
- Support git module with both branch and ref specified HOT 2
- forge code does not accept http 200 code without reason
- syncing multiple git sources with same branches fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from g10k.