You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "yuriipalam (via GitHub)" <gi...@apache.org> on 2026/02/02 14:02:32 UTC
[PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
yuriipalam opened a new pull request, #318:
URL: https://github.com/apache/ozone-site/pull/318
## What changes were proposed in this pull request?
Add `lint` and `lint:fix` commands that run `markdownlint` and `yamllint` packages.
- `lint` just checks for errors
- `lint:fix` actually fixes issues which are possible to fix automatically. It doesn't work for `yamllint` though, it can only check the files.
In the next PR we plan to integrate the ESLint plugin.
## What is the link to the Apache Jira?
[HDDS-14546](https://issues.apache.org/jira/browse/HDDS-14546)
## How was this patch tested?
- [ ] The CI checks on my fork are passing
- [X] I verified the rendered content using a local preview
- [X] I manually verified the steps provided in this change work as described
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on code in PR #318:
URL: https://github.com/apache/ozone-site/pull/318#discussion_r2874906970
##########
src/pages/release-notes/2.0.0.md:
##########
@@ -144,7 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Unit tests and documentation for creating keys/files with EC replication config using ofs/o3fs. ([HDDS-10553](https://issues.apache.org/jira/browse/HDDS-10553))
- Support for passing Kerberos credentials in GrpcOmTransport. ([HDDS-11041](https://issues.apache.org/jira/browse/HDDS-11041))
-### Changed
Review Comment:
Were these failing markdown lint before? The original headings look correct. Same with the 2.1.0 release notes page.
##########
package.json:
##########
@@ -12,7 +12,9 @@
"clear": "docusaurus clear",
"serve": "docusaurus serve --port 3001",
"write-translations": "docusaurus write-translations",
- "write-heading-ids": "docusaurus write-heading-ids"
+ "write-heading-ids": "docusaurus write-heading-ids",
+ "lint": "markdownlint . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\"",
+ "lint:fix": " markdownlint --fix . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\""
Review Comment:
> While yamllint is pre-installed on GitHub Actions runners, developers running these commands locally will need to install yamllint separately via pip or their package manager. Consider adding a note in the CONTRIBUTING.md file about this prerequisite
@yuriipalam can you add this to the contributing guide?
##########
package.json:
##########
@@ -12,7 +12,9 @@
"clear": "docusaurus clear",
"serve": "docusaurus serve --port 3001",
"write-translations": "docusaurus write-translations",
- "write-heading-ids": "docusaurus write-heading-ids"
+ "write-heading-ids": "docusaurus write-heading-ids",
+ "lint": "markdownlint . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\"",
Review Comment:
We should use `$(git rev-parse --show-toplevel)` for both commands so all files are processed regardless of the working directory.
##########
docusaurus.config.js:
##########
@@ -268,7 +272,8 @@ const config = {
const {defaultCreateSitemapItems, ...rest} = params;
const items = await defaultCreateSitemapItems(rest);
- const validUrlRegex = /^https:\/\/ozone\.apache\.org\/([a-z0-9][a-z0-9./-]*[a-z0-9/])?$/;
+ // TODO Base URL must be updated when the new website's branch is merged.
+ const validUrlRegex = new RegExp('^https://ozone-site-v2\.staged\.apache\.org/([a-z0-9][a-z0-9\./-]*[a-z0-9/])?$');
Review Comment:
The changes above this line are left over from before v2 got merged with master. We should remove them instead of re-introducing them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "yuriipalam (via GitHub)" <gi...@apache.org>.
yuriipalam commented on PR #318:
URL: https://github.com/apache/ozone-site/pull/318#issuecomment-3920688941
@smengcl can I have a review please?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #318:
URL: https://github.com/apache/ozone-site/pull/318#discussion_r2825374862
##########
docusaurus.config.js:
##########
Review Comment:
I don't think the changes in this file of this PR is valid? Those are the remainder from the v2 launch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #318:
URL: https://github.com/apache/ozone-site/pull/318#issuecomment-3892284601
PSA: Please switch PR target branch to `apache:master` now that the [v2 website](https://lists.apache.org/thread/ybpbkq6y71kckdppvlz31vs7cp53bc93) has launched.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 merged PR #318:
URL: https://github.com/apache/ozone-site/pull/318
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "yuriipalam (via GitHub)" <gi...@apache.org>.
yuriipalam commented on PR #318:
URL: https://github.com/apache/ozone-site/pull/318#issuecomment-3991843588
Thanks for the review @errose28
I adopted the requested changes, asking for another review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on code in PR #318:
URL: https://github.com/apache/ozone-site/pull/318#discussion_r2880346197
##########
src/pages/release-notes/2.0.0.md:
##########
@@ -144,7 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Unit tests and documentation for creating keys/files with EC replication config using ofs/o3fs. ([HDDS-10553](https://issues.apache.org/jira/browse/HDDS-10553))
- Support for passing Kerberos credentials in GrpcOmTransport. ([HDDS-11041](https://issues.apache.org/jira/browse/HDDS-11041))
-### Changed
Review Comment:
Right, but I don't see any violations in the original version from either manual inspection or the tools. On the branch for this PR I ran `git checkout master -- src/pages/release-notes/2.1.0.md` then `pnpm run lint` and it passed. Here's the change that applies on the top of this branch (the inverse of what is currently in the PR):
```
diff --git a/src/pages/release-notes/2.1.0.md b/src/pages/release-notes/2.1.0.md
index 414086bc3..e5d80b26f 100644
--- a/src/pages/release-notes/2.1.0.md
+++ b/src/pages/release-notes/2.1.0.md
@@ -100,7 +100,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added a "Mismatched Replica" tab to the Containers Page and improved mismatch API. ([HDDS-12395](https://issues.apache.org/jira/browse/HDDS-12395))
- Added `ozone admin` commands for listing containers based on health state and sorting Datanodes. ([HDDS-12653](https://issues.apache.org/jira/browse/HDDS-12653), [HDDS-13095](https://issues.apache.org/jira/browse/HDDS-13095))
-#### Changed
+### Changed
- **Metadata Storage**: Moved container-related metadata and OM task metadata from Derby DB to Ozone Manager (OM) RocksDB. ([HDDS-13669](https://issues.apache.org/jira/browse/HDDS-13669))
- **Locking**: Refactored OzoneManagerLock to handle hierarchical resource locking and implemented a pool-based lock manager. ([HDDS-13797](https://issues.apache.org/jira/browse/HDDS-13797), [HDDS-13798](https://issues.apache.org/jira/browse/HDDS-13798))
@@ -113,7 +113,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Ozone now requires the Hadoop 3.4 runtime. Support for Hadoop 3.1.2 is deprecated. ([HDDS-12152](https://issues.apache.org/jira/browse/HDDS-12152))
- Renamed the previous functionality of the `--all` option in `ozone sh snapshot lsDiff` to `--all-status`. The `--all` option now behaves as a listing limit, setting the count to `Integer.MAX_VALUE`. ([HDDS-8802](https://issues.apache.org/jira/browse/HDDS-8802))
-#### Fixed
+### Fixed
- **Snapshot Locking**: Fixed OMLockDetails usage where it incorrectly returned a ThreadLocal Object. ([HDDS-13978](https://issues.apache.org/jira/browse/HDDS-13978), [HDDS-13004](https://issues.apache.org/jira/browse/HDDS-13004))
- **Recon Startup**: Improved Recon `bootup` times by handling failed delta tasks from previous runs and making task reprocessing non-blocking. ([HDDS-13791](https://issues.apache.org/jira/browse/HDDS-13791))
@@ -121,16 +121,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed Datanode decommission failing when other nodes are offline in Ratis replication. ([HDDS-13544](https://issues.apache.org/jira/browse/HDDS-13544))
- Fixed memory leaks in NSSummary and issues with Derby during schema upgrade. ([HDDS-8565](https://issues.apache.org/jira/browse/HDDS-8565), [HDDS-12968](https://issues.apache.org/jira/browse/HDDS-12968))
-#### Security
+### Security
- **Ranger**: Added artifacts for Ranger to authorize STS tokens. ([HDDS-13848](https://issues.apache.org/jira/browse/HDDS-13848))
-### Downloads
+## Downloads
- [Download tar.gz](https://www.apache.org/dyn/closer.cgi/ozone/2.1.0/ozone-2.1.0.tar.gz) ([checksum](https://downloads.apache.org/ozone/2.1.0/ozone-2.1.0.tar.gz.sha512), [signature](https://downloads.apache.org/ozone/2.1.0/ozone-2.1.0.tar.gz.asc))
- [Download src](https://www.apache.org/dyn/closer.cgi/ozone/2.1.0/ozone-2.1.0-src.tar.gz) ([checksum](https://downloads.apache.org/ozone/2.1.0/ozone-2.1.0-src.tar.gz.sha512), [signature](https://downloads.apache.org/ozone/2.1.0/ozone-2.1.0-src.tar.gz.asc))
-### Documentation
+## Documentation
- [Ozone 2.1.0 Documentation](https://ozone.apache.org/docs/2.1.0)
```
There was a point where a bad commit was pushed to master with linting issues and we had to revert and fix it. Perhaps this change came from there but is not needed anymore.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "yuriipalam (via GitHub)" <gi...@apache.org>.
yuriipalam commented on code in PR #318:
URL: https://github.com/apache/ozone-site/pull/318#discussion_r2878946721
##########
src/pages/release-notes/2.0.0.md:
##########
@@ -144,7 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Unit tests and documentation for creating keys/files with EC replication config using ofs/o3fs. ([HDDS-10553](https://issues.apache.org/jira/browse/HDDS-10553))
- Support for passing Kerberos credentials in GrpcOmTransport. ([HDDS-11041](https://issues.apache.org/jira/browse/HDDS-11041))
-### Changed
Review Comment:
They were, since according to markdown lint the heading hierarchy should be precise. E.g., H3 can go only after H2, but not after H1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on PR #318:
URL: https://github.com/apache/ozone-site/pull/318#issuecomment-3993385648
We just need to close the loop on [this markdown change](https://github.com/apache/ozone-site/pull/318#discussion_r2880346197) but everything else looks good!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "yuriipalam (via GitHub)" <gi...@apache.org>.
yuriipalam commented on code in PR #318:
URL: https://github.com/apache/ozone-site/pull/318#discussion_r2882828552
##########
src/pages/release-notes/2.0.0.md:
##########
@@ -144,7 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Unit tests and documentation for creating keys/files with EC replication config using ofs/o3fs. ([HDDS-10553](https://issues.apache.org/jira/browse/HDDS-10553))
- Support for passing Kerberos credentials in GrpcOmTransport. ([HDDS-11041](https://issues.apache.org/jira/browse/HDDS-11041))
-### Changed
Review Comment:
> There was a point where a bad commit was pushed to master with linting issues and we had to revert and fix it. Perhaps this change came from there but is not needed anymore.
Sure, I think so. I pushed a commit fixing this, hope it's good now!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14546. [Website v2] Add `lint` and `lint:fix` commands [ozone-site]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #318:
URL: https://github.com/apache/ozone-site/pull/318#discussion_r2825382120
##########
package.json:
##########
@@ -12,7 +12,9 @@
"clear": "docusaurus clear",
"serve": "docusaurus serve --port 3001",
"write-translations": "docusaurus write-translations",
- "write-heading-ids": "docusaurus write-heading-ids"
+ "write-heading-ids": "docusaurus write-heading-ids",
+ "lint": "markdownlint . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\"",
+ "lint:fix": " markdownlint --fix . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\""
Review Comment:
Extra leading space in the lint:fix script value. The value should start with "markdownlint" not " markdownlint".
```suggestion
"lint:fix": "markdownlint --fix . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\""
```
##########
package.json:
##########
@@ -12,7 +12,9 @@
"clear": "docusaurus clear",
"serve": "docusaurus serve --port 3001",
"write-translations": "docusaurus write-translations",
- "write-heading-ids": "docusaurus write-heading-ids"
+ "write-heading-ids": "docusaurus write-heading-ids",
+ "lint": "markdownlint . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\"",
+ "lint:fix": " markdownlint --fix . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\""
Review Comment:
The yamllint command is used in both lint scripts but yamllint is not listed as a dependency in package.json. While yamllint is pre-installed on GitHub Actions runners, developers running these commands locally will need to install yamllint separately via pip or their package manager. Consider adding a note in the CONTRIBUTING.md file about this prerequisite, or explore using a Node.js-based YAML linter that can be added as a devDependency.
##########
docusaurus.config.js:
##########
@@ -157,7 +161,8 @@ const config = {
const {defaultCreateSitemapItems, ...rest} = params;
const items = await defaultCreateSitemapItems(rest);
- const validUrlRegex = /^https:\/\/ozone\.apache\.org\/([a-z0-9][a-z0-9./-]*[a-z0-9/])?$/;
+ // TODO Base URL must be updated when the new website's branch is merged.
+ const validUrlRegex = new RegExp('^https://ozone-site-v2\.staged\.apache\.org/([a-z0-9][a-z0-9\./-]*[a-z0-9/])?$');
Review Comment:
The regex pattern uses single backslashes in the RegExp constructor string. In JavaScript, when passing a string to the RegExp constructor, backslashes need to be doubled to properly escape special regex characters. The dots should be escaped as `\\.` instead of `\.`, and the forward slashes as `\\/` instead of `\/`. The current pattern will match any character instead of literal dots and forward slashes. The correct pattern should be: `new RegExp('^https://ozone-site-v2\\.staged\\.apache\\.org/([a-z0-9][a-z0-9\\./-]*[a-z0-9/])?$')`
```suggestion
const validUrlRegex = new RegExp('^https://ozone-site-v2\\.staged\\.apache\\.org/([a-z0-9][a-z0-9\\./-]*[a-z0-9/])?$');
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org