Skip to content

Conversation

@bazsi
Copy link
Collaborator

@bazsi bazsi commented Jan 22, 2022

The plan to release syslog-ng 4.0 would be as follows:

  • we are accumulating changes destined for 4.0 by merging them into
    subsequent syslog-ng 3.x releases, but working in a compatible mode so
    that no changes would be visible to 3.x users.

  • Usually we report changes to behavior using warnings at
    startup and we do this release-by-release. With 4.0, we expect a broader
    set of changes that we would like to present to users as a whole. For
    this reason we will suppress these warnings for changes we plan for
    4.0 at least until the user explicitly indicates interest in the
    experimental features.

  • the user can start using the new features as follows:

    • by using @Version: 3.255 in a config, the warnings about changes get
      enabled (while continuing to work in 3.x compatibility mode)

    • by using @Version: 4.0 in a config, the changes are enabled and
      syslog-ng would start working in the new mode we plan for 4.0.

    • in a way all new features/changes would operate behind a feature flip,
      which the user can control using the @Version line in a
      configuration.

  • the features provided by the 4.0 mode are experimental and this mode is
    not intended for production use.

  • once the 4.0 features/changes are all baked, we release syslog-ng 4.0,
    which would make the new features/behaviours official. The v3.255 mode
    of operation would be disabled and the feature flip removed. Essentially
    the only change would be that upgrade warnings would always get enabled.

Signed-off-by: Balazs Scheidler bazsi77@gmail.com

@kira-syslogng
Copy link
Contributor

Build SUCCESS

@bazsi
Copy link
Collaborator Author

bazsi commented Jan 23, 2022

The dbld images fail to build as "dwarves" (a tool I use in devshell from time to time) has become missing from debian-testing. It should resurface tomorrow, so I am not removing it from the build manifest.

@bazsi bazsi changed the title versioning: add versioning framework for the syslog-ng 4.0 transition versioning: add versioning framework for the syslog-ng 4.0 transition (4.0) Jan 27, 2022
@kira-syslogng
Copy link
Contributor

Build SUCCESS

MrAnno
MrAnno previously approved these changes Jan 28, 2022
Copy link
Collaborator

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kira-syslogng
Copy link
Contributor

Build SUCCESS

MrAnno
MrAnno previously approved these changes Jan 29, 2022
@Kokan Kokan self-requested a review January 30, 2022 20:11
@MrAnno
Copy link
Collaborator

MrAnno commented Jan 31, 2022

(Just for the record: I approved the PR to indicate that I like the idea of how we'd like to transition into v4. We're still discussing the details and its internal implications.)

@MrAnno MrAnno dismissed their stale review February 2, 2022 14:35

Needs re-review

@MrAnno MrAnno self-requested a review February 2, 2022 14:35
@alltilla alltilla added this to the syslog-ng-3.36 milestone Feb 3, 2022
@bazsi bazsi force-pushed the the-road-to-4-dot-0 branch 2 times, most recently from 3228fbc to e60318d Compare February 9, 2022 18:30
@bazsi
Copy link
Collaborator Author

bazsi commented Feb 9, 2022

I have now implemented version number based feature flips. I would appreciate help in checking if this would work your internal builds of PE.

Also, if version_from_user() is not used in versioning.h, can we eliminate that indirection? Also, a lot of defines in versioning.h is not actually used in the codebase, I'd probably eliminate that too.

@MrAnno
Copy link
Collaborator

MrAnno commented Feb 9, 2022

Thanks, @bazsi.

I'll check the internal parts by Friday.

@kira-syslogng
Copy link
Contributor

Build SUCCESS

@MrAnno
Copy link
Collaborator

MrAnno commented Feb 10, 2022

@bazsi I think I got a bit confused at the "OSE handover" discussion, the current versioning PR makes it possible to map internal versions, for example:
https://gist.github.com/MrAnno/26bf5e3ee626790c6834dbcb0dfabc2e

It seems a bit overcomplicated because we need to redefine what VERSION_VALUE_4_0 and VERSION_VALUE_3_LAST mean anyway (making next_major a bit unnecessary), but it works in my opinion. I'll test it in practice tomorrow.

@bazsi bazsi force-pushed the the-road-to-4-dot-0 branch from e60318d to 695df25 Compare February 12, 2022 13:00
@bazsi
Copy link
Collaborator Author

bazsi commented Feb 12, 2022

@bazsi I think I got a bit confused at the "OSE handover" discussion, the current versioning PR makes it possible to map internal versions, for example: https://gist.github.com/MrAnno/26bf5e3ee626790c6834dbcb0dfabc2e

It seems a bit overcomplicated because we need to redefine what VERSION_VALUE_4_0 and VERSION_VALUE_3_LAST mean anyway (making next_major a bit unnecessary), but it works in my opinion. I'll test it in practice tomorrow.

I convinced myself to simplify things a bit, so we won't need VERSION_VALUE_3_LAST and use the (flip_over_version - 1). With that you will only need to redefine VERSION_VALUE_4_0 and and FEATURE_TYPING_MIN_VERSION both to 0x0800

@kira-syslogng
Copy link
Contributor

Build SUCCESS

@MrAnno
Copy link
Collaborator

MrAnno commented Feb 15, 2022

Thank you.

We'll test the current version of this PR internally with your other 4.0 branches.
Once it's done (hopefully at the beginning of next week), I'll reapprove the PR and move forward with the review of the other PRs that depend on this one.

Until then, could you help with the review of opened PRs, please? There are 32 opened pull request, 12 of them is related to the 4.0 changes, which I'm trying to focus on, but it is still a lot. :)

@MrAnno
Copy link
Collaborator

MrAnno commented Feb 18, 2022

Internal tests: apart from the above minor things, everything else seems to be OK.

The plan to release syslog-ng 4.0 would be as follows:

  * we are accumulating changes destined for 4.0 by merging them into
    subsequent syslog-ng 3.x releases, but working in a compatible mode so
    that no changes would be visible to 3.x users.

  * Usually we report changes to behavior using warnings at
    startup and we do this release-by-release. With 4.0, we expect a broader
    set of changes that we would like to present to users as a whole. For
    this reason we will suppress these warnings for changes we plan for
    4.0 at least until the user explicitly indicates interest in the
    experimental features.

  * the user can start using the new features as follows:

    - by using @Version: 3.255 in a config, the warnings about changes get
      enabled (while continuing to work in 3.x compatibility mode)

    - by using @Version: 4.0 in a config, the changes are enabled and
      syslog-ng would start working in the new mode we plan for 4.0.

    - in a way all new features/changes would operate behind a feature flip,
      which the user can control using the @Version line in a
      configuration.

  * the features provided by the 4.0 mode are experimental and this mode is
    not intended for production use.

  * once the 4.0 features/changes are all baked, we release syslog-ng 4.0,
    which would make the new features/behaviours official. At this point:

    - the FEATURE_XXXXX_MIN_VERSION would be changed to 0 OR
    - the feature flip completely removed from the codebase

    The first option is needed when PE is not in sync with the plan of
    introducing said change. The 2nd can be done when derived products
    are not interesting in keeping this conditional anymore.

    Essentially both of the above would cause upgrade warnings to
    always get enabled for old config versions.

Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
@bazsi bazsi force-pushed the the-road-to-4-dot-0 branch from 695df25 to eda5a21 Compare February 18, 2022 14:56
@bazsi
Copy link
Collaborator Author

bazsi commented Feb 18, 2022

I've resolved all comments with an update to the branch.

@kira-syslogng
Copy link
Contributor

Build SUCCESS

Copy link
Collaborator

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@bazsi Thank you very much for doing this in a way that helps our internal builds.

@Kokan Kokan self-requested a review February 18, 2022 16:03
@Kokan Kokan merged commit 1cd66f0 into syslog-ng:master Feb 23, 2022
folti pushed a commit to balabit-deps/syslog-ng-7.0-core that referenced this pull request Sep 10, 2025
syslog-ng/syslog-ng#3884

The 4.0 feature set is currently mapped as PE 8.0, so in PE 7, all new
4.0 features are be disabled by default (with no warnings).

This can changed easily by remapping the below constants or by releasing
PE 8.0.

Note: Users can try new features by specifying 8.0 as config version.

Signed-off-by: László Várady <laszlo.varady@balabit.com>
folti pushed a commit to balabit-deps/syslog-ng-7.0-core that referenced this pull request Sep 10, 2025
syslog-ng/syslog-ng#3884

The 4.0 feature set is currently mapped as PE 8.0, so in PE 7, all new
4.0 features are be disabled by default (with no warnings).

This can changed easily by remapping the below constants or by releasing
PE 8.0.

Note: Users can try new features by specifying 8.0 as config version.

Signed-off-by: László Várady <laszlo.varady@balabit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants