Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11262 (closed)

Opened 11 years ago

Closed 9 years ago

Bug: bin/omero import --logs doesn't send log to QA

Reported by: bpindelski Owned by:
Priority: major Milestone: 5.1.0
Component: Import Version: 4.4.8
Keywords: n.a. Cc: sbesson, fs@…, cblackburn
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

During testing of https://github.com/openmicroscopy/openmicroscopy/pull/1336, I came across the issue that specifying --logs and --report for a failing CLI import doesn't send any log files to QA. This was done on dev_4_4, so there was no per-image import log file as on develop (AFAIK). The log file was meant to be under /Users/bpindelski/omero/importer.log, but was missing.

Colin mentioned that this could have an impact also on Dropbox, as those CLI parameters are used there too.

Change History (11)

comment:1 Changed 11 years ago by sbesson

  • Cc sbesson cblackburn added

Retested during the review of https://github.com/openmicroscopy/openmicroscopy/pull/1339, same issue was found on the develop.

More thorough investigation shows the following call uploads the log and the image (see http://qa.openmicroscopy.org.uk/qa/feedback/7458/?token=ff7c054d05ed60bf68703fb0facf94ab)

bin/omero import ~/broken\ images\ from\ Andrew/created\ by\ Andrew\ -\ fails\ after\ upload/wrong-detector-settings-mk1.ome -- --report --email s.besson@dundee.ac.uk --upload --logs

while the following call does not upload any file (see http://qa.openmicroscopy.org.uk/qa/feedback/7456/?token=25a3822eb374bf11fe5a375a017a78c9)

bin/omero import ~/broken\ images\ from\ Andrew/created\ by\ Andrew\ -\ fails\ after\ upload/wrong-detector-settings-mk1.ome -- --report --email s.besson@dundee.ac.uk --logs

In both cases, "Sending log file..." is correctly displayed so the bug is likely to be in the ErrorHandler?.sendErrors() method

comment:2 Changed 10 years ago by jburel

  • Cc fs@… added; jamoore cblackburn removed
  • Milestone changed from OMERO-4.4.x to 5.0.0-beta2

Review as part of Beta2 import work.

comment:3 Changed 10 years ago by jburel

  • Owner set to cblackburn

comment:4 Changed 10 years ago by jamoore

  • Owner changed from cblackburn to jamoore
  • Status changed from new to accepted

comment:5 Changed 10 years ago by jamoore

  • Cc atarkowska added

Certainly just reproduced on develop. Couple of issues:

  • passing --logs with --report does nothing. This is a usability issue.
  • passing both of the above creates a QA item, but no logs are upload.

Quite likely the old HTTP code from the importer is now out of sync.

comment:6 Changed 10 years ago by jamoore

  • Owner changed from jamoore to bpindelski

Things as I understand them:

  • Python args are properly being parsed to CommandLineImporter
  • but ome.formats.importer.util.ErrorHandler.sendErrors() is not doing its job of uploading a client-side import file.

comment:7 Changed 10 years ago by bpindelski

This might be more complicated than it looks at the surface. If a user specifies the usual required options and additionally --report --logs, the code path will reach blitz/src/ome/formats/importer/util/ErrorHandler.java. There we have

if (sendLogs)
{
    errorContainer.addFile(config.getLogFile());
}

config is an instance of ome.formats.importer.ImportConfig. The getLogFile() method calls getLogFile() on ome.formats.importer.util.IniFileLoader which finally has a hard-coded path pointing to <user_home_folder>/omero/importer.log. That explains why no file is found (as it's not being created in the first instance).

Two questions arise:

  1. Should we keep using importer.log? If so, this code path will need to be checked and fixed so that the import process creates the necessary log file.
  2. If we want per-file import logs (as it they exist on develop) to be uploaded, then the code path starting from ImportConfig is broken (i.e. relies on dev_4_4 logic) and need a bigger refactoring.

comment:8 Changed 10 years ago by jamoore

  1. importer.log should still be generated. Did it stop being generated when we moved to logback?
  2. I'm not exactly sure what you mean by "per file". If you mean each of the import logs from the server-side filesets, then that will need to be an RFE for later.

comment:9 Changed 10 years ago by bpindelski

Answering 2) first:
Yes, that's what I meant. Since there was no clear explanation, I thought that the --logs option would send import logs in the develop form (i.e. one per image file). As that isn't the case and (as you mentioned) requires an RFE, I shall debug what is happening with importer.log.

comment:10 Changed 10 years ago by bpindelski

  • Cc cblackburn added; atarkowska removed
  • Milestone changed from 5.0.0-beta2 to 5.0.0-beta3
  • Owner bpindelski deleted

comment:11 Changed 9 years ago by jburel

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.98002 sec.)

We're Hiring!