Page MenuHomeSoftware Heritage

Make the kafka group_id prefix configurable in the config file
ClosedPublic

Authored by douardda on Mar 18 2022, 2:11 PM.

Details

Summary

rather than hardcoding it to 'swh-dataset-export-', use the 'group_id'
value from the 'journal' section of the config file as prefix, if given
9otherwise default to the former value).

This is needed because current auth policy of swh kafka cluster only allow
group_id to start with the actual login for authenticated connection.
So we need to be able to specify this group_id prefix.

Depends on D7381.

Diff Detail

Repository
rDDATASET Datasets
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7382 (id=26684)

Could not rebase; Attempt merge onto 68f9bd2028...

Updating 68f9bd2..986885a
Fast-forward
 requirements-swh.txt            |  6 +++---
 swh/dataset/cli.py              | 10 +++++++++-
 swh/dataset/exporters/orc.py    | 31 +++++++++++--------------------
 swh/dataset/journalprocessor.py | 32 +++++++++++++++++++++-----------
 swh/dataset/relational.py       | 15 +++++++++------
 swh/dataset/test/test_orc.py    | 14 ++++++--------
 6 files changed, 59 insertions(+), 49 deletions(-)
Changes applied before test
commit 986885abd6d3ab95df76f02746c016e00a53ba2b
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:50:15 2021 +0100

    Make the kafka group_id prefix configurable in the config file
    
    rather than hardcoding it to 'swh-dataset-export-', use the 'group_id'
    value from the 'journal' section of the config file as prefix, if given
    9otherwise default to the former value).
    
    This is needed because current auth policy of swh kafka cluster only allow
    group_id to start with the actual login for authenticated connection.
    So we need to be able to specify this group_id prefix.

commit 048f273838cdba3c8dfbebfb9768fc675f205d74
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:41:28 2021 +0100

    Use a named logger for journalprocessor.py
    
    and add a few more debug logging statements.

commit 8cae6adb5c63af22bc798ebe7072a33978f3037e
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:44:49 2021 +0100

    Update JournalClientOffsetRanges for swh.journal 0.9
    
    deserialize_message() now takes an optional 'object_type' argument.

commit 8c2b5e951c1a1195c9ec3e700cb9da60711a96ab
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Mar 18 11:46:37 2022 +0100

    Encode TimestampWithTimezone as (sec, usec, offset) in ORC file
    
    instead of using the ORC Timestamp format, since we cannot always encode
    them in this format.
    
    The offset is encoded as binary (byte string), following recent evolutions
    of swh-model.
    
    This makes swh-dataset compatible with swh-model 5.

See https://jenkins.softwareheritage.org/job/DDATASET/job/tests-on-diff/32/ for more details.

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/dataset/cli.py
57–59

clearer IMO.

on the first read I assumed 'swh-dataset-export-' was the default for --export-id

swh/dataset/journalprocessor.py
391

* sigh *

This revision is now accepted and ready to land.Mar 18 2022, 2:37 PM

Build is green

Patch application report for D7382 (id=26705)

Could not rebase; Attempt merge onto 68f9bd2028...

Updating 68f9bd2..f7fe626
Fast-forward
 requirements-swh.txt            |  6 +++---
 swh/dataset/cli.py              | 10 +++++++++-
 swh/dataset/exporters/orc.py    | 36 ++++++++++++++++-------------------
 swh/dataset/journalprocessor.py | 34 ++++++++++++++++++++++-----------
 swh/dataset/relational.py       | 15 +++++++++------
 swh/dataset/test/test_orc.py    | 42 +++++++++++++++++++++++++++++++++--------
 6 files changed, 94 insertions(+), 49 deletions(-)
Changes applied before test
commit f7fe626c2db82dc25b58d01e84c6f017867da7c9
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:50:15 2021 +0100

    Make the kafka group_id prefix configurable in the config file
    
    rather than hardcoding it to 'swh-dataset-export-', use the 'group_id'
    value from the 'journal' section of the config file as prefix, if given
    9otherwise default to the former value).
    
    This is needed because current auth policy of swh kafka cluster only allow
    group_id to start with the actual login for authenticated connection.
    So we need to be able to specify this group_id prefix.

commit 4f14a95aaadabc1d2036a9c31c18e6a78befb44d
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:41:28 2021 +0100

    Use a named logger for journalprocessor.py
    
    and add a few more debug logging statements.

commit 316d51b6da36719bca767c78ad04402c609d5abe
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:44:49 2021 +0100

    Update JournalClientOffsetRanges for swh.journal 0.9
    
    deserialize_message() now takes an optional 'object_type' argument.

commit ae440431049470ecac6aca0e8cbed4a51cde0c09
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Mar 18 11:46:37 2022 +0100

    Encode TimestampWithTimezone as (sec, usec, offset) in ORC file
    
    instead of using the ORC Timestamp format, since we cannot always encode
    them in this format.
    
    The offset is encoded as binary (byte string), following recent evolutions
    of swh-model.
    
    This makes swh-dataset compatible with swh-model 5.

See https://jenkins.softwareheritage.org/job/DDATASET/job/tests-on-diff/44/ for more details.

swh/dataset/journalprocessor.py
391

* sigh *

I have no idea why I wrote this part of the diff...

swh/dataset/journalprocessor.py
391

my annoyance was with being reminded the Kafka lib uses dots in config values

Build has FAILED

Patch application report for D7382 (id=26775)

Could not rebase; Attempt merge onto 68f9bd2028...

Updating 68f9bd2..c7cc729
Fast-forward
 requirements-swh.txt            |  6 ++--
 swh/dataset/cli.py              | 10 +++++-
 swh/dataset/exporters/orc.py    | 79 +++++++++++++++++++++++++++++++----------
 swh/dataset/journalprocessor.py | 34 ++++++++++++------
 swh/dataset/relational.py       | 15 ++++----
 swh/dataset/test/test_orc.py    | 57 ++++++++++++++++++++++-------
 6 files changed, 150 insertions(+), 51 deletions(-)
Changes applied before test
commit c7cc72902575271d5f1dbef77f94faf255f86868
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:50:15 2021 +0100

    Make the kafka group_id prefix configurable in the config file
    
    rather than hardcoding it to 'swh-dataset-export-', use the 'group_id'
    value from the 'journal' section of the config file as prefix, if given
    9otherwise default to the former value).
    
    This is needed because current auth policy of swh kafka cluster only allow
    group_id to start with the actual login for authenticated connection.
    So we need to be able to specify this group_id prefix.

commit c508c673043458a419f2eeb0d5a2fb60b12aa007
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:41:28 2021 +0100

    Use a named logger for journalprocessor.py
    
    and add a few more debug logging statements.

commit d49db10f0bf7174ea4f2742d5d5ac8c8e25b707a
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:44:49 2021 +0100

    Update JournalClientOffsetRanges for swh.journal 0.9
    
    deserialize_message() now takes an optional 'object_type' argument.

commit 69e806698bbb6df42bfa3520681e0203f91d8a65
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Mar 18 11:46:37 2022 +0100

    Encode TimestampWithTimezone as (timestamp, offset, raw_offset_bytes) in ORC file
    
    ie. use the standard ORC Timestamp format (aka a couple
    (seconds, nanoseconds)) with 2 extra fields for the offset.
    
    The offset is stored as an integer (in minutes), but the raw offset
    value is also present as a binary string representation, following
    recent evolutions of swh-model.
    
    This makes swh-dataset compatible with swh-model 5.

Link to build: https://jenkins.softwareheritage.org/job/DDATASET/job/tests-on-diff/55/
See console output for more information: https://jenkins.softwareheritage.org/job/DDATASET/job/tests-on-diff/55/console

Build is green

Patch application report for D7382 (id=26797)

Could not rebase; Attempt merge onto 68f9bd2028...

Updating 68f9bd2..7c775ce
Fast-forward
 requirements-swh.txt            |  6 +--
 swh/dataset/cli.py              | 10 ++++-
 swh/dataset/exporters/orc.py    | 81 ++++++++++++++++++++++++++++++++---------
 swh/dataset/journalprocessor.py | 34 +++++++++++------
 swh/dataset/relational.py       | 15 +++++---
 swh/dataset/test/test_orc.py    | 59 ++++++++++++++++++++++++------
 6 files changed, 155 insertions(+), 50 deletions(-)
Changes applied before test
commit 7c775ce88ebb840d32aa70dbe6feb1a6835db518
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:50:15 2021 +0100

    Make the kafka group_id prefix configurable in the config file
    
    rather than hardcoding it to 'swh-dataset-export-', use the 'group_id'
    value from the 'journal' section of the config file as prefix, if given
    9otherwise default to the former value).
    
    This is needed because current auth policy of swh kafka cluster only allow
    group_id to start with the actual login for authenticated connection.
    So we need to be able to specify this group_id prefix.

commit 55cf5ac5cc0cb818ae23b5df4af416e57794469c
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:41:28 2021 +0100

    Use a named logger for journalprocessor.py
    
    and add a few more debug logging statements.

commit 70d9d3182de1420ba545f2f507ade8f59b2c2f33
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:44:49 2021 +0100

    Update JournalClientOffsetRanges for swh.journal 0.9
    
    deserialize_message() now takes an optional 'object_type' argument.

commit 09d2840dbd4db6e1a3dd976c44b3c628b9174741
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Mar 18 11:46:37 2022 +0100

    Encode TimestampWithTimezone as (timestamp, offset, raw_offset_bytes) in ORC file
    
    ie. use the standard ORC Timestamp format (aka a couple
    (seconds, nanoseconds)) with 2 extra fields for the offset.
    
    The offset is stored as an integer (in minutes), but the raw offset
    value is also present as a binary string representation, following
    recent evolutions of swh-model.
    
    This makes swh-dataset compatible with swh-model 5.

See https://jenkins.softwareheritage.org/job/DDATASET/job/tests-on-diff/67/ for more details.

Build is green

Patch application report for D7382 (id=26993)

Could not rebase; Attempt merge onto 68f9bd2028...

Updating 68f9bd2..4508da3
Fast-forward
 requirements-swh.txt            |  6 +--
 swh/dataset/cli.py              | 10 ++++-
 swh/dataset/exporters/orc.py    | 81 ++++++++++++++++++++++++++++++++---------
 swh/dataset/journalprocessor.py | 34 +++++++++++------
 swh/dataset/relational.py       |  3 ++
 swh/dataset/test/test_orc.py    | 59 ++++++++++++++++++++++++------
 6 files changed, 149 insertions(+), 44 deletions(-)
Changes applied before test
commit 4508da3a91ba634e3b5def318f4509a688168c9e
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:50:15 2021 +0100

    Make the kafka group_id prefix configurable in the config file
    
    rather than hardcoding it to 'swh-dataset-export-', use the 'group_id'
    value from the 'journal' section of the config file as prefix, if given
    9otherwise default to the former value).
    
    This is needed because current auth policy of swh kafka cluster only allow
    group_id to start with the actual login for authenticated connection.
    So we need to be able to specify this group_id prefix.

commit de114c20f105c0b888eb92625f4e073f97a94ae8
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:41:28 2021 +0100

    Use a named logger for journalprocessor.py
    
    and add a few more debug logging statements.

commit a8442bcf7c4311a28bea0898a01dc9475889efc7
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:44:49 2021 +0100

    Update JournalClientOffsetRanges for swh.journal 0.9
    
    deserialize_message() now takes an optional 'object_type' argument.

commit f588e20a41af4b1b8042f9b5f0e88a1f1dc91e59
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Mar 18 11:46:37 2022 +0100

    Encode TimestampWithTimezone as (timestamp, offset, raw_offset_bytes) in ORC file
    
    ie. use the standard ORC Timestamp format (aka a couple
    (seconds, nanoseconds)) with 2 extra fields for the offset.
    
    The offset is stored as an integer (in minutes), but the raw offset
    value is also present as a binary string representation, following
    recent evolutions of swh-model.
    
    This makes swh-dataset compatible with swh-model 5.

See https://jenkins.softwareheritage.org/job/DDATASET/job/tests-on-diff/79/ for more details.

Build is green

Patch application report for D7382 (id=27030)

Could not rebase; Attempt merge onto 31081e4121...

Updating 31081e4..6889990
Fast-forward
 requirements-swh.txt            |  2 +-
 swh/dataset/cli.py              | 10 +++++++++-
 swh/dataset/journalprocessor.py | 34 +++++++++++++++++++++++-----------
 3 files changed, 33 insertions(+), 13 deletions(-)
Changes applied before test
commit 68899901c7e596471cb1a9e769504919c6a19881
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:50:15 2021 +0100

    Make the kafka group_id prefix configurable in the config file
    
    rather than hardcoding it to 'swh-dataset-export-', use the 'group_id'
    value from the 'journal' section of the config file as prefix, if given
    9otherwise default to the former value).
    
    This is needed because current auth policy of swh kafka cluster only allow
    group_id to start with the actual login for authenticated connection.
    So we need to be able to specify this group_id prefix.

commit 769b6a77d250123ee25d8576bc1fe4a9340616f4
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:41:28 2021 +0100

    Use a named logger for journalprocessor.py
    
    and add a few more debug logging statements.

commit d7c332e4e7e1d5ee531a914b302f98c11503663e
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Dec 15 16:44:49 2021 +0100

    Update JournalClientOffsetRanges for swh.journal 0.9
    
    deserialize_message() now takes an optional 'object_type' argument.

See https://jenkins.softwareheritage.org/job/DDATASET/job/tests-on-diff/90/ for more details.