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

Proposal for configuring support policy rules #36

Merged
merged 11 commits into from
Jun 30, 2021

Conversation

asakusuma
Copy link
Contributor

@asakusuma asakusuma commented Jun 7, 2021

Different teams and orgs will have different needs for support policy rules

Teams may want to customize the parameters of a support policy. For instance, a team may want to ignore certain dependencies, i.e. not enforce upgrades for certain dependencies. They may also want different upgrade cadences for specific dependencies. Lastly, in many cases, simply turning on a support policy and expecting consumers to immediately adhere to the policy is untenable (for instance, a major upgrade with a migration may be emminently required shortly after turning on a support policy). There needs to be a way to provide a grace period for onboarding to the support policy, while still providing a warning for when dependencies must be updated.

rendered

configuration.md Outdated Show resolved Hide resolved
configuration.md Outdated Show resolved Hide resolved
configuration.md Outdated

We will not require a configuration file, and will default to 4, 2, and 1 quarter upgrade periods for major, minor, and patch versions respectively.

```JSON
Copy link
Collaborator

Choose a reason for hiding this comment

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

where this JSON will reside?
One place I think will be the root of the project being evaluated.
Are we planning to provide CI options to achieve the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, I don't have a strong opinion here besides ensuring that both the programatic API and CI tool can specify a custom JSON file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should have both options. Most of the MP will use the JSON file if there are certain deps to be ignored all the time or list is too huge.

configuration.md Outdated
```

### Rules
If using a config file, you must define a `primary` policy or set of `custom` policies or both. If no `primary` policy is defined, then the only packages used to calculate policy adherence are the packages specified in the custom polices.
Copy link
Collaborator

@SparshithNR SparshithNR Jun 10, 2021

Choose a reason for hiding this comment

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

If using a config file, you must define a primary policy
We can have a default Policy. Which is

// this is our current default
{
  "primary": {
    "upgradeBudget": {
      "major": 4,
      "minor": 2,
      "patch": 1
    }
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"...or set of custom policies or both. If no primary policy is defined, then the only packages used to calculate policy adherence are the packages specified in the custom polices."

If you define a config file but don't define a primary policy, then we should only look at the dependencies specified in the custom policies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for folks who only want their support policy to look at specific dependencies

configuration.md Outdated

// Any releases that happen within this number of weeks of the end of a quarter
// are considered to have been released the next quarter
tailGracePeriod?: Weeks;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a specific reason why we are going with weeks? as all other calculations are qtrs or months

Copy link
Collaborator

@SparshithNR SparshithNR left a comment

Choose a reason for hiding this comment

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

Please check there are two files one with uppercase configuration.md and one lowercase.

CONFIGURATION.md Outdated
```TypeScript
type Quarter = number;
type Weeks = number;
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can delete this type def for now.

Copy link
Collaborator

@SparshithNR SparshithNR left a comment

Choose a reason for hiding this comment

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

LGTM

@SparshithNR SparshithNR merged commit e477294 into supportedjs:main Jun 30, 2021
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

2 participants