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

fix(phpmyadmin): Add step to wait for PhpMyAdmin readiness. #1809

Closed
wants to merge 12 commits into from

Conversation

aswasif007
Copy link
Contributor

Description

After spinning up the necessary pod to run PhpMyAdmin, we have to wait for the LB to be propagated, so that the requests to the PhpMyAdmin link are served the by PhpMyAdmin pod. In this PR, we are adding a step to wait to see the LB routing is happening before we generate an access.

Pull request checklist

Steps to Test

  1. Check out PR.
  2. Run npm run build
  3. Run node ./dist/bin/vip db phpmyadmin @<app>.<env>. This should be run on an environment for which PMA is not enabled yet.
  4. Ensure that a browser page opened, and it did not end up with an error.

@aswasif007 aswasif007 requested a review from a team May 2, 2024 05:58
Copy link
Contributor

github-actions bot commented May 2, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

src/commands/phpmyadmin.ts Outdated Show resolved Hide resolved
src/commands/phpmyadmin.ts Outdated Show resolved Hide resolved
@aswasif007 aswasif007 force-pushed the forno-1953/update/pma-cli branch from 4423c33 to 9097297 Compare May 3, 2024 15:08
@aswasif007 aswasif007 requested a review from saroshaga May 3, 2024 15:10
@aswasif007
Copy link
Contributor Author

aswasif007 commented May 3, 2024

Update: upon an offline discussion with Sarosh, we agreed to create a status/healthcheck endpoint in the phpMyAdmin itself, which will allow us to detect readiness in a cleaner way.

@aswasif007 aswasif007 force-pushed the forno-1953/update/pma-cli branch from d3defb4 to 67c8b89 Compare May 22, 2024 09:13
@aswasif007 aswasif007 requested a review from saroshaga May 22, 2024 09:14
@aswasif007 aswasif007 force-pushed the forno-1953/update/pma-cli branch from c42f28d to 6cb420b Compare May 23, 2024 14:07
@aswasif007 aswasif007 requested review from saroshaga and a team May 23, 2024 14:09
@aswasif007 aswasif007 force-pushed the forno-1953/update/pma-cli branch from a0047d1 to 746d705 Compare May 24, 2024 06:37
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Comment on lines +168 to +172
const resp = await fetch( url, {
method: 'GET',
redirect: 'manual',
agent: agent ?? undefined,
} );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add some cache-ignoring/cache-busting headers/cookies here? Or switch to POST here? It will at least eliminate the possibility that it's not the cache that's causing issues.

@aswasif007 aswasif007 closed this Jul 3, 2024
@sjinks sjinks deleted the forno-1953/update/pma-cli branch December 18, 2024 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants