sentry-fastlane-plugin icon indicating copy to clipboard operation
sentry-fastlane-plugin copied to clipboard

org_slug is not used for sentry_set_commits

Open rist opened this issue 3 years ago • 2 comments

Environment

When trying to use sentry_set_commits I get the error error: An organization slug is required (provide with --org) even though I pass a "org_slug" argument to the call

  sentry_set_commits(
    url: sentry_url,
    org_slug: 'REDACTED',
    version: '6.6.0',
    app_identifier: 'REDACTED',
    build: '13491', # Optionally pass in the build number of your app
    auto: false, # enable completely automated commit management
    clear: false, # clear all current commits from the release
    commit: 'REDACTED', # commit spec, see `sentry-cli releases help set-commits` for more information
  )

Expected Result

sentry_set_commits should accept custom sentry URLs and org slugs

Actual Result

[✔] 🚀 
DEBUG [2021-11-04 09:38:36.36]: Checking if there are any plugins that should be loaded...
DEBUG [2021-11-04 09:38:36.36]: Loading 'fastlane-plugin-sentry' plugin
INFO [2021-11-04 09:38:36.36]: gem 'fastlane-plugin-sentry' is already installed
+------------------------+---------+-----------------------------------------------------------------------------+
|                                                  Used plugins                                                  |
+------------------------+---------+-----------------------------------------------------------------------------+
| Plugin                 | Version | Action                                                                      |
+------------------------+---------+-----------------------------------------------------------------------------+
| fastlane-plugin-sentry | 1.11.0  | sentry_upload_dsym, sentry_set_commits, sentry_upload_sourcemap,            |
|                        |         | sentry_finalize_release, sentry_upload_file, sentry_create_deploy,          |
|                        |         | sentry_upload_proguard, sentry_create_release, sentry_check_cli_installed,  |
|                        |         | sentry_upload_dif                                                           |
+------------------------+---------+-----------------------------------------------------------------------------+

Successfully loaded Appfile at path '/Users/rist/Documents/projects/REDACTED/ios/fastlane/Appfile'
- app_identifier: 'com.REDACTED.REDACTED'
- itc_team_id: '2050088'
-------
Successfully loaded Appfile at path '/Users/rist/Documents/projects/REDACTED/ios/fastlane/Appfile'
- app_identifier: 'com.REDACTED.REDACTED'
- itc_team_id: '2050088'
-------
INFO [2021-11-04 09:38:36.81]: ----------------------------------------
INFO [2021-11-04 09:38:36.81]: --- Step: Verifying fastlane version ---
INFO [2021-11-04 09:38:36.81]: ----------------------------------------
INFO [2021-11-04 09:38:36.81]: Your fastlane version 2.197.0 matches the minimum requirement of 1.99.0  ✅
INFO [2021-11-04 09:38:36.82]: -----------------------
INFO [2021-11-04 09:38:36.82]: --- Step: xcversion ---
INFO [2021-11-04 09:38:36.82]: -----------------------
INFO [2021-11-04 09:38:36.82]: gem 'xcode-install' is already installed
DEBUG [2021-11-04 09:38:36.89]: Found Xcode version 13.1 at /Applications/Xcode_13.1.app satisfying requirement ~> 13.1
INFO [2021-11-04 09:38:36.89]: Setting Xcode version to /Applications/Xcode_13.1.app for all build steps
INFO [2021-11-04 09:38:36.89]: ------------------------------
INFO [2021-11-04 09:38:36.89]: --- Step: default_platform ---
INFO [2021-11-04 09:38:36.89]: ------------------------------
INFO [2021-11-04 09:38:36.89]: Driving the lane 'setRelease' 🚀
INFO [2021-11-04 09:38:36.89]: ----------------------------------------
INFO [2021-11-04 09:38:36.89]: --- Step: sentry_check_cli_installed ---
INFO [2021-11-04 09:38:36.89]: ----------------------------------------
INFO [2021-11-04 09:38:36.92]: sentry-cli 1.70.1 installed!
INFO [2021-11-04 09:38:36.92]: Successfully checked that sentry-cli is installed
INFO [2021-11-04 09:38:36.92]: ---------------------------------------
INFO [2021-11-04 09:38:36.92]: --- Step: app_store_connect_api_key ---
INFO [2021-11-04 09:38:36.92]: ---------------------------------------
INFO [2021-11-04 09:38:36.92]: --------------------------------
INFO [2021-11-04 09:38:36.92]: --- Step: sentry_set_commits ---
INFO [2021-11-04 09:38:36.92]: --------------------------------
INFO [2021-11-04 09:38:36.94]: sentry-cli 1.70.1 installed!
WARN [2021-11-04 09:38:36.94]: No org/project config provided, will fallback to .sentryclirc
INFO [2021-11-04 09:38:36.94]: Starting sentry-cli...
DEBUG [2021-11-04 09:38:36.94]: sentry-cli command:


INFO [2021-11-04 09:38:36.94]: $ ["sentry-cli", "releases", "set-commits", "[email protected]+13491", "--commit", "ios@9caecd6cabf4f6eebc21c013e9d8dd7da0a339dd"]
DEBUG [2021-11-04 09:38:36.94]: 


DEBUG [2021-11-04 09:38:36.96]: INFO    2021-11-04 09:38:36.958332 +01:00 Loaded config from /Users/rist/.sentryclirc
DEBUG [2021-11-04 09:38:36.96]: DEBUG   2021-11-04 09:38:36.959105 +01:00 sentry-cli version: 1.70.1, platform: "darwin", architecture: "x86_64"
DEBUG [2021-11-04 09:38:36.96]: INFO    2021-11-04 09:38:36.959122 +01:00 sentry-cli was invoked with the following command line: "sentry-cli" "releases" "set-commits" "[email protected]+13491" "--commit" "ios@9caecd6cabf4f6eebc21c013e9d8dd7da0a339dd"
ERROR [2021-11-04 09:38:36.96]: error: An organization slug is required (provide with --org)
DEBUG [2021-11-04 09:38:36.96]: DEBUG   2021-11-04 09:38:36.964895 +01:00 client close; no transport to shut down  (from sentry)
DEBUG [2021-11-04 09:38:36.96]: DEBUG   2021-11-04 09:38:36.964918 +01:00 skipping update nagger because session is not attended
WARN [2021-11-04 09:38:36.96]: Lane Context:
INFO [2021-11-04 09:38:36.96]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>nil, :LANE_NAME=>"setRelease"}
ERROR [2021-11-04 09:38:36.96]: Error while calling Sentry CLI
INFO [2021-11-04 09:38:36.97]: Successfully generated documentation at path '/Users/rist/Documents/projects/REDACTED/ios/fastlane/README.md'

+------+----------------------------+-------------+
|                fastlane summary                 |
+------+----------------------------+-------------+
| Step | Action                     | Time (in s) |
+------+----------------------------+-------------+
| 1    | Verifying fastlane version | 0           |
| 2    | xcversion                  | 0           |
| 3    | default_platform           | 0           |
| 4    | sentry_check_cli_installed | 0           |
| 5    | app_store_connect_api_key  | 0           |
| 💥   | sentry_set_commits         | 0           |
+------+----------------------------+-------------+

DEBUG [2021-11-04 09:38:36.98]: All plugins are up to date
ERROR [2021-11-04 09:38:36.98]: fastlane finished with errors
DEBUG [2021-11-04 09:38:36.98]: All plugins are up to date
bundler: failed to load command: fastlane (/Users/rist/.gemexport/bin/fastlane)
Traceback (most recent call last):
	48: from /Users/rist/.rbenv/versions/2.6.5/bin/bundle:23:in `<main>'
	47: from /Users/rist/.rbenv/versions/2.6.5/bin/bundle:23:in `load'
	46: from /Users/rist/.gemexport/gems/bundler-2.2.19/exe/bundle:37:in `<top (required)>'
	45: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
	44: from /Users/rist/.gemexport/gems/bundler-2.2.19/exe/bundle:49:in `block in <top (required)>'
	43: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli.rb:24:in `start'
	42: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	41: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli.rb:30:in `dispatch'
	40: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	39: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	38: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	37: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli.rb:474:in `exec'
	36: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:28:in `run'
	35: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `kernel_load'
	34: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `load'
	33: from /Users/rist/.gemexport/bin/fastlane:23:in `<top (required)>'
	32: from /Users/rist/.gemexport/bin/fastlane:23:in `load'
	31: from /Users/rist/.gemexport/gems/fastlane-2.197.0/bin/fastlane:23:in `<top (required)>'
	30: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
	29: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
	28: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/commands_generator.rb:353:in `run'
	27: from /Users/rist/.gemexport/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
	26: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:117:in `run!'
	25: from /Users/rist/.gemexport/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
	24: from /Users/rist/.gemexport/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
	23: from /Users/rist/.gemexport/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
	22: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/commands_generator.rb:109:in `block (2 levels) in run'
	21: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	20: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
	19: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
	18: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	17: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	16: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/lane.rb:33:in `call'
	15: from Fastfile:35:in `block in parsing_binding'
	14: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
	13: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
	12: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
	11: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
	10: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
	 9: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
	 8: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
	 7: from /Users/rist/.gemexport/gems/fastlane-plugin-sentry-1.11.0/lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb:25:in `run'
	 6: from /Users/rist/.gemexport/gems/fastlane-plugin-sentry-1.11.0/lib/fastlane/plugin/sentry/helper/sentry_helper.rb:35:in `call_sentry_cli'
	 5: from /Users/rist/.rbenv/versions/2.6.5/lib/ruby/2.6.0/open3.rb:101:in `popen3'
	 4: from /Users/rist/.rbenv/versions/2.6.5/lib/ruby/2.6.0/open3.rb:219:in `popen_run'
	 3: from /Users/rist/.gemexport/gems/fastlane-plugin-sentry-1.11.0/lib/fastlane/plugin/sentry/helper/sentry_helper.rb:44:in `block in call_sentry_cli'
	 2: from /Users/rist/.gemexport/gems/fastlane-plugin-sentry-1.11.0/lib/fastlane/plugin/sentry/helper/sentry_helper.rb:61:in `handle_error'
	 1: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
/Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': Error while calling Sentry CLI (FastlaneCore::Interface::FastlaneError)
	48: from /Users/rist/.rbenv/versions/2.6.5/bin/bundle:23:in `<main>'
	47: from /Users/rist/.rbenv/versions/2.6.5/bin/bundle:23:in `load'
	46: from /Users/rist/.gemexport/gems/bundler-2.2.19/exe/bundle:37:in `<top (required)>'
	45: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
	44: from /Users/rist/.gemexport/gems/bundler-2.2.19/exe/bundle:49:in `block in <top (required)>'
	43: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli.rb:24:in `start'
	42: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	41: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli.rb:30:in `dispatch'
	40: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	39: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	38: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	37: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli.rb:474:in `exec'
	36: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:28:in `run'
	35: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `kernel_load'
	34: from /Users/rist/.gemexport/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `load'
	33: from /Users/rist/.gemexport/bin/fastlane:23:in `<top (required)>'
	32: from /Users/rist/.gemexport/bin/fastlane:23:in `load'
	31: from /Users/rist/.gemexport/gems/fastlane-2.197.0/bin/fastlane:23:in `<top (required)>'
	30: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
	29: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
	28: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/commands_generator.rb:353:in `run'
	27: from /Users/rist/.gemexport/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
	26: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:117:in `run!'
	25: from /Users/rist/.gemexport/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
	24: from /Users/rist/.gemexport/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
	23: from /Users/rist/.gemexport/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
	22: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/commands_generator.rb:109:in `block (2 levels) in run'
	21: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	20: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
	19: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
	18: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	17: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	16: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/lane.rb:33:in `call'
	15: from Fastfile:35:in `block in parsing_binding'
	14: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
	13: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
	12: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
	11: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
	10: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
	 9: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
	 8: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
	 7: from /Users/rist/.gemexport/gems/fastlane-plugin-sentry-1.11.0/lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb:25:in `run'
	 6: from /Users/rist/.gemexport/gems/fastlane-plugin-sentry-1.11.0/lib/fastlane/plugin/sentry/helper/sentry_helper.rb:35:in `call_sentry_cli'
	 5: from /Users/rist/.rbenv/versions/2.6.5/lib/ruby/2.6.0/open3.rb:101:in `popen3'
	 4: from /Users/rist/.rbenv/versions/2.6.5/lib/ruby/2.6.0/open3.rb:219:in `popen_run'
	 3: from /Users/rist/.gemexport/gems/fastlane-plugin-sentry-1.11.0/lib/fastlane/plugin/sentry/helper/sentry_helper.rb:44:in `block in call_sentry_cli'
	 2: from /Users/rist/.gemexport/gems/fastlane-plugin-sentry-1.11.0/lib/fastlane/plugin/sentry/helper/sentry_helper.rb:61:in `handle_error'
	 1: from /Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
/Users/rist/.gemexport/gems/fastlane-2.197.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': [!] Error while calling Sentry CLI (FastlaneCore::Interface::FastlaneError)

rist avatar Nov 04 '21 08:11 rist

ok found out that the error message is a bit misleading

I was only passing org_slug: and got the error about the missing org - but in fact what was really missing was the project_slug - if I pass in both it works fine

rist avatar Nov 09 '21 08:11 rist

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Apr 21 '22 00:04 github-actions[bot]