Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Migrate Gallery.CredentialExpiration to JsonConfig #517

Merged
merged 5 commits into from
Aug 7, 2018

Conversation

chenriksson
Copy link
Member

@chenriksson chenriksson commented Aug 4, 2018

Part of https://github.com/NuGet/Engineering/issues/1560. Depends on #505

Status: Verified on DEV

@chenriksson chenriksson force-pushed the chenriks-maint-config branch from 9b9fe95 to 5987d6f Compare August 7, 2018 13:45
@chenriksson chenriksson force-pushed the chenriks-credexp-config branch from 88bdef2 to e3b6c61 Compare August 7, 2018 14:24
@chenriksson chenriksson changed the base branch from chenriks-maint-config to dev August 7, 2018 14:31

namespace Gallery.CredentialExpiration
{
public class InitializationConfiguration

Choose a reason for hiding this comment

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

IMO having classes with the same name in different projects makes things difficult to work with.
When every project has a class with the same name it becomes impossible to CTRL-T to any particular instance of the file.

Can we rename this to CredentialExpirationConfiguration or something, and do a similar thing for all of the other jobs when you migrate them?

(pending team discussion)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestion - if consensus is to rename, I'll address in follow-up PR.

{
public class InitializationConfiguration
{
public int AllowEmailResendAfterDays { get; set; }

Choose a reason for hiding this comment

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

maybe not totally essential for this PR but I think it's always very helpful when config files have detailed XML docs for what each config does

/// <summary>
/// After the job has sent an email about the expiration of a credential, it will wait this long before sending another email.
/// </summary>
public int AllowEmailResendAfterDays { get; set; }

Copy link
Member Author

Choose a reason for hiding this comment

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

@scottbommarito - I'll do a follow-up PR to improve doc comments across all the jobs I'm updating.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will also add readme.md for each job to help w/ onboarding - per last sprint's retrospective. :-)

@@ -65,6 +66,9 @@
<SubType>Designer</SubType>
</None>
<None Include="Scripts\*" />
<None Include="Settings\dev.json" />

Choose a reason for hiding this comment

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

Settings\* or Settings\*.json is easier to maintain. It would also match the nuspec better. Additionally, if the Jobs.Common implementation allows you to specify any file, using a glob would show all possible files.

Copy link
Member Author

Choose a reason for hiding this comment

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

Note that Settings\* will be moving out of NuGet.Jobs and into NuGetDeployment as part of the jobs deployment work... for this reason, going to not fix this.

@chenriksson
Copy link
Member Author

@joelverhagen Updated to use IOptionsSnapshot: b3cd012

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants