Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"bob dev" does not work intuitively with binary artifacts when source comes from tags/commits #106

Closed
jkloetzke opened this issue Jan 23, 2017 · 0 comments
Labels

Comments

@jkloetzke
Copy link
Member

When working with "bob dev" the developer expects to be able to change any of the involved sources, call bob again and it will rebuild with the changes. If binary artifacts are used and the sources are deterministic this is not true anymore. The problem is that Bob treats deterministic sources different. For these the actual sources are irrelevant and the binary artifact is downloaded just by looking at the configured tag/commit.

Steps to reproduce with bob-tutorials/binary-repository:

  1. bob build --upload root
  2. bob dev root/lib/
  3. echo "#error" >> dev/src/lib/1/workspace/lib.c
  4. bob dev --download=yes root/

Instead of tripping over the #error Bob will happily download the artifact for "root":

$ bob dev --download=yes root/
>> root
   DOWNLOAD  dev/dist/root/1/workspace...ok
Build result is in dev/dist/root/1/workspace

Possible fixes:

  1. Don't treat tags/commit special
    This will always checkout all involved sources first, create a hash sum and use that as the access key for the binary artifact. This is already the behavior for checkouts from branches.
    • Pro: consistent definition, will remove special handling of tags/commits, make download decision stateless
    • Con: will download all sources even if not strictly needed, more overhead when building a large tagged software
  2. Use current handling of tags/commits and verify that sources are unchanged
    For packages that have their sources checked out it is verified that they were not modified by the user. This validates that the downloaded artifact can be used.
    • Pro: old artifacts are compatible, release mode could stay fast
    • Con: complicated to implement and complicated semantics, download artifacts may be thrown away, requires audit trail
  3. Use two build-ids, one for special handling and one for full source hashes
    In release mode Bob could use the current defintion to download artifacts as early as possible. In develop mode Bob could use the source-based build-id to behave like in 1.
    • Pro: Optimal behavior in develop/release mode
    • Con: requires double uploads or symlinks (not possible with webdav), breaks all archive backends, special handling just for release builds from tags
@jkloetzke jkloetzke added the bug label Jan 23, 2017
jkloetzke added a commit to jkloetzke/bob that referenced this issue Feb 5, 2017
When working with "bob dev" the developer expects to be able to change
any of the involved sources, call bob again and it will rebuild with the
changes. If binary artifacts are used and the sources are deterministic
this was not true anymore. The problem was that Bob treated
deterministic sources different. For these the actual sources were
irrelevant and the binary artifact was downloaded just by looking at the
configured tag/commit.

Starting with this commit Bob doesn't treat tags/commit special anymore.
Bob will always checkout all involved sources first, create a hash sum
and use that as the access key for the binary artifact. This has already
been the behavior for checkouts from branches.

As this changes the calculation of the build-id any artifacts that were
built from tags will be incompatible with previous versions of Bob.

Fixes BobBuildTool#106.
jkloetzke added a commit to jkloetzke/bob that referenced this issue Feb 6, 2017
When working with "bob dev" the developer expects to be able to change
any of the involved sources, call bob again and it will rebuild with the
changes. If binary artifacts are used and the sources are deterministic
this was not true anymore. The problem was that Bob treated
deterministic sources different. For these the actual sources were
irrelevant and the binary artifact was downloaded just by looking at the
configured tag/commit.

Starting with this commit Bob doesn't treat tags/commit special anymore.
Bob will always checkout all involved sources first, create a hash sum
and use that as the access key for the binary artifact. This has already
been the behavior for checkouts from branches.

As this changes the calculation of the build-id any artifacts that were
built from tags will be incompatible with previous versions of Bob.

Fixes BobBuildTool#106.
jkloetzke added a commit to jkloetzke/bob that referenced this issue Feb 10, 2017
When working with "bob dev" the developer expects to be able to change
any of the involved sources, call bob again and it will rebuild with the
changes. If binary artifacts are used and the sources are deterministic
this was not true anymore. The problem was that Bob treated
deterministic sources different. For these the actual sources were
irrelevant and the binary artifact was downloaded just by looking at the
configured tag/commit.

Starting with this commit Bob doesn't treat tags/commit special anymore.
Bob will always checkout all involved sources first, create a hash sum
and use that as the access key for the binary artifact. This has already
been the behavior for checkouts from branches.

As this changes the calculation of the build-id any artifacts that were
built from tags will be incompatible with previous versions of Bob.

Fixes BobBuildTool#106.
jkloetzke added a commit to jkloetzke/bob that referenced this issue Feb 12, 2017
When working with "bob dev" the developer expects to be able to change
any of the involved sources, call bob again and it will rebuild with the
changes. If binary artifacts are used and the sources are deterministic
this was not true anymore. The problem was that Bob treated
deterministic sources different. For these the actual sources were
irrelevant and the binary artifact was downloaded just by looking at the
configured tag/commit.

Starting with this commit Bob doesn't treat tags/commit special anymore.
Bob will always checkout all involved sources first, create a hash sum
and use that as the access key for the binary artifact. This has already
been the behavior for checkouts from branches.

As this changes the calculation of the build-id any artifacts that were
built from tags will be incompatible with previous versions of Bob.

Fixes BobBuildTool#106.
jkloetzke added a commit that referenced this issue Feb 13, 2017
rhubert pushed a commit to rhubert/bob that referenced this issue Feb 14, 2017
When working with "bob dev" the developer expects to be able to change
any of the involved sources, call bob again and it will rebuild with the
changes. If binary artifacts are used and the sources are deterministic
this was not true anymore. The problem was that Bob treated
deterministic sources different. For these the actual sources were
irrelevant and the binary artifact was downloaded just by looking at the
configured tag/commit.

Starting with this commit Bob doesn't treat tags/commit special anymore.
Bob will always checkout all involved sources first, create a hash sum
and use that as the access key for the binary artifact. This has already
been the behavior for checkouts from branches.

As this changes the calculation of the build-id any artifacts that were
built from tags will be incompatible with previous versions of Bob.

Fixes BobBuildTool#106.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant