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

bugfix/holidat-utc-offset #126

Merged

Conversation

fivetran-joemarkiewicz
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz commented Nov 27, 2023

PR Overview

This PR will address the following Issue/Feature: Issue #117

This PR will result in the following new package version: v0.13.0

This will not result in breaking changes to the current users as it will only adjust the holiday times to properly be converted into their respective UTC comps. This will only adjust and patch a previous error to some schedule and holiday overlaps. As a result this will not be a breaking change.

However, this will be merged into a branch that does include a breaking upstream change. As such, we will want to make this a breaking change.

Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:

Bug Fixes

  • Updates the int_zendesk__schedule_spine model to convert the Holiday schedules into proper UTC values before being used in comparison with the schedule times. This ensures the holidays are properly mapped to schedules regardless of timezones.

Under the Hood

  • Corrected the folder structure for the .github folder to properly categorize the Community and Maintainer PR templates.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt compile
  • dbt run –full-refresh
  • dbt run
  • dbt test
  • dbt run –vars (With schedules both on and off)

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked and tagged
  • You are assigned to the corresponding issue and this PR
  • BuildKite integration tests are passing

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

  • You have validated these changes and assure this PR will address the respective Issue/Feature.
  • You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
  • You have provided details below around the validation steps performed to gain confidence in these changes.

To test these changes I performed the following validation efforts.

  • I adjusted a sample schedule to have the hours of the schedule approach the end of the day.
    • image
  • For that schedule, I then inspected the holidays that are set for the schedule. For this validation I focused on the Craig Day.
    • image
  • I then checked the current live version of the Zendesk package and was able to observe that due to the schedule hours breaching over into the next day (when factoring in the UTC offset) I can see that our holiday logic does not take into account the fact that one of these days in the schedule period is a holiday. This is due to the UTC offset breaching into the next day and not being caught in our holiday_name_check logic.
    • image
  • Then when inspecting the end results of the int_zendesk__schedule_spine model we can see that the holiday for Craig Day is still included in the schedule period. The expected results here would be that the day is excluded so the business hours aren't counted towards that holiday.
    • image
  • However, when testing this branch, we can see that Craig Day is captured in the holiday_name_check logic and in the end query for the int_zendesk__schedule_spine model the day is properly omitted as the holiday is being taken into consideration and hours are not counted on that holiday.
    • image
    • image

Standard Updates

Please acknowledge that your PR contains the following standard updates:

  • Package versioning has been appropriately indexed in the following locations:
    • indexed within dbt_project.yml
    • indexed within integration_tests/dbt_project.yml
  • CHANGELOG has individual entries for each respective change in this PR
  • [n/a] README updates have been applied (if applicable)
  • [n/a] DECISIONLOG updates have been updated (if applicable)
  • [n/a] Appropriate yml documentation has been added (if applicable)

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

  • [will be generated in combined release branch] docs were regenerated (unless this PR does not include any code or yml updates)

If you had to summarize this PR in an emoji, which would it be?

📆

@fivetran-joemarkiewicz fivetran-joemarkiewicz changed the base branch from main to release/v0.12.1 November 27, 2023 22:26
@fivetran-joemarkiewicz fivetran-joemarkiewicz marked this pull request as ready for review November 27, 2023 22:26
fix(int_zendesk__schedule_spine): offset holiday start and end time too
@fivetran-joemarkiewicz fivetran-joemarkiewicz changed the base branch from release/v0.12.1 to release/v0.13.0 November 27, 2023 22:50
@fivetran-joemarkiewicz fivetran-joemarkiewicz mentioned this pull request Nov 27, 2023
6 tasks
Copy link
Contributor

@fivetran-avinash fivetran-avinash left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz This is approved with slight changes on the Changelog. I'll leave my PR validation in Height.

CHANGELOG.md Outdated
@@ -1,3 +1,14 @@
# dbt_zendesk v0.12.1
Copy link
Contributor

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz We can remove this line.

# dbt_zendesk v0.12.1

## Bug Fixes
- Updates the `int_zendesk__schedule_spine` model to convert the Holiday schedules into proper UTC values before being used in comparison with the schedule times. This ensures the holidays are properly mapped to schedules regardless of timezones.
Copy link
Contributor

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz Since this is part of a batch release should we include a link to this specific PR and the changes introduced here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I will do the individual PR links for these since it is a batch release with multiple PRs.

@fivetran-joemarkiewicz fivetran-joemarkiewicz merged commit 070aebb into release/v0.13.0 Nov 28, 2023
1 check passed
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.

None yet

3 participants