CarolApp installation triggered by Carol Admin causing Staging Table with Inactive status - StagingSchema

Description

PRDE - Story default text according to the team DoR (Definition of Ready)

01 - PERSON OF CONTACT (PERSON THAT CAN ANSWER QUESTIONS ABOUT THE PROBLEM):

@Cindy de Araujo Soares Moore
02 - STORY BRIEFING (AS A < PERSONA >, I [WANT TO] < NEED >, [SO THAT] < GOAL >):

Carol Admin users should be able to trigger a CarolApp installation without any issues / consequences.

Today, we figured out through the issue

that the Carol App installation triggered by a user with the role Carol Admin keeps staging table with status INACTIVE.

03 - PROBLEM (WHAT'S THE CURRENT PROBLEM SCENARIO OR PAIN TO BE RESOLVED?):

The platform allows changing BQ fields in StagingSchema in general operations when the user is CarolAdmin/System. This permission was implemented to allow some punctual fixes in the records. However, this behavior is causing some invalid statuses in the case of the CarolApp installation triggered by CarolAdmin users.

See the discussion:https://totvslabs.slack.com/archives/C03NT4US9J9/p1692127366776089

04 - GOAL (DESCRIBE THE PROPOSED SOLUTION):

Suggestion (Cindy):

  • Create a specific endpoint for CarolAdmin to change BQ status (this will be treated as an internal operation)
  • Disallow changes in BQ status fields in any scenario if it is a general operation.

05 - WHO CAN USE THIS FEATURE (USER ROLES):
06 - ACTIVITY DIAGRAM (ACTIVITY DIAGRAM LINK AND IMAGE):
07 - STEPS (ACTIONS TO BE PERFORMED LINKING TO SCREENSHOTS):
08 - ALTERNATIVE STEPS:
09 - ASSETS (FIGMA LINKS, RELEVANT DOCUMENTATION LINKS, JSON EXAMPLES, ETC):
10 - ACCEPTANCE CRITERIA:

  • Make the Carol App installation triggered by a user holding the role Carol Admin without impacting the field mdmBigQuerySynchronizationStatus-.(Staging Schema) (-Explanation here)
  • Allow the PUT resource on staging schema change value in columns mdmBigQuerySynchronizationStatus, mdmBigQueryLoadDataStatus when use carol admin
    • If don’t use carol admin ignore the values sent to change

Activity

Automation for Jira 30 January 2024, 11:30 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@André Pereira de Oliveira , @Douglas Coimbra Lopes , @MARCOS STUMPF

The JIRA TOTVS issues https://jiraproducao.totvs.com.br/browse/DLABSCAPL-3624 was just closed because it was waiting customer more than 10 days. This JIRA LABS issue was also transitioned to done.

Automation for Jira 19 January 2024, 21:53 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@MARCOS STUMPF , @André Pereira de Oliveira ,

You have just moved the JIRA TOTVS issue https://jiraproducao.totvs.com.br/browse/DLABSCAPL-3624 to the Customer responsability.

🔴 HEADS UP: Issue Creator on JIRA TOTVS BRAZIL is currently INACTIVE (maybe on vacation).

MARCOS STUMPF 19 January 2024, 21:52

#customer

Prezado cliente, informamos que a issue foi liberada em produção há 8 dias atrás.

Solicitamos validar a solução para que possamos proceder com o encerramento do card em caso de sucesso.

Obrigado.

Automation for Jira 19 January 2024, 21:49 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@André Pereira de Oliveira , @Douglas Coimbra Lopes , @Gabriel DAmore Marciano , @Geny Isam Hamud Herrera

Heads Up!
Changed Issue field(s) URL Documento Técnico on Jira Brazil Issue.

Automation for Jira 8 January 2024, 13:11 Jira Internal Users

This issue was automatically transitioned to WAITING DEPLOY, as its linked QA regression issue has just reached WAITING DEPLOY status (PR was just merged into master branch in Github).

Gabriel DAmore Marciano 5 January 2024, 18:41 Jira Internal Users

The first AC of the card is not going to be covered and it is split into two new cards:
1-


2-

Automation for Jira 4 January 2024, 22:29 Jira Internal Users

This issue was automatically transitioned to REGRESSION, as its PR was just merged into qa branch in Github.

Automation for Jira 3 January 2024, 22:36 Jira Internal Users

This issue was automatically transitioned to TESTED & MERGED, as its PR was just merged into develop branch in Github. PR Approved by genyherrera,douglascoimbra.

Automation for Jira 3 January 2024, 15:46 Jira Internal Users

Github user douglascoimbra has just approved a PR (added as Shard Assignee in this Jira issue).

fix: CAPL-4739 Done CarolApp installation triggered by Carol Admin causing Staging Table with Inactive status

Automation for Jira 3 January 2024, 15:45 Jira Internal Users

This issue was automatically transitioned to QA REVIEW, as its PR was just approved in Github.

Automation for Jira 2 January 2024, 19:35 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@André Pereira de Oliveira , @Douglas Coimbra Lopes

Comment sent to JIRA TOTVS Brazil - https://jiraproducao.totvs.com.br/browse/DLABSCAPL-3624:

Informamos que esta issue foi incluída em uma sprint com previsão de entrega até 2024-01-22 (podendo ocorrer retorno antes). Não é necessário retornar esta interação, caso não tenha dúvidas. Qualquer alteração de planejamento será novamente notificada nesta issue.

Atenciosamente,
Equipe TOTVS LABS.

Automation for Jira 2 January 2024, 19:32 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@Geny Isam Hamud Herrera , @André Pereira de Oliveira , @Douglas Coimbra Lopes

This issue was planned to be delivered until 2024-01-22. You can check that by consulting the issue in the Due Date field.

Dates already planned for this issue: 2024-01-22, 2023-12-11, 2024-01-02

If External Issue Link field is filled, customer was also informed on JIRA TOTVS.

Douglas Coimbra Lopes 2 January 2024, 17:11 Jira Internal Users

@André Pereira de Oliveira The card has been validated by the QA team. It is pending only the code review. cc @Gabriel DAmore Marciano @Geny Isam Hamud Herrera

Automation for Jira 2 January 2024, 13:27 Jira Internal Users

This issue was automatically transitioned to REVIEW, as its PR (not DRAFT and not WIP) was just created in Github.

fix: CAPL-4739 Done CarolApp installation triggered by Carol Admin causing Staging Table with Inactive status

Douglas Coimbra Lopes 2 January 2024, 12:53 Jira Internal Users

SECOND TEST

UPDATE CAROL APP

Automation for Jira 2 January 2024, 12:53 Jira Internal Users

🚨 Bom dia. Cenario identificado no card .
• Carol Admin via impersonation nao consegue efetuar update no parametro `mdmBigQuerySynchronizationStatus`. Ao passar o parametro junto ao schema update, eh apresentado uma msg de erro
• CURL disponivel no card

Sent by Slack - platform-internal - Douglas Coimbra Lopes

Automation for Jira 2 January 2024, 11:48 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@André Pereira de Oliveira , @Douglas Coimbra Lopes

Heads Up!
Changed Issue field(s) status, resolution on Jira Brazil Issue.

Automation for Jira 1 January 2024, 11:30 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@André Pereira de Oliveira , @Douglas Coimbra Lopes

The JIRA TOTVS issues https://jiraproducao.totvs.com.br/browse/DLABSCAPL-3624 was just closed because it was waiting customer more than 10 days. This JIRA LABS issue was also transitioned to done.

André Pereira de Oliveira 29 December 2023, 23:16 Jira Internal Users

@Douglas Coimbra Lopes

When I checked the status was SYNCHRONIZED. I think it was a slow integration between the platform and data.

Tuesday, I’d like to retry this test.

Douglas Coimbra Lopes 29 December 2023, 20:40 Jira Internal Users

@André Pereira de Oliveira TEST FAILED

INSTALLING CAROL APP AS CAROL ADMIN (FIRST VERSION)

Douglas Coimbra Lopes 29 December 2023, 20:30 Jira Internal Users

CAROL ADMIN IMPERSONATING AND MANIPULATING BIG QUERY PARAMETERS FOR STAGING

  • NOW ALLOWING TENATADMIN/ORGADMIN TO PERFORM THIS ACTION

Automation for Jira 19 December 2023, 14:11 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@Ieda Beatriz Closa Brasil , @Renan Schroeder ,

You have just moved the JIRA TOTVS issue https://jiraproducao.totvs.com.br/browse/DLABSCAPL-3624 to the Customer responsability.

Ieda Beatriz Closa Brasil 19 December 2023, 14:10

#customer

Léo,

Este tema ainda tem alguma pendência ou podemos encerrá-lo?

Obrigada.

Ieda Beatriz Closa Brasil 19 December 2023, 14:09 Jira Internal Users

@Renan Schroeder bom dia.

Como está a situação deste card? Podemos concluir para o cliente ou ainda tem algo a ser tratado?

Automation for Jira 12 December 2023, 15:44 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@Gabriel DAmore Marciano , @Renan Schroeder ,

Flag was removed since you have just transitioned the issue status/column.

Automation for Jira 11 December 2023, 20:29 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@Renan Schroeder ,

Comment sent to JIRA TOTVS Brazil - https://jiraproducao.totvs.com.br/browse/DLABSCAPL-3624:

Informamos que esta issue foi incluída em uma sprint com previsão de entrega até 2024-01-01 (podendo ocorrer retorno antes). Não é necessário retornar esta interação, caso não tenha dúvidas. Qualquer alteração de planejamento será novamente notificada nesta issue.

Atenciosamente,
Equipe TOTVS LABS.

Automation for Jira 11 December 2023, 20:26 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@Pedro Buzzi , @Renan Schroeder ,

This issue was planned to be delivered until 2024-01-01. You can check that by consulting the issue in the Due Date field.

Dates already planned for this issue: 2023-12-11, 2024-01-01

If External Issue Link field is filled, customer was also informed on JIRA TOTVS.

Gabriel DAmore Marciano 7 December 2023, 16:00 Jira Internal Users

Flag added

This card is now hard stopped because of the pair programming @Renan Schroeder will do with @Emerson Venancio since this is his last week

Breno Zipoli Monteiro Papa 6 December 2023, 12:13 Jira Internal Users

Additional details asked by @Renan Schroeder,

I was using my Carol Admin user credentials and using 'overriddentenantid': tenant['mdmId'] in the request I could use scale the executions and not have to access each tenant individually.

A sample of the code:

load_dotenv()

carol = pycarol.Carol(auth=pycarol.PwdAuth(os.environ.get("CAROLUSER"), os.environ.get("CAROLPWD")), organization='global', domain='admin')

if args.get('tenantid'):
    tenant = carol.call_api(f'v3/admin/tenants/{args.get("tenantid")}', 'GET')
elif args.get('tenant'):
    tenant = carol.call_api(f'v3/tenants/domain/{args.get("tenant")}', 'GET')
else:
    raise Exception("Tenant not found!!! Use --tenant or --tenantid")

subscribe = carol.call_api(f'v1/tenantApps/subscribe/carolApps/{app["mdmId"]}', 'POST', extra_headers={'overriddentenantid': tenant['mdmId']})
update = carol.call_api(f'v1/tenantApps/{subscribe["mdmId"]}/install?publish=true', 'POST', extra_headers={'overriddentenantid': tenant['mdmId']})

Where:

tenant['mdmId'] is the tenant Id where I want to install the app

app["mdmId"] is the app Id that I want to install in given tenant

Automation for Jira 5 December 2023, 13:46 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@Renan Schroeder ,

Comment sent to JIRA TOTVS Brazil - https://jiraproducao.totvs.com.br/browse/DLABSCAPL-3624:

Iniciamos a trabalhar em sua issue e manteremos você informado!

Atenciosamente,
Equipe TOTVS LABS.

Gabriel DAmore Marciano 1 December 2023, 16:04 Jira Internal Users

This card was initially PLANNED, however due to the high number of red-phones on the sprint this card is probably not going to have enough capacity to be finished on the dev cycle. That’s why, changing from PLANNED to NOT_PLANNED.

Automation for Jira 20 November 2023, 21:55 Jira Internal Users

@Cindy de Araujo Soares Moore ,

@Geny Isam Hamud Herrera ,
Comment sent to JIRA TOTVS Brazil - https://jiraproducao.totvs.com.br/browse/DLABSCAPL-3624:

Informamos que esta issue foi incluída em uma sprint com previsão de entrega até 2023-12-11 (podendo ocorrer retorno antes). Não é necessário retornar esta interação, caso não tenha dúvidas. Qualquer alteração de planejamento será novamente notificada nesta issue.

Atenciosamente,
Equipe TOTVS LABS.

Automation for Jira 20 November 2023, 21:54 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@Geny Isam Hamud Herrera ,

This issue was planned to be delivered until 2023-12-11. You can check that by consulting the issue in the Due Date field.

Dates already planned for this issue: 2023-12-11

If External Issue Link field is filled, customer was also informed on JIRA TOTVS.

Automation for Jira 11 October 2023, 19:16 Jira Internal Users

Message thread link on #red-phone channel:

https://totvslabs.slack.com/archives/C03NT4US9J9/p1697044577520779

Automation for Jira 27 September 2023, 20:26 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@MARCOS STUMPF , @Robson Thanael Poffo ,

This issue is pending for cloning and/or moving to Carol Backlog since you have just transitioned the issue status/column.

Automation for Jira 20 September 2023, 20:33 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@Robson Thanael Poffo ,

This issue is pending for Carol Backlog Review since you have just transitioned the issue status/column.

Automation for Jira 20 September 2023, 20:29 Jira Internal Users

@Cindy de Araujo Soares Moore ,
@Robson Thanael Poffo ,

This issue is pending for UX Review since you have just transitioned the issue status/column.