Skip to content
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

Added SUPREMM Modules files to build.json #51

Merged
merged 4 commits into from
Aug 15, 2017
Merged

Conversation

ryanrath
Copy link
Contributor

@ryanrath ryanrath commented Jun 12, 2017

  • Added modules.d/supremm.json to the file_maps section of build.json

Description

Added the modules.d/supremm.json file to build.json so that it is included in the packaged module.

Motivation and Context

Needed to pipe through the new modules.d/<module>.json file through to the package / final installed source.

Tests performed

Manually tested:

  • Made changes to build.json
  • Executed: <xdmod_dir>/open_xdmod/build_package.php --module supremm --skip-assets --verbose
  • cd <xdmod_dir>/open_xdmod/build
  • tar xvzf xdmod-supremm-6.7.0.tar.gz
  • ls -alh xdmod-supremm/configuration/modules.d
    • ensure that: supremm.json is present
  • cat xdmod-supremm/configuration/modules.d/supremm.json
    • ensure that the file is a valid json file and contains the correct information.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jpwhite4
Copy link
Member

Does this pull request have a dependency on a different pull request that you have not yet created? or perhaps a change to xdmod that has not been merged yet?

@@ -48,6 +48,7 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/xdmod/rawstatisticsconfig.json
%config(noreplace) %{_sysconfdir}/xdmod/supremmconfig.json
%config(noreplace) %{_sysconfdir}/xdmod/aggregation_meta/modw_aggregates.supremmfact_aggregation_meta.json
%config(noreplace) %{_sysconfdir}/modules.d/supremm.json
Copy link
Member

Choose a reason for hiding this comment

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

Is this really a config noreplace file? I thought that the supremm.json contained the version number (and hence should be replaced on every install).

@@ -41,14 +41,14 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/xdmod/
%{_datadir}/xdmod/
%{_docdir}/%{name}-%{version}__PRERELEASE__/
%{_sysconfdir}/modules.d/supremm.json
Copy link
Member

Choose a reason for hiding this comment

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

Surely this should be

%{_sysconfdir}/xdmod/modules.d/supremm.json


%config(noreplace) %{_datadir}/xdmod/etl/js/config/supremm/etl.profile.js
%config(noreplace) %{_sysconfdir}/xdmod/*.d/supremm.ini
%config(noreplace) %{_sysconfdir}/xdmod/*.d/supremm*.json
%config(noreplace) %{_sysconfdir}/xdmod/datawarehouse.d/supremm*.json
Copy link
Member

Choose a reason for hiding this comment

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

Why supremm*.json rather than supremm.json? Do we anticipate having multiple files with supremm*.json? I thought the plan was for one file per module.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My train of thought on this went something like: While we don't currently have any modules that specify more than one datawarehouse.d/ json file we do need to support roles.d/supremm.json and roles.d/supremm-jobviewer.json. I figured keeping the behavior the same across directories would be desirable, hence specifying supremm*.json for each of the sub-directories.

- Added modules.d/supremm.json to the file_maps section of build.json
- Updated the definition of modules.d/supremm.json so that the file is pulled
  from the correct location.
- Explicitly defined the other *supremm*.json locations for config(noreplace)
  flagging as opposed to the more general /xdmod/*.d/supremm*.json ( which
  included modules.d/supremm.json, not what we wanted ).

- Testing consisted of building the rpm with the latest docker image and then
  executing the following commands:
  - cd ~/rpmbuild/RPMS/noarch
  - rpm -qp --queryformat '[%{FILENAMES} %{FILEFLAGS} \n]'
  xdmod-supremm-7.0.0-1.0.el7.centos.noarch.rpm | grep -E "supremm.*\.json" |
  grep /etc/xdmod
    - ex. output: /etc/xdmod/datawarehouse.d/supremm.json 17
    - if the number is 17 then it's a config / noreplace
    - if the number is 0 then it's just a regular file.
    - you can find all the file flags and their values ( it's a bitflag ) @
      http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/pkgformat.html
@tyearke tyearke added this to the v7.0.0 milestone Aug 14, 2017
@ryanrath ryanrath merged commit e879e49 into ubccr:xdmod7.0 Aug 15, 2017
@tyearke tyearke mentioned this pull request Sep 21, 2017
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.

3 participants