Skip to content

#1651: push and commit status.json files to ide-urls-status after running the URL update worklfow#2003

Open
AdemZarrouki wants to merge 10 commits into
devonfw:mainfrom
AdemZarrouki:feature/1651-migrate-status.json-files
Open

#1651: push and commit status.json files to ide-urls-status after running the URL update worklfow#2003
AdemZarrouki wants to merge 10 commits into
devonfw:mainfrom
AdemZarrouki:feature/1651-migrate-status.json-files

Conversation

@AdemZarrouki

@AdemZarrouki AdemZarrouki commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #1651

Implemented changes:


Testing instructions

Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:

  1. This can be tested in a test branch but for that you need to adapt update-urls.yml to include your test branch. A workflow example was created and it successfully updates both ide-urls and ide-urls-status. https://github.com/AdemZarrouki/IDEasy/actions/runs/26902445623
  2. Also you need to include a personal ACTION_PUSH_TOKEN and activate the URL Update workflow in your fork.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jun 4, 2026
@AdemZarrouki AdemZarrouki added urls ide-urls repo and related processes and features workflow GitHub actions (CI,CD,update urls/CVEs) labels Jun 4, 2026
@coveralls

coveralls commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 28159637210

Coverage decreased (-0.1%) to 71.231%

Details

  • Coverage decreased (-0.1%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 71 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

71 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/url/model/folder/UrlVersion.java 27 50.89%
com/devonfw/tools/ide/url/updater/UpdateManager.java 24 0.0%
com/devonfw/tools/ide/url/UpdateInitiator.java 17 0.0%
com/devonfw/tools/ide/url/model/folder/UrlRepository.java 3 69.23%

Coverage Stats

Coverage Status
Relevant Lines: 16319
Covered Lines: 12122
Line Coverage: 74.28%
Relevant Branches: 7304
Covered Branches: 4705
Branch Coverage: 64.42%
Branches in Coverage %: Yes
Coverage Strength: 3.14 hits per line

💛 - Coveralls

@AdemZarrouki AdemZarrouki marked this pull request as ready for review June 4, 2026 09:50
@AdemZarrouki AdemZarrouki self-assigned this Jun 4, 2026
@AdemZarrouki AdemZarrouki moved this from 🆕 New to Team Review in IDEasy board Jun 4, 2026
@AdemZarrouki AdemZarrouki requested a review from tineff96 June 5, 2026 11:21
tineff96 added a commit to tineff96/IDEasy that referenced this pull request Jun 5, 2026
tineff96 added a commit to tineff96/IDEasy that referenced this pull request Jun 5, 2026
tineff96 added a commit to tineff96/IDEasy that referenced this pull request Jun 8, 2026
tineff96 added a commit to tineff96/IDEasy that referenced this pull request Jun 8, 2026
tineff96 added a commit to tineff96/IDEasy that referenced this pull request Jun 8, 2026

@tineff96 tineff96 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.

I tested the workflow end-to-end in a fork.


Test setup:

Created a test branch (test/2003-test-branch) in my fork:

tineff96/IDEasy
tineff96/ide-urls
tineff96/ide-urls-status

Adapted the workflow in tineff96/IDEasy to run against the test branch (test/2003-test-branch)

Executed the workflow based on the provided template
(reference run: https://github.com/AdemZarrouki/IDEasy/actions/runs/26902445623)


Result:

The migration of status.json files from ide-urls to ide-urls-status worked as expected.

The workflow correctly commits:

  • status.json files are committed to ide-urls-status
  • all other files are committed to ide-urls

No unexpected files were committed

Important notes for reviewers / future testers:

Setting up the test environment is slightly non-trivial because it requires:

Forks of both repositories (ide-urls and ide-urls-status)
Adjusting the workflow to use the test branch

You must define the following secrets for commits to work:

ACTION_PUSH_TOKEN
BUILD_USER
BUILD_USER_EMAIL

Without BUILD_USER and BUILD_USER_EMAIL, the commit step will fail.
Conclusion:
From my perspective, the implementation behaves correctly and is ready for review.

@AdemZarrouki AdemZarrouki moved this from Team Review to 👀 In review in IDEasy board Jun 9, 2026
@AdemZarrouki AdemZarrouki requested a review from hohwille June 19, 2026 07:15

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@AdemZarrouki thanks for your PR.
Are you aware that the existing code is not only writing the status.json files but also reading them and making choices depending on their content?
IMHO you are currently cloning both repos side-by-side and then running the UpdateInitiator that will not find any status.json without modifying the Java code when they get removed from the ide-urls repo.
I would have expected that you change the Java code to read and write the status.json files now from the separate directory.
If you rather want to do that in the workflow that may also be possible but then you also have to first delete all status.json files from ide-urls anfd then copy them from the new repo before you run the java code. After that you would then move them back and and ensure no status.json remains in ide-urls (what would automatically do the cleanup and delete all these files so we could avoid extra PRs for ide-urls).

However, things to consider:

  • Testing workflows is really hard and therefore we should prefer to do as much code in Java and as little in workflows
  • I would rather consider this rsync copying, etc. kind of hackish. In the end we have two git repos and a Java process to read and update the data and after that we want to push the changes. When you solve it in Java it IMHO becomes cleaner and the workflow stays shorter and easier to test and understand.

@AdemZarrouki

Copy link
Copy Markdown
Contributor Author

@hohwille thanks for the detailed review. So my idea was to avoid the java code change and do instead the changes in the workflow file as this requires less effort, and also i tried to test the workflow on a test branch many times to ensure that the changes are correct. So regarding this:

  • "you are currently cloning both repos side-by-side and then running the UpdateInitiator that will not find any status.json without modifying the Java code when they get removed from the ide-urls repo.", yes it will not find any status.json files and it will creates new ones and then checks if they exist in ide-urls-status and if they are up-to-date (timestamp).
  • "If you rather want to do that in the workflow that may also be possible but then you also have to first delete all status.json files from ide-urls anfd then copy them from the new repo before you run the java code" I did a test for this scenario by keeping the status.json files in both repos (https://github.com/AdemZarrouki/IDEasy/actions/runs/28010606987/job/82902658625) and as we can see that status.json were in ide-urls-status updated, and the ones in ide-urls were not.

But if you prefer to change the code so that UpdateInitiator accepts both ide-urls and ide-urls-status, we can do that.

@AdemZarrouki AdemZarrouki requested a review from hohwille June 25, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

urls ide-urls repo and related processes and features workflow GitHub actions (CI,CD,update urls/CVEs)

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Move status.json files out of ide-urls to own repo

4 participants