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

promote summary does not support --stanza filtering #89

Closed
guilhemmarchand opened this issue Apr 30, 2021 · 4 comments
Closed

promote summary does not support --stanza filtering #89

guilhemmarchand opened this issue Apr 30, 2021 · 4 comments
Assignees

Comments

@guilhemmarchand
Copy link

The problem

We are using the promote --summary before performing the promotion, such that we can log and investigate the changes reported by the use case owners.

I am noticing that the summary option (-s) does not work with stanza filtering, there will be no output, however the promote itself works perfectly fine,

Environment

  • Ksconf version: 0.8.7
  • OS & version used: RHEL 7
  • Python version: 3.7.4
  • Installed via: Splunk app

Details

/opt/splunk/bin/ksconf promote -s --stanza "gsocsan_cim_Application_State_indexes" /opt/splunk/etc/apps/SA-0-Framework-BRAZIL/local/macros.conf /opt/software/sync_workspace/SA-0-Framework-BRAZIL/default/macros.conf

--> no changes reported, but we have one stanza to be promoted.

/opt/splunk/bin/ksconf promote -s /opt/splunk/etc/apps/SA-0-Framework-BRAZIL/local/macros.conf /opt/software/sync_workspace/SA-0-Framework-BRAZIL/default/macros.conf
Have 1 'replace' operations:
	[gsocsan_cim_Application_State_indexes]  1 keys
lowell80 added a commit that referenced this issue Aug 6, 2021
- Add support for previewing which specific stanzas will be updated during a
  batch (list) promote operation.   This is done by moving the filtering logic
  a new apply_filters() method which can be shared by the summary code and
  _do_promote_list() method.  This addresses bug #89.
@lowell80
Copy link
Member

lowell80 commented Aug 6, 2021

@guilhemmarchand , please take a look at v0.8.8rc3 and see if it better address this request. I'm not 100% sure it's behaving correctly, but I stared at it long enough I could use another pair of eyes.

@lowell80 lowell80 self-assigned this Aug 6, 2021
@lowell80
Copy link
Member

lowell80 commented Aug 6, 2021

Okay, I'm pretty sure this is fixed now. I've also added --diff mode that should help be like a "preview" of what will be applied.

I've just release v0.8.8r4 (which may end up being officially released as 0.9.0, we'll see).

I'll be out on vacation for a week, so I'll review any feedback and pushing a release then. I got a bunch of random things addressed.

@lowell80 lowell80 reopened this Aug 6, 2021
@guilhemmarchand
Copy link
Author

Hi @lowell80 !
Sorry for late replying, I am back from PTO as well and back with my customer using ksconf ;-)
So I am about to verify this, and will let you know very shortly!

@lowell80
Copy link
Member

@guilhemmarchand, cleaning up old tickets. Please re-open if this doesn't work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants