F5Networks / f5-appsvcs-extension

F5 BIG-IP Application Services 3 Extension
Apache License 2.0
164 stars 53 forks source link

Allow non base releases as schemaVersion #760

Closed c4lcifer closed 7 months ago

c4lcifer commented 1 year ago

Environment

Summary

Non Base releases like LTS are not viable schemaVersions

Is your feature request related to a problem? Please describe.

Summary

AS3 schema version throws error when using correct as3 version as schema version

Steps To Reproduce

Steps to reproduce the behavior:

  1. Submit the following declaration:

    {
    "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/master/schema/latest/as3-schema.json",
    "class": "AS3",
    "action": "deploy",
    "updateMode": "selective",
    "trace": true,
    "persist": true,
    "declaration": {
        "class": "ADC",
        "schemaVersion": "3.46.1",
        "id": "20230918T120916",
        "Common": {
            "class": "Tenant",
            "Shared": {
                "class": "Application",
                "template": "shared",
                "VA_1_1_1_1": {
                    "class": "Service_Address",
                    "virtualAddress": "1.1.1.1",
                    "trafficGroup": "/Common/traffic-group-1"
                }
            }
        }
    }
    }
  2. Observe the following error response:

    {
    "id": "afe5d09c-66b7-49d8-ab85-5a41d6a94451",
    "results": [
        {
            "code": 422,
            "errors": [
                "/schemaVersion: should be equal to one of the allowed values [\"3.0.0\",\"3.1.0\",\"3.2.0\",\"3.3.0\",\"3.4.0\",\"3.5.0\",\"3.6.0\",\"3.7.0\",\"3.8.0\",\"3.9.0\",\"3.10.0\",\"3.11.0\",\"3.12.0\",\"3.13.0\",\"3.14.0\",\"3.15.0\",\"3.16.0\",\"3.17.0\",\"3.18.0\",\"3.19.0\",\"3.20.0\",\"3.21.0\",\"3.22.0\",\"3.23.0\",\"3.24.0\",\"3.25.0\",\"3.26.0\",\"3.27.0\",\"3.28.0\",\"3.29.0\",\"3.30.0\",\"3.31.0\",\"3.32.0\",\"3.33.0\",\"3.34.0\",\"3.35.0\",\"3.36.0\",\"3.37.0\",\"3.38.0\",\"3.39.0\",\"3.40.0\",\"3.41.0\",\"3.42.0\",\"3.43.0\",\"3.44.0\",\"3.45.0\",\"3.46.0\"]"
            ],
            "declarationFullId": "",
            "message": "declaration is invalid"
        }
    ],
    "declaration": {}
    }

Expected Behavior

As 3.46.1 is a correct version, it should be allowed to use this as a schemaVersion too.

Actual Behavior

The declaration gets rejected with the error, that the version used is not a correct version for a schema.

Describe the solution you'd like

I understand that probably the 3.46.0 schema version is not different from the 3.46.1 and it seems there has never been an extra schema version for LTS. But i think it should be allowed to use the version in the schema an let AS3 handle itself if it falls back to other versions

I use automated systems to pull the AS3 version from ther device to fill out the schemaVersion in the declaration. Thats why we ran into this 'problem'

Describe alternatives you've considered

I automated to always fall back to the base version when i find another number than 0 in the release. Words fine, but i think its just a hack.

dstokesf5 commented 1 year ago

For some historical context, we found that attempting to keep up on the patch versions in the schema complicated our branching and release process without providing enough benefit. Because AS3 uses semantic versioning, the patch versions will have no schema changes. If we could go back in time to the first AS3 release, we would have made the version string in the schema only include the major and minor component of the version.

When I use AS3, I ignore the patch version and consider it extra decoration. Similar to having a "v" at the start of version string. If I wanted communicate that a declaration is intended to be used with an LTS version of AS3, I would do so with a remark field somewhere.

I will leave the decision of what to do with this GitHub issue up to the current product management team.

sunitharonan commented 1 year ago

Thank you for reaching out. In order to prioritize and understand the issue better, please reach out to us at automation_toolchain_pm@f5.com

sunitharonan commented 7 months ago

Closing as we haven't heard from you.