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

Process Output don't show full log #219

Closed
yekz opened this issue May 19, 2016 · 16 comments
Closed

Process Output don't show full log #219

yekz opened this issue May 19, 2016 · 16 comments

Comments

@yekz
Copy link

yekz commented May 19, 2016

in ./shipit.sh, I run composer install, npm install and so on
this step run failed, but Process Output don't show full log, so I can't know what's wrong with this step

And, refer to the gitlab CI system, auto, real time, highlighted output is very very practical!

(sorry for my bad English:))

@yekz
Copy link
Author

yekz commented May 19, 2016

8cd30fa4-8ce9-48b8-960f-42624641ca01

@REBELinBLUE
Copy link
Owner

Hmm, that is odd, it should be showing the full output. Can you have a look in the DB and see if the full data is there in the ServerLogs table?

@yekz
Copy link
Author

yekz commented May 20, 2016

Same in DB
I see column type of output is text, maybe caesed by TEXT is a string data type that can store up to 65,535 characters?

@yekz
Copy link
Author

yekz commented May 20, 2016

I'll change column type to LONGTEXT and retry

@REBELinBLUE
Copy link
Owner

Hmm, that is odd, migration 2015_05_07_145127_change_output_column.php should have done that

@lorvent
Copy link

lorvent commented May 28, 2016

I do have this problem when log is too lengthy

@REBELinBLUE
Copy link
Owner

Can you show me the content of the migrations table?

@lorvent
Copy link

lorvent commented May 28, 2016

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`migration`, `batch`) VALUES
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2015_03_15_155553_create_groups_table', 1),
('2015_03_16_212800_create_projects_table', 1),
('2015_03_16_231102_create_servers_table', 1),
('2015_03_17_145654_create_jobs_table', 1),
('2015_03_17_180607_create_deployments_table', 1),
('2015_03_18_101907_create_commands_table', 1),
('2015_03_18_144954_create_deploy_steps_table', 1),
('2015_03_18_195341_create_server_logs_table', 1),
('2015_03_19_180101_create_failed_jobs_table', 1),
('2015_03_20_084213_create_commands_servers_table', 1),
('2015_04_01_213509_create_notifications_table', 1),
('2015_04_10_150753_add_deployment_reason', 1),
('2015_04_14_202614_add_optional_step', 1),
('2015_05_05_205106_add_port_to_servers', 1),
('2015_05_06_114213_create_heartbeats_table', 1),
('2015_05_07_145127_change_output_column', 1),
('2015_05_13_121650_set_deployment_branch', 1),
('2015_05_23_122535_create_shared_files_table', 1),
('2015_05_23_230942_create_project_files_table', 1),
('2015_05_25_004610_create_notify_emails_table', 1),
('2015_05_27_234354_create_url_checks_table', 1),
('2015_05_31_193009_add_is_report_default', 1),
('2015_06_14_001635_drop_script_column', 1),
('2015_06_16_213224_add_is_template_column', 1),
('2015_06_17_150003_add_server_ordering', 1),
('2015_06_19_134430_add_notify_failure_only_flag', 1),
('2015_06_24_214737_seperate_template_group', 1),
('2015_06_27_182150_add_chgemail_token_to_users_table', 1),
('2015_06_28_122132_add_avatar_to_users', 1),
('2015_08_14_130654_add_is_command_default_on', 1),
('2015_09_17_145938_add_additional_deployment_status', 1),
('2015_10_04_225016_add_user_preferences', 1),
('2015_10_06_083529_add_is_webhook', 1),
('2015_10_06_114732_add_webhook_source_details', 1),
('2015_12_31_144850_create_variables_table', 1),
('2015_12_31_195512_add_committer_email', 1),
('2016_01_01_004511_add_cancelled_deployment_status', 1),
('2016_01_10_011056_add_google_2fa_code', 1),
('2016_01_12_132425_add_change_branch_to_project', 1),
('2016_01_28_134531_add_composer_dev_option', 1),
('2015_11_17_160405_create_refs_table', 2),
('2015_12_10_073606_add_last_mirrored_date', 2),
('2016_02_15_192843_add_group_ordering', 2);

@REBELinBLUE
Copy link
Owner

Hmm, so laravel says it has executed 2015_05_07_145127_change_output_column.php o_O Can you DESCRIBE server_logs ?

@lorvent
Copy link

lorvent commented May 28, 2016

--
-- Table structure for table `server_logs`
--

CREATE TABLE `server_logs` (
  `id` int(10) UNSIGNED NOT NULL,
  `server_id` int(10) UNSIGNED NOT NULL,
  `deploy_step_id` int(10) UNSIGNED NOT NULL,
  `status` enum('1','2','3','4','0') COLLATE utf8_unicode_ci NOT NULL DEFAULT '1',
  `output` text COLLATE utf8_unicode_ci,
  `started_at` datetime DEFAULT NULL,
  `finished_at` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `server_logs`
--
ALTER TABLE `server_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `server_logs_server_id_foreign` (`server_id`),
  ADD KEY `server_logs_deploy_step_id_foreign` (`deploy_step_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `server_logs`
--
ALTER TABLE `server_logs`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `server_logs`
--
ALTER TABLE `server_logs`
  ADD CONSTRAINT `server_logs_deploy_step_id_foreign` FOREIGN KEY (`deploy_step_id`) REFERENCES `deploy_steps` (`id`),
  ADD CONSTRAINT `server_logs_server_id_foreign` FOREIGN KEY (`server_id`) REFERENCES `servers` (`id`);

@REBELinBLUE
Copy link
Owner

REBELinBLUE commented May 28, 2016

Thanks. That is very odd! One last thing, if you run php artisan tinker and then enter var_dump($_ENV['DB_TYPE']) what do you get?

@lorvent
Copy link

lorvent commented May 28, 2016

it says mysql 😄

string(5) "mysql"
=> null

@REBELinBLUE
Copy link
Owner

REBELinBLUE commented May 28, 2016

Exactly what it should say, even more confused now. The migration is

if (isset($_ENV['DB_TYPE']) && $_ENV['DB_TYPE'] === 'mysql') {
    DB::statement('ALTER TABLE server_logs CHANGE output output longtext');
}

So there is literally no reason I can see why it wouldn't have changes the table, indeed it has on my server 😕

@lorvent
Copy link

lorvent commented May 28, 2016

just now i made a deployment, same thing..

looks like dbal also added in composer.json, but you are using DB::statement

mysql command using modify like alter table server_logs modify output LONGTEXT works

i just tried in tinker and worked properly.

unfortunately, we can't make use of schema builder change() as we have status column of type enum.

@REBELinBLUE
Copy link
Owner

Yes that is why I am having to use DB::statement. I just don't understand why it hasn't worked on your install, and presumably @yekz's

@lorvent
Copy link

lorvent commented May 28, 2016

may be mysql version is the reason but above query working fine in my installation.

REBELinBLUE added a commit that referenced this issue May 29, 2016
* master:
  Updated CHANGELOG
  Clean up
  Updated dependencies
  Fixes #228
  Fixes #208 - Checks that reds and beanstalkd are running before starting installation
  Fixes #212 Time out slack notifications after 60 minutes
  Added timestamp to slack notifications #225
  Clean up
  Clean up
  Change output column, again, hopefully to fix #219
  Updated dependencies
  Fixes #226 Failing to find composer if not in PATH
  Fix #223 - Allow the user to be inherited from the server
  Change webhook URL
  Clean up some code duplication
  Updated JSON Webtoken
  Missing file
  Fix #205 Bitbucket links are incorrect
  Fixes #207 - Clean up deployments stuck on aborting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants