32 Commits

Author SHA1 Message Date
Adrian
09a8797879
ci: Add PyPI publish workflow (#231) 2024-03-30 16:49:29 +01:00
Adrian Moennich
eda0226e5e ci: Add manual build trigger 2024-03-30 12:36:07 +01:00
Adrian Moennich
1d2ff3fb7c ci: Fix indentation 2024-03-30 01:32:39 +01:00
Adrian
2a6b882093
Require Python 3.12 (#230) 2024-03-26 19:14:19 +01:00
Adrian Moennich
7330442597 ci: Adapt to changes in build script
Also remove unnecessary argument
2024-03-25 11:56:03 +01:00
Adrian
f3ae36a28a
ci: Build wheels for plugins (#228) 2024-03-24 18:00:28 +01:00
Adrian Moennich
df91251214 ci: Fix script failing on of single-file plugins
Not used in this repo, but best to keep this script in sync across all
plugin repos...
2024-03-24 00:07:25 +01:00
Adrian
b020e8f32c
ci: Check that setup manifests are complete (#227)
* Fix invalid manifests
* Check that setup manifests are complete
2024-03-23 23:04:56 +00:00
dependabot[bot]
c923bca994
Bump the github-actions group with 6 updates (#225)
Bumps the github-actions group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `3` | `4` |
| [actions/setup-python](https://github.com/actions/setup-python) | `4` | `5` |
| [actions/cache](https://github.com/actions/cache) | `3` | `4` |
| [actions/setup-node](https://github.com/actions/setup-node) | `3` | `4` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `3` | `4` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `3` | `4` |


Updates `actions/checkout` from 3 to 4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

Updates `actions/setup-python` from 4 to 5
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

Updates `actions/cache` from 3 to 4
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

Updates `actions/setup-node` from 3 to 4
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

Updates `actions/upload-artifact` from 3 to 4
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

Updates `actions/download-artifact` from 3 to 4
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-10 22:29:20 +00:00
Adrian Moennich
56b84a52f8 Use dependabot for GitHub actions updates 2024-03-10 23:18:35 +01:00
Adrian Moennich
6734a2f739 Fix ruff warnings 2024-02-20 11:20:34 +01:00
Indico Team
05ba82ba75 Happy new year 2024 🎆 2024-01-02 20:51:21 +01:00
Adrian Moennich
f657b26088 Run ruff in CI 2023-11-23 01:19:51 +01:00
Adrian Moennich
78cf47df19 ci: Use referenced core PR to install Indico 2023-10-18 14:57:16 +02:00
Adrian Moennich
f068cf58bb Unbeheader is already installed by indico[dev] 2023-10-18 14:57:16 +02:00
Adrian Moennich
40c3406e81 Support Python 3.12 and use it in CI runs 2023-10-18 14:57:16 +02:00
Alejandro Avilés
fb0d895178 Check headers with unbeheader 2023-09-22 12:09:00 +02:00
Adrian Moennich
9fd0fd6a6b ci: Use exact Python version 2023-09-06 17:12:57 +02:00
Adrian Moennich
5a1f663b41 Use recent node + ubuntu versions in CI 2023-07-14 18:08:50 +02:00
Adrian Moennich
ca7336a98b Support Python 3.11 and use it in CI runs 2023-07-05 15:28:14 +02:00
Pedro Ferreira
7149c38e50
Prometheus: Initial commit (#201) 2023-05-03 14:59:42 +00:00
Adrian Moennich
91afc28489 ci: Use more recent ubuntu image 2023-03-06 12:02:11 +01:00
Oliver Freyermuth
5ef3f3a6b0
ci: bump versions & update deprecated syntax
set-output and save-state will fail to work in June 2023:
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-02-23 17:14:29 +01:00
Adrian Moennich
d5fdc79c01 Merge branch '2.3.x' 2021-07-23 15:06:57 +02:00
Adrian Moennich
f64f40c374 Switch from 2.3-maintenance to 2.3.x branch names 2021-07-23 13:39:40 +02:00
Adrian Moennich
069b26949c Storage/S3: Fix dynamic bucket hashing
Also run the s3 plugin tests in CI...
2021-05-14 12:39:46 +02:00
Adrian
ec3d167175
Add new search infrastructure (#125)
* Enable CI on search branch

* LiveSync: Clean titles in verbose iterator

* LiveSync: Refactor initial export batching

And make the batch size configurable via commandline option

* LiveSync/Citadel: Support Citadel as the sync backend

Co-authored-by: penelope <penelope@fnal.gov>

* LiveSync/Citadel: Upgrade to python3

* LiveSync/Citadel: Update backend and refactor schemas

* LiveSync/Citadel: Add placeholders and filters/aggregations

* LiveSync/Citadel: Add range filters

* LiveSync/Citadel: Update the schemas and initial indexing

* LiveSync/Citadel: Refactor tests

* LiveSync/Citadel: Add status force list to upload retries

* LiveSync/Citadel: Update clean_old_entries filter

* LiveSync/Citadel: Update file headers

* LiveSync/Citadel: Add allowed methods in citadel retry

Commit more often in batches

* Citadel: Rename livesync_citadel to citadel

It's no longer just livesync

* Citadel: Move metadata to setup.cfg

* Citadel: Remove tika import

* Citadel: Mock things using the pytest way

* Citadel: Run pyupgrade

* Citadel: Run tests in CI

* Citadel: Use 'search' plugin category

* Citadel: Improve settings form

* Citadel: Fix model and alembic revision

* Citadel: Make livesync backend unique

* Citadel: Fix is_group error

* Citadel: Include schema attribute in the record context

* Citadel: Exclude content from Attachment schema

* Citadel: Use cached category path from context

* Citadel: Fix passing category tree cache to schemas

* Citadel: Remove unused imports

* Citadel: Be more strict with category cache

If the cache exists, we can expect ALL categories to be in there

* Citadel: Fix duplicate _get_identifiers call

* Citadel: Simplify record uploading

* ci: Allow `search` as valid upstream branch

* Add support for attachment file uploading

* Update file id mapping

* Update cli to a unique backend

* Merge file column migration with previous revision

* Refactor citadel and remove obsolete parts

* Citadel: Cache search_owner_role setting

* Citadel: Dump before parallelization

* Citadel: Do not retry on 500, use lower delays

* Remove change_type from upload_record

* Define a maximum number of pages

ES limits results up to 10,000 hits

* Add missing linebreak

* Citadel: Include category_id in search data

* Convert the aggregations to an object

* Raise request exceptions

* Move query formatting methods to util

* Remove search owner role setting

* Move the object type to filters

* Fix optional string based matches

Update tests

* Citadel: Include start/end dt for subcontribs

* Citadel: Add tests for schemas

* LiveSync: Pass force flag to backends

* Citadel: Skip already-exported entries unless forced

Like this resuming a failed initial export is as easy as just
running the command again.

* LiveSync: eager-load subcontrib timetable entry

* Citadel: Remove obsolete context

* Citadel: Do not upload empty files

* LiveSync: Fix changing root category protection mode

* Citadel: Fix access logic for empty ACLs

Also add unit tests for this

* Citadel: Add contrib/subcontrib duration to schemas

* LiveSync: Add verbose mode

* Remove record dumping if it's being deleted

* Simplify run_initial_export

* Citadel: Print change type in verbose mode

* Citadel: Ignore create-and-delete changes

* LiveSync: Fix tests

* LiveSync: Move citadel-specific code to citadel plugin

* Citadel: Make id mapping entries unique

* Citadel: Refactor http logic

* Citadel: Use 1:1 relationship for id mapping

* Citadel: Use more sensible argument order in id mapping

* LiveSync: Correctly handle (sub) contribution changes

- track contribution time changes
- cascade contribution changes to subcontributions

* Simplify livesync uploader entries

* LiveSync: Improve naming

* LiveSync: Fix attachment handling

Also fix cascading of contribution changes during simplification step

* Citadel: Fix enum display in error message

* LiveSync: Cascade creation to children

This is necessary e.g. when cloning events because in that case we only
have the event creation record but nothing for the elements inside that
event.

To avoid sending the same thing twice (e.g. a contribution) chunking now
only happens on the simplified change level, not on the record level, to
ensure all recorded changes are taken into account when simplifying them
to creation/updates/deletions.

* LiveSync: Allow deferring initial export done flag

In case of Citadel we want to require a file export as well before
starting to process the queue to avoid cases where we are still doing
an initial file upload but queue runs start happening and we would
end up sending old files as well.

* Citadel: Upload files after a queue run

* Refactor checks whether queue runs are possible

Also add an `indico citadel reset` command to throw away all local
citadel data

* Citadel: Re-upload attachments whose file changed

* LiveSync: Fix title in initial export progress

* Citadel: Make max file size configurable

* Check if a livesync plugins is properly configured

And use it to check whether citadel has url and token set

* LiveSync/Debug: Fix errors and use schemas

* Citadel: Refactor verbose printing

* LiveSync: Remove unnecessary default value

* Update the search API to support multiple types

* Move reset cli from citadel to livesync core

* Citadel: Rename model/table

* Citadel: Remove unnecessary timestamp column

* Citadel: Remove some overly verbose comments

* Citadel: Commit explicitly outside create()

* Citadel: Do not send None inside _data

* LiveSync: Fix handling notes

* Citadel: Integrate placeholders with Indico (#117)

* LiveSync: Fix query spam in user.is_system check

* Citadel: Use new result schemas

* Update search schemas

* Citadel: Various improvements/fixes

* Citadel: Integrate filters with Indico & update placeholders (#119)

* Move dump schemas from core to livesync

* Use type_format only in citadel code

* Citadel: Strip HTML from descriptions/notes

* Citadel: Show message if some fails failed to upload

* Add category id filter

* Citadel: Add some debug logging during file uploads

* Citadel: Allow filtering by category name

* Update title and type placeholders

* Citadel: Add -f as --force shortcut

* Fix quote dividers in a multi placeholder query

* Use all worker threads all the time

* Close responses from uploads

Hopefully this fixes running out of fds after ~240k uploads

* Add some more debug logging

* Fix incorrect output

* Rename type placeholder

* Supported quotes for exact matches

* LiveSync: Fix cascading issues

- do not cascade implicit changes to deleted attachments
- correctly cascade changes involving session-linked objects

* Improve error handling

* Citadel: Do not enable queue runs after max-size usage

* LiveSync: Add setting to disable queue runs

* LiveSync: Check category blacklist in initial export

* LiveSync: Add schema tests

* LiveSync: Handle and cascade location changes

* Move query formatting outside the f-string

* Refactor the search query parser

Ensures the keyword positioning isn't changed and correctly
sanitizes placeholder content.

* Escape whitelisted placeholders

Co-authored-by: Adrian <adrian@planetcoding.net>

* Strip the result query

* Remove placeholder operator

* Add default operator

* Update tests

* Add support for sort options (#123)

* Add support for sort options
* Rename SearchFilter to SearchOption
* Rename sort option keys

* Fix error with lazy strings in filter labels

* Revert "Enable CI on search branch"

This reverts commit 2ec3f650eed02cd6c72ea336fa92df6927b8da39.

Co-authored-by: Pedro Lourenço <pedro.lourenco@cern.ch>
Co-authored-by: Michal Kolodziejski <michal.kolodziejski@cern.ch>
Co-authored-by: Penelope Constanta <penelope@fnal.gov>
2021-05-07 14:47:59 +00:00
Adrian Moennich
a240e284fd ci: Fix getting PR target branch 2021-04-07 17:38:02 +02:00
Adrian Moennich
4959ed3641 Fix running redis in tests 2021-03-02 15:24:10 +01:00
Adrian Moennich
12f841a648 Use artifacts to pass env to jobs
That way we can do everything important in the setup job and just
download the artifact in each subsequent job.

We now also just cache the wheels instead of the virtualenv itself; that
way we are guaranteed to have a fresh indico copy from the main repo
instead of whatever got cached some time ago.
2021-02-08 18:48:10 +01:00
Adrian Moennich
59c90b1a55 Merge branch '2.3-maintenance' 2021-01-26 19:27:10 +01:00
Pedro Lourenço
af0054357c
Use GitHub actions for CI (#100)
Co-authored-by: Adrian Moennich <adrian.moennich@cern.ch>
2021-01-26 19:12:39 +01:00