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

allow file to be null for use in CasC #11

Closed
wants to merge 3 commits into from
Closed

allow file to be null for use in CasC #11

wants to merge 3 commits into from

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Jul 3, 2018

requirement for file to be non-null just to get a name prevents simple use of FileCredentialsImpl in Configuration-as-Code.

deployed as plain-credentials-1.5-20180703.101522-1

See jenkinsci/configuration-as-code-plugin#317

@jglick
Copy link
Member

jglick commented Jul 10, 2018

deployed as

just mvn:incrementalify

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Seems a bit suspect but the databinding here was already rather suspect.

@jglick jglick requested a review from stephenc July 10, 2018 17:03
@jglick
Copy link
Member

jglick commented Jul 10, 2018

also merge w/ #10 to get CI

@ndeloof ndeloof closed this Sep 4, 2018
@ndeloof ndeloof reopened this Sep 4, 2018
@ndeloof
Copy link
Contributor Author

ndeloof commented Sep 13, 2018

@ndeloof
Copy link
Contributor Author

ndeloof commented Oct 17, 2018

@jglick @stephenc any of you to merge this ?

@bbxx111
Copy link

bbxx111 commented Nov 14, 2018

When to fix this test failure and release a new version ? ^_^

@jglick jglick mentioned this pull request Nov 14, 2018
@jglick
Copy link
Member

jglick commented Nov 15, 2018

@ndeloof merge with master please

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof
Copy link
Contributor Author

ndeloof commented Nov 16, 2018

rebased on origin/master + test-case added to demonstrate casc-support and avoid regression in future changes to this plugin

@jglick
Copy link
Member

jglick commented Nov 16, 2018

InjectedTest failure:

java.io.IOException: Configuration as Code Support Plugin v1.3 failed to load.
 - Credentials Plugin v2.1.5 is older than required. To fix, install v2.1.16 or later.

@jglick jglick self-requested a review November 16, 2018 16:02
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>

@Test
public void should_configure_file_credentials() throws Exception {
SecretBytes.decrypt(null); // force class loading to get Stapler converter registered
Copy link
Member

Choose a reason for hiding this comment

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

This does not look right. You are referring to SecretBytes.StaplerConverterImpl? I am not sure what normally causes it to be registered, but if it is not being registered implicitly by the rest of the test case, something is broken and that needs to be fixed first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea why it doesn't get loaded, static initializer isn't executed as demonstrated running with a debugger. No idea what could go wrong here.

Copy link
Member

Choose a reason for hiding this comment

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

According to this code, the converter is used by virtue of its class name. That would mean that the abovementioned line could be deleted and the test would still pass.

Copy link
Member

Choose a reason for hiding this comment

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

And jenkinsci/configuration-as-code-plugin#317 does not have such a trick, so…?

@ndeloof
Copy link
Contributor Author

ndeloof commented Nov 19, 2018

closing as tired having to fight with jenkins weirdnesses

@ndeloof ndeloof closed this Nov 19, 2018
@dgarzon
Copy link

dgarzon commented Nov 28, 2018

@ndeloof @jglick the last commit passed all tests, can we re-open and merge this?

@jglick jglick reopened this Nov 30, 2018
@jglick
Copy link
Member

jglick commented Nov 30, 2018

Can you just check the SecretBytes.decrypt(null) thing please?

@dgarzon
Copy link

dgarzon commented Nov 30, 2018

@jglick I am going to take over this work from @ndeloof as mentioned here: jenkinsci/configuration-as-code-plugin#271. Can you close this in favor of the PR I will open later today? It will contain these changes, and make sure we don't need ecretBytes.decrypt(null). Thanks!

@jglick
Copy link
Member

jglick commented Dec 3, 2018

I am going to take over this work

Thanks!

Can you close this in favor of the PR I will open later today? It will contain these changes

No need. So long as you avoid destructive history operations, GitHub is smart enough to mark a PR as merged as soon as its head reference becomes an ancestor of the base branch—including when a subsuming PR is merged.

@jglick
Copy link
Member

jglick commented Dec 10, 2018

So long as you avoid destructive history operations

Too late for that; #13 seems to have squashed everything and is thus misattributing authorship.

@jglick jglick closed this Dec 10, 2018
@jglick
Copy link
Member

jglick commented Dec 11, 2018

Never mind; #13 is much harder to review and not as obviously safe. I will pick this up.

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.

6 participants