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

[RFC]: Export all fields in Lage Info #815

Open
dannyvv opened this issue Nov 7, 2024 · 0 comments
Open

[RFC]: Export all fields in Lage Info #815

dannyvv opened this issue Nov 7, 2024 · 0 comments
Assignees

Comments

@dannyvv
Copy link
Member

dannyvv commented Nov 7, 2024

This RFC is part of a larger work proposal: #814
PR: #836

Overview

Running lage info does not emit all information available in the build graph.
It should include inputs, outputs, 'weight' as well as the options field.
This can be 'fed' into the other build engines to do the proper scheduling. The 'options' field can be used for build engine specific fields.
For example in BuildXL you generally want to treat cache location either as 'temp' folders or if you trust the tools incrementality to ship your production bits as an 'untracked' directory. This might not be relevant to Lage itself or to other build engines so it makes sense to store in the 'options' field.

Current users of BuildXL + Lage currently declare this information in custom configuraiton files. Either in bxlconfig.json file that the custom integratoin picks up or in the buildxl config.dsc file. This feature will give it the opportunity to be declared in lage and used identically by all. It should also improve lages performance when users run it outside of buildxl since the inputs / outputs will be less than the defaults for targes.

Detailed Design

We'll extend the PackageTask interface in packages/cli/src/commands/info/action.ts
In generatePackageTask we'll copy the fields as-is from the Target object.

weight

This will add the 'weight' field only if the value is not 1.

inputs, outputs

This will emit inputs and outputs as an array of strings.

options

This object will be printed just as-is and support any types json supports

Test Plan

Create a new test class and write some tests.

Performance, Resilience, Monitoring

The output json will increase a bit in size, but this should not affect things too much.
It will also only affect perf if if these fields are declared. All the current users of BuildXL integration do not yet specify any of these fields, so it should have no impact

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

No branches or pull requests

2 participants