-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Sync fork #14
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
base: master
Are you sure you want to change the base?
feat: Sync fork #14
Conversation
#skip-changelog
The backup-method described in the [documentation](https://develop.sentry.dev/self-hosted/backup/#backup) `./scripts/backup.sh` creates a backup file at `sentry/backup.json` which should be ignored by git. ### Legal Boilerplate Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
… to security policy (#3447)
* Replace release bot with GH app * remove unneeded app token
Follow up to #3427 (comment) where we created and mounted a custom Redis config only to not use it 🤦
#skip-changelog
#skip-changelog
#skip-changelog
….1 (#3492) Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1.11.0 to 1.11.1. - [Release notes](https://github.com/actions/create-github-app-token/releases) - [Commits](actions/create-github-app-token@5d869da...c1a2851) --- updated-dependencies: - dependency-name: actions/create-github-app-token dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
`geoipupdate` is not used by any other service nor it is needed for any service to run. Moreover, it is a one-shot command, causing `docker compose up --wait` to fail when it exits with a non-zero status. This happens when one has not yet set up their credentials and they may choose to never do this. This PR removes `geoipupdate` from the `docker-compose.yml` file and moves the command directly into the geoip related script. One may run this whenever they want to update their GeoIP database. This PR needs an accompanying docs change.
I think we split these actions in the past due to some lack of options for them to work together properly. Right now looks like `bootstrap` would automatically migrate and propagates the `force` flag.
Update `_lib.sh` to remove the extra space in the log file name. This fixes the log files name not being included in `.gitinore`
This patch caches all DB volumes based on the sentry and snuba images to avoid doing the same migrations over and over for every test run. This shaved off a whole minute from "Install self-hosted" jobs (so ~20% speed increase). Left side: cached re-run -- Right side: no-cache initial run 
Follow up to #3488 A new record: 2m 8s for installing self-hosted: 
Docker Compose is much more robust nowadays compared to the past where we had to maintain tests for both v1 and v2 and then a specific version of v2. Hence, we are removing tests for the older versions of Docker Compose with this patch. We also remove the separate tests for customizations and w/o customizations as the one with customizations should cover the one without them anyway. This reduces the CI workload to 25% of what it was
This is an initial transitionary patch before landing #3516. Once we land this, we will update users of the old action to use this one and remove that repo. Then land #3516 safely. Great thing is, with this patch and the subsequent update to getsentry/action-self-hosted-e2e-tests to use this one, all the repos would be using the Docker Volume caching we introduced in #3488.
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Prevents the very confusing 'Unsupported Docker Architecture' error when we actually had a permission error running docker.
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
* Revert "Revert "ref: migrate to uv (#4061)" (#4094)" This reverts commit f9c0c31. * fix: provide python version as per https://github.com/getsentry/action-setup-venv/blob/0958463ee0e02b9e8aa8f8e031afae1f84b80881/action.yml#L5-L7
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 7.1.5 to 7.1.6. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](astral-sh/setup-uv@ed21f2f...681c641) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 7.1.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
* Include SDK version 10 when using local JS SDK assets * Updated unit test to check for 9.* and 10.* versions of the SDK bundles
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
| Sentry.captureFeedback({ | ||
| message: "I love your startup!", | ||
| name: "John Doe", | ||
| email: "john@example.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Wrong Sentry API: captureFeedback is not a function in the Node SDK and will throw a TypeError at runtime; use the correct API captureUserFeedback and map the message field to comments. [type error]
Severity Level: Critical 🚨
- ❌ Integration test _integration-test/nodejs/user-feedback.js fails.
- ⚠️ CI job running Node integration tests will error.
- ⚠️ Developer local runs crash with TypeError.| Sentry.captureFeedback({ | |
| message: "I love your startup!", | |
| name: "John Doe", | |
| email: "john@example.com", | |
| Sentry.captureUserFeedback({ | |
| name: "John Doe", | |
| email: "john@example.com", | |
| comments: "I love your startup!", |
Steps of Reproduction ✅
1. Run the integration script directly: `node _integration-test/nodejs/user-feedback.js`.
The file imports Sentry at `_integration-test/nodejs/user-feedback.js:1`.
2. Execution reaches the call at `_integration-test/nodejs/user-feedback.js:3` where
`Sentry.captureFeedback({...})` is invoked.
3. At runtime Node attempts to look up `captureFeedback` on the imported Sentry object and
fails because the Node SDK does not export `captureFeedback`. Node throws `TypeError:
Sentry.captureFeedback is not a function`, with a stack trace pointing to
`_integration-test/nodejs/user-feedback.js:3`.
4. The script terminates with an uncaught exception before reaching the flush call at
`_integration-test/nodejs/user-feedback.js:11`. This is a concrete, reproducible failure
when the integration test/script is executed as-is.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** _integration-test/nodejs/user-feedback.js
**Line:** 3:6
**Comment:**
*Type Error: Wrong Sentry API: `captureFeedback` is not a function in the Node SDK and will throw a TypeError at runtime; use the correct API `captureUserFeedback` and map the `message` field to `comments`.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.|
|
||
| # `sdk_files` should contains 7 lines, '4.*', '5.*', '6.*', `7.*`, `8.*`, `9.*`, and `10.*` | ||
| echo $sdk_files | ||
| total_directories=$(echo "$sdk_files" | grep -c '[4-9|10]\.[0-9]*\.[0-9]*$') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The grep pattern uses a character class with '|' and '10' inside ([4-9|10]...), which does not implement alternation and will incorrectly match digits '1' and '0' separately (and the '|' character); this causes total_directories to be miscounted. Use extended regex alternation and proper anchors to reliably match version-like directory names. [logic error]
Severity Level: Critical 🚨
- ❌ CI unit test fails blocking merges.
- ⚠️ SDK asset verification reports incorrect counts.
- ⚠️ Release gating depends on these tests.| total_directories=$(echo "$sdk_files" | grep -c '[4-9|10]\.[0-9]*\.[0-9]*$') | |
| total_directories=$(echo "$sdk_files" | grep -E -c '^(4|5|6|7|8|9|10)\.[0-9]+\.[0-9]+$') |
Steps of Reproduction ✅
1. Run the test script directly: execute `_unit-test/js-sdk-assets-test.sh` from
repository root (script shebang is at the top of the file). The script sources
`install/setup-js-sdk-assets.sh` and then assigns `sdk_files` at line 11
(`sdk_files=$($dcr --no-deps nginx ls -lah /var/www/js-sdk/)`) and proceeds.
2. After assets are populated, the script computes `total_directories` at line 18
(`total_directories=$(echo "$sdk_files" | grep -c '[4-9|10]\.[0-9]*\.[0-9]*$')`). This
uses a character class `[4-9|10]` instead of alternation, per the code at line 18.
3. Observe result: when directory entries include names like `10.0.0` or other filenames
with digits in different columns, the character-class will match unintended characters
(`1`, `0`, or `|`) and either overcount or miscount directories; the variable
`total_directories` will not reliably equal the expected `7`.
4. The mismatch propagates to the assertion at line 20 (`test "7" ==
"$total_directories"`), causing the test to fail in CI. The improved grep with alternation
(grep -E '^(4|5|6|7|8|9|10)\...') reproduces the intended matching and fixes counts.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** _unit-test/js-sdk-assets-test.sh
**Line:** 18:18
**Comment:**
*Logic Error: The grep pattern uses a character class with '|' and '10' inside ([4-9|10]...), which does not implement alternation and will incorrectly match digits '1' and '0' separately (and the '|' character); this causes `total_directories` to be miscounted. Use extended regex alternation and proper anchors to reliably match version-like directory names.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.| done | ||
|
|
||
| # Verify that all buckets were created successfully | ||
| bucket_list=$($s3cmd --access_key=sentry --secret_key=sentry --no-ssl --region=us-east-1 --host=localhost:8333 --host-bucket='localhost:8333/%(bucket)' ls) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Race condition / flaky test: the script lists buckets immediately after creating them without retrying; the creation may not be visible instantly, causing intermittent failures—add a short retry loop with a timeout when collecting bucket_list. [race condition]
Severity Level: Critical 🚨
- ❌ CI test suite experiences intermittent failures.
- ⚠️ SeaweedFS bucket-tests become flaky.
- ⚠️ Developers face noisy, unreliable CI runs.| bucket_list=$($s3cmd --access_key=sentry --secret_key=sentry --no-ssl --region=us-east-1 --host=localhost:8333 --host-bucket='localhost:8333/%(bucket)' ls) | |
| S3_ACCESS_KEY="${S3_ACCESS_KEY:-sentry}" | |
| S3_SECRET_KEY="${S3_SECRET_KEY:-sentry}" | |
| max_retries=5 | |
| attempt=0 | |
| bucket_list="" | |
| while [ $attempt -lt $max_retries ]; do | |
| bucket_list=$($s3cmd --access_key="$S3_ACCESS_KEY" --secret_key="$S3_SECRET_KEY" --no-ssl --region=us-east-1 --host=localhost:8333 --host-bucket='localhost:8333/%(bucket)' ls 2>/dev/null) && break | |
| attempt=$((attempt + 1)) | |
| sleep 1 | |
| done |
Steps of Reproduction ✅
1. Run the script in CI: it creates buckets in the loop at lines 14-16, then immediately
lists buckets at line 19 into bucket_list.
2. If the SeaweedFS s3 endpoint or s3cmd exhibits eventual consistency or slight
propagation delay, the newly-created buckets may not appear instantly in the ls output.
The subsequent check (lines 20-25) will detect missing buckets and exit with error.
3. Reproduce by adding artificial delay to SeaweedFS or running tests under load: create
buckets (lines 14-16) then immediately run the ls command (line 19); observe intermittent
failures where grep at line 21 does not find entries and the script exits.
4. Because the script performs no retries, these timing-dependent failures manifest as
flaky CI unit-test failures. Adding a short retry loop with timeout (as proposed)
stabilizes the check and prevents transient test failures.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** _unit-test/multiple-seaweedfs-bucket-test.sh
**Line:** 19:19
**Comment:**
*Race Condition: Race condition / flaky test: the script lists buckets immediately after creating them without retrying; the creation may not be visible instantly, causing intermittent failures—add a short retry loop with a timeout when collecting `bucket_list`.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.|
CodeAnt AI Incremental review completed. |
CodeAnt-AI Description
Add Podman support, S3-backed node/profile migrations, and optional local JS SDK hosting
What Changed
Impact
✅ Podman installs supported (same UX as Docker)✅ Safer profiles and nodestore migration to S3-backed storage✅ Local JS SDK bundles available for air-gapped or restricted environments💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.