Skip to content
Snippets Groups Projects
  1. Jun 13, 2024
  2. Jun 12, 2024
  3. Jun 11, 2024
    • Marc-Olivier Andrez's avatar
      ci: run tests of Python client in CI before deploying containers and packages · d183c509
      Marc-Olivier Andrez authored
      The Python tests now run in the  CI job `test-services-linux-debug`.
      These tests need a new token because using the token contained in
      `standalone_token.txt` was making the call `consumer.get_stream_list()` fail:
      
      ```
      >>> consumer.get_stream_list()
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "asapo_consumer.pyx", line 323, in asapo_consumer.PyConsumer.get_stream_list
        File "asapo_consumer.pyx", line 102, in asapo_consumer.throw_exception
      asapo_consumer.AsapoWrongInputError: error: wrong input, message: authorizer rejected to authorize: wrong or expired JWT token, details: api:/v0.6/beamtime/asapo_test/source_20240611T_103617/0/streams, host:localhost:8413
      ```
      
      Instead, the tests use a new token contained in `local_dev_token.txt`
      that was generated using PyJWT 2.8.0:
      
      ```python
      import jwt
      
      key = "12ljzgneasfd"
      beamtimetext="asapo_test"
      new_token=jwt.encode({
          "exp": 9571710216, #FIXME: will break on 25.04.2273
          "jti": "wtfisthis",
          "sub": "bt_"+beamtimetext,
          "ExtraClaims": {
              "AccessTypes": [
                  "write",
                  "writeraw",
                  "read",
              ],
          },
      }, key, algorithm="HS256")
      print(new_token)  # This prints the value of the token to put into `local_dev_token.txt`
      
      print(jwt.decode(new_token, key, algorithms=["HS256"]))
      ```
      d183c509
  4. Jun 06, 2024
    • Diana Rueda's avatar
      Add `raw-loader` dependency for building `docs/site` · 4bdeef43
      Diana Rueda authored and Marc-Olivier Andrez's avatar Marc-Olivier Andrez committed
      \+ Remove `npm install raw-loader` step from CI job `pages`
      
      Without the `raw-loader` package, building `docs/site` by executing the following command was failing:
      
      ```sh
      $ cd docs/site && npm install
      $ yarn build
      ...
      [ERROR] Docusaurus server-side rendering could not render static page with path /docs/21.06.0/.
      ...
      Error: Cannot find module './versioned_examples/version-21.06.0/start_asapo_socket.sh'
      ...
      [WARNING] {"moduleIdentifier":"/home/marc-olivier/Documents/desy/dev/gitlab.desy.de/asapo/asapo/docs/site|sync|/(\\.sh%7C\\.py%7C\\.cpp%7C\\.c%7C\\.txt%7CMakefile)$/","moduleName":"././ sync (\\.sh%7C\\.py%7C\\.cpp%7C\\.c%7C\\.txt%7CMakefile)$","loc":"./CMakeLists.txt","message":"Module not found: Error: Can't resolve 'raw-loader' in '/home/marc-olivier/Documents/desy/dev/gitlab.desy.de/asapo/asapo/docs/site'","compilerPath":"client"}
      ...
      error Command failed with exit code 1.
      info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
      ```
      4bdeef43
    • Marc-Olivier Andrez's avatar
      Merge branch 'improve-error-message-when-incorrect-versions-are-used' into 'develop' · 2a087a3b
      Marc-Olivier Andrez authored
      feat: show given and expected versions when using incorrect version
      
      See merge request !227
      2a087a3b
  5. Jun 05, 2024
  6. Jun 04, 2024
  7. Jun 03, 2024
Loading