Skip to content

Commit

Permalink
Merge branch 'edge' into EXEC-1078
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau authored Jan 17, 2025
2 parents 0ef16ae + 7393c92 commit e767735
Show file tree
Hide file tree
Showing 296 changed files with 17,894 additions and 951 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ jobs:
- name: 'upload github artifact'
if: matrix.target == 'desktop'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'opentrons-${{matrix.variant}}-${{ matrix.os }}'
path: app-shell/dist/publish
Expand All @@ -392,7 +392,7 @@ jobs:
if: contains(fromJSON(needs.determine-build-type.outputs.variants), 'release') || contains(fromJSON(needs.determine-build-type.outputs.variants), 'internal-release')
steps:
- name: 'download run app builds'
uses: 'actions/download-artifact@v3'
uses: 'actions/download-artifact@v4'
with:
path: ./artifacts
- name: 'separate release and internal-release artifacts'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/components-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: 'build components'
run: make -C components
- name: 'upload github artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'components-artifact'
path: storybook-static
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'download components build'
uses: 'actions/download-artifact@v3'
uses: 'actions/download-artifact@v4'
with:
name: components-artifact
path: ./dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ll-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
run: |
make -C labware-library
- name: 'upload github artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'll-artifact'
path: labware-library/dist
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'download LL build'
uses: 'actions/download-artifact@v3'
uses: 'actions/download-artifact@v4'
with:
name: ll-artifact
path: ./dist
Expand Down
35 changes: 16 additions & 19 deletions abr-testing/abr_testing/data_collection/abr_robot_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ def retrieve_protocol_file(
) -> Path | str:
"""Find and copy protocol file on robot with error."""
protocol_dir = f"/var/lib/opentrons-robot-server/7.1/protocols/{protocol_id}"

print(f"FILE TO FIND: {protocol_dir}/{protocol_id}")
# Copy protocol file found in robot oto host computer
save_dir = Path(f"{storage}/protocol_errors")
# Copy protocol file found in robot onto host computer
save_dir = Path(f"{storage}")
command = ["scp", "-r", f"root@{robot_ip}:{protocol_dir}", save_dir]
try:
# If file found and copied return path to file
Expand Down Expand Up @@ -62,7 +60,6 @@ def compare_current_trh_to_average(
# Find average conditions of errored time period
df_all_trh = pd.DataFrame(all_trh_data)
# Convert timestamps to datetime objects
print(f'TIMESTAMP: {df_all_trh["Timestamp"]}')
try:
df_all_trh["Timestamp"] = pd.to_datetime(
df_all_trh["Timestamp"], format="mixed", utc=True
Expand Down Expand Up @@ -196,7 +193,6 @@ def read_each_log(folder_path: str, issue_url: str) -> None:
for file_name in os.listdir(folder_path):
file_path = os.path.join(folder_path, file_name)
not_found_words = []
print(file_path)
if file_path.endswith(".log"):
with open(file_path) as file:
lines = file.readlines()
Expand Down Expand Up @@ -341,11 +337,8 @@ def get_robot_state(
if "8.2" in affects_version:
labels.append("8_2_0")
parent = affects_version + " Bugs"
print(components)
end_time = datetime.now()
print(end_time)
start_time = end_time - timedelta(hours=2)
print(start_time)
# Get current temp/rh compared to historical data
temp_rh_string = compare_current_trh_to_average(
parent, start_time, end_time, "", storage_directory
Expand Down Expand Up @@ -554,11 +547,17 @@ def get_run_error_info_from_robot(
sys.exit()
if len(run_or_other) < 1:
# Retrieve the most recently run protocol file
protocol_files_path = retrieve_protocol_file(
protocol_folder = retrieve_protocol_file(
protocol_ids[-1], ip, storage_directory
)
protocol_folder_path = os.path.join(protocol_folder, protocol_ids[-1])
# Path to protocol folder
list_of_files = os.listdir(protocol_folder_path)
for file in list_of_files:
if str(file).endswith(".py"):
protocol_file_path = os.path.join(protocol_folder_path, file)
# Set protocol_found to true if python protocol was successfully copied over
if protocol_files_path:
if protocol_file_path:
protocol_found = True

one_run = error_runs[-1] # Most recent run with error.
Expand Down Expand Up @@ -612,15 +611,13 @@ def get_run_error_info_from_robot(
# OPEN TICKET
issue_url = ticket.open_issue(issue_key)
# MOVE FILES TO ERROR FOLDER.
print(protocol_files_path)
error_files = [saved_file_path_calibration, run_log_file_path] + file_paths

# Move protocol file(s) to error folder
if protocol_files_path:
for file in os.listdir(protocol_files_path):
error_files.append(os.path.join(protocol_files_path, file))
error_files = [
saved_file_path_calibration,
run_log_file_path,
protocol_file_path,
] + file_paths

error_folder_path = os.path.join(storage_directory, "issue_key")
error_folder_path = os.path.join(storage_directory, issue_key)
os.makedirs(error_folder_path, exist_ok=True)
for source_file in error_files:
try:
Expand Down
16 changes: 16 additions & 0 deletions abr-testing/abr_testing/data_collection/read_robot_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,11 @@ def get_error_info(file_results: Dict[str, Any]) -> Dict[str, Any]:
recoverable_errors.get(error_type, 0) + 1
)
# Get run-ending error info
module_dict = {
"heatershaker": "heaterShakerModuleV1",
"thermocycler": "thermocyclerModuleV2",
"temperature module": "temperatureModuleV2",
}
try:
run_command_error = commands_of_run[-1]["error"]
error_type = run_command_error.get("errorType", "")
Expand All @@ -647,6 +652,17 @@ def get_error_info(file_results: Dict[str, Any]) -> Dict[str, Any]:
error_instrument = run_command_error.get("errorInfo", {}).get(
"node", run_command_error.get("errorInfo", {}).get("port", "")
)
if "gripper" in error_instrument:
# get gripper serial number
error_instrument = file_results["extension"]
else:
# get module serial number
for module in module_dict.keys():
if module in error_instrument:
for module_list in file_results["modules"]:
model = module_list["model"]
if model == module_dict[module]:
error_instrument = module_list["serialNumber"]
except (IndexError, KeyError):
try:
error_details = file_results.get("errors", [{}])[0]
Expand Down
Loading

0 comments on commit e767735

Please sign in to comment.