Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 127-eliminate-more-references-to-hive_posts_view
  • 221-vacuum-hivemind-tables
  • 267-rebased-onto-develop
  • 676-as-tiny-assets
  • 72-postgres-warning-about-wrong-collation-in-recursive_deps-2
  • abw_ecv_op_experiment
  • abw_max_retries
  • abw_post_delete_fix
  • abw_rshares_experiment
  • add-git-to-requirements
  • add-vote-info
  • arc-get-content-deleted
  • as-tmp-to-remove
  • asuch-limit-follows
  • asuch-postgrest-fixing-problems
  • asuch-replace-python-with-sql-get-follow-count
  • asuch-tmp-wip-condenser-get-blog
  • autoexplain-python
  • bridge_api.get_ranked_posts_fixes
  • bw_1_27_5rc8_2master
  • bw_develop-haf-rebase
  • bw_docker_supplement
  • bw_entrypoint_signal_handler_fix
  • bw_haf_compat_sync
  • bw_hafah_datasource_test
  • bw_master2develop
  • bw_mi/hivemind_wit_sa_btracker_rebase
  • bw_rebased_develop-haf
  • bw_restore_log_memory_usage_call
  • bw_simplify_blacklisted_by_observer_view
  • bw_temp_hived_source_node_verification
  • bw_update_posts_rshares_speedup
  • bw_v1_27_5_0_0_rc0
  • change-python-limits
  • cherry-pick-5dd1da34
  • cherry-pick-98eaf112
  • complete-refactor
  • db-upgrade-assert
  • deployed_20200917
  • deployed_20200928
  • deployed_20200928_pure
  • deployed_20200928_reversible_ops
  • deployed_fixes_2_develop
  • develop
  • develop-haf-backup
  • dk-benchmarks-ci-improvements
  • dk-communities-unit-tests
  • dk-get-ids-for-accounts-hotfix
  • dk-issue-3-concurrent-block-query
  • dk-list-votes-pre24
  • dk-migration-script-tags-support
  • dk-num-block-hive-feed-cache
  • dk-readme-update
  • dk-reputation_api_support
  • dk-revert-black-lists
  • dk-sql-file-list
  • dk-sql-script-executor
  • dk-sql-scripts-from-schema
  • dk-xdist-and-time
  • dn-autovacuum
  • dn-default-autovacuum
  • dn-testing
  • dn_get_block_range
  • dn_parallel_safe
  • dn_prof
  • doc-fix
  • dockerfile-update-fix
  • emf-limit-follows
  • enum_block_operations-support
  • feature/beneficiaries_communities
  • feature/hive_votes_no_index
  • feature/mute-reason-test
  • feature/mute-reason_rebase
  • feature/new_communities_type_old
  • feature/new_community_types
  • feature/role-only-if-subscribed-test1
  • fix-duplicate-pinned-posts
  • fixing-tests-with-limits
  • follow-deltas
  • follow-redesign
  • follow-redesign-speedups
  • follow-redesign-tests
  • follow_api_tests
  • get-discussion-experiment
  • hivemind_testers
  • imwatsi-first-steps
  • jes2850-decentralized-lists
  • jsalyers-add-a-cascade
  • jsalyers-fix-muting-for-reblogs
  • jsalyers-fix-muting-on-bridge-get-discussion
  • jsalyers-muting-v2
  • jsalyers-test-mute-changes
  • kbotor/backup/building-hivemind-from-other-repos
  • kbotor/building-hivemind-from-other-repos
  • kbotor/ci-rewrite-for-parallel-replay
  • km_ah_api
  • km_get_content_2_0
  • km_get_content_fill_missing2deployed
  • km_history
  • km_improved_log_gathering
  • 0.25.4
  • 1.25.0rc0
  • 1.25.2rc
  • 1.26.0
  • 1.26.1
  • 1.26.2
  • 1.26.3
  • 1.27.0.dev0
  • 1.27.10
  • 1.27.11rc1
  • 1.27.11rc2
  • 1.27.11rc3
  • 1.27.11rc4
  • 1.27.11rc5
  • 1.27.3.0.0
  • 1.27.3.0.0dev11
  • 1.27.3.0.0dev12
  • 1.27.3.0.0dev7
  • 1.27.5
  • 1.27.5.0.0rc7
  • 1.27.5rc8
  • 1.27.5rc9
  • 1.27.6rc3
  • 1.27.6rc5
  • 1.27.6rc6
  • 1.27.6rc7
  • 1.27.6rc8
  • 1.27.6rc9
  • 1.27.7rc10
  • 1.27.7rc11
  • 1.27.7rc12
  • 1.27.7rc13
  • 1.27.7rc14
  • 1.27.7rc15
  • 1.27.7rc16
  • 1.27.8
  • 1.27.9
  • Before-dk-issue-3
  • Full-sync
  • Full-sync-20200928
  • Full-sync-20201026
  • ScheduledBenchmarkTesting_18_Aug
  • env/staging-permissions
  • full_hive_sync_17_05_2021
  • git_versioning_support
  • hivemind_ci_support
  • tmp-logs
  • v1.24-RC
  • v1.24.0
  • v1.24.1
  • v1.24.1-RC
  • v1.24.2
  • v1.25.1
  • v1.25.2
  • v1.25.3
  • v1.25.4
  • v1.26.0
  • v1.27.4.0.0
  • v1.27.4.0.0dev1
  • v1.27.4.0.0dev2
160 results

Target

Select target project
  • hive/hivemind
1 result
Select Git revision
  • 127-eliminate-more-references-to-hive_posts_view
  • 221-vacuum-hivemind-tables
  • 267-rebased-onto-develop
  • 676-as-tiny-assets
  • 72-postgres-warning-about-wrong-collation-in-recursive_deps-2
  • abw_ecv_op_experiment
  • abw_max_retries
  • abw_post_delete_fix
  • abw_rshares_experiment
  • add-git-to-requirements
  • add-vote-info
  • arc-get-content-deleted
  • as-tmp-to-remove
  • asuch-limit-follows
  • asuch-postgrest-fixing-problems
  • asuch-replace-python-with-sql-get-follow-count
  • asuch-tmp-wip-condenser-get-blog
  • autoexplain-python
  • bridge_api.get_ranked_posts_fixes
  • bw_1_27_5rc8_2master
  • bw_develop-haf-rebase
  • bw_docker_supplement
  • bw_entrypoint_signal_handler_fix
  • bw_haf_compat_sync
  • bw_hafah_datasource_test
  • bw_master2develop
  • bw_mi/hivemind_wit_sa_btracker_rebase
  • bw_rebased_develop-haf
  • bw_restore_log_memory_usage_call
  • bw_simplify_blacklisted_by_observer_view
  • bw_temp_hived_source_node_verification
  • bw_update_posts_rshares_speedup
  • bw_v1_27_5_0_0_rc0
  • change-python-limits
  • cherry-pick-5dd1da34
  • cherry-pick-98eaf112
  • complete-refactor
  • db-upgrade-assert
  • deployed_20200917
  • deployed_20200928
  • deployed_20200928_pure
  • deployed_20200928_reversible_ops
  • deployed_fixes_2_develop
  • develop
  • develop-haf-backup
  • dk-benchmarks-ci-improvements
  • dk-communities-unit-tests
  • dk-get-ids-for-accounts-hotfix
  • dk-issue-3-concurrent-block-query
  • dk-list-votes-pre24
  • dk-migration-script-tags-support
  • dk-num-block-hive-feed-cache
  • dk-readme-update
  • dk-reputation_api_support
  • dk-revert-black-lists
  • dk-sql-file-list
  • dk-sql-script-executor
  • dk-sql-scripts-from-schema
  • dk-xdist-and-time
  • dn-autovacuum
  • dn-default-autovacuum
  • dn-testing
  • dn_get_block_range
  • dn_parallel_safe
  • dn_prof
  • doc-fix
  • dockerfile-update-fix
  • emf-limit-follows
  • enum_block_operations-support
  • feature/beneficiaries_communities
  • feature/hive_votes_no_index
  • feature/mute-reason-test
  • feature/mute-reason_rebase
  • feature/new_communities_type_old
  • feature/new_community_types
  • feature/role-only-if-subscribed-test1
  • fix-duplicate-pinned-posts
  • fixing-tests-with-limits
  • follow-deltas
  • follow-redesign
  • follow-redesign-speedups
  • follow-redesign-tests
  • follow_api_tests
  • get-discussion-experiment
  • hivemind_testers
  • imwatsi-first-steps
  • jes2850-decentralized-lists
  • jsalyers-add-a-cascade
  • jsalyers-fix-muting-for-reblogs
  • jsalyers-fix-muting-on-bridge-get-discussion
  • jsalyers-muting-v2
  • jsalyers-test-mute-changes
  • kbotor/backup/building-hivemind-from-other-repos
  • kbotor/building-hivemind-from-other-repos
  • kbotor/ci-rewrite-for-parallel-replay
  • km_ah_api
  • km_get_content_2_0
  • km_get_content_fill_missing2deployed
  • km_history
  • km_improved_log_gathering
  • 0.25.4
  • 1.25.0rc0
  • 1.25.2rc
  • 1.26.0
  • 1.26.1
  • 1.26.2
  • 1.26.3
  • 1.27.0.dev0
  • 1.27.10
  • 1.27.11rc1
  • 1.27.11rc2
  • 1.27.11rc3
  • 1.27.11rc4
  • 1.27.11rc5
  • 1.27.3.0.0
  • 1.27.3.0.0dev11
  • 1.27.3.0.0dev12
  • 1.27.3.0.0dev7
  • 1.27.5
  • 1.27.5.0.0rc7
  • 1.27.5rc8
  • 1.27.5rc9
  • 1.27.6rc3
  • 1.27.6rc5
  • 1.27.6rc6
  • 1.27.6rc7
  • 1.27.6rc8
  • 1.27.6rc9
  • 1.27.7rc10
  • 1.27.7rc11
  • 1.27.7rc12
  • 1.27.7rc13
  • 1.27.7rc14
  • 1.27.7rc15
  • 1.27.7rc16
  • 1.27.8
  • 1.27.9
  • Before-dk-issue-3
  • Full-sync
  • Full-sync-20200928
  • Full-sync-20201026
  • ScheduledBenchmarkTesting_18_Aug
  • env/staging-permissions
  • full_hive_sync_17_05_2021
  • git_versioning_support
  • hivemind_ci_support
  • tmp-logs
  • v1.24-RC
  • v1.24.0
  • v1.24.1
  • v1.24.1-RC
  • v1.24.2
  • v1.25.1
  • v1.25.2
  • v1.25.3
  • v1.25.4
  • v1.26.0
  • v1.27.4.0.0
  • v1.27.4.0.0dev1
  • v1.27.4.0.0dev2
160 results
Show changes
Commits on Source (5)
Showing with 64 additions and 42 deletions
...@@ -33,7 +33,7 @@ variables: ...@@ -33,7 +33,7 @@ variables:
include: include:
- template: Workflows/Branch-Pipelines.gitlab-ci.yml - template: Workflows/Branch-Pipelines.gitlab-ci.yml
- project: hive/haf - project: hive/haf
ref: b1d8f2623bad9300464739e132764527dceab095 # develop ref: fd69207e2026ecdf046a74deacb54950b186d773 # develop
file: /scripts/ci-helpers/prepare_data_image_job.yml # implicitly pulls base.gitlab-ci.yml from common-ci-configuration file: /scripts/ci-helpers/prepare_data_image_job.yml # implicitly pulls base.gitlab-ci.yml from common-ci-configuration
- project: hive/common-ci-configuration - project: hive/common-ci-configuration
ref: e74d7109838ff05fdc239bced6a726aa7ad46a9b ref: e74d7109838ff05fdc239bced6a726aa7ad46a9b
......
Subproject commit b1d8f2623bad9300464739e132764527dceab095 Subproject commit fd69207e2026ecdf046a74deacb54950b186d773
...@@ -113,7 +113,6 @@ class DbState: ...@@ -113,7 +113,6 @@ class DbState:
'hive_follows_follower_state_idx', # (follower, state, created_at, following) 'hive_follows_follower_state_idx', # (follower, state, created_at, following)
'hive_follows_follower_following_state_idx', 'hive_follows_follower_following_state_idx',
'hive_follows_block_num_idx', 'hive_follows_block_num_idx',
'hive_follows_created_at_idx',
'hive_follows_follower_where_blacklisted_idx', 'hive_follows_follower_where_blacklisted_idx',
'hive_follows_follower_where_follow_muted_idx', 'hive_follows_follower_where_follow_muted_idx',
'hive_follows_follower_where_follow_blacklists_idx', 'hive_follows_follower_where_follow_blacklists_idx',
...@@ -125,14 +124,11 @@ class DbState: ...@@ -125,14 +124,11 @@ class DbState:
'hive_posts_community_id_not_is_pinned_idx', 'hive_posts_community_id_not_is_pinned_idx',
'hive_posts_community_id_not_is_paidout_idx', 'hive_posts_community_id_not_is_paidout_idx',
'hive_posts_payout_at_idx', 'hive_posts_payout_at_idx',
'hive_posts_payout_idx',
'hive_posts_promoted_id_idx', 'hive_posts_promoted_id_idx',
'hive_posts_sc_trend_id_idx', 'hive_posts_sc_trend_id_idx',
'hive_posts_sc_hot_id_idx', 'hive_posts_sc_hot_id_idx',
'hive_posts_block_num_idx', 'hive_posts_block_num_idx',
'hive_posts_block_num_created_idx', 'hive_posts_block_num_created_idx',
'hive_posts_cashout_time_id_idx',
'hive_posts_updated_at_idx',
'hive_posts_payout_plus_pending_payout_id_idx', 'hive_posts_payout_plus_pending_payout_id_idx',
'hive_posts_category_id_payout_plus_pending_payout_depth_idx', 'hive_posts_category_id_payout_plus_pending_payout_depth_idx',
'hive_posts_author_id_created_at_id_idx', 'hive_posts_author_id_created_at_id_idx',
...@@ -142,7 +138,6 @@ class DbState: ...@@ -142,7 +138,6 @@ class DbState:
'hive_subscriptions_block_num_idx', 'hive_subscriptions_block_num_idx',
'hive_subscriptions_community_idx', 'hive_subscriptions_community_idx',
'hive_communities_block_num_idx', 'hive_communities_block_num_idx',
'hive_reblogs_created_at_idx',
'hive_votes_post_id_voter_id_idx', 'hive_votes_post_id_voter_id_idx',
'hive_notification_cache_block_num_idx', 'hive_notification_cache_block_num_idx',
'hive_notification_cache_dst_score_idx', 'hive_notification_cache_dst_score_idx',
......
...@@ -133,7 +133,6 @@ def build_metadata(): ...@@ -133,7 +133,6 @@ def build_metadata():
postgresql_where=sql_text("NOT is_paidout AND depth = 0 AND counter_deleted = 0")), postgresql_where=sql_text("NOT is_paidout AND depth = 0 AND counter_deleted = 0")),
sa.Index('hive_posts_payout_at_idx', 'payout_at'), sa.Index('hive_posts_payout_at_idx', 'payout_at'),
sa.Index('hive_posts_payout_idx', 'payout'),
sa.Index( sa.Index(
'hive_posts_promoted_id_idx', 'hive_posts_promoted_id_idx',
'promoted', 'promoted',
...@@ -160,8 +159,6 @@ def build_metadata(): ...@@ -160,8 +159,6 @@ def build_metadata():
sa.Index('hive_posts_block_num_idx', 'block_num'), sa.Index('hive_posts_block_num_idx', 'block_num'),
sa.Index('hive_posts_block_num_created_idx', 'block_num_created'), sa.Index('hive_posts_block_num_created_idx', 'block_num_created'),
sa.Index('hive_posts_cashout_time_id_idx', 'cashout_time', 'id'),
sa.Index('hive_posts_updated_at_idx', sa.text('updated_at DESC')),
sa.Index( sa.Index(
'hive_posts_payout_plus_pending_payout_id_idx', 'hive_posts_payout_plus_pending_payout_id_idx',
sa.text('(payout+pending_payout), id'), sa.text('(payout+pending_payout), id'),
...@@ -279,7 +276,6 @@ def build_metadata(): ...@@ -279,7 +276,6 @@ def build_metadata():
sa.Index('hive_follows_follower_state_idx', 'follower', 'state'), sa.Index('hive_follows_follower_state_idx', 'follower', 'state'),
sa.Index('hive_follows_follower_following_state_idx', 'follower', 'following', 'state'), sa.Index('hive_follows_follower_following_state_idx', 'follower', 'following', 'state'),
sa.Index('hive_follows_block_num_idx', 'block_num'), sa.Index('hive_follows_block_num_idx', 'block_num'),
sa.Index('hive_follows_created_at_idx', 'created_at'),
sa.Index('hive_follows_follower_where_blacklisted_idx', 'follower', postgresql_where=sql_text('blacklisted')), sa.Index('hive_follows_follower_where_blacklisted_idx', 'follower', postgresql_where=sql_text('blacklisted')),
sa.Index('hive_follows_follower_where_follow_muted_idx', 'follower', postgresql_where=sql_text('follow_muted')), sa.Index('hive_follows_follower_where_follow_muted_idx', 'follower', postgresql_where=sql_text('follow_muted')),
sa.Index('hive_follows_follower_where_follow_blacklists_idx', 'follower', postgresql_where=sql_text('follow_blacklists')), sa.Index('hive_follows_follower_where_follow_blacklists_idx', 'follower', postgresql_where=sql_text('follow_blacklists')),
...@@ -299,7 +295,6 @@ def build_metadata(): ...@@ -299,7 +295,6 @@ def build_metadata():
sa.UniqueConstraint('blogger_id', 'post_id', name='hive_reblogs_ux1'), # core sa.UniqueConstraint('blogger_id', 'post_id', name='hive_reblogs_ux1'), # core
sa.Index('hive_reblogs_post_id', 'post_id'), sa.Index('hive_reblogs_post_id', 'post_id'),
sa.Index('hive_reblogs_block_num_idx', 'block_num'), sa.Index('hive_reblogs_block_num_idx', 'block_num'),
sa.Index('hive_reblogs_created_at_idx', 'created_at'),
) )
sa.Table( sa.Table(
...@@ -319,7 +314,6 @@ def build_metadata(): ...@@ -319,7 +314,6 @@ def build_metadata():
sa.ForeignKeyConstraint(['post_id'], ['hive_posts.id'], name='hive_payments_fk3', deferrable=True, postgresql_not_valid=True), sa.ForeignKeyConstraint(['post_id'], ['hive_posts.id'], name='hive_payments_fk3', deferrable=True, postgresql_not_valid=True),
sa.Index('hive_payments_from', 'from_account'), sa.Index('hive_payments_from', 'from_account'),
sa.Index('hive_payments_to', 'to_account'), sa.Index('hive_payments_to', 'to_account'),
sa.Index('hive_payments_post_id', 'post_id'),
) )
sa.Table( sa.Table(
...@@ -360,7 +354,6 @@ def build_metadata(): ...@@ -360,7 +354,6 @@ def build_metadata():
sa.Column('block_num', sa.Integer, nullable=False), sa.Column('block_num', sa.Integer, nullable=False),
sa.ForeignKeyConstraint(['post_id'], ['hive_posts.id'], name='hive_mentions_fk1', deferrable=True, postgresql_not_valid=True), sa.ForeignKeyConstraint(['post_id'], ['hive_posts.id'], name='hive_mentions_fk1', deferrable=True, postgresql_not_valid=True),
sa.ForeignKeyConstraint(['account_id'], ['hive_accounts.id'], name='hive_mentions_fk2', deferrable=True, postgresql_not_valid=True), sa.ForeignKeyConstraint(['account_id'], ['hive_accounts.id'], name='hive_mentions_fk2', deferrable=True, postgresql_not_valid=True),
sa.Index('hive_mentions_account_id_idx', 'account_id'),
sa.UniqueConstraint('post_id', 'account_id', 'block_num', name='hive_mentions_ux1'), sa.UniqueConstraint('post_id', 'account_id', 'block_num', name='hive_mentions_ux1'),
) )
...@@ -445,11 +438,7 @@ def build_metadata_community(hive_rowid_seq: sa.Sequence, metadata=None): ...@@ -445,11 +438,7 @@ def build_metadata_community(hive_rowid_seq: sa.Sequence, metadata=None):
sa.Column('community_id', sa.Integer, nullable=True), sa.Column('community_id', sa.Integer, nullable=True),
sa.Column('block_num', sa.Integer, nullable=False), sa.Column('block_num', sa.Integer, nullable=False),
sa.Column('payload', sa.Text, nullable=True), sa.Column('payload', sa.Text, nullable=True),
sa.Index('hive_notifs_ix1', 'dst_id', 'id', postgresql_where=sql_text("dst_id IS NOT NULL")),
sa.Index('hive_notifs_ix2', 'community_id', 'id', postgresql_where=sql_text("community_id IS NOT NULL")), sa.Index('hive_notifs_ix2', 'community_id', 'id', postgresql_where=sql_text("community_id IS NOT NULL")),
sa.Index(
'hive_notifs_ix3', 'community_id', 'type_id', 'id', postgresql_where=sql_text("community_id IS NOT NULL")
),
sa.Index( sa.Index(
'hive_notifs_ix4', 'hive_notifs_ix4',
'community_id', 'community_id',
...@@ -458,17 +447,6 @@ def build_metadata_community(hive_rowid_seq: sa.Sequence, metadata=None): ...@@ -458,17 +447,6 @@ def build_metadata_community(hive_rowid_seq: sa.Sequence, metadata=None):
'id', 'id',
postgresql_where=sql_text("community_id IS NOT NULL AND post_id IS NOT NULL"), postgresql_where=sql_text("community_id IS NOT NULL AND post_id IS NOT NULL"),
), ),
sa.Index(
'hive_notifs_ix5',
'post_id',
'type_id',
'dst_id',
'src_id',
postgresql_where=sql_text("post_id IS NOT NULL AND type_id IN (16,17)"),
), # filter: dedupe
sa.Index(
'hive_notifs_ix6', 'dst_id', 'created_at', 'score', 'id', postgresql_where=sql_text("dst_id IS NOT NULL")
), # unread
) )
sa.Table( sa.Table(
......
...@@ -28,4 +28,3 @@ WITH DATA ...@@ -28,4 +28,3 @@ WITH DATA
; ;
CREATE UNIQUE INDEX IF NOT EXISTS payout_stats_view_ix1 ON hivemind_app.payout_stats_view (community_id, author ); CREATE UNIQUE INDEX IF NOT EXISTS payout_stats_view_ix1 ON hivemind_app.payout_stats_view (community_id, author );
CREATE INDEX IF NOT EXISTS payout_stats_view_ix2 ON hivemind_app.payout_stats_view (community_id, author, payout);
...@@ -37,14 +37,13 @@ BEGIN ...@@ -37,14 +37,13 @@ BEGIN
COALESCE(hr.title, NULL) AS title, COALESCE(hr.title, NULL) AS title,
hivemind_postgrest_utilities.json_date(hs.created_at) AS created_at hivemind_postgrest_utilities.json_date(hs.created_at) AS created_at
FROM hivemind_app.hive_subscriptions hs FROM hivemind_app.hive_subscriptions hs
LEFT JOIN hivemind_app.hive_roles hr ON hs.account_id = hr.account_id
AND hs.community_id = hr.community_id
JOIN hivemind_app.hive_accounts ha ON hs.account_id = ha.id JOIN hivemind_app.hive_accounts ha ON hs.account_id = ha.id
LEFT JOIN hivemind_app.hive_roles hr ON hs.account_id = hr.account_id AND hs.community_id = hr.community_id WHERE hs.community_id = _community_id AND (_subscription_id = 0 OR (hs.id < _subscription_id))
WHERE
hs.community_id = _community_id
AND NOT (_subscription_id <> 0 AND hs.id >= _subscription_id)
ORDER BY ha.name ASC ORDER BY ha.name ASC
LIMIT _limit LIMIT _limit
) row ) row
), ),
'[]'::JSONB '[]'::JSONB
); );
......
DROP FUNCTION IF EXISTS hivemind_postgrest_utilities.extract_profile_metadata; DROP FUNCTION IF EXISTS hivemind_postgrest_utilities.extract_profile_metadata;
CREATE FUNCTION hivemind_postgrest_utilities.extract_profile_metadata(IN _json_metadata TEXT, IN _posting_json_metadata TEXT) CREATE OR REPLACE FUNCTION hivemind_postgrest_utilities.extract_profile_metadata(IN _json_metadata TEXT, IN _posting_json_metadata TEXT)
RETURNS JSONB RETURNS JSONB
LANGUAGE plpgsql LANGUAGE plpgsql
IMMUTABLE IMMUTABLE
...@@ -13,8 +13,8 @@ BEGIN ...@@ -13,8 +13,8 @@ BEGIN
IF _posting_json_metadata IS NOT NULL AND _posting_json_metadata <> '' THEN IF _posting_json_metadata IS NOT NULL AND _posting_json_metadata <> '' THEN
BEGIN BEGIN
_metadata = _posting_json_metadata::jsonb; _metadata = _posting_json_metadata::jsonb;
-- In python code, if posting_json_metadata has less then 3 elements, that we should use `json_metadata`, even before reading `profile` part. -- if posting_json_metadata has less then 3 chars, then we use `json_metadata`, without even reading the `profile`.
IF (SELECT COUNT(*) FROM jsonb_object_keys(_metadata)) < 3 THEN IF (SELECT LENGTH(_metadata::text)) < 3 THEN
_metadata = NULL; _metadata = NULL;
ELSIF _metadata ? 'profile' THEN ELSIF _metadata ? 'profile' THEN
_metadata = _metadata->'profile'; _metadata = _metadata->'profile';
......
...@@ -57,8 +57,6 @@ BEGIN ...@@ -57,8 +57,6 @@ BEGIN
RAISE EXCEPTION '%', hivemind_postgrest_utilities.raise_parameter_validation_exception(_missing_accounts::text); RAISE EXCEPTION '%', hivemind_postgrest_utilities.raise_parameter_validation_exception(_missing_accounts::text);
END IF; END IF;
IF _observer_id IS NOT NULL AND _observer_id <> 0 THEN IF _observer_id IS NOT NULL AND _observer_id <> 0 THEN
SELECT jsonb_agg( SELECT jsonb_agg(
jsonb_set( jsonb_set(
......
...@@ -878,7 +878,7 @@ ...@@ -878,7 +878,7 @@
"value": { "value": {
"account": "hive-186713", "account": "hive-186713",
"json_metadata": "{\"profile\":{\"name\":\"from account\",\"about\":\"about from account\",\"cover_image\":\"\",\"profile_image\":\"https://images.ecency.com/DQmRmugfsA3arLWs2Fh3VncMo4VPsmWUWY9r5GaWKA2k1XN/images.jpeg\",\"website\":\"\",\"location\":\"\",\"version\":2}}", "json_metadata": "{\"profile\":{\"name\":\"from account\",\"about\":\"about from account\",\"cover_image\":\"\",\"profile_image\":\"https://images.ecency.com/DQmRmugfsA3arLWs2Fh3VncMo4VPsmWUWY9r5GaWKA2k1XN/images.jpeg\",\"website\":\"\",\"location\":\"\",\"version\":2}}",
"posting_json_metadata": "test-safari", "posting_json_metadata": "{\"profile\":{\"name\":\"from account\",\"about\":\"about from account this is the correct data for get_profile endpoints\",\"cover_image\":\"\",\"profile_image\":\"https://images.ecency.com/DQmRmugfsA3arLWs2Fh3VncMo4VPsmWUWY9r5GaWKA2k1XN/images.jpeg\",\"website\":\"\",\"location\":\"\",\"version\":2}}",
"extensions": [] "extensions": []
} }
}, },
......
Subproject commit aebfdbde02aa6c997e715f3152be6b66af858418 Subproject commit 14183103be7be36bfd49740e0a7c1b8d643689bb
{
"active": "2016-09-15T18:01:30",
"blacklists": [],
"created": "2016-09-15T18:01:30",
"id": 92466,
"metadata": {
"profile": {
"about": "about from account this is the correct data for get_profile endpoints",
"blacklist_description": "",
"cover_image": "",
"location": "",
"muted_list_description": "",
"name": "from account",
"profile_image": "https://images.ecency.com/DQmRmugfsA3arLWs2Fh3VncMo4VPsmWUWY9r5GaWKA2k1XN/images.jpeg",
"website": "http://"
}
},
"name": "hive-186713",
"post_count": 0,
"reputation": 25,
"stats": {
"followers": 0,
"following": 0,
"rank": 0
}
}
\ No newline at end of file
---
test_name: Hivemind
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: test
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_profile"
params: {"account":"hive-186713"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
ignore_tags: "<bridge profile>"