Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Fix image scripts not being included in user deploy #592

Merged
merged 6 commits into from
Mar 6, 2018

Conversation

cdosborn
Copy link
Contributor

@cdosborn cdosborn commented Mar 3, 2018

Description

Problem:
Image scripts are never deployed to an instance

Solution:
Deploy image scripts alongside instance scripts

In this commit acb6729, we removed the task which ran image scripts against an instance.

Checklist before merging Pull Requests

  • New test(s) included to reproduce the bug/verify the feature
  • [ ] Documentation created/updated at Example link to documentation to give context to the feature
  • [ ] If creating/modifying DB models which will contain secrets or sensitive information, PR to clank updating sanitation queries in roles/sanitary-sql-access/templates/sanitize-dump.sh.j2
  • Reviewed and approved by at least one other contributor.
  • If necessary, include a snippet in CHANGELOG.md
  • [ ] New variables supported in Clank
  • [ ] New variables committed to secrets repos

@cdosborn cdosborn changed the base branch from master to v31 March 3, 2018 01:36
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 36.84% when pulling 40ea436 on cdosborn:deploy-image-scripts into fc978da on cyverse:v31.

@coveralls
Copy link

coveralls commented Mar 3, 2018

Coverage Status

Coverage increased (+0.1%) to 36.95% when pulling 46666ed on cdosborn:deploy-image-scripts into fc978da on cyverse:v31.

Copy link
Contributor

@julianpistorius julianpistorius 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! Thanks Connor.

@cdosborn
Copy link
Contributor Author

cdosborn commented Mar 6, 2018

My original patch was so small it seemed like it would just work (and I did test it locally). It turned out not to work. Because you cannot filter over a queryset that has been evaluated. (you can, but you get nonsense results). Anywho to the power of writing tests for even the smallest changes.

In this commit acb6729, we removed the task
which ran image scripts against an instance. There is a lot confusing
terminology that needs to be cleaned up.
This test will start failing when it has built up results in the redis cache.
Need to revisit it, but travis doesn't catch it because it starts with a clean
cache.
This test case broke when the instance_factory began returning a project. This
change makes the test only compare values it is actively trying to test,
namely the assignment of an allocation source.
This test case broke when the instance_factory began returning a project. This
change makes the test only compare values it is actively trying to test,
namely instance name.
Copy link
Contributor

@julianpistorius julianpistorius left a comment

Choose a reason for hiding this comment

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

This is fantastic effort @cdosborn ! 🙇

from api.tests.factories import BootScriptRawTextFactory, InstanceFactory, UserFactory


class UserDeployTests(TestCase):
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

@@ -172,6 +172,7 @@ def test_user_sees_no_statistics(self):
response = client.get(url)
self.assertEquals(response.status_code, 404)

@skip("Test is non deterministic and yields different results based on its redis cache")
Copy link
Contributor

Choose a reason for hiding this comment

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

Ouch.

@cdosborn cdosborn merged commit 42ef4f0 into cyverse:v31 Mar 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants