autosarzs / Dev

Development AUTOSAR
Mozilla Public License 2.0
52 stars 19 forks source link

[Feature Request]: Implement Version Synchronization Mechanism for DevContainer Users #101

Open autosarzs opened 6 months ago

autosarzs commented 6 months ago

Contact Details

autosarzs

Description:

Issue Overview: After updating the DevContainer, users who utilize the DevContainer on their local machines will need to rebuild the image to access the latest changes. However, they may find themselves using features or dependencies that require a newer version of the DevContainer, leading to potential compatibility issues.

Proposed Solution: To address this issue, we propose implementing a version synchronization mechanism that ensures users are using the correct version of the DevContainer corresponding to the main branch. This involves:

  1. Embedding the DevContainer version information into the Docker image during the build process.
  2. Updating a version identifier in a centralized location (e.g., a Makefile variable or another file in the repository) to match the current DevContainer version.
  3. Implementing logic in the Makefile or relevant scripts to compare the version of the locally used DevContainer with the version specified in the repository.
  4. Enforcing restrictions on users' ability to call targets from the main file if their local DevContainer version differs from the specified version in the repository.

Implementation Steps:

  1. Modify the DevContainer build process to include version information in the Docker image.
  2. Update the Makefile or relevant configuration files to track the current DevContainer version.
  3. Implement version comparison logic in the Makefile or relevant scripts to prevent users from accessing main targets with an outdated DevContainer version.
  4. Provide clear documentation and instructions for users on how to rebuild their DevContainer image to synchronize with the main branch.

Expected Outcome: By implementing this version synchronization mechanism, we ensure that users are using the appropriate version of the DevContainer corresponding to the main branch, thereby minimizing compatibility issues and ensuring a consistent development environment.