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
constrain an agents memory #380
Conversation
Notivced when looking at the memory usage of pipeline-model-defintion that the agents created in the tests did not have a constrained memory set. This means that the tests would be platform dependent. or flaky depending on what GC happens at various times. the number 512 is relativly arbitrary, but k8s agents use 256Mi as a request and so 512 is double that, and the agent process is supposed to be lightweight. Whilst this could reveal a few issues in plugins when they upgrade, it seems to me that that could be a bug in the plugin, and so I have not implemented a way to create an online slave with a specific amount of memory. if that is indeed required it can be added later as jth updates are not forced on plugins.
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
I think a realistic test of this PR would involve the following:
|
Yes we could do it that way rather than just waiting to see if there are any regressions and reverting if so. Any volunteers? |
I am creating some PRs |
good luck while jenkins-infra/helpdesk#2733 is a thing |
CI build failed due to a timeout (50+ minutes before even starting the tests) which looks like the artifactory issue) so there is no incremental to attempt to use at the moment 😢 |
I was thinking this would most likely break the maven-plugin as that does horrible things with maven in the agent process but we are in luck - it copies the JTH code 🥳 |
jenkinsci/jenkins#6192 exists and has 2 failures - both have been observed before this change.
pipeline-model-definition does that and there is a PR that fixes a lot of tests. also given the extended issue with artifactory it is not clear if I can demonstrate this any further before getting a release? |
Shouldn't we identify the cause of the regression and revert the fix forward before adding more changes to this module? |
I assumed given Basil reverted it that he is working on it somewhere. there are so few things in the change the only thing that looked applicable was the junit5 stuff (#375). the Jenkins build is also no longer happy regardless of the JTH version (windows ACI agent issue) and given this does not seem to impact everyone, merging this whilst the above investigation goes on should not be a blocker should it (no one is forcing this update on anyone - it is purely opt in and given the changelog should not impact any reverting or fixing due to conflicts)? Also to note at least one plugin (that is pretty important) is getting much less test coverage than it should because of this issue jenkinsci/pipeline-model-definition-plugin#477 do we really think an agent should have more than 512MB in production, let alone testing (save the Maven project type?) that we think this is too risky to accept? |
You could demonstrate this PR in core by rebasing it on top of the older version of You have also not addressed my third point about Windows ACI tests like
Agreed. The reason
Do not make assumptions about what I am working on. I am not working on stabilizing |
which was
see jenkinsci/pipeline-model-definition-plugin#480 - the tests where disabled on windows and it uses aci agents. I did not choose the plugin you suggested but this does as far as I am aware cover the ask. |
Noticed when looking at the memory usage of pipeline-model-defintion
that the agents created in the tests did not have a constrained memory
set. This means that the tests would be platform dependent. or flaky
depending on what GC happens at various times.
the number 512 is relatively arbitrary, but k8s agents use 256Mi as a
request and so 512 is double that, and the agent process is supposed to
be lightweight.
Whilst this could reveal a few issues in plugins when they upgrade, it
seems to me that that could be a bug in the plugin, and so I have not
implemented a way to create an online slave with a specific amount of
memory. if that is indeed required it can be added later as jth updates
are not forced on plugins.
here is a before from a pipeline-model-definition test (nearly 3gb claimed for the heap...) (and there are 4 agents in this test!):
and after :