rails-profiler 0.44.17 → 0.44.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/app/assets/javascript/profiler-ajax-interceptor.js +15 -5
- data/lib/profiler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6ff17f7394a92aa22478050a6e7fc0ba43176209346b78f62a76a1c408132e19
|
|
4
|
+
data.tar.gz: fd9f845aa7eea816dcbbe2e6f5e48c3ee2747938fd652f136cc796ea2bd9a640
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b52fe7bc4ab382e3795dfebd4775a919a704f95e4ed9c11d4fefcbfc1da0d8a17f6e2fc8602135739bb06b809346e3057c4d85058ae2884eae7bb89ab5a3cb8
|
|
7
|
+
data.tar.gz: 1e11f5aa5caa3b22ad176859f4bb7880c115288d00f3cf638691a5e644da55277774e033d3e1f136b79cc1ece8cd7954688f2453b386280f415ffe70d3bc3ebe
|
data/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,26 @@ every commit of every tag interval is accounted for one way or the other.
|
|
|
19
19
|
|
|
20
20
|
## [Unreleased]
|
|
21
21
|
|
|
22
|
+
## [0.44.19] - 2026-10-25
|
|
23
|
+
|
|
24
|
+
<!-- stamped -->
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **Changelog:** Detect and reject duplicate version sections that can result from poorly-resolved merge conflicts on `CHANGELOG.md`.
|
|
29
|
+
- **Release:** Verify that version tags do not already exist before creating them; exit with a clear error if a tag exists on a different commit, improving diagnostics for out-of-order pipelines.
|
|
30
|
+
- **Changelog:** Fix commit-type regex patterns to use non-greedy scope matching (`[^)]*` instead of `.+`), preventing parentheses in commit descriptions from being misparsed as scope delimiters.
|
|
31
|
+
- **Release:** Ensure UTF-8 encoding in all release scripts (bin/changelog, script/release.sh, script/canary-version) to prevent "invalid byte sequence" errors when running under `LANG=C` or non-UTF-8 locales.
|
|
32
|
+
- **Release:** Filter version tags by pattern (`v[0-9]*`) to prevent non-version tags (e.g., `staging-2026`) from interfering with version computation and release workflow.
|
|
33
|
+
|
|
34
|
+
## [0.44.18] - 2026-10-25
|
|
35
|
+
|
|
36
|
+
<!-- stamped -->
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **AJAX interceptor:** Retry `/_profiler/api/ajax/link` with exponential backoff (100ms, 200ms, 400ms) on 404 errors, bounded to 3 attempts, to handle streaming response profiles not yet persisted when the client attachment request arrives. Refs #70
|
|
41
|
+
|
|
22
42
|
## [0.44.17] - 2026-10-25
|
|
23
43
|
|
|
24
44
|
<!-- stamped -->
|
|
@@ -91,20 +91,20 @@
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
// Helper function to link child profile to parent
|
|
95
|
-
function linkChildProfile(childToken) {
|
|
94
|
+
// Helper function to link child profile to parent, with retry on 404
|
|
95
|
+
function linkChildProfile(childToken, attempt = 1) {
|
|
96
96
|
const parentToken = currentParentToken();
|
|
97
97
|
if (!childToken || !parentToken) return;
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
// Post to the link API endpoint
|
|
99
|
+
const maxAttempts = 3;
|
|
102
100
|
const linkUrl = '/_profiler/api/ajax/link';
|
|
103
101
|
const body = JSON.stringify({
|
|
104
102
|
parent_token: parentToken,
|
|
105
103
|
child_token: childToken
|
|
106
104
|
});
|
|
107
105
|
|
|
106
|
+
console.debug('[Profiler] Linking AJAX request:', { parent: parentToken, child: childToken, attempt });
|
|
107
|
+
|
|
108
108
|
// Use original fetch to avoid infinite loop
|
|
109
109
|
originalFetch.call(window, linkUrl, {
|
|
110
110
|
method: 'POST',
|
|
@@ -122,6 +122,16 @@
|
|
|
122
122
|
window.__PROFILER_REFRESH_TOOLBAR__();
|
|
123
123
|
}
|
|
124
124
|
}, 100);
|
|
125
|
+
} else if (response.status === 404 && attempt < maxAttempts) {
|
|
126
|
+
// Profile not yet persisted (streaming response case): retry with exponential backoff
|
|
127
|
+
const backoffMs = 100 * Math.pow(2, attempt - 1); // 100ms, 200ms, 400ms
|
|
128
|
+
console.debug('[Profiler] Profile not found (404), retrying in', backoffMs, 'ms');
|
|
129
|
+
setTimeout(() => {
|
|
130
|
+
linkChildProfile(childToken, attempt + 1);
|
|
131
|
+
}, backoffMs);
|
|
132
|
+
} else if (response.status === 404) {
|
|
133
|
+
// Exhausted retries
|
|
134
|
+
console.debug('[Profiler] Profile not found after', maxAttempts, 'retries, giving up');
|
|
125
135
|
}
|
|
126
136
|
}).catch(err => {
|
|
127
137
|
// Fail silently - don't break the page if profiler API fails
|
data/lib/profiler/version.rb
CHANGED