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

[v4.1.z] Fix underscores for non-suffix plurals #377

Merged
merged 4 commits into from
Dec 17, 2018

Conversation

cben
Copy link
Collaborator

@cben cben commented Dec 16, 2018

This PR is not onto master! I've cut v4.1.z branch from v4.1.0 tag and want to release this as 4.1.1, then merge this into master before doing anything else on master.

Fixes #376, a regression in 4.1.0. Partially undoes 783c58b from #366.

Restores underscores in following method names (all of these prefixed with get_, create_ etc):

  • network_policy network_policies
  • pod_security_policy pod_security_policies
  • egress_network_policy egress_network_policies
  • cluster_policy cluster_policies
  • network_policy network_policies

These are the known examples from k8s and openshift (exact differences 4.0.0 -> 4.1.0 -> this PR can be seen in this gist).
In principle may similarly affect other plurals in custom resources, eg. (fictional) big_datum / big_data.

(duh, if only I carefully read the comments before that refactoring, they specifically showed networkpolicies plural and matching only on NetworkP prefix...)

WIP because need changelog & I want to add another test.

@cben cben changed the base branch from master to v4.1.z December 16, 2018 15:14
@cben cben changed the title [WIP] Fix underscores for non-suffix plurals [WIP] [v4.1.z] Fix underscores for non-suffix plurals Dec 16, 2018
@cben cben changed the title [WIP] [v4.1.z] Fix underscores for non-suffix plurals [v4.1.z] Fix underscores for non-suffix plurals Dec 16, 2018
@cben cben force-pushed the fix-non-suffix-plurals branch from f2a8a81 to cd34590 Compare December 16, 2018 16:24
@cben
Copy link
Collaborator Author

cben commented Dec 16, 2018

@masayag @grosser please review.

Moti, I stole some of your tests ;-). You'll have to rebase but you'd need anyway to adopt to this partial prefix matching.

@cben cben merged commit e686cc9 into ManageIQ:v4.1.z Dec 17, 2018
Copy link
Contributor

@masayag masayag left a comment

Choose a reason for hiding this comment

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

Looks good. About rebase - shouldn't #373 be merged to master first ? In that case, no need to rebase.

Unless you intend it to for 4.1.z only as well.

@cben cben added the bug label Dec 17, 2018
This was referenced Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants