Compare commits

...

13 Commits

Author SHA1 Message Date
lain c8da684434 TimelineControllerTest: Fix hashtag timeline test 2020-01-15 13:21:04 +01:00
lain b9b668d39e Merge remote-tracking branch 'origin/develop' into fix-tags-again 2020-01-15 12:49:56 +01:00
lain 9ae24fc68e TimelineController: Do not order hashtag timelines for now. 2020-01-15 12:41:25 +01:00
feld 77412d5dd2 Merge branch 'features/docker-updates' into 'develop'
Features/docker updates

See merge request pleroma/pleroma!2105
2020-01-14 21:36:52 +00:00
jp a58a0a7b1b Remove forked test branch matching 2020-01-14 13:47:36 -05:00
jp ff15d6ef13 Remove artifacts passing by setting `dependencies: []` 2020-01-14 13:45:47 -05:00
lain b4532277b1 Merge branch 'features/docker-updates' into 'develop'
Features/docker updates

See merge request pleroma/pleroma!2104
2020-01-14 17:48:58 +00:00
jp 964d188a96 Add allow_failure to docker jobs 2020-01-14 12:43:28 -05:00
jp fe57e5139f Remove cache from docker jobs. Split devlop and stable branches into their own jobs 2020-01-14 12:32:36 -05:00
lain d150c598d7 Merge branch 'warnings-fix' into 'develop'
compilation warnings fix

See merge request pleroma/pleroma!2102
2020-01-14 16:11:36 +00:00
Alexander Strizhakov 0d331f3d23
compilation warnings fix 2020-01-14 15:49:52 +03:00
lain 12b28c8925 Merge branch 'feature/ci-registry' into 'develop'
Update Dockerfile with labels. Update gitlab-ci for registry usage

See merge request pleroma/pleroma!2098
2020-01-13 15:25:41 +00:00
jp 2ef8f0be6c Update Dockerfile with labels. Update gitlab-ci for registry usage 2020-01-10 14:09:14 -05:00
6 changed files with 84 additions and 11 deletions

View File

@ -10,14 +10,16 @@ variables: &global_variables
cache: &global_cache_policy
key: ${CI_COMMIT_REF_SLUG}
paths:
- deps
- _build
- deps
- _build
stages:
- build
- test
- benchmark
- deploy
- release
- docker
before_script:
- mix local.hex --force
@ -264,3 +266,50 @@ arm64-musl:
variables: *release-variables
before_script: *before-release-musl
script: *release
docker:
stage: docker
image: docker:latest
cache: {}
dependencies: []
variables: &docker-variables
DOCKER_DRIVER: overlay2
DOCKER_HOST: unix:///var/run/docker.sock
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
IMAGE_TAG_SLUG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
IMAGE_TAG_LATEST: $CI_REGISTRY_IMAGE:latest
IMAGE_TAG_LATEST_STABLE: $CI_REGISTRY_IMAGE:latest-stable
before_script: &before-docker
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- export CI_JOB_TIMESTAMP=$(date --utc -Iseconds)
- export CI_VCS_REF=$CI_COMMIT_SHORT_SHA
allow_failure: true
script:
- docker pull $IMAGE_TAG_SLUG || true
- docker build --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST .
- docker push $IMAGE_TAG
- docker push $IMAGE_TAG_SLUG
- docker push $IMAGE_TAG_LATEST
tags:
- dind
only:
- develop
docker-stable:
stage: docker
image: docker:latest
cache: {}
dependencies: []
variables: *docker-variables
before_script: *before-docker
allow_failure: true
script:
- docker pull $IMAGE_TAG_SLUG || true
- docker build --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST_STABLE .
- docker push $IMAGE_TAG
- docker push $IMAGE_TAG_SLUG
- docker push $IMAGE_TAG_LATEST_STABLE
tags:
- dind
only:
- stable

View File

@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Store status data inside Flag activity
- Deprecated (reorganized as `UserRelationship` entity) User fields with user AP IDs (`blocks`, `mutes`, `muted_reblogs`, `muted_notifications`, `subscribers`).
- Logger: default log level changed from `warn` to `info`.
- Hashtag timelines: This is now unsorted, which fixes most timeouts.
<details>
<summary>API Changes</summary>

View File

@ -14,6 +14,20 @@ RUN apk add git gcc g++ musl-dev make &&\
FROM alpine:3.9
ARG BUILD_DATE
ARG VCS_REF
LABEL maintainer="ops@pleroma.social" \
org.opencontainers.image.title="pleroma" \
org.opencontainers.image.description="Pleroma for Docker" \
org.opencontainers.image.authors="ops@pleroma.social" \
org.opencontainers.image.vendor="pleroma.social" \
org.opencontainers.image.documentation="https://git.pleroma.social/pleroma/pleroma" \
org.opencontainers.image.licenses="AGPL-3.0" \
org.opencontainers.image.url="https://pleroma.social" \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.created=$BUILD_DATE
ARG HOME=/opt/pleroma
ARG DATA=/var/lib/pleroma

View File

@ -105,6 +105,8 @@ def hashtag_fetching(params, user, local_only) do
|> Map.put("tag", tags)
|> Map.put("tag_all", tag_all)
|> Map.put("tag_reject", tag_reject)
# Temporary fix until we get a proper solution in
|> Map.put("skip_order", true)
|> ActivityPub.fetch_public_activities()
end

View File

@ -270,20 +270,29 @@ test "multi-hashtag timeline", %{conn: conn} do
any_test = get(conn, "/api/v1/timelines/tag/test", %{"any" => ["test1"]})
[status_none, status_test1, status_test] = json_response(any_test, :ok)
results = json_response(any_test, :ok)
assert to_string(activity_test.id) == status_test["id"]
assert to_string(activity_test1.id) == status_test1["id"]
assert to_string(activity_none.id) == status_none["id"]
# This should be reactivated when the timeline is sorted again
# assert to_string(activity_test.id) == status_test["id"]
# assert to_string(activity_test1.id) == status_test1["id"]
# assert to_string(activity_none.id) == status_none["id"]
ids = Enum.map(results, & &1["id"])
assert activity_test.id in ids
assert activity_test1.id in ids
assert activity_none.id in ids
restricted_test =
get(conn, "/api/v1/timelines/tag/test", %{"all" => ["test1"], "none" => ["none"]})
assert [status_test1] == json_response(restricted_test, :ok)
[status_test1] = json_response(restricted_test, :ok)
assert status_test1["id"] == activity_test1.id
all_test = get(conn, "/api/v1/timelines/tag/test", %{"all" => ["none"]})
all_test = get(conn, "/api/v1/timelines/tag/test", %{"all" => ["test", "none"]})
assert [status_none] == json_response(all_test, :ok)
[status_none] = json_response(all_test, :ok)
assert status_none["id"] == activity_none.id
end
end
end

View File

@ -8,9 +8,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
alias Pleroma.Tests.ObanHelpers
alias Pleroma.User
alias Pleroma.Web.CommonAPI
import ExUnit.CaptureLog
import Pleroma.Factory
import Mock