Граф коммитов

7507 Коммитов

Автор SHA1 Сообщение Дата
Paul Ming 6618105705 Merged PR 793195: Bump CB.QTest to 24.6.26.153636
Bump CB.QTest to 24.6.26.153636

- Redact test JWTs in customer unit test failure messages

From https://mseng.visualstudio.com/Domino/_apps/hub/ms.vss-releaseManagement-web.cd-release-progress?_a=release-pipeline-progress&releaseId=392490
2024-07-02 18:04:16 +00:00
BuildXL-Pipelines c858c40358 Merge pull request 793069 from dev/BuildXL/updatepackages-2024-07-01T16-07-35 into main 2024-07-01 22:16:27 +00:00
Qi Wang 9faca185cb Merged PR 792409: Update Release note for 0.1.0-20240622.1
Update Release note for 0.1.0-20240622.1
2024-07-01 22:11:06 +00:00
BuildXL-Pipelines e31623fda1 Merge pull request 793161 from dev/BuildXL/updatelkg-0.1.0-20240628.1-2024-07-01T21-45-54 into main 2024-07-01 22:07:05 +00:00
BuildXL-Pipelines a72544834d Merge pull request 793068 from dev/BuildXL/updatenotice-2024-07-01T16-07-04 into main 2024-07-01 21:37:04 +00:00
Marcelo Lynch 🧉 697064e4aa Merged PR 792720: Disable flaky HistoricMetadataCacheTests.TestHistoricMetadataPathStringRoundtrip[
Related work items: #2191478
2024-06-28 23:32:00 +00:00
Pasindu Gunasekara 🍣 76568b3f21 Merged PR 790527: Add special handling for openat calls with the ptrace sandbox
- Adds a workaround for the following issue seen on ooui:
  - `error DX10105: [Pip62D946C910711FCE, !! ooui - @1js/excel-online [bundle]] PTraceRunner logged the following error: (relative_to_absolute) ['openat'] Could not get path for fd -1 with path ''; errno: 3`
  - Both path and dirfd are not set to proper values causing the crash.
- Adds a retry to ReadArgumentLong.

Related work items: #2171844
2024-06-27 22:08:31 +00:00
BuildXL-Pipelines 57c4c1db9a Merge pull request 791834 from dev/BuildXL/updatepackages-2024-06-24T16-08-30 into main 2024-06-27 18:29:22 +00:00
Michael Pysson 0c99477c88 Merged PR 791646: Spellcheck various docs
Spellcheck various docs
2024-06-26 21:52:30 +00:00
Oleksii Kononenko 004ded682e Merged PR 792194: Run CodeQL only in CodeQL pipeline and enable bug filing
Run CodeQL only in CodeQL pipeline and enable bug filing. In addition to this PR, a change was made to disable CodeQL in `RunCheckInTests BuildXL PR Validation` pipeline (it's not yaml-based)
2024-06-26 21:44:27 +00:00
Lance Collins d1d2aab47e Merged PR 791472: Pass pip semistable hash / step derived context id to cache operations.
Pass pip semistable hash / step derived context id to cache operations.

Related work items: #2191044
2024-06-26 21:35:44 +00:00
Emily Fischer 5aa3bec2c2 Merged PR 792127: Add Codesync Comment for Method Used in CloudBuild Repo
https://mseng.visualstudio.com/Domino/_git/CloudBuild?path=/private/Common/CloudBuild.Common.BxlUtils/src/BxlUtils.cs&version=GBmain&line=24&lineEnd=24&lineStartColumn=1&lineEndColumn=128&lineStyle=plain&_a=contents
2024-06-26 18:33:50 +00:00
Marcelo Lynch 🧉 f808e3de2f Merged PR 791433: Filter out directory writes for observations passed to ObservedInputProcessor
We shouldn't process writes in ObservedInputProcessor (OIP shouldn't process writes, only "inputs"), so we should exclude these accesses from the list that we then process. Before this change, observations such as these were subsequently treated as probes by the OIP, and considering such probes in the fingerprint computation could cause spurious cache misses (in particular this happened while working on an orthogonal feature to consider directory probes a bit more carefully).

This change also moves the logic adding the created directories to the `createdDirectoriesMutable` collection so the paths are added before being filtered out (excluded) from the collection of observations.
2024-06-26 18:17:18 +00:00
Serge Mera 2da7356fcb Merged PR 791949: [JavaScript] Fix race when adding spec file pip
The check for unique specs when adding JS pips had a potential race (even though a concurrent collection is used, the actual spec pip addition was happening outside a lock)

Related work items: #2189126
2024-06-26 01:18:06 +00:00
Julian Bayardo a96bf625c7 Merged PR 791883: Turn gRPC encryption errors into warnings to prevent misleading error logs
Turn gRPC encryption errors into warnings to prevent misleading error logs
2024-06-24 20:37:59 +00:00
BuildXL-Pipelines abec3c6434 Merge pull request 791842 from dev/BuildXL/updatelkg-0.1.0-20240622.1-2024-06-24T16-42-40 into main 2024-06-24 18:36:55 +00:00
Serge Mera 042e86d47e Merged PR 790969: [Linux sandbox] More robust treatment for missing process start events
Make the interpose sandbox more robust on missing process start events. This applies in particular to clone3, which cannot be interposed by design.
* Interpose sandbox starts populating the parent id for every access (before this change it was being sent already but it was always 0)
* When an access for which we haven't seen a process start events arrives, we use the parent process to retrieve the path and arguments. On Linux, clone/fork doesn't alter that, so this assumption is safe.
* If we haven't heard from the parent, we keep track of this process until we heard from it as the callstack unfolds.

A couple other details:
* FailFast is now enabled on the action blocks. We always want unhandled exceptions to propagate and crash bxl
* We now make sure to always have one instance of each active process id around. This avoids duplicate reports (we report process start on the parent and the child). Some test counters had to be updated because of this. The main advantage is that now whenever we have to update the path & args of a process because we see an exec() coming, we only have to update one instance. Before we were only updating the 'first one', leaving subsequent process starts with the same pid with the wrong path

Related work items: #2172444
2024-06-24 17:01:30 +00:00
Semih Okur 95a9823dbd Merged PR 790519: Log an inactive orchestrator error only if there is no exit message from the orchestrator
The worker crashes due to an error event and a success result (ValidateSuccess assertion failure). When there is a connection issue with the orchestrator, the OnConnectionFailure event handler is triggered on the worker. However, it simultaneously receives an Exit message from the orchestrator. Therefore, we now only log an error if the exit was not previously triggered.

An example build (https://cloudbuild.microsoft.com/build/18e62434-6d8f-cedf-37dd-68d9e6af1c74)

[12:05.527] [08:05:28.55 UTC] verbose DX7047: Connection with orchestrator timed out. Details: Timed out on a call to the worker. Assuming the worker is dead. Call timeout: 5 min. Retries: 2.

[18:42.912] [08:12:05.93 UTC] error DX7004: There were no calls from orchestrator in the last 10 minutes. Assuming it is dead and exiting.

[22:20.792] critical DX0059: Catastrophic BuildXL Failure.
Build:[0.1.0-20240531.3.1][refs/heads/releases/0.1.0-20240531.3.1:6227578178e15e04f42f6ebf33dbef0ab1a5da4e].
Exception:BuildXL.Utilities.Core.BuildXLException: No error should be logged if status is success. Errors logged: 7004

Related work items: #2172783
2024-06-22 01:06:16 +00:00
Michael Pysson 03790759a1 Merged PR 791466: Update PublishSymbols pool to BuildXL-DevOpsAgents-Selfhost 2024-06-22 00:12:10 +00:00
Michael Pysson 2ed67742a8 Merged PR 791428: Update release notes for 20240614.2
Update release notes for 20240614.2
2024-06-20 20:47:22 +00:00
Sahiti Chandramouli 59e70b0f97 Merged PR 791180: Refactor and fix capture build properties for org and codebase for Reliability dashboard
Refactor and fix capture build properties for org and codebase for Reliability dashboard.
Most of the URL's in Reliability dashboard are of the format - dev.azure.com and visualstudio.com
So I reused the existing code to normalize gitRemoteRepoUrl's/
Added few test cases to test these scenarios.

Related work items: #2188136
2024-06-20 20:43:23 +00:00
Lance Collins 58b1da4eea Merged PR 791220: Fix path remapping for FrontEndConfiguration.
Fix path remapping for FrontEndConfiguration.
2024-06-20 20:43:15 +00:00
Serge Mera c2386fa124 Merged PR 791355: [Linux sandbox]Fix use of secondary pipe
In the latest refactor we started to not use the secondary pipe altogether
2024-06-20 17:41:07 +00:00
Marcelo Lynch 🧉 4992400b64 Merged PR 790986: Remove incorrect reclassification of probes of statically declared outputs under shared opaques 2024-06-19 23:33:09 +00:00
Serge Mera 9fb1d409e9 Merged PR 791167: [Linux sandbox] Pending report queue is not a single writer one
When the ptrace sandbox is active, we have two concurrent processing blocks sending messages to the pending report queue. That means the queue cannot guarantee single writer.
2024-06-19 20:44:18 +00:00
Oleksii Kononenko 8d241ddceb Merged PR 790980: Make job name configurable in CodeQL pipeline
Make job name configurable in CodeQL pipeline
2024-06-18 23:23:12 +00:00
Semih Okur 6b53c907b1 Merged PR 790910: Add BuildXLInfo and BuildXLPerfInfo 2024-06-18 21:34:44 +00:00
BuildXL-Pipelines bf02bbac93 Merge pull request 790610 from dev/BuildXL/updatenotice-2024-06-17T16-08-15 into main 2024-06-17 20:00:35 +00:00
Pasindu Gunasekara 🍣 59b8cc0979 Merged PR 790523: Clean up IOHandler/AccessHandler code from MacOS Sandbox
- Reintroduces !785928
- Removes dependency on IOHandler/AccessHandler from macOS code.
- Clean up file operations from native sandbox to remove macos specific ones.
- Remove duplicate operations in ReportedFileOperation.
- Report exec calls separately from forks (using the ProcessExec report type), and update exe and command line on tracked process objects on the managed code.
- Update report format, and allow for different report types on the Linux sandbox.
- Report parent process pid on sandbox reports.
- Rename MacLookup to AbsentProbe
- Updates SandboxEvent type to contain everything required for an access report including the access check result.
- Adds a report builder class that is responsible for building the report string to be returned to the managed side.
- Removes old ES_EVENT_* constants and replaces them with buildxl::linux::EventType

Related work items: #2111125
2024-06-17 19:20:29 +00:00
Sahiti Chandramouli 73e21dee47 Merged PR 788089: Refactor HistoricMetadataCache to handle the lack of this feature in BlobL3 topology.
Refactor HistoricMetadata cache - Compensate for BlobL3 topology not having HistoricMetadataCache

Separated the functionality currently present in HistoricMetadataCache class into two classes - **HistoricMetadataHashLookupManager.cs**
    - This class extends the functionality of PipTwoPhaseCache by incorporating hash-to-hash lookup capabilities.

 **HistoricMetadataCache.cs**
  - This class extends the functionality of HistoricMetadataHashLookupManager class by incorporating the metadata querying functionality.

Added this Counter to ensure that we use HMD for H2H lookup
**InternalHashToHashHistoricMetadataCacheReadCount**

Attached are test results
[blobll3 (2).xlsx](https://dev.azure.com/mseng/9ed2c125-1cd5-4a17-886b-9d267f3a5fab/_apis/git/repositories/50d331c7-ea65-45eb-833f-0303c6c2387e/pullRequests/788089/attachments/blobll3%20%282%29.xlsx)

Related work items: #2175115
2024-06-17 17:32:47 +00:00
BuildXL-Pipelines 310eeddeea Merge pull request 790632 from dev/BuildXL/updatelkg-0.1.0-20240614.2-2024-06-17T16-56-39 into main 2024-06-17 17:23:24 +00:00
BuildXL-Pipelines 19b6becda7 Merge pull request 790612 from dev/BuildXL/updatepackages-2024-06-17T16-08-52 into main 2024-06-17 16:54:54 +00:00
Oleksii Kononenko f3a887f4b6 Merged PR 789696: Update codeql config
Update codeql config to exclude tools / repos that are external to us.
2024-06-14 19:37:08 +00:00
Oleksii Kononenko 881c7e71fe Merged PR 789955: Update release notes
Update release notes
2024-06-14 02:26:54 +00:00
Julian Bayardo 16876741d5 Merged PR 789150: Address minor issue when creating machine locations 2024-06-13 20:42:44 +00:00
Sahiti Chandramouli fb90bfe823 Merged PR 789674: Fix RegexPathMatch for path prefixes in Windows
Adding back this PR with a small fix.
https://dev.azure.com/mseng/Domino/_git/BuildXL.Internal/pullrequest/784626

As per the current PR. We first check if there is a match with the Windows Prefix if not we remove the prefix and then match it again to see if there is a match.

The first test case in the newly added unit test validates the change
 [InlineData(@"^\\\\\?\\.*", @"\\?\c:\foo\bar\file.txt", true)]

Related work items: #2165593
2024-06-13 19:17:41 +00:00
Serge Mera 6fb92e4b1b Merged PR 789992: Do not throttle stdout/err materialization
We are seeing some 1JS builds that spend a quite amount of time in ReplayWarningsFromCacheAsync (some up to 20 minutes) due to waiting for stderr/out to materialization semaphore. Make those materialization requests so they don't need to acquire the materialization semaphore. These are always 2 materialization requests per pip (so in terms of throttling they should be negligible), but at the same time this step is blocking the scheduler.

A more comprehensive change should include regular input/output materialization, such that we have some sort of distinct queues/priority queues for those. But that's a bigger change to make.
2024-06-13 15:38:45 +00:00
Oleksii Kononenko 9412cd9a1e Merged PR 789960: Fix TestFileAccessAllowListSerialization when it's executed under Net7
Fix TestFileAccessAllowListSerialization when it's executed under Net7
2024-06-12 21:10:40 +00:00
Pasindu Gunasekara 🍣 0ce0813c5d Merged PR 789693: Deploy Node to a stable path under out directory
- Set up to help with NI issues on cloudbuild
2024-06-12 17:11:11 +00:00
Pasindu Gunasekara 🍣 e10c221375 Merged PR 789853: Revert 'Clean up IOHandler/AccessHandler code from MacOS Sandbox'
- Removes dependency on IOHandler/AccessHandler from macOS code.
- Clean up file operations from native sandbox to remove macos specific ones.
- Remove duplicate operations in ReportedFileOperation.
- Report exec calls separately from forks (using the ProcessExec report type), and update exe and command line on tracked process objects on the managed code.
- Update report format, and allow for different report types on the Linux sandbox.
- Report parent process pid on sandbox reports.
- Rename MacLookup to AbsentProbe
- Updates SandboxEvent type to contain everything required for an access report including the access check result.
- Adds a report builder class that is responsible for building the report string to be returned to the managed side.
- Removes old ES_EVENT_* constants and replaces them with buildxl::linux::EventType

Reverts !785928
2024-06-12 16:39:53 +00:00
Oleksii Kononenko 073cb4e19b Merged PR 788555: Better handling of allow lists during config serialization
Better handling of allow lists during config serialization

Related work items: #2183942
2024-06-12 00:25:32 +00:00
Pasindu Gunasekara 🍣 34fbb596c8 Merged PR 785928: Clean up IOHandler/AccessHandler code from MacOS Sandbox
- Removes dependency on IOHandler/AccessHandler from macOS code.
- Clean up file operations from native sandbox to remove macos specific ones.
- Remove duplicate operations in ReportedFileOperation.
- Report exec calls separately from forks (using the ProcessExec report type), and update exe and command line on tracked process objects on the managed code.
- Update report format, and allow for different report types on the Linux sandbox.
- Report parent process pid on sandbox reports.
- Rename MacLookup to AbsentProbe
- Updates SandboxEvent type to contain everything required for an access report including the access check result.
- Adds a report builder class that is responsible for building the report string to be returned to the managed side.
- Removes old ES_EVENT_* constants and replaces them with buildxl::linux::EventType
2024-06-11 23:02:03 +00:00
Marcelo Lynch 🧉 891ddf5cb5 Merged PR 784812: Add a DebugTrace struct for collecting extra logs in investigations, and add some of this tracing to ObservedInputProcessor
The point of this abstraction is to to provide a way to add debugging capabilities throughout the code that will have minimal overhead when in a 'disabled' state. This way, consumers only need to worry about this "construction" time  (typically, using an optional setting to enable the debugging in that particular section of the code), and can add arbitrary debugging  lines in the rest of the logic without worrying about impacting builds that are not meant to be observed with the extra logging. This is achieved by using a custom InterpolatedStringHandler, which will only construct the interpolated strings when the debugging is enabled.

I ran a Benchmark.NET that does some random processing of a bunch of strings:
```cs
int containsA = 0, randomCondition = 0;
// myGuidStrings contains 5000 guids as strings
for (int i = 0; i < myGuidStrings.Count; i++)
{
        using var trace = new DebugTrace(enabled);
	trace.AppendLine("Starting processing");
	var s = myGuidStrings[i];
	var someRandomCondition = s.Contains("a477");
	trace.AppendLine($"Condition: {someRandomCondition}");
	if (someRandomCondition){
		randomCondition++;
	}
	var splits = s.Split("8");
	foreach (var ss in splits)
	{
		trace.AppendLine($"split {ss}");
		if (ss.Contains('a'))
		{
			trace.AppendLine("split contains a");
			containsA++;
		}
	}

	diag = trace.ToString();
}
```

The benchmark runs with

```
(1) Enabled:  Constructing DebugTrace with enabled = true
(2) Disabled: Constructing DebugTrace with enabled = false
(3) NoTrace:  DebugTrace stripped from the code (not using it at all)
```

With 5000 strings:
```
| Method   | Mean       | Error    | StdDev  | Gen0     | Allocated  |
|--------- |-----------:|---------:|--------:|---------:|-----------:|
| Enabled  | 2,976.2 us | 11.27 us | 9.99 us | 203.1250 | 3344.74 KB |
| Disabled |   888.7 us |  3.68 us | 3.26 us |  52.7344 |  868.15 KB |
| NoTrace  |   872.0 us |  3.05 us | 2.85 us |  52.7344 |  868.98 KB |
```

With 100,000 strings:

```
| Method   | Mean     | Error    | StdDev   | Gen0      | Allocated |
|--------- |---------:|---------:|---------:|----------:|----------:|
| Enabled  | 63.15 ms | 0.323 ms | 0.302 ms | 4000.0000 |  65.44 MB |
| Disabled | 19.30 ms | 0.224 ms | 0.209 ms | 1062.5000 |     17 MB |
| NoTrace  | 17.70 ms | 0.133 ms | 0.124 ms | 1062.5000 |  17.03 MB |
```

Comparing `Disabled` and `NoTrace` shows that having this code in the "disabled" state has practically no overhead (consider that for the benchmark, like ~half the operations are on the DebugTrace object), and no extra allocations.
2024-06-11 22:42:37 +00:00
BuildXL-Pipelines 346431fc21 Merge pull request 789632 from dev/BuildXL/updatelkg-0.1.0-20240606.3-2024-06-11T18-41-27 into main 2024-06-11 19:42:46 +00:00
BuildXL-Pipelines b25fcb2ec4 Merge pull request 789324 from dev/BuildXL/updatepackages-2024-06-10T16-08-04 into main 2024-06-11 19:42:08 +00:00
BuildXL-Pipelines 4199453034 Merged PR 789326: Update NOTICE.txt
[skip ci]
2024-06-11 19:42:01 +00:00
Julian Bayardo b7fb836218 Merged PR 789619: Stop GC from deleting containers on which we have no information 2024-06-11 18:45:25 +00:00
Julian Bayardo 2ef21fda45 Merged PR 789446: Further reduce the number of ETag changes on hard touches 2024-06-11 18:31:42 +00:00
Meera Ruxmohan 9d752db175 Merged PR 786216: Use grpcs instead of grpc scheme for machine location
Use grpcs instead of grpc scheme upon location creation, as this is resulting in the encrypted gRPC port to be identified as -1 instead of 7092:

```
2024-05-21 14:23:36,202 [14] DEBUG Creating Ephemeral cache. Type=[DatacenterWideEphemeral] RootPath=[F:\dbs\sh\cb_m\0521_141826\TempFileStore\097a2a56-be5a-40b9-82b2-8eea9ae54557] MaxCacheSizeMb=[52428] Location=[grpc://61fb6450c000004:7092/] Leader=[61fb6450c000004 -> grpc://61fb6450c000004:7092/] Id=[CacheId { Universe = default, Namespace = default }]
...
2024-05-21 14:23:36,640 [17] DEBUG 0d000adf-5f53-4c98-bbc7-42842594cb8e GrpcCoreServerHost.TryGetEncryptedCredentials: Found gRPC Encryption Certificate.
2024-05-21 14:23:36,642 [23] DEBUG 0d000adf-5f53-4c98-bbc7-42842594cb8e GrpcCoreServerHost.StartAsync: Server creating Encrypted Grpc channel on port -1
```

Related work items: #2181670
2024-06-11 05:24:17 +00:00
Oleksii Kononenko 5ec5e9af06 Merged PR 788533: Demote some DScript errors to a user errors
Demote ReportLabelsAreNotAllowed to a user error
2024-06-07 21:57:19 +00:00