Skip to content

Conversation

@matonb
Copy link
Contributor

@matonb matonb commented Jun 30, 2017

concat::fragment accepts either a string or integer as order parameter value.
Numeric ordering doesn't work once converted to string filenames:

20 sequential fragments for example

Numeric (no padding) String (0 Zero Padded)
10_fragment 001_fragment
11_fragment 002_fragment
...
19_fragment 010_fragment
1_fragment 011_fragment
20_fragment 012_fragment
2_fragment 013_fragment
3_fragment 014_fragment

Order has gone to pot...

concat::fragment accepts either a string or integer as order parameter value.
Numeric ordering doesn't work once converted to string filenames:

20 sequential fragments for example

| Numeric (no padding) | String (0 Zero Padded) |
|----------------------|------------------------|
| 10_fragment          | 001_fragment           |
| 11_fragment          | 002_fragment           |
| ...                  |                        |
| 19_fragment          | 010_fragment           |
| 1_fragment           | 011_fragment           |
| 20_fragment          | 012_fragment           |
| 2_fragment           | 013_fragment           |
| 3_fragment           | 014_fragment           |

Order has gone to pot...
@derbious
Copy link

Yes please.
This is also causing an issue creating the ipv4acls. Also, the internal function postgresql_acls_to_resources_hash returns a zero-padded string for order. https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb#L48

@matonb
Copy link
Contributor Author

matonb commented Jun 30, 2017

@derbious Hadn't noticed the ordering 'fix' in that file.

I opened this PR because the current release didn't work with my existing configuration.

RFC: Making order an integer deviates from concat::fragment allowing both integer and string?

matonb added 2 commits July 2, 2017 19:06
concat::fragment accepts either a string or integer as order parameter value.
Numeric ordering doesn't work once converted to string filenames:

20 sequential fragments for example

| Numeric (no padding) | String (0 Zero Padded) |
|----------------------|------------------------|
| 10_fragment          | 001_fragment           |
| 11_fragment          | 002_fragment           |
| ...                  |                        |
| 19_fragment          | 010_fragment           |
| 1_fragment           | 011_fragment           |
| 20_fragment          | 012_fragment           |
| 2_fragment           | 013_fragment           |
| 3_fragment           | 014_fragment           |

Order has gone to pot...

@derbious

adding rspec tests to check manage_pg_hba_conf w/ acls
removing unneeded test
@HelenCampbell HelenCampbell merged commit 442853d into puppetlabs:master Jul 11, 2017
@HelenCampbell
Copy link
Contributor

@matonb Merged, thank you!

@matonb matonb deleted the hba_rule_order branch July 12, 2017 08:20
diogokiss pushed a commit to Tradeshift/puppetlabs-postgresql that referenced this pull request Jan 3, 2019
* Allow order parameter to be string value

concat::fragment accepts either a string or integer as order parameter value.
Numeric ordering doesn't work once converted to string filenames:

20 sequential fragments for example

| Numeric (no padding) | String (0 Zero Padded) |
|----------------------|------------------------|
| 10_fragment          | 001_fragment           |
| 11_fragment          | 002_fragment           |
| ...                  |                        |
| 19_fragment          | 010_fragment           |
| 1_fragment           | 011_fragment           |
| 20_fragment          | 012_fragment           |
| 2_fragment           | 013_fragment           |
| 3_fragment           | 014_fragment           |

Order has gone to pot...

* Allow order parameter to be string value

concat::fragment accepts either a string or integer as order parameter value.
Numeric ordering doesn't work once converted to string filenames:

20 sequential fragments for example

| Numeric (no padding) | String (0 Zero Padded) |
|----------------------|------------------------|
| 10_fragment          | 001_fragment           |
| 11_fragment          | 002_fragment           |
| ...                  |                        |
| 19_fragment          | 010_fragment           |
| 1_fragment           | 011_fragment           |
| 20_fragment          | 012_fragment           |
| 2_fragment           | 013_fragment           |
| 3_fragment           | 014_fragment           |

Order has gone to pot...

@derbious

adding rspec tests to check manage_pg_hba_conf w/ acls
removing unneeded test
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Feb 3, 2022
* Allow order parameter to be string value

concat::fragment accepts either a string or integer as order parameter value.
Numeric ordering doesn't work once converted to string filenames:

20 sequential fragments for example

| Numeric (no padding) | String (0 Zero Padded) |
|----------------------|------------------------|
| 10_fragment          | 001_fragment           |
| 11_fragment          | 002_fragment           |
| ...                  |                        |
| 19_fragment          | 010_fragment           |
| 1_fragment           | 011_fragment           |
| 20_fragment          | 012_fragment           |
| 2_fragment           | 013_fragment           |
| 3_fragment           | 014_fragment           |

Order has gone to pot...

* Allow order parameter to be string value

concat::fragment accepts either a string or integer as order parameter value.
Numeric ordering doesn't work once converted to string filenames:

20 sequential fragments for example

| Numeric (no padding) | String (0 Zero Padded) |
|----------------------|------------------------|
| 10_fragment          | 001_fragment           |
| 11_fragment          | 002_fragment           |
| ...                  |                        |
| 19_fragment          | 010_fragment           |
| 1_fragment           | 011_fragment           |
| 20_fragment          | 012_fragment           |
| 2_fragment           | 013_fragment           |
| 3_fragment           | 014_fragment           |

Order has gone to pot...

@derbious

adding rspec tests to check manage_pg_hba_conf w/ acls
removing unneeded test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants