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

Output build artifacts so that Builds can reliably be repeated #52

Closed
deldrid1 opened this issue Feb 9, 2019 · 9 comments
Closed

Output build artifacts so that Builds can reliably be repeated #52

deldrid1 opened this issue Feb 9, 2019 · 9 comments

Comments

@deldrid1
Copy link

deldrid1 commented Feb 9, 2019

One of our issues with using Builder for production with remote includes has been getting a repository back to the exact same state that it was in originally, in order to be able to reproduce "distribution" code (i.e. agent.nut/device.nut) from source so that we can then bug fix.

The @include's in source code act similar to an npm package.json or cocoapods Podfile. However, to get to repeatable builds, it would also be useful to have the equivalent of a package-lock.json or Podfile.lock, especially when (lazily) referencing remote repos without specific commit SHAs or when using custom builder directives.

I'd like to suggest that Builder produce some optional build artifacts. Specifically, I'd like a dependencies.json and a directives.json to be emittable from the tool.

dependencies.json is the more complicated of the two - basically, it would produce a hierarchy similar to a lock file and would use specific git SHA's for all remote includes (as opposed to #master, #develop, etc). Builder would also need to be able to ingest this file and leverage its mapping over the #master/#develop things that it might encounter when attempting to rebuild code many months or years later (when #master/#develop has inevitably been updated with several breaking changes).

directives.json should be pretty straight forward - it would contain all of the builder variables that were used at build time.

@deldrid1
Copy link
Author

deldrid1 commented Feb 9, 2019

@ppetrosh - thoughts?

@ppetrosh
Copy link
Contributor

Yes, makes sense. Agree that would be nice to have.

@deldrid1
Copy link
Author

Is this something that imp would consider doing the development on?

Or could you at least point me to the right files/place to inject this kind of functionality? Is there any kind of design documentation that walks through the builder source code at 10,000 foot level?

@ppetrosh ppetrosh self-assigned this Feb 14, 2019
@ppetrosh
Copy link
Contributor

Unfortunately, there is no design documentation other than the source code ) But let us look into this.

@ppetrosh
Copy link
Contributor

One quick question. How would you define version or guarantee a repeatable build for a resource, that's available over http? So I believe this is only feasible and specific for github resources.

@deldrid1
Copy link
Author

Tagged git repos (whether Github or Bitbucket - see #43) are really the only things I care about so I’d be fine with that for my use case

@ppetrosh
Copy link
Contributor

ppetrosh commented Feb 15, 2019

@deldrid1 then I believe it should be a github and bitbucket specific dependency files with versions of all the components listed. Will it be enough to generate this file.

Or you also want it to be "replayable" (via an option to specify the dependencies)? In this case, anything not listed in the dependency file will use the latest version available from the VCS.

@deldrid1
Copy link
Author

Yes I would be fine with that approach as well.

@FedorUporov FedorUporov mentioned this issue Apr 14, 2019
@betzrhodes betzrhodes mentioned this issue Apr 16, 2019
@betzrhodes
Copy link

fixed in release v2.7.0

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

No branches or pull requests

3 participants