pvarki / pvarki/python-rasenmaeher-api

[Bug] Adduser script throws errors in CI

Open
#126 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1
Forks
1
Avg merge
4d 13h
Merged PRs (30d)
5

Description

1. Bug

What - Describe the bug

Errors in CI logs from build.py "add test users" phase.

What I expected to happen

No errors in logs

What happened instead

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/rasenmaeher_api/kchelpers.py", line 222, in update_kc_user
    await self.kcadmin.a_update_user(user.kc_id, send_payload)
  File "/usr/local/lib/python3.11/site-packages/keycloak/keycloak_admin.py", line 4977, in a_update_user
    return raise_error_from_response(data_raw, KeycloakPutError, expected_codes=[204])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/keycloak/exceptions.py", line 192, in raise_error_from_response
    raise error(
keycloak.exceptions.KeycloakPutError: 400: b'{"errors":[{"field":"modifyTimestamp","errorMessage":"updateReadOnlyAttributesRejectedMessage","params":["modifyTimestamp"]},{"field":"createTimestamp","errorMessage":"updateReadOnlyAttributesRejectedMessage","params":["createTimestamp"]}]}'

The integrations tests (test_cert_bundle) do pass.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the add test users phase in build.py and the update_kc_user call at rasenmaeher_api/kchelpers.py:222. Reproduce the CI error and compare it with the passing test_cert_bundle integration test. Done means the adduser phase produces no errors in CI while the existing integration test still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.