Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#3686 closed change (fixed)

Replace Exec['fetch_sitescripts'] with Class['sitescripts']

Reported by: matze Assignee: matze
Priority: P4 Milestone:
Module: Infrastructure Keywords:
Cc: fred Blocked By:
Blocking: #2314, #3576 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29337885
https://codereview.adblockplus.org/29337888
https://codereview.adblockplus.org/29337891
https://codereview.adblockplus.org/29337894
https://codereview.adblockplus.org/29337897

Description

Referencing Puppet resources declared within another scope is considered bad practice if the target entities are not explicitly documented to be included in the list of publicly accessible properties. Hence the multiple occurrences of require relationships referring directly to Exec['fetch_sitescripts'] are considered deprecated:

$ grep -R fetch_sitescripts *
modules/downloadserver/manifests/init.pp:      Exec['fetch_sitescripts'],
modules/notificationserver/manifests/init.pp:      Exec['fetch_sitescripts'],
modules/sitescripts/manifests/init.pp:  exec { "fetch_sitescripts":
modules/statsmaster/manifests/downloads.pp:                 Exec["fetch_sitescripts"]
modules/updateserver/manifests/init.pp:    require => [Exec['fetch_sitescripts'],
modules/updateserver/manifests/init.pp:      Exec["fetch_sitescripts"],
modules/web/manifests/server.pp:        Exec["fetch_sitescripts"],
modules/web/manifests/server.pp:      Exec['fetch_sitescripts', 'install_jsdoc'],

Those are to be replaced by references to Class['sitescripts'].

Change History (6)

comment:2 Changed 4 years ago by matze

  • Owner set to matze

comment:3 Changed 4 years ago by matze

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed 4 years ago by matze

  • Resolution set to fixed
  • Status changed from reviewing to closed
$ grep -R fetch_sitescripts *
modules/sitescripts/manifests/init.pp:  exec { "fetch_sitescripts":
modules/sitescripts/manifests/init.pp:    require => Exec["fetch_sitescripts"],

comment:6 Changed 3 years ago by matze

  • Blocking 2314 added
Note: See TracTickets for help on using tickets.