Giter VIP home page Giter VIP logo

Comments (5)

icyield avatar icyield commented on May 21, 2024

Looking at the SwiftEnterpriseDemo. They do init of SwiftMetricsBluemix differently.

I removed the
// autoScalingService = try initializeServiceAutoscaling(cloudEnv: cloudEnv)
In Application.swift and and instead added in Metrics.swift

var bluemixMetrics : SwiftMetricsBluemix?
func initializeMetrics(app: App) {
do {
let metrics = try SwiftMetrics()
bluemixMetrics = SwiftMetricsBluemix(swiftMetricsInstance: metrics)

And auto scale dials now work. Also I had explicitly bumped packages to from 2.1.

Not sure if the packages update or the removal of the try initializeServiceAutoscaling were actually required for the fix.

from kitura-cli.

seabaylea avatar seabaylea commented on May 21, 2024

@tunniclm @nhardman Is this a problem with the way autoscaling is added in kitura create?

from kitura-cli.

tunniclm avatar tunniclm commented on May 21, 2024

Just checked this out and there's an order of execution bug in the generated code.
The metrics get initialized after the autoscaling service and so the autoscaling service will always fail (it should log a message).

This problem was introduced into https://github.com/IBM-Swift/generator-swiftserver relatively recently when the application was refactored. Autoscaling is the only service that uses the metrics, so should be the only one affected.

@nhardman Can you take a look at this? Also, I'm not sure how this slipped through testing so we should also check why this wasn't picked up.

from kitura-cli.

ianpartridge avatar ianpartridge commented on May 21, 2024

@nhardman @tunniclm thanks for taking a look - can you raise an issue against https://github.com/IBM-Swift/generator-swiftserver link it here and close this issue? Thanks.

from kitura-cli.

ianpartridge avatar ianpartridge commented on May 21, 2024

Tracked by IBM-Swift/generator-swiftserver#432

from kitura-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.