You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirmed this is an issue with charm-tools, not charmstore-client
Provide versions of tools used
Described the feature or ways to replicate the issue
What version am I running?
I ran the following command: snap info charm and got the following ouput:
charm-tools 2.8.3 from PyPi
I am using: Ubuntu 20.04
Issue/Feature
When a charm is rebuilt with --use-lock-file-branches it also uses the refs/heads/master branch rather than using the commit hash. This isn't really what is wanted, I'd hazard a guess (especially as I wrote the feature!)
The idea was that anything that was from a branch would track that branch, but that anything on the master (and I guess 'main') branch would be pinned to the commit hash. But that's not what happened.
I expect/expected the following
The master branch would be ignored, and it would select the commit hash.
What I got
It selects the master branch, rather than the commit hash.
Proposal
So the principle development branch for git is master (or more recently, also main). My proposal is to pick the commit hash if the branch in the build.lock file is refs/heads/master or refs/heads/main. This will then build the charm according to the stable branches and (if they are not available) commit hashes.
The text was updated successfully, but these errors were encountered:
When the --use-lock-file-branches option was used, several bugs were
discovered in more complicated charms.
* Using the master branch as a tracking branch was the wrong idea.
Instead, if the master branch is set in the lock file for a layer or
python module, then the commit hash is used instead. Use
--ignore-lock-file to be able to just use master branches. Bug juju#605
* Detection of branches from a repository is just not possible in
practice. So remove the feature and (for compatibility with the build
from 2.8.3 lockfiles) use the commit hash instead for the branch.
* For python modules use the revision, as detected by th revision-parser
module, as the locked revision.
When the --use-lock-file-branches option was used, several bugs were
discovered in more complicated charms.
* Using the master branch as a tracking branch was the wrong idea.
Instead, if the master branch is set in the lock file for a layer or
python module, then the commit hash is used instead. Use
--ignore-lock-file to be able to just use master branches. Bug juju#605
* Detection of branches from a repository is just not possible in
practice. So remove the feature and (for compatibility with the build
from 2.8.3 lockfiles) use the commit hash instead for the branch.
* For python modules use the revision, as detected by th revision-parser
module, as the locked revision.
Checklist
What version am I running?
I ran the following command:snap info charm
and got the following ouput:charm-tools 2.8.3 from PyPi
I am using: Ubuntu 20.04
Issue/Feature
When a charm is rebuilt with
--use-lock-file-branches
it also uses therefs/heads/master
branch rather than using the commit hash. This isn't really what is wanted, I'd hazard a guess (especially as I wrote the feature!)The idea was that anything that was from a branch would track that branch, but that anything on the master (and I guess 'main') branch would be pinned to the commit hash. But that's not what happened.
I expect/expected the following
The master branch would be ignored, and it would select the commit hash.
What I got
It selects the master branch, rather than the commit hash.
Proposal
So the principle development branch for git is
master
(or more recently, alsomain
). My proposal is to pick the commit hash if the branch in thebuild.lock
file isrefs/heads/master
orrefs/heads/main
. This will then build the charm according to the stable branches and (if they are not available) commit hashes.The text was updated successfully, but these errors were encountered: