Skip to content

fix: make issue tarballs self-contained when WORK_HOME differs#4274

Merged
vvbandeira merged 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:make-issue-paths
Jun 4, 2026
Merged

fix: make issue tarballs self-contained when WORK_HOME differs#4274
vvbandeira merged 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:make-issue-paths

Conversation

@vvbandeira
Copy link
Copy Markdown
Member

CI runs ORFS from a docker image (/OpenROAD-flow-scripts) with WORK_HOME set to the Jenkins workspace (/tmp/workspace/...). The issue tarballs then recreated the absolute workspace path (tmp/ folder) and run-me sourced the vars file via a hardcoded CI path, so extracted reproducibles failed out of the box:

run-me-*.sh: line 2: /tmp/workspace/.../vars-*.sh: No such file
[ERROR STA-0340] cannot open '/final_report.tcl'.
  • makeIssue.sh: source vars relative to run-me location; strip WORK_HOME prefix (literal and symlink-resolved) from tar members
  • generate-vars.sh: relativize paths under WORK_HOME instead of only the hardcoded /workspace prefix
  • test_make_issue.sh: run the extracted run-me script instead of the WORK_HOME copy via absolute path

CI runs ORFS from a docker image (/OpenROAD-flow-scripts) with
WORK_HOME set to the Jenkins workspace (/tmp/workspace/...). The
issue tarballs then recreated the absolute workspace path (tmp/
folder) and run-me sourced the vars file via a hardcoded CI path,
so extracted reproducibles failed out of the box:

  run-me-*.sh: line 2: /tmp/workspace/.../vars-*.sh: No such file
  [ERROR STA-0340] cannot open '/final_report.tcl'.

- makeIssue.sh: source vars relative to run-me location; strip
  WORK_HOME prefix (literal and symlink-resolved) from tar members
- generate-vars.sh: relativize paths under WORK_HOME instead of
  only the hardcoded /workspace prefix
- test_make_issue.sh: run the extracted run-me script instead of
  the WORK_HOME copy via absolute path

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
@vvbandeira vvbandeira self-assigned this Jun 3, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the portability of reproducible test archives generated by makeIssue.sh when run in environments with custom workspace directories (such as CI). It relativizes paths under WORK_HOME and ensures the generated run script sources the environment variables relatively. The review feedback highlights two issues: first, the path relativization in generate-vars.sh can corrupt paths if work_path is a prefix of another directory name (e.g., /tmp/work matching /tmp/work_other); second, a trailing slash in WORK_HOME can cause double slashes in the tar transform pattern in makeIssue.sh, preventing the prefix from being stripped correctly. Code suggestions are provided to address both issues.

Comment thread flow/util/generate-vars.sh
Comment thread flow/util/makeIssue.sh Outdated
Address review:

- generate-vars.sh: require a path boundary after WORK_HOME so a
  prefix (e.g. /tmp/work) does not corrupt sibling paths
  (e.g. /tmp/work_other)
- makeIssue.sh: tolerate trailing slash in WORK_HOME and slash runs
  in tar member names (${WORK_HOME}/x yields ws//x when WORK_HOME
  ends in /)

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
@vvbandeira vvbandeira merged commit eb14d76 into The-OpenROAD-Project:master Jun 4, 2026
8 checks passed
@vvbandeira vvbandeira deleted the make-issue-paths branch June 4, 2026 20:18
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.

1 participant