Skip to content

Deal with chronos jobs that have spaces in the name#10

Merged
asher merged 2 commits into
asher:masterfrom
YelpArchive:urlencoded_spaces
Aug 27, 2015
Merged

Deal with chronos jobs that have spaces in the name#10
asher merged 2 commits into
asher:masterfrom
YelpArchive:urlencoded_spaces

Conversation

@solarkennedy
Copy link
Copy Markdown
Collaborator

This patch correctly will quote the URL when we interact with the chronos api, so it properly deals with characters like spaces in chronos job names (which are perfectly valid chronos job names).

This is analogous to how the actual web interface works when you click the new job button.

@mrtyler
Copy link
Copy Markdown

mrtyler commented Aug 25, 2015

shipit

@solarkennedy
Copy link
Copy Markdown
Collaborator Author

I don't understand why travis has a green checkmark for the failing test commit. That sha definitly fails the itests and it is not using urlencoded urls:

chronos-python (b4b0d31...) $ make itests
...
Fetch: DELETE /scheduler/job/test chronos job with spaces
http://0.0.0.0:32873/scheduler/job/test chronos job with spaces
status: 400
    And we should be able to delete it                                  # steps/chronos_steps.py:65 0.003s
    And we should not be able to see it when we list jobs               # steps/chronos_steps.py:70
Fetch: GET /scheduler/jobs
http://0.0.0.0:32873/scheduler/jobs
    And we should not be able to see it when we list jobs               # steps/chronos_steps.py:70 0.023s
      Traceback (most recent call last):
        File "/nail/home/kwa/Projects/chronos-python/.tox/itests/local/lib/python2.7/site-packages/behave/model.py", line 1456, in run
          match.run(runner.context)
        File "/nail/home/kwa/Projects/chronos-python/.tox/itests/local/lib/python2.7/site-packages/behave/model.py", line 1903, in run
          self.func(context, *args, **kwargs)
        File "steps/chronos_steps.py", line 74, in not_see_job_with_spaces
          assert "test chronos job with spaces" not in job_names
      AssertionError

      Captured logging:
      ERROR:chronos:Response not valid json: Error: 400

In the output it just has a git checkout of "HEAD", so that run in travis doesn't reflect the actual failing test.

In other words, this bug is real and the second commit really fixes it.

I'll merge this into our own fork and do an internal release to unblock us.

asher added a commit that referenced this pull request Aug 27, 2015
Deal with chronos jobs that have spaces in the name
@asher asher merged commit 24a9702 into asher:master Aug 27, 2015
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.

3 participants