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

feat: retrieve integration meta data from new endpoint #5647

Merged

Conversation

lemusthelroy
Copy link
Contributor

@lemusthelroy lemusthelroy commented May 21, 2024

🎉 Thanks for submitting a pull request! 🎉

Summary

Integrations are changing and this also means the endpoint we use to fetch information about integrations installed on a site is also changing. This points to the new endpoint behind a feature flag.


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures
    we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
    something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

Copy link
Contributor

@khendrikse khendrikse left a comment

Choose a reason for hiding this comment

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

Looks good :)

@lemusthelroy lemusthelroy marked this pull request as ready for review May 21, 2024 14:55
@lemusthelroy lemusthelroy requested review from a team as code owners May 21, 2024 14:55
Comment on lines 50 to 66
if (useV2Endpoint) {
const promises = [
getAccounts(api),
getAddons(api, siteId),
getIntegrations({ siteId, testOpts, offline, accountId: siteInfo.account_id, featureFlags }),
]

siteInfo.build_settings.env = envelope
}
const [accounts, addons, integrations] = await Promise.all(promises)

if (siteInfo.use_envelope) {
const envelope = await getEnvelope({ api, accountId: siteInfo.account_slug, siteId, context })

siteInfo.build_settings.env = envelope
}

return { siteInfo, accounts, addons, integrations }
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

what's about mode 'buildbot' shouldn't be this covered in this part as well?

Why is the mode buildbot only covered in the non feature flaged way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I am honest, I don't know why we did this and I opted to keep this as it was previously written so that I could be sure I didn't regress the previous functionality as I am only interested in the adding the v2 behaviour

@lemusthelroy lemusthelroy enabled auto-merge (squash) May 29, 2024 09:38
@lemusthelroy lemusthelroy merged commit b8899e0 into main May 29, 2024
37 checks passed
@lemusthelroy lemusthelroy deleted the lemusthelroy/ct-1160-point-build-system-to-new-endpoint branch May 29, 2024 10:24
This was referenced May 29, 2024
This was referenced Jun 10, 2024
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