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

Updated to add resource_types and resource_type_realms #1006

Merged
merged 9 commits into from
Aug 16, 2019

Conversation

ryanrath
Copy link
Contributor

Description

Added Resource Types -> Supported Realms relations that we then use to filter what data acl-config processes.

Motivation and Context

We wanted to be able to only process, in acl-config the realms that are currently enabled. To accomplish this we associated resource_types w/ the appropriate realms. Then we select all currently installed resources and their types and retrieve a distinct list of the realms for those types.

There was also a few changes made to support Trevor's realm separation work ( Making it so that XDMoD doesn't need to have the Jobs realm installed to function properly. ).

Tests performed

  • All automated tests for: Fresh Install & Upgrade
  • Manually tested on xdmod-dev

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.

- Updated acl-config so that it knows when it's being installed on a system that
  has the `XSEDE` module. This has been added so that we can select the correct
  db schema for `updateResourceTypeRealms`.
- Needed to make sure that the `resource-types` table exists before inserting
  the Unknown resource type.
We can't be sure that `acl-config` will have been run before this code is called
so instead we've ported our `enabledRealms` code from `acl-config` here.
- Added a new property `supported_realms` to `permitted_modules` items. This,
  along with the accompanying change in `acl-config`, allows for filtering a
  `permitted_module` entry if none of the `supported_realms` are installed /
  enabled.
- Also fixed a problem with  the `DatawarehouseInitializer::getEnabledRealms`
  function that caused an error if the `$item` in
  `$resourceTypes['resource_types'][$item]` did not exist.
- Small update to allow the `testFilterIdLookup` function to create its own
  artifacts if they are not found.
@ryanrath ryanrath requested a review from plessbd August 15, 2019 19:28
plessbd
plessbd previously approved these changes Aug 15, 2019
@plessbd
Copy link
Contributor

plessbd commented Aug 15, 2019

approved with the caveat that proccessresults removes true

Co-Authored-By: Ben Plessinger <[email protected]>
@ryanrath ryanrath merged commit 048bf67 into ubccr:xdmod8.5 Aug 16, 2019
jpwhite4 added a commit to jpwhite4/xdmod that referenced this pull request Oct 10, 2019
- Revert the change to the primary key value for the 'UNK' resource
  type. This is now the same value (0) as previous s/w versions.
- Ensure the 'UNK' resource is added to the various resource type tables
  in the jobs_staging pipeline.
- Revert the addition of the ingest-resource-types pipeline when
  shredding jobs. This was added in ubccr#1006 possibly as a work around for
  the fact that the staging pipeline had not been modfied appropriately.
- Add a test to make sure this does not happen again.
jpwhite4 added a commit to jpwhite4/xdmod that referenced this pull request Oct 15, 2019
- Revert the change to the primary key value for the 'UNK' resource
  type. This is now the same value (0) as previous s/w versions.
- Ensure the 'UNK' resource is added to the various resource type tables
  in the jobs_staging pipeline.
- Enuse that the 'UNK' rows are added on upgrade path too.
- Revert the addition of the ingest-resource-types pipeline when
  shredding jobs. This was added in ubccr#1006 possibly as a work around for
  the fact that the staging pipeline had not been modified appropriately.
- Add a test to make sure this does not happen again.
@plessbd plessbd added Category:ACL Access Control Lists enhancement Enhancement of the functionality of an existing feature labels Oct 16, 2019
@plessbd plessbd added this to the 8.5.0 milestone Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:ACL Access Control Lists enhancement Enhancement of the functionality of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants