You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m working with the latest version of gravitee (4.2.0) and postresql (15.1).
I’ve created a script that allows me to create api into gravitee via a rest request (“management/v2/environments/DEFAULT/apis/_import/definition”) and to start it (“management/v2/environments/DEFAULT/apis/${id}/_start”).
The api is imported and started but flow_steps in policies are randomly added.
For example, api has A → B → C as flows. After import, i’ll have B->A->C or C->B->A.
This issue is also occurs when I update a flow_steps from the interface.
To Reproduce
Steps to reproduce the behaviour:
Create an api with several policies
Export api via the interface
Check that all flow_steps are in the right order in the exported json
Import api via the interface or via rest api
Go to the policies of the created api and see random flow_steps
Expected behaviour
Reimporting an api should keep flow_steps order.
Useful information
I’ve tried to analyze how the db is made and the only thing I’ve seen so far is that order in flow_steps table is always inserted with 0. Not sure if this is relevant.
CREATE SEQUENCE flow_steps_order_sequence;
ALTER TABLE flow_steps ALTER COLUMN "order" SET DEFAULT nextval('flow_steps_order_sequence');
ALTER SEQUENCE flow_steps_order_sequence OWNER TO <your_db_user>;
ALTER SEQUENCE flow_steps_order_sequence OWNED BY flow_steps.order;
CREATE OR REPLACE FUNCTION ignore_auto_increment_column()
RETURNS TRIGGER AS $$
BEGIN
RAISE NOTICE 'Executing trigger: ignore_auto_increment_column';
NEW."order" := nextval('flow_steps_order_sequence');
RAISE NOTICE 'Order value updated to: %', NEW."order";
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER before_insert_trigger
BEFORE INSERT ON flow_steps
FOR EACH ROW
EXECUTE FUNCTION ignore_auto_increment_column();
Describe the bug
Hi,
I’m working with the latest version of gravitee (4.2.0) and postresql (15.1).
I’ve created a script that allows me to create api into gravitee via a rest request (“management/v2/environments/DEFAULT/apis/_import/definition”) and to start it (“management/v2/environments/DEFAULT/apis/${id}/_start”).
The api is imported and started but flow_steps in policies are randomly added.
For example, api has A → B → C as flows. After import, i’ll have B->A->C or C->B->A.
This issue is also occurs when I update a flow_steps from the interface.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Reimporting an api should keep flow_steps order.
Useful information
I’ve tried to analyze how the db is made and the only thing I’ve seen so far is that order in flow_steps table is always inserted with 0. Not sure if this is relevant.
Environment
gravitee 4.2.0
Potential impacts
Dependencies
https://community.gravitee.io/t/random-order-in-flow-steps/2396/1
The text was updated successfully, but these errors were encountered: