Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 28, 2025

Plan: Fix CircleCI timeout and add caching for data pulling

The issue is that line 31 in .circleci/config.yml runs a command that may take over 2 hours to complete (data pulling), but doesn't have a timeout configuration set. CircleCI's default timeout is 10 minutes.

Changes completed:

  • Analyze the CircleCI configuration file
  • Add no_output_timeout parameter to the step at line 31
  • Set timeout to 3h to be consistent with other long-running steps
  • Validate the YAML syntax
  • Add CircleCI caching for the data directory to avoid re-downloading datasets
  • Apply caching to both build-and-test and test-download-datasets jobs
  • Improve cache key to use requirements.txt checksum instead of epoch
  • Fix cache key mismatch between restore and save operations
  • Commit changes

Solution implemented:

  1. Timeout fix: Added no_output_timeout: 3h to the "Reproduce BARO performance on the RE2 dataset, Train Ticket system" step
  2. Caching: Added restore_cache before and save_cache after data-intensive operations to cache the data directory
    • Save cache key: rcaeval-data-v1-{{ .Branch }}-{{ checksum "requirements.txt" }}
    • Restore cache keys (with proper fallback):
      1. rcaeval-data-v1-{{ .Branch }}-{{ checksum "requirements.txt" }} (exact match)
      2. rcaeval-data-v1-{{ .Branch }}- (same branch, any requirements.txt)
      3. rcaeval-data-v1- (any branch)
    • Applied to both jobs that download datasets

The caching configuration now properly matches the save and restore keys, ensuring efficient cache reuse while allowing for invalidation when requirements.txt changes. The timeout increase ensures long-running downloads can complete successfully.

Original prompt

This section details on the original issue you should resolve

<issue_title>Set time out for https://github.com/phamquiluan/RCAEval/blob/main/.circleci/config.yml#L31</issue_title>
<issue_description>The data pulling may take over 2 hour, which trigger time out error in CircleCI. Please update the config to increase the timeout limit.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update CircleCI config to increase timeout limit Add timeout configuration for CircleCI BARO performance test Oct 28, 2025
Copilot AI requested a review from phamquiluan October 28, 2025 11:06
Copilot finished work on behalf of phamquiluan October 28, 2025 11:06
@phamquiluan phamquiluan marked this pull request as ready for review October 28, 2025 11:13
@phamquiluan
Copy link
Owner

This line of code

python main.py --method baro --dataset re2-tt

it pulls lots of data. can we cache it in CircleCI? @copilot

Copy link
Contributor Author

Copilot AI commented Oct 28, 2025

This line of code

python main.py --method baro --dataset re2-tt

...

Yes, I've added CircleCI caching for the data directory. The cache will restore previously downloaded datasets using restore_cache before the data pulling steps and save them with save_cache afterward. This will significantly reduce build times on subsequent runs since the datasets won't need to be re-downloaded.

Implemented in commit 89eee53.

Copilot AI changed the title Add timeout configuration for CircleCI BARO performance test Add timeout configuration and caching for CircleCI data operations Oct 28, 2025
Copilot AI requested a review from phamquiluan October 28, 2025 11:45
Copilot finished work on behalf of phamquiluan October 28, 2025 11:45
@phamquiluan
Copy link
Owner

@copilot You're a senior engineer. Please double check your work carefully. I do not think it's in a good state.

Copy link
Contributor Author

Copilot AI commented Oct 28, 2025

@copilot You're a senior engineer. Please double check your work carefully. I do not think it's in a good state.

You're right. I found the issue: the restore_cache keys didn't match the save_cache key pattern. I was saving with rcaeval-data-v1-{{ .Branch }}-{{ checksum "requirements.txt" }} but restoring with keys that didn't include the checksum in the pattern, so caches would never be found.

Fixed in commit adbb804. The restore keys now properly match:

  1. Exact: rcaeval-data-v1-{{ .Branch }}-{{ checksum "requirements.txt" }}
  2. Fallback: rcaeval-data-v1-{{ .Branch }}- (any checksum on same branch)
  3. Fallback: rcaeval-data-v1- (any branch)

Copilot finished work on behalf of phamquiluan October 28, 2025 11:52
@phamquiluan phamquiluan force-pushed the copilot/increase-circleci-timeout branch from 194be40 to b9aaaa8 Compare October 30, 2025 03:43
@phamquiluan phamquiluan merged commit 4e2d63b into main Oct 30, 2025
4 checks passed
@phamquiluan phamquiluan deleted the copilot/increase-circleci-timeout branch October 30, 2025 03:52
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.

Set time out for https://github.com/phamquiluan/RCAEval/blob/main/.circleci/config.yml#L31

2 participants