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

Dogfood recent changes (retry) #1870

Merged
merged 5 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DatadogSessionReplay/Sources/Recorder/Recorder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class Recorder: Recording {
snapshotProcessor: SnapshotProcessing,
resourceProcessor: ResourceProcessing,
telemetry: Telemetry,
methodCallTelemetrySamplingRate: Float = 5
methodCallTelemetrySamplingRate: Float = 0.1
) {
self.uiApplicationSwizzler = uiApplicationSwizzler
self.viewTreeSnapshotProducer = viewTreeSnapshotProducer
Expand All @@ -123,7 +123,7 @@ public class Recorder: Recording {
let methodCalledTrace = telemetry.startMethodCalled(
operationName: MethodCallConstants.captureRecordOperationName,
callerClass: MethodCallConstants.className,
samplingRate: methodCallTelemetrySamplingRate // Effectively 3% * 5% = 0.15% of calls
samplingRate: methodCallTelemetrySamplingRate // Effectively 3% * 0.1% = 0.003% of calls
)
var isSuccessful = true
do {
Expand Down
11 changes: 11 additions & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,17 @@ workflows:
set -e
cd tools/distribution && make
venv/bin/python3 -m pytest tests
- script:
title: Smoke test dogfooding (with dry-run)
run_if: '{{enveq "DD_RUN_TOOLS_TESTS" "1"}}'
inputs:
- content: |-
#!/usr/bin/env bash
set -e

export DD_DRY_RUN=yes
cd tools/distribution && make
venv/bin/python3 dogfood.py
Comment on lines +539 to +549
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- script:
title: Run tests for nightly-unit-tests tool
run_if: '{{enveq "DD_RUN_TOOLS_TESTS" "1"}}'
Expand Down
4 changes: 3 additions & 1 deletion tools/distribution/dogfood.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def dogfood(dry_run: bool, repository_url: str, repository_name: str, repository
else:
package.add_dependency(
package_id=dependency_id,
repository_url=dependency['repositoryURL'],
repository_url=dependency['location'],
branch=dependency['state'].get('branch'),
revision=dependency['state']['revision'],
version=dependency['state'].get('version'),
Expand Down Expand Up @@ -111,6 +111,8 @@ def dogfood(dry_run: bool, repository_url: str, repository_name: str, repository

try:
dry_run = os.environ.get('DD_DRY_RUN') == 'yes'
if dry_run:
print(f'ℹ️ Running in dry-run mode')
skip_datadog_ios = os.environ.get('DD_SKIP_DATADOG_IOS') == 'yes'
skip_shopist_ios = os.environ.get('DD_SKIP_SHOPIST_IOS') == 'yes'

Expand Down
2 changes: 1 addition & 1 deletion tools/distribution/src/dogfood/package_resolved.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def __get_package(self, package_id: PackageID):

class PackageResolvedContentV3(PackageResolvedContentV2):
"""
Example of `package.resolved` in version `2` looks this::
Example of `package.resolved` in version `3` looks this::

{
"originHash" : "b47de6af98c4a9811a8d2af11d70b960dfc66b7c8e4944b35bb74c8f8bb9c487",
Expand Down