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

feat: allow ability to set working directory of go app #246

Closed
wants to merge 1 commit into from

Conversation

wilsonjord
Copy link
Contributor

@wilsonjord wilsonjord commented Feb 11, 2024

Allows use of hybrid repos where the go application may be in a different directory from the project root.

Main idea is the introduction of a working-directory input, which has a default value of .. This default value results in the same behaviour as currently seen, that is, the go application is in the project root.

This working-directory can be changed and passed through to the relevant reusable workflows, and utilities.

The working-directory functionality is based on golangci-lint-action functionality (https://github.com/golangci/golangci-lint-action/tree/3cfe3a4abbb849e10058ce4af15d205b6da42804?tab=readme-ov-file#how-to-use)

Rationale: some repos have a monorepo structure, containing several projects of mixed languages (for example the docker-gamit repo, with a golang applications and bash applications). The ability to specify worker-directory for golang-specific workflows, allows for a monorepo structure like the following:

docker-gamit
    - go-app
    - bash-scripts

Layouts like this ensure that one project (say, bash-scripts containing .-prefixed application files), are not treated as part of a go application, and vice versa.

Allows use of hybrid repos where the go application may be in a
different directory from the project root.
@wilsonjord wilsonjord self-assigned this Feb 11, 2024
@wilsonjord wilsonjord added the enhancement New feature or request label Feb 11, 2024
Copy link
Contributor

@ardrigh ardrigh left a comment

Choose a reason for hiding this comment

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

We should have discussion about why this is needed before it's added across everything

@wilsonjord
Copy link
Contributor Author

@ardrigh I have added a rationale to the description. If this isn't sufficient, let me know the best way to discuss, if it's a meeting, or Slack discussion etc.

@wilsonjord wilsonjord requested a review from ardrigh February 18, 2024 22:23
@wilsonjord
Copy link
Contributor Author

Just checking on the status of this review

@ardrigh
Copy link
Contributor

ardrigh commented Feb 18, 2024

I think we should cover this at the App Support meeting this afternoon

@ardrigh
Copy link
Contributor

ardrigh commented Feb 18, 2024

Allows use of hybrid repos where the go application may be in a different directory from the project root.

Main idea is the introduction of a working-directory input, which has a default value of .. This default value results in the same behaviour as currently seen, that is, the go application is in the project root.

This working-directory can be changed and passed through to the relevant reusable workflows, and utilities.

The working-directory functionality is based on golangci-lint-action functionality (https://github.com/golangci/golangci-lint-action/tree/3cfe3a4abbb849e10058ce4af15d205b6da42804?tab=readme-ov-file#how-to-use)

Rationale: some repos have a monorepo structure, containing several projects of mixed languages (for example the docker-gamit repo, with a golang applications and bash applications). The ability to specify worker-directory for golang-specific workflows, allows for a monorepo structure like the following:

docker-gamit
    - go-app
    - bash-scripts

Layouts like this ensure that one project (say, bash-scripts containing .-prefixed application files), are not treated as part of a go application, and vice versa.

This is more an argument for splitting the Go components into a separate repo.

We are no longer limited on the number of GitHub repos we have, we don't need to stay within the constraints that was the reason for hybrid repos to be created.

The reasoning for splitting the Go code into a separate repo is in https://github.com/GeoNet/docker-gamit/pull/219

@ardrigh
Copy link
Contributor

ardrigh commented Feb 19, 2024

After the discussion at the App Support meeting today, waiting for @quiffman or @sue-h-gns to organise a new meeting/forum to discuss these types of changes, and looking at improvements to repo setups.

@Mossman1215
Copy link
Contributor

between app support meeting and the linked ticket I will close this PR as un merged
future action is to clearly communicate repository standards for layout and CI & CD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants