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

Documentation for eks_nodegroup is not working properly #536

Open
glasswalk3r opened this issue Jun 27, 2021 · 0 comments
Open

Documentation for eks_nodegroup is not working properly #536

glasswalk3r opened this issue Jun 27, 2021 · 0 comments

Comments

@glasswalk3r
Copy link
Contributor

When I execute

bundle exec rake generate_docs

The resulting Markdown completely ignores the content available on the file awspec/doc/_resource_types/eks_nodegroup.md, producing exactly the same content, which is different of the Markdown file has.

This is the current content of the mentioned file:

### exist

ruby
describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
  it { should exist }
end

### be_active, be_creating

ruby
describe eks('my-eks-nodegroup'), cluster: 'my-cluster' do
  it { should be_active }
end

The second code section is never inserted, neither changes on the header ### be_active, be_creating.

I was able to conduct some debugging from lib/awspec/generator/doc/type/base.rb, all the expected content is available on @descriptions before actually generating the template result:

          @descriptions = {}
          merge_file = File.dirname(__FILE__) + '/../../../../../doc/_resource_types/' + type_name.underscore + '.md'
          if File.exist?(merge_file)
            matcher = nil
            File.foreach(merge_file) do |line|
              if /\A### (.+)\Z/ =~ line
                matcher = Regexp.last_match[1]
                next
              end
              @descriptions[matcher] = '' unless @descriptions[matcher]
              @descriptions[matcher] += line
            end
          end
          ERB.new(doc_template, nil, '-').result(binding)

But for some reason, the Markdown on @descriptions never reaches doc/resource_types.md. I even attempt to delete the whole eks_nodegroup section from the file before generating again, but the result is the same.

Also, I believe that this automatic documentation process lacks, well, it's own documentation. I'm not sure either what the automation expected from those Markdown snippets to do it's work.

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

1 participant