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

SQL error when create LogPoint in some methods. #79

Open
ismadirolas opened this issue Feb 6, 2023 · 1 comment
Open

SQL error when create LogPoint in some methods. #79

ismadirolas opened this issue Feb 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ismadirolas
Copy link

ismadirolas commented Feb 6, 2023

Describe the bug
Hello,
We are trying out this tool to incorporate it to our company and I was able to create log points in some of my classes throw VSCode, but there are cases that I get the next error:
Sidekick: Error occurred while putting logpoint to class [email protected]/*****/ApplicationPlatformRepositoryImpl.java?ref=0fc9cb298a0fcbe7fdb15d4f1da8088f23b3dcc0 on line 176 from client *****: PreparedStatementCallback; SQL [INSERT INTO LogPoint(id, workspace_id, user_id, file_name, line_no, client, condition_expression, expire_secs, expire_count, file_hash, disabled, expire_timestamp, application_filters, log_expression, stdout_enabled, log_level, webhook_ids, from_api, probe_name, tags) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ]; Data truncation: Data too long for column 'id' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'id' at row 1

The method looks like the next one:

  public Mono<ApplicationConfig> getApplicationConfig(final String applicationId) {
    return Mono.defer(() -> PlatformResourceIdValidator.validateApplicationId(this.idGenerator, applicationId))
        .flatMap(platAppId -> {
          final AppWorkloadStrategy strategy = this.appWorkloadStrategyFactory.get(platAppId.getApplicationType());
          return strategy.getApplicationScalingConfig(platAppId);
        })
        .onErrorResume(IllegalArgumentException.class, thr -> {
          LOGGER.error(thr.getMessage(), thr);
          return Mono.error(new NotFoundException(String.format(APPLICATION_NOT_FOUND, applicationId), thr));
        }`)
        .subscribeOn(Schedulers.boundedElastic());
  }

It happens when I try to create the logpoint inside the flatMap lambda expression.

Expected behavior
Log point created successfully.

Please complete the following information

  • OS: [Linux Ubuntu]
  • Arch: [x64]
  • Client [VSCode]
  • Runtime: [Java]
@ismadirolas ismadirolas changed the title MYSQL error when create LogPoint in some methods. SQL error when create LogPoint in some methods. Feb 6, 2023
@boroskoyo boroskoyo added the bug Something isn't working label Feb 13, 2023
@boroskoyo
Copy link
Contributor

Hi there @ismadirolas , seems like an issue while putting points inside inner functions. @serkan-ozal please investigate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants