DEV Community

Devops Kiponos
Devops Kiponos

Posted on

Skip tests while build running?

That's easy with the right SDK!

There is a free service allowing you exactly that!

  1. Your build is running.
  2. You enter your account online and change a value.
  3. The SDK in your tests instantly detect the change at runtime.

That's it.

The SDK has:

  • get(fieldName)

    • Any time you get, it's always the latest value you have online in your dashboard!
  • onValueChanged( changeInfo ) { ...your code to handle change... changeInfo.getFieldName(), changeInfo.getValue(), etc... }

    • When you change a value online, your code can react instantly, in true real-time to the change! the SDK is notified instantly using internal, highly secured websocket connection.

Latency is ZERO! and here is why:

  • Kiponos server dispatch delta-changes only directly to your SDK.
  • The SDK always have the latest values in-memory, locally in your code.
  • Accessing your data via the SDK is exactly the same as accessing any local variable in your code!
  • Only the delta-change dispatch will cost between 1ms to 3ms. After that, the SDK has the latest value locally so your code runs on latest values - from the update point on - with true zero latency!

How to install and use the SDK

(free forever account)


Get the SDK Keys for your envs here: kiponos.io

Copy these tokens generated for you in your account (in "Connect Your App") and set them in your env:

export KIPONOS_ID="your-kiponos-id"
export KIPONOS_ACCESS="your-kiponos-access"
Enter fullscreen mode Exit fullscreen mode

For Python SDK:

To install the Kiponos Python SDK, run the command:

pip install kiponos-pysdk
Enter fullscreen mode Exit fullscreen mode

(Python 3.12 or higher).

Usage

from kiponos_pysdk import KiponosClient

client = KiponosClient(kiponos="['my-app']['1.0.0']['dev']['base']")
client.connect()

# Get a config value
print(client.get("timeout", "not found"))  # e.g., "100"
Enter fullscreen mode Exit fullscreen mode

For Java SDK (fully compatible with SpringBoot):

  • Simply include the SDK in your Gradle build file:
dependencies {
    implementation 'io.kiponos:sdk-boot-3:4.4.0.250319'
}
Enter fullscreen mode Exit fullscreen mode

Or Maven:

<dependency>
    <groupId>io.kiponos</groupId>
    <artifactId>sdk-boot-3</artifactId>
    <version>4.4.0.250319</version>
</dependency>
Enter fullscreen mode Exit fullscreen mode
  • Usage:
import io.kiponos.Kiponos;

public class Example {
    public static void main(String[] args) {
        Kiponos cfg = Kiponos.createForCurrentTeam();

        // Example of using the SDK.
        // get always return the latest value you have online.
        String paymentsHealthUrl = cfg.path("Health-Checks", "PaymentService").get("health-url");

        System.out.println("Payments Health URL: " + paymentsHealthUrl);

        // Optional - if you also want to run some 
        // code anytime a specific field is changed: 
        cfg.afterValueUpdated(valUpdated -> {
            // Handle the updated value
            if ("health-api".equals(valUpdated.getKey())) {
                // Code instantly runs when the value updated.
            }
        });
    }
}

Enter fullscreen mode Exit fullscreen mode

For CICD Tests

Exactly the same in tests context as in main:

Just define your config key that control your tests

E.g: Define enable-tests directly in the root config folder.

In your test, use JUnit Assumptions to powerfully integrate with Kiponos SDK:

package io.kiponos;

import io.kiponos.sdk.Kiponos;
import io.kiponos.sdk.configs.Folder;
import org.assertj.core.api.Assumptions;
import org.junit.jupiter.api.Test;

public class ExploreConditionalTest {
    static Folder cfg = Kiponos.createForCurrentTeam().getRootFolder();

    @Test
    void testAssumptions() {
        Assumptions.assumeThat(cfg.getBoolean("tests-enabled")).isTrue();
        System.out.println("Done");
    }
}
Enter fullscreen mode Exit fullscreen mode

The Magic: while your CICD runs, whenever you change the "enable-tests" value online, the running tests will be skipped

Advantages and features of the Kiponos.io real-time service:

  • Role based access per team.
  • Manage runtime environments independently!
  • Same code, run on any env with matching SDK Key.
  • Forget about config files! totally!
    • SDK detects your env var and Kiponos serves the correct config.
    • You run local dev, staging, tests, production without a single config file!
    • No more yamls, no more properties. Just code :)
    • Mostly: You control and modify all envs independently.
  • Envs Hierarchy: change parent env value, and all child envs react instantly.

    • For example, you have Staging as base config with max-queue-size = 500, Local Dev extends it having all that is defined in staging but overrides: max-queue-size = 12. Production overrides with 20000.
    • More interesting - Non Dev teams can easily use the system. For example: Sales can define price plans in real-time and change rules without even restarting the servers! Marketing can change a logo URL or brand name - which will instantly affect all environments - dev,staging,production,cicd - all of them in real-time without even a refresh! because all is instantly dispatched and handled.
  • And that magic is totally free!


Enjoy the config revolution!

Signup at: Kiponos.io Signup

Top comments (0)