How can I update a rollback that failed during the time of testing?

43    Asked by debbieJha in AWS , Asked on Mar 29, 2024

 I am a software engineer and I am currently working on a project where a recent keyword update a rollback failed during the time of testing. Describe the steps for me how can I diagnose this particular issue and implement vs successful rollback without disrupting the system? 

Answered by Drucilla Tutt

 In the context of AWS, here are the steps given:-

Diagnose the issue

Firstly, you would need to check the error logs for any specific error message. Try to verify if the rollback script implemented completely.

Implement a successful rollback

If the rollback script fails to reverse the changes then you can manually restore the previous state of the affected Component.

Preventing future rollback failure

You should improve the rollback scripts by handling edge cases, and error scenarios and ensuring transactional integrity. You can consider the implementation of a version control system or even Configuration management tools to track the changes and facilitate easier rollback.

Here is the example given in which we are assuming a database rollback in a Python-based script:-

Import traceback

Import database_module
Def rollback_keyword_update():
    Try:
        # Execute rollback SQL queries
        Database_module.execute_sql(“UPDATE keywords SET status=’active’ WHERE status=’pending_rollback’;”)
        Database_module.execute_sql(“DELETE FROM rollback_log WHERE entry_id=12345;”)
        Print(“Rollback successful.”)
    Except Exception as e:
        Print(f”Rollback failed: {e}”)
        Traceback.print_exc() # Print detailed traceback for debugging
# Call the rollback function
Rollback_keyword_update()


Your Answer

Interviews

Parent Categories