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

Label->tag mapper: produce InventoryCollection<Tag> #16259

Merged
merged 1 commit into from
Oct 30, 2017

Conversation

cben
Copy link
Contributor

@cben cben commented Oct 23, 2017

This works same as last PR #16098 for save_inventory mode but also exposes a more concrete interface that I'll be able to use in graph refresh:

  • Creation of missing tags: The tags_to_resolve_collection can just be added to graph refresh.

  • Reassigning tags: each map_labels returns individual InventoryObject - those can used to build
    InventoryCollection that will work similar to retag_entity.

    (We originally planned to do reassignment using original code in post-refresh.
    I'm postponing the move to post-refresh ;-) because we it was motivated by a new feature (going through policy) that is less critical than getting tagging working as now;
    and IIUC I'd need to express desired taggings in some form for post-refresh anyway.

(PRs for both of the above that upcoming, WIP building right query similar to retag_entity and adding tests...)

Overview issue: ManageIQ/manageiq-providers-kubernetes#126

@miq-bot add-label enhancement

@Ladas @zgalor @moolitayer @djberg96 please review.

@cben
Copy link
Contributor Author

cben commented Oct 26, 2017

hmm, need to debug these failures.
@miq-bot add-label wip

@miq-bot miq-bot changed the title Label->tag mapper: produce InventoryCollection<Tag> [WIP] Label->tag mapper: produce InventoryCollection<Tag> Oct 26, 2017
@miq-bot miq-bot added the wip label Oct 26, 2017
@cben cben force-pushed the tag-mapper-InventoryCollection branch 3 times, most recently from 28e467c to 2c8978a Compare October 27, 2017 13:26
Should allow tag creation to be done in graph refresh.
@cben cben force-pushed the tag-mapper-InventoryCollection branch from 2c8978a to 09986c0 Compare October 29, 2017 22:42
@miq-bot
Copy link
Member

miq-bot commented Oct 29, 2017

Checked commit cben@09986c0 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
5 files checked, 0 offenses detected
Everything looks fine. ⭐

@cben
Copy link
Contributor Author

cben commented Oct 29, 2017

@miq-bot remove-label wip

@Ladas @agrare please review.

The specific_tags_collection is silly bussiness. I just need something with known .id I can refer to
from an InventoryCollection<Tagging> (these will appear in next k8s and openshift PR based on this one). Actually it's dead code, UI doesn't allow (and never allowed) creating specific-value -> specific-tag mappings, I'm going to drop them, just requires rewriting tons of tests, so not in this PR...

@miq-bot miq-bot changed the title [WIP] Label->tag mapper: produce InventoryCollection<Tag> Label->tag mapper: produce InventoryCollection<Tag> Oct 29, 2017
@miq-bot miq-bot removed the wip label Oct 29, 2017
@agrare agrare merged commit 09986c0 into ManageIQ:master Oct 30, 2017
agrare added a commit that referenced this pull request Oct 30, 2017
Label->tag mapper: produce InventoryCollection<Tag>
@agrare agrare added this to the Sprint 72 Ending Oct 30, 2017 milestone Oct 30, 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.

4 participants