-
Notifications
You must be signed in to change notification settings - Fork 68
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
Filter Realms processed by acl-config
#1000
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Benjamin D. Plessinger <ben@plessinger.us>
- `acl-config` now takes into account which Realms have been added to the XDMoD installation as opposed to those which have records in `datawarehouse.json`. - Updated `ResourcesSetup.php` so that `acl-config` is run after the newly updated resources data is saved to `resources.json`.
We want to ensure that these realms are processed in a particular order so we've pre-pended a number indicating when it will be processed min->max.
It was decided that acl-config should only be run if an installation adds at least one resource. That being the case, these bits of code are no longer needed.
Just silencing warnings at a few places in the code.
- `acl-config`: Utilizes the [resources|resource_types].json files to determine which realms are `enabled`. A realm is considered `enabled` if there is at least one resource w/ a resource_type that has a matching `realm` record. - `ConfigFilesMigration`: Makes sure that we update the existing `resource_types.json` file from `resource_type_id` -> `resource_type`. - `etl.d/resource_types.json`: We're manually inserting the 'unknown' resource now as opposed to including it in `resources.json`. This allows us to utilize -1 as the id. To account for that, a new action has been added to the `ingest-resource-types` pipeline. - `xdmod-migration-8_1_2-8_5_0.json`: We need to make sure that the foreign key constraint on `resources` is updated. - `etl_action_defs.d/common/hpcdb/resources.json`: Just updating the default value to be in line with the changes made in `etl.d/resource_types.json`. - `unknown_resource_type.sql`: The manual insertion of the `unknown` resource type. - `etl_tables.d/.../resource-types.json`: Adding the `type_abbr` column so that we can translate from `type_abbr` -> `type_id` and vice versa. - `etl_tables.d/...resources.json`: Updated the `fk_resource_res_type` fk to include `on_delete|on_update` clauses. This change allows the DB to take care of keeping resource_types -> resources in sync. - `configuration/resource_types.json`: Removing the `Unknown` resource_type as it's now manually inserted. - `roles.json`: The query_descripters / summary_charts for `default` were previously removed. We are adding them back in here.
Turns out this data has been moved to roles.d/jobs.json
as an addendum to the motivation. |
plessbd
approved these changes
Aug 6, 2019
plessbd
added
Category:General
General
enhancement
Enhancement of the functionality of an existing feature
labels
Aug 8, 2019
plessbd
added
Category:Infrastructure
Internal infrastructure updates/changes
and removed
Category:General
General
labels
Oct 16, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Category:Infrastructure
Internal infrastructure updates/changes
enhancement
Enhancement of the functionality of an existing feature
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Co-authored-by: @plessbd
Description
acl-config
: Utilizes the [resources|resource_types].json files to determinewhich realms are
enabled
. A realm is consideredenabled
if there is atleast one resource w/ a resource_type that has a matching
realm
record.ConfigFilesMigration
: Makes sure that we update the existingresource_types.json
file fromresource_type_id
->resource_type
.etl.d/resource_types.json
: We're manually inserting the 'unknown' resourcenow as opposed to including it in
resources.json
. This allows us to utilize-1 as the id. To account for that, a new action has been added to
the
ingest-resource-types
pipeline.xdmod-migration-8_1_2-8_5_0.json
: We need to make sure that the foreignkey constraint on
resources
is updated.etl_action_defs.d/common/hpcdb/resources.json
: Just updating the defaultvalue to be in line with the changes made in
etl.d/resource_types.json
.unknown_resource_type.sql
: The manual insertion of theunknown
resourcetype.
etl_tables.d/.../resource-types.json
: Adding thetype_abbr
column so thatwe can translate from
type_abbr
->type_id
and vice versa.etl_tables.d/...resources.json
: Updated thefk_resource_res_type
fk toinclude
on_delete|on_update
clauses. This change allows the DB to take careof keeping resource_types -> resources in sync.
configuration/resource_types.json
: Removing theUnknown
resource_type asit's now manually inserted.
roles.json
: The query_descripters / summary_charts fordefault
werepreviously removed. We are adding them back in here.
Motivation and Context
We're moving towards allowing XDMoD to be installed with any combination of Realms as opposed to assuming that the
Jobs
realm is present. Specifically, this PR updatesacl-config
to utilizeresource_types.json
andresources.json
to determine which realms are actually valid / enabled for the current installation. It will then only process the configuration data for those realms.Tests performed
Types of changes
Checklist: