Skip to content

Default template dir#176

Closed
jmeixensperger wants to merge 2 commits intodevelopfrom
bug/template-dir
Closed

Default template dir#176
jmeixensperger wants to merge 2 commits intodevelopfrom
bug/template-dir

Conversation

@jmeixensperger
Copy link
Copy Markdown
Contributor

Use sampleDir to define a default templates path and load it into our filesystem.
Addresses #167.

Copy link
Copy Markdown
Contributor

@GordonWang GordonWang left a comment

Choose a reason for hiding this comment

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

Can we hold this change a while. and let's continue discussion when I create my PR

working_dir = os.path.join(splunk_home, 'etc', 'apps', app_name, 'default')

default_template_dir = os.path.join(os.path.dirname(working_dir), 'samples', 'templates')
if hasattr(self._sample, "sampleDir"):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have fixed #176 in my local branch and will submit the PR soon.

I think this only fixed part of the issue. for #176, we need to fix 2 parts

  1. resolve the jinja_template_dir with sampleDir when it is a relative path
  2. use the jinja_template_dir directly when it is a absolute path.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This issue is addressed in #177

Please review this.

Copy link
Copy Markdown
Contributor

@li-wu li-wu Apr 24, 2019

Choose a reason for hiding this comment

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

@jmeixensperger could we just use #177 since it addressed both the default template dir issue and vulnerability issue with test cases covered?

'jinja2',
'pyrabbit==1.1.0',
'urllib3==1.23',
'urllib3>=1.24.2',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also this should be urllib3==1.24.2, or it will break all the functional tests.

@GordonWang
Copy link
Copy Markdown
Contributor

#177 has been merged.

@arctan5x
Copy link
Copy Markdown
Contributor

Please resolve merge conflicts.

@li-wu
Copy link
Copy Markdown
Contributor

li-wu commented Apr 26, 2019

@arctan5x @jmeixensperger I think both the default template dir issue and the vulnerability issue are already fixed at #177 with test cases. So this PR can be closed instead of merging to dev branch.

@li-wu li-wu deleted the bug/template-dir branch August 13, 2019 22:16
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

Successfully merging this pull request may close these issues.

5 participants