Jira (PUP-11857) Notify resource, unexpected behavior

11 views
Skip to first unread message

Андрей Владимирович Семенов

unread,
May 19, 2023, 3:49:03 AM5/19/23
to puppe...@googlegroups.com
Андрей Владимирович Семенов created an issue
 
Puppet / Bug PUP-11857
Notify resource, unexpected behavior
Issue Type: Bug Bug
Assignee: Unassigned
Components: Docs, Language
Created: 2023/05/19 12:48 AM
Priority: Normal Normal
Reporter: Андрей Владимирович Семенов

Puppet Version: 7.24.0
Puppet Server Version: 7.11.0
OS Name/Version: Ubuntu 20.04

```

  1. TODO
    class some::path {   notify \{ 'False as message': message => false}

         # Ignore resource!
      notify { 'True as message': message => true}       # Show `true`
      notify { 'Undef as message': message => undef} # Show ``
    }

include some::path

```

https://www.puppet.com/docs/puppet/5.5/types/notify.html#notify-attribute-message

The documentation says that message can only be a string.

But if you pass false, you will get a very convenient mechanism for debugging information. To what extent is the use of false acceptable?

Desired Behavior:

I was expecting something like this

```

Error: Evaluation Error: Illegal title type at index 0. Expected String, got Boolean

```

Actual Behavior:

```

❯ puppet apply test.pp
Notice: Compiled catalog for macbook-air-wilful.local in environment production in 0.02 seconds
Notice: true
Notice: /Stage[main]/Some::Path/Notify[True as message]/message: defined 'message' as true
Notice: Undef as message
Notice: /Stage[main]/Some::Path/Notify[Undef as message]/message: defined 'message' as 'Undef as message'
Notice: Applied catalog in 0.01 seconds

```

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo

Andrey Semenov (Jira)

unread,
May 19, 2023, 3:52:02 AM5/19/23
to puppe...@googlegroups.com
Andrey Semenov updated an issue
Change By: Andrey Semenov
*Puppet Version: 7.24.0*
*Puppet Server Version: 7.11.0*
*OS Name/Version: Ubuntu 20.04*

*```*  
{code:java}
# TODO
class some::path
\ {
  notify \{ 'False as message': message => false}
     # Ignore resource!
  notify \{ 'True as message': message => true}       # Show `true`
  notify \{ 'Undef as message': message => undef} # Show ``
}

include some::path


The documentation says that message can only be a string.

But if you pass false, you will get a very convenient mechanism for debugging information. To what extent is the use of false acceptable?

*Desired Behavior:*


I was expecting something like this

``` {code:java}

Error: Evaluation Error: Illegal title type at index 0. Expected String, got Boolean
{code}
```

*Actual Behavior:*

``` {code:java}

❯ puppet apply test.pp
Notice: Compiled catalog for macbook-air-wilful.local in environment production in 0.02 seconds
Notice: true
Notice: /Stage[main]/Some::Path/Notify[True as message]/message: defined 'message' as true
Notice: Undef as message
Notice: /Stage[main]/Some::Path/Notify[Undef as message]/message: defined 'message' as 'Undef as message'
Notice: Applied catalog in 0.01 seconds

```
{code}

Andrey Semenov (Jira)

unread,
May 19, 2023, 3:53:02 AM5/19/23
to puppe...@googlegroups.com
Andrey Semenov updated an issue
*Puppet Version: 7.24.0*
*Puppet Server Version: 7.11.0*
*OS Name/Version: Ubuntu 20.04*

 
{code:java}
# TODO
class some::path
\ {  
notify \ { 'False as message': message => false}

     
# Ignore ==> Skipped resource !
  notify \ { 'True as message': message => true}         . # Show ` ==> ' true ` '
  notify \ { 'Undef as message': message => undef} # Show `` ==> ''
}

include some::path

{code}

 

[https://www.puppet.com/docs/puppet/5.5/types/notify.html#notify-attribute-message]

The documentation says that message can only be a string.

But if you pass false, you will get a very convenient mechanism for debugging information. To what extent is the use of false acceptable?

*Desired Behavior:*

I was expecting something like this

{code:java}
Error: Evaluation Error: Illegal title type at index 0. Expected String, got Boolean
{code}


*Actual Behavior:*

{code:java}
❯ puppet apply test.pp
Notice: Compiled catalog for macbook-air-wilful.local in environment production in 0.02 seconds
Notice: true
Notice: /Stage[main]/Some::Path/Notify[True as message]/message: defined 'message' as true
Notice: Undef as message
Notice: /Stage[main]/Some::Path/Notify[Undef as message]/message: defined 'message' as 'Undef as message'
Notice: Applied catalog in 0.01 seconds
{code}

Andrey Semenov (Jira)

unread,
May 19, 2023, 3:54:02 AM5/19/23
to puppe...@googlegroups.com
Andrey Semenov updated an issue
*Puppet Version: 7.24.0*
*Puppet Server Version: 7.11.0*
*OS Name/Version: Ubuntu 20.04*

 
{code:java}
# TODO
class some::path {
  notify { 'False as message': message => false}     # ==> Skipped resource
  notify { 'True as message': message => true}
.       # ==> 'true'
  notify { 'Undef as message': message => undef} # ==> ''

}

include some::path{code}
 

[https://www.puppet.com/docs/puppet/5.5/types/notify.html#notify-attribute-message]

The documentation says that message can only be a string.

But if you pass false, you will get a very convenient mechanism for debugging information. To what extent is the use of false acceptable?

*Desired Behavior:*

I was expecting something like this

{code:java}
Error: Evaluation Error: Illegal title type at index 0. Expected String, got Boolean
{code}


*Actual Behavior:*

{code:java}
❯ puppet apply test.pp
Notice: Compiled catalog for macbook-air-wilful.local in environment production in 0.02 seconds
Notice: true
Notice: /Stage[main]/Some::Path/Notify[True as message]/message: defined 'message' as true
Notice: Undef as message
Notice: /Stage[main]/Some::Path/Notify[Undef as message]/message: defined 'message' as 'Undef as message'
Notice: Applied catalog in 0.01 seconds
{code}

Andrey Semenov (Jira)

unread,
May 19, 2023, 3:55:02 AM5/19/23
to puppe...@googlegroups.com
Andrey Semenov updated an issue
*Puppet Version: 7.24.0*
*Puppet Server Version: 7.11.0*
*OS Name/Version: Ubuntu 20.04*

 
{code:java}
# TODO
class some::path {
  notify { 'False as message': message => false} # ==> Skipped resource
  notify { 'True as message': message => true} # ==> 'true'

  notify { 'Undef as message': message => undef} # ==> ''
}

include some::path{code}
 

[https://www.puppet.com/docs/puppet/ 5.5 7 /types/notify.html#notify-attribute-message]


The documentation says that message can only be a string.

But if you pass false, you will get a very convenient mechanism for debugging information. To what extent is the use of false acceptable?

*Desired Behavior:*

I was expecting something like this

{code:java}
Error: Evaluation Error: Illegal title type at index 0. Expected String, got Boolean
{code}


*Actual Behavior:*

{code:java}
❯ puppet apply test.pp
Notice: Compiled catalog for macbook-air-wilful.local in environment production in 0.02 seconds
Notice: true
Notice: /Stage[main]/Some::Path/Notify[True as message]/message: defined 'message' as true
Notice: Undef as message
Notice: /Stage[main]/Some::Path/Notify[Undef as message]/message: defined 'message' as 'Undef as message'
Notice: Applied catalog in 0.01 seconds
{code}

Aria Li (Jira)

unread,
May 23, 2023, 4:18:02 PM5/23/23
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Labels: needs-validation

Tony Vu (Jira)

unread,
May 30, 2023, 4:38:01 PM5/30/23
to puppe...@googlegroups.com
Tony Vu updated an issue
Change By: Tony Vu
Labels: needs-validation

Tony Vu (Jira)

unread,
May 30, 2023, 4:38:02 PM5/30/23
to puppe...@googlegroups.com
Tony Vu commented on Bug PUP-11857
 
Re: Notify resource, unexpected behavior

Thanks for the ticket Andrey Semenov; we've looked and this appears to be a duplicate of PUP-2368. If you want to continue tracking this issue, you should follow that ticket.

Reply all
Reply to author
Forward
0 new messages