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(application): Increase reconciliation timeout to 5 Minutes #219

Merged

Conversation

VadBuka
Copy link

@VadBuka VadBuka commented Dec 2, 2024

Description of your changes

This pull request modifies the timeout for the application controller in the Crossplane project by hardcoding it to 5 minutes. The previous implementation #218 suggested using a configurable reconciliationTimeout flag, which implied it would be applied to all controllers. However, this change specifically targets only the application controller.
The decision to hardcode the timeout to 5 minutes is based on the observation that it is more straightforward to increase the timeout for applications directly, rather than introducing a configuration option. This adjustment aims to enhance the reliability and efficiency of application management by ensuring the process completes within a reasonable timeframe.

Fixes #217

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

I tested the feature with an application using the Helmfile plugin, where Helmfile rendering typically takes more than 1 minute. With the default reconciliation timeout set to 60 seconds, longer rendering processes would fail. By setting the reconciliation timeout to more than 60 seconds, I was able to successfully create an application with manifest generation taking over a minute, without encountering any errors.

Helmfile example:

/your-helmfile-directory
  ├── delay.sh
  └── helmfile.yaml
#!/bin/bash
echo "Starting delay..."
for ((i=60; i>0; i--)); do
  echo "$i seconds left"
  sleep 1
done
echo "Delay completed."
repositories:
  - name: bitnami
    url: https://charts.bitnami.com/bitnami

releases:
  - name: my-nginx-release
    namespace: default
    chart: bitnami/nginx
    version: 15.4.0  # Specify a stable version
    hooks:
      - events: ["prepare"]
        command: "./delay.sh"
        showlogs: true

@VadBuka VadBuka marked this pull request as ready for review December 2, 2024 12:44
@MisterMX MisterMX changed the title Increase application controller reconciliation timeout to 5 Minutes feat(application): Increase reconciliation timeout to 5 Minutes Dec 3, 2024
@MisterMX MisterMX changed the title feat(application): Increase reconciliation timeout to 5 Minutes fix(application): Increase reconciliation timeout to 5 Minutes Dec 3, 2024
Copy link
Collaborator

@MisterMX MisterMX left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you very much @VadBuka!

@MisterMX MisterMX merged commit 039b2cf into crossplane-contrib:main Dec 3, 2024
7 of 8 checks passed
Copy link

github-actions bot commented Dec 3, 2024

Successfully created backport PR for release-0.9:

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.

Introduce Configurable Reconciliation Timeout
2 participants