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

(CONT-193) Always build parallel task #459

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

chelnak
Copy link
Contributor

@chelnak chelnak commented Oct 12, 2022

Prior to this commit litmus::acceptance would check for the existance of litmus_inventory before building the parallel task.

If the file is not present then the task would not be build and not available in the list of tasks (bundle exec rake --tasks). It appears that tasks are only evaluated at Runtime.

This causes an issue when calling tasks sequentially inside a task via the api. In this particular case, the litmus_inventory file is only present after the provision task has executed. This means that the task list would have already been built without the acceptance task.

This would result in the following error:

Don't know how to build task 'litmus:acceptance:parallel' (see --tasks)

This commit removes the check so that the task can always be built. Checking for the existance of the litmus_inventory file is now scoped around where we dynamically build tasks based on the nodes listed in the inventory file.

Prior to this commit `litmus::acceptance` would check for the existance of
litmus_inventory before building the `parallel` task.

If the file is not present then the task would not be build and not
available in the list of tasks (`bundle exec rake --tasks`). It appears
that tasks are only evaluated at Runtime.

This causes an issue when calling tasks sequentially inside a task via
the api. In this particular case, the litmus_inventory file is only
present after the provision task has executed. This means that the task
list would have already been built without the acceptance task.

This would result in the following error:

`Don't know how to build task 'litmus:acceptance:parallel' (see
--tasks)`

This commit removes the check so that the task can always be built.
Checking for the existance of the `litmus_inventory` file is now scoped
around where we dynamically build tasks based on the nodes listed in the
inventory file.
@chelnak chelnak added the bugfix label Oct 12, 2022
@chelnak chelnak requested a review from a team as a code owner October 12, 2022 11:27
@chelnak chelnak self-assigned this Oct 12, 2022
@codecov-commenter
Copy link

Codecov Report

Base: 64.30% // Head: 64.66% // Increases project coverage by +0.35% 🎉

Coverage data is based on head (d826b08) compared to base (d632eac).
Patch coverage: 5.00% of modified lines in pull request are covered.

❗ Current head d826b08 differs from pull request most recent head 0f64ce8. Consider uploading reports for the commit 0f64ce8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
+ Coverage   64.30%   64.66%   +0.35%     
==========================================
  Files           7        7              
  Lines         919      917       -2     
==========================================
+ Hits          591      593       +2     
+ Misses        328      324       -4     
Impacted Files Coverage Δ
lib/puppet_litmus/rake_tasks.rb 30.45% <5.00%> (+0.63%) ⬆️
lib/puppet_litmus/puppet_helpers.rb 79.31% <0.00%> (-0.18%) ⬇️
lib/puppet_litmus/inventory_manipulation.rb 86.95% <0.00%> (+0.62%) ⬆️
lib/puppet_litmus/rake_helper.rb 74.14% <0.00%> (+0.76%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@david22swan david22swan merged commit 97264c9 into main Oct 12, 2022
@david22swan david22swan deleted the CONT-193-always_build_parallel_task branch October 12, 2022 14:45
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