Skip to content

Commit

Permalink
[FSSDK-9555] GitHub Issue Templates (#337)
Browse files Browse the repository at this point in the history
* Add devcontainer config

* Add Ruby flavor GH Issue templates

* Add gitlens to devcontainer

* Add PR #298 doc fix

* Add GitLense to devcontainer

* Testing updates to ruby CI

* Fix linting item

* Rollback CI changes

* Add suggested setup from @andrewleap-optimizely

* fix for solargraph extension

---------

Co-authored-by: Andy Leap <[email protected]>
  • Loading branch information
1 parent 267d9dd commit d2c1da5
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Ruby SDK",

"image": "mcr.microsoft.com/devcontainers/ruby:1-3.2-bullseye",

"postCreateCommand": "set -e && bundle install && gem install optimizely-sdk && rake build && gem install pkg/* && gem install solargraph",

"customizations": {
"vscode": {
"extensions": [
"eamodio.gitlens",
"github.vscode-github-actions",
"castwide.solargraph"
]
}
}
}
94 changes: 94 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: 🐞 Bug
description: File a bug/issue
title: "[BUG] <title>"
labels: ["bug", "needs-triage"]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: SDK Version
description: Version of the SDK in use?
validations:
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
1. With this config...
1. Run '...'
1. See error...
validations:
required: true
- type: textarea
attributes:
label: Ruby Version
description: What version of Ruby are you using?
validations:
required: false
- type: textarea
attributes:
label: Rails
description: If you're using Rail, what version?
validations:
required: false
- type: textarea
attributes:
label: Link
description: Link to code demonstrating the problem.
validations:
required: false
- type: textarea
attributes:
label: Logs
description: Logs/stack traces related to the problem (⚠️do not include sensitive information).
validations:
required: false
- type: dropdown
attributes:
label: Severity
description: What is the severity of the problem?
multiple: true
options:
- Blocking development
- Affecting users
- Minor issue
validations:
required: false
- type: textarea
attributes:
label: Workaround/Solution
description: Do you have any workaround or solution in mind for the problem?
validations:
required: false
- type: textarea
attributes:
label: Recent Change
description: Has this issue started happening after an update or experiment change?
validations:
required: false
- type: textarea
attributes:
label: Conflicts
description: Are there other libraries/dependencies potentially in conflict?
validations:
required: false
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/ENHANCEMENT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: ✨Enhancement
description: Create a new ticket for a Enhancement/Tech-initiative for the benefit of the SDK which would be considered for a minor version update.
title: "[ENHANCEMENT] <title>"
labels: ["enhancement"]
body:
- type: textarea
id: description
attributes:
label: Description
description: Briefly describe the enhancement in a few sentences.
placeholder: Short description...
validations:
required: true
- type: textarea
id: benefits
attributes:
label: Benefits
description: How would the enhancement benefit to your product or usage?
placeholder: Benefits...
validations:
required: true
- type: textarea
id: detail
attributes:
label: Detail
description: How would you like the enhancement to work? Please provide as much detail as possible
placeholder: Detailed description...
validations:
required: false
- type: textarea
id: examples
attributes:
label: Examples
description: Are there any examples of this enhancement in other products/services? If so, please provide links or references.
placeholder: Links/References...
validations:
required: false
- type: textarea
id: risks
attributes:
label: Risks/Downsides
description: Do you think this enhancement could have any potential downsides or risks?
placeholder: Risks/Downsides...
validations:
required: false
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!--
Thanks for filing in issue! Are you requesting a new feature? If so, please share your feedback with us on the following link.
-->
## Feedback requesting a new feature can be shared [here.](https://feedback.optimizely.com/)
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💡Feature Requests
url: https://feedback.optimizely.com/
about: Feedback requesting a new feature can be shared here.
4 changes: 2 additions & 2 deletions lib/optimizely/bucketer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def find_bucket(bucketing_id, user_id, parent_id, traffic_allocations)
# parent_id - String entity ID to use for bucketing ID
# traffic_allocations - Array of traffic allocations
#
# Returns and array of two values where first value is the entity ID corresponding to the provided bucket value
# or nil if no match is found. The second value contains the array of reasons stating how the deicision was taken
# Returns an array of two values where first value is the entity ID corresponding to the provided bucket value
# or nil if no match is found. The second value contains the array of reasons stating how the decision was taken
decide_reasons = []
bucketing_key = format(BUCKETING_ID_TEMPLATE, bucketing_id: bucketing_id, entity_id: parent_id)
bucket_value = generate_bucket_value(bucketing_key)
Expand Down
2 changes: 1 addition & 1 deletion spec/audience_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

user_meets_audience_conditions, reasons = Optimizely::Audience.user_meets_audience_conditions?(config, experiment, user_context, spy_logger)
expect(user_meets_audience_conditions).to be true
expect(reasons).to eq(["Audiences for experiment 'test_experiment' collectively evaluated to TRUE."])
expect(reasons).to eq(["Audiences for experiment 'test_experiment' collectively evaluated to TRUE."])

# Audience Ids is Empty and Audience Conditions is nil
experiment = config.experiment_key_map['test_experiment']
Expand Down

0 comments on commit d2c1da5

Please sign in to comment.