-
Notifications
You must be signed in to change notification settings - Fork 870
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
[enhancement]: Support Sparse Checkout #4325
Comments
Hi @bdovaz thanks for the reporting! We're currently working on higher priority issues, but we'll get back this this one soon. |
Note that the |
This issue has had no activity in 180 days. Please comment if it is not actually stale |
No stale |
|
Although it is an improvement, it has nothing to do with the purpose of this issue. The big improvement would be that at a high level through the |
any way to bump priority on this one? monorepos consume agent time uselessly doing full checkouts... |
I proposed this one |
If anyone is interested, I wrote the sparse checkout as a template, which can then be used as follows:
with the template
|
There is no documentation for this feature yet? |
docs would be really helpful |
so, trying to use this in azure devops gives me:
and another could it be that azure devops still needs an update before this is supported? |
ADO has exactly two syntaxes, the less familiar one is working right know in
variables:
- name: AGENT_USE_SPARSE_CHECKOUT_IN_CHECKOUT_TASK
value: true
steps:
- task: 6d15af64-176c-496d-b583-fd2ae21d4df4@1
inputs:
sparseCheckoutDirectories: .vscode
repository: self
- script: ls -la If you need You would see the git sparse commands in the shell. * branch 6ccd4af5a724d5b17713a6280806877f23a8fabe -> FETCH_HEAD
git sparse-checkout init --cone
git sparse-checkout set .vscode
git checkout --progress --force refs/remotes/origin/6ccd4af5a724d5b17713a6280806877f23a8fabe |
@bdovaz documentation is out of my hands but it is in the works |
@PaulVrugt there was a holiday deployment freeze but it has ended now and we will be continuing rollout on the ADO side |
It's good to finally have it! I'm still waiting until it's documented before I show it to my teams. Is there an issue (or anything else that may be tracked) on the docs side? |
How to set the agent knob when using the managed agent? |
@arielmoraes if you really need the knob do this like (this worked a long time ago #4325 (comment) on hosted agents (managed agent could be the same)) variables:
- name: AGENT_USE_SPARSE_CHECKOUT_IN_CHECKOUT_TASK
value: true Some knobs are setable from variables, others as env variable Or did you try this already? |
@ChristopherHX yes, I've tried that, but it seems we can't change system variables:
|
@arielmoraes Are you trying to use this command https://learn.microsoft.com/en-us/azure/devops/pipelines/process/set-variables-scripts?view=azure-devops&tabs=bash? Then this is your problem This only works in the pipeline yaml file in the declarative Initialize job should show the value e.g. ![]() There is no message like you get. If not I have honestly no idea, then is your azurepipelines deployment different than mine, I'm using a |
@ChristopherHX yes I'm using the variables block, are you using a Microsoft hosted agent or self hosted? |
I don't know how you are managing to change the variable because the documentation clearly states Predefined variables are readonly and can't be changed, with the exception of Build.Clean and System.Debug. https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml EDIT: Turns out the variable is already set to true without any variables, but the checkout task is not working. |
Microsoft hosted agent Ok since for me AGENT_USE_SPARSE_CHECKOUT_IN_CHECKOUT_TASK is not present by default, you have a newer deployment that I have in my instance.
I guess if this is the case, report it as new issue in this repo with the log attached |
Describe your feature request here
For monorepo repositories this is a must to be able to speed up builds as much as possible.
I see that this very thing has been recently merged by @dscho into the GitHub checkout action: actions/checkout#1369
Would this same functionality be possible in azure pipelines?
Thanks!
The text was updated successfully, but these errors were encountered: