Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] retrieveTable shows messages from commits running in parallel #191

Open
JoernBerkefeld opened this issue Oct 17, 2022 · 3 comments · Fixed by #193
Open

[BUG] retrieveTable shows messages from commits running in parallel #191

JoernBerkefeld opened this issue Oct 17, 2022 · 3 comments · Fixed by #193
Assignees
Labels
bug Something isn't working sfdc
Milestone

Comments

@JoernBerkefeld
Copy link
Collaborator

events should be filtered by job execution but apparently, when somebody executes a commit and you click on refresh shortly after / similar time then you see the commit progress messages in your refreshing page

@JoernBerkefeld JoernBerkefeld added bug Something isn't working sfdc labels Oct 17, 2022
@JoernBerkefeld JoernBerkefeld added this to the #1.1 deploy 1:1 with copado-commit milestone Oct 17, 2022
@JoernBerkefeld
Copy link
Collaborator Author

from @nrabe-copado :

Here, in line 333
https://github.com/Accenture/sfmc-devtools-copado/blob/master/force-app/main/default/lwc/mcdo_RetrieveTable/mcdo_RetrieveTable.js#L333

we needed to filter by the jobId, skipping events that are not related to the current job execution:

if(stepStatus.externalJobId !== jobExecutionId) {
    return;
}

@JoernBerkefeld
Copy link
Collaborator Author

needs to be re-opend because the original solution didn't work
as of now, "externalJobId" does not include the job execution id in the event:
image

however, result id is present in the copado__Topic_Uri__c:
image
maybe we can fetch that via Apex by jumping from the job execution record, to the (one and only) step and finally to the Results record that was last created, assuming that will be ours...?

@JoernBerkefeld JoernBerkefeld modified the milestones: #1.1 deploy 1:1 with copado-commit, #3 Copado package release Oct 29, 2022
@JoernBerkefeld
Copy link
Collaborator Author

as of now we are showing all messages in the event channel, which can lead to the retrieveTable page showing parallel running commit or deploys.
we will need to write an apex getter based on having the job execution id that returns either the result id or the job id.
with that, we could then use response.data.payload.copado__Topic_Uri__c which, for updates always has this format:

"/events/copado/v1/step-monitor/"+ resulted

mcdo_RetrieveTable.js > subscribeToCompletionEvent() needs to be updated with that filter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sfdc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants