Skip to content

Do not add version component to repo definition #1282

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

Merged
merged 1 commit into from
Jul 26, 2021
Merged

Do not add version component to repo definition #1282

merged 1 commit into from
Jul 26, 2021

Conversation

psapezhka728839
Copy link

According to the official documentation there is no need to add version component to repository line.

There are no predefined list of allowed components names, but some tools, like command-not-found, manage they own list and do not expect to meet something like 13 in component name. Source code here This causes exception like this while apt update

Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 26, in <module>
    col.create(db)
  File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 94, in create
    self._fill_commands(con)
  File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 132, in _fill_commands
    self._parse_single_contents_file(con, f, fp.stdout)
  File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 274, in _parse_single_contents_file
    priority = component_priorities[component]
KeyError: '13'

Strictly speaking this is not the direct problem of this module, but my suggestion is to align behaviour of puppet module with official PostgreSQL documentation.

@psapezhka728839 psapezhka728839 requested a review from a team as a code owner July 2, 2021 08:38
@puppet-community-rangefinder
Copy link

postgresql::repo::apt_postgresql_org is a class

that may have no external impact to Forge modules.

This module is declared in 70 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Copy link
Collaborator

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

https://wiki.postgresql.org/wiki/Apt tells me this isn't just for Ubuntu but just apt.postgresql.org in general so 👍 from me.

I've allowed it to run the tests so we'll see what they say when they complete or if you need to You may need to modify some tests. At least the style guide says to use single quotes for strings without variables (and I think puppet-lint also enforces this).

@david22swan
Copy link
Member

@weastur Apologies for the wait but everything is looking good to me so I'm gonna go ahead and merge.
The CentOS 8 failures are a known issue unrelated to this pr.

Thanks for putting in the work and I look forward to seeing more from you in the future

@david22swan david22swan merged commit 99a3fae into puppetlabs:main Jul 26, 2021
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Feb 3, 2022
Do not add version component to repo definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants