ros2 / ros2/ci

ros2_batch_job --workspace-path option does not work

Open
#600 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog bug
Dominant language
Python
Stars
55
Forks
39
Avg merge
1d 13h
Merged PRs (30d)
7

Description

Looking at the code we see that the argparse option declared here:

https://github.com/ros2/ci/blob/eb8d0ad3e9b74a71561c178bb5d8487f77206d35/ros2_batch_job/__main__.py#L238-L240

is not actually used anywhere in the code. So setting this option has no affect on the job.

I'm not sure exactly how to fix the argument because I don't understand the purpose of the --white-space-in option, which is coupled to determining the actual workspace named used:

https://github.com/ros2/ci/blob/eb8d0ad3e9b74a71561c178bb5d8487f77206d35/ros2_batch_job/__main__.py#L427

If I'm not mistaken, this section of code is relevant as well:

https://github.com/ros2/ci/blob/eb8d0ad3e9b74a71561c178bb5d8487f77206d35/ros2_batch_job/__main__.py#L267-L270


Here are other references to the option I could find:

https://github.com/ros2/ci/blob/eb8d0ad3e9b74a71561c178bb5d8487f77206d35/job_templates/ci_job.xml.em#L123

https://github.com/ros2/ci/blob/eb8d0ad3e9b74a71561c178bb5d8487f77206d35/job_templates/ci_job.xml.em#L265

https://github.com/ros2/ci/blob/eb8d0ad3e9b74a71561c178bb5d8487f77206d35/job_templates/ci_job.xml.em#L368

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in ros2_batch_job/main.py at the argparse declaration around lines 238-240, then trace workspace-name handling around lines 267-270 and 427. Compare those paths with the --workspace-path references in job_templates/ci_job.xml.em at lines 123, 265, and 368. Done means setting --workspace-path changes the workspace used by the batch job without breaking the related whitespace option.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ci-cd, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.