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

484 Коммитов

Автор SHA1 Сообщение Дата
Miguel Angel Casillas Maldonado 306a8257be Merged PR 940316: KillSwitch tests
Added FunctTests to check KillSwitch feature:

- killSwitchWorks checks that a token is banned and events are dropped
- killIsTemporary checks that a token is banned for an amount of time and no events are dropped after that

Related work items: #1608758
2019-03-05 19:56:07 +00:00
Max Golovanov 20d4e94160 Fixing build break on Linux gcc #2 2019-02-26 13:10:29 -08:00
Max Golovanov a44db470eb Fixing build break for gcc on Linux 2019-02-26 13:07:22 -08:00
Trevor Lacey aad6238531 Merged PR 938576: WorkerThread
Both PAL_Win32 and PAL_CPP11 have the exact same `WorkerThread` implementation (copy/pasted). This change extracts out the `WorkerThread` class from the Win32/CPP11 files _verbatim_ and puts them in a separate WorkerThread.hpp|cpp. The only change to the WorkerThread class is the introduction of an `IWorkerThread` interface and `WorkerThreadFactory`. This interface will be useful for when MIP creates its own custom WorkerThread that dispatches tasks to an external DLL.

I considered creating a separate PAL_CoreLib or PAL_MIP implementation, but it would everything except `WorkerThread` with the existing Win32/CPP11 PALs, so that seemed like the wrong abstraction.

I would like to merge this change to the main onesdk branch so that when I create the custom CoreLib/MIP implementation in a separate branch (for now), those changes will be very localized.
2019-02-26 21:01:47 +00:00
Max Golovanov 4c3edaaa13 Merge branch 'onesdk' of https://msasg.visualstudio.com/DefaultCollection/Shared%20Data/_git/Aria.SDK.Cpp into onesdk 2019-02-26 12:19:20 -08:00
Max Golovanov cbee3c5b15 Add ETW-based tracing API from Aria v1 SDK. Keep it disabled for now, don't reroute default log facility to that yet. 2019-02-26 12:19:10 -08:00
Max Golovanov c60a3208b3 Mac OS X build env housekeeping (no functional changes) 2019-02-26 00:41:48 -08:00
Max Golovanov 62f4890644 Fix Mac OS X build break --
/build/agent-cpp/_work/1/s/lib/offline/OfflineStorage_SQLite.cpp:67:25: error: conversion from 'Microsoft::Applications::Events::Variant' to 'size_t' (aka 'unsigned long') is ambiguous
2019-02-25 16:07:59 -08:00
Max Golovanov f132bd1c36 Merged PR 935910: Kill switch feature, proper offline storage trim logic and tests
Kill-switch feature:
* collector may decide to kill all events associated with a token
* basic functional test(s) for the feature

Offline storage clean-up:
* if device experiences connectivity issues, then its offline storage may grow too big.
* DB may also contain old records from v1 that we are not processing. Delete those.

Related work items: #1403105, #1403106, #1445871, #1608757
2019-02-26 00:00:36 +00:00
Max Golovanov b74a5f3e7a Updated azure-pipelines.yml: remove doxygen from the build
(build infra, no code change)
2019-02-24 21:06:07 +00:00
Max Golovanov fd0db1f811 Fixing Linux and Mac build break caused by commit 9f8cd7e8c6
No code changes: add missing module to CMakeLists.txt

Signed-off-by: Max Golovanov <maxgolov@microsoft.com>
2019-02-23 17:05:40 -08:00
Max Golovanov d0b3cb9209 Updated CHANGELOG.md to clean-up lists indents (no code changes) 2019-02-21 21:30:09 +00:00
Sergey Kanzhelev 3ab6b13f12 Updated CONTRIBUTING.md 2019-02-21 19:23:41 +00:00
Trevor Lacey 9f8cd7e8c6 Merged PR 908799: HttpClientFactory
HttpClientFactory chooses HttpClient implementation based on build flags. This factory can later be extended additional HttpClient implementations if necessary
2019-02-21 05:06:59 +00:00
Matt Koscumb b530485777 Merged PR 930789: Fixing DevMain build breaks found on Apple
- main() must be conditionally declared CDECL on Windows platforms.
- Removed unused variables.
- Fixed a loss of precision and possible underflow issue.
2019-02-21 05:04:38 +00:00
Max Golovanov a698cd0b3d Updated README.md 2019-02-20 22:14:23 +00:00
Max Golovanov 26dd86a7e0 Updated README.md 2019-02-20 22:11:33 +00:00
Max Golovanov 604e96ace2 Updated CONTRIBUTING.md 2019-02-20 22:10:22 +00:00
Max Golovanov 26d4bf6638 Updated CONTRIBUTING.md 2019-02-20 22:09:54 +00:00
Max Golovanov 51298e35aa Updated CONTRIBUTING.md 2019-02-20 22:09:04 +00:00
Max Golovanov 60df647500 Update the documents for inner source readiness 2019-02-20 14:07:01 -08:00
Max Golovanov ae7ce8b828 Preparing for inner source readiness. 2019-02-20 12:46:11 -08:00
Max Golovanov 55f08873b1 Host-Guest C API example 2019-02-14 23:43:41 -08:00
Max Golovanov 1aef610e12 Fix Linux build break: sleep is undeclared, use PAL::sleep 2019-02-13 12:50:20 -08:00
Max Golovanov 21c65626ca Fix Linux test apps build break 2019-02-13 12:42:28 -08:00
Max Golovanov 6ad9389208 Update Windows SDK header to 3.1.42.1 2019-02-11 15:55:04 -08:00
Max Golovanov 8b625682be Merged PR 923233: HTTP uploader fixes
HTTP uploader fixes:
* fix lockup on shutdown: pause , then join on all TPM callbacks in system - waiting for HCM request callbacks to come
* limit the # of HTTP uploads in the pipeline as it may previously caused OOMs, esp. in case of several UploadNow calls
* add more tests for scenarios above, including shutdown with high number of requests, as well as Unit tests around this area

Related work items: #1628137
2019-02-11 23:45:45 +00:00
Max Golovanov 111c75b182 ARIA SDK v3.1.39.1 (source code drop for Office Feb fork) 2019-02-08 11:14:15 -08:00
Max Golovanov 2c077ec0d2 Merged PR 918242: Resolve WATSON AV at shutdown found during Office fuzzy testing
Resolve WATSON AV at shutdown found during Office fuzzy testing: don't touch the object that might have been already destroyed. Code logic relies on existing idle-wait check in _CancelAllRequests_. Since we can't safely rely on a signal handle member field, waiting inside a _cancel_() method of an object that might be potentially destroyed by another parallel thread (e.g. by WinInet thread pool callback handling thread), signal handling has to be removed. It was largely unnecessary: we already have an "idle waiter" inside the CancelAllRequests(...), that yields to (WinInet or Win10) callback threads until all pending requests have run to completion or cancellation. Worst case shutdown wait time after forcedly resetting/aborting HTTP socket connection is about 100ms or up to the amount of time it takes for the callback thread to get scheduled and run to object deletion. In fact in case if there are two or more pending HTTP requests, the shutdown is now faster after the change since we no longer wait individually on each of these, but rather than wait for all of them to complete. Added Win32 "fuzzy' test that attempts to rapidly send requests in a loop and abort them, printing how many got OKd (O) and how many got a "failure" notification due to cancellation (X). No crashed observed.

Related work items: #1561793
2019-02-07 22:36:36 +00:00
Max Golovanov 55b95fb067 Merged PR 917219: Reduce stats volume and byte size
Stats improvement:
* reduce priority from Critical/Realtime to normal
* reduce frequency to 1 event in 30 minutes
* reduce stats event size. Stop collecting histograms we never ever look at (and in fact block in our Kusto storage)
* rework the code to make it simple, avoid "copypasta" that previously plagued MetaStats.cpp
* use wall clock for stats event timestamp
* adjust tests to account for lesser number of stats event per session
* make per-tenant stats a configurable "debug only" feature, as it does not scale well for deployment in Office
* adjust PAL to properly return monotonic clock

Related work items: #1618463
2019-02-07 19:58:56 +00:00
Miguel Angel Casillas Maldonado 07ef4d24eb Merged PR 904184: Start building functional and unit tests for clang on Windows and Mac
Start building functional and unit tests for clang on Windows and Mac

Related work items: #1548039, #1548040
2019-02-01 09:08:09 +00:00
Max Golovanov 0d917965ed ARIA SDK for Windows v3.1.18 2019-01-18 20:08:21 -08:00
Max Golovanov 55f5186b4a Aria SDK for Windows v3.1.18 release notes
+ SHIM layer code sign changes for release
2019-01-18 16:49:43 -08:00
Max Golovanov a15d6132f6 Merged PR 896085: Provide more secure implementation of evt_log -- evt_log_s
Provide more secure implementation of evt_log -- evt_log_s that 'remembers' the array size.
Plus add a test app for vs2010 to verify the flow.

There is a compile-time compiler define **_CRT_SECURE_LOG_S** that now allows to enforce the usage of **evt_log_s** similar to Secure Template practice done for old C-style APIs, that is automagically figuring out the passed array size.. Conceptually similar to that: https://docs.microsoft.com/en-us/cpp/c-runtime-library/secure-template-overloads

* **evt_log** is still there: as long as users use the TELEMETRY_EVENT macro, it automatically appends the null-entry at the end of array, that one serves as null-terminator similar to C-style strings, so that the knowledge of array size is redundant per-se: we scan until we find null terminator. If users use _CRT_SECURE_LOG_S, then the requirement of null-terminating goes away.. ideally it'd be fine if users just always use TELEMETRY_EVENT macro that automatically adds padding.

* If users prefer **evt_log_s** by defining _CRT_SECURE_LOG_S, then all **evt_log** API calls automatically get routed to **evt_log_s** alongside with auto-calculated array size.. There's no need to know of evt_log_s.

* If users use **evt_log_s** directly, then they'd have to manually pass down the array size ... probably not the most efficient way.. while they can also employ a macro to calc it at compile time.

Related work items: #1592232
2019-01-18 22:12:29 +00:00
Max Golovanov 6e092e404a Add doxygen output to ignore 2019-01-15 15:25:48 -08:00
Max Golovanov f91c569d85 Merged PR 894213: Defensive fix for WATSON bug 2685462
Defensive fix for WATSON bug 2685462: if adding to package using splicer fails, then avoid crashing with OOM - report back that no more records can be added to package. Some telemetry loss is expected under this condition.

Related work items: #1588215
2019-01-15 23:22:38 +00:00
Max Golovanov c6f5f47b5f Update SDK version to 3.1 for Mac and Linux 2019-01-11 23:01:54 -08:00
Max Golovanov bf8672e762 2019: update version from 3.0 to 3.1 2019-01-11 22:11:14 -08:00
Hindol Adhya c2b946ae7a Merged PR 885392: Clang "-Wno-reorder" and "-Wno-unknown-pragmas" Flag Cleanup
Sprinkle "#ifdef _MSC_VER" wherever "#pragma warning" is used to get rid of the "-Wno-unknown-pragmas" flag.

Remove "Wno-reorder" flag as it is not causing issues anymore. Fixed by someone else?
2019-01-07 22:42:55 +00:00
Matt Koscumb 3b3eef0b79 Disable /permissive-, there's an inconsistent build behavior between the loop and local machines. 2019-01-04 10:58:17 -08:00
Matt Koscumb 2ce8cab029 Merged PR 884143: Build Break Fix: pValue is undefined. This error has existed forever, but was
Build Break Fix: pValue is undefined. This error has existed forever, but was ignored because MSVC simply doesn't emit compile errors for templated methods that aren't called.
2019-01-04 18:05:30 +00:00
Matt Koscumb c438c9fc37 Build Break Fix: pValue is undefined. This error has existed forever, but was ignored because MSVC simply doesn't emit compile errors for templated methods that aren't called. 2019-01-04 09:36:30 -08:00
Matt Koscumb cbaccabbf0 Merged PR 883372: Enable /permissive- on Aria builds using MSVC
Fixed a couple /Zc:strictStrings issues as well.

C++/CLI projects do not support two-phase lookup, so set /Zc:twoPhase- for those projects.
2019-01-04 16:30:46 +00:00
Matt Koscumb b79a5b71d8 Remove now-redundant cast. 2019-01-03 16:21:59 -08:00
Matt Koscumb 752d637ecb Remove unnecessary #include that I shouldn't have added in a previous commit. 2019-01-03 15:49:20 -08:00
Matt Koscumb 6f96e5c24d Enable /permissive- on all Aria VS projects. 2019-01-03 15:46:45 -08:00
Matt Koscumb 1542cbc6f2 More strictStrings fixes. 2019-01-03 14:18:53 -08:00
Matt Koscumb 3ecf210fc5 C++ defines a string literal as the type const char[N], where C defines it as char*. The const is the important thing here, MSVC tacitly treated all string literals per the C standard, which is incompatable with C++'s new string literal rules. As part of enabling /permissive-, this enables the /zc:strictstrings check, which enforces C++ string-literal types. 2019-01-03 14:03:50 -08:00
Matt Koscumb c7fefb2dd3 Merged PR 883026: Couple of fixes to help /permissive-
Three changes:
1. Fix C2362: initialization of a value skipped by a goto.
2. Fix C4596: referencing a class from within the class declaration is illegal.
3. Standard C++ does not permit examining dependent base classes when looking for declarations of member functions. Use 'this->' when calling non-overridden base class methods.
2019-01-03 21:59:18 +00:00
Matt Koscumb 8149e136ae More traceloggingdynamic.h fixes after enabling /permissive- 2019-01-03 12:59:09 -08:00