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

bot files fail to deploy after version is activated #280

Open
pcon opened this issue Aug 17, 2022 · 21 comments
Open

bot files fail to deploy after version is activated #280

pcon opened this issue Aug 17, 2022 · 21 comments
Assignees

Comments

@pcon
Copy link
Member

pcon commented Aug 17, 2022

It appears that when running a delta-push bot files are trying to be re-deployed after they have been pushed and activated. The delta-push command should not include a .bot file in it's push if the same bot file exists in the target org

@sfloess
Copy link
Member

sfloess commented Aug 17, 2022

@pcon - what's the severity on this? Specifically asking so I can prioritize my time :) Super busy at work, but if this is a blocker, I will do my best :)

@pcon
Copy link
Member Author

pcon commented Aug 23, 2022

@sfloess it's pretty high priority. It requires us to disable the bot to do the push. Which with the bot getting ready to go live will cause problems.

@sfloess
Copy link
Member

sfloess commented Aug 23, 2022

@pcon - will see what I can do sir.

@sfloess
Copy link
Member

sfloess commented Aug 28, 2022

@pcon - haven't looked a this yet so forgive the question if it'll be obvious :) How does one know it's the same bot file?

@pcon
Copy link
Member Author

pcon commented Aug 28, 2022

@sfloess I haven't had much time to dig into it, but each bot file has a botVersions section that defines the version. I think what is happening is that Solenopsis is just pushing all the .bot files all the time regardless of if it's changed or not. Or something like that. When the bot is marked as active (this has to be done in the Lightning Experience view) the deployment fails because it's trying to redeploy an active bot.

@sfloess
Copy link
Member

sfloess commented Aug 29, 2022

@pcon - OK gotcha. I'll look more closely, but this gets me on the right track :)

@sfloess
Copy link
Member

sfloess commented Sep 9, 2022

@pcon - may need your help here. What do I do to reproduce this. I tried a pull-full and then delta-push. I am betting there is some setting someplace (UI or otherwise)?

[sf:deploy] -----------------------------------------------------------------------------------
[sf:deploy] Component Failures:
[sf:deploy] 1.  bots/RedHatChatBot.bot -- Error: Not available for deploy for this organization
[sf:deploy] -----------------------------------------------------------------------------------

I googled and tried to enable einstein bots but am not finding that in the web UI.

@sfloess
Copy link
Member

sfloess commented Sep 14, 2022

After meeting w/ @pcon to enable bots:

  • Ensure reproducer first
    • Use active bot for pull.
    • Delta push back out.
  • Make inactive in XML file and attempt another delta push.

@sfloess
Copy link
Member

sfloess commented Oct 26, 2022

@pcon - reproduced this with my sandbox...onto a fix :)

@sfloess
Copy link
Member

sfloess commented Oct 26, 2022

@pcon - out of curiosity, do you know what in the .bot file denotes it is active?

@sfloess
Copy link
Member

sfloess commented Oct 26, 2022

@pcon - looks like it may be driven by isActive in LiveChatButton.

@pcon
Copy link
Member Author

pcon commented Oct 31, 2022

I think that we just need to do a pull and see if the version number already exists in the deployment. If it does remove the entire botVersions stanza with the same fullName and not try to redeploy it. However, I'm not sure if SFDC would consider that a removal or not...

@sfloess
Copy link
Member

sfloess commented Nov 3, 2022

@pcon - I don't recall seeing a version number in the meta data bot file. Are you referring to something else?

@sfloess
Copy link
Member

sfloess commented Nov 6, 2022

@pcon - are you talking about this:

    <botVersions>
        <fullName>v1</fullName>

@pcon
Copy link
Member Author

pcon commented Nov 6, 2022

@sfloess yeah that's the field

@sfloess
Copy link
Member

sfloess commented Nov 6, 2022

@pcon - thanks bro! I was assuming so - trying to get this done now. Cannot believe how far removed from all this I feel atm :)

@sfloess
Copy link
Member

sfloess commented Nov 6, 2022

@pcon - I think we are in business! Mind testing my branch sfloess_issue-280? I tested it locally, but I'd like your official blessing.

@pcon
Copy link
Member Author

pcon commented Nov 6, 2022

I'm out until next Wednesday. Might want to reach out to Preeti to see if she can test it. She's doing all the bot development anyway

@sfloess
Copy link
Member

sfloess commented Nov 6, 2022

@pcon - certainly! I didn't realize you were out!

@sfloess sfloess closed this as completed in 5f45214 Nov 8, 2022
@sfloess
Copy link
Member

sfloess commented Nov 8, 2022

@pcon - when you return and have time: I note the master branch is protected and required an approver? Not sure if you set this or not. Regardless, this will break builds (it broke on this resolution) as the build needs to update the spec file and tag in git.

I disabled to get the build to pass, but wanted to reach out and let you know (just in case we want that re-enabled).

@sfloess
Copy link
Member

sfloess commented Mar 1, 2023

Re-opening as this is still a problem.

sfloess pushed a commit that referenced this issue May 13, 2023
sfloess pushed a commit that referenced this issue May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants