@itentialopensource/adapter-kafkav2 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +6 -0
- package/.eslintrc.js +18 -0
- package/.gitlab/.gitkeep +0 -0
- package/.gitlab/issue_templates/.gitkeep +0 -0
- package/.gitlab/issue_templates/Default.md +17 -0
- package/.gitlab/issue_templates/bugReportTemplate.md +76 -0
- package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
- package/.jshintrc +0 -0
- package/CHANGELOG.md +152 -0
- package/CODE_OF_CONDUCT.md +48 -0
- package/CONTRIBUTING.md +158 -0
- package/LICENSE +201 -0
- package/README.md +380 -0
- package/Release_Notes.md +0 -0
- package/adapter.js +814 -0
- package/error.json +178 -0
- package/package.json +71 -0
- package/pronghorn.json +44 -0
- package/propertiesSchema.json +198 -0
- package/refs?service=git-upload-pack +0 -0
- package/sampleProperties.json +41 -0
- package/test/integration/adapterTestIntegration.js +445 -0
- package/test/unit/adapterTestUnit.js +412 -0
- package/utils/artifactize.js +146 -0
- package/utils/packModificationScript.js +35 -0
- package/utils/pre-commit.sh +27 -0
- package/utils/setup.js +33 -0
- package/utils/testRunner.js +298 -0
- package/workflows/kafka_test.json +1 -0
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
es6: true,
|
|
5
|
+
node: true
|
|
6
|
+
},
|
|
7
|
+
extends: 'airbnb-base',
|
|
8
|
+
plugins: [
|
|
9
|
+
'json'
|
|
10
|
+
],
|
|
11
|
+
parserOptions: {
|
|
12
|
+
sourceType: 'module'
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
'max-len': 'warn',
|
|
16
|
+
'comma-dangle': ['error', 'never']
|
|
17
|
+
}
|
|
18
|
+
};
|
package/.gitlab/.gitkeep
ADDED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Issue Report
|
|
2
|
+
|
|
3
|
+
Thanks for taking the time to fill out this issue report.
|
|
4
|
+
|
|
5
|
+
## Describe the Issue
|
|
6
|
+
|
|
7
|
+
_[A clear and concise description of what the problem is.]_
|
|
8
|
+
|
|
9
|
+
## Possible Solutions
|
|
10
|
+
|
|
11
|
+
_[List out possible suggestions on how to solve this issue if you have any.]_
|
|
12
|
+
|
|
13
|
+
### Screenshots/Video
|
|
14
|
+
|
|
15
|
+
_[If applicable, add screenshots/video to help explain or demo the issue here.]_
|
|
16
|
+
|
|
17
|
+
/assign @ishita.prakash
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Bug Report
|
|
2
|
+
|
|
3
|
+
Thanks for taking the time to fill out this bug report!
|
|
4
|
+
|
|
5
|
+
Before creating bug reports, please check before-submitting-a-bug-report, as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible.
|
|
6
|
+
|
|
7
|
+
#### Before Submitting A Bug Report
|
|
8
|
+
|
|
9
|
+
* **Check the README.md.** You might be able to find the cause of the problem and fix things yourself. Most importantly, check if you can reproduce the problem __in the latest version__.
|
|
10
|
+
* **Work through the troubleshooting process.** Troubleshooting will include changing the log level of Itential Automation Platform (IAP) and adapters and checking the logs to see what the issues are. These logs should be included in any ticket you open for this issue.
|
|
11
|
+
* **Check for resolutions to the issue.** Check the <a href="https://itential.atlassian.net/servicedesk/customer/kb/view/286883841?applicationId=605994d2-2cb2-3174-af59-ed5b23ff5fd5&spaceKey=PKB&src=1187380921" target="_blank">Itential Knowledge Base</a> to see if there is a known resolution for the issue you are having.
|
|
12
|
+
* **Ask around in chat if you are an Itential employee** to see if others are experiencing the same issue.
|
|
13
|
+
|
|
14
|
+
#### How to Submit a (Good) Bug Report
|
|
15
|
+
|
|
16
|
+
Please read the guidlines and move to describe-the-bug. Explain the problem and include additional details to help maintainers reproduce the problem:
|
|
17
|
+
|
|
18
|
+
- **Use a clear and descriptive title** for the issue to identify the problem.
|
|
19
|
+
- **Describe the exact steps which reproduce the problem** in as much detail as possible. For example, start by explaining how you configured the adapter (e.g., which properties you used and how they were set) or how you are using an artifact.
|
|
20
|
+
- **Provide specific examples to demonstrate the steps**. Include logs, or copy/paste snippets, in your examples.
|
|
21
|
+
- **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
|
|
22
|
+
- **Explain which behavior you expected to see instead and why.**
|
|
23
|
+
- **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use <a href="https://www.cockos.com/licecap/" target="_blank">this tool</a> to record GIFs on macOS and Windows. Use <a href="https://github.com/colinkeenan/silentcast" target="_blank">this tool</a> or <a href="https://github.com/rhcarvalho/byzanz-guiz" target="_blank">program</a> on Linux.
|
|
24
|
+
- **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
|
|
25
|
+
|
|
26
|
+
Provide more context by answering these questions:
|
|
27
|
+
|
|
28
|
+
- **Did the problem start happening recently** (e.g. after updating to a new version/tag) or was this always a problem?
|
|
29
|
+
- If the problem started happening recently, **can you reproduce the problem in an older version/tag?** What's the most recent version in which the problem does not happen?
|
|
30
|
+
- **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
|
|
31
|
+
|
|
32
|
+
Include details about your configuration and environment:
|
|
33
|
+
|
|
34
|
+
- **Which version of the adapter/artifact are you using?** You can get the exact version by checking the project version in the package.json file.
|
|
35
|
+
- **What's the name and version of the OS you're using**?
|
|
36
|
+
- **Are you running or using IAP in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and guest?
|
|
37
|
+
- **Are there firewalls between IAP and any other system you are integrating with?** If so, have you tried running curl from the system IAP is on to the other system to verify you have connectivity between the systems?
|
|
38
|
+
|
|
39
|
+
## Describe the bug
|
|
40
|
+
|
|
41
|
+
_[A clear and concise description of what the bug is.]_
|
|
42
|
+
|
|
43
|
+
## IAP Version
|
|
44
|
+
|
|
45
|
+
_[List the IAP Version that the bug is happening in.]_
|
|
46
|
+
|
|
47
|
+
## NPM Package version
|
|
48
|
+
|
|
49
|
+
_[List the npm package version.]_
|
|
50
|
+
|
|
51
|
+
## Steps To Reproduce
|
|
52
|
+
|
|
53
|
+
_[List out the exact steps to reproduce the issue here.]_
|
|
54
|
+
|
|
55
|
+
### Expected behavior
|
|
56
|
+
|
|
57
|
+
_[A clear and concise description of what you expected to happen.]_
|
|
58
|
+
|
|
59
|
+
### Current behavior
|
|
60
|
+
|
|
61
|
+
_[List out the current behavior here.]_
|
|
62
|
+
|
|
63
|
+
### Screenshots/Video
|
|
64
|
+
|
|
65
|
+
_[If applicable, add screenshots/video to help explain or demo the issue here.]_
|
|
66
|
+
|
|
67
|
+
## Possible fixes
|
|
68
|
+
|
|
69
|
+
_[If you can, link to the line of code that might be responsible for the problem.]_
|
|
70
|
+
|
|
71
|
+
## Additional context
|
|
72
|
+
|
|
73
|
+
_[Add any other context about the problem here.]_
|
|
74
|
+
|
|
75
|
+
/label ~"Issue Type::Bug"
|
|
76
|
+
/assign @ishita.prakash
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- markdownlint-disable MD036 -->
|
|
2
|
+
|
|
3
|
+
# Feature Request
|
|
4
|
+
|
|
5
|
+
## Describe the new feature
|
|
6
|
+
|
|
7
|
+
_[A clear and concise description of what changes you would like to see.]_
|
|
8
|
+
|
|
9
|
+
## Possible Solutions
|
|
10
|
+
|
|
11
|
+
_[List out possible suggestions on how to add this feature if you have any.]_
|
|
12
|
+
|
|
13
|
+
/label ~"Issue Type::Feature Request"
|
|
14
|
+
/assign @ishita.prakash
|
package/.jshintrc
ADDED
|
File without changes
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
|
|
2
|
+
## 0.3.12 [02-07-2023]
|
|
3
|
+
|
|
4
|
+
* Bug fixes and performance improvements
|
|
5
|
+
|
|
6
|
+
See commit 6c07dca
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 0.3.11 [09-29-2022]
|
|
11
|
+
|
|
12
|
+
* Added patch for SCRAM-SHA-256/512 support.
|
|
13
|
+
|
|
14
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!20
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 0.3.10 [09-29-2022]
|
|
19
|
+
|
|
20
|
+
* Fixed messages filtering. Allow regular expressions to be used as filters.
|
|
21
|
+
|
|
22
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!18
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 0.3.9 [08-22-2022]
|
|
27
|
+
|
|
28
|
+
* Fixed invalid input variable in `subscribe` task.
|
|
29
|
+
|
|
30
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!19
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 0.3.8 [08-05-2022]
|
|
35
|
+
|
|
36
|
+
* Prevent emitting duplicated messages to event subscribers.
|
|
37
|
+
|
|
38
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!17
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 0.3.7 [08-05-2022]
|
|
43
|
+
|
|
44
|
+
* Replaced 'writeTime' prop with 'interval_time' prop.
|
|
45
|
+
|
|
46
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!16
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 0.3.6 [08-05-2022]
|
|
51
|
+
|
|
52
|
+
* Fixed logging for consumed/dropped messages.
|
|
53
|
+
|
|
54
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!15
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 0.3.5 [08-05-2022]
|
|
59
|
+
|
|
60
|
+
* Improvments to handling 'offsetOutOfRange' errors.
|
|
61
|
+
|
|
62
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!14
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 0.3.4 [08-01-2022]
|
|
67
|
+
|
|
68
|
+
* Added kafka-node logger.
|
|
69
|
+
|
|
70
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!13
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 0.3.3 [08-01-2022]
|
|
75
|
+
|
|
76
|
+
* Added hostList property to adapter's config.
|
|
77
|
+
|
|
78
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!12
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 0.3.2 [07-29-2022]
|
|
83
|
+
|
|
84
|
+
* Offest changes
|
|
85
|
+
|
|
86
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!11
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 0.3.1 [01-18-2021]
|
|
91
|
+
|
|
92
|
+
* Patch/adapt 401
|
|
93
|
+
|
|
94
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!10
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 0.3.0 [12-01-2020]
|
|
99
|
+
|
|
100
|
+
* fix the partition and offset on the subscribe and subscribeAvro
|
|
101
|
+
|
|
102
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!9
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 0.2.2 [11-25-2020]
|
|
107
|
+
|
|
108
|
+
* Changes to have consuming Avro Messages work.
|
|
109
|
+
|
|
110
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!8
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 0.2.1 [07-23-2020]
|
|
115
|
+
|
|
116
|
+
* Patch/error handling
|
|
117
|
+
|
|
118
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!7
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 0.2.0 [07-15-2020]
|
|
123
|
+
|
|
124
|
+
* Minor/adapt 200
|
|
125
|
+
|
|
126
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!4
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 0.1.3 [04-21-2020]
|
|
131
|
+
|
|
132
|
+
* updates to the readme.md and properties
|
|
133
|
+
|
|
134
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!2
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 0.1.2 [04-20-2020]
|
|
139
|
+
|
|
140
|
+
* change return value on send and emmiter scope
|
|
141
|
+
|
|
142
|
+
See merge request itentialopensource/adapters/notification-messaging/adapter-kafka!1
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## 0.1.1 [10-16-2019]
|
|
147
|
+
|
|
148
|
+
* Bug fixes and performance improvements
|
|
149
|
+
|
|
150
|
+
See commit 260fbf5
|
|
151
|
+
|
|
152
|
+
---
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
## Our Standards
|
|
8
|
+
|
|
9
|
+
Examples of behavior that contributes to creating a positive environment include:
|
|
10
|
+
|
|
11
|
+
* Using welcoming and inclusive language
|
|
12
|
+
* Being respectful of differing viewpoints and experiences
|
|
13
|
+
* Gracefully accepting constructive criticism
|
|
14
|
+
* Focusing on what is best for the community
|
|
15
|
+
* Showing empathy towards other community members
|
|
16
|
+
|
|
17
|
+
Examples of unacceptable behavior by participants include:
|
|
18
|
+
|
|
19
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
|
20
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
21
|
+
* Public or private harassment
|
|
22
|
+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
|
23
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
24
|
+
|
|
25
|
+
## Our Responsibilities
|
|
26
|
+
|
|
27
|
+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
|
28
|
+
|
|
29
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
|
30
|
+
|
|
31
|
+
## Scope
|
|
32
|
+
|
|
33
|
+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
|
34
|
+
|
|
35
|
+
## Enforcement
|
|
36
|
+
|
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [support@itential.com](mailto:support@itential.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
|
38
|
+
|
|
39
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
|
40
|
+
|
|
41
|
+
## Attribution
|
|
42
|
+
|
|
43
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
|
44
|
+
|
|
45
|
+
[homepage]: http://contributor-covenant.org
|
|
46
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
|
47
|
+
|
|
48
|
+
_return to [README](../README.md)_
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
:+1: :tada: First off, thanks for taking the time to contribute! :tada: :+1:
|
|
4
|
+
|
|
5
|
+
The following is a set of rules for contributing.
|
|
6
|
+
|
|
7
|
+
## Table Of Contents
|
|
8
|
+
|
|
9
|
+
[Code of Conduct](#code-of-conduct)
|
|
10
|
+
|
|
11
|
+
[How Can I Contribute?](#how-can-i-contribute)
|
|
12
|
+
|
|
13
|
+
* [Reporting Bugs](#reporting-bugs)
|
|
14
|
+
* [Your First Code Contribution](#your-first-code-contribution)
|
|
15
|
+
* [Merge Requests](#merge-requests)
|
|
16
|
+
|
|
17
|
+
[Styleguides](#styleguides)
|
|
18
|
+
|
|
19
|
+
* [Git Commit Messages](#git-commit-messages)
|
|
20
|
+
* [JavaScript Styleguide](#javascript-styleguide)
|
|
21
|
+
* [Tests Styleguide](#tests-styleguide)
|
|
22
|
+
* [Documentation Styleguide](#documentation-styleguide)
|
|
23
|
+
|
|
24
|
+
## Code of Conduct
|
|
25
|
+
|
|
26
|
+
This project and everyone participating in it is governed by the [Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [support@itential.com](mailto:support@itential.com).
|
|
27
|
+
|
|
28
|
+
## How to Contribute
|
|
29
|
+
|
|
30
|
+
### Reporting Bugs
|
|
31
|
+
|
|
32
|
+
This section guides you through submitting a bug report. Following these guidelines helps maintainers understand your report :pencil:, reproduce the behavior :computer: :left_right_arrow: :computer:, and find related reports :mag_right:.
|
|
33
|
+
|
|
34
|
+
Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). If you have an Itential support contract, please create an Itential Service Desk ticket. If you don't have an Itential support contract, please send an email of the issue to [support@itential.com](mailto:support@itential.com).
|
|
35
|
+
|
|
36
|
+
#### Before Submitting A Bug Report
|
|
37
|
+
|
|
38
|
+
* **Check the [User Guide](README.md).** You might be able to find the cause of the problem and fix things yourself. Most importantly, check if you can reproduce the problem __in the latest version__.
|
|
39
|
+
* **Work through the troubleshooting process.** Troubleshooting will include changing the log level of Itential Automation Platform (IAP) and adapters and checking the logs to see what the issues are. These logs should be included in any ticket you open for this issue.
|
|
40
|
+
* **Check for resolutions to the issue.** Check the [Itential Knowledge Base](https://itential.atlassian.net/servicedesk/customer/kb/view/286883841?applicationId=605994d2-2cb2-3174-af59-ed5b23ff5fd5&spaceKey=PKB&src=1187380921) to see if there is a known resolution for the issue you are having.
|
|
41
|
+
* **Ask around in chat if you are an Itential employee** to see if others are experiencing the same issue.
|
|
42
|
+
|
|
43
|
+
#### How to Submit a (Good) Bug Report
|
|
44
|
+
|
|
45
|
+
Bugs are tracked through the Itential Service Desk. Explain the problem and include additional details to help maintainers reproduce the problem:
|
|
46
|
+
|
|
47
|
+
* **Use a clear and descriptive title** for the issue to identify the problem.
|
|
48
|
+
* **Describe the exact steps which reproduce the problem** in as much detail as possible. For example, start by explaining how you configured the adapter (e.g., which properties you used and how they were set) or how you are using an artifact.
|
|
49
|
+
* **Provide specific examples to demonstrate the steps**. Include logs, or copy/paste snippets, in your examples.
|
|
50
|
+
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
|
|
51
|
+
* **Explain which behavior you expected to see instead and why.**
|
|
52
|
+
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows. Use [this tool](https://github.com/colinkeenan/silentcast) or [program](https://github.com/rhcarvalho/byzanz-guiz) on Linux.
|
|
53
|
+
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
|
|
54
|
+
|
|
55
|
+
Provide more context by answering these questions:
|
|
56
|
+
|
|
57
|
+
* **Did the problem start happening recently** (e.g. after updating to a new version/tag) or was this always a problem?
|
|
58
|
+
* If the problem started happening recently, **can you reproduce the problem in an older version/tag?** What's the most recent version in which the problem does not happen?
|
|
59
|
+
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
|
|
60
|
+
|
|
61
|
+
Include details about your configuration and environment:
|
|
62
|
+
|
|
63
|
+
* **Which version of the adapter/artifact are you using?** You can get the exact version by checking the project version in the package.json file.
|
|
64
|
+
* **What's the name and version of the OS you're using**?
|
|
65
|
+
* **Are you running or using IAP in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and guest?
|
|
66
|
+
* **Are there firewalls between IAP and any other system you are integrating with?** If so, have you tried running curl from the system IAP is on to the other system to verify you have connectivity between the systems?
|
|
67
|
+
|
|
68
|
+
### Your First Code Contribution
|
|
69
|
+
|
|
70
|
+
#### Local development
|
|
71
|
+
|
|
72
|
+
This project can be developed locally on all operating systems. For instructions on how to do this, follow the steps highlighted in the [User Guide](README.md). The [User Guide](README.md)provides many more details on cloning the repository for local development, how to lint and test your changes.
|
|
73
|
+
|
|
74
|
+
#### Development Process
|
|
75
|
+
|
|
76
|
+
The following provides a local copy of the repository along with dependencies.
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
go to the repository you are interested in working on
|
|
80
|
+
click on the Clone button to get the link(s) you can use to clone the repository
|
|
81
|
+
git clone <link to clone the project>
|
|
82
|
+
npm install
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Prior to making changes you should create a branch to work in. The branch should be named with the type of change (major, minor or patch) and then a Jira issue number or a description of the issue.
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
git checkout -b <name_of_your_new_branch>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Make all of the desired changes.
|
|
92
|
+
|
|
93
|
+
> **Note:** All code changes should be accompanied by additional Unit and Integration tests to minimize the likelihood that any changes will negatively impact the adapter/artifact as well as to ensure the desired functionality is achieved.
|
|
94
|
+
|
|
95
|
+
| Files | Changes |
|
|
96
|
+
| ------- | ------- |
|
|
97
|
+
| .codeclimate.yml, .eslintignore, .eslintrc.js, .gitignore, .gitlab-ci.yml, .jshintrc, .npmignore | These are foundational files that are used in linting and building of the adapter. Changes to these files are heavily scrutinized and may be implemented in a different manner so that the changes can be implemented across all adapters.|
|
|
98
|
+
| CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE, README.md | These are license and process files for the repository. Changes to these files may require legal review and may also be implemented in a different manner so that the changes can be implemented across all adapters.|
|
|
99
|
+
| utils/*, adapterBase.js | Changes to these files will rarely be accepted. These are process files that need to be changed through the builder process and migration.|
|
|
100
|
+
| adapter.js | Changes to this file are code changes. They should be accompanied by the appropriate unit and integration tests. If new methods are added, they should also be added to the pronghorn.json file, otherwise integration tests are likely to fail.|
|
|
101
|
+
| error.json, propertiesSchema.json | These files are utilized by the Itential Runtime libraries. You can make changes to these files, but the changes should be appending of new errors or properties. Removal of errors and properties can result in rejection of the changes.|
|
|
102
|
+
| pacakge.json, package-lock.json | The package-lock.json is automatically generated and should only be updated when the dependencies inside of the package.json are modified. You can make changes to the package.json to add additional scripts, add new dependencies, modify names, etc. However, changing the scripts or dependencies that are Itential specific will be overriden during the acceptance process.|
|
|
103
|
+
| pronghorn.json | Changes to this file are made for integration into IAP. The most common change here is adding new methods that shoud be exposed to the IAP Workflow.|
|
|
104
|
+
| entities/* | Changes to these files include adding new capabilities, updating existing capabilities, or removing deprecated capabilities in the adapter. Translation configuration can also be modified here.|
|
|
105
|
+
| test/* | Changes to these files include adding, updating, or removing unit and integration tests in the adapter. Tests should never be removed unless the methods that are being tested are removed also. Both the unit and integration test file should have a marker that identifies where modification can take place. Modifications above that marker are likely to be rejected or implemented in a different manner.|
|
|
106
|
+
|
|
107
|
+
> **Note:** It is a best practice to lint and test your code prior to committing changes into the repository. You can lint your code by running **npm run lint** and test it by running **node utils/testRunner.sh**. However, there are pre-commit hooks that will run these scripts when you commit your changes.
|
|
108
|
+
|
|
109
|
+
Commit the changes to the repository.
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
git commit -a -m "<descriptive message>"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
> **Note:** There are pre-commit hooks in place. If the pre-commit hooks fail, you will need to address those issues before moving forward.
|
|
116
|
+
|
|
117
|
+
Push the changes into the repository. This should only be done after the commit has successfully completed.
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
git push origin <name_of_your_new_branch>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Create a [Merge Request](#merge-request).
|
|
124
|
+
|
|
125
|
+
### Merge Requests
|
|
126
|
+
|
|
127
|
+
* Fill out the provided merge request template.
|
|
128
|
+
* Reference related issues and merge requests liberally.
|
|
129
|
+
* Include screenshots and animated GIFs in your merge request whenever possible.
|
|
130
|
+
* Follow the project [Styleguide](#styleguides).
|
|
131
|
+
* End all files with a newline.
|
|
132
|
+
|
|
133
|
+
## Styleguide
|
|
134
|
+
|
|
135
|
+
### Git Commit Messages
|
|
136
|
+
|
|
137
|
+
* Use the present tense ("Add feature" not "Added feature")
|
|
138
|
+
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
|
|
139
|
+
* Consider starting the commit message with an applicable emoji _(not required)_:
|
|
140
|
+
* :art: `:art:` When improving the format/structure of the code.
|
|
141
|
+
* :racehorse: `:racehorse:` When improving performance
|
|
142
|
+
* :non-potable_water: `:non-potable_water:` When plugging memory leaks.
|
|
143
|
+
* :memo: `:memo:` When writing documentation.
|
|
144
|
+
* :penguin: `:penguin:` When fixing something on Linux.
|
|
145
|
+
* :apple: `:apple:` When fixing something on macOS.
|
|
146
|
+
* :checkered_flag: `:checkered_flag:` When fixing something on Windows.
|
|
147
|
+
* :bug: `:bug:` When fixing a bug.
|
|
148
|
+
* :fire: `:fire:` When removing code or files.
|
|
149
|
+
* :green_heart: `:green_heart:` When fixing the CI build.
|
|
150
|
+
* :white_check_mark: `:white_check_mark:` When adding tests,
|
|
151
|
+
* :lock: `:lock:` When dealing with security.
|
|
152
|
+
* :arrow_up: `:arrow_up:` When upgrading dependencies.
|
|
153
|
+
* :arrow_down: `:arrow_down:` When downgrading dependencies.
|
|
154
|
+
* :shirt: `:shirt:` When removing linter warnings.
|
|
155
|
+
|
|
156
|
+
__Avoid installing unnecessary packages.__ Do not install packages just because they might be "nice to have". Itential Opensource projects are supposed to be minimal, specific, and compact by design.
|
|
157
|
+
|
|
158
|
+
_return to [README](./README.md)_
|