Jira (PUP-1534) Puppet classes should be able to declare that they are internal

1 view
Skip to first unread message

Moses Mendoza (JIRA)

unread,
Nov 28, 2016, 4:38:03 PM11/28/16
to puppe...@googlegroups.com
Moses Mendoza updated an issue
 
Puppet / Story PUP-1534
Puppet classes should be able to declare that they are internal
Change By: Moses Mendoza
Team: Puppet Developer Support
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Moses Mendoza (JIRA)

unread,
Nov 28, 2016, 4:38:04 PM11/28/16
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Nov 29, 2016, 7:41:03 AM11/29/16
to puppe...@googlegroups.com

I think we may already have a ticket for this (need to look). We have the "private" keyword already in the puppet language, and the idea is to use it as follows:

private class foo() { }
private define foo() { }
private function foo() { }
private type T = T2

The semantics of private is that it may only be created and referenced from the module that contains the definition.
In order to make that enforceable we also need to forbid arbitrary namespaces to be used - since as things are now, any manifest can define something in any namespace.

The addition of making the "private" keyword active can be made in a minor release, but the enforcement of namespaces is not backwards compatible and have to wait until a major release.

Henrik Lindberg (JIRA)

unread,
Nov 29, 2016, 7:54:03 AM11/29/16
to puppe...@googlegroups.com

In order to support this we need to:

  • Update grammar and AST to wire the reserved keyword into the language and resulting AST
    • We can do this element by element (classes, defines, functions, types)
  • Update the loaders to allow elements to only be seen by the creating module - i.e. forbid creation/call
  • Update the runtime so that scope knows if it is a private scope or not (we need to error on cross module variable access)
  • It may be enough to only make creation / call, override, collection and variable access operations private - once a resource is created it may be publically
    available for functions like defined as well as reading its parameters.
    This is made somewhat difficult because there is the need to be able to deal with the resource in the catalog, noticing it, etc. which will reveal its values.
    Further discussion is needed for this.

Henrik Lindberg (JIRA)

unread,
Nov 29, 2016, 8:00:08 AM11/29/16
to puppe...@googlegroups.com

We may also want to support private parameters and variables. That is something like this:

class foo::bar(private $a, $b) {
  private $x = 'sesame'
  $y = 'say friend and enter'
}

This would make an instance of foo::bar visible outside foo, but $foo::bar::a and $foo::bar::x are not, while $foo::bar::b and $foo::bar::y would be.

John Duarte (JIRA)

unread,
May 15, 2017, 4:46:03 PM5/15/17
to puppe...@googlegroups.com

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:44:42 PM5/18/17
to puppe...@googlegroups.com

Thomas Speigner (JIRA)

unread,
May 31, 2017, 4:43:03 PM5/31/17
to puppe...@googlegroups.com

Lindsey Smith (JIRA)

unread,
Oct 5, 2017, 5:23:03 PM10/5/17
to puppe...@googlegroups.com
Lindsey Smith updated an issue
 
Change By: Lindsey Smith
Team: Puppet Developer Experience Platform Core

Owen Rodabaugh (JIRA)

unread,
Feb 8, 2018, 12:08:12 PM2/8/18
to puppe...@googlegroups.com
Owen Rodabaugh updated an issue
Change By: Owen Rodabaugh
CS Priority: Needs Priority
This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)
Atlassian logo

Owen Rodabaugh (JIRA)

unread,
Feb 8, 2018, 7:12:04 PM2/8/18
to puppe...@googlegroups.com
Owen Rodabaugh updated an issue
Change By: Owen Rodabaugh
CS Priority: Needs Priority Normal
CS Impact: Customers see a giant list of classes in the console out of the box. One member of triage described this as installing PE, logging into the console and being in a "room full of red buttons they shouldn't touch". It would be nice if we would either hide the buttons of put some covers on them or something.
CS Severity: 2 - Annoyance
CS Business Value: 3 - $$$$
CS Frequency: 5 - >90% of Customers

Josh Cooper (Jira)

unread,
Jun 11, 2020, 2:29:03 AM6/11/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Epic Link: PUP-523
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages