Skip to content

Project importer fixes#901

Merged
rammodhvadia merged 2 commits into
mainfrom
project-importer-fixes
Jun 30, 2026
Merged

Project importer fixes#901
rammodhvadia merged 2 commits into
mainfrom
project-importer-fixes

Conversation

@rammodhvadia

Copy link
Copy Markdown
Contributor

What's changed?

  • Fixes an issue with the skip_job variable. Once @skip_job was set to true by a project with build: false in its project_config.yml, it stayed true for the rest of the run, meaning every following project import for every locale would be skipped.
  • Adds a test to check the old behaviour does not happen

@cla-bot cla-bot Bot added the cla-signed label Jun 29, 2026
@github-actions

Copy link
Copy Markdown

Test coverage

92.04% line coverage reported by SimpleCov.
Run: https://github.com/RaspberryPiFoundation/editor-api/actions/runs/28378631105

@rammodhvadia rammodhvadia marked this pull request as ready for review June 29, 2026 14:20
Copilot AI review requested due to automatic review settings June 29, 2026 14:20
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-api-p-project-im-zhfcf7 June 29, 2026 14:21 Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes UploadJob’s “build: false” handling so skipping one project does not inadvertently skip subsequent project imports within the same run (and adds regression coverage).

Changes:

  • Remove the persistent @skip_job flag and instead skip import per-project when project_config.yml sets build: false.
  • Keep format_project lightweight for non-buildable projects by returning early from config parsing.
  • Add an RSpec regression test ensuring a later buildable project is still imported after an earlier build: false project.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/jobs/upload_job.rb Eliminates cross-project state (@skip_job) and makes skipping depend only on the current project’s build flag.
spec/jobs/upload_job_spec.rb Adds a multi-project regression spec to ensure build: false doesn’t prevent later projects from importing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@patch0 patch0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🕵🏻 🎉

@zetter-rpf zetter-rpf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice one

@rammodhvadia rammodhvadia merged commit 0492985 into main Jun 30, 2026
7 checks passed
@rammodhvadia rammodhvadia deleted the project-importer-fixes branch June 30, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants