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
[JENKINS-49635] VirtualFile support #67
Conversation
pom.xml
Outdated
@@ -62,7 +62,8 @@ | |||
</pluginRepository> | |||
</pluginRepositories> | |||
<properties> | |||
<jenkins.version>2.60.3</jenkins.version> | |||
<jenkins-core.version>2.110-20180228.232138-2</jenkins-core.version> <!-- TODO https://github.com/jenkinsci/jenkins/pull/3302 --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Hard nope for me right here. We do not accept gratuitous core bumps especially to such a bleeding edge core versions because it prevents anybody from being able to consume new features and bugfixes to the pipeline plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. At a minimum this needs to hit LTS first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer 2 LTS cycles because otherwise it's hard to ship fixes to many of the users (especially important for urgent issues) that tend to run an LTS behind but yeah, 1 LTS is the bare minimum for me too -- should be reserved for critical fixes and super high-value features generally though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unmerge-able due to dependency on an unreleased Jenkins core. Please find a way to accomplish this that does NOT stand in the way of plugin development (or force massive amounts of backporting for all new work).
Note: that's only a time-sensitive merge-block, not a permanent one. I'm assuming that this is a speculative WIP PR so that won't be an issue and by the time it's release-ready the dependency will have been in an LTS or two. |
Well, no. See JEP-300. Anyway that is parenthetical—obviously no one was proposing a PR like this be merged today. Please reserve PR reviews to substantive matters of the code change itself to avoid visual clutter. It is helpful to create (I think conventionally orange?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code mostly looks good to me. Environment management looks quite suspicious, but it's a wider issue in Jenkins.
} | ||
} | ||
|
||
private static @Nonnull EnvVars envFor(@Nonnull FilePath workspace, @Nonnull TaskListener listener) throws IOException, InterruptedException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the current implementation. It builds computer environment variables, but ignores possible overrides by the Run
's logic. I hope it does not impact artifact managers, but I can imagine withEnvVars()
closure overriding some variables for the external artifact manager. E.g. just tool()
installation for the artifact management binary.
Maybe an edge case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this could be improved I think—will check. Anyway this method is only called when using the deprecated overloads. As of jenkinsci/workflow-basic-steps-plugin#60 the actual EnvVars
is loaded from the step context, for example taking into account withEnv
blocks.
Added on-hold
label to remind viewers of current unmergeability.
@Rule public JenkinsRule r = new JenkinsRule(); | ||
@Rule public LoggerRule logging = new LoggerRule(); | ||
|
||
public static void run(@Nonnull JenkinsRule r, @CheckForNull ArtifactManagerFactory factory) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would split this, at least another for StashAwareArtifactManager, otherwise we only get the first failure
I think we can move forward with above consideration. @svanoort this sounds good to you? Lets get moving on this PR :) |
Thanks @svanoort! |
That is not accurate, implementors may choose their own libraries. JClouds makes it easier but other libraries may be more optimized, so it's up to future implementors to choose, but that's not the API decision
correct, we can't predict the future
I don't think it is coupled to JClouds but to blobstores. I'd rather not over engineer a solution for artifact repositories until there is any interest from those parties, and they might as well ignore this as using
I don't agree that retry logic should live in pipeline. This approach would assume that other cloud libraries don't already have some retry logic or that use a specific http client, which may not hold true. If we see other implementations copy that logic then we can move it up or sideways to a common utilities plugin
again I don't think we should over engineer it, the first implementation complies with requirements, there is no timeframe for new implementations and this is considered Beta to bring other interested parties
agreed |
(503 from repo.azure.jenkins.io) |
@@ -291,8 +291,12 @@ public boolean shouldClearAll(@Nonnull Run<?,?> build) { | |||
|
|||
/** | |||
* Mixin interface for an {@link ArtifactManager} which supports specialized stash behavior as well. | |||
* The recommended standard implementation is in the plugin currently named {@code artifact-manager-s3}, | |||
* which in turn supports extensibility to various cloud providers. | |||
* <p>The recommended standard implementation is {@code JCloudsArtifactManager} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jglick This is still not what we had discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still did not apply the requested docs change, just reworded some unrelated things.
@vivek Still blocked here due to not making the requested and trivial change. I noted this would be ready to merge:
Instead a few trivial rewordings were done. I've set a very low bar here for merging what I consider to be a risky change and yet still someone felt they did not need to meet it? |
@svanoort PTAL, I think its good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's getting closer but I still want it to be very explicit about the dangerous bits and what they are. This one is risky enough that we can't afford to be cryptic about intent.
Something like this would be preferred:
"For off-master artifact storage, you should NOT extent this directly but instead use the $JCloudImpl by extending its BlobStore. This is dangerous to directly extend if using remote storage unless you write a very robust handling of network failures including at least a base timeout and retries."
Saying a standard implementation exists does not make it clear that you must be basing off that. Thanks!
Amend Javadocs
Downstream of jenkinsci/jenkins#3302 & jenkinsci/plugin-pom#98.
StashManager
integration@reviewbybees