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

Justafish/issue 204 acquia integration v3 #740

Draft
wants to merge 142 commits into
base: justafish/issue-204-acquia-integration
Choose a base branch
from

Conversation

beto-aveiga
Copy link
Collaborator

@beto-aveiga beto-aveiga commented Nov 25, 2024

@beto-aveiga beto-aveiga changed the base branch from main to justafish/issue-204-acquia-integration November 25, 2024 15:55
@github-actions github-actions bot had a problem deploying to pantheon-pr-740 November 25, 2024 19:13 Failure
@github-actions github-actions bot requested a deployment to pantheon-pr-740 November 25, 2024 19:27 In progress
@github-actions github-actions bot temporarily deployed to lullabotsandbox.dev January 28, 2025 20:43 Inactive
@github-actions github-actions bot temporarily deployed to lullabotsandbox.dev January 28, 2025 21:09 Inactive
@github-actions github-actions bot temporarily deployed to lullabotsandbox.dev January 28, 2025 21:22 Inactive
@github-actions github-actions bot temporarily deployed to lullabotsandbox.dev January 28, 2025 21:36 Inactive
@github-actions github-actions bot temporarily deployed to lullabotsandbox.dev January 28, 2025 21:50 Inactive
@beto-aveiga
Copy link
Collaborator Author

The tests are passing, but yesterday, I noticed that the configuration is not being imported.
I wonder if this is related to code-switching needing a container replacement when the code is switched, and we are running configuration imports too early.
By the way, I'm cloning from PROD to DEV. PROD works as expected.

@mrdavidburns

@mrdavidburns
Copy link
Member

@beto-aveiga I notice you have a lot of Github Action workflows deleted in this pull request. Was that to save time while testing?

What's the intent of this pull request? Will we cherry-pick the important things to keep like:

  • .github/workflows/TestAcquia.yml
  • scaffold/github/actions/acquia/clone-env/action.yml
  • scaffold/github/actions/acquia/deploy/action.yml

And put those into #740

@beto-aveiga
Copy link
Collaborator Author

beto-aveiga commented Jan 29, 2025

@beto-aveiga I notice you have a lot of Github Action workflows deleted in this pull request. Was that to save time while testing?

Absolutely. I will restore them when there is no need for more code.

What's the intent of this pull request? Will we cherry-pick the important things to keep like:

Make .github/workflows/TestAcquia.yml to pass and ensure the deployment works in the DEV environment where we are deploying. I'm preserving the original test structure that @justafish wrote.

@mrdavidburns

@beto-aveiga
Copy link
Collaborator Author

At scaffold/github/actions/acquia/clone-env/action.yml, we run:

        drainpipe_exec "acli env:mirror --no-config --no-interaction ${{ inputs.source-environment }} ${{ inputs.target-environment }}"

This is likely an async command, so it will run after it returns the control to our deployment script. If we immediately run configuration imports, those configuration imports will be lost because our application's container(s) will be replaced. I will check if this is true by looking at the deploy workflow and the Acquia activity feed.

@mrdavidburns

@github-actions github-actions bot temporarily deployed to lullabotsandbox.dev February 3, 2025 16:24 Inactive
@beto-aveiga
Copy link
Collaborator Author

Regarding my previous comment...
I re-ran the deployment process and verified that after our deploy workflow test had ended, the Acquia code switch was still running. That means that the code switch was still in progress while we were running the configuration updates.

In other words, after we ran acquia/push, we ran acquia/update, but acquia/push invoked acli api:environments:code-switch, which happens asynchronously and takes a few minutes.

So, between acquia/push and acquia/update we need an something to way for the code switch to complete, otherwise our config import changes will be lost.

@mrdavidburns
Copy link
Member

@beto-aveiga
Copy link
Collaborator Author

I love that solution. Thanks. @mrdavidburns !

I was already asking ChatGPT, and it gave me a different route.
https://chatgpt.com/share/67a0f0b2-fe3c-8004-b414-df645e3d24e0

But I will first try yours because it looks self-explanatory.

@beto-aveiga
Copy link
Collaborator Author

@mrdavidburns I was reading the code:switch documentation.
https://docs.acquia.com/acquia-cloud-platform/add-ons/acquia-cli/commands/api:environments:code-switch

And I noticed an important parameter:
--task-wait

I will try this first, as it doesn't require more complexity, and our line to run the code switch is already complex.

drainpipe_exec "acli api:environments:code-switch ${{ inputs.environment }} \"$BRANCH\""

@beto-aveiga
Copy link
Collaborator Author

Github status says everything is okay but workflows are not running 🤔

…ullabot/drainpipe into justafish/issue-204-acquia-integration--v3
@beto-aveiga
Copy link
Collaborator Author

Good!
So far, it's working as expected. :)
image

@beto-aveiga
Copy link
Collaborator Author

Taking forever... I checked Acquia UI, also taking forever.

@beto-aveiga
Copy link
Collaborator Author

beto-aveiga commented Feb 3, 2025

Re-running it. I don't know why the same actions took forever to complete. The only thing I added was --task-wait

@beto-aveiga
Copy link
Collaborator Author

Now that it works, the next step is to try to make a deployment to DEV with an actual site repository on Acquia.
Then, if that works as expected, finish this PR by restoring files and cleaning the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants