[fix] bug reporter: avoid duplicate mic file in / and /config-mic-files#3417
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes bugreporter archive contents so the microscope model file is not duplicated at the zip root and under config-mic-files/, aligning the archive layout with how CONFIGPATH is already collected.
Changes:
- Store the explicitly selected MODEL/MODEL_SELECTOR output in the same
config_model_filescollection as CONFIGPATH-globbed microscope files. - Stop adding the selected model file to the archive root-level
fileslist (so it only appears in theconfig-mic-files/subfolder).
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR modifies the Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/bugreporter/odemis_bugreporter.py`:
- Around line 348-350: The ZIP creation flattens names with os.path.basename(f)
for entries under config-mic-files causing duplicate member names when different
sources share a basename; update the code that writes entries (where
config_model_files is iterated and os.path.basename(f) is used — also at the
other occurrences you noted) to generate unique member names instead of basename
alone: either preserve a safe relative path (e.g., sanitize and use a subpath
derived from the original path or include the parent dir), or append a unique
suffix (counter/UUID or short hash) to the basename so entries like
config-mic-files/<name> become unique; apply this change consistently for
config_model_files and MODEL_SELECTOR handling and ensure the zip writes use the
new unique member name.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 91d04d69-f4e3-48ba-92a1-724871b80983
📒 Files selected for processing (1)
src/bugreporter/odemis_bugreporter.py
/config-mic-files contains all the files in CONFIG_PATH folder, which most usually include the standard MODEL file. So storing them in different folder maint the file was duplicated. => Just save in the same sub-folder.
d5a57b0 to
83730ff
Compare
/config-mic-files contains all the files in CONFIG_PATH folder, which most usually include the standard MODEL file. So storing them in different folder meant the file was duplicated.
=> Just save in the same sub-folder.