Skip to contentSkip to conversation

doc: Document challenges of tags with git fetcher

PATCH In review Richard Purdie 2 participants 2 messages Sep 4, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 doc: Document challenges of tags with git fetcher

Using tags with the git fetcher may cause surprising behaviour. There are reasons for this, document them.

---
v2 - add tweaks requested in review

 doc/bitbake-user-manual/bitbake-user-manual-fetching.rst | 8 ++++++++
 1 file changed, 8 insertions(+)
doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +8 -0
index f5723d6767..dc125509ff 100644
@@ -476,6 +476,14 @@ Here are some example URLs::
    easy to share metadata without removing passwords. SSH keys, ``~/.netrc``
    and ``~/.ssh/config`` files can be used as alternatives.
 
+Using tags with the git fetcher may cause surprising behaviour. Bitbake needs to
+resolve the tag to a specific revision and to do that, it has to connect to and use
+the upstream repository. This is because the revision tags point at can change and
+we've seen cases of this happening in well known public repositories. This can mean
+many more network connections than expected and recipes may reparsed at every build.
+Source mirrors will also be bypassed as the upstream repository is the only source
+of truth to resolve the revision accurately. For these reasons, whilst the fetcher
+can support tags, we recommend being specific about revisions in recipes.
 
 .. _gitsm-fetcher:
 
Signature · 1 line
2.39.2
#1 lore raw
Quoted 26 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Richard Purdie
Sent: den 4 september 2023 11:24
To: [email protected]
Subject: [bitbake-devel] [PATCH v2] doc: Document challenges of tags with git fetcher

Using tags with the git fetcher may cause surprising behaviour. There are reasons for this, document them.

---
v2 - add tweaks requested in review

 doc/bitbake-user-manual/bitbake-user-manual-fetching.rst | 8 ++++++++
 1 file changed, 8 insertions(+)
doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +0 -0
index f5723d6767..dc125509ff 100644
@@ -476,6 +476,14 @@ Here are some example URLs::
    easy to share metadata without removing passwords. SSH keys,

``~/.netrc``
and ``~/.ssh/config`` files can be used as alternatives.

doc/bitbake-user-manual/bitbake-user-manual-fetching.rst Here are some example URLs:: · line 481

Quoted 3 lines
doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +3 -0
+Using tags with the git fetcher may cause surprising behaviour. Bitbake needs to
+resolve the tag to a specific revision and to do that, it has to connect to and use
+the upstream repository. This is because the revision tags point at can change and

I suggest changing "the revision tags" to "the revision the tags" because the first time I read it, I read it as "revision tags" rather than "revision" "tags", which did not make any sense.

Quoted 1 line

+we've seen cases of this happening in well known public repositories. This can mean

"well known" -> "well-known".

Quoted 1 line

+many more network connections than expected and recipes may reparsed at every build.

"may reparsed" -> "may be reparsed"

Quoted 8 lines
doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +3 -1
+Source mirrors will also be bypassed as the upstream repository is the only source
+of truth to resolve the revision accurately. For these reasons, whilst the fetcher
+can support tags, we recommend being specific about revisions in recipes.
 
 .. _gitsm-fetcher:
 
--

2.39.2

//Peter