Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
9847cad5
Verified
Commit
9847cad5
authored
10 months ago
by
Konrad Botor
Browse files
Options
Downloads
Patches
Plain Diff
Updated HAF submodule and cleanup jobs.
parent
38a2d541
No related branches found
No related tags found
2 merge requests
!827
Merge develop changes to master
,
!696
Updated HAF submodule and cleanup jobs.
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yaml
+6
-5
6 additions, 5 deletions
.gitlab-ci.yaml
haf
+1
-1
1 addition, 1 deletion
haf
hive/db/sql_scripts/hafapp_api.sql
+1
-1
1 addition, 1 deletion
hive/db/sql_scripts/hafapp_api.sql
hive/indexer/mocking/mock_block.py
+10
-5
10 additions, 5 deletions
hive/indexer/mocking/mock_block.py
with
18 additions
and
12 deletions
.gitlab-ci.yaml
+
6
−
5
View file @
9847cad5
...
@@ -33,8 +33,11 @@ variables:
...
@@ -33,8 +33,11 @@ variables:
include
:
include
:
-
template
:
Workflows/Branch-Pipelines.gitlab-ci.yml
-
template
:
Workflows/Branch-Pipelines.gitlab-ci.yml
-
project
:
hive/haf
-
project
:
hive/haf
ref
:
7bb7aab44a7083994c36f040e84d501c11afc159
# develop
ref
:
e9d964849997e0cb18903f0910c4bdb293997195
# 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
ref
:
91d072682e22869aea3acd7affa20db0f6a7a2c8
file
:
/templates/cache_cleanup.gitlab-ci.yml
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| ANCHORS |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| ANCHORS |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
...
@@ -293,22 +296,20 @@ prepare_hivemind_image:
...
@@ -293,22 +296,20 @@ prepare_hivemind_image:
tags
:
*shared_tags
tags
:
*shared_tags
cleanup_hivemind_haf_cache_manual
:
cleanup_hivemind_haf_cache_manual
:
extends
:
.cleanup_cache_manual
extends
:
.cleanup_cache_manual
_template
stage
:
cleanup
stage
:
cleanup
variables
:
variables
:
CLEANUP_PATH_PATTERN
:
"
/cache/replay_data_hivemind_*"
CLEANUP_PATH_PATTERN
:
"
/cache/replay_data_hivemind_*"
resource_group
:
${CI_COMMIT_SHA}
tags
:
tags
:
-
data-cache-storage
-
data-cache-storage
# This job cleans up both Hivemind-specific cache and cache shared between projects, so it should be used in emergencies only.
# This job cleans up both Hivemind-specific cache and cache shared between projects, so it should be used in emergencies only.
# For example, if prepare_haf_data job fails in the same way in Hivemind and HAfAH.
# For example, if prepare_haf_data job fails in the same way in Hivemind and HAfAH.
cleanup_haf_cache_manual
:
cleanup_haf_cache_manual
:
extends
:
.cleanup_cache_manual
extends
:
.cleanup_cache_manual
_template
stage
:
cleanup
stage
:
cleanup
variables
:
variables
:
CLEANUP_PATH_PATTERN
:
"
/cache/replay_data_hivemind_*
/cache/replay_data_haf_*"
CLEANUP_PATH_PATTERN
:
"
/cache/replay_data_hivemind_*
/cache/replay_data_haf_*"
resource_group
:
${CI_COMMIT_SHA}
tags
:
tags
:
-
data-cache-storage
-
data-cache-storage
...
...
This diff is collapsed.
Click to expand it.
haf
@
e9d96484
Compare
7bb7aab4
...
e9d96484
Subproject commit
7bb7aab44a7083994c36f040e84d501c11afc159
Subproject commit
e9d964849997e0cb18903f0910c4bdb293997195
This diff is collapsed.
Click to expand it.
hive/db/sql_scripts/hafapp_api.sql
+
1
−
1
View file @
9847cad5
...
@@ -2,7 +2,7 @@ DROP TYPE IF EXISTS hivemind_app.hive_api_operation CASCADE;
...
@@ -2,7 +2,7 @@ DROP TYPE IF EXISTS hivemind_app.hive_api_operation CASCADE;
CREATE
TYPE
hivemind_app
.
hive_api_operation
AS
(
CREATE
TYPE
hivemind_app
.
hive_api_operation
AS
(
id
BIGINT
,
id
BIGINT
,
block_num
INT
,
block_num
INT
,
operation_type_id
SMALLINT
,
operation_type_id
INTEGER
,
is_virtual
BOOLEAN
,
is_virtual
BOOLEAN
,
body
VARCHAR
body
VARCHAR
);
);
...
...
This diff is collapsed.
Click to expand it.
hive/indexer/mocking/mock_block.py
+
10
−
5
View file @
9847cad5
...
@@ -59,6 +59,7 @@ VALUES
...
@@ -59,6 +59,7 @@ VALUES
class
OperationBase
:
class
OperationBase
:
operation_id
:
Optional
[
int
]
=
None
operation_id
:
Optional
[
int
]
=
None
pos_in_block
:
Optional
[
int
]
=
1
def
__init__
(
self
,
block_number
:
int
,
body
:
dict
):
def
__init__
(
self
,
block_number
:
int
,
body
:
dict
):
self
.
_block_number
=
block_number
self
.
_block_number
=
block_number
...
@@ -85,11 +86,17 @@ class OperationBase:
...
@@ -85,11 +86,17 @@ class OperationBase:
def
push
(
self
)
->
None
:
def
push
(
self
)
->
None
:
sql
=
"""
sql
=
"""
INSERT INTO
INSERT INTO
hive.operations (id,
block_num,
trx_in_block, op_pos,
op_type_id,
timestamp, body_binary)
hive.operations (id, trx_in_block, op_pos, timestamp, body_binary)
VALUES
VALUES
(:id,
:block_num, -2, -2, :op_type_id
, now(), :body :: jsonb :: hive.operation);
(:id,
-2, -2
, now(), :body :: jsonb :: hive.operation);
"""
"""
OperationBase
.
operation_id
+=
1
OperationBase
.
pos_in_block
+=
1
OperationBase
.
operation_id
=
Db
.
instance
().
query_one
(
sql
=
'
SELECT operation_id FROM hive.operation_id(:block_num, :op_type_id, :pos_in_block);
'
,
block_num
=
self
.
block_number
,
op_type_id
=
self
.
type
.
value
,
pos_in_block
=
OperationBase
.
pos_in_block
,
)
log
.
info
(
log
.
info
(
f
'
Attempting to push mocked
{
self
.
__class__
.
__name__
}
- type:
{
self
.
type
}
id:
{
OperationBase
.
operation_id
}
'
f
'
Attempting to push mocked
{
self
.
__class__
.
__name__
}
- type:
{
self
.
type
}
id:
{
OperationBase
.
operation_id
}
'
...
@@ -98,8 +105,6 @@ VALUES
...
@@ -98,8 +105,6 @@ VALUES
Db
.
instance
().
query
(
Db
.
instance
().
query
(
sql
=
sql
,
sql
=
sql
,
id
=
OperationBase
.
operation_id
,
id
=
OperationBase
.
operation_id
,
block_num
=
self
.
block_number
,
op_type_id
=
self
.
type
.
value
,
body
=
json
.
dumps
(
self
.
body
),
body
=
json
.
dumps
(
self
.
body
),
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment