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

Configuration issue introduced in v24.10.73 #141

Closed
petrijr opened this issue Oct 26, 2024 · 4 comments · Fixed by #142
Closed

Configuration issue introduced in v24.10.73 #141

petrijr opened this issue Oct 26, 2024 · 4 comments · Fixed by #142
Assignees
Labels
bug Something isn't working

Comments

@petrijr
Copy link

petrijr commented Oct 26, 2024

Hello,

I think I found a bug in the latest release of MFiles.VAF.Extensions-component.

The bug appeared as I tried to update the dependency version of MFiles.VAF.Extensions to version 24.10.73, but this introduced a configuration-related issue where I can't anymore modify the configuration and save it without getting an exception.

Exception looks like this:
[Void OnConfigurationUpdated(TSecureConfiguration, Boolean, Boolean)], IL:27, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509) [Void PopulateFromConfiguration(Boolean)], IL:33, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509) [Void PopulateFromConfiguration(TSecureConfiguration, Boolean)], IL:1070, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509) [System.Nullable1[System.DateTimeOffset] GetNextExecution(System.Nullable1[System.DateTimeOffset])], IL:144, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509) [System.Nullable1[System.DateTimeOffset] GetNextExecution(System.Nullable1[System.DateTimeOffset])], IL:260, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509) [Boolean Any[TSource](System.Collections.Generic.IEnumerable1[TSource])], IL:21, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[Boolean MoveNext()], IL:43, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[Void .ctor(System.Collections.Generic.IEnumerable1[TElement])], IL:114, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509) [Boolean MoveNext()], IL:78, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509) [Boolean MoveNext()], IL:95, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509) [System.Nullable1[System.DateTimeOffset] b__0(MFiles.VAF.Extensions.ScheduledExecution.Trigger)], IL:0, Tyhjäarvon sallivalla objektilla on oltava arvo. 0x80131509)
[System.Nullable1[System.DateTimeOffset] GetNextExecution(System.Nullable1[System.DateTimeOffset], System.TimeZoneInfo)], IL:47, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[System.Nullable1[System.DateTimeOffset] GetNextExecution(System.Nullable1[System.DateTimeOffset], System.TimeZoneInfo)], IL:0, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[System.Nullable1[System.DateTimeOffset] GetNextExecutionIncludingNextDay(System.Nullable1[System.DateTimeOffset], System.TimeZoneInfo, Boolean)], IL:79, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
Void ThrowInvalidOperationException(System.ExceptionResource)], IL:16, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
(M-Files 24.9.14055.3 2024-10-24T18:55:45.771Z)`

Version 24.10.72 works fine, there I can modify configuration and save the modifications without any issues.

Let me know if you need me to test something to help investigating this, I can easily repro it with my VAF by updating the version. Sorry I can't produce a simple repro for this as my VAF is quite complicated and has lots of configurations, especially lots of recurring task configurations so probably some of those is behind the error, but I can't say which one; or maybe they all are.

Best regards,

  • Petri
@CraigHawker
Copy link
Collaborator

I have not been able to reproduce this myself yet. It would be useful to have details of the configuration structure used (just the bit that defines the recurrence), the current value (before the configuration is updated), and the new value.

@CraigHawker CraigHawker self-assigned this Oct 27, 2024
@CraigHawker CraigHawker added the bug Something isn't working label Oct 27, 2024
@CraigHawker CraigHawker linked a pull request Oct 27, 2024 that will close this issue
@petrijr
Copy link
Author

petrijr commented Oct 27, 2024

I tested the potential fix, but it didn't help. Just has the same bug as in 24.10.73. Downgraded version back to 24.10.72 and the bug went away.

I copy-pasted the (cleaned up) JSON from the advanced configuration so you see what the config looks like. It doesn't matter what I change there, for example on line 43 I can change the 10 minutes to 11 minutes and then try to save and the bug occurs. So the changed value is not the issue itself.
Error-on-24.10.73.json

Here are some example recurrence configurations that are in the code:
`[DataMember]
[RecurringOperationConfiguration(VaultApplication.QueueId, "task")]
[Security(ChangeBy = SecurityAttribute.UserLevel.VaultAdmin)]
public Frequency SomeFrequence { get; set; } = TimeSpan.FromHours(1);

[DataMember]
[RecurringOperationConfiguration(VaultApplication.QueueId, "task", DefaultValue = "21.00",)]
[Security(ChangeBy = SecurityAttribute.UserLevel.VaultAdmin)]
public Frequency SomeFrequence { get; set; } = new Schedule()
{
Enabled = true,
RunOnVaultStartup = false,
Triggers = new List()
{
new DailyTrigger()
{
TriggerTimes = new List { new TimeSpan(21,0,0) }
}
}
};

[DataMember]
[RecurringOperationConfiguration(VaultApplication.QueueId, "task", DefaultValue = "21.04")]
[Security(ChangeBy = SecurityAttribute.UserLevel.VaultAdmin)]
public Frequency DeleteOldLogsFrequence { get; set; } = new Schedule()
{
Enabled = true,
RunOnVaultStartup = false,
Triggers = new List()
{
new DailyTrigger()
{
TriggerTimes = new List { new TimeSpan(21,4,0) }
},
new WeeklyTrigger()
{
TriggerDays = new List { DayOfWeek.Monday },
TriggerTimes = new List { new TimeSpan(19,0,0) }
}
}
};

[DataMember]
[RecurringOperationConfiguration(VaultApplication.QueueId, "task"", DefaultValue = "21.00, 22.00, 23.00")]
[Security(ChangeBy = SecurityAttribute.UserLevel.VaultAdmin)]
public Frequency SomeFrequence { get; set; } = new Schedule()
{
Enabled = true,
RunOnVaultStartup = false,
Triggers = new List()
{
new DailyTrigger()
{
TriggerTimes = new List { new TimeSpan(21, 0, 0), new TimeSpan(22, 0, 0), new TimeSpan(23, 0, 0) }
}
}
};

[DataMember]
[RecurringOperationConfiguration(VaultApplication.QueueId, "task", DefaultValue = "3 minuutin välein",)]
[Security(ChangeBy = SecurityAttribute.UserLevel.VaultAdmin)]
public Frequency SomeFrequence { get; set; } = TimeSpan.FromMinutes(3);`

CraigHawker added a commit that referenced this issue Oct 29, 2024
@CraigHawker
Copy link
Collaborator

CraigHawker commented Oct 29, 2024

I have replicated the issue and I believe that it's resolved in 24.10.0.7-issue-141. If you're able to confirm that'd be great, but I have a high confidence that this is resolved as I can see where I introduced this bug.

Note: There is not a public release of this yet. I'm hoping to get some positive feedback from you first.

@CraigHawker
Copy link
Collaborator

Did you manage to test this @petrijr? I am confident that this solves the issue, but I'd like to get some feedback from yourself first.

CraigHawker added a commit that referenced this issue Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants