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

[FHIR] added workflow to lint and test charts #37

Merged
merged 2 commits into from
Sep 24, 2021

Conversation

chgl
Copy link
Collaborator

@chgl chgl commented Sep 23, 2021

Closes #36

Please note that this includes 3 changes which were arguably outside the scope of just adding a new workflow:

  1. I had to reduce the default replicaCount to 1 because the hosted GitHub runners only have 7GiB of RAM by default (https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners). Note that alternatively we could specify custom values.yaml files to be used by chart-testing if we want to keep the default at 2 replicas (see https://github.com/helm/chart-testing/blob/main/doc/ct_install.md). Or we could remove the resource requests entirely. Or reduce the replica count to 1 by default and remove the resource requests/limits - which is maybe a bit more common among the charts found in the wild.

  2. I added the home and type fields to the Chart.yaml - mostly because the chart-schema.yaml I copy-pasted had them set as required. The former adds a Homepage to the list of links on artifacthub - which may be nice, the latter is just for completeness sake.

  3. I made the helm test job a bit more fault-tolerant by adding retries and increased timeouts. This should help avoiding flaky test behavior - this is related to the server becoming "ready" before the schema job has completed, see Add PostgreSQL as a subchart to simplify out-of-the-box installation #28 (comment)

@chgl chgl force-pushed the lint-and-test-charts branch 2 times, most recently from 45ffbfc to ff91bde Compare September 23, 2021 18:40
@chgl chgl force-pushed the lint-and-test-charts branch from ff91bde to c916f11 Compare September 23, 2021 18:45
@chgl chgl force-pushed the lint-and-test-charts branch 9 times, most recently from 84e86fb to 07177cd Compare September 23, 2021 22:27
@chgl chgl force-pushed the lint-and-test-charts branch from 07177cd to c93e2c5 Compare September 23, 2021 22:29
@chgl
Copy link
Collaborator Author

chgl commented Sep 23, 2021

Because I had forgotten to update the README.md using helm-docs in my original commit, I just added a new job to run pre-commit (and therefore helm-docs) as part of the CI as well.

Installation was a bit more involved since the https://github.com/pre-commit/action action is unfortunately deprecated.

@lmsurpre
Copy link
Collaborator

lmsurpre commented Sep 24, 2021

I had to reduce the default replicaCount to 1 because the hosted GitHub runners only have 7GiB of RAM by default (https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners). Note that alternatively we could specify custom values.yaml files to be used by chart-testing if we want to keep the default at 2 replicas (see https://github.com/helm/chart-testing/blob/main/doc/ct_install.md). Or we could remove the resource requests entirely. Or reduce the replica count to 1 by default and remove the resource requests/limits - which is maybe a bit more common among the charts found in the wild.

My thoughts:

  1. I prefer a replica count of 2 because our server is stateless (minus caching for performance) and I think its best practice to have more than one replica. That said, I'm not totally opposed to dropping it to 1 if it gets us a running CI.
  2. I want to remove the resource requests from the deployment, but I think we have some work to do there to make that possible. For historical reasons, the FHIR server defaults to a min and max heap size of 4GB. It does run with much less though. We have tasks under github.com/ibm/fhir for better understanding on our memory usage and that could inform our defaults. Til then, it is totally possible to override the default min/max heap size of liberty by placing a jvm.options file under configDropins/overrides. I've opened Support min/max heap size overrides #38 for that.

@chgl
Copy link
Collaborator Author

chgl commented Sep 24, 2021

My thoughts:

  1. I prefer a replica count of 2 because our server is stateless (minus caching for performance) and I think its best practice to have more than one replica. That said, I'm not totally opposed to dropping it to 1 if it gets us a running CI.

I completely agree, for any production usage, there should be more than 1 replica. But I also think a default of 1 is reasonable. I've added #39 which is helpful in >1 replica scenarios.

  1. I want to remove the resource requests from the deployment, but I think we have some work to do there to make that possible. For historical reasons, the FHIR server defaults to a min and max heap size of 4GB. It does run with much less though. We have tasks under github.com/ibm/fhir for better understanding on our memory usage and that could inform our defaults. Til then, it is totally possible to override the default min/max heap size of liberty by placing a jvm.options file under configDropins/overrides. I've opened Support mix/max heap size overrides #38 for that.

Ah I see, thank you! This may be off-topic, but does setting XX:MaxRAMPercentage (https://www.atamanroman.dev/articles/usecontainersupport-to-the-rescue/) work? So we'd only have to specify the percentage once and then have it use the container resource limits.

@lmsurpre lmsurpre self-requested a review September 24, 2021 14:18
@lmsurpre lmsurpre merged commit 6e70612 into Alvearie:main Sep 24, 2021
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.

[FHIR] Add chart-testing workflow
3 participants