Skip to content

Integrate changes into a release build workspace#68

Open
abinjose-qualcomm wants to merge 3 commits intoqualcomm-linux:mainfrom
abinjose-qualcomm:workspace-setup-with-prs
Open

Integrate changes into a release build workspace#68
abinjose-qualcomm wants to merge 3 commits intoqualcomm-linux:mainfrom
abinjose-qualcomm:workspace-setup-with-prs

Conversation

@abinjose-qualcomm
Copy link
Contributor

Problem Statement

For every meta-qcom release, a lock file is generated which locks the commits for all the meta layers used in the build. This lock file is used in the build steps to checkout and lock your layers to specific commits. This works well when you need to reproduce a build exactly.

This doesn't work well when you need to apply any changes on top of your release tag.

Applying your changes locally and updating the lock file doesn't work, since the kas lock file validates if the required commit is available on the remote server. One way to circumvent this issue is to apply the --skip repos_checkout option in the kas commands.

Proposed Solution

Fork the meta-qcom and meta-qcom-releases repositories and make changes on top of it.

  • Fork or create a copy of meta-qcom
  • Apply any required patches and push the branch to your fork of meta-qcom.
  • Fork or create a copy of meta-qcom-releases. In your copy, update the attributes for meta-qcom:
    • Update the URL to point to the forked URL
    • Update the commit SHA to include your applied changes
    • Update the correct branch
  • Builds should work with the same workflow documented in the build guide.
git clone https://github.com/<user>/meta-qcom-releases-fork

kas checkout meta-qcom-releases-fork/lock.yml

cp meta-qcom-releases-fork/lock.yml meta-qcom/ci/

kas build meta-qcom/ci/<machine.yml>:meta-qcom/ci/<distro.yml>:meta-qcom/ci/lock.yml

This method is more inline with the standard GitHub fork‑and‑update workflow that most developers are accustomed to.

One recommendation to apply PRs in a release build workspace was
to pull the changes locally and update the merged commit SHA in the
kas lock file.

In extended testing, it was found that this approach doesn't always
work. kas validates if the commit recorded in the lock file is available
on the remote repository, which fails since the merged commits are only
available locally.

Signed-off-by: Abin Joseph <abinjose@qti.qualcomm.com>
When a pull request is integrated into a tagged release using
git merge, it may bring in extra commits beyond those intended
for the change.

To apply only the specific commits associated with the change,
use git cherry-pick instead. This ensures that only the intended
modifications are included.

Signed-off-by: Abin Joseph <abinjose@qti.qualcomm.com>
Patches can be applied in a release build workspace
and integrated by using the `--skip repos_checkout` flag
in the kas commands. This may not be ideal since if the
--skip repos_checkout flag is missed, it may mess up the
workspace.

Instead, we can leverage the concept of forks to integrate
changes remotely and follow the same steps as the default
workflow.

Signed-off-by: Abin Joseph <abinjose@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant